chunk-AOLS5UT5.js 467 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845
  1. import {
  2. Fragment,
  3. Teleport,
  4. Transition,
  5. 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-ZUXVXN6F.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((a, b) => vnodes.indexOf(a.vnode) - vnodes.indexOf(b.vnode));
  282. const orderedPublicChildren = internalChildren.map((item) => item.proxy);
  283. publicChildren.sort((a, b) => {
  284. const indexA = orderedPublicChildren.indexOf(a);
  285. const indexB = orderedPublicChildren.indexOf(b);
  286. return indexA - indexB;
  287. });
  288. }
  289. function useChildren(key) {
  290. const publicChildren = reactive([]);
  291. const internalChildren = reactive([]);
  292. const parent = getCurrentInstance();
  293. const linkChildren = (value) => {
  294. const link = (child) => {
  295. if (child.proxy) {
  296. internalChildren.push(child);
  297. publicChildren.push(child.proxy);
  298. sortChildren(parent, publicChildren, internalChildren);
  299. }
  300. };
  301. const unlink = (child) => {
  302. const index = internalChildren.indexOf(child);
  303. publicChildren.splice(index, 1);
  304. internalChildren.splice(index, 1);
  305. };
  306. provide(key, Object.assign({
  307. link,
  308. unlink,
  309. children: publicChildren,
  310. internalChildren
  311. }, value));
  312. };
  313. return {
  314. children: publicChildren,
  315. linkChildren
  316. };
  317. }
  318. var SECOND = 1e3;
  319. var MINUTE = 60 * SECOND;
  320. var HOUR = 60 * MINUTE;
  321. var DAY = 24 * HOUR;
  322. function parseTime(time) {
  323. const days = Math.floor(time / DAY);
  324. const hours = Math.floor(time % DAY / HOUR);
  325. const minutes = Math.floor(time % HOUR / MINUTE);
  326. const seconds = Math.floor(time % MINUTE / SECOND);
  327. const milliseconds = Math.floor(time % SECOND);
  328. return {
  329. total: time,
  330. days,
  331. hours,
  332. minutes,
  333. seconds,
  334. milliseconds
  335. };
  336. }
  337. function isSameSecond(time1, time2) {
  338. return Math.floor(time1 / 1e3) === Math.floor(time2 / 1e3);
  339. }
  340. function useCountDown(options) {
  341. let rafId;
  342. let endTime;
  343. let counting;
  344. let deactivated;
  345. const remain = ref(options.time);
  346. const current2 = computed(() => parseTime(remain.value));
  347. const pause = () => {
  348. counting = false;
  349. cancelRaf(rafId);
  350. };
  351. const getCurrentRemain = () => Math.max(endTime - Date.now(), 0);
  352. const setRemain = (value) => {
  353. var _a, _b;
  354. remain.value = value;
  355. (_a = options.onChange) == null ? void 0 : _a.call(options, current2.value);
  356. if (value === 0) {
  357. pause();
  358. (_b = options.onFinish) == null ? void 0 : _b.call(options);
  359. }
  360. };
  361. const microTick = () => {
  362. rafId = raf(() => {
  363. if (counting) {
  364. setRemain(getCurrentRemain());
  365. if (remain.value > 0) {
  366. microTick();
  367. }
  368. }
  369. });
  370. };
  371. const macroTick = () => {
  372. rafId = raf(() => {
  373. if (counting) {
  374. const remainRemain = getCurrentRemain();
  375. if (!isSameSecond(remainRemain, remain.value) || remainRemain === 0) {
  376. setRemain(remainRemain);
  377. }
  378. if (remain.value > 0) {
  379. macroTick();
  380. }
  381. }
  382. });
  383. };
  384. const tick = () => {
  385. if (!inBrowser2) {
  386. return;
  387. }
  388. if (options.millisecond) {
  389. microTick();
  390. } else {
  391. macroTick();
  392. }
  393. };
  394. const start2 = () => {
  395. if (!counting) {
  396. endTime = Date.now() + remain.value;
  397. counting = true;
  398. tick();
  399. }
  400. };
  401. const reset = (totalTime = options.time) => {
  402. pause();
  403. remain.value = totalTime;
  404. };
  405. onBeforeUnmount(pause);
  406. onActivated(() => {
  407. if (deactivated) {
  408. counting = true;
  409. deactivated = false;
  410. tick();
  411. }
  412. });
  413. onDeactivated(() => {
  414. if (counting) {
  415. pause();
  416. deactivated = true;
  417. }
  418. });
  419. return {
  420. start: start2,
  421. pause,
  422. reset,
  423. current: current2
  424. };
  425. }
  426. function onMountedOrActivated(hook) {
  427. let mounted;
  428. onMounted(() => {
  429. hook();
  430. nextTick(() => {
  431. mounted = true;
  432. });
  433. });
  434. onActivated(() => {
  435. if (mounted) {
  436. hook();
  437. }
  438. });
  439. }
  440. function useEventListener(type, listener, options = {}) {
  441. if (!inBrowser2) {
  442. return;
  443. }
  444. const { target = window, passive: passive2 = false, capture = false } = options;
  445. let attached;
  446. const add = (target2) => {
  447. const element = unref(target2);
  448. if (element && !attached) {
  449. element.addEventListener(type, listener, {
  450. capture,
  451. passive: passive2
  452. });
  453. attached = true;
  454. }
  455. };
  456. const remove2 = (target2) => {
  457. const element = unref(target2);
  458. if (element && attached) {
  459. element.removeEventListener(type, listener, capture);
  460. attached = false;
  461. }
  462. };
  463. onUnmounted(() => remove2(target));
  464. onDeactivated(() => remove2(target));
  465. onMountedOrActivated(() => add(target));
  466. if (isRef(target)) {
  467. watch(target, (val, oldVal) => {
  468. remove2(oldVal);
  469. add(val);
  470. });
  471. }
  472. }
  473. function useClickAway(target, listener, options = {}) {
  474. if (!inBrowser2) {
  475. return;
  476. }
  477. const { eventName = "click" } = options;
  478. const onClick = (event) => {
  479. const targets = Array.isArray(target) ? target : [target];
  480. const isClickAway = targets.every((item) => {
  481. const element = unref(item);
  482. return element && !element.contains(event.target);
  483. });
  484. if (isClickAway) {
  485. listener(event);
  486. }
  487. };
  488. useEventListener(eventName, onClick, { target: document });
  489. }
  490. var width;
  491. var height;
  492. function useWindowSize() {
  493. if (!width) {
  494. width = ref(0);
  495. height = ref(0);
  496. if (inBrowser2) {
  497. const update = () => {
  498. width.value = window.innerWidth;
  499. height.value = window.innerHeight;
  500. };
  501. update();
  502. window.addEventListener("resize", update, { passive: true });
  503. window.addEventListener("orientationchange", update, { passive: true });
  504. }
  505. }
  506. return { width, height };
  507. }
  508. var overflowScrollReg = /scroll|auto|overlay/i;
  509. var defaultRoot = inBrowser2 ? window : void 0;
  510. function isElement(node) {
  511. const ELEMENT_NODE_TYPE = 1;
  512. return node.tagName !== "HTML" && node.tagName !== "BODY" && node.nodeType === ELEMENT_NODE_TYPE;
  513. }
  514. function getScrollParent(el, root = defaultRoot) {
  515. let node = el;
  516. while (node && node !== root && isElement(node)) {
  517. const { overflowY } = window.getComputedStyle(node);
  518. if (overflowScrollReg.test(overflowY)) {
  519. return node;
  520. }
  521. node = node.parentNode;
  522. }
  523. return root;
  524. }
  525. function useScrollParent(el, root = defaultRoot) {
  526. const scrollParent = ref();
  527. onMounted(() => {
  528. if (el.value) {
  529. scrollParent.value = getScrollParent(el.value, root);
  530. }
  531. });
  532. return scrollParent;
  533. }
  534. var visibility;
  535. function usePageVisibility() {
  536. if (!visibility) {
  537. visibility = ref("visible");
  538. if (inBrowser2) {
  539. const update = () => {
  540. visibility.value = document.hidden ? "hidden" : "visible";
  541. };
  542. update();
  543. window.addEventListener("visibilitychange", update);
  544. }
  545. }
  546. return visibility;
  547. }
  548. var CUSTOM_FIELD_INJECTION_KEY = Symbol("van-field");
  549. function useCustomFieldValue(customValue) {
  550. const field = inject(CUSTOM_FIELD_INJECTION_KEY, null);
  551. if (field && !field.customValue.value) {
  552. field.customValue.value = customValue;
  553. watch(customValue, () => {
  554. field.resetValidation();
  555. field.validateWithTrigger("onChange");
  556. });
  557. }
  558. }
  559. // node_modules/vant/es/utils/dom.mjs
  560. function getScrollTop(el) {
  561. const top2 = "scrollTop" in el ? el.scrollTop : el.pageYOffset;
  562. return Math.max(top2, 0);
  563. }
  564. function setScrollTop(el, value) {
  565. if ("scrollTop" in el) {
  566. el.scrollTop = value;
  567. } else {
  568. el.scrollTo(el.scrollX, value);
  569. }
  570. }
  571. function getRootScrollTop() {
  572. return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
  573. }
  574. function setRootScrollTop(value) {
  575. setScrollTop(window, value);
  576. setScrollTop(document.body, value);
  577. }
  578. function getElementTop(el, scroller) {
  579. if (el === window) {
  580. return 0;
  581. }
  582. const scrollTop = scroller ? getScrollTop(scroller) : getRootScrollTop();
  583. return useRect(el).top + scrollTop;
  584. }
  585. var isIOS2 = isIOS();
  586. function resetScroll() {
  587. if (isIOS2) {
  588. setRootScrollTop(getRootScrollTop());
  589. }
  590. }
  591. var stopPropagation = (event) => event.stopPropagation();
  592. function preventDefault(event, isStopPropagation) {
  593. if (typeof event.cancelable !== "boolean" || event.cancelable) {
  594. event.preventDefault();
  595. }
  596. if (isStopPropagation) {
  597. stopPropagation(event);
  598. }
  599. }
  600. function isHidden(elementRef) {
  601. const el = unref(elementRef);
  602. if (!el) {
  603. return false;
  604. }
  605. const style = window.getComputedStyle(el);
  606. const hidden = style.display === "none";
  607. const parentHidden = el.offsetParent === null && style.position !== "fixed";
  608. return hidden || parentHidden;
  609. }
  610. var { width: windowWidth, height: windowHeight } = useWindowSize();
  611. // node_modules/vant/es/utils/format.mjs
  612. function addUnit(value) {
  613. if (isDef(value)) {
  614. return isNumeric(value) ? `${value}px` : String(value);
  615. }
  616. return void 0;
  617. }
  618. function getSizeStyle(originSize) {
  619. if (isDef(originSize)) {
  620. if (Array.isArray(originSize)) {
  621. return {
  622. width: addUnit(originSize[0]),
  623. height: addUnit(originSize[1])
  624. };
  625. }
  626. const size = addUnit(originSize);
  627. return {
  628. width: size,
  629. height: size
  630. };
  631. }
  632. }
  633. function getZIndexStyle(zIndex) {
  634. const style = {};
  635. if (zIndex !== void 0) {
  636. style.zIndex = +zIndex;
  637. }
  638. return style;
  639. }
  640. var rootFontSize;
  641. function getRootFontSize() {
  642. if (!rootFontSize) {
  643. const doc = document.documentElement;
  644. const fontSize = doc.style.fontSize || window.getComputedStyle(doc).fontSize;
  645. rootFontSize = parseFloat(fontSize);
  646. }
  647. return rootFontSize;
  648. }
  649. function convertRem(value) {
  650. value = value.replace(/rem/g, "");
  651. return +value * getRootFontSize();
  652. }
  653. function convertVw(value) {
  654. value = value.replace(/vw/g, "");
  655. return +value * windowWidth.value / 100;
  656. }
  657. function convertVh(value) {
  658. value = value.replace(/vh/g, "");
  659. return +value * windowHeight.value / 100;
  660. }
  661. function unitToPx(value) {
  662. if (typeof value === "number") {
  663. return value;
  664. }
  665. if (inBrowser) {
  666. if (value.includes("rem")) {
  667. return convertRem(value);
  668. }
  669. if (value.includes("vw")) {
  670. return convertVw(value);
  671. }
  672. if (value.includes("vh")) {
  673. return convertVh(value);
  674. }
  675. }
  676. return parseFloat(value);
  677. }
  678. var camelizeRE = /-(\w)/g;
  679. var camelize = (str) => str.replace(camelizeRE, (_, c) => c.toUpperCase());
  680. var kebabCase = (str) => str.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
  681. function padZero(num, targetLength = 2) {
  682. let str = num + "";
  683. while (str.length < targetLength) {
  684. str = "0" + str;
  685. }
  686. return str;
  687. }
  688. var clamp = (num, min, max) => Math.min(Math.max(num, min), max);
  689. function trimExtraChar(value, char, regExp) {
  690. const index = value.indexOf(char);
  691. if (index === -1) {
  692. return value;
  693. }
  694. if (char === "-" && index !== 0) {
  695. return value.slice(0, index);
  696. }
  697. return value.slice(0, index + 1) + value.slice(index).replace(regExp, "");
  698. }
  699. function formatNumber(value, allowDot = true, allowMinus = true) {
  700. if (allowDot) {
  701. value = trimExtraChar(value, ".", /\./g);
  702. } else {
  703. value = value.split(".")[0];
  704. }
  705. if (allowMinus) {
  706. value = trimExtraChar(value, "-", /-/g);
  707. } else {
  708. value = value.replace(/-/, "");
  709. }
  710. const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
  711. return value.replace(regExp, "");
  712. }
  713. function addNumber(num1, num2) {
  714. const cardinal = 10 ** 10;
  715. return Math.round((num1 + num2) * cardinal) / cardinal;
  716. }
  717. // node_modules/vant/es/utils/create.mjs
  718. function createTranslate(name97) {
  719. const prefix = camelize(name97) + ".";
  720. return (path, ...args) => {
  721. const messages2 = stdin_default2.messages();
  722. const message = get(messages2, prefix + path) || get(messages2, path);
  723. return isFunction(message) ? message(...args) : message;
  724. };
  725. }
  726. function genBem(name97, mods) {
  727. if (!mods) {
  728. return "";
  729. }
  730. if (typeof mods === "string") {
  731. return ` ${name97}--${mods}`;
  732. }
  733. if (Array.isArray(mods)) {
  734. return mods.reduce((ret, item) => ret + genBem(name97, item), "");
  735. }
  736. return Object.keys(mods).reduce((ret, key) => ret + (mods[key] ? genBem(name97, key) : ""), "");
  737. }
  738. function createBEM(name97) {
  739. return (el, mods) => {
  740. if (el && typeof el !== "string") {
  741. mods = el;
  742. el = "";
  743. }
  744. el = el ? `${name97}__${el}` : name97;
  745. return `${el}${genBem(el, mods)}`;
  746. };
  747. }
  748. function createNamespace(name97) {
  749. const prefixedName = `van-${name97}`;
  750. return [
  751. prefixedName,
  752. createBEM(prefixedName),
  753. createTranslate(prefixedName)
  754. ];
  755. }
  756. // node_modules/vant/es/utils/constant.mjs
  757. var BORDER = "van-hairline";
  758. var BORDER_TOP = `${BORDER}--top`;
  759. var BORDER_LEFT = `${BORDER}--left`;
  760. var BORDER_BOTTOM = `${BORDER}--bottom`;
  761. var BORDER_SURROUND = `${BORDER}--surround`;
  762. var BORDER_TOP_BOTTOM = `${BORDER}--top-bottom`;
  763. var BORDER_UNSET_TOP_BOTTOM = `${BORDER}-unset--top-bottom`;
  764. var HAPTICS_FEEDBACK = "van-haptics-feedback";
  765. var FORM_KEY = Symbol("van-form");
  766. // node_modules/vant/es/utils/interceptor.mjs
  767. function callInterceptor(interceptor, {
  768. args = [],
  769. done,
  770. canceled
  771. }) {
  772. if (interceptor) {
  773. const returnVal = interceptor.apply(null, args);
  774. if (isPromise(returnVal)) {
  775. returnVal.then((value) => {
  776. if (value) {
  777. done();
  778. } else if (canceled) {
  779. canceled();
  780. }
  781. }).catch(noop);
  782. } else if (returnVal) {
  783. done();
  784. } else if (canceled) {
  785. canceled();
  786. }
  787. } else {
  788. done();
  789. }
  790. }
  791. // node_modules/vant/es/utils/with-install.mjs
  792. function withInstall(options) {
  793. options.install = (app) => {
  794. const { name: name97 } = options;
  795. if (name97) {
  796. app.component(name97, options);
  797. app.component(camelize(`-${name97}`), options);
  798. }
  799. };
  800. return options;
  801. }
  802. // node_modules/vant/es/composables/on-popup-reopen.mjs
  803. var POPUP_TOGGLE_KEY = Symbol();
  804. function onPopupReopen(callback) {
  805. const popupToggleStatus = inject(POPUP_TOGGLE_KEY, null);
  806. if (popupToggleStatus) {
  807. watch(popupToggleStatus, (show) => {
  808. if (show) {
  809. callback();
  810. }
  811. });
  812. }
  813. }
  814. // node_modules/vant/es/composables/use-height.mjs
  815. var useHeight = (element, withSafeArea) => {
  816. const height2 = ref();
  817. const setHeight = () => {
  818. height2.value = useRect(element).height;
  819. };
  820. onMounted(() => {
  821. nextTick(setHeight);
  822. if (withSafeArea) {
  823. for (let i = 1; i <= 3; i++) {
  824. setTimeout(setHeight, 100 * i);
  825. }
  826. }
  827. });
  828. onPopupReopen(() => nextTick(setHeight));
  829. return height2;
  830. };
  831. // node_modules/vant/es/composables/use-placeholder.mjs
  832. function usePlaceholder(contentRef, bem93) {
  833. const height2 = useHeight(contentRef, true);
  834. return (renderContent) => createVNode("div", {
  835. "class": bem93("placeholder"),
  836. "style": {
  837. height: height2.value ? `${height2.value}px` : void 0
  838. }
  839. }, [renderContent()]);
  840. }
  841. // node_modules/vant/es/action-bar/ActionBar.mjs
  842. var [name, bem] = createNamespace("action-bar");
  843. var ACTION_BAR_KEY = Symbol(name);
  844. var actionBarProps = {
  845. placeholder: Boolean,
  846. safeAreaInsetBottom: truthProp
  847. };
  848. var stdin_default3 = defineComponent({
  849. name,
  850. props: actionBarProps,
  851. setup(props, {
  852. slots
  853. }) {
  854. const root = ref();
  855. const renderPlaceholder = usePlaceholder(root, bem);
  856. const {
  857. linkChildren
  858. } = useChildren(ACTION_BAR_KEY);
  859. linkChildren();
  860. const renderActionBar = () => {
  861. var _a;
  862. return createVNode("div", {
  863. "ref": root,
  864. "class": [bem(), {
  865. "van-safe-area-bottom": props.safeAreaInsetBottom
  866. }]
  867. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  868. };
  869. return () => {
  870. if (props.placeholder) {
  871. return renderPlaceholder(renderActionBar);
  872. }
  873. return renderActionBar();
  874. };
  875. }
  876. });
  877. // node_modules/vant/es/action-bar/index.mjs
  878. var ActionBar = withInstall(stdin_default3);
  879. // node_modules/vant/es/badge/Badge.mjs
  880. var [name2, bem2] = createNamespace("badge");
  881. var badgeProps = {
  882. dot: Boolean,
  883. max: numericProp,
  884. tag: makeStringProp("div"),
  885. color: String,
  886. offset: Array,
  887. content: numericProp,
  888. showZero: truthProp,
  889. position: makeStringProp("top-right")
  890. };
  891. var stdin_default4 = defineComponent({
  892. name: name2,
  893. props: badgeProps,
  894. setup(props, {
  895. slots
  896. }) {
  897. const hasContent = () => {
  898. if (slots.content) {
  899. return true;
  900. }
  901. const {
  902. content,
  903. showZero
  904. } = props;
  905. return isDef(content) && content !== "" && (showZero || content !== 0 && content !== "0");
  906. };
  907. const renderContent = () => {
  908. const {
  909. dot,
  910. max,
  911. content
  912. } = props;
  913. if (!dot && hasContent()) {
  914. if (slots.content) {
  915. return slots.content();
  916. }
  917. if (isDef(max) && isNumeric(content) && +content > max) {
  918. return `${max}+`;
  919. }
  920. return content;
  921. }
  922. };
  923. const style = computed(() => {
  924. const style2 = {
  925. background: props.color
  926. };
  927. if (props.offset) {
  928. const [x, y] = props.offset;
  929. if (slots.default) {
  930. style2.top = addUnit(y);
  931. if (typeof x === "number") {
  932. style2.right = addUnit(-x);
  933. } else {
  934. style2.right = x.startsWith("-") ? x.replace("-", "") : `-${x}`;
  935. }
  936. } else {
  937. style2.marginTop = addUnit(y);
  938. style2.marginLeft = addUnit(x);
  939. }
  940. }
  941. return style2;
  942. });
  943. const renderBadge = () => {
  944. if (hasContent() || props.dot) {
  945. return createVNode("div", {
  946. "class": bem2([props.position, {
  947. dot: props.dot,
  948. fixed: !!slots.default
  949. }]),
  950. "style": style.value
  951. }, [renderContent()]);
  952. }
  953. };
  954. return () => {
  955. if (slots.default) {
  956. const {
  957. tag
  958. } = props;
  959. return createVNode(tag, {
  960. "class": bem2("wrapper")
  961. }, {
  962. default: () => [slots.default(), renderBadge()]
  963. });
  964. }
  965. return renderBadge();
  966. };
  967. }
  968. });
  969. // node_modules/vant/es/badge/index.mjs
  970. var Badge = withInstall(stdin_default4);
  971. // node_modules/vant/es/composables/use-global-z-index.mjs
  972. var globalZIndex = 2e3;
  973. var useGlobalZIndex = () => ++globalZIndex;
  974. var setGlobalZIndex = (val) => {
  975. globalZIndex = val;
  976. };
  977. // node_modules/vant/es/config-provider/ConfigProvider.mjs
  978. var [name3, bem3] = createNamespace("config-provider");
  979. var CONFIG_PROVIDER_KEY = Symbol(name3);
  980. var configProviderProps = {
  981. tag: makeStringProp("div"),
  982. zIndex: Number,
  983. themeVars: Object,
  984. iconPrefix: String
  985. };
  986. function mapThemeVarsToCSSVars(themeVars) {
  987. const cssVars = {};
  988. Object.keys(themeVars).forEach((key) => {
  989. cssVars[`--van-${kebabCase(key)}`] = themeVars[key];
  990. });
  991. return cssVars;
  992. }
  993. var stdin_default5 = defineComponent({
  994. name: name3,
  995. props: configProviderProps,
  996. setup(props, {
  997. slots
  998. }) {
  999. const style = computed(() => {
  1000. if (props.themeVars) {
  1001. return mapThemeVarsToCSSVars(props.themeVars);
  1002. }
  1003. });
  1004. provide(CONFIG_PROVIDER_KEY, props);
  1005. watchEffect(() => {
  1006. if (props.zIndex !== void 0) {
  1007. setGlobalZIndex(props.zIndex);
  1008. }
  1009. });
  1010. return () => createVNode(props.tag, {
  1011. "class": bem3(),
  1012. "style": style.value
  1013. }, {
  1014. default: () => {
  1015. var _a;
  1016. return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
  1017. }
  1018. });
  1019. }
  1020. });
  1021. // node_modules/vant/es/icon/Icon.mjs
  1022. var [name4, bem4] = createNamespace("icon");
  1023. var isImage = (name210) => name210 == null ? void 0 : name210.includes("/");
  1024. var iconProps = {
  1025. dot: Boolean,
  1026. tag: makeStringProp("i"),
  1027. name: String,
  1028. size: numericProp,
  1029. badge: numericProp,
  1030. color: String,
  1031. badgeProps: Object,
  1032. classPrefix: String
  1033. };
  1034. var stdin_default6 = defineComponent({
  1035. name: name4,
  1036. props: iconProps,
  1037. setup(props, {
  1038. slots
  1039. }) {
  1040. const config = inject(CONFIG_PROVIDER_KEY, null);
  1041. const classPrefix = computed(() => props.classPrefix || (config == null ? void 0 : config.iconPrefix) || bem4());
  1042. return () => {
  1043. const {
  1044. tag,
  1045. dot,
  1046. name: name210,
  1047. size,
  1048. badge,
  1049. color
  1050. } = props;
  1051. const isImageIcon = isImage(name210);
  1052. return createVNode(Badge, mergeProps({
  1053. "dot": dot,
  1054. "tag": tag,
  1055. "class": [classPrefix.value, isImageIcon ? "" : `${classPrefix.value}-${name210}`],
  1056. "style": {
  1057. color,
  1058. fontSize: addUnit(size)
  1059. },
  1060. "content": badge
  1061. }, props.badgeProps), {
  1062. default: () => {
  1063. var _a;
  1064. return [(_a = slots.default) == null ? void 0 : _a.call(slots), isImageIcon && createVNode("img", {
  1065. "class": bem4("image"),
  1066. "src": name210
  1067. }, null)];
  1068. }
  1069. });
  1070. };
  1071. }
  1072. });
  1073. // node_modules/vant/es/icon/index.mjs
  1074. var Icon = withInstall(stdin_default6);
  1075. // node_modules/vant/es/loading/Loading.mjs
  1076. var [name5, bem5] = createNamespace("loading");
  1077. var SpinIcon = Array(12).fill(null).map((_, index) => createVNode("i", {
  1078. "class": bem5("line", String(index + 1))
  1079. }, null));
  1080. var CircularIcon = createVNode("svg", {
  1081. "class": bem5("circular"),
  1082. "viewBox": "25 25 50 50"
  1083. }, [createVNode("circle", {
  1084. "cx": "50",
  1085. "cy": "50",
  1086. "r": "20",
  1087. "fill": "none"
  1088. }, null)]);
  1089. var loadingProps = {
  1090. size: numericProp,
  1091. type: makeStringProp("circular"),
  1092. color: String,
  1093. vertical: Boolean,
  1094. textSize: numericProp,
  1095. textColor: String
  1096. };
  1097. var stdin_default7 = defineComponent({
  1098. name: name5,
  1099. props: loadingProps,
  1100. setup(props, {
  1101. slots
  1102. }) {
  1103. const spinnerStyle = computed(() => extend({
  1104. color: props.color
  1105. }, getSizeStyle(props.size)));
  1106. const renderText = () => {
  1107. var _a;
  1108. if (slots.default) {
  1109. return createVNode("span", {
  1110. "class": bem5("text"),
  1111. "style": {
  1112. fontSize: addUnit(props.textSize),
  1113. color: (_a = props.textColor) != null ? _a : props.color
  1114. }
  1115. }, [slots.default()]);
  1116. }
  1117. };
  1118. return () => {
  1119. const {
  1120. type,
  1121. vertical
  1122. } = props;
  1123. return createVNode("div", {
  1124. "class": bem5([type, {
  1125. vertical
  1126. }]),
  1127. "aria-live": "polite",
  1128. "aria-busy": true
  1129. }, [createVNode("span", {
  1130. "class": bem5("spinner", type),
  1131. "style": spinnerStyle.value
  1132. }, [type === "spinner" ? SpinIcon : CircularIcon]), renderText()]);
  1133. };
  1134. }
  1135. });
  1136. // node_modules/vant/es/loading/index.mjs
  1137. var Loading = withInstall(stdin_default7);
  1138. // node_modules/vant/es/composables/use-route.mjs
  1139. var routeProps = {
  1140. to: [String, Object],
  1141. url: String,
  1142. replace: Boolean
  1143. };
  1144. function route({
  1145. to,
  1146. url,
  1147. replace,
  1148. $router: router
  1149. }) {
  1150. if (to && router) {
  1151. router[replace ? "replace" : "push"](to);
  1152. } else if (url) {
  1153. replace ? location.replace(url) : location.href = url;
  1154. }
  1155. }
  1156. function useRoute() {
  1157. const vm = getCurrentInstance().proxy;
  1158. return () => route(vm);
  1159. }
  1160. // node_modules/vant/es/button/Button.mjs
  1161. var [name6, bem6] = createNamespace("button");
  1162. var buttonProps = extend({}, routeProps, {
  1163. tag: makeStringProp("button"),
  1164. text: String,
  1165. icon: String,
  1166. type: makeStringProp("default"),
  1167. size: makeStringProp("normal"),
  1168. color: String,
  1169. block: Boolean,
  1170. plain: Boolean,
  1171. round: Boolean,
  1172. square: Boolean,
  1173. loading: Boolean,
  1174. hairline: Boolean,
  1175. disabled: Boolean,
  1176. iconPrefix: String,
  1177. nativeType: makeStringProp("button"),
  1178. loadingSize: numericProp,
  1179. loadingText: String,
  1180. loadingType: String,
  1181. iconPosition: makeStringProp("left")
  1182. });
  1183. var stdin_default8 = defineComponent({
  1184. name: name6,
  1185. props: buttonProps,
  1186. emits: ["click"],
  1187. setup(props, {
  1188. emit,
  1189. slots
  1190. }) {
  1191. const route2 = useRoute();
  1192. const renderLoadingIcon = () => {
  1193. if (slots.loading) {
  1194. return slots.loading();
  1195. }
  1196. return createVNode(Loading, {
  1197. "size": props.loadingSize,
  1198. "type": props.loadingType,
  1199. "class": bem6("loading")
  1200. }, null);
  1201. };
  1202. const renderIcon = () => {
  1203. if (props.loading) {
  1204. return renderLoadingIcon();
  1205. }
  1206. if (slots.icon) {
  1207. return createVNode("div", {
  1208. "class": bem6("icon")
  1209. }, [slots.icon()]);
  1210. }
  1211. if (props.icon) {
  1212. return createVNode(Icon, {
  1213. "name": props.icon,
  1214. "class": bem6("icon"),
  1215. "classPrefix": props.iconPrefix
  1216. }, null);
  1217. }
  1218. };
  1219. const renderText = () => {
  1220. let text;
  1221. if (props.loading) {
  1222. text = props.loadingText;
  1223. } else {
  1224. text = slots.default ? slots.default() : props.text;
  1225. }
  1226. if (text) {
  1227. return createVNode("span", {
  1228. "class": bem6("text")
  1229. }, [text]);
  1230. }
  1231. };
  1232. const getStyle = () => {
  1233. const {
  1234. color,
  1235. plain
  1236. } = props;
  1237. if (color) {
  1238. const style = {
  1239. color: plain ? color : "white"
  1240. };
  1241. if (!plain) {
  1242. style.background = color;
  1243. }
  1244. if (color.includes("gradient")) {
  1245. style.border = 0;
  1246. } else {
  1247. style.borderColor = color;
  1248. }
  1249. return style;
  1250. }
  1251. };
  1252. const onClick = (event) => {
  1253. if (props.loading) {
  1254. preventDefault(event);
  1255. } else if (!props.disabled) {
  1256. emit("click", event);
  1257. route2();
  1258. }
  1259. };
  1260. return () => {
  1261. const {
  1262. tag,
  1263. type,
  1264. size,
  1265. block,
  1266. round: round2,
  1267. plain,
  1268. square,
  1269. loading,
  1270. disabled,
  1271. hairline,
  1272. nativeType,
  1273. iconPosition
  1274. } = props;
  1275. const classes = [bem6([type, size, {
  1276. plain,
  1277. block,
  1278. round: round2,
  1279. square,
  1280. loading,
  1281. disabled,
  1282. hairline
  1283. }]), {
  1284. [BORDER_SURROUND]: hairline
  1285. }];
  1286. return createVNode(tag, {
  1287. "type": nativeType,
  1288. "class": classes,
  1289. "style": getStyle(),
  1290. "disabled": disabled,
  1291. "onClick": onClick
  1292. }, {
  1293. default: () => [createVNode("div", {
  1294. "class": bem6("content")
  1295. }, [iconPosition === "left" && renderIcon(), renderText(), iconPosition === "right" && renderIcon()])]
  1296. });
  1297. };
  1298. }
  1299. });
  1300. // node_modules/vant/es/button/index.mjs
  1301. var Button = withInstall(stdin_default8);
  1302. // node_modules/vant/es/composables/use-expose.mjs
  1303. function useExpose(apis) {
  1304. const instance4 = getCurrentInstance();
  1305. if (instance4) {
  1306. extend(instance4.proxy, apis);
  1307. }
  1308. }
  1309. // node_modules/vant/es/action-bar-button/ActionBarButton.mjs
  1310. var [name7, bem7] = createNamespace("action-bar-button");
  1311. var actionBarButtonProps = extend({}, routeProps, {
  1312. type: String,
  1313. text: String,
  1314. icon: String,
  1315. color: String,
  1316. loading: Boolean,
  1317. disabled: Boolean
  1318. });
  1319. var stdin_default9 = defineComponent({
  1320. name: name7,
  1321. props: actionBarButtonProps,
  1322. setup(props, {
  1323. slots
  1324. }) {
  1325. const route2 = useRoute();
  1326. const {
  1327. parent,
  1328. index
  1329. } = useParent(ACTION_BAR_KEY);
  1330. const isFirst = computed(() => {
  1331. if (parent) {
  1332. const prev = parent.children[index.value - 1];
  1333. return !(prev && "isButton" in prev);
  1334. }
  1335. });
  1336. const isLast = computed(() => {
  1337. if (parent) {
  1338. const next = parent.children[index.value + 1];
  1339. return !(next && "isButton" in next);
  1340. }
  1341. });
  1342. useExpose({
  1343. isButton: true
  1344. });
  1345. return () => {
  1346. const {
  1347. type,
  1348. icon,
  1349. text,
  1350. color,
  1351. loading,
  1352. disabled
  1353. } = props;
  1354. return createVNode(Button, {
  1355. "class": bem7([type, {
  1356. last: isLast.value,
  1357. first: isFirst.value
  1358. }]),
  1359. "size": "large",
  1360. "type": type,
  1361. "icon": icon,
  1362. "color": color,
  1363. "loading": loading,
  1364. "disabled": disabled,
  1365. "onClick": route2
  1366. }, {
  1367. default: () => [slots.default ? slots.default() : text]
  1368. });
  1369. };
  1370. }
  1371. });
  1372. // node_modules/vant/es/action-bar-button/index.mjs
  1373. var ActionBarButton = withInstall(stdin_default9);
  1374. // node_modules/vant/es/action-bar-icon/ActionBarIcon.mjs
  1375. var [name8, bem8] = createNamespace("action-bar-icon");
  1376. var actionBarIconProps = extend({}, routeProps, {
  1377. dot: Boolean,
  1378. text: String,
  1379. icon: String,
  1380. color: String,
  1381. badge: numericProp,
  1382. iconClass: unknownProp,
  1383. badgeProps: Object,
  1384. iconPrefix: String
  1385. });
  1386. var stdin_default10 = defineComponent({
  1387. name: name8,
  1388. props: actionBarIconProps,
  1389. setup(props, {
  1390. slots
  1391. }) {
  1392. const route2 = useRoute();
  1393. useParent(ACTION_BAR_KEY);
  1394. const renderIcon = () => {
  1395. const {
  1396. dot,
  1397. badge,
  1398. icon,
  1399. color,
  1400. iconClass,
  1401. badgeProps: badgeProps2,
  1402. iconPrefix
  1403. } = props;
  1404. if (slots.icon) {
  1405. return createVNode(Badge, mergeProps({
  1406. "dot": dot,
  1407. "class": bem8("icon"),
  1408. "content": badge
  1409. }, badgeProps2), {
  1410. default: slots.icon
  1411. });
  1412. }
  1413. return createVNode(Icon, {
  1414. "tag": "div",
  1415. "dot": dot,
  1416. "name": icon,
  1417. "badge": badge,
  1418. "color": color,
  1419. "class": [bem8("icon"), iconClass],
  1420. "badgeProps": badgeProps2,
  1421. "classPrefix": iconPrefix
  1422. }, null);
  1423. };
  1424. return () => createVNode("div", {
  1425. "role": "button",
  1426. "class": bem8(),
  1427. "tabindex": 0,
  1428. "onClick": route2
  1429. }, [renderIcon(), slots.default ? slots.default() : props.text]);
  1430. }
  1431. });
  1432. // node_modules/vant/es/action-bar-icon/index.mjs
  1433. var ActionBarIcon = withInstall(stdin_default10);
  1434. // node_modules/vant/es/composables/use-lazy-render.mjs
  1435. function useLazyRender(show) {
  1436. const inited = ref(false);
  1437. watch(show, (value) => {
  1438. if (value) {
  1439. inited.value = value;
  1440. }
  1441. }, { immediate: true });
  1442. return (render) => () => inited.value ? render() : null;
  1443. }
  1444. // node_modules/vant/es/overlay/Overlay.mjs
  1445. var [name9, bem9] = createNamespace("overlay");
  1446. var overlayProps = {
  1447. show: Boolean,
  1448. zIndex: numericProp,
  1449. duration: numericProp,
  1450. className: unknownProp,
  1451. lockScroll: truthProp,
  1452. lazyRender: truthProp,
  1453. customStyle: Object
  1454. };
  1455. var stdin_default11 = defineComponent({
  1456. name: name9,
  1457. props: overlayProps,
  1458. setup(props, {
  1459. slots
  1460. }) {
  1461. const root = ref();
  1462. const lazyRender = useLazyRender(() => props.show || !props.lazyRender);
  1463. const onTouchMove = (event) => {
  1464. if (props.lockScroll) {
  1465. preventDefault(event, true);
  1466. }
  1467. };
  1468. const renderOverlay = lazyRender(() => {
  1469. var _a;
  1470. const style = extend(getZIndexStyle(props.zIndex), props.customStyle);
  1471. if (isDef(props.duration)) {
  1472. style.animationDuration = `${props.duration}s`;
  1473. }
  1474. return withDirectives(createVNode("div", {
  1475. "ref": root,
  1476. "style": style,
  1477. "class": [bem9(), props.className]
  1478. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[vShow, props.show]]);
  1479. });
  1480. useEventListener("touchmove", onTouchMove, {
  1481. target: root
  1482. });
  1483. return () => createVNode(Transition, {
  1484. "name": "van-fade",
  1485. "appear": true
  1486. }, {
  1487. default: renderOverlay
  1488. });
  1489. }
  1490. });
  1491. // node_modules/vant/es/overlay/index.mjs
  1492. var Overlay = withInstall(stdin_default11);
  1493. // node_modules/vant/es/popup/shared.mjs
  1494. var popupSharedProps = {
  1495. show: Boolean,
  1496. zIndex: numericProp,
  1497. overlay: truthProp,
  1498. duration: numericProp,
  1499. teleport: [String, Object],
  1500. lockScroll: truthProp,
  1501. lazyRender: truthProp,
  1502. beforeClose: Function,
  1503. overlayStyle: Object,
  1504. overlayClass: unknownProp,
  1505. transitionAppear: Boolean,
  1506. closeOnClickOverlay: truthProp
  1507. };
  1508. var popupSharedPropKeys = Object.keys(popupSharedProps);
  1509. // node_modules/vant/es/composables/use-touch.mjs
  1510. function getDirection(x, y) {
  1511. if (x > y) {
  1512. return "horizontal";
  1513. }
  1514. if (y > x) {
  1515. return "vertical";
  1516. }
  1517. return "";
  1518. }
  1519. function useTouch() {
  1520. const startX = ref(0);
  1521. const startY = ref(0);
  1522. const deltaX = ref(0);
  1523. const deltaY = ref(0);
  1524. const offsetX = ref(0);
  1525. const offsetY = ref(0);
  1526. const direction = ref("");
  1527. const isVertical = () => direction.value === "vertical";
  1528. const isHorizontal = () => direction.value === "horizontal";
  1529. const reset = () => {
  1530. deltaX.value = 0;
  1531. deltaY.value = 0;
  1532. offsetX.value = 0;
  1533. offsetY.value = 0;
  1534. direction.value = "";
  1535. };
  1536. const start2 = (event) => {
  1537. reset();
  1538. startX.value = event.touches[0].clientX;
  1539. startY.value = event.touches[0].clientY;
  1540. };
  1541. const move = (event) => {
  1542. const touch = event.touches[0];
  1543. deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
  1544. deltaY.value = touch.clientY - startY.value;
  1545. offsetX.value = Math.abs(deltaX.value);
  1546. offsetY.value = Math.abs(deltaY.value);
  1547. const LOCK_DIRECTION_DISTANCE = 10;
  1548. if (!direction.value || offsetX.value < LOCK_DIRECTION_DISTANCE && offsetY.value < LOCK_DIRECTION_DISTANCE) {
  1549. direction.value = getDirection(offsetX.value, offsetY.value);
  1550. }
  1551. };
  1552. return {
  1553. move,
  1554. start: start2,
  1555. reset,
  1556. startX,
  1557. startY,
  1558. deltaX,
  1559. deltaY,
  1560. offsetX,
  1561. offsetY,
  1562. direction,
  1563. isVertical,
  1564. isHorizontal
  1565. };
  1566. }
  1567. // node_modules/vant/es/composables/use-lock-scroll.mjs
  1568. var totalLockCount = 0;
  1569. var BODY_LOCK_CLASS = "van-overflow-hidden";
  1570. function useLockScroll(rootRef, shouldLock) {
  1571. const touch = useTouch();
  1572. const DIRECTION_UP = "01";
  1573. const DIRECTION_DOWN = "10";
  1574. const onTouchMove = (event) => {
  1575. touch.move(event);
  1576. const direction = touch.deltaY.value > 0 ? DIRECTION_DOWN : DIRECTION_UP;
  1577. const el = getScrollParent(event.target, rootRef.value);
  1578. const { scrollHeight, offsetHeight, scrollTop } = el;
  1579. let status = "11";
  1580. if (scrollTop === 0) {
  1581. status = offsetHeight >= scrollHeight ? "00" : "01";
  1582. } else if (scrollTop + offsetHeight >= scrollHeight) {
  1583. status = "10";
  1584. }
  1585. if (status !== "11" && touch.isVertical() && !(parseInt(status, 2) & parseInt(direction, 2))) {
  1586. preventDefault(event, true);
  1587. }
  1588. };
  1589. const lock = () => {
  1590. document.addEventListener("touchstart", touch.start);
  1591. document.addEventListener("touchmove", onTouchMove, { passive: false });
  1592. if (!totalLockCount) {
  1593. document.body.classList.add(BODY_LOCK_CLASS);
  1594. }
  1595. totalLockCount++;
  1596. };
  1597. const unlock = () => {
  1598. if (totalLockCount) {
  1599. document.removeEventListener("touchstart", touch.start);
  1600. document.removeEventListener("touchmove", onTouchMove);
  1601. totalLockCount--;
  1602. if (!totalLockCount) {
  1603. document.body.classList.remove(BODY_LOCK_CLASS);
  1604. }
  1605. }
  1606. };
  1607. const init = () => shouldLock() && lock();
  1608. const destroy = () => shouldLock() && unlock();
  1609. onMountedOrActivated(init);
  1610. onDeactivated(destroy);
  1611. onBeforeUnmount(destroy);
  1612. watch(shouldLock, (value) => {
  1613. value ? lock() : unlock();
  1614. });
  1615. }
  1616. // node_modules/vant/es/popup/Popup.mjs
  1617. var popupProps = extend({}, popupSharedProps, {
  1618. round: Boolean,
  1619. position: makeStringProp("center"),
  1620. closeIcon: makeStringProp("cross"),
  1621. closeable: Boolean,
  1622. transition: String,
  1623. iconPrefix: String,
  1624. closeOnPopstate: Boolean,
  1625. closeIconPosition: makeStringProp("top-right"),
  1626. safeAreaInsetTop: Boolean,
  1627. safeAreaInsetBottom: Boolean
  1628. });
  1629. var [name10, bem10] = createNamespace("popup");
  1630. var stdin_default12 = defineComponent({
  1631. name: name10,
  1632. inheritAttrs: false,
  1633. props: popupProps,
  1634. emits: ["open", "close", "opened", "closed", "keydown", "update:show", "click-overlay", "click-close-icon"],
  1635. setup(props, {
  1636. emit,
  1637. attrs,
  1638. slots
  1639. }) {
  1640. let opened;
  1641. let shouldReopen;
  1642. const zIndex = ref();
  1643. const popupRef = ref();
  1644. const lazyRender = useLazyRender(() => props.show || !props.lazyRender);
  1645. const style = computed(() => {
  1646. const style2 = {
  1647. zIndex: zIndex.value
  1648. };
  1649. if (isDef(props.duration)) {
  1650. const key = props.position === "center" ? "animationDuration" : "transitionDuration";
  1651. style2[key] = `${props.duration}s`;
  1652. }
  1653. return style2;
  1654. });
  1655. const open = () => {
  1656. if (!opened) {
  1657. opened = true;
  1658. zIndex.value = props.zIndex !== void 0 ? +props.zIndex : useGlobalZIndex();
  1659. emit("open");
  1660. }
  1661. };
  1662. const close = () => {
  1663. if (opened) {
  1664. callInterceptor(props.beforeClose, {
  1665. done() {
  1666. opened = false;
  1667. emit("close");
  1668. emit("update:show", false);
  1669. }
  1670. });
  1671. }
  1672. };
  1673. const onClickOverlay = (event) => {
  1674. emit("click-overlay", event);
  1675. if (props.closeOnClickOverlay) {
  1676. close();
  1677. }
  1678. };
  1679. const renderOverlay = () => {
  1680. if (props.overlay) {
  1681. return createVNode(Overlay, {
  1682. "show": props.show,
  1683. "class": props.overlayClass,
  1684. "zIndex": zIndex.value,
  1685. "duration": props.duration,
  1686. "customStyle": props.overlayStyle,
  1687. "role": props.closeOnClickOverlay ? "button" : void 0,
  1688. "tabindex": props.closeOnClickOverlay ? 0 : void 0,
  1689. "onClick": onClickOverlay
  1690. }, {
  1691. default: slots["overlay-content"]
  1692. });
  1693. }
  1694. };
  1695. const onClickCloseIcon = (event) => {
  1696. emit("click-close-icon", event);
  1697. close();
  1698. };
  1699. const renderCloseIcon = () => {
  1700. if (props.closeable) {
  1701. return createVNode(Icon, {
  1702. "role": "button",
  1703. "tabindex": 0,
  1704. "name": props.closeIcon,
  1705. "class": [bem10("close-icon", props.closeIconPosition), HAPTICS_FEEDBACK],
  1706. "classPrefix": props.iconPrefix,
  1707. "onClick": onClickCloseIcon
  1708. }, null);
  1709. }
  1710. };
  1711. const onOpened = () => emit("opened");
  1712. const onClosed = () => emit("closed");
  1713. const onKeydown = (event) => emit("keydown", event);
  1714. const renderPopup = lazyRender(() => {
  1715. var _a;
  1716. const {
  1717. round: round2,
  1718. position,
  1719. safeAreaInsetTop,
  1720. safeAreaInsetBottom
  1721. } = props;
  1722. return withDirectives(createVNode("div", mergeProps({
  1723. "ref": popupRef,
  1724. "style": style.value,
  1725. "role": "dialog",
  1726. "tabindex": 0,
  1727. "class": [bem10({
  1728. round: round2,
  1729. [position]: position
  1730. }), {
  1731. "van-safe-area-top": safeAreaInsetTop,
  1732. "van-safe-area-bottom": safeAreaInsetBottom
  1733. }],
  1734. "onKeydown": onKeydown
  1735. }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), renderCloseIcon()]), [[vShow, props.show]]);
  1736. });
  1737. const renderTransition = () => {
  1738. const {
  1739. position,
  1740. transition,
  1741. transitionAppear
  1742. } = props;
  1743. const name210 = position === "center" ? "van-fade" : `van-popup-slide-${position}`;
  1744. return createVNode(Transition, {
  1745. "name": transition || name210,
  1746. "appear": transitionAppear,
  1747. "onAfterEnter": onOpened,
  1748. "onAfterLeave": onClosed
  1749. }, {
  1750. default: renderPopup
  1751. });
  1752. };
  1753. watch(() => props.show, (show) => {
  1754. if (show && !opened) {
  1755. open();
  1756. if (attrs.tabindex === 0) {
  1757. nextTick(() => {
  1758. var _a;
  1759. (_a = popupRef.value) == null ? void 0 : _a.focus();
  1760. });
  1761. }
  1762. }
  1763. if (!show && opened) {
  1764. opened = false;
  1765. emit("close");
  1766. }
  1767. });
  1768. useExpose({
  1769. popupRef
  1770. });
  1771. useLockScroll(popupRef, () => props.show && props.lockScroll);
  1772. useEventListener("popstate", () => {
  1773. if (props.closeOnPopstate) {
  1774. close();
  1775. shouldReopen = false;
  1776. }
  1777. });
  1778. onMounted(() => {
  1779. if (props.show) {
  1780. open();
  1781. }
  1782. });
  1783. onActivated(() => {
  1784. if (shouldReopen) {
  1785. emit("update:show", true);
  1786. shouldReopen = false;
  1787. }
  1788. });
  1789. onDeactivated(() => {
  1790. if (props.show && props.teleport) {
  1791. close();
  1792. shouldReopen = true;
  1793. }
  1794. });
  1795. provide(POPUP_TOGGLE_KEY, () => props.show);
  1796. return () => {
  1797. if (props.teleport) {
  1798. return createVNode(Teleport, {
  1799. "to": props.teleport
  1800. }, {
  1801. default: () => [renderOverlay(), renderTransition()]
  1802. });
  1803. }
  1804. return createVNode(Fragment, null, [renderOverlay(), renderTransition()]);
  1805. };
  1806. }
  1807. });
  1808. // node_modules/vant/es/popup/index.mjs
  1809. var Popup = withInstall(stdin_default12);
  1810. // node_modules/vant/es/action-sheet/ActionSheet.mjs
  1811. var [name11, bem11] = createNamespace("action-sheet");
  1812. var actionSheetProps = extend({}, popupSharedProps, {
  1813. title: String,
  1814. round: truthProp,
  1815. actions: makeArrayProp(),
  1816. closeIcon: makeStringProp("cross"),
  1817. closeable: truthProp,
  1818. cancelText: String,
  1819. description: String,
  1820. closeOnPopstate: truthProp,
  1821. closeOnClickAction: Boolean,
  1822. safeAreaInsetBottom: truthProp
  1823. });
  1824. var popupInheritKeys = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
  1825. var stdin_default13 = defineComponent({
  1826. name: name11,
  1827. props: actionSheetProps,
  1828. emits: ["select", "cancel", "update:show"],
  1829. setup(props, {
  1830. slots,
  1831. emit
  1832. }) {
  1833. const updateShow = (show) => emit("update:show", show);
  1834. const onCancel = () => {
  1835. updateShow(false);
  1836. emit("cancel");
  1837. };
  1838. const renderHeader = () => {
  1839. if (props.title) {
  1840. return createVNode("div", {
  1841. "class": bem11("header")
  1842. }, [props.title, props.closeable && createVNode(Icon, {
  1843. "name": props.closeIcon,
  1844. "class": [bem11("close"), HAPTICS_FEEDBACK],
  1845. "onClick": onCancel
  1846. }, null)]);
  1847. }
  1848. };
  1849. const renderCancel = () => {
  1850. if (slots.cancel || props.cancelText) {
  1851. return [createVNode("div", {
  1852. "class": bem11("gap")
  1853. }, null), createVNode("button", {
  1854. "type": "button",
  1855. "class": bem11("cancel"),
  1856. "onClick": onCancel
  1857. }, [slots.cancel ? slots.cancel() : props.cancelText])];
  1858. }
  1859. };
  1860. const renderActionContent = (action, index) => {
  1861. if (action.loading) {
  1862. return createVNode(Loading, {
  1863. "class": bem11("loading-icon")
  1864. }, null);
  1865. }
  1866. if (slots.action) {
  1867. return slots.action({
  1868. action,
  1869. index
  1870. });
  1871. }
  1872. return [createVNode("span", {
  1873. "class": bem11("name")
  1874. }, [action.name]), action.subname && createVNode("div", {
  1875. "class": bem11("subname")
  1876. }, [action.subname])];
  1877. };
  1878. const renderAction = (action, index) => {
  1879. const {
  1880. color,
  1881. loading,
  1882. callback,
  1883. disabled,
  1884. className
  1885. } = action;
  1886. const onClick = () => {
  1887. if (disabled || loading) {
  1888. return;
  1889. }
  1890. if (callback) {
  1891. callback(action);
  1892. }
  1893. if (props.closeOnClickAction) {
  1894. updateShow(false);
  1895. }
  1896. nextTick(() => emit("select", action, index));
  1897. };
  1898. return createVNode("button", {
  1899. "type": "button",
  1900. "style": {
  1901. color
  1902. },
  1903. "class": [bem11("item", {
  1904. loading,
  1905. disabled
  1906. }), className],
  1907. "onClick": onClick
  1908. }, [renderActionContent(action, index)]);
  1909. };
  1910. const renderDescription = () => {
  1911. if (props.description || slots.description) {
  1912. const content = slots.description ? slots.description() : props.description;
  1913. return createVNode("div", {
  1914. "class": bem11("description")
  1915. }, [content]);
  1916. }
  1917. };
  1918. return () => createVNode(Popup, mergeProps({
  1919. "class": bem11(),
  1920. "position": "bottom",
  1921. "onUpdate:show": updateShow
  1922. }, pick(props, popupInheritKeys)), {
  1923. default: () => {
  1924. var _a;
  1925. return [renderHeader(), renderDescription(), createVNode("div", {
  1926. "class": bem11("content")
  1927. }, [props.actions.map(renderAction), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderCancel()];
  1928. }
  1929. });
  1930. }
  1931. });
  1932. // node_modules/vant/es/action-sheet/index.mjs
  1933. var ActionSheet = withInstall(stdin_default13);
  1934. // node_modules/vant/es/utils/deep-clone.mjs
  1935. function deepClone(obj) {
  1936. if (!isDef(obj)) {
  1937. return obj;
  1938. }
  1939. if (Array.isArray(obj)) {
  1940. return obj.map((item) => deepClone(item));
  1941. }
  1942. if (isObject(obj)) {
  1943. const to = {};
  1944. Object.keys(obj).forEach((key) => {
  1945. to[key] = deepClone(obj[key]);
  1946. });
  1947. return to;
  1948. }
  1949. return obj;
  1950. }
  1951. // node_modules/vant/es/picker/PickerColumn.mjs
  1952. var DEFAULT_DURATION = 200;
  1953. var MOMENTUM_LIMIT_TIME = 300;
  1954. var MOMENTUM_LIMIT_DISTANCE = 15;
  1955. var [name12, bem12] = createNamespace("picker-column");
  1956. function getElementTranslateY(element) {
  1957. const {
  1958. transform
  1959. } = window.getComputedStyle(element);
  1960. const translateY = transform.slice(7, transform.length - 1).split(", ")[5];
  1961. return Number(translateY);
  1962. }
  1963. var PICKER_KEY = Symbol(name12);
  1964. var isOptionDisabled = (option) => isObject(option) && option.disabled;
  1965. var stdin_default14 = defineComponent({
  1966. name: name12,
  1967. props: {
  1968. textKey: makeRequiredProp(String),
  1969. readonly: Boolean,
  1970. allowHtml: Boolean,
  1971. className: unknownProp,
  1972. itemHeight: makeRequiredProp(Number),
  1973. defaultIndex: makeNumberProp(0),
  1974. swipeDuration: makeRequiredProp(numericProp),
  1975. initialOptions: makeArrayProp(),
  1976. visibleItemCount: makeRequiredProp(numericProp)
  1977. },
  1978. emits: ["change"],
  1979. setup(props, {
  1980. emit,
  1981. slots
  1982. }) {
  1983. let moving;
  1984. let startOffset;
  1985. let touchStartTime;
  1986. let momentumOffset;
  1987. let transitionEndTrigger;
  1988. const root = ref();
  1989. const wrapper = ref();
  1990. const state = reactive({
  1991. index: props.defaultIndex,
  1992. offset: 0,
  1993. duration: 0,
  1994. options: deepClone(props.initialOptions)
  1995. });
  1996. const touch = useTouch();
  1997. const count = () => state.options.length;
  1998. const baseOffset = () => props.itemHeight * (+props.visibleItemCount - 1) / 2;
  1999. const adjustIndex = (index) => {
  2000. index = clamp(index, 0, count());
  2001. for (let i = index; i < count(); i++) {
  2002. if (!isOptionDisabled(state.options[i]))
  2003. return i;
  2004. }
  2005. for (let i = index - 1; i >= 0; i--) {
  2006. if (!isOptionDisabled(state.options[i]))
  2007. return i;
  2008. }
  2009. };
  2010. const setIndex = (index, emitChange) => {
  2011. index = adjustIndex(index) || 0;
  2012. const offset2 = -index * props.itemHeight;
  2013. const trigger = () => {
  2014. if (index !== state.index) {
  2015. state.index = index;
  2016. if (emitChange) {
  2017. emit("change", index);
  2018. }
  2019. }
  2020. };
  2021. if (moving && offset2 !== state.offset) {
  2022. transitionEndTrigger = trigger;
  2023. } else {
  2024. trigger();
  2025. }
  2026. state.offset = offset2;
  2027. };
  2028. const setOptions = (options) => {
  2029. if (JSON.stringify(options) !== JSON.stringify(state.options)) {
  2030. state.options = deepClone(options);
  2031. setIndex(props.defaultIndex);
  2032. }
  2033. };
  2034. const onClickItem = (index) => {
  2035. if (moving || props.readonly) {
  2036. return;
  2037. }
  2038. transitionEndTrigger = null;
  2039. state.duration = DEFAULT_DURATION;
  2040. setIndex(index, true);
  2041. };
  2042. const getOptionText = (option) => {
  2043. if (isObject(option) && props.textKey in option) {
  2044. return option[props.textKey];
  2045. }
  2046. return option;
  2047. };
  2048. const getIndexByOffset = (offset2) => clamp(Math.round(-offset2 / props.itemHeight), 0, count() - 1);
  2049. const momentum = (distance, duration) => {
  2050. const speed = Math.abs(distance / duration);
  2051. distance = state.offset + speed / 3e-3 * (distance < 0 ? -1 : 1);
  2052. const index = getIndexByOffset(distance);
  2053. state.duration = +props.swipeDuration;
  2054. setIndex(index, true);
  2055. };
  2056. const stopMomentum = () => {
  2057. moving = false;
  2058. state.duration = 0;
  2059. if (transitionEndTrigger) {
  2060. transitionEndTrigger();
  2061. transitionEndTrigger = null;
  2062. }
  2063. };
  2064. const onTouchStart = (event) => {
  2065. if (props.readonly) {
  2066. return;
  2067. }
  2068. touch.start(event);
  2069. if (moving) {
  2070. const translateY = getElementTranslateY(wrapper.value);
  2071. state.offset = Math.min(0, translateY - baseOffset());
  2072. startOffset = state.offset;
  2073. } else {
  2074. startOffset = state.offset;
  2075. }
  2076. state.duration = 0;
  2077. touchStartTime = Date.now();
  2078. momentumOffset = startOffset;
  2079. transitionEndTrigger = null;
  2080. };
  2081. const onTouchMove = (event) => {
  2082. if (props.readonly) {
  2083. return;
  2084. }
  2085. touch.move(event);
  2086. if (touch.isVertical()) {
  2087. moving = true;
  2088. preventDefault(event, true);
  2089. }
  2090. state.offset = clamp(startOffset + touch.deltaY.value, -(count() * props.itemHeight), props.itemHeight);
  2091. const now = Date.now();
  2092. if (now - touchStartTime > MOMENTUM_LIMIT_TIME) {
  2093. touchStartTime = now;
  2094. momentumOffset = state.offset;
  2095. }
  2096. };
  2097. const onTouchEnd = () => {
  2098. if (props.readonly) {
  2099. return;
  2100. }
  2101. const distance = state.offset - momentumOffset;
  2102. const duration = Date.now() - touchStartTime;
  2103. const allowMomentum = duration < MOMENTUM_LIMIT_TIME && Math.abs(distance) > MOMENTUM_LIMIT_DISTANCE;
  2104. if (allowMomentum) {
  2105. momentum(distance, duration);
  2106. return;
  2107. }
  2108. const index = getIndexByOffset(state.offset);
  2109. state.duration = DEFAULT_DURATION;
  2110. setIndex(index, true);
  2111. setTimeout(() => {
  2112. moving = false;
  2113. }, 0);
  2114. };
  2115. const renderOptions = () => {
  2116. const optionStyle = {
  2117. height: `${props.itemHeight}px`
  2118. };
  2119. return state.options.map((option, index) => {
  2120. const text = getOptionText(option);
  2121. const disabled = isOptionDisabled(option);
  2122. const data = {
  2123. role: "button",
  2124. style: optionStyle,
  2125. tabindex: disabled ? -1 : 0,
  2126. class: bem12("item", {
  2127. disabled,
  2128. selected: index === state.index
  2129. }),
  2130. onClick: () => onClickItem(index)
  2131. };
  2132. const childData = {
  2133. class: "van-ellipsis",
  2134. [props.allowHtml ? "innerHTML" : "textContent"]: text
  2135. };
  2136. return createVNode("li", data, [slots.option ? slots.option(option) : createVNode("div", childData, null)]);
  2137. });
  2138. };
  2139. const setValue = (value) => {
  2140. const {
  2141. options
  2142. } = state;
  2143. for (let i = 0; i < options.length; i++) {
  2144. if (getOptionText(options[i]) === value) {
  2145. return setIndex(i);
  2146. }
  2147. }
  2148. };
  2149. const getValue = () => state.options[state.index];
  2150. const hasOptions = () => state.options.length;
  2151. setIndex(state.index);
  2152. useParent(PICKER_KEY);
  2153. useExpose({
  2154. state,
  2155. setIndex,
  2156. getValue,
  2157. setValue,
  2158. setOptions,
  2159. hasOptions,
  2160. stopMomentum
  2161. });
  2162. watch(() => props.initialOptions, setOptions);
  2163. watch(() => props.defaultIndex, (value) => setIndex(value));
  2164. useEventListener("touchmove", onTouchMove, {
  2165. target: root
  2166. });
  2167. return () => createVNode("div", {
  2168. "ref": root,
  2169. "class": [bem12(), props.className],
  2170. "onTouchstartPassive": onTouchStart,
  2171. "onTouchend": onTouchEnd,
  2172. "onTouchcancel": onTouchEnd
  2173. }, [createVNode("ul", {
  2174. "ref": wrapper,
  2175. "style": {
  2176. transform: `translate3d(0, ${state.offset + baseOffset()}px, 0)`,
  2177. transitionDuration: `${state.duration}ms`,
  2178. transitionProperty: state.duration ? "all" : "none"
  2179. },
  2180. "class": bem12("wrapper"),
  2181. "onTransitionend": stopMomentum
  2182. }, [renderOptions()])]);
  2183. }
  2184. });
  2185. // node_modules/vant/es/picker/Picker.mjs
  2186. var [name13, bem13, t] = createNamespace("picker");
  2187. var pickerSharedProps = {
  2188. title: String,
  2189. loading: Boolean,
  2190. readonly: Boolean,
  2191. allowHtml: Boolean,
  2192. itemHeight: makeNumericProp(44),
  2193. showToolbar: truthProp,
  2194. swipeDuration: makeNumericProp(1e3),
  2195. visibleItemCount: makeNumericProp(6),
  2196. cancelButtonText: String,
  2197. confirmButtonText: String
  2198. };
  2199. var pickerProps = extend({}, pickerSharedProps, {
  2200. columns: makeArrayProp(),
  2201. valueKey: String,
  2202. defaultIndex: makeNumericProp(0),
  2203. toolbarPosition: makeStringProp("top"),
  2204. columnsFieldNames: Object
  2205. });
  2206. var stdin_default15 = defineComponent({
  2207. name: name13,
  2208. props: pickerProps,
  2209. emits: ["confirm", "cancel", "change"],
  2210. setup(props, {
  2211. emit,
  2212. slots
  2213. }) {
  2214. if (true) {
  2215. if (slots.default) {
  2216. console.warn('[Vant] Picker: "default" slot is deprecated, please use "toolbar" slot instead.');
  2217. }
  2218. if (props.valueKey) {
  2219. console.warn('[Vant] Picker: "valueKey" prop is deprecated, please use "columnsFieldNames" prop instead.');
  2220. }
  2221. }
  2222. const hasOptions = ref(false);
  2223. const columnsRef = ref();
  2224. const formattedColumns = ref([]);
  2225. const columnsFieldNames = computed(() => {
  2226. const {
  2227. columnsFieldNames: columnsFieldNames2
  2228. } = props;
  2229. return {
  2230. text: (columnsFieldNames2 == null ? void 0 : columnsFieldNames2.text) || props.valueKey || "text",
  2231. values: (columnsFieldNames2 == null ? void 0 : columnsFieldNames2.values) || "values",
  2232. children: (columnsFieldNames2 == null ? void 0 : columnsFieldNames2.children) || "children"
  2233. };
  2234. });
  2235. const {
  2236. children,
  2237. linkChildren
  2238. } = useChildren(PICKER_KEY);
  2239. linkChildren();
  2240. const itemHeight = computed(() => unitToPx(props.itemHeight));
  2241. const dataType = computed(() => {
  2242. const firstColumn = props.columns[0];
  2243. if (typeof firstColumn === "object") {
  2244. if (columnsFieldNames.value.children in firstColumn) {
  2245. return "cascade";
  2246. }
  2247. if (columnsFieldNames.value.values in firstColumn) {
  2248. return "object";
  2249. }
  2250. }
  2251. return "plain";
  2252. });
  2253. const formatCascade = () => {
  2254. var _a;
  2255. const formatted = [];
  2256. let cursor = {
  2257. [columnsFieldNames.value.children]: props.columns
  2258. };
  2259. while (cursor && cursor[columnsFieldNames.value.children]) {
  2260. const children2 = cursor[columnsFieldNames.value.children];
  2261. let defaultIndex = (_a = cursor.defaultIndex) != null ? _a : +props.defaultIndex;
  2262. while (children2[defaultIndex] && children2[defaultIndex].disabled) {
  2263. if (defaultIndex < children2.length - 1) {
  2264. defaultIndex++;
  2265. } else {
  2266. defaultIndex = 0;
  2267. break;
  2268. }
  2269. }
  2270. formatted.push({
  2271. [columnsFieldNames.value.values]: cursor[columnsFieldNames.value.children],
  2272. className: cursor.className,
  2273. defaultIndex
  2274. });
  2275. cursor = children2[defaultIndex];
  2276. }
  2277. formattedColumns.value = formatted;
  2278. };
  2279. const format3 = () => {
  2280. const {
  2281. columns
  2282. } = props;
  2283. if (dataType.value === "plain") {
  2284. formattedColumns.value = [{
  2285. [columnsFieldNames.value.values]: columns
  2286. }];
  2287. } else if (dataType.value === "cascade") {
  2288. formatCascade();
  2289. } else {
  2290. formattedColumns.value = columns;
  2291. }
  2292. hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0) || children.some((item) => item.hasOptions);
  2293. };
  2294. const getIndexes = () => children.map((child) => child.state.index);
  2295. const setColumnValues = (index, options) => {
  2296. const column = children[index];
  2297. if (column) {
  2298. column.setOptions(options);
  2299. hasOptions.value = true;
  2300. }
  2301. };
  2302. const onCascadeChange = (columnIndex) => {
  2303. let cursor = {
  2304. [columnsFieldNames.value.children]: props.columns
  2305. };
  2306. const indexes = getIndexes();
  2307. for (let i = 0; i <= columnIndex; i++) {
  2308. cursor = cursor[columnsFieldNames.value.children][indexes[i]];
  2309. }
  2310. while (cursor && cursor[columnsFieldNames.value.children]) {
  2311. columnIndex++;
  2312. setColumnValues(columnIndex, cursor[columnsFieldNames.value.children]);
  2313. cursor = cursor[columnsFieldNames.value.children][cursor.defaultIndex || 0];
  2314. }
  2315. };
  2316. const getChild = (index) => children[index];
  2317. const getColumnValue = (index) => {
  2318. const column = getChild(index);
  2319. if (column) {
  2320. return column.getValue();
  2321. }
  2322. };
  2323. const setColumnValue = (index, value) => {
  2324. const column = getChild(index);
  2325. if (column) {
  2326. column.setValue(value);
  2327. if (dataType.value === "cascade") {
  2328. onCascadeChange(index);
  2329. }
  2330. }
  2331. };
  2332. const getColumnIndex = (index) => {
  2333. const column = getChild(index);
  2334. if (column) {
  2335. return column.state.index;
  2336. }
  2337. };
  2338. const setColumnIndex = (columnIndex, optionIndex) => {
  2339. const column = getChild(columnIndex);
  2340. if (column) {
  2341. column.setIndex(optionIndex);
  2342. if (dataType.value === "cascade") {
  2343. onCascadeChange(columnIndex);
  2344. }
  2345. }
  2346. };
  2347. const getColumnValues = (index) => {
  2348. const column = getChild(index);
  2349. if (column) {
  2350. return column.state.options;
  2351. }
  2352. };
  2353. const getValues = () => children.map((child) => child.getValue());
  2354. const setValues = (values) => {
  2355. values.forEach((value, index) => {
  2356. setColumnValue(index, value);
  2357. });
  2358. };
  2359. const setIndexes = (indexes) => {
  2360. indexes.forEach((optionIndex, columnIndex) => {
  2361. setColumnIndex(columnIndex, optionIndex);
  2362. });
  2363. };
  2364. const emitAction = (event) => {
  2365. if (dataType.value === "plain") {
  2366. emit(event, getColumnValue(0), getColumnIndex(0));
  2367. } else {
  2368. emit(event, getValues(), getIndexes());
  2369. }
  2370. };
  2371. const onChange = (columnIndex) => {
  2372. if (dataType.value === "cascade") {
  2373. onCascadeChange(columnIndex);
  2374. }
  2375. if (dataType.value === "plain") {
  2376. emit("change", getColumnValue(0), getColumnIndex(0));
  2377. } else {
  2378. emit("change", getValues(), columnIndex);
  2379. }
  2380. };
  2381. const confirm = () => {
  2382. children.forEach((child) => child.stopMomentum());
  2383. emitAction("confirm");
  2384. };
  2385. const cancel = () => emitAction("cancel");
  2386. const renderTitle = () => {
  2387. if (slots.title) {
  2388. return slots.title();
  2389. }
  2390. if (props.title) {
  2391. return createVNode("div", {
  2392. "class": [bem13("title"), "van-ellipsis"]
  2393. }, [props.title]);
  2394. }
  2395. };
  2396. const renderCancel = () => {
  2397. const text = props.cancelButtonText || t("cancel");
  2398. return createVNode("button", {
  2399. "type": "button",
  2400. "class": [bem13("cancel"), HAPTICS_FEEDBACK],
  2401. "onClick": cancel
  2402. }, [slots.cancel ? slots.cancel() : text]);
  2403. };
  2404. const renderConfirm = () => {
  2405. const text = props.confirmButtonText || t("confirm");
  2406. return createVNode("button", {
  2407. "type": "button",
  2408. "class": [bem13("confirm"), HAPTICS_FEEDBACK],
  2409. "onClick": confirm
  2410. }, [slots.confirm ? slots.confirm() : text]);
  2411. };
  2412. const renderToolbar = () => {
  2413. if (props.showToolbar) {
  2414. const slot = slots.toolbar || slots.default;
  2415. return createVNode("div", {
  2416. "class": bem13("toolbar")
  2417. }, [slot ? slot() : [renderCancel(), renderTitle(), renderConfirm()]]);
  2418. }
  2419. };
  2420. const renderColumnItems = () => formattedColumns.value.map((item, columnIndex) => {
  2421. var _a;
  2422. return createVNode(stdin_default14, {
  2423. "textKey": columnsFieldNames.value.text,
  2424. "readonly": props.readonly,
  2425. "allowHtml": props.allowHtml,
  2426. "className": item.className,
  2427. "itemHeight": itemHeight.value,
  2428. "defaultIndex": (_a = item.defaultIndex) != null ? _a : +props.defaultIndex,
  2429. "swipeDuration": props.swipeDuration,
  2430. "initialOptions": item[columnsFieldNames.value.values],
  2431. "visibleItemCount": props.visibleItemCount,
  2432. "onChange": () => onChange(columnIndex)
  2433. }, {
  2434. option: slots.option
  2435. });
  2436. });
  2437. const renderMask = (wrapHeight) => {
  2438. if (hasOptions.value) {
  2439. const frameStyle = {
  2440. height: `${itemHeight.value}px`
  2441. };
  2442. const maskStyle = {
  2443. backgroundSize: `100% ${(wrapHeight - itemHeight.value) / 2}px`
  2444. };
  2445. return [createVNode("div", {
  2446. "class": bem13("mask"),
  2447. "style": maskStyle
  2448. }, null), createVNode("div", {
  2449. "class": [BORDER_UNSET_TOP_BOTTOM, bem13("frame")],
  2450. "style": frameStyle
  2451. }, null)];
  2452. }
  2453. };
  2454. const renderColumns = () => {
  2455. const wrapHeight = itemHeight.value * +props.visibleItemCount;
  2456. const columnsStyle = {
  2457. height: `${wrapHeight}px`
  2458. };
  2459. return createVNode("div", {
  2460. "ref": columnsRef,
  2461. "class": bem13("columns"),
  2462. "style": columnsStyle
  2463. }, [renderColumnItems(), renderMask(wrapHeight)]);
  2464. };
  2465. watch(() => props.columns, format3, {
  2466. immediate: true
  2467. });
  2468. useEventListener("touchmove", preventDefault, {
  2469. target: columnsRef
  2470. });
  2471. useExpose({
  2472. confirm,
  2473. getValues,
  2474. setValues,
  2475. getIndexes,
  2476. setIndexes,
  2477. getColumnIndex,
  2478. setColumnIndex,
  2479. getColumnValue,
  2480. setColumnValue,
  2481. getColumnValues,
  2482. setColumnValues
  2483. });
  2484. return () => {
  2485. var _a, _b;
  2486. return createVNode("div", {
  2487. "class": bem13()
  2488. }, [props.toolbarPosition === "top" ? renderToolbar() : null, props.loading ? createVNode(Loading, {
  2489. "class": bem13("loading")
  2490. }, 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]);
  2491. };
  2492. }
  2493. });
  2494. // node_modules/vant/es/picker/index.mjs
  2495. var Picker = withInstall(stdin_default15);
  2496. // node_modules/vant/es/area/Area.mjs
  2497. var [name14, bem14] = createNamespace("area");
  2498. var EMPTY_CODE = "000000";
  2499. var INHERIT_SLOTS = ["title", "cancel", "confirm", "toolbar", "columns-top", "columns-bottom"];
  2500. var INHERIT_PROPS = ["title", "loading", "readonly", "itemHeight", "swipeDuration", "visibleItemCount", "cancelButtonText", "confirmButtonText"];
  2501. var isOverseaCode = (code) => code[0] === "9";
  2502. var areaProps = extend({}, pickerSharedProps, {
  2503. value: String,
  2504. columnsNum: makeNumericProp(3),
  2505. columnsPlaceholder: makeArrayProp(),
  2506. areaList: {
  2507. type: Object,
  2508. default: () => ({})
  2509. },
  2510. isOverseaCode: {
  2511. type: Function,
  2512. default: isOverseaCode
  2513. }
  2514. });
  2515. var stdin_default16 = defineComponent({
  2516. name: name14,
  2517. props: areaProps,
  2518. emits: ["change", "confirm", "cancel"],
  2519. setup(props, {
  2520. emit,
  2521. slots
  2522. }) {
  2523. const pickerRef = ref();
  2524. const state = reactive({
  2525. code: props.value,
  2526. columns: [{
  2527. values: []
  2528. }, {
  2529. values: []
  2530. }, {
  2531. values: []
  2532. }]
  2533. });
  2534. const areaList = computed(() => {
  2535. const {
  2536. areaList: areaList2
  2537. } = props;
  2538. return {
  2539. province: areaList2.province_list || {},
  2540. city: areaList2.city_list || {},
  2541. county: areaList2.county_list || {}
  2542. };
  2543. });
  2544. const placeholderMap = computed(() => {
  2545. const {
  2546. columnsPlaceholder
  2547. } = props;
  2548. return {
  2549. province: columnsPlaceholder[0] || "",
  2550. city: columnsPlaceholder[1] || "",
  2551. county: columnsPlaceholder[2] || ""
  2552. };
  2553. });
  2554. const getDefaultCode = () => {
  2555. if (props.columnsPlaceholder.length) {
  2556. return EMPTY_CODE;
  2557. }
  2558. const {
  2559. county,
  2560. city
  2561. } = areaList.value;
  2562. const countyCodes = Object.keys(county);
  2563. if (countyCodes[0]) {
  2564. return countyCodes[0];
  2565. }
  2566. const cityCodes = Object.keys(city);
  2567. if (cityCodes[0]) {
  2568. return cityCodes[0];
  2569. }
  2570. return "";
  2571. };
  2572. const getColumnValues = (type, code) => {
  2573. let column = [];
  2574. if (type !== "province" && !code) {
  2575. return column;
  2576. }
  2577. const list = areaList.value[type];
  2578. column = Object.keys(list).map((listCode) => ({
  2579. code: listCode,
  2580. name: list[listCode]
  2581. }));
  2582. if (code) {
  2583. if (type === "city" && props.isOverseaCode(code)) {
  2584. code = "9";
  2585. }
  2586. column = column.filter((item) => item.code.indexOf(code) === 0);
  2587. }
  2588. if (placeholderMap.value[type] && column.length) {
  2589. let codeFill = "";
  2590. if (type === "city") {
  2591. codeFill = EMPTY_CODE.slice(2, 4);
  2592. } else if (type === "county") {
  2593. codeFill = EMPTY_CODE.slice(4, 6);
  2594. }
  2595. column.unshift({
  2596. code: code + codeFill,
  2597. name: placeholderMap.value[type]
  2598. });
  2599. }
  2600. return column;
  2601. };
  2602. const getIndex = (type, code) => {
  2603. let compareNum = code.length;
  2604. if (type === "province") {
  2605. compareNum = props.isOverseaCode(code) ? 1 : 2;
  2606. }
  2607. if (type === "city") {
  2608. compareNum = 4;
  2609. }
  2610. code = code.slice(0, compareNum);
  2611. const list = getColumnValues(type, compareNum > 2 ? code.slice(0, compareNum - 2) : "");
  2612. for (let i = 0; i < list.length; i++) {
  2613. if (list[i].code.slice(0, compareNum) === code) {
  2614. return i;
  2615. }
  2616. }
  2617. return 0;
  2618. };
  2619. const setValues = () => {
  2620. const picker = pickerRef.value;
  2621. if (!picker) {
  2622. return;
  2623. }
  2624. let code = state.code || getDefaultCode();
  2625. const province = getColumnValues("province");
  2626. const city = getColumnValues("city", code.slice(0, 2));
  2627. picker.setColumnValues(0, province);
  2628. picker.setColumnValues(1, city);
  2629. if (city.length && code.slice(2, 4) === "00" && !props.isOverseaCode(code)) {
  2630. [{
  2631. code
  2632. }] = city;
  2633. }
  2634. picker.setColumnValues(2, getColumnValues("county", code.slice(0, 4)));
  2635. picker.setIndexes([getIndex("province", code), getIndex("city", code), getIndex("county", code)]);
  2636. };
  2637. const parseValues = (values) => values.map((value, index) => {
  2638. if (value) {
  2639. value = deepClone(value);
  2640. if (!value.code || value.name === props.columnsPlaceholder[index]) {
  2641. value.code = "";
  2642. value.name = "";
  2643. }
  2644. }
  2645. return value;
  2646. });
  2647. const getValues = () => {
  2648. if (pickerRef.value) {
  2649. const values = pickerRef.value.getValues().filter(Boolean);
  2650. return parseValues(values);
  2651. }
  2652. return [];
  2653. };
  2654. const getArea = () => {
  2655. const values = getValues();
  2656. const area = {
  2657. code: "",
  2658. country: "",
  2659. province: "",
  2660. city: "",
  2661. county: ""
  2662. };
  2663. if (!values.length) {
  2664. return area;
  2665. }
  2666. const names = values.map((item) => item.name);
  2667. const validValues = values.filter((value) => value.code);
  2668. area.code = validValues.length ? validValues[validValues.length - 1].code : "";
  2669. if (props.isOverseaCode(area.code)) {
  2670. area.country = names[1] || "";
  2671. area.province = names[2] || "";
  2672. } else {
  2673. area.province = names[0] || "";
  2674. area.city = names[1] || "";
  2675. area.county = names[2] || "";
  2676. }
  2677. return area;
  2678. };
  2679. const reset = (newCode = "") => {
  2680. state.code = newCode;
  2681. setValues();
  2682. };
  2683. const onChange = (values, index) => {
  2684. state.code = values[index].code;
  2685. setValues();
  2686. if (pickerRef.value) {
  2687. const parsedValues = parseValues(pickerRef.value.getValues());
  2688. emit("change", parsedValues, index);
  2689. }
  2690. };
  2691. const onConfirm = (values, index) => {
  2692. setValues();
  2693. emit("confirm", parseValues(values), index);
  2694. };
  2695. const onCancel = (...args) => emit("cancel", ...args);
  2696. onMounted(setValues);
  2697. watch(() => props.value, (value) => {
  2698. state.code = value;
  2699. setValues();
  2700. });
  2701. watch(() => props.areaList, setValues, {
  2702. deep: true
  2703. });
  2704. watch(() => props.columnsNum, () => {
  2705. nextTick(setValues);
  2706. });
  2707. useExpose({
  2708. reset,
  2709. getArea,
  2710. getValues
  2711. });
  2712. return () => {
  2713. const columns = state.columns.slice(0, +props.columnsNum);
  2714. return createVNode(Picker, mergeProps({
  2715. "ref": pickerRef,
  2716. "class": bem14(),
  2717. "columns": columns,
  2718. "columnsFieldNames": {
  2719. text: "name"
  2720. },
  2721. "onChange": onChange,
  2722. "onCancel": onCancel,
  2723. "onConfirm": onConfirm
  2724. }, pick(props, INHERIT_PROPS)), pick(slots, INHERIT_SLOTS));
  2725. };
  2726. }
  2727. });
  2728. // node_modules/vant/es/area/index.mjs
  2729. var Area = withInstall(stdin_default16);
  2730. // node_modules/vant/es/cell/Cell.mjs
  2731. var [name15, bem15] = createNamespace("cell");
  2732. var cellSharedProps = {
  2733. icon: String,
  2734. size: String,
  2735. title: numericProp,
  2736. value: numericProp,
  2737. label: numericProp,
  2738. center: Boolean,
  2739. isLink: Boolean,
  2740. border: truthProp,
  2741. required: Boolean,
  2742. iconPrefix: String,
  2743. valueClass: unknownProp,
  2744. labelClass: unknownProp,
  2745. titleClass: unknownProp,
  2746. titleStyle: null,
  2747. arrowDirection: String,
  2748. clickable: {
  2749. type: Boolean,
  2750. default: null
  2751. }
  2752. };
  2753. var cellProps = extend({}, cellSharedProps, routeProps);
  2754. var stdin_default17 = defineComponent({
  2755. name: name15,
  2756. props: cellProps,
  2757. setup(props, {
  2758. slots
  2759. }) {
  2760. const route2 = useRoute();
  2761. const renderLabel = () => {
  2762. const showLabel = slots.label || isDef(props.label);
  2763. if (showLabel) {
  2764. return createVNode("div", {
  2765. "class": [bem15("label"), props.labelClass]
  2766. }, [slots.label ? slots.label() : props.label]);
  2767. }
  2768. };
  2769. const renderTitle = () => {
  2770. if (slots.title || isDef(props.title)) {
  2771. return createVNode("div", {
  2772. "class": [bem15("title"), props.titleClass],
  2773. "style": props.titleStyle
  2774. }, [slots.title ? slots.title() : createVNode("span", null, [props.title]), renderLabel()]);
  2775. }
  2776. };
  2777. const renderValue = () => {
  2778. const slot = slots.value || slots.default;
  2779. const hasValue = slot || isDef(props.value);
  2780. if (hasValue) {
  2781. const hasTitle = slots.title || isDef(props.title);
  2782. return createVNode("div", {
  2783. "class": [bem15("value", {
  2784. alone: !hasTitle
  2785. }), props.valueClass]
  2786. }, [slot ? slot() : createVNode("span", null, [props.value])]);
  2787. }
  2788. };
  2789. const renderLeftIcon = () => {
  2790. if (slots.icon) {
  2791. return slots.icon();
  2792. }
  2793. if (props.icon) {
  2794. return createVNode(Icon, {
  2795. "name": props.icon,
  2796. "class": bem15("left-icon"),
  2797. "classPrefix": props.iconPrefix
  2798. }, null);
  2799. }
  2800. };
  2801. const renderRightIcon = () => {
  2802. if (slots["right-icon"]) {
  2803. return slots["right-icon"]();
  2804. }
  2805. if (props.isLink) {
  2806. const name210 = props.arrowDirection ? `arrow-${props.arrowDirection}` : "arrow";
  2807. return createVNode(Icon, {
  2808. "name": name210,
  2809. "class": bem15("right-icon")
  2810. }, null);
  2811. }
  2812. };
  2813. return () => {
  2814. var _a, _b;
  2815. const {
  2816. size,
  2817. center,
  2818. border,
  2819. isLink,
  2820. required
  2821. } = props;
  2822. const clickable = (_a = props.clickable) != null ? _a : isLink;
  2823. const classes = {
  2824. center,
  2825. required,
  2826. clickable,
  2827. borderless: !border
  2828. };
  2829. if (size) {
  2830. classes[size] = !!size;
  2831. }
  2832. return createVNode("div", {
  2833. "class": bem15(classes),
  2834. "role": clickable ? "button" : void 0,
  2835. "tabindex": clickable ? 0 : void 0,
  2836. "onClick": route2
  2837. }, [renderLeftIcon(), renderTitle(), renderValue(), renderRightIcon(), (_b = slots.extra) == null ? void 0 : _b.call(slots)]);
  2838. };
  2839. }
  2840. });
  2841. // node_modules/vant/es/cell/index.mjs
  2842. var Cell = withInstall(stdin_default17);
  2843. // node_modules/vant/es/form/Form.mjs
  2844. var [name16, bem16] = createNamespace("form");
  2845. var formProps = {
  2846. colon: Boolean,
  2847. disabled: Boolean,
  2848. readonly: Boolean,
  2849. showError: Boolean,
  2850. labelWidth: numericProp,
  2851. labelAlign: String,
  2852. inputAlign: String,
  2853. scrollToError: Boolean,
  2854. validateFirst: Boolean,
  2855. submitOnEnter: truthProp,
  2856. showErrorMessage: truthProp,
  2857. errorMessageAlign: String,
  2858. validateTrigger: {
  2859. type: [String, Array],
  2860. default: "onBlur"
  2861. }
  2862. };
  2863. var stdin_default18 = defineComponent({
  2864. name: name16,
  2865. props: formProps,
  2866. emits: ["submit", "failed"],
  2867. setup(props, {
  2868. emit,
  2869. slots
  2870. }) {
  2871. const {
  2872. children,
  2873. linkChildren
  2874. } = useChildren(FORM_KEY);
  2875. const getFieldsByNames = (names) => {
  2876. if (names) {
  2877. return children.filter((field) => names.includes(field.name));
  2878. }
  2879. return children;
  2880. };
  2881. const validateSeq = (names) => new Promise((resolve, reject) => {
  2882. const errors = [];
  2883. const fields = getFieldsByNames(names);
  2884. fields.reduce((promise, field) => promise.then(() => {
  2885. if (!errors.length) {
  2886. return field.validate().then((error) => {
  2887. if (error) {
  2888. errors.push(error);
  2889. }
  2890. });
  2891. }
  2892. }), Promise.resolve()).then(() => {
  2893. if (errors.length) {
  2894. reject(errors);
  2895. } else {
  2896. resolve();
  2897. }
  2898. });
  2899. });
  2900. const validateAll = (names) => new Promise((resolve, reject) => {
  2901. const fields = getFieldsByNames(names);
  2902. Promise.all(fields.map((item) => item.validate())).then((errors) => {
  2903. errors = errors.filter(Boolean);
  2904. if (errors.length) {
  2905. reject(errors);
  2906. } else {
  2907. resolve();
  2908. }
  2909. });
  2910. });
  2911. const validateField = (name210) => {
  2912. const matched = children.find((item) => item.name === name210);
  2913. if (matched) {
  2914. return new Promise((resolve, reject) => {
  2915. matched.validate().then((error) => {
  2916. if (error) {
  2917. reject(error);
  2918. } else {
  2919. resolve();
  2920. }
  2921. });
  2922. });
  2923. }
  2924. return Promise.reject();
  2925. };
  2926. const validate = (name210) => {
  2927. if (typeof name210 === "string") {
  2928. return validateField(name210);
  2929. }
  2930. return props.validateFirst ? validateSeq(name210) : validateAll(name210);
  2931. };
  2932. const resetValidation = (name210) => {
  2933. if (typeof name210 === "string") {
  2934. name210 = [name210];
  2935. }
  2936. const fields = getFieldsByNames(name210);
  2937. fields.forEach((item) => {
  2938. item.resetValidation();
  2939. });
  2940. };
  2941. const getValidationStatus = () => children.reduce((form, field) => {
  2942. form[field.name] = field.getValidationStatus();
  2943. return form;
  2944. }, {});
  2945. const scrollToField = (name210, options) => {
  2946. children.some((item) => {
  2947. if (item.name === name210) {
  2948. item.$el.scrollIntoView(options);
  2949. return true;
  2950. }
  2951. return false;
  2952. });
  2953. };
  2954. const getValues = () => children.reduce((form, field) => {
  2955. form[field.name] = field.formValue.value;
  2956. return form;
  2957. }, {});
  2958. const submit = () => {
  2959. const values = getValues();
  2960. validate().then(() => emit("submit", values)).catch((errors) => {
  2961. emit("failed", {
  2962. values,
  2963. errors
  2964. });
  2965. if (props.scrollToError && errors[0].name) {
  2966. scrollToField(errors[0].name);
  2967. }
  2968. });
  2969. };
  2970. const onSubmit = (event) => {
  2971. preventDefault(event);
  2972. submit();
  2973. };
  2974. linkChildren({
  2975. props
  2976. });
  2977. useExpose({
  2978. submit,
  2979. validate,
  2980. getValues,
  2981. scrollToField,
  2982. resetValidation,
  2983. getValidationStatus
  2984. });
  2985. return () => {
  2986. var _a;
  2987. return createVNode("form", {
  2988. "class": bem16(),
  2989. "onSubmit": onSubmit
  2990. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  2991. };
  2992. }
  2993. });
  2994. // node_modules/vant/es/form/index.mjs
  2995. var Form = withInstall(stdin_default18);
  2996. // node_modules/vant/es/field/utils.mjs
  2997. function isEmptyValue(value) {
  2998. if (Array.isArray(value)) {
  2999. return !value.length;
  3000. }
  3001. if (value === 0) {
  3002. return false;
  3003. }
  3004. return !value;
  3005. }
  3006. function runSyncRule(value, rule) {
  3007. if (isEmptyValue(value)) {
  3008. if (rule.required) {
  3009. return false;
  3010. }
  3011. if (rule.validateEmpty === false) {
  3012. return true;
  3013. }
  3014. }
  3015. if (rule.pattern && !rule.pattern.test(String(value))) {
  3016. return false;
  3017. }
  3018. return true;
  3019. }
  3020. function runRuleValidator(value, rule) {
  3021. return new Promise((resolve) => {
  3022. const returnVal = rule.validator(value, rule);
  3023. if (isPromise(returnVal)) {
  3024. returnVal.then(resolve);
  3025. return;
  3026. }
  3027. resolve(returnVal);
  3028. });
  3029. }
  3030. function getRuleMessage(value, rule) {
  3031. const { message } = rule;
  3032. if (isFunction(message)) {
  3033. return message(value, rule);
  3034. }
  3035. return message || "";
  3036. }
  3037. function startComposing({ target }) {
  3038. target.composing = true;
  3039. }
  3040. function endComposing({ target }) {
  3041. if (target.composing) {
  3042. target.composing = false;
  3043. target.dispatchEvent(new Event("input"));
  3044. }
  3045. }
  3046. function resizeTextarea(input, autosize) {
  3047. const scrollTop = getRootScrollTop();
  3048. input.style.height = "auto";
  3049. let height2 = input.scrollHeight;
  3050. if (isObject(autosize)) {
  3051. const { maxHeight, minHeight } = autosize;
  3052. if (maxHeight !== void 0) {
  3053. height2 = Math.min(height2, maxHeight);
  3054. }
  3055. if (minHeight !== void 0) {
  3056. height2 = Math.max(height2, minHeight);
  3057. }
  3058. }
  3059. if (height2) {
  3060. input.style.height = `${height2}px`;
  3061. setRootScrollTop(scrollTop);
  3062. }
  3063. }
  3064. function mapInputType(type) {
  3065. if (type === "number") {
  3066. return {
  3067. type: "text",
  3068. inputmode: "decimal"
  3069. };
  3070. }
  3071. if (type === "digit") {
  3072. return {
  3073. type: "tel",
  3074. inputmode: "numeric"
  3075. };
  3076. }
  3077. return { type };
  3078. }
  3079. function getStringLength(str) {
  3080. return [...str].length;
  3081. }
  3082. function cutString(str, maxlength) {
  3083. return [...str].slice(0, maxlength).join("");
  3084. }
  3085. // node_modules/vant/es/composables/use-id.mjs
  3086. var current = 0;
  3087. function useId() {
  3088. const vm = getCurrentInstance();
  3089. const { name: name97 = "unknown" } = (vm == null ? void 0 : vm.type) || {};
  3090. if (false) {
  3091. return name97;
  3092. }
  3093. return `${name97}-${++current}`;
  3094. }
  3095. // node_modules/vant/es/field/Field.mjs
  3096. var [name17, bem17] = createNamespace("field");
  3097. var fieldSharedProps = {
  3098. id: String,
  3099. name: String,
  3100. leftIcon: String,
  3101. rightIcon: String,
  3102. autofocus: Boolean,
  3103. clearable: Boolean,
  3104. maxlength: numericProp,
  3105. formatter: Function,
  3106. clearIcon: makeStringProp("clear"),
  3107. modelValue: makeNumericProp(""),
  3108. inputAlign: String,
  3109. placeholder: String,
  3110. autocomplete: String,
  3111. errorMessage: String,
  3112. enterkeyhint: String,
  3113. clearTrigger: makeStringProp("focus"),
  3114. formatTrigger: makeStringProp("onChange"),
  3115. error: {
  3116. type: Boolean,
  3117. default: null
  3118. },
  3119. disabled: {
  3120. type: Boolean,
  3121. default: null
  3122. },
  3123. readonly: {
  3124. type: Boolean,
  3125. default: null
  3126. }
  3127. };
  3128. var fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
  3129. rows: numericProp,
  3130. type: makeStringProp("text"),
  3131. rules: Array,
  3132. autosize: [Boolean, Object],
  3133. labelWidth: numericProp,
  3134. labelClass: unknownProp,
  3135. labelAlign: String,
  3136. showWordLimit: Boolean,
  3137. errorMessageAlign: String,
  3138. colon: {
  3139. type: Boolean,
  3140. default: null
  3141. }
  3142. });
  3143. var stdin_default19 = defineComponent({
  3144. name: name17,
  3145. props: fieldProps,
  3146. emits: ["blur", "focus", "clear", "keypress", "click-input", "end-validate", "start-validate", "click-left-icon", "click-right-icon", "update:modelValue"],
  3147. setup(props, {
  3148. emit,
  3149. slots
  3150. }) {
  3151. const id = useId();
  3152. const state = reactive({
  3153. status: "unvalidated",
  3154. focused: false,
  3155. validateMessage: ""
  3156. });
  3157. const inputRef = ref();
  3158. const clearIconRef = ref();
  3159. const customValue = ref();
  3160. const {
  3161. parent: form
  3162. } = useParent(FORM_KEY);
  3163. const getModelValue = () => {
  3164. var _a;
  3165. return String((_a = props.modelValue) != null ? _a : "");
  3166. };
  3167. const getProp = (key) => {
  3168. if (isDef(props[key])) {
  3169. return props[key];
  3170. }
  3171. if (form && isDef(form.props[key])) {
  3172. return form.props[key];
  3173. }
  3174. };
  3175. const showClear = computed(() => {
  3176. const readonly = getProp("readonly");
  3177. if (props.clearable && !readonly) {
  3178. const hasValue = getModelValue() !== "";
  3179. const trigger = props.clearTrigger === "always" || props.clearTrigger === "focus" && state.focused;
  3180. return hasValue && trigger;
  3181. }
  3182. return false;
  3183. });
  3184. const formValue = computed(() => {
  3185. if (customValue.value && slots.input) {
  3186. return customValue.value();
  3187. }
  3188. return props.modelValue;
  3189. });
  3190. const runRules = (rules) => rules.reduce((promise, rule) => promise.then(() => {
  3191. if (state.status === "failed") {
  3192. return;
  3193. }
  3194. let {
  3195. value
  3196. } = formValue;
  3197. if (rule.formatter) {
  3198. value = rule.formatter(value, rule);
  3199. }
  3200. if (!runSyncRule(value, rule)) {
  3201. state.status = "failed";
  3202. state.validateMessage = getRuleMessage(value, rule);
  3203. return;
  3204. }
  3205. if (rule.validator) {
  3206. if (isEmptyValue(value) && rule.validateEmpty === false) {
  3207. return;
  3208. }
  3209. return runRuleValidator(value, rule).then((result) => {
  3210. if (result && typeof result === "string") {
  3211. state.status = "failed";
  3212. state.validateMessage = result;
  3213. } else if (result === false) {
  3214. state.status = "failed";
  3215. state.validateMessage = getRuleMessage(value, rule);
  3216. }
  3217. });
  3218. }
  3219. }), Promise.resolve());
  3220. const resetValidation = () => {
  3221. state.status = "unvalidated";
  3222. state.validateMessage = "";
  3223. };
  3224. const endValidate = () => emit("end-validate", {
  3225. status: state.status
  3226. });
  3227. const validate = (rules = props.rules) => new Promise((resolve) => {
  3228. resetValidation();
  3229. if (rules) {
  3230. emit("start-validate");
  3231. runRules(rules).then(() => {
  3232. if (state.status === "failed") {
  3233. resolve({
  3234. name: props.name,
  3235. message: state.validateMessage
  3236. });
  3237. endValidate();
  3238. } else {
  3239. state.status = "passed";
  3240. resolve();
  3241. endValidate();
  3242. }
  3243. });
  3244. } else {
  3245. resolve();
  3246. }
  3247. });
  3248. const validateWithTrigger = (trigger) => {
  3249. if (form && props.rules) {
  3250. const {
  3251. validateTrigger
  3252. } = form.props;
  3253. const defaultTrigger = toArray(validateTrigger).includes(trigger);
  3254. const rules = props.rules.filter((rule) => {
  3255. if (rule.trigger) {
  3256. return toArray(rule.trigger).includes(trigger);
  3257. }
  3258. return defaultTrigger;
  3259. });
  3260. if (rules.length) {
  3261. validate(rules);
  3262. }
  3263. }
  3264. };
  3265. const limitValueLength = (value) => {
  3266. const {
  3267. maxlength
  3268. } = props;
  3269. if (isDef(maxlength) && getStringLength(value) > maxlength) {
  3270. const modelValue = getModelValue();
  3271. if (modelValue && getStringLength(modelValue) === +maxlength) {
  3272. return modelValue;
  3273. }
  3274. return cutString(value, +maxlength);
  3275. }
  3276. return value;
  3277. };
  3278. const updateValue = (value, trigger = "onChange") => {
  3279. value = limitValueLength(value);
  3280. if (props.type === "number" || props.type === "digit") {
  3281. const isNumber = props.type === "number";
  3282. value = formatNumber(value, isNumber, isNumber);
  3283. }
  3284. if (props.formatter && trigger === props.formatTrigger) {
  3285. value = props.formatter(value);
  3286. }
  3287. if (inputRef.value && inputRef.value.value !== value) {
  3288. inputRef.value.value = value;
  3289. }
  3290. if (value !== props.modelValue) {
  3291. emit("update:modelValue", value);
  3292. }
  3293. };
  3294. const onInput = (event) => {
  3295. if (!event.target.composing) {
  3296. updateValue(event.target.value);
  3297. }
  3298. };
  3299. const blur = () => {
  3300. var _a;
  3301. return (_a = inputRef.value) == null ? void 0 : _a.blur();
  3302. };
  3303. const focus = () => {
  3304. var _a;
  3305. return (_a = inputRef.value) == null ? void 0 : _a.focus();
  3306. };
  3307. const adjustTextareaSize = () => {
  3308. const input = inputRef.value;
  3309. if (props.type === "textarea" && props.autosize && input) {
  3310. resizeTextarea(input, props.autosize);
  3311. }
  3312. };
  3313. const onFocus = (event) => {
  3314. state.focused = true;
  3315. emit("focus", event);
  3316. nextTick(adjustTextareaSize);
  3317. if (getProp("readonly")) {
  3318. blur();
  3319. }
  3320. };
  3321. const onBlur = (event) => {
  3322. if (getProp("readonly")) {
  3323. return;
  3324. }
  3325. state.focused = false;
  3326. updateValue(getModelValue(), "onBlur");
  3327. emit("blur", event);
  3328. validateWithTrigger("onBlur");
  3329. nextTick(adjustTextareaSize);
  3330. resetScroll();
  3331. };
  3332. const onClickInput = (event) => emit("click-input", event);
  3333. const onClickLeftIcon = (event) => emit("click-left-icon", event);
  3334. const onClickRightIcon = (event) => emit("click-right-icon", event);
  3335. const onClear = (event) => {
  3336. preventDefault(event);
  3337. emit("update:modelValue", "");
  3338. emit("clear", event);
  3339. };
  3340. const showError = computed(() => {
  3341. if (typeof props.error === "boolean") {
  3342. return props.error;
  3343. }
  3344. if (form && form.props.showError && state.status === "failed") {
  3345. return true;
  3346. }
  3347. });
  3348. const labelStyle = computed(() => {
  3349. const labelWidth = getProp("labelWidth");
  3350. if (labelWidth) {
  3351. return {
  3352. width: addUnit(labelWidth)
  3353. };
  3354. }
  3355. });
  3356. const onKeypress = (event) => {
  3357. const ENTER_CODE = 13;
  3358. if (event.keyCode === ENTER_CODE) {
  3359. const submitOnEnter = form && form.props.submitOnEnter;
  3360. if (!submitOnEnter && props.type !== "textarea") {
  3361. preventDefault(event);
  3362. }
  3363. if (props.type === "search") {
  3364. blur();
  3365. }
  3366. }
  3367. emit("keypress", event);
  3368. };
  3369. const getInputId = () => props.id || `${id}-input`;
  3370. const getValidationStatus = () => state.status;
  3371. const renderInput = () => {
  3372. const controlClass = bem17("control", [getProp("inputAlign"), {
  3373. error: showError.value,
  3374. custom: !!slots.input,
  3375. "min-height": props.type === "textarea" && !props.autosize
  3376. }]);
  3377. if (slots.input) {
  3378. return createVNode("div", {
  3379. "class": controlClass,
  3380. "onClick": onClickInput
  3381. }, [slots.input()]);
  3382. }
  3383. const inputAttrs = {
  3384. id: getInputId(),
  3385. ref: inputRef,
  3386. name: props.name,
  3387. rows: props.rows !== void 0 ? +props.rows : void 0,
  3388. class: controlClass,
  3389. disabled: getProp("disabled"),
  3390. readonly: getProp("readonly"),
  3391. autofocus: props.autofocus,
  3392. placeholder: props.placeholder,
  3393. autocomplete: props.autocomplete,
  3394. enterkeyhint: props.enterkeyhint,
  3395. "aria-labelledby": props.label ? `${id}-label` : void 0,
  3396. onBlur,
  3397. onFocus,
  3398. onInput,
  3399. onClick: onClickInput,
  3400. onChange: endComposing,
  3401. onKeypress,
  3402. onCompositionend: endComposing,
  3403. onCompositionstart: startComposing
  3404. };
  3405. if (props.type === "textarea") {
  3406. return createVNode("textarea", inputAttrs, null);
  3407. }
  3408. return createVNode("input", mergeProps(mapInputType(props.type), inputAttrs), null);
  3409. };
  3410. const renderLeftIcon = () => {
  3411. const leftIconSlot = slots["left-icon"];
  3412. if (props.leftIcon || leftIconSlot) {
  3413. return createVNode("div", {
  3414. "class": bem17("left-icon"),
  3415. "onClick": onClickLeftIcon
  3416. }, [leftIconSlot ? leftIconSlot() : createVNode(Icon, {
  3417. "name": props.leftIcon,
  3418. "classPrefix": props.iconPrefix
  3419. }, null)]);
  3420. }
  3421. };
  3422. const renderRightIcon = () => {
  3423. const rightIconSlot = slots["right-icon"];
  3424. if (props.rightIcon || rightIconSlot) {
  3425. return createVNode("div", {
  3426. "class": bem17("right-icon"),
  3427. "onClick": onClickRightIcon
  3428. }, [rightIconSlot ? rightIconSlot() : createVNode(Icon, {
  3429. "name": props.rightIcon,
  3430. "classPrefix": props.iconPrefix
  3431. }, null)]);
  3432. }
  3433. };
  3434. const renderWordLimit = () => {
  3435. if (props.showWordLimit && props.maxlength) {
  3436. const count = getStringLength(getModelValue());
  3437. return createVNode("div", {
  3438. "class": bem17("word-limit")
  3439. }, [createVNode("span", {
  3440. "class": bem17("word-num")
  3441. }, [count]), createTextVNode("/"), props.maxlength]);
  3442. }
  3443. };
  3444. const renderMessage = () => {
  3445. if (form && form.props.showErrorMessage === false) {
  3446. return;
  3447. }
  3448. const message = props.errorMessage || state.validateMessage;
  3449. if (message) {
  3450. const slot = slots["error-message"];
  3451. const errorMessageAlign = getProp("errorMessageAlign");
  3452. return createVNode("div", {
  3453. "class": bem17("error-message", errorMessageAlign)
  3454. }, [slot ? slot({
  3455. message
  3456. }) : message]);
  3457. }
  3458. };
  3459. const renderLabel = () => {
  3460. const colon = getProp("colon") ? ":" : "";
  3461. if (slots.label) {
  3462. return [slots.label(), colon];
  3463. }
  3464. if (props.label) {
  3465. return createVNode("label", {
  3466. "id": `${id}-label`,
  3467. "for": getInputId()
  3468. }, [props.label + colon]);
  3469. }
  3470. };
  3471. const renderFieldBody = () => [createVNode("div", {
  3472. "class": bem17("body")
  3473. }, [renderInput(), showClear.value && createVNode(Icon, {
  3474. "ref": clearIconRef,
  3475. "name": props.clearIcon,
  3476. "class": bem17("clear")
  3477. }, null), renderRightIcon(), slots.button && createVNode("div", {
  3478. "class": bem17("button")
  3479. }, [slots.button()])]), renderWordLimit(), renderMessage()];
  3480. useExpose({
  3481. blur,
  3482. focus,
  3483. validate,
  3484. formValue,
  3485. resetValidation,
  3486. getValidationStatus
  3487. });
  3488. provide(CUSTOM_FIELD_INJECTION_KEY, {
  3489. customValue,
  3490. resetValidation,
  3491. validateWithTrigger
  3492. });
  3493. watch(() => props.modelValue, () => {
  3494. updateValue(getModelValue());
  3495. resetValidation();
  3496. validateWithTrigger("onChange");
  3497. nextTick(adjustTextareaSize);
  3498. });
  3499. onMounted(() => {
  3500. updateValue(getModelValue(), props.formatTrigger);
  3501. nextTick(adjustTextareaSize);
  3502. });
  3503. useEventListener("touchstart", onClear, {
  3504. target: computed(() => {
  3505. var _a;
  3506. return (_a = clearIconRef.value) == null ? void 0 : _a.$el;
  3507. })
  3508. });
  3509. return () => {
  3510. const disabled = getProp("disabled");
  3511. const labelAlign = getProp("labelAlign");
  3512. const Label = renderLabel();
  3513. const LeftIcon = renderLeftIcon();
  3514. return createVNode(Cell, {
  3515. "size": props.size,
  3516. "icon": props.leftIcon,
  3517. "class": bem17({
  3518. error: showError.value,
  3519. disabled,
  3520. [`label-${labelAlign}`]: labelAlign
  3521. }),
  3522. "center": props.center,
  3523. "border": props.border,
  3524. "isLink": props.isLink,
  3525. "clickable": props.clickable,
  3526. "titleStyle": labelStyle.value,
  3527. "valueClass": bem17("value"),
  3528. "titleClass": [bem17("label", [labelAlign, {
  3529. required: props.required
  3530. }]), props.labelClass],
  3531. "arrowDirection": props.arrowDirection
  3532. }, {
  3533. icon: LeftIcon ? () => LeftIcon : null,
  3534. title: Label ? () => Label : null,
  3535. value: renderFieldBody,
  3536. extra: slots.extra
  3537. });
  3538. };
  3539. }
  3540. });
  3541. // node_modules/vant/es/field/index.mjs
  3542. var Field = withInstall(stdin_default19);
  3543. // node_modules/vant/es/utils/mount-component.mjs
  3544. function usePopupState() {
  3545. const state = reactive({
  3546. show: false
  3547. });
  3548. const toggle = (show) => {
  3549. state.show = show;
  3550. };
  3551. const open = (props) => {
  3552. extend(state, props, { transitionAppear: true });
  3553. toggle(true);
  3554. };
  3555. const close = () => toggle(false);
  3556. useExpose({ open, close, toggle });
  3557. return {
  3558. open,
  3559. close,
  3560. state,
  3561. toggle
  3562. };
  3563. }
  3564. function mountComponent(RootComponent) {
  3565. const app = createApp(RootComponent);
  3566. const root = document.createElement("div");
  3567. document.body.appendChild(root);
  3568. return {
  3569. instance: app.mount(root),
  3570. unmount() {
  3571. app.unmount();
  3572. document.body.removeChild(root);
  3573. }
  3574. };
  3575. }
  3576. // node_modules/vant/es/toast/lock-click.mjs
  3577. var lockCount = 0;
  3578. function lockClick(lock) {
  3579. if (lock) {
  3580. if (!lockCount) {
  3581. document.body.classList.add("van-toast--unclickable");
  3582. }
  3583. lockCount++;
  3584. } else if (lockCount) {
  3585. lockCount--;
  3586. if (!lockCount) {
  3587. document.body.classList.remove("van-toast--unclickable");
  3588. }
  3589. }
  3590. }
  3591. // node_modules/vant/es/toast/Toast.mjs
  3592. var [name18, bem18] = createNamespace("toast");
  3593. var popupInheritProps = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
  3594. var toastProps = {
  3595. icon: String,
  3596. show: Boolean,
  3597. type: makeStringProp("text"),
  3598. overlay: Boolean,
  3599. message: numericProp,
  3600. iconSize: numericProp,
  3601. duration: makeNumberProp(2e3),
  3602. position: makeStringProp("middle"),
  3603. teleport: [String, Object],
  3604. className: unknownProp,
  3605. iconPrefix: String,
  3606. transition: makeStringProp("van-fade"),
  3607. loadingType: String,
  3608. forbidClick: Boolean,
  3609. overlayClass: unknownProp,
  3610. overlayStyle: Object,
  3611. closeOnClick: Boolean,
  3612. closeOnClickOverlay: Boolean
  3613. };
  3614. var stdin_default20 = defineComponent({
  3615. name: name18,
  3616. props: toastProps,
  3617. emits: ["update:show"],
  3618. setup(props, {
  3619. emit
  3620. }) {
  3621. let timer2;
  3622. let clickable = false;
  3623. const toggleClickable = () => {
  3624. const newValue = props.show && props.forbidClick;
  3625. if (clickable !== newValue) {
  3626. clickable = newValue;
  3627. lockClick(clickable);
  3628. }
  3629. };
  3630. const updateShow = (show) => emit("update:show", show);
  3631. const onClick = () => {
  3632. if (props.closeOnClick) {
  3633. updateShow(false);
  3634. }
  3635. };
  3636. const clearTimer = () => clearTimeout(timer2);
  3637. const renderIcon = () => {
  3638. const {
  3639. icon,
  3640. type,
  3641. iconSize,
  3642. iconPrefix,
  3643. loadingType
  3644. } = props;
  3645. const hasIcon = icon || type === "success" || type === "fail";
  3646. if (hasIcon) {
  3647. return createVNode(Icon, {
  3648. "name": icon || type,
  3649. "size": iconSize,
  3650. "class": bem18("icon"),
  3651. "classPrefix": iconPrefix
  3652. }, null);
  3653. }
  3654. if (type === "loading") {
  3655. return createVNode(Loading, {
  3656. "class": bem18("loading"),
  3657. "size": iconSize,
  3658. "type": loadingType
  3659. }, null);
  3660. }
  3661. };
  3662. const renderMessage = () => {
  3663. const {
  3664. type,
  3665. message
  3666. } = props;
  3667. if (isDef(message) && message !== "") {
  3668. return type === "html" ? createVNode("div", {
  3669. "key": 0,
  3670. "class": bem18("text"),
  3671. "innerHTML": String(message)
  3672. }, null) : createVNode("div", {
  3673. "class": bem18("text")
  3674. }, [message]);
  3675. }
  3676. };
  3677. watch(() => [props.show, props.forbidClick], toggleClickable);
  3678. watch(() => [props.show, props.type, props.message, props.duration], () => {
  3679. clearTimer();
  3680. if (props.show && props.duration > 0) {
  3681. timer2 = setTimeout(() => {
  3682. updateShow(false);
  3683. }, props.duration);
  3684. }
  3685. });
  3686. onMounted(toggleClickable);
  3687. onUnmounted(toggleClickable);
  3688. return () => createVNode(Popup, mergeProps({
  3689. "class": [bem18([props.position, {
  3690. [props.type]: !props.icon
  3691. }]), props.className],
  3692. "lockScroll": false,
  3693. "onClick": onClick,
  3694. "onClosed": clearTimer,
  3695. "onUpdate:show": updateShow
  3696. }, pick(props, popupInheritProps)), {
  3697. default: () => [renderIcon(), renderMessage()]
  3698. });
  3699. }
  3700. });
  3701. // node_modules/vant/es/toast/function-call.mjs
  3702. var defaultOptions = {
  3703. icon: "",
  3704. type: "text",
  3705. message: "",
  3706. className: "",
  3707. overlay: false,
  3708. onClose: void 0,
  3709. onOpened: void 0,
  3710. duration: 2e3,
  3711. teleport: "body",
  3712. iconSize: void 0,
  3713. iconPrefix: void 0,
  3714. position: "middle",
  3715. transition: "van-fade",
  3716. forbidClick: false,
  3717. loadingType: void 0,
  3718. overlayClass: "",
  3719. overlayStyle: void 0,
  3720. closeOnClick: false,
  3721. closeOnClickOverlay: false
  3722. };
  3723. var queue = [];
  3724. var allowMultiple = false;
  3725. var currentOptions = extend({}, defaultOptions);
  3726. var defaultOptionsMap = new Map();
  3727. function parseOptions(message) {
  3728. if (isObject(message)) {
  3729. return message;
  3730. }
  3731. return {
  3732. message
  3733. };
  3734. }
  3735. function createInstance() {
  3736. const {
  3737. instance: instance4,
  3738. unmount
  3739. } = mountComponent({
  3740. setup() {
  3741. const message = ref("");
  3742. const {
  3743. open,
  3744. state,
  3745. close,
  3746. toggle
  3747. } = usePopupState();
  3748. const onClosed = () => {
  3749. if (allowMultiple) {
  3750. queue = queue.filter((item) => item !== instance4);
  3751. unmount();
  3752. }
  3753. };
  3754. const render = () => {
  3755. const attrs = {
  3756. onClosed,
  3757. "onUpdate:show": toggle
  3758. };
  3759. return createVNode(stdin_default20, mergeProps(state, attrs), null);
  3760. };
  3761. watch(message, (val) => {
  3762. state.message = val;
  3763. });
  3764. getCurrentInstance().render = render;
  3765. return {
  3766. open,
  3767. clear: close,
  3768. message
  3769. };
  3770. }
  3771. });
  3772. return instance4;
  3773. }
  3774. function getInstance() {
  3775. if (!queue.length || allowMultiple) {
  3776. const instance4 = createInstance();
  3777. queue.push(instance4);
  3778. }
  3779. return queue[queue.length - 1];
  3780. }
  3781. function Toast(options = {}) {
  3782. if (!inBrowser) {
  3783. return {};
  3784. }
  3785. const toast = getInstance();
  3786. const parsedOptions = parseOptions(options);
  3787. toast.open(extend({}, currentOptions, defaultOptionsMap.get(parsedOptions.type || currentOptions.type), parsedOptions));
  3788. return toast;
  3789. }
  3790. var createMethod = (type) => (options) => Toast(extend({
  3791. type
  3792. }, parseOptions(options)));
  3793. Toast.loading = createMethod("loading");
  3794. Toast.success = createMethod("success");
  3795. Toast.fail = createMethod("fail");
  3796. Toast.clear = (all) => {
  3797. var _a;
  3798. if (queue.length) {
  3799. if (all) {
  3800. queue.forEach((toast) => {
  3801. toast.clear();
  3802. });
  3803. queue = [];
  3804. } else if (!allowMultiple) {
  3805. queue[0].clear();
  3806. } else {
  3807. (_a = queue.shift()) == null ? void 0 : _a.clear();
  3808. }
  3809. }
  3810. };
  3811. function setDefaultOptions(type, options) {
  3812. if (typeof type === "string") {
  3813. defaultOptionsMap.set(type, options);
  3814. } else {
  3815. extend(currentOptions, type);
  3816. }
  3817. }
  3818. Toast.setDefaultOptions = setDefaultOptions;
  3819. Toast.resetDefaultOptions = (type) => {
  3820. if (typeof type === "string") {
  3821. defaultOptionsMap.delete(type);
  3822. } else {
  3823. currentOptions = extend({}, defaultOptions);
  3824. defaultOptionsMap.clear();
  3825. }
  3826. };
  3827. Toast.allowMultiple = (value = true) => {
  3828. allowMultiple = value;
  3829. };
  3830. Toast.install = (app) => {
  3831. app.use(withInstall(stdin_default20));
  3832. app.config.globalProperties.$toast = Toast;
  3833. };
  3834. // node_modules/vant/es/switch/Switch.mjs
  3835. var [name19, bem19] = createNamespace("switch");
  3836. var switchProps = {
  3837. size: numericProp,
  3838. loading: Boolean,
  3839. disabled: Boolean,
  3840. modelValue: unknownProp,
  3841. activeColor: String,
  3842. inactiveColor: String,
  3843. activeValue: {
  3844. type: unknownProp,
  3845. default: true
  3846. },
  3847. inactiveValue: {
  3848. type: unknownProp,
  3849. default: false
  3850. }
  3851. };
  3852. var stdin_default21 = defineComponent({
  3853. name: name19,
  3854. props: switchProps,
  3855. emits: ["change", "update:modelValue"],
  3856. setup(props, {
  3857. emit,
  3858. slots
  3859. }) {
  3860. const isChecked = () => props.modelValue === props.activeValue;
  3861. const onClick = () => {
  3862. if (!props.disabled && !props.loading) {
  3863. const newValue = isChecked() ? props.inactiveValue : props.activeValue;
  3864. emit("update:modelValue", newValue);
  3865. emit("change", newValue);
  3866. }
  3867. };
  3868. const renderLoading = () => {
  3869. if (props.loading) {
  3870. const color = isChecked() ? props.activeColor : props.inactiveColor;
  3871. return createVNode(Loading, {
  3872. "class": bem19("loading"),
  3873. "color": color
  3874. }, null);
  3875. }
  3876. if (slots.node) {
  3877. return slots.node();
  3878. }
  3879. };
  3880. useCustomFieldValue(() => props.modelValue);
  3881. return () => {
  3882. var _a;
  3883. const {
  3884. size,
  3885. loading,
  3886. disabled,
  3887. activeColor,
  3888. inactiveColor
  3889. } = props;
  3890. const checked = isChecked();
  3891. const style = {
  3892. fontSize: addUnit(size),
  3893. backgroundColor: checked ? activeColor : inactiveColor
  3894. };
  3895. return createVNode("div", {
  3896. "role": "switch",
  3897. "class": bem19({
  3898. on: checked,
  3899. loading,
  3900. disabled
  3901. }),
  3902. "style": style,
  3903. "tabindex": disabled ? void 0 : 0,
  3904. "aria-checked": checked,
  3905. "onClick": onClick
  3906. }, [createVNode("div", {
  3907. "class": bem19("node")
  3908. }, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
  3909. };
  3910. }
  3911. });
  3912. // node_modules/vant/es/switch/index.mjs
  3913. var Switch = withInstall(stdin_default21);
  3914. // node_modules/vant/es/address-edit/AddressEditDetail.mjs
  3915. var [name20, bem20] = createNamespace("address-edit-detail");
  3916. var t2 = createNamespace("address-edit")[2];
  3917. var stdin_default22 = defineComponent({
  3918. name: name20,
  3919. props: {
  3920. show: Boolean,
  3921. rows: numericProp,
  3922. value: String,
  3923. rules: Array,
  3924. focused: Boolean,
  3925. maxlength: numericProp,
  3926. searchResult: Array,
  3927. showSearchResult: Boolean
  3928. },
  3929. emits: ["blur", "focus", "input", "select-search"],
  3930. setup(props, {
  3931. emit
  3932. }) {
  3933. const field = ref();
  3934. const showSearchResult = () => props.focused && props.searchResult && props.showSearchResult;
  3935. const onSelect = (express) => {
  3936. emit("select-search", express);
  3937. emit("input", `${express.address || ""} ${express.name || ""}`.trim());
  3938. };
  3939. const renderSearchTitle = (express) => {
  3940. if (express.name) {
  3941. const text = express.name.replace(props.value, `<span class=${bem20("keyword")}>${props.value}</span>`);
  3942. return createVNode("div", {
  3943. "innerHTML": text
  3944. }, null);
  3945. }
  3946. };
  3947. const renderSearchResult = () => {
  3948. if (!showSearchResult()) {
  3949. return;
  3950. }
  3951. const {
  3952. searchResult
  3953. } = props;
  3954. return searchResult.map((express) => createVNode(Cell, {
  3955. "clickable": true,
  3956. "key": express.name + express.address,
  3957. "icon": "location-o",
  3958. "label": express.address,
  3959. "class": bem20("search-item"),
  3960. "border": false,
  3961. "onClick": () => onSelect(express)
  3962. }, {
  3963. title: () => renderSearchTitle(express)
  3964. }));
  3965. };
  3966. const onBlur = (event) => emit("blur", event);
  3967. const onFocus = (event) => emit("focus", event);
  3968. const onInput = (value) => emit("input", value);
  3969. return () => {
  3970. if (props.show) {
  3971. return createVNode(Fragment, null, [createVNode(Field, {
  3972. "autosize": true,
  3973. "clearable": true,
  3974. "ref": field,
  3975. "class": bem20(),
  3976. "rows": props.rows,
  3977. "type": "textarea",
  3978. "rules": props.rules,
  3979. "label": t2("addressDetail"),
  3980. "border": !showSearchResult(),
  3981. "maxlength": props.maxlength,
  3982. "modelValue": props.value,
  3983. "placeholder": t2("addressDetail"),
  3984. "onBlur": onBlur,
  3985. "onFocus": onFocus,
  3986. "onUpdate:modelValue": onInput
  3987. }, null), renderSearchResult()]);
  3988. }
  3989. };
  3990. }
  3991. });
  3992. // node_modules/vant/es/address-edit/AddressEdit.mjs
  3993. var [name21, bem21, t3] = createNamespace("address-edit");
  3994. var DEFAULT_DATA = {
  3995. name: "",
  3996. tel: "",
  3997. city: "",
  3998. county: "",
  3999. country: "",
  4000. province: "",
  4001. areaCode: "",
  4002. isDefault: false,
  4003. postalCode: "",
  4004. addressDetail: ""
  4005. };
  4006. var isPostal = (value) => /^\d{6}$/.test(value);
  4007. var addressEditProps = {
  4008. areaList: Object,
  4009. isSaving: Boolean,
  4010. isDeleting: Boolean,
  4011. validator: Function,
  4012. showArea: truthProp,
  4013. showDetail: truthProp,
  4014. showDelete: Boolean,
  4015. showPostal: Boolean,
  4016. disableArea: Boolean,
  4017. searchResult: Array,
  4018. telMaxlength: numericProp,
  4019. showSetDefault: Boolean,
  4020. saveButtonText: String,
  4021. areaPlaceholder: String,
  4022. deleteButtonText: String,
  4023. showSearchResult: Boolean,
  4024. detailRows: makeNumericProp(1),
  4025. detailMaxlength: makeNumericProp(200),
  4026. areaColumnsPlaceholder: makeArrayProp(),
  4027. addressInfo: {
  4028. type: Object,
  4029. default: () => extend({}, DEFAULT_DATA)
  4030. },
  4031. telValidator: {
  4032. type: Function,
  4033. default: isMobile
  4034. },
  4035. postalValidator: {
  4036. type: Function,
  4037. default: isPostal
  4038. }
  4039. };
  4040. var stdin_default23 = defineComponent({
  4041. name: name21,
  4042. props: addressEditProps,
  4043. emits: ["save", "focus", "delete", "click-area", "change-area", "change-detail", "select-search", "change-default"],
  4044. setup(props, {
  4045. emit,
  4046. slots
  4047. }) {
  4048. const areaRef = ref();
  4049. const data = reactive({});
  4050. const showAreaPopup = ref(false);
  4051. const detailFocused = ref(false);
  4052. const areaListLoaded = computed(() => isObject(props.areaList) && Object.keys(props.areaList).length);
  4053. const areaText = computed(() => {
  4054. const {
  4055. country,
  4056. province,
  4057. city,
  4058. county,
  4059. areaCode
  4060. } = data;
  4061. if (areaCode) {
  4062. const arr = [country, province, city, county];
  4063. if (province && province === city) {
  4064. arr.splice(1, 1);
  4065. }
  4066. return arr.filter(Boolean).join("/");
  4067. }
  4068. return "";
  4069. });
  4070. const hideBottomFields = computed(() => {
  4071. var _a;
  4072. return ((_a = props.searchResult) == null ? void 0 : _a.length) && detailFocused.value;
  4073. });
  4074. const assignAreaValues = () => {
  4075. if (areaRef.value) {
  4076. const detail = areaRef.value.getArea();
  4077. detail.areaCode = detail.code;
  4078. delete detail.code;
  4079. extend(data, detail);
  4080. }
  4081. };
  4082. const onFocus = (key) => {
  4083. detailFocused.value = key === "addressDetail";
  4084. emit("focus", key);
  4085. };
  4086. const rules = computed(() => {
  4087. const {
  4088. validator,
  4089. telValidator,
  4090. postalValidator
  4091. } = props;
  4092. const makeRule = (name210, emptyMessage) => ({
  4093. validator: (value) => {
  4094. if (validator) {
  4095. const message = validator(name210, value);
  4096. if (message) {
  4097. return message;
  4098. }
  4099. }
  4100. if (!value) {
  4101. return emptyMessage;
  4102. }
  4103. return true;
  4104. }
  4105. });
  4106. return {
  4107. name: [makeRule("name", t3("nameEmpty"))],
  4108. tel: [makeRule("tel", t3("telInvalid")), {
  4109. validator: telValidator,
  4110. message: t3("telInvalid")
  4111. }],
  4112. areaCode: [makeRule("areaCode", t3("areaEmpty"))],
  4113. addressDetail: [makeRule("addressDetail", t3("addressEmpty"))],
  4114. postalCode: [makeRule("addressDetail", t3("postalEmpty")), {
  4115. validator: postalValidator,
  4116. message: t3("postalEmpty")
  4117. }]
  4118. };
  4119. });
  4120. const onSave = () => emit("save", data);
  4121. const onChangeDetail = (val) => {
  4122. data.addressDetail = val;
  4123. emit("change-detail", val);
  4124. };
  4125. const onAreaConfirm = (values) => {
  4126. values = values.filter(Boolean);
  4127. if (values.some((value) => !value.code)) {
  4128. Toast(t3("areaEmpty"));
  4129. } else {
  4130. showAreaPopup.value = false;
  4131. assignAreaValues();
  4132. emit("change-area", values);
  4133. }
  4134. };
  4135. const onDelete = () => emit("delete", data);
  4136. const getArea = () => {
  4137. var _a;
  4138. return ((_a = areaRef.value) == null ? void 0 : _a.getValues()) || [];
  4139. };
  4140. const setAreaCode = (code) => {
  4141. data.areaCode = code || "";
  4142. if (code) {
  4143. nextTick(assignAreaValues);
  4144. }
  4145. };
  4146. const onDetailBlur = () => {
  4147. setTimeout(() => {
  4148. detailFocused.value = false;
  4149. });
  4150. };
  4151. const setAddressDetail = (value) => {
  4152. data.addressDetail = value;
  4153. };
  4154. const renderSetDefaultCell = () => {
  4155. if (props.showSetDefault) {
  4156. const slots2 = {
  4157. "right-icon": () => createVNode(Switch, {
  4158. "modelValue": data.isDefault,
  4159. "onUpdate:modelValue": ($event) => data.isDefault = $event,
  4160. "size": "24",
  4161. "onChange": (event) => emit("change-default", event)
  4162. }, null)
  4163. };
  4164. return withDirectives(createVNode(Cell, {
  4165. "center": true,
  4166. "title": t3("defaultAddress"),
  4167. "class": bem21("default")
  4168. }, slots2), [[vShow, !hideBottomFields.value]]);
  4169. }
  4170. };
  4171. useExpose({
  4172. getArea,
  4173. setAreaCode,
  4174. setAddressDetail
  4175. });
  4176. watch(() => props.areaList, () => setAreaCode(data.areaCode));
  4177. watch(() => props.addressInfo, (value) => {
  4178. extend(data, DEFAULT_DATA, value);
  4179. setAreaCode(value.areaCode);
  4180. }, {
  4181. deep: true,
  4182. immediate: true
  4183. });
  4184. return () => {
  4185. const {
  4186. disableArea
  4187. } = props;
  4188. return createVNode(Form, {
  4189. "class": bem21(),
  4190. "onSubmit": onSave
  4191. }, {
  4192. default: () => {
  4193. var _a;
  4194. return [createVNode("div", {
  4195. "class": bem21("fields")
  4196. }, [createVNode(Field, {
  4197. "modelValue": data.name,
  4198. "onUpdate:modelValue": ($event) => data.name = $event,
  4199. "clearable": true,
  4200. "label": t3("name"),
  4201. "rules": rules.value.name,
  4202. "placeholder": t3("name"),
  4203. "onFocus": () => onFocus("name")
  4204. }, null), createVNode(Field, {
  4205. "modelValue": data.tel,
  4206. "onUpdate:modelValue": ($event) => data.tel = $event,
  4207. "clearable": true,
  4208. "type": "tel",
  4209. "label": t3("tel"),
  4210. "rules": rules.value.tel,
  4211. "maxlength": props.telMaxlength,
  4212. "placeholder": t3("tel"),
  4213. "onFocus": () => onFocus("tel")
  4214. }, null), withDirectives(createVNode(Field, {
  4215. "readonly": true,
  4216. "label": t3("area"),
  4217. "is-link": !disableArea,
  4218. "modelValue": areaText.value,
  4219. "rules": rules.value.areaCode,
  4220. "placeholder": props.areaPlaceholder || t3("area"),
  4221. "onFocus": () => onFocus("areaCode"),
  4222. "onClick": () => {
  4223. emit("click-area");
  4224. showAreaPopup.value = !disableArea;
  4225. }
  4226. }, null), [[vShow, props.showArea]]), createVNode(stdin_default22, {
  4227. "show": props.showDetail,
  4228. "rows": props.detailRows,
  4229. "rules": rules.value.addressDetail,
  4230. "value": data.addressDetail,
  4231. "focused": detailFocused.value,
  4232. "maxlength": props.detailMaxlength,
  4233. "searchResult": props.searchResult,
  4234. "showSearchResult": props.showSearchResult,
  4235. "onBlur": onDetailBlur,
  4236. "onFocus": () => onFocus("addressDetail"),
  4237. "onInput": onChangeDetail,
  4238. "onSelect-search": (event) => emit("select-search", event)
  4239. }, null), props.showPostal && withDirectives(createVNode(Field, {
  4240. "modelValue": data.postalCode,
  4241. "onUpdate:modelValue": ($event) => data.postalCode = $event,
  4242. "type": "tel",
  4243. "rules": rules.value.postalCode,
  4244. "label": t3("postal"),
  4245. "maxlength": "6",
  4246. "placeholder": t3("postal"),
  4247. "onFocus": () => onFocus("postalCode")
  4248. }, null), [[vShow, !hideBottomFields.value]]), (_a = slots.default) == null ? void 0 : _a.call(slots)]), renderSetDefaultCell(), withDirectives(createVNode("div", {
  4249. "class": bem21("buttons")
  4250. }, [createVNode(Button, {
  4251. "block": true,
  4252. "round": true,
  4253. "type": "danger",
  4254. "text": props.saveButtonText || t3("save"),
  4255. "class": bem21("button"),
  4256. "loading": props.isSaving,
  4257. "nativeType": "submit"
  4258. }, null), props.showDelete && createVNode(Button, {
  4259. "block": true,
  4260. "round": true,
  4261. "class": bem21("button"),
  4262. "loading": props.isDeleting,
  4263. "text": props.deleteButtonText || t3("delete"),
  4264. "onClick": onDelete
  4265. }, null)]), [[vShow, !hideBottomFields.value]]), createVNode(Popup, {
  4266. "show": showAreaPopup.value,
  4267. "onUpdate:show": ($event) => showAreaPopup.value = $event,
  4268. "round": true,
  4269. "teleport": "body",
  4270. "position": "bottom",
  4271. "lazyRender": false
  4272. }, {
  4273. default: () => [createVNode(Area, {
  4274. "ref": areaRef,
  4275. "value": data.areaCode,
  4276. "loading": !areaListLoaded.value,
  4277. "areaList": props.areaList,
  4278. "columnsPlaceholder": props.areaColumnsPlaceholder,
  4279. "onConfirm": onAreaConfirm,
  4280. "onCancel": () => {
  4281. showAreaPopup.value = false;
  4282. }
  4283. }, null)]
  4284. })];
  4285. }
  4286. });
  4287. };
  4288. }
  4289. });
  4290. // node_modules/vant/es/address-edit/index.mjs
  4291. var AddressEdit = withInstall(stdin_default23);
  4292. // node_modules/vant/es/radio-group/RadioGroup.mjs
  4293. var [name22, bem22] = createNamespace("radio-group");
  4294. var radioGroupProps = {
  4295. disabled: Boolean,
  4296. iconSize: numericProp,
  4297. direction: String,
  4298. modelValue: unknownProp,
  4299. checkedColor: String
  4300. };
  4301. var RADIO_KEY = Symbol(name22);
  4302. var stdin_default24 = defineComponent({
  4303. name: name22,
  4304. props: radioGroupProps,
  4305. emits: ["change", "update:modelValue"],
  4306. setup(props, {
  4307. emit,
  4308. slots
  4309. }) {
  4310. const {
  4311. linkChildren
  4312. } = useChildren(RADIO_KEY);
  4313. const updateValue = (value) => emit("update:modelValue", value);
  4314. watch(() => props.modelValue, (value) => emit("change", value));
  4315. linkChildren({
  4316. props,
  4317. updateValue
  4318. });
  4319. useCustomFieldValue(() => props.modelValue);
  4320. return () => {
  4321. var _a;
  4322. return createVNode("div", {
  4323. "class": bem22([props.direction]),
  4324. "role": "radiogroup"
  4325. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  4326. };
  4327. }
  4328. });
  4329. // node_modules/vant/es/radio-group/index.mjs
  4330. var RadioGroup = withInstall(stdin_default24);
  4331. // node_modules/vant/es/tag/Tag.mjs
  4332. var [name23, bem23] = createNamespace("tag");
  4333. var tagProps = {
  4334. size: String,
  4335. mark: Boolean,
  4336. show: truthProp,
  4337. type: makeStringProp("default"),
  4338. color: String,
  4339. plain: Boolean,
  4340. round: Boolean,
  4341. textColor: String,
  4342. closeable: Boolean
  4343. };
  4344. var stdin_default25 = defineComponent({
  4345. name: name23,
  4346. props: tagProps,
  4347. emits: ["close"],
  4348. setup(props, {
  4349. slots,
  4350. emit
  4351. }) {
  4352. const onClose = (event) => {
  4353. event.stopPropagation();
  4354. emit("close", event);
  4355. };
  4356. const getStyle = () => {
  4357. if (props.plain) {
  4358. return {
  4359. color: props.textColor || props.color,
  4360. borderColor: props.color
  4361. };
  4362. }
  4363. return {
  4364. color: props.textColor,
  4365. background: props.color
  4366. };
  4367. };
  4368. const renderTag = () => {
  4369. var _a;
  4370. const {
  4371. type,
  4372. mark,
  4373. plain,
  4374. round: round2,
  4375. size,
  4376. closeable
  4377. } = props;
  4378. const classes = {
  4379. mark,
  4380. plain,
  4381. round: round2
  4382. };
  4383. if (size) {
  4384. classes[size] = size;
  4385. }
  4386. const CloseIcon = closeable && createVNode(Icon, {
  4387. "name": "cross",
  4388. "class": [bem23("close"), HAPTICS_FEEDBACK],
  4389. "onClick": onClose
  4390. }, null);
  4391. return createVNode("span", {
  4392. "style": getStyle(),
  4393. "class": bem23([classes, type])
  4394. }, [(_a = slots.default) == null ? void 0 : _a.call(slots), CloseIcon]);
  4395. };
  4396. return () => createVNode(Transition, {
  4397. "name": props.closeable ? "van-fade" : void 0
  4398. }, {
  4399. default: () => [props.show ? renderTag() : null]
  4400. });
  4401. }
  4402. });
  4403. // node_modules/vant/es/tag/index.mjs
  4404. var Tag = withInstall(stdin_default25);
  4405. // node_modules/vant/es/checkbox/Checker.mjs
  4406. var checkerProps = {
  4407. name: unknownProp,
  4408. shape: makeStringProp("round"),
  4409. disabled: Boolean,
  4410. iconSize: numericProp,
  4411. modelValue: unknownProp,
  4412. checkedColor: String,
  4413. labelPosition: String,
  4414. labelDisabled: Boolean
  4415. };
  4416. var stdin_default26 = defineComponent({
  4417. props: extend({}, checkerProps, {
  4418. bem: makeRequiredProp(Function),
  4419. role: String,
  4420. parent: Object,
  4421. checked: Boolean,
  4422. bindGroup: truthProp
  4423. }),
  4424. emits: ["click", "toggle"],
  4425. setup(props, {
  4426. emit,
  4427. slots
  4428. }) {
  4429. const iconRef = ref();
  4430. const getParentProp = (name97) => {
  4431. if (props.parent && props.bindGroup) {
  4432. return props.parent.props[name97];
  4433. }
  4434. };
  4435. const disabled = computed(() => getParentProp("disabled") || props.disabled);
  4436. const direction = computed(() => getParentProp("direction"));
  4437. const iconStyle = computed(() => {
  4438. const checkedColor = props.checkedColor || getParentProp("checkedColor");
  4439. if (checkedColor && props.checked && !disabled.value) {
  4440. return {
  4441. borderColor: checkedColor,
  4442. backgroundColor: checkedColor
  4443. };
  4444. }
  4445. });
  4446. const onClick = (event) => {
  4447. const {
  4448. target
  4449. } = event;
  4450. const icon = iconRef.value;
  4451. const iconClicked = icon === target || (icon == null ? void 0 : icon.contains(target));
  4452. if (!disabled.value && (iconClicked || !props.labelDisabled)) {
  4453. emit("toggle");
  4454. }
  4455. emit("click", event);
  4456. };
  4457. const renderIcon = () => {
  4458. const {
  4459. bem: bem93,
  4460. shape,
  4461. checked
  4462. } = props;
  4463. const iconSize = props.iconSize || getParentProp("iconSize");
  4464. return createVNode("div", {
  4465. "ref": iconRef,
  4466. "class": bem93("icon", [shape, {
  4467. disabled: disabled.value,
  4468. checked
  4469. }]),
  4470. "style": {
  4471. fontSize: addUnit(iconSize)
  4472. }
  4473. }, [slots.icon ? slots.icon({
  4474. checked,
  4475. disabled: disabled.value
  4476. }) : createVNode(Icon, {
  4477. "name": "success",
  4478. "style": iconStyle.value
  4479. }, null)]);
  4480. };
  4481. const renderLabel = () => {
  4482. if (slots.default) {
  4483. return createVNode("span", {
  4484. "class": props.bem("label", [props.labelPosition, {
  4485. disabled: disabled.value
  4486. }])
  4487. }, [slots.default()]);
  4488. }
  4489. };
  4490. return () => {
  4491. const nodes = props.labelPosition === "left" ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()];
  4492. return createVNode("div", {
  4493. "role": props.role,
  4494. "class": props.bem([{
  4495. disabled: disabled.value,
  4496. "label-disabled": props.labelDisabled
  4497. }, direction.value]),
  4498. "tabindex": disabled.value ? void 0 : 0,
  4499. "aria-checked": props.checked,
  4500. "onClick": onClick
  4501. }, [nodes]);
  4502. };
  4503. }
  4504. });
  4505. // node_modules/vant/es/radio/Radio.mjs
  4506. var [name24, bem24] = createNamespace("radio");
  4507. var stdin_default27 = defineComponent({
  4508. name: name24,
  4509. props: checkerProps,
  4510. emits: ["update:modelValue"],
  4511. setup(props, {
  4512. emit,
  4513. slots
  4514. }) {
  4515. const {
  4516. parent
  4517. } = useParent(RADIO_KEY);
  4518. const checked = () => {
  4519. const value = parent ? parent.props.modelValue : props.modelValue;
  4520. return value === props.name;
  4521. };
  4522. const toggle = () => {
  4523. if (parent) {
  4524. parent.updateValue(props.name);
  4525. } else {
  4526. emit("update:modelValue", props.name);
  4527. }
  4528. };
  4529. return () => createVNode(stdin_default26, mergeProps({
  4530. "bem": bem24,
  4531. "role": "radio",
  4532. "parent": parent,
  4533. "checked": checked(),
  4534. "onToggle": toggle
  4535. }, props), pick(slots, ["default", "icon"]));
  4536. }
  4537. });
  4538. // node_modules/vant/es/radio/index.mjs
  4539. var Radio = withInstall(stdin_default27);
  4540. // node_modules/vant/es/address-list/AddressListItem.mjs
  4541. var [name25, bem25] = createNamespace("address-item");
  4542. var stdin_default28 = defineComponent({
  4543. name: name25,
  4544. props: {
  4545. address: makeRequiredProp(Object),
  4546. disabled: Boolean,
  4547. switchable: Boolean,
  4548. defaultTagText: String
  4549. },
  4550. emits: ["edit", "click", "select"],
  4551. setup(props, {
  4552. slots,
  4553. emit
  4554. }) {
  4555. const onClick = () => {
  4556. if (props.switchable) {
  4557. emit("select");
  4558. }
  4559. emit("click");
  4560. };
  4561. const renderRightIcon = () => createVNode(Icon, {
  4562. "name": "edit",
  4563. "class": bem25("edit"),
  4564. "onClick": (event) => {
  4565. event.stopPropagation();
  4566. emit("edit");
  4567. emit("click");
  4568. }
  4569. }, null);
  4570. const renderTag = () => {
  4571. if (slots.tag) {
  4572. return slots.tag(props.address);
  4573. }
  4574. if (props.address.isDefault && props.defaultTagText) {
  4575. return createVNode(Tag, {
  4576. "type": "danger",
  4577. "round": true,
  4578. "class": bem25("tag")
  4579. }, {
  4580. default: () => [props.defaultTagText]
  4581. });
  4582. }
  4583. };
  4584. const renderContent = () => {
  4585. const {
  4586. address,
  4587. disabled,
  4588. switchable
  4589. } = props;
  4590. const Info = [createVNode("div", {
  4591. "class": bem25("name")
  4592. }, [`${address.name} ${address.tel}`, renderTag()]), createVNode("div", {
  4593. "class": bem25("address")
  4594. }, [address.address])];
  4595. if (switchable && !disabled) {
  4596. return createVNode(Radio, {
  4597. "name": address.id,
  4598. "iconSize": 18
  4599. }, {
  4600. default: () => [Info]
  4601. });
  4602. }
  4603. return Info;
  4604. };
  4605. return () => {
  4606. var _a;
  4607. const {
  4608. disabled
  4609. } = props;
  4610. return createVNode("div", {
  4611. "class": bem25({
  4612. disabled
  4613. }),
  4614. "onClick": onClick
  4615. }, [createVNode(Cell, {
  4616. "border": false,
  4617. "valueClass": bem25("value")
  4618. }, {
  4619. value: renderContent,
  4620. "right-icon": renderRightIcon
  4621. }), (_a = slots.bottom) == null ? void 0 : _a.call(slots, extend({}, props.address, {
  4622. disabled
  4623. }))]);
  4624. };
  4625. }
  4626. });
  4627. // node_modules/vant/es/address-list/AddressList.mjs
  4628. var [name26, bem26, t4] = createNamespace("address-list");
  4629. var addressListProps = {
  4630. list: makeArrayProp(),
  4631. modelValue: numericProp,
  4632. switchable: truthProp,
  4633. disabledText: String,
  4634. disabledList: makeArrayProp(),
  4635. addButtonText: String,
  4636. defaultTagText: String
  4637. };
  4638. var stdin_default29 = defineComponent({
  4639. name: name26,
  4640. props: addressListProps,
  4641. emits: ["add", "edit", "select", "click-item", "edit-disabled", "select-disabled", "update:modelValue"],
  4642. setup(props, {
  4643. slots,
  4644. emit
  4645. }) {
  4646. const renderItem = (item, index, disabled) => {
  4647. const onEdit = () => emit(disabled ? "edit-disabled" : "edit", item, index);
  4648. const onClick = () => emit("click-item", item, index);
  4649. const onSelect = () => {
  4650. emit(disabled ? "select-disabled" : "select", item, index);
  4651. if (!disabled) {
  4652. emit("update:modelValue", item.id);
  4653. }
  4654. };
  4655. return createVNode(stdin_default28, {
  4656. "key": item.id,
  4657. "address": item,
  4658. "disabled": disabled,
  4659. "switchable": props.switchable,
  4660. "defaultTagText": props.defaultTagText,
  4661. "onEdit": onEdit,
  4662. "onClick": onClick,
  4663. "onSelect": onSelect
  4664. }, {
  4665. bottom: slots["item-bottom"],
  4666. tag: slots.tag
  4667. });
  4668. };
  4669. const renderList = (list, disabled) => {
  4670. if (list) {
  4671. return list.map((item, index) => renderItem(item, index, disabled));
  4672. }
  4673. };
  4674. const renderBottom = () => createVNode("div", {
  4675. "class": [bem26("bottom"), "van-safe-area-bottom"]
  4676. }, [createVNode(Button, {
  4677. "round": true,
  4678. "block": true,
  4679. "type": "danger",
  4680. "text": props.addButtonText || t4("add"),
  4681. "class": bem26("add"),
  4682. "onClick": () => emit("add")
  4683. }, null)]);
  4684. return () => {
  4685. var _a, _b;
  4686. const List2 = renderList(props.list);
  4687. const DisabledList = renderList(props.disabledList, true);
  4688. const DisabledText = props.disabledText && createVNode("div", {
  4689. "class": bem26("disabled-text")
  4690. }, [props.disabledText]);
  4691. return createVNode("div", {
  4692. "class": bem26()
  4693. }, [(_a = slots.top) == null ? void 0 : _a.call(slots), createVNode(RadioGroup, {
  4694. "modelValue": props.modelValue
  4695. }, {
  4696. default: () => [List2]
  4697. }), DisabledText, DisabledList, (_b = slots.default) == null ? void 0 : _b.call(slots), renderBottom()]);
  4698. };
  4699. }
  4700. });
  4701. // node_modules/vant/es/address-list/index.mjs
  4702. var AddressList = withInstall(stdin_default29);
  4703. // node_modules/vant/es/calendar/utils.mjs
  4704. var [name27, bem27, t5] = createNamespace("calendar");
  4705. var formatMonthTitle = (date) => t5("monthTitle", date.getFullYear(), date.getMonth() + 1);
  4706. function compareMonth(date1, date2) {
  4707. const year1 = date1.getFullYear();
  4708. const year2 = date2.getFullYear();
  4709. if (year1 === year2) {
  4710. const month1 = date1.getMonth();
  4711. const month2 = date2.getMonth();
  4712. return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;
  4713. }
  4714. return year1 > year2 ? 1 : -1;
  4715. }
  4716. function compareDay(day1, day2) {
  4717. const compareMonthResult = compareMonth(day1, day2);
  4718. if (compareMonthResult === 0) {
  4719. const date1 = day1.getDate();
  4720. const date2 = day2.getDate();
  4721. return date1 === date2 ? 0 : date1 > date2 ? 1 : -1;
  4722. }
  4723. return compareMonthResult;
  4724. }
  4725. var cloneDate = (date) => new Date(date);
  4726. var cloneDates = (dates) => Array.isArray(dates) ? dates.map(cloneDate) : cloneDate(dates);
  4727. function getDayByOffset(date, offset2) {
  4728. const cloned = cloneDate(date);
  4729. cloned.setDate(cloned.getDate() + offset2);
  4730. return cloned;
  4731. }
  4732. var getPrevDay = (date) => getDayByOffset(date, -1);
  4733. var getNextDay = (date) => getDayByOffset(date, 1);
  4734. var getToday = () => {
  4735. const today = new Date();
  4736. today.setHours(0, 0, 0, 0);
  4737. return today;
  4738. };
  4739. function calcDateNum(date) {
  4740. const day1 = date[0].getTime();
  4741. const day2 = date[1].getTime();
  4742. return (day2 - day1) / (1e3 * 60 * 60 * 24) + 1;
  4743. }
  4744. // node_modules/vant/es/composables/use-refs.mjs
  4745. function useRefs() {
  4746. const refs = ref([]);
  4747. const cache = [];
  4748. onBeforeUpdate(() => {
  4749. refs.value = [];
  4750. });
  4751. const setRefs = (index) => {
  4752. if (!cache[index]) {
  4753. cache[index] = (el) => {
  4754. refs.value[index] = el;
  4755. };
  4756. }
  4757. return cache[index];
  4758. };
  4759. return [refs, setRefs];
  4760. }
  4761. // node_modules/vant/es/datetime-picker/utils.mjs
  4762. var sharedProps = extend({}, pickerSharedProps, {
  4763. filter: Function,
  4764. columnsOrder: Array,
  4765. formatter: {
  4766. type: Function,
  4767. default: (type, value) => value
  4768. }
  4769. });
  4770. var pickerInheritKeys = Object.keys(pickerSharedProps);
  4771. function times(n, iteratee) {
  4772. if (n < 0) {
  4773. return [];
  4774. }
  4775. const result = Array(n);
  4776. let index = -1;
  4777. while (++index < n) {
  4778. result[index] = iteratee(index);
  4779. }
  4780. return result;
  4781. }
  4782. function getTrueValue(value) {
  4783. if (!value) {
  4784. return 0;
  4785. }
  4786. while (Number.isNaN(parseInt(value, 10))) {
  4787. if (value.length > 1) {
  4788. value = value.slice(1);
  4789. } else {
  4790. return 0;
  4791. }
  4792. }
  4793. return parseInt(value, 10);
  4794. }
  4795. var getMonthEndDay = (year, month) => 32 - new Date(year, month - 1, 32).getDate();
  4796. var proxyPickerMethods = (picker, callback) => {
  4797. const methods = [
  4798. "setValues",
  4799. "setIndexes",
  4800. "setColumnIndex",
  4801. "setColumnValue"
  4802. ];
  4803. return new Proxy(picker, {
  4804. get: (target, prop) => {
  4805. if (methods.includes(prop)) {
  4806. return (...args) => {
  4807. target[prop](...args);
  4808. callback();
  4809. };
  4810. }
  4811. return target[prop];
  4812. }
  4813. });
  4814. };
  4815. // node_modules/vant/es/calendar/CalendarDay.mjs
  4816. var [name28] = createNamespace("calendar-day");
  4817. var stdin_default30 = defineComponent({
  4818. name: name28,
  4819. props: {
  4820. item: makeRequiredProp(Object),
  4821. color: String,
  4822. index: Number,
  4823. offset: makeNumberProp(0),
  4824. rowHeight: String
  4825. },
  4826. emits: ["click"],
  4827. setup(props, {
  4828. emit,
  4829. slots
  4830. }) {
  4831. const style = computed(() => {
  4832. var _a;
  4833. const {
  4834. item,
  4835. index,
  4836. color,
  4837. offset: offset2,
  4838. rowHeight
  4839. } = props;
  4840. const style2 = {
  4841. height: rowHeight
  4842. };
  4843. if (item.type === "placeholder") {
  4844. style2.width = "100%";
  4845. return style2;
  4846. }
  4847. if (index === 0) {
  4848. style2.marginLeft = `${100 * offset2 / 7}%`;
  4849. }
  4850. if (color) {
  4851. switch (item.type) {
  4852. case "end":
  4853. case "start":
  4854. case "start-end":
  4855. case "multiple-middle":
  4856. case "multiple-selected":
  4857. style2.background = color;
  4858. break;
  4859. case "middle":
  4860. style2.color = color;
  4861. break;
  4862. }
  4863. }
  4864. if (offset2 + (((_a = item.date) == null ? void 0 : _a.getDate()) || 1) > 28) {
  4865. style2.marginBottom = 0;
  4866. }
  4867. return style2;
  4868. });
  4869. const onClick = () => {
  4870. if (props.item.type !== "disabled") {
  4871. emit("click", props.item);
  4872. }
  4873. };
  4874. const renderTopInfo = () => {
  4875. const {
  4876. topInfo
  4877. } = props.item;
  4878. if (topInfo || slots["top-info"]) {
  4879. return createVNode("div", {
  4880. "class": bem27("top-info")
  4881. }, [slots["top-info"] ? slots["top-info"](props.item) : topInfo]);
  4882. }
  4883. };
  4884. const renderBottomInfo = () => {
  4885. const {
  4886. bottomInfo
  4887. } = props.item;
  4888. if (bottomInfo || slots["bottom-info"]) {
  4889. return createVNode("div", {
  4890. "class": bem27("bottom-info")
  4891. }, [slots["bottom-info"] ? slots["bottom-info"](props.item) : bottomInfo]);
  4892. }
  4893. };
  4894. const renderContent = () => {
  4895. const {
  4896. item,
  4897. color,
  4898. rowHeight
  4899. } = props;
  4900. const {
  4901. type,
  4902. text
  4903. } = item;
  4904. const Nodes = [renderTopInfo(), text, renderBottomInfo()];
  4905. if (type === "selected") {
  4906. return createVNode("div", {
  4907. "class": bem27("selected-day"),
  4908. "style": {
  4909. width: rowHeight,
  4910. height: rowHeight,
  4911. background: color
  4912. }
  4913. }, [Nodes]);
  4914. }
  4915. return Nodes;
  4916. };
  4917. return () => {
  4918. const {
  4919. type,
  4920. className
  4921. } = props.item;
  4922. if (type === "placeholder") {
  4923. return createVNode("div", {
  4924. "class": bem27("day"),
  4925. "style": style.value
  4926. }, null);
  4927. }
  4928. return createVNode("div", {
  4929. "role": "gridcell",
  4930. "style": style.value,
  4931. "class": [bem27("day", type), className],
  4932. "tabindex": type === "disabled" ? void 0 : -1,
  4933. "onClick": onClick
  4934. }, [renderContent()]);
  4935. };
  4936. }
  4937. });
  4938. // node_modules/vant/es/calendar/CalendarMonth.mjs
  4939. var [name29] = createNamespace("calendar-month");
  4940. var calendarMonthProps = {
  4941. date: makeRequiredProp(Date),
  4942. type: String,
  4943. color: String,
  4944. minDate: makeRequiredProp(Date),
  4945. maxDate: makeRequiredProp(Date),
  4946. showMark: Boolean,
  4947. rowHeight: numericProp,
  4948. formatter: Function,
  4949. lazyRender: Boolean,
  4950. currentDate: [Date, Array],
  4951. allowSameDay: Boolean,
  4952. showSubtitle: Boolean,
  4953. showMonthTitle: Boolean,
  4954. firstDayOfWeek: Number
  4955. };
  4956. var stdin_default31 = defineComponent({
  4957. name: name29,
  4958. props: calendarMonthProps,
  4959. emits: ["click", "update-height"],
  4960. setup(props, {
  4961. emit,
  4962. slots
  4963. }) {
  4964. const [visible, setVisible] = useToggle();
  4965. const daysRef = ref();
  4966. const monthRef = ref();
  4967. const height2 = useHeight(monthRef);
  4968. const title = computed(() => formatMonthTitle(props.date));
  4969. const rowHeight = computed(() => addUnit(props.rowHeight));
  4970. const offset2 = computed(() => {
  4971. const realDay = props.date.getDay();
  4972. if (props.firstDayOfWeek) {
  4973. return (realDay + 7 - props.firstDayOfWeek) % 7;
  4974. }
  4975. return realDay;
  4976. });
  4977. const totalDay = computed(() => getMonthEndDay(props.date.getFullYear(), props.date.getMonth() + 1));
  4978. const shouldRender = computed(() => visible.value || !props.lazyRender);
  4979. const getTitle = () => title.value;
  4980. const getMultipleDayType = (day) => {
  4981. const isSelected = (date) => props.currentDate.some((item) => compareDay(item, date) === 0);
  4982. if (isSelected(day)) {
  4983. const prevDay = getPrevDay(day);
  4984. const nextDay = getNextDay(day);
  4985. const prevSelected = isSelected(prevDay);
  4986. const nextSelected = isSelected(nextDay);
  4987. if (prevSelected && nextSelected) {
  4988. return "multiple-middle";
  4989. }
  4990. if (prevSelected) {
  4991. return "end";
  4992. }
  4993. if (nextSelected) {
  4994. return "start";
  4995. }
  4996. return "multiple-selected";
  4997. }
  4998. return "";
  4999. };
  5000. const getRangeDayType = (day) => {
  5001. const [startDay, endDay] = props.currentDate;
  5002. if (!startDay) {
  5003. return "";
  5004. }
  5005. const compareToStart = compareDay(day, startDay);
  5006. if (!endDay) {
  5007. return compareToStart === 0 ? "start" : "";
  5008. }
  5009. const compareToEnd = compareDay(day, endDay);
  5010. if (props.allowSameDay && compareToStart === 0 && compareToEnd === 0) {
  5011. return "start-end";
  5012. }
  5013. if (compareToStart === 0) {
  5014. return "start";
  5015. }
  5016. if (compareToEnd === 0) {
  5017. return "end";
  5018. }
  5019. if (compareToStart > 0 && compareToEnd < 0) {
  5020. return "middle";
  5021. }
  5022. return "";
  5023. };
  5024. const getDayType = (day) => {
  5025. const {
  5026. type,
  5027. minDate,
  5028. maxDate,
  5029. currentDate
  5030. } = props;
  5031. if (compareDay(day, minDate) < 0 || compareDay(day, maxDate) > 0) {
  5032. return "disabled";
  5033. }
  5034. if (currentDate === null) {
  5035. return "";
  5036. }
  5037. if (Array.isArray(currentDate)) {
  5038. if (type === "multiple") {
  5039. return getMultipleDayType(day);
  5040. }
  5041. if (type === "range") {
  5042. return getRangeDayType(day);
  5043. }
  5044. } else if (type === "single") {
  5045. return compareDay(day, currentDate) === 0 ? "selected" : "";
  5046. }
  5047. return "";
  5048. };
  5049. const getBottomInfo = (dayType) => {
  5050. if (props.type === "range") {
  5051. if (dayType === "start" || dayType === "end") {
  5052. return t5(dayType);
  5053. }
  5054. if (dayType === "start-end") {
  5055. return `${t5("start")}/${t5("end")}`;
  5056. }
  5057. }
  5058. };
  5059. const renderTitle = () => {
  5060. if (props.showMonthTitle) {
  5061. return createVNode("div", {
  5062. "class": bem27("month-title")
  5063. }, [title.value]);
  5064. }
  5065. };
  5066. const renderMark = () => {
  5067. if (props.showMark && shouldRender.value) {
  5068. return createVNode("div", {
  5069. "class": bem27("month-mark")
  5070. }, [props.date.getMonth() + 1]);
  5071. }
  5072. };
  5073. const placeholders = computed(() => {
  5074. const count = Math.ceil((totalDay.value + offset2.value) / 7);
  5075. return Array(count).fill({
  5076. type: "placeholder"
  5077. });
  5078. });
  5079. const days = computed(() => {
  5080. const days2 = [];
  5081. const year = props.date.getFullYear();
  5082. const month = props.date.getMonth();
  5083. for (let day = 1; day <= totalDay.value; day++) {
  5084. const date = new Date(year, month, day);
  5085. const type = getDayType(date);
  5086. let config = {
  5087. date,
  5088. type,
  5089. text: day,
  5090. bottomInfo: getBottomInfo(type)
  5091. };
  5092. if (props.formatter) {
  5093. config = props.formatter(config);
  5094. }
  5095. days2.push(config);
  5096. }
  5097. return days2;
  5098. });
  5099. const disabledDays = computed(() => days.value.filter((day) => day.type === "disabled"));
  5100. const scrollToDate = (body, targetDate) => {
  5101. if (daysRef.value) {
  5102. const daysRect = useRect(daysRef.value);
  5103. const totalRows = placeholders.value.length;
  5104. const currentRow = Math.ceil((targetDate.getDate() + offset2.value) / 7);
  5105. const rowOffset = (currentRow - 1) * daysRect.height / totalRows;
  5106. setScrollTop(body, daysRect.top + rowOffset + body.scrollTop - useRect(body).top);
  5107. }
  5108. };
  5109. const renderDay = (item, index) => createVNode(stdin_default30, {
  5110. "item": item,
  5111. "index": index,
  5112. "color": props.color,
  5113. "offset": offset2.value,
  5114. "rowHeight": rowHeight.value,
  5115. "onClick": (item2) => emit("click", item2)
  5116. }, pick(slots, ["top-info", "bottom-info"]));
  5117. const renderDays = () => createVNode("div", {
  5118. "ref": daysRef,
  5119. "role": "grid",
  5120. "class": bem27("days")
  5121. }, [renderMark(), (shouldRender.value ? days : placeholders).value.map(renderDay)]);
  5122. useExpose({
  5123. getTitle,
  5124. getHeight: () => height2.value,
  5125. setVisible,
  5126. scrollToDate,
  5127. disabledDays
  5128. });
  5129. return () => createVNode("div", {
  5130. "class": bem27("month"),
  5131. "ref": monthRef
  5132. }, [renderTitle(), renderDays()]);
  5133. }
  5134. });
  5135. // node_modules/vant/es/calendar/CalendarHeader.mjs
  5136. var [name30] = createNamespace("calendar-header");
  5137. var stdin_default32 = defineComponent({
  5138. name: name30,
  5139. props: {
  5140. title: String,
  5141. subtitle: String,
  5142. showTitle: Boolean,
  5143. showSubtitle: Boolean,
  5144. firstDayOfWeek: Number
  5145. },
  5146. emits: ["click-subtitle"],
  5147. setup(props, {
  5148. slots,
  5149. emit
  5150. }) {
  5151. const renderTitle = () => {
  5152. if (props.showTitle) {
  5153. const text = props.title || t5("title");
  5154. const title = slots.title ? slots.title() : text;
  5155. return createVNode("div", {
  5156. "class": bem27("header-title")
  5157. }, [title]);
  5158. }
  5159. };
  5160. const onClickSubtitle = (event) => emit("click-subtitle", event);
  5161. const renderSubtitle = () => {
  5162. if (props.showSubtitle) {
  5163. const title = slots.subtitle ? slots.subtitle() : props.subtitle;
  5164. return createVNode("div", {
  5165. "class": bem27("header-subtitle"),
  5166. "onClick": onClickSubtitle
  5167. }, [title]);
  5168. }
  5169. };
  5170. const renderWeekDays = () => {
  5171. const {
  5172. firstDayOfWeek
  5173. } = props;
  5174. const weekdays = t5("weekdays");
  5175. const renderWeekDays2 = [...weekdays.slice(firstDayOfWeek, 7), ...weekdays.slice(0, firstDayOfWeek)];
  5176. return createVNode("div", {
  5177. "class": bem27("weekdays")
  5178. }, [renderWeekDays2.map((text) => createVNode("span", {
  5179. "class": bem27("weekday")
  5180. }, [text]))]);
  5181. };
  5182. return () => createVNode("div", {
  5183. "class": bem27("header")
  5184. }, [renderTitle(), renderSubtitle(), renderWeekDays()]);
  5185. }
  5186. });
  5187. // node_modules/vant/es/calendar/Calendar.mjs
  5188. var calendarProps = {
  5189. show: Boolean,
  5190. type: makeStringProp("single"),
  5191. title: String,
  5192. color: String,
  5193. round: truthProp,
  5194. readonly: Boolean,
  5195. poppable: truthProp,
  5196. maxRange: makeNumericProp(null),
  5197. position: makeStringProp("bottom"),
  5198. teleport: [String, Object],
  5199. showMark: truthProp,
  5200. showTitle: truthProp,
  5201. formatter: Function,
  5202. rowHeight: numericProp,
  5203. confirmText: String,
  5204. rangePrompt: String,
  5205. lazyRender: truthProp,
  5206. showConfirm: truthProp,
  5207. defaultDate: [Date, Array],
  5208. allowSameDay: Boolean,
  5209. showSubtitle: truthProp,
  5210. closeOnPopstate: truthProp,
  5211. showRangePrompt: truthProp,
  5212. confirmDisabledText: String,
  5213. closeOnClickOverlay: truthProp,
  5214. safeAreaInsetTop: Boolean,
  5215. safeAreaInsetBottom: truthProp,
  5216. minDate: {
  5217. type: Date,
  5218. validator: isDate,
  5219. default: getToday
  5220. },
  5221. maxDate: {
  5222. type: Date,
  5223. validator: isDate,
  5224. default: () => {
  5225. const now = getToday();
  5226. return new Date(now.getFullYear(), now.getMonth() + 6, now.getDate());
  5227. }
  5228. },
  5229. firstDayOfWeek: {
  5230. type: numericProp,
  5231. default: 0,
  5232. validator: (val) => val >= 0 && val <= 6
  5233. }
  5234. };
  5235. var stdin_default33 = defineComponent({
  5236. name: name27,
  5237. props: calendarProps,
  5238. emits: ["select", "confirm", "unselect", "month-show", "over-range", "update:show", "click-subtitle"],
  5239. setup(props, {
  5240. emit,
  5241. slots
  5242. }) {
  5243. const limitDateRange = (date, minDate = props.minDate, maxDate = props.maxDate) => {
  5244. if (compareDay(date, minDate) === -1) {
  5245. return minDate;
  5246. }
  5247. if (compareDay(date, maxDate) === 1) {
  5248. return maxDate;
  5249. }
  5250. return date;
  5251. };
  5252. const getInitialDate = (defaultDate = props.defaultDate) => {
  5253. const {
  5254. type,
  5255. minDate,
  5256. maxDate,
  5257. allowSameDay
  5258. } = props;
  5259. if (defaultDate === null) {
  5260. return defaultDate;
  5261. }
  5262. const now = getToday();
  5263. if (type === "range") {
  5264. if (!Array.isArray(defaultDate)) {
  5265. defaultDate = [];
  5266. }
  5267. const start2 = limitDateRange(defaultDate[0] || now, minDate, allowSameDay ? maxDate : getPrevDay(maxDate));
  5268. const end2 = limitDateRange(defaultDate[1] || now, allowSameDay ? minDate : getNextDay(minDate));
  5269. return [start2, end2];
  5270. }
  5271. if (type === "multiple") {
  5272. if (Array.isArray(defaultDate)) {
  5273. return defaultDate.map((date) => limitDateRange(date));
  5274. }
  5275. return [limitDateRange(now)];
  5276. }
  5277. if (!defaultDate || Array.isArray(defaultDate)) {
  5278. defaultDate = now;
  5279. }
  5280. return limitDateRange(defaultDate);
  5281. };
  5282. let bodyHeight;
  5283. const bodyRef = ref();
  5284. const subtitle = ref("");
  5285. const currentDate = ref(getInitialDate());
  5286. const [monthRefs, setMonthRefs] = useRefs();
  5287. const dayOffset = computed(() => props.firstDayOfWeek ? +props.firstDayOfWeek % 7 : 0);
  5288. const months = computed(() => {
  5289. const months2 = [];
  5290. const cursor = new Date(props.minDate);
  5291. cursor.setDate(1);
  5292. do {
  5293. months2.push(new Date(cursor));
  5294. cursor.setMonth(cursor.getMonth() + 1);
  5295. } while (compareMonth(cursor, props.maxDate) !== 1);
  5296. return months2;
  5297. });
  5298. const buttonDisabled = computed(() => {
  5299. if (currentDate.value) {
  5300. if (props.type === "range") {
  5301. return !currentDate.value[0] || !currentDate.value[1];
  5302. }
  5303. if (props.type === "multiple") {
  5304. return !currentDate.value.length;
  5305. }
  5306. }
  5307. return !currentDate.value;
  5308. });
  5309. const getSelectedDate = () => currentDate.value;
  5310. const onScroll = () => {
  5311. const top2 = getScrollTop(bodyRef.value);
  5312. const bottom2 = top2 + bodyHeight;
  5313. const heights = months.value.map((item, index) => monthRefs.value[index].getHeight());
  5314. const heightSum = heights.reduce((a, b) => a + b, 0);
  5315. if (bottom2 > heightSum && top2 > 0) {
  5316. return;
  5317. }
  5318. let height2 = 0;
  5319. let currentMonth;
  5320. const visibleRange = [-1, -1];
  5321. for (let i = 0; i < months.value.length; i++) {
  5322. const month = monthRefs.value[i];
  5323. const visible = height2 <= bottom2 && height2 + heights[i] >= top2;
  5324. if (visible) {
  5325. visibleRange[1] = i;
  5326. if (!currentMonth) {
  5327. currentMonth = month;
  5328. visibleRange[0] = i;
  5329. }
  5330. if (!monthRefs.value[i].showed) {
  5331. monthRefs.value[i].showed = true;
  5332. emit("month-show", {
  5333. date: month.date,
  5334. title: month.getTitle()
  5335. });
  5336. }
  5337. }
  5338. height2 += heights[i];
  5339. }
  5340. months.value.forEach((month, index) => {
  5341. const visible = index >= visibleRange[0] - 1 && index <= visibleRange[1] + 1;
  5342. monthRefs.value[index].setVisible(visible);
  5343. });
  5344. if (currentMonth) {
  5345. subtitle.value = currentMonth.getTitle();
  5346. }
  5347. };
  5348. const scrollToDate = (targetDate) => {
  5349. raf(() => {
  5350. months.value.some((month, index) => {
  5351. if (compareMonth(month, targetDate) === 0) {
  5352. if (bodyRef.value) {
  5353. monthRefs.value[index].scrollToDate(bodyRef.value, targetDate);
  5354. }
  5355. return true;
  5356. }
  5357. return false;
  5358. });
  5359. onScroll();
  5360. });
  5361. };
  5362. const scrollToCurrentDate = () => {
  5363. if (props.poppable && !props.show) {
  5364. return;
  5365. }
  5366. if (currentDate.value) {
  5367. const targetDate = props.type === "single" ? currentDate.value : currentDate.value[0];
  5368. if (isDate(targetDate)) {
  5369. scrollToDate(targetDate);
  5370. }
  5371. } else {
  5372. raf(onScroll);
  5373. }
  5374. };
  5375. const init = () => {
  5376. if (props.poppable && !props.show) {
  5377. return;
  5378. }
  5379. raf(() => {
  5380. bodyHeight = Math.floor(useRect(bodyRef).height);
  5381. });
  5382. scrollToCurrentDate();
  5383. };
  5384. const reset = (date = getInitialDate()) => {
  5385. currentDate.value = date;
  5386. scrollToCurrentDate();
  5387. };
  5388. const checkRange = (date) => {
  5389. const {
  5390. maxRange,
  5391. rangePrompt,
  5392. showRangePrompt
  5393. } = props;
  5394. if (maxRange && calcDateNum(date) > maxRange) {
  5395. if (showRangePrompt) {
  5396. Toast(rangePrompt || t5("rangePrompt", maxRange));
  5397. }
  5398. emit("over-range");
  5399. return false;
  5400. }
  5401. return true;
  5402. };
  5403. const onConfirm = () => {
  5404. var _a;
  5405. return emit("confirm", (_a = currentDate.value) != null ? _a : cloneDates(currentDate.value));
  5406. };
  5407. const select = (date, complete) => {
  5408. const setCurrentDate = (date2) => {
  5409. currentDate.value = date2;
  5410. emit("select", cloneDates(date2));
  5411. };
  5412. if (complete && props.type === "range") {
  5413. const valid = checkRange(date);
  5414. if (!valid) {
  5415. setCurrentDate([date[0], getDayByOffset(date[0], +props.maxRange - 1)]);
  5416. return;
  5417. }
  5418. }
  5419. setCurrentDate(date);
  5420. if (complete && !props.showConfirm) {
  5421. onConfirm();
  5422. }
  5423. };
  5424. const getDisabledDate = (disabledDays2, startDay, date) => {
  5425. var _a;
  5426. return (_a = disabledDays2.find((day) => compareDay(startDay, day.date) === -1 && compareDay(day.date, date) === -1)) == null ? void 0 : _a.date;
  5427. };
  5428. const disabledDays = computed(() => monthRefs.value.reduce((arr, ref2) => {
  5429. var _a, _b;
  5430. arr.push(...(_b = (_a = ref2.disabledDays) == null ? void 0 : _a.value) != null ? _b : []);
  5431. return arr;
  5432. }, []));
  5433. const onClickDay = (item) => {
  5434. if (props.readonly || !item.date) {
  5435. return;
  5436. }
  5437. const {
  5438. date
  5439. } = item;
  5440. const {
  5441. type
  5442. } = props;
  5443. if (type === "range") {
  5444. if (!currentDate.value) {
  5445. select([date]);
  5446. return;
  5447. }
  5448. const [startDay, endDay] = currentDate.value;
  5449. if (startDay && !endDay) {
  5450. const compareToStart = compareDay(date, startDay);
  5451. if (compareToStart === 1) {
  5452. const disabledDay = getDisabledDate(disabledDays.value, startDay, date);
  5453. if (disabledDay) {
  5454. const endDay2 = getPrevDay(disabledDay);
  5455. if (compareDay(startDay, endDay2) === -1) {
  5456. select([startDay, endDay2]);
  5457. } else {
  5458. select([date]);
  5459. }
  5460. } else {
  5461. select([startDay, date], true);
  5462. }
  5463. } else if (compareToStart === -1) {
  5464. select([date]);
  5465. } else if (props.allowSameDay) {
  5466. select([date, date], true);
  5467. }
  5468. } else {
  5469. select([date]);
  5470. }
  5471. } else if (type === "multiple") {
  5472. if (!currentDate.value) {
  5473. select([date]);
  5474. return;
  5475. }
  5476. const dates = currentDate.value;
  5477. const selectedIndex = dates.findIndex((dateItem) => compareDay(dateItem, date) === 0);
  5478. if (selectedIndex !== -1) {
  5479. const [unselectedDate] = dates.splice(selectedIndex, 1);
  5480. emit("unselect", cloneDate(unselectedDate));
  5481. } else if (props.maxRange && dates.length >= props.maxRange) {
  5482. Toast(props.rangePrompt || t5("rangePrompt", props.maxRange));
  5483. } else {
  5484. select([...dates, date]);
  5485. }
  5486. } else {
  5487. select(date, true);
  5488. }
  5489. };
  5490. const updateShow = (value) => emit("update:show", value);
  5491. const renderMonth = (date, index) => {
  5492. const showMonthTitle = index !== 0 || !props.showSubtitle;
  5493. return createVNode(stdin_default31, mergeProps({
  5494. "ref": setMonthRefs(index),
  5495. "date": date,
  5496. "currentDate": currentDate.value,
  5497. "showMonthTitle": showMonthTitle,
  5498. "firstDayOfWeek": dayOffset.value
  5499. }, pick(props, ["type", "color", "minDate", "maxDate", "showMark", "formatter", "rowHeight", "lazyRender", "showSubtitle", "allowSameDay"]), {
  5500. "onClick": onClickDay
  5501. }), pick(slots, ["top-info", "bottom-info"]));
  5502. };
  5503. const renderFooterButton = () => {
  5504. if (slots.footer) {
  5505. return slots.footer();
  5506. }
  5507. if (props.showConfirm) {
  5508. const slot = slots["confirm-text"];
  5509. const disabled = buttonDisabled.value;
  5510. const text = disabled ? props.confirmDisabledText : props.confirmText;
  5511. return createVNode(Button, {
  5512. "round": true,
  5513. "block": true,
  5514. "type": "danger",
  5515. "color": props.color,
  5516. "class": bem27("confirm"),
  5517. "disabled": disabled,
  5518. "nativeType": "button",
  5519. "onClick": onConfirm
  5520. }, {
  5521. default: () => [slot ? slot({
  5522. disabled
  5523. }) : text || t5("confirm")]
  5524. });
  5525. }
  5526. };
  5527. const renderFooter = () => createVNode("div", {
  5528. "class": [bem27("footer"), {
  5529. "van-safe-area-bottom": props.safeAreaInsetBottom
  5530. }]
  5531. }, [renderFooterButton()]);
  5532. const renderCalendar = () => createVNode("div", {
  5533. "class": bem27()
  5534. }, [createVNode(stdin_default32, {
  5535. "title": props.title,
  5536. "subtitle": subtitle.value,
  5537. "showTitle": props.showTitle,
  5538. "showSubtitle": props.showSubtitle,
  5539. "firstDayOfWeek": dayOffset.value,
  5540. "onClick-subtitle": (event) => emit("click-subtitle", event)
  5541. }, pick(slots, ["title", "subtitle"])), createVNode("div", {
  5542. "ref": bodyRef,
  5543. "class": bem27("body"),
  5544. "onScroll": onScroll
  5545. }, [months.value.map(renderMonth)]), renderFooter()]);
  5546. watch(() => props.show, init);
  5547. watch(() => [props.type, props.minDate, props.maxDate], () => reset(getInitialDate(currentDate.value)));
  5548. watch(() => props.defaultDate, (value = null) => {
  5549. currentDate.value = value;
  5550. scrollToCurrentDate();
  5551. });
  5552. useExpose({
  5553. reset,
  5554. scrollToDate,
  5555. getSelectedDate
  5556. });
  5557. onMountedOrActivated(init);
  5558. return () => {
  5559. if (props.poppable) {
  5560. return createVNode(Popup, {
  5561. "show": props.show,
  5562. "class": bem27("popup"),
  5563. "round": props.round,
  5564. "position": props.position,
  5565. "closeable": props.showTitle || props.showSubtitle,
  5566. "teleport": props.teleport,
  5567. "closeOnPopstate": props.closeOnPopstate,
  5568. "safeAreaInsetTop": props.safeAreaInsetTop,
  5569. "closeOnClickOverlay": props.closeOnClickOverlay,
  5570. "onUpdate:show": updateShow
  5571. }, {
  5572. default: renderCalendar
  5573. });
  5574. }
  5575. return renderCalendar();
  5576. };
  5577. }
  5578. });
  5579. // node_modules/vant/es/calendar/index.mjs
  5580. var Calendar = withInstall(stdin_default33);
  5581. // node_modules/vant/es/image/Image.mjs
  5582. var [name31, bem28] = createNamespace("image");
  5583. var imageProps = {
  5584. src: String,
  5585. alt: String,
  5586. fit: String,
  5587. position: String,
  5588. round: Boolean,
  5589. block: Boolean,
  5590. width: numericProp,
  5591. height: numericProp,
  5592. radius: numericProp,
  5593. lazyLoad: Boolean,
  5594. iconSize: numericProp,
  5595. showError: truthProp,
  5596. errorIcon: makeStringProp("photo-fail"),
  5597. iconPrefix: String,
  5598. showLoading: truthProp,
  5599. loadingIcon: makeStringProp("photo")
  5600. };
  5601. var stdin_default34 = defineComponent({
  5602. name: name31,
  5603. props: imageProps,
  5604. emits: ["load", "error"],
  5605. setup(props, {
  5606. emit,
  5607. slots
  5608. }) {
  5609. const error = ref(false);
  5610. const loading = ref(true);
  5611. const imageRef = ref();
  5612. const {
  5613. $Lazyload
  5614. } = getCurrentInstance().proxy;
  5615. const style = computed(() => {
  5616. const style2 = {
  5617. width: addUnit(props.width),
  5618. height: addUnit(props.height)
  5619. };
  5620. if (isDef(props.radius)) {
  5621. style2.overflow = "hidden";
  5622. style2.borderRadius = addUnit(props.radius);
  5623. }
  5624. return style2;
  5625. });
  5626. watch(() => props.src, () => {
  5627. error.value = false;
  5628. loading.value = true;
  5629. });
  5630. const onLoad = (event) => {
  5631. loading.value = false;
  5632. emit("load", event);
  5633. };
  5634. const onError = (event) => {
  5635. error.value = true;
  5636. loading.value = false;
  5637. emit("error", event);
  5638. };
  5639. const renderIcon = (name210, className, slot) => {
  5640. if (slot) {
  5641. return slot();
  5642. }
  5643. return createVNode(Icon, {
  5644. "name": name210,
  5645. "size": props.iconSize,
  5646. "class": className,
  5647. "classPrefix": props.iconPrefix
  5648. }, null);
  5649. };
  5650. const renderPlaceholder = () => {
  5651. if (loading.value && props.showLoading) {
  5652. return createVNode("div", {
  5653. "class": bem28("loading")
  5654. }, [renderIcon(props.loadingIcon, bem28("loading-icon"), slots.loading)]);
  5655. }
  5656. if (error.value && props.showError) {
  5657. return createVNode("div", {
  5658. "class": bem28("error")
  5659. }, [renderIcon(props.errorIcon, bem28("error-icon"), slots.error)]);
  5660. }
  5661. };
  5662. const renderImage = () => {
  5663. if (error.value || !props.src) {
  5664. return;
  5665. }
  5666. const attrs = {
  5667. alt: props.alt,
  5668. class: bem28("img"),
  5669. style: {
  5670. objectFit: props.fit,
  5671. objectPosition: props.position
  5672. }
  5673. };
  5674. if (props.lazyLoad) {
  5675. return withDirectives(createVNode("img", mergeProps({
  5676. "ref": imageRef
  5677. }, attrs), null), [[resolveDirective("lazy"), props.src]]);
  5678. }
  5679. return createVNode("img", mergeProps({
  5680. "src": props.src,
  5681. "onLoad": onLoad,
  5682. "onError": onError
  5683. }, attrs), null);
  5684. };
  5685. const onLazyLoaded = ({
  5686. el
  5687. }) => {
  5688. const check = () => {
  5689. if (el === imageRef.value && loading.value) {
  5690. onLoad();
  5691. }
  5692. };
  5693. if (imageRef.value) {
  5694. check();
  5695. } else {
  5696. nextTick(check);
  5697. }
  5698. };
  5699. const onLazyLoadError = ({
  5700. el
  5701. }) => {
  5702. if (el === imageRef.value && !error.value) {
  5703. onError();
  5704. }
  5705. };
  5706. if ($Lazyload && inBrowser) {
  5707. $Lazyload.$on("loaded", onLazyLoaded);
  5708. $Lazyload.$on("error", onLazyLoadError);
  5709. onBeforeUnmount(() => {
  5710. $Lazyload.$off("loaded", onLazyLoaded);
  5711. $Lazyload.$off("error", onLazyLoadError);
  5712. });
  5713. }
  5714. return () => {
  5715. var _a;
  5716. return createVNode("div", {
  5717. "class": bem28({
  5718. round: props.round,
  5719. block: props.block
  5720. }),
  5721. "style": style.value
  5722. }, [renderImage(), renderPlaceholder(), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
  5723. };
  5724. }
  5725. });
  5726. // node_modules/vant/es/image/index.mjs
  5727. var Image2 = withInstall(stdin_default34);
  5728. // node_modules/vant/es/card/Card.mjs
  5729. var [name32, bem29] = createNamespace("card");
  5730. var cardProps = {
  5731. tag: String,
  5732. num: numericProp,
  5733. desc: String,
  5734. thumb: String,
  5735. title: String,
  5736. price: numericProp,
  5737. centered: Boolean,
  5738. lazyLoad: Boolean,
  5739. currency: makeStringProp("\xA5"),
  5740. thumbLink: String,
  5741. originPrice: numericProp
  5742. };
  5743. var stdin_default35 = defineComponent({
  5744. name: name32,
  5745. props: cardProps,
  5746. emits: ["click-thumb"],
  5747. setup(props, {
  5748. slots,
  5749. emit
  5750. }) {
  5751. const renderTitle = () => {
  5752. if (slots.title) {
  5753. return slots.title();
  5754. }
  5755. if (props.title) {
  5756. return createVNode("div", {
  5757. "class": [bem29("title"), "van-multi-ellipsis--l2"]
  5758. }, [props.title]);
  5759. }
  5760. };
  5761. const renderThumbTag = () => {
  5762. if (slots.tag || props.tag) {
  5763. return createVNode("div", {
  5764. "class": bem29("tag")
  5765. }, [slots.tag ? slots.tag() : createVNode(Tag, {
  5766. "mark": true,
  5767. "type": "danger"
  5768. }, {
  5769. default: () => [props.tag]
  5770. })]);
  5771. }
  5772. };
  5773. const renderThumbImage = () => {
  5774. if (slots.thumb) {
  5775. return slots.thumb();
  5776. }
  5777. return createVNode(Image2, {
  5778. "src": props.thumb,
  5779. "fit": "cover",
  5780. "width": "100%",
  5781. "height": "100%",
  5782. "lazyLoad": props.lazyLoad
  5783. }, null);
  5784. };
  5785. const renderThumb = () => {
  5786. if (slots.thumb || props.thumb) {
  5787. return createVNode("a", {
  5788. "href": props.thumbLink,
  5789. "class": bem29("thumb"),
  5790. "onClick": (event) => emit("click-thumb", event)
  5791. }, [renderThumbImage(), renderThumbTag()]);
  5792. }
  5793. };
  5794. const renderDesc = () => {
  5795. if (slots.desc) {
  5796. return slots.desc();
  5797. }
  5798. if (props.desc) {
  5799. return createVNode("div", {
  5800. "class": [bem29("desc"), "van-ellipsis"]
  5801. }, [props.desc]);
  5802. }
  5803. };
  5804. const renderPriceText = () => {
  5805. const priceArr = props.price.toString().split(".");
  5806. return createVNode("div", null, [createVNode("span", {
  5807. "class": bem29("price-currency")
  5808. }, [props.currency]), createVNode("span", {
  5809. "class": bem29("price-integer")
  5810. }, [priceArr[0]]), createTextVNode("."), createVNode("span", {
  5811. "class": bem29("price-decimal")
  5812. }, [priceArr[1]])]);
  5813. };
  5814. return () => {
  5815. var _a, _b, _c;
  5816. const showNum = slots.num || isDef(props.num);
  5817. const showPrice = slots.price || isDef(props.price);
  5818. const showOriginPrice = slots["origin-price"] || isDef(props.originPrice);
  5819. const showBottom = showNum || showPrice || showOriginPrice || slots.bottom;
  5820. const Price = showPrice && createVNode("div", {
  5821. "class": bem29("price")
  5822. }, [slots.price ? slots.price() : renderPriceText()]);
  5823. const OriginPrice = showOriginPrice && createVNode("div", {
  5824. "class": bem29("origin-price")
  5825. }, [slots["origin-price"] ? slots["origin-price"]() : `${props.currency} ${props.originPrice}`]);
  5826. const Num = showNum && createVNode("div", {
  5827. "class": bem29("num")
  5828. }, [slots.num ? slots.num() : `x${props.num}`]);
  5829. const Footer = slots.footer && createVNode("div", {
  5830. "class": bem29("footer")
  5831. }, [slots.footer()]);
  5832. const Bottom = showBottom && createVNode("div", {
  5833. "class": bem29("bottom")
  5834. }, [(_a = slots["price-top"]) == null ? void 0 : _a.call(slots), Price, OriginPrice, Num, (_b = slots.bottom) == null ? void 0 : _b.call(slots)]);
  5835. return createVNode("div", {
  5836. "class": bem29()
  5837. }, [createVNode("div", {
  5838. "class": bem29("header")
  5839. }, [renderThumb(), createVNode("div", {
  5840. "class": bem29("content", {
  5841. centered: props.centered
  5842. })
  5843. }, [createVNode("div", null, [renderTitle(), renderDesc(), (_c = slots.tags) == null ? void 0 : _c.call(slots)]), Bottom])]), Footer]);
  5844. };
  5845. }
  5846. });
  5847. // node_modules/vant/es/card/index.mjs
  5848. var Card = withInstall(stdin_default35);
  5849. // node_modules/vant/es/composables/use-visibility-change.mjs
  5850. function useVisibilityChange(target, onChange) {
  5851. if (!inBrowser || !window.IntersectionObserver) {
  5852. return;
  5853. }
  5854. const observer = new IntersectionObserver((entries) => {
  5855. onChange(entries[0].intersectionRatio > 0);
  5856. }, { root: document.body });
  5857. const observe = () => {
  5858. if (target.value) {
  5859. observer.observe(target.value);
  5860. }
  5861. };
  5862. const unobserve = () => {
  5863. if (target.value) {
  5864. observer.unobserve(target.value);
  5865. }
  5866. };
  5867. onDeactivated(unobserve);
  5868. onBeforeUnmount(unobserve);
  5869. onMountedOrActivated(observe);
  5870. }
  5871. // node_modules/vant/es/sticky/Sticky.mjs
  5872. var [name33, bem30] = createNamespace("sticky");
  5873. var stickyProps = {
  5874. zIndex: numericProp,
  5875. position: makeStringProp("top"),
  5876. container: Object,
  5877. offsetTop: makeNumericProp(0),
  5878. offsetBottom: makeNumericProp(0)
  5879. };
  5880. var stdin_default36 = defineComponent({
  5881. name: name33,
  5882. props: stickyProps,
  5883. emits: ["scroll", "change"],
  5884. setup(props, {
  5885. emit,
  5886. slots
  5887. }) {
  5888. const root = ref();
  5889. const scrollParent = useScrollParent(root);
  5890. const state = reactive({
  5891. fixed: false,
  5892. width: 0,
  5893. height: 0,
  5894. transform: 0
  5895. });
  5896. const offset2 = computed(() => unitToPx(props.position === "top" ? props.offsetTop : props.offsetBottom));
  5897. const rootStyle = computed(() => {
  5898. const {
  5899. fixed,
  5900. height: height2,
  5901. width: width2
  5902. } = state;
  5903. if (fixed) {
  5904. return {
  5905. width: `${width2}px`,
  5906. height: `${height2}px`
  5907. };
  5908. }
  5909. });
  5910. const stickyStyle = computed(() => {
  5911. if (!state.fixed) {
  5912. return;
  5913. }
  5914. const style = extend(getZIndexStyle(props.zIndex), {
  5915. width: `${state.width}px`,
  5916. height: `${state.height}px`,
  5917. [props.position]: `${offset2.value}px`
  5918. });
  5919. if (state.transform) {
  5920. style.transform = `translate3d(0, ${state.transform}px, 0)`;
  5921. }
  5922. return style;
  5923. });
  5924. const emitScroll = (scrollTop) => emit("scroll", {
  5925. scrollTop,
  5926. isFixed: state.fixed
  5927. });
  5928. const onScroll = () => {
  5929. if (!root.value || isHidden(root)) {
  5930. return;
  5931. }
  5932. const {
  5933. container,
  5934. position
  5935. } = props;
  5936. const rootRect = useRect(root);
  5937. const scrollTop = getScrollTop(window);
  5938. state.width = rootRect.width;
  5939. state.height = rootRect.height;
  5940. if (position === "top") {
  5941. if (container) {
  5942. const containerRect = useRect(container);
  5943. const difference = containerRect.bottom - offset2.value - state.height;
  5944. state.fixed = offset2.value > rootRect.top && containerRect.bottom > 0;
  5945. state.transform = difference < 0 ? difference : 0;
  5946. } else {
  5947. state.fixed = offset2.value > rootRect.top;
  5948. }
  5949. } else {
  5950. const {
  5951. clientHeight
  5952. } = document.documentElement;
  5953. if (container) {
  5954. const containerRect = useRect(container);
  5955. const difference = clientHeight - containerRect.top - offset2.value - state.height;
  5956. state.fixed = clientHeight - offset2.value < rootRect.bottom && clientHeight > containerRect.top;
  5957. state.transform = difference < 0 ? -difference : 0;
  5958. } else {
  5959. state.fixed = clientHeight - offset2.value < rootRect.bottom;
  5960. }
  5961. }
  5962. emitScroll(scrollTop);
  5963. };
  5964. watch(() => state.fixed, (value) => emit("change", value));
  5965. useEventListener("scroll", onScroll, {
  5966. target: scrollParent,
  5967. passive: true
  5968. });
  5969. useVisibilityChange(root, onScroll);
  5970. return () => {
  5971. var _a;
  5972. return createVNode("div", {
  5973. "ref": root,
  5974. "style": rootStyle.value
  5975. }, [createVNode("div", {
  5976. "class": bem30({
  5977. fixed: state.fixed
  5978. }),
  5979. "style": stickyStyle.value
  5980. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
  5981. };
  5982. }
  5983. });
  5984. // node_modules/vant/es/sticky/index.mjs
  5985. var Sticky = withInstall(stdin_default36);
  5986. // node_modules/vant/es/swipe/Swipe.mjs
  5987. var [name34, bem31] = createNamespace("swipe");
  5988. var swipeProps = {
  5989. loop: truthProp,
  5990. width: numericProp,
  5991. height: numericProp,
  5992. vertical: Boolean,
  5993. autoplay: makeNumericProp(0),
  5994. duration: makeNumericProp(500),
  5995. touchable: truthProp,
  5996. lazyRender: Boolean,
  5997. initialSwipe: makeNumericProp(0),
  5998. indicatorColor: String,
  5999. showIndicators: truthProp,
  6000. stopPropagation: truthProp
  6001. };
  6002. var SWIPE_KEY = Symbol(name34);
  6003. var stdin_default37 = defineComponent({
  6004. name: name34,
  6005. props: swipeProps,
  6006. emits: ["change"],
  6007. setup(props, {
  6008. emit,
  6009. slots
  6010. }) {
  6011. const root = ref();
  6012. const track = ref();
  6013. const state = reactive({
  6014. rect: null,
  6015. width: 0,
  6016. height: 0,
  6017. offset: 0,
  6018. active: 0,
  6019. swiping: false
  6020. });
  6021. const touch = useTouch();
  6022. const {
  6023. children,
  6024. linkChildren
  6025. } = useChildren(SWIPE_KEY);
  6026. const count = computed(() => children.length);
  6027. const size = computed(() => state[props.vertical ? "height" : "width"]);
  6028. const delta = computed(() => props.vertical ? touch.deltaY.value : touch.deltaX.value);
  6029. const minOffset = computed(() => {
  6030. if (state.rect) {
  6031. const base = props.vertical ? state.rect.height : state.rect.width;
  6032. return base - size.value * count.value;
  6033. }
  6034. return 0;
  6035. });
  6036. const maxCount = computed(() => Math.ceil(Math.abs(minOffset.value) / size.value));
  6037. const trackSize = computed(() => count.value * size.value);
  6038. const activeIndicator = computed(() => (state.active + count.value) % count.value);
  6039. const isCorrectDirection = computed(() => {
  6040. const expect = props.vertical ? "vertical" : "horizontal";
  6041. return touch.direction.value === expect;
  6042. });
  6043. const trackStyle = computed(() => {
  6044. const style = {
  6045. transitionDuration: `${state.swiping ? 0 : props.duration}ms`,
  6046. transform: `translate${props.vertical ? "Y" : "X"}(${state.offset}px)`
  6047. };
  6048. if (size.value) {
  6049. const mainAxis = props.vertical ? "height" : "width";
  6050. const crossAxis = props.vertical ? "width" : "height";
  6051. style[mainAxis] = `${trackSize.value}px`;
  6052. style[crossAxis] = props[crossAxis] ? `${props[crossAxis]}px` : "";
  6053. }
  6054. return style;
  6055. });
  6056. const getTargetActive = (pace) => {
  6057. const {
  6058. active
  6059. } = state;
  6060. if (pace) {
  6061. if (props.loop) {
  6062. return clamp(active + pace, -1, count.value);
  6063. }
  6064. return clamp(active + pace, 0, maxCount.value);
  6065. }
  6066. return active;
  6067. };
  6068. const getTargetOffset = (targetActive, offset2 = 0) => {
  6069. let currentPosition = targetActive * size.value;
  6070. if (!props.loop) {
  6071. currentPosition = Math.min(currentPosition, -minOffset.value);
  6072. }
  6073. let targetOffset = offset2 - currentPosition;
  6074. if (!props.loop) {
  6075. targetOffset = clamp(targetOffset, minOffset.value, 0);
  6076. }
  6077. return targetOffset;
  6078. };
  6079. const move = ({
  6080. pace = 0,
  6081. offset: offset2 = 0,
  6082. emitChange
  6083. }) => {
  6084. if (count.value <= 1) {
  6085. return;
  6086. }
  6087. const {
  6088. active
  6089. } = state;
  6090. const targetActive = getTargetActive(pace);
  6091. const targetOffset = getTargetOffset(targetActive, offset2);
  6092. if (props.loop) {
  6093. if (children[0] && targetOffset !== minOffset.value) {
  6094. const outRightBound = targetOffset < minOffset.value;
  6095. children[0].setOffset(outRightBound ? trackSize.value : 0);
  6096. }
  6097. if (children[count.value - 1] && targetOffset !== 0) {
  6098. const outLeftBound = targetOffset > 0;
  6099. children[count.value - 1].setOffset(outLeftBound ? -trackSize.value : 0);
  6100. }
  6101. }
  6102. state.active = targetActive;
  6103. state.offset = targetOffset;
  6104. if (emitChange && targetActive !== active) {
  6105. emit("change", activeIndicator.value);
  6106. }
  6107. };
  6108. const correctPosition = () => {
  6109. state.swiping = true;
  6110. if (state.active <= -1) {
  6111. move({
  6112. pace: count.value
  6113. });
  6114. } else if (state.active >= count.value) {
  6115. move({
  6116. pace: -count.value
  6117. });
  6118. }
  6119. };
  6120. const prev = () => {
  6121. correctPosition();
  6122. touch.reset();
  6123. doubleRaf(() => {
  6124. state.swiping = false;
  6125. move({
  6126. pace: -1,
  6127. emitChange: true
  6128. });
  6129. });
  6130. };
  6131. const next = () => {
  6132. correctPosition();
  6133. touch.reset();
  6134. doubleRaf(() => {
  6135. state.swiping = false;
  6136. move({
  6137. pace: 1,
  6138. emitChange: true
  6139. });
  6140. });
  6141. };
  6142. let autoplayTimer;
  6143. const stopAutoplay = () => clearTimeout(autoplayTimer);
  6144. const autoplay = () => {
  6145. stopAutoplay();
  6146. if (props.autoplay > 0 && count.value > 1) {
  6147. autoplayTimer = setTimeout(() => {
  6148. next();
  6149. autoplay();
  6150. }, +props.autoplay);
  6151. }
  6152. };
  6153. const initialize = (active = +props.initialSwipe) => {
  6154. if (!root.value) {
  6155. return;
  6156. }
  6157. const cb = () => {
  6158. var _a, _b;
  6159. if (!isHidden(root)) {
  6160. const rect = {
  6161. width: root.value.offsetWidth,
  6162. height: root.value.offsetHeight
  6163. };
  6164. state.rect = rect;
  6165. state.width = +((_a = props.width) != null ? _a : rect.width);
  6166. state.height = +((_b = props.height) != null ? _b : rect.height);
  6167. }
  6168. if (count.value) {
  6169. active = Math.min(count.value - 1, active);
  6170. }
  6171. state.active = active;
  6172. state.swiping = true;
  6173. state.offset = getTargetOffset(active);
  6174. children.forEach((swipe) => {
  6175. swipe.setOffset(0);
  6176. });
  6177. autoplay();
  6178. };
  6179. if (isHidden(root)) {
  6180. nextTick().then(cb);
  6181. } else {
  6182. cb();
  6183. }
  6184. };
  6185. const resize = () => initialize(state.active);
  6186. let touchStartTime;
  6187. const onTouchStart = (event) => {
  6188. if (!props.touchable)
  6189. return;
  6190. touch.start(event);
  6191. touchStartTime = Date.now();
  6192. stopAutoplay();
  6193. correctPosition();
  6194. };
  6195. const onTouchMove = (event) => {
  6196. if (props.touchable && state.swiping) {
  6197. touch.move(event);
  6198. if (isCorrectDirection.value) {
  6199. const isEdgeTouch = !props.loop && (state.active === 0 && delta.value > 0 || state.active === count.value - 1 && delta.value < 0);
  6200. if (!isEdgeTouch) {
  6201. preventDefault(event, props.stopPropagation);
  6202. move({
  6203. offset: delta.value
  6204. });
  6205. }
  6206. }
  6207. }
  6208. };
  6209. const onTouchEnd = () => {
  6210. if (!props.touchable || !state.swiping) {
  6211. return;
  6212. }
  6213. const duration = Date.now() - touchStartTime;
  6214. const speed = delta.value / duration;
  6215. const shouldSwipe = Math.abs(speed) > 0.25 || Math.abs(delta.value) > size.value / 2;
  6216. if (shouldSwipe && isCorrectDirection.value) {
  6217. const offset2 = props.vertical ? touch.offsetY.value : touch.offsetX.value;
  6218. let pace = 0;
  6219. if (props.loop) {
  6220. pace = offset2 > 0 ? delta.value > 0 ? -1 : 1 : 0;
  6221. } else {
  6222. pace = -Math[delta.value > 0 ? "ceil" : "floor"](delta.value / size.value);
  6223. }
  6224. move({
  6225. pace,
  6226. emitChange: true
  6227. });
  6228. } else if (delta.value) {
  6229. move({
  6230. pace: 0
  6231. });
  6232. }
  6233. state.swiping = false;
  6234. autoplay();
  6235. };
  6236. const swipeTo = (index, options = {}) => {
  6237. correctPosition();
  6238. touch.reset();
  6239. doubleRaf(() => {
  6240. let targetIndex;
  6241. if (props.loop && index === count.value) {
  6242. targetIndex = state.active === 0 ? 0 : index;
  6243. } else {
  6244. targetIndex = index % count.value;
  6245. }
  6246. if (options.immediate) {
  6247. doubleRaf(() => {
  6248. state.swiping = false;
  6249. });
  6250. } else {
  6251. state.swiping = false;
  6252. }
  6253. move({
  6254. pace: targetIndex - state.active,
  6255. emitChange: true
  6256. });
  6257. });
  6258. };
  6259. const renderDot = (_, index) => {
  6260. const active = index === activeIndicator.value;
  6261. const style = active ? {
  6262. backgroundColor: props.indicatorColor
  6263. } : void 0;
  6264. return createVNode("i", {
  6265. "style": style,
  6266. "class": bem31("indicator", {
  6267. active
  6268. })
  6269. }, null);
  6270. };
  6271. const renderIndicator = () => {
  6272. if (slots.indicator) {
  6273. return slots.indicator({
  6274. active: activeIndicator.value,
  6275. total: count.value
  6276. });
  6277. }
  6278. if (props.showIndicators && count.value > 1) {
  6279. return createVNode("div", {
  6280. "class": bem31("indicators", {
  6281. vertical: props.vertical
  6282. })
  6283. }, [Array(count.value).fill("").map(renderDot)]);
  6284. }
  6285. };
  6286. useExpose({
  6287. prev,
  6288. next,
  6289. state,
  6290. resize,
  6291. swipeTo
  6292. });
  6293. linkChildren({
  6294. size,
  6295. props,
  6296. count,
  6297. activeIndicator
  6298. });
  6299. watch(() => props.initialSwipe, (value) => initialize(+value));
  6300. watch(count, () => initialize(state.active));
  6301. watch(() => props.autoplay, autoplay);
  6302. watch([windowWidth, windowHeight], resize);
  6303. watch(usePageVisibility(), (visible) => {
  6304. if (visible === "visible") {
  6305. autoplay();
  6306. } else {
  6307. stopAutoplay();
  6308. }
  6309. });
  6310. onMounted(initialize);
  6311. onActivated(() => initialize(state.active));
  6312. onPopupReopen(() => initialize(state.active));
  6313. onDeactivated(stopAutoplay);
  6314. onBeforeUnmount(stopAutoplay);
  6315. useEventListener("touchmove", onTouchMove, {
  6316. target: track
  6317. });
  6318. return () => {
  6319. var _a;
  6320. return createVNode("div", {
  6321. "ref": root,
  6322. "class": bem31()
  6323. }, [createVNode("div", {
  6324. "ref": track,
  6325. "style": trackStyle.value,
  6326. "class": bem31("track", {
  6327. vertical: props.vertical
  6328. }),
  6329. "onTouchstartPassive": onTouchStart,
  6330. "onTouchend": onTouchEnd,
  6331. "onTouchcancel": onTouchEnd
  6332. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), renderIndicator()]);
  6333. };
  6334. }
  6335. });
  6336. // node_modules/vant/es/swipe/index.mjs
  6337. var Swipe = withInstall(stdin_default37);
  6338. // node_modules/vant/es/swipe-item/SwipeItem.mjs
  6339. var [name35, bem32] = createNamespace("swipe-item");
  6340. var stdin_default38 = defineComponent({
  6341. name: name35,
  6342. setup(props, {
  6343. slots
  6344. }) {
  6345. let rendered;
  6346. const state = reactive({
  6347. offset: 0,
  6348. inited: false,
  6349. mounted: false
  6350. });
  6351. const {
  6352. parent,
  6353. index
  6354. } = useParent(SWIPE_KEY);
  6355. if (!parent) {
  6356. if (true) {
  6357. console.error("[Vant] <SwipeItem> must be a child component of <Swipe>.");
  6358. }
  6359. return;
  6360. }
  6361. const style = computed(() => {
  6362. const style2 = {};
  6363. const {
  6364. vertical
  6365. } = parent.props;
  6366. if (parent.size.value) {
  6367. style2[vertical ? "height" : "width"] = `${parent.size.value}px`;
  6368. }
  6369. if (state.offset) {
  6370. style2.transform = `translate${vertical ? "Y" : "X"}(${state.offset}px)`;
  6371. }
  6372. return style2;
  6373. });
  6374. const shouldRender = computed(() => {
  6375. const {
  6376. loop,
  6377. lazyRender
  6378. } = parent.props;
  6379. if (!lazyRender || rendered) {
  6380. return true;
  6381. }
  6382. if (!state.mounted) {
  6383. return false;
  6384. }
  6385. const active = parent.activeIndicator.value;
  6386. const maxActive = parent.count.value - 1;
  6387. const prevActive = active === 0 && loop ? maxActive : active - 1;
  6388. const nextActive = active === maxActive && loop ? 0 : active + 1;
  6389. rendered = index.value === active || index.value === prevActive || index.value === nextActive;
  6390. return rendered;
  6391. });
  6392. const setOffset = (offset2) => {
  6393. state.offset = offset2;
  6394. };
  6395. onMounted(() => {
  6396. nextTick(() => {
  6397. state.mounted = true;
  6398. });
  6399. });
  6400. useExpose({
  6401. setOffset
  6402. });
  6403. return () => {
  6404. var _a;
  6405. return createVNode("div", {
  6406. "class": bem32(),
  6407. "style": style.value
  6408. }, [shouldRender.value ? (_a = slots.default) == null ? void 0 : _a.call(slots) : null]);
  6409. };
  6410. }
  6411. });
  6412. // node_modules/vant/es/swipe-item/index.mjs
  6413. var SwipeItem = withInstall(stdin_default38);
  6414. // node_modules/vant/es/tabs/utils.mjs
  6415. function scrollLeftTo(scroller, to, duration) {
  6416. let count = 0;
  6417. const from = scroller.scrollLeft;
  6418. const frames = duration === 0 ? 1 : Math.round(duration * 1e3 / 16);
  6419. function animate() {
  6420. scroller.scrollLeft += (to - from) / frames;
  6421. if (++count < frames) {
  6422. raf(animate);
  6423. }
  6424. }
  6425. animate();
  6426. }
  6427. function scrollTopTo(scroller, to, duration, callback) {
  6428. let current2 = getScrollTop(scroller);
  6429. const isDown = current2 < to;
  6430. const frames = duration === 0 ? 1 : Math.round(duration * 1e3 / 16);
  6431. const step = (to - current2) / frames;
  6432. function animate() {
  6433. current2 += step;
  6434. if (isDown && current2 > to || !isDown && current2 < to) {
  6435. current2 = to;
  6436. }
  6437. setScrollTop(scroller, current2);
  6438. if (isDown && current2 < to || !isDown && current2 > to) {
  6439. raf(animate);
  6440. } else if (callback) {
  6441. raf(callback);
  6442. }
  6443. }
  6444. animate();
  6445. }
  6446. // node_modules/vant/es/tabs/TabsTitle.mjs
  6447. var [name36, bem33] = createNamespace("tab");
  6448. var stdin_default39 = defineComponent({
  6449. name: name36,
  6450. props: {
  6451. id: String,
  6452. dot: Boolean,
  6453. type: String,
  6454. color: String,
  6455. title: String,
  6456. badge: numericProp,
  6457. shrink: Boolean,
  6458. isActive: Boolean,
  6459. disabled: Boolean,
  6460. controls: String,
  6461. scrollable: Boolean,
  6462. activeColor: String,
  6463. inactiveColor: String,
  6464. showZeroBadge: truthProp
  6465. },
  6466. setup(props, {
  6467. slots
  6468. }) {
  6469. const style = computed(() => {
  6470. const style2 = {};
  6471. const {
  6472. type,
  6473. color,
  6474. disabled,
  6475. isActive,
  6476. activeColor,
  6477. inactiveColor
  6478. } = props;
  6479. const isCard = type === "card";
  6480. if (color && isCard) {
  6481. style2.borderColor = color;
  6482. if (!disabled) {
  6483. if (isActive) {
  6484. style2.backgroundColor = color;
  6485. } else {
  6486. style2.color = color;
  6487. }
  6488. }
  6489. }
  6490. const titleColor = isActive ? activeColor : inactiveColor;
  6491. if (titleColor) {
  6492. style2.color = titleColor;
  6493. }
  6494. return style2;
  6495. });
  6496. const renderText = () => {
  6497. const Text2 = createVNode("span", {
  6498. "class": bem33("text", {
  6499. ellipsis: !props.scrollable
  6500. })
  6501. }, [slots.title ? slots.title() : props.title]);
  6502. if (props.dot || isDef(props.badge) && props.badge !== "") {
  6503. return createVNode(Badge, {
  6504. "dot": props.dot,
  6505. "content": props.badge,
  6506. "showZero": props.showZeroBadge
  6507. }, {
  6508. default: () => [Text2]
  6509. });
  6510. }
  6511. return Text2;
  6512. };
  6513. return () => createVNode("div", {
  6514. "id": props.id,
  6515. "role": "tab",
  6516. "class": [bem33([props.type, {
  6517. grow: props.scrollable && !props.shrink,
  6518. shrink: props.shrink,
  6519. active: props.isActive,
  6520. disabled: props.disabled
  6521. }])],
  6522. "style": style.value,
  6523. "tabindex": props.disabled ? void 0 : props.isActive ? 0 : -1,
  6524. "aria-selected": props.isActive,
  6525. "aria-disabled": props.disabled || void 0,
  6526. "aria-controls": props.controls
  6527. }, [renderText()]);
  6528. }
  6529. });
  6530. // node_modules/vant/es/tabs/TabsContent.mjs
  6531. var [name37, bem34] = createNamespace("tabs");
  6532. var stdin_default40 = defineComponent({
  6533. name: name37,
  6534. props: {
  6535. count: makeRequiredProp(Number),
  6536. inited: Boolean,
  6537. animated: Boolean,
  6538. duration: makeRequiredProp(numericProp),
  6539. swipeable: Boolean,
  6540. lazyRender: Boolean,
  6541. currentIndex: makeRequiredProp(Number)
  6542. },
  6543. emits: ["change"],
  6544. setup(props, {
  6545. emit,
  6546. slots
  6547. }) {
  6548. const swipeRef = ref();
  6549. const onChange = (index) => emit("change", index);
  6550. const renderChildren = () => {
  6551. var _a;
  6552. const Content = (_a = slots.default) == null ? void 0 : _a.call(slots);
  6553. if (props.animated || props.swipeable) {
  6554. return createVNode(Swipe, {
  6555. "ref": swipeRef,
  6556. "loop": false,
  6557. "class": bem34("track"),
  6558. "duration": +props.duration * 1e3,
  6559. "touchable": props.swipeable,
  6560. "lazyRender": props.lazyRender,
  6561. "showIndicators": false,
  6562. "onChange": onChange
  6563. }, {
  6564. default: () => [Content]
  6565. });
  6566. }
  6567. return Content;
  6568. };
  6569. const swipeToCurrentTab = (index) => {
  6570. const swipe = swipeRef.value;
  6571. if (swipe && swipe.state.active !== index) {
  6572. swipe.swipeTo(index, {
  6573. immediate: !props.inited
  6574. });
  6575. }
  6576. };
  6577. watch(() => props.currentIndex, swipeToCurrentTab);
  6578. onMounted(() => {
  6579. swipeToCurrentTab(props.currentIndex);
  6580. });
  6581. useExpose({
  6582. swipeRef
  6583. });
  6584. return () => createVNode("div", {
  6585. "class": bem34("content", {
  6586. animated: props.animated || props.swipeable
  6587. })
  6588. }, [renderChildren()]);
  6589. }
  6590. });
  6591. // node_modules/vant/es/tabs/Tabs.mjs
  6592. var [name38, bem35] = createNamespace("tabs");
  6593. var tabsProps = {
  6594. type: makeStringProp("line"),
  6595. color: String,
  6596. border: Boolean,
  6597. sticky: Boolean,
  6598. shrink: Boolean,
  6599. active: makeNumericProp(0),
  6600. duration: makeNumericProp(0.3),
  6601. animated: Boolean,
  6602. ellipsis: truthProp,
  6603. swipeable: Boolean,
  6604. scrollspy: Boolean,
  6605. offsetTop: makeNumericProp(0),
  6606. background: String,
  6607. lazyRender: truthProp,
  6608. lineWidth: numericProp,
  6609. lineHeight: numericProp,
  6610. beforeChange: Function,
  6611. swipeThreshold: makeNumericProp(5),
  6612. titleActiveColor: String,
  6613. titleInactiveColor: String
  6614. };
  6615. var TABS_KEY = Symbol(name38);
  6616. var stdin_default41 = defineComponent({
  6617. name: name38,
  6618. props: tabsProps,
  6619. emits: ["click", "change", "scroll", "disabled", "rendered", "click-tab", "update:active"],
  6620. setup(props, {
  6621. emit,
  6622. slots
  6623. }) {
  6624. var _a, _b;
  6625. if (true) {
  6626. const props2 = (_b = (_a = getCurrentInstance()) == null ? void 0 : _a.vnode) == null ? void 0 : _b.props;
  6627. if (props2 && "onClick" in props2) {
  6628. console.warn('[Vant] Tabs: "click" event is deprecated, using "click-tab" instead.');
  6629. }
  6630. if (props2 && "onDisabled" in props2) {
  6631. console.warn('[Vant] Tabs: "disabled" event is deprecated, using "click-tab" instead.');
  6632. }
  6633. }
  6634. let tabHeight;
  6635. let lockScroll;
  6636. let stickyFixed;
  6637. const root = ref();
  6638. const navRef = ref();
  6639. const wrapRef = ref();
  6640. const contentRef = ref();
  6641. const id = useId();
  6642. const scroller = useScrollParent(root);
  6643. const [titleRefs, setTitleRefs] = useRefs();
  6644. const {
  6645. children,
  6646. linkChildren
  6647. } = useChildren(TABS_KEY);
  6648. const state = reactive({
  6649. inited: false,
  6650. position: "",
  6651. lineStyle: {},
  6652. currentIndex: -1
  6653. });
  6654. const scrollable = computed(() => children.length > props.swipeThreshold || !props.ellipsis || props.shrink);
  6655. const navStyle = computed(() => ({
  6656. borderColor: props.color,
  6657. background: props.background
  6658. }));
  6659. const getTabName = (tab, index) => {
  6660. var _a2;
  6661. return (_a2 = tab.name) != null ? _a2 : index;
  6662. };
  6663. const currentName = computed(() => {
  6664. const activeTab = children[state.currentIndex];
  6665. if (activeTab) {
  6666. return getTabName(activeTab, state.currentIndex);
  6667. }
  6668. });
  6669. const offsetTopPx = computed(() => unitToPx(props.offsetTop));
  6670. const scrollOffset = computed(() => {
  6671. if (props.sticky) {
  6672. return offsetTopPx.value + tabHeight;
  6673. }
  6674. return 0;
  6675. });
  6676. const scrollIntoView = (immediate) => {
  6677. const nav = navRef.value;
  6678. const titles = titleRefs.value;
  6679. if (!scrollable.value || !nav || !titles || !titles[state.currentIndex]) {
  6680. return;
  6681. }
  6682. const title = titles[state.currentIndex].$el;
  6683. const to = title.offsetLeft - (nav.offsetWidth - title.offsetWidth) / 2;
  6684. scrollLeftTo(nav, to, immediate ? 0 : +props.duration);
  6685. };
  6686. const setLine = () => {
  6687. const shouldAnimate = state.inited;
  6688. nextTick(() => {
  6689. const titles = titleRefs.value;
  6690. if (!titles || !titles[state.currentIndex] || props.type !== "line" || isHidden(root.value)) {
  6691. return;
  6692. }
  6693. const title = titles[state.currentIndex].$el;
  6694. const {
  6695. lineWidth,
  6696. lineHeight
  6697. } = props;
  6698. const left2 = title.offsetLeft + title.offsetWidth / 2;
  6699. const lineStyle = {
  6700. width: addUnit(lineWidth),
  6701. backgroundColor: props.color,
  6702. transform: `translateX(${left2}px) translateX(-50%)`
  6703. };
  6704. if (shouldAnimate) {
  6705. lineStyle.transitionDuration = `${props.duration}s`;
  6706. }
  6707. if (isDef(lineHeight)) {
  6708. const height2 = addUnit(lineHeight);
  6709. lineStyle.height = height2;
  6710. lineStyle.borderRadius = height2;
  6711. }
  6712. state.lineStyle = lineStyle;
  6713. });
  6714. };
  6715. const findAvailableTab = (index) => {
  6716. const diff = index < state.currentIndex ? -1 : 1;
  6717. while (index >= 0 && index < children.length) {
  6718. if (!children[index].disabled) {
  6719. return index;
  6720. }
  6721. index += diff;
  6722. }
  6723. };
  6724. const setCurrentIndex = (currentIndex, skipScrollIntoView) => {
  6725. const newIndex = findAvailableTab(currentIndex);
  6726. if (!isDef(newIndex)) {
  6727. return;
  6728. }
  6729. const newTab = children[newIndex];
  6730. const newName = getTabName(newTab, newIndex);
  6731. const shouldEmitChange = state.currentIndex !== null;
  6732. if (state.currentIndex !== newIndex) {
  6733. state.currentIndex = newIndex;
  6734. if (!skipScrollIntoView) {
  6735. scrollIntoView();
  6736. }
  6737. setLine();
  6738. }
  6739. if (newName !== props.active) {
  6740. emit("update:active", newName);
  6741. if (shouldEmitChange) {
  6742. emit("change", newName, newTab.title);
  6743. }
  6744. }
  6745. if (stickyFixed && !props.scrollspy) {
  6746. setRootScrollTop(Math.ceil(getElementTop(root.value) - offsetTopPx.value));
  6747. }
  6748. };
  6749. const setCurrentIndexByName = (name210, skipScrollIntoView) => {
  6750. const matched = children.find((tab, index2) => getTabName(tab, index2) === name210);
  6751. const index = matched ? children.indexOf(matched) : 0;
  6752. setCurrentIndex(index, skipScrollIntoView);
  6753. };
  6754. const scrollToCurrentContent = (immediate = false) => {
  6755. if (props.scrollspy) {
  6756. const target = children[state.currentIndex].$el;
  6757. if (target && scroller.value) {
  6758. const to = getElementTop(target, scroller.value) - scrollOffset.value;
  6759. lockScroll = true;
  6760. scrollTopTo(scroller.value, to, immediate ? 0 : +props.duration, () => {
  6761. lockScroll = false;
  6762. });
  6763. }
  6764. }
  6765. };
  6766. const onClickTab = (item, index, event) => {
  6767. const {
  6768. title,
  6769. disabled
  6770. } = children[index];
  6771. const name210 = getTabName(children[index], index);
  6772. if (disabled) {
  6773. emit("disabled", name210, title);
  6774. } else {
  6775. callInterceptor(props.beforeChange, {
  6776. args: [name210],
  6777. done: () => {
  6778. setCurrentIndex(index);
  6779. scrollToCurrentContent();
  6780. }
  6781. });
  6782. emit("click", name210, title);
  6783. route(item);
  6784. }
  6785. emit("click-tab", {
  6786. name: name210,
  6787. title,
  6788. event,
  6789. disabled
  6790. });
  6791. };
  6792. const onStickyScroll = (params) => {
  6793. stickyFixed = params.isFixed;
  6794. emit("scroll", params);
  6795. };
  6796. const scrollTo = (name210) => {
  6797. nextTick(() => {
  6798. setCurrentIndexByName(name210);
  6799. scrollToCurrentContent(true);
  6800. });
  6801. };
  6802. const getCurrentIndexOnScroll = () => {
  6803. for (let index = 0; index < children.length; index++) {
  6804. const {
  6805. top: top2
  6806. } = useRect(children[index].$el);
  6807. if (top2 > scrollOffset.value) {
  6808. return index === 0 ? 0 : index - 1;
  6809. }
  6810. }
  6811. return children.length - 1;
  6812. };
  6813. const onScroll = () => {
  6814. if (props.scrollspy && !lockScroll) {
  6815. const index = getCurrentIndexOnScroll();
  6816. setCurrentIndex(index);
  6817. }
  6818. };
  6819. const renderNav = () => children.map((item, index) => createVNode(stdin_default39, mergeProps({
  6820. "key": item.id,
  6821. "id": `${id}-${index}`,
  6822. "ref": setTitleRefs(index),
  6823. "type": props.type,
  6824. "color": props.color,
  6825. "style": item.titleStyle,
  6826. "class": item.titleClass,
  6827. "shrink": props.shrink,
  6828. "isActive": index === state.currentIndex,
  6829. "controls": item.id,
  6830. "scrollable": scrollable.value,
  6831. "activeColor": props.titleActiveColor,
  6832. "inactiveColor": props.titleInactiveColor,
  6833. "onClick": (event) => onClickTab(item, index, event)
  6834. }, pick(item, ["dot", "badge", "title", "disabled", "showZeroBadge"])), {
  6835. title: item.$slots.title
  6836. }));
  6837. const renderLine = () => {
  6838. if (props.type === "line" && children.length) {
  6839. return createVNode("div", {
  6840. "class": bem35("line"),
  6841. "style": state.lineStyle
  6842. }, null);
  6843. }
  6844. };
  6845. const renderHeader = () => {
  6846. var _a2, _b2, _c;
  6847. const {
  6848. type,
  6849. border,
  6850. sticky
  6851. } = props;
  6852. const Header = [createVNode("div", {
  6853. "ref": sticky ? void 0 : wrapRef,
  6854. "class": [bem35("wrap"), {
  6855. [BORDER_TOP_BOTTOM]: type === "line" && border
  6856. }]
  6857. }, [createVNode("div", {
  6858. "ref": navRef,
  6859. "role": "tablist",
  6860. "class": bem35("nav", [type, {
  6861. shrink: props.shrink,
  6862. complete: scrollable.value
  6863. }]),
  6864. "style": navStyle.value,
  6865. "aria-orientation": "horizontal"
  6866. }, [(_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)];
  6867. if (sticky) {
  6868. return createVNode("div", {
  6869. "ref": wrapRef
  6870. }, [Header]);
  6871. }
  6872. return Header;
  6873. };
  6874. watch([() => props.color, windowWidth], setLine);
  6875. watch(() => props.active, (value) => {
  6876. if (value !== currentName.value) {
  6877. setCurrentIndexByName(value);
  6878. }
  6879. });
  6880. watch(() => children.length, () => {
  6881. if (state.inited) {
  6882. setCurrentIndexByName(props.active);
  6883. setLine();
  6884. nextTick(() => {
  6885. scrollIntoView(true);
  6886. });
  6887. }
  6888. });
  6889. const init = () => {
  6890. setCurrentIndexByName(props.active, true);
  6891. nextTick(() => {
  6892. state.inited = true;
  6893. if (wrapRef.value) {
  6894. tabHeight = useRect(wrapRef.value).height;
  6895. }
  6896. scrollIntoView(true);
  6897. });
  6898. };
  6899. const onRendered = (name210, title) => emit("rendered", name210, title);
  6900. const resize = () => {
  6901. setLine();
  6902. nextTick(() => {
  6903. var _a2, _b2;
  6904. return (_b2 = (_a2 = contentRef.value) == null ? void 0 : _a2.swipeRef.value) == null ? void 0 : _b2.resize();
  6905. });
  6906. };
  6907. useExpose({
  6908. resize,
  6909. scrollTo
  6910. });
  6911. onActivated(setLine);
  6912. onPopupReopen(setLine);
  6913. onMountedOrActivated(init);
  6914. useEventListener("scroll", onScroll, {
  6915. target: scroller,
  6916. passive: true
  6917. });
  6918. linkChildren({
  6919. id,
  6920. props,
  6921. setLine,
  6922. onRendered,
  6923. currentName,
  6924. scrollIntoView
  6925. });
  6926. return () => createVNode("div", {
  6927. "ref": root,
  6928. "class": bem35([props.type])
  6929. }, [props.sticky ? createVNode(Sticky, {
  6930. "container": root.value,
  6931. "offsetTop": offsetTopPx.value,
  6932. "onScroll": onStickyScroll
  6933. }, {
  6934. default: () => [renderHeader()]
  6935. }) : renderHeader(), createVNode(stdin_default40, {
  6936. "ref": contentRef,
  6937. "count": children.length,
  6938. "inited": state.inited,
  6939. "animated": props.animated,
  6940. "duration": props.duration,
  6941. "swipeable": props.swipeable,
  6942. "lazyRender": props.lazyRender,
  6943. "currentIndex": state.currentIndex,
  6944. "onChange": setCurrentIndex
  6945. }, {
  6946. default: () => {
  6947. var _a2;
  6948. return [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)];
  6949. }
  6950. })]);
  6951. }
  6952. });
  6953. // node_modules/vant/es/composables/use-tab-status.mjs
  6954. var TAB_STATUS_KEY = Symbol();
  6955. var useTabStatus = () => inject(TAB_STATUS_KEY, null);
  6956. // node_modules/vant/es/tab/Tab.mjs
  6957. var [name39, bem36] = createNamespace("tab");
  6958. var tabProps = extend({}, routeProps, {
  6959. dot: Boolean,
  6960. name: numericProp,
  6961. badge: numericProp,
  6962. title: String,
  6963. disabled: Boolean,
  6964. titleClass: unknownProp,
  6965. titleStyle: [String, Object],
  6966. showZeroBadge: truthProp
  6967. });
  6968. var stdin_default42 = defineComponent({
  6969. name: name39,
  6970. props: tabProps,
  6971. setup(props, {
  6972. slots
  6973. }) {
  6974. const id = useId();
  6975. const inited = ref(false);
  6976. const {
  6977. parent,
  6978. index
  6979. } = useParent(TABS_KEY);
  6980. if (!parent) {
  6981. if (true) {
  6982. console.error("[Vant] <Tab> must be a child component of <Tabs>.");
  6983. }
  6984. return;
  6985. }
  6986. const getName = () => {
  6987. var _a;
  6988. return (_a = props.name) != null ? _a : index.value;
  6989. };
  6990. const init = () => {
  6991. inited.value = true;
  6992. if (parent.props.lazyRender) {
  6993. nextTick(() => {
  6994. parent.onRendered(getName(), props.title);
  6995. });
  6996. }
  6997. };
  6998. const active = computed(() => {
  6999. const isActive = getName() === parent.currentName.value;
  7000. if (isActive && !inited.value) {
  7001. init();
  7002. }
  7003. return isActive;
  7004. });
  7005. const hasInactiveClass = ref(!active.value);
  7006. watch(active, (val) => {
  7007. if (val) {
  7008. hasInactiveClass.value = false;
  7009. } else {
  7010. doubleRaf(() => {
  7011. hasInactiveClass.value = true;
  7012. });
  7013. }
  7014. });
  7015. watch(() => props.title, () => {
  7016. parent.setLine();
  7017. parent.scrollIntoView();
  7018. });
  7019. provide(TAB_STATUS_KEY, active);
  7020. return () => {
  7021. var _a;
  7022. const label = `${parent.id}-${index.value}`;
  7023. const {
  7024. animated,
  7025. swipeable,
  7026. scrollspy,
  7027. lazyRender
  7028. } = parent.props;
  7029. if (!slots.default && !animated) {
  7030. return;
  7031. }
  7032. const show = scrollspy || active.value;
  7033. if (animated || swipeable) {
  7034. return createVNode(SwipeItem, {
  7035. "id": id,
  7036. "role": "tabpanel",
  7037. "class": bem36("panel-wrapper", {
  7038. inactive: hasInactiveClass.value
  7039. }),
  7040. "tabindex": active.value ? 0 : -1,
  7041. "aria-hidden": !active.value,
  7042. "aria-labelledby": label
  7043. }, {
  7044. default: () => {
  7045. var _a2;
  7046. return [createVNode("div", {
  7047. "class": bem36("panel")
  7048. }, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)])];
  7049. }
  7050. });
  7051. }
  7052. const shouldRender = inited.value || scrollspy || !lazyRender;
  7053. const Content = shouldRender ? (_a = slots.default) == null ? void 0 : _a.call(slots) : null;
  7054. useExpose({
  7055. id
  7056. });
  7057. return withDirectives(createVNode("div", {
  7058. "id": id,
  7059. "role": "tabpanel",
  7060. "class": bem36("panel"),
  7061. "tabindex": show ? 0 : -1,
  7062. "aria-labelledby": label
  7063. }, [Content]), [[vShow, show]]);
  7064. };
  7065. }
  7066. });
  7067. // node_modules/vant/es/tab/index.mjs
  7068. var Tab = withInstall(stdin_default42);
  7069. // node_modules/vant/es/tabs/index.mjs
  7070. var Tabs = withInstall(stdin_default41);
  7071. // node_modules/vant/es/cascader/Cascader.mjs
  7072. var [name40, bem37, t6] = createNamespace("cascader");
  7073. var cascaderProps = {
  7074. title: String,
  7075. options: makeArrayProp(),
  7076. closeable: truthProp,
  7077. swipeable: truthProp,
  7078. closeIcon: makeStringProp("cross"),
  7079. showHeader: truthProp,
  7080. modelValue: numericProp,
  7081. fieldNames: Object,
  7082. placeholder: String,
  7083. activeColor: String
  7084. };
  7085. var stdin_default43 = defineComponent({
  7086. name: name40,
  7087. props: cascaderProps,
  7088. emits: ["close", "change", "finish", "click-tab", "update:modelValue"],
  7089. setup(props, {
  7090. slots,
  7091. emit
  7092. }) {
  7093. const tabs = ref([]);
  7094. const activeTab = ref(0);
  7095. const {
  7096. text: textKey,
  7097. value: valueKey,
  7098. children: childrenKey
  7099. } = extend({
  7100. text: "text",
  7101. value: "value",
  7102. children: "children"
  7103. }, props.fieldNames);
  7104. const getSelectedOptionsByValue = (options, value) => {
  7105. for (const option of options) {
  7106. if (option[valueKey] === value) {
  7107. return [option];
  7108. }
  7109. if (option[childrenKey]) {
  7110. const selectedOptions = getSelectedOptionsByValue(option[childrenKey], value);
  7111. if (selectedOptions) {
  7112. return [option, ...selectedOptions];
  7113. }
  7114. }
  7115. }
  7116. };
  7117. const updateTabs = () => {
  7118. const {
  7119. options,
  7120. modelValue
  7121. } = props;
  7122. if (modelValue !== void 0) {
  7123. const selectedOptions = getSelectedOptionsByValue(options, modelValue);
  7124. if (selectedOptions) {
  7125. let optionsCursor = options;
  7126. tabs.value = selectedOptions.map((option) => {
  7127. const tab = {
  7128. options: optionsCursor,
  7129. selected: option
  7130. };
  7131. const next = optionsCursor.find((item) => item[valueKey] === option[valueKey]);
  7132. if (next) {
  7133. optionsCursor = next[childrenKey];
  7134. }
  7135. return tab;
  7136. });
  7137. if (optionsCursor) {
  7138. tabs.value.push({
  7139. options: optionsCursor,
  7140. selected: null
  7141. });
  7142. }
  7143. nextTick(() => {
  7144. activeTab.value = tabs.value.length - 1;
  7145. });
  7146. return;
  7147. }
  7148. }
  7149. tabs.value = [{
  7150. options,
  7151. selected: null
  7152. }];
  7153. };
  7154. const onSelect = (option, tabIndex) => {
  7155. if (option.disabled) {
  7156. return;
  7157. }
  7158. tabs.value[tabIndex].selected = option;
  7159. if (tabs.value.length > tabIndex + 1) {
  7160. tabs.value = tabs.value.slice(0, tabIndex + 1);
  7161. }
  7162. if (option[childrenKey]) {
  7163. const nextTab = {
  7164. options: option[childrenKey],
  7165. selected: null
  7166. };
  7167. if (tabs.value[tabIndex + 1]) {
  7168. tabs.value[tabIndex + 1] = nextTab;
  7169. } else {
  7170. tabs.value.push(nextTab);
  7171. }
  7172. nextTick(() => {
  7173. activeTab.value++;
  7174. });
  7175. }
  7176. const selectedOptions = tabs.value.map((tab) => tab.selected).filter(Boolean);
  7177. emit("update:modelValue", option[valueKey]);
  7178. const params = {
  7179. value: option[valueKey],
  7180. tabIndex,
  7181. selectedOptions
  7182. };
  7183. emit("change", params);
  7184. if (!option[childrenKey]) {
  7185. emit("finish", params);
  7186. }
  7187. };
  7188. const onClose = () => emit("close");
  7189. const onClickTab = ({
  7190. name: name210,
  7191. title
  7192. }) => emit("click-tab", name210, title);
  7193. const renderHeader = () => props.showHeader ? createVNode("div", {
  7194. "class": bem37("header")
  7195. }, [createVNode("h2", {
  7196. "class": bem37("title")
  7197. }, [slots.title ? slots.title() : props.title]), props.closeable ? createVNode(Icon, {
  7198. "name": props.closeIcon,
  7199. "class": [bem37("close-icon"), HAPTICS_FEEDBACK],
  7200. "onClick": onClose
  7201. }, null) : null]) : null;
  7202. const renderOption = (option, selectedOption, tabIndex) => {
  7203. const {
  7204. disabled
  7205. } = option;
  7206. const selected = !!(selectedOption && option[valueKey] === selectedOption[valueKey]);
  7207. const color = option.color || (selected ? props.activeColor : void 0);
  7208. const Text2 = slots.option ? slots.option({
  7209. option,
  7210. selected
  7211. }) : createVNode("span", null, [option[textKey]]);
  7212. return createVNode("li", {
  7213. "role": "menuitemradio",
  7214. "class": [bem37("option", {
  7215. selected,
  7216. disabled
  7217. }), option.className],
  7218. "style": {
  7219. color
  7220. },
  7221. "tabindex": disabled ? void 0 : selected ? 0 : -1,
  7222. "aria-checked": selected,
  7223. "aria-disabled": disabled || void 0,
  7224. "onClick": () => onSelect(option, tabIndex)
  7225. }, [Text2, selected ? createVNode(Icon, {
  7226. "name": "success",
  7227. "class": bem37("selected-icon")
  7228. }, null) : null]);
  7229. };
  7230. const renderOptions = (options, selectedOption, tabIndex) => createVNode("ul", {
  7231. "role": "menu",
  7232. "class": bem37("options")
  7233. }, [options.map((option) => renderOption(option, selectedOption, tabIndex))]);
  7234. const renderTab = (tab, tabIndex) => {
  7235. const {
  7236. options,
  7237. selected
  7238. } = tab;
  7239. const placeholder = props.placeholder || t6("select");
  7240. const title = selected ? selected[textKey] : placeholder;
  7241. return createVNode(Tab, {
  7242. "title": title,
  7243. "titleClass": bem37("tab", {
  7244. unselected: !selected
  7245. })
  7246. }, {
  7247. default: () => {
  7248. var _a, _b;
  7249. return [(_a = slots["options-top"]) == null ? void 0 : _a.call(slots, {
  7250. tabIndex
  7251. }), renderOptions(options, selected, tabIndex), (_b = slots["options-bottom"]) == null ? void 0 : _b.call(slots, {
  7252. tabIndex
  7253. })];
  7254. }
  7255. });
  7256. };
  7257. const renderTabs = () => createVNode(Tabs, {
  7258. "active": activeTab.value,
  7259. "onUpdate:active": ($event) => activeTab.value = $event,
  7260. "shrink": true,
  7261. "animated": true,
  7262. "class": bem37("tabs"),
  7263. "color": props.activeColor,
  7264. "swipeable": props.swipeable,
  7265. "onClick-tab": onClickTab
  7266. }, {
  7267. default: () => [tabs.value.map(renderTab)]
  7268. });
  7269. updateTabs();
  7270. watch(() => props.options, updateTabs, {
  7271. deep: true
  7272. });
  7273. watch(() => props.modelValue, (value) => {
  7274. if (value !== void 0) {
  7275. const values = tabs.value.map((tab) => {
  7276. var _a;
  7277. return (_a = tab.selected) == null ? void 0 : _a[valueKey];
  7278. });
  7279. if (values.includes(value)) {
  7280. return;
  7281. }
  7282. }
  7283. updateTabs();
  7284. });
  7285. return () => createVNode("div", {
  7286. "class": bem37()
  7287. }, [renderHeader(), renderTabs()]);
  7288. }
  7289. });
  7290. // node_modules/vant/es/cascader/index.mjs
  7291. var Cascader = withInstall(stdin_default43);
  7292. // node_modules/vant/es/cell-group/CellGroup.mjs
  7293. var [name41, bem38] = createNamespace("cell-group");
  7294. var cellGroupProps = {
  7295. title: String,
  7296. inset: Boolean,
  7297. border: truthProp
  7298. };
  7299. var stdin_default44 = defineComponent({
  7300. name: name41,
  7301. inheritAttrs: false,
  7302. props: cellGroupProps,
  7303. setup(props, {
  7304. slots,
  7305. attrs
  7306. }) {
  7307. const renderGroup = () => {
  7308. var _a;
  7309. return createVNode("div", mergeProps({
  7310. "class": [bem38({
  7311. inset: props.inset
  7312. }), {
  7313. [BORDER_TOP_BOTTOM]: props.border && !props.inset
  7314. }]
  7315. }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  7316. };
  7317. const renderTitle = () => createVNode("div", {
  7318. "class": bem38("title", {
  7319. inset: props.inset
  7320. })
  7321. }, [slots.title ? slots.title() : props.title]);
  7322. return () => {
  7323. if (props.title || slots.title) {
  7324. return createVNode(Fragment, null, [renderTitle(), renderGroup()]);
  7325. }
  7326. return renderGroup();
  7327. };
  7328. }
  7329. });
  7330. // node_modules/vant/es/cell-group/index.mjs
  7331. var CellGroup = withInstall(stdin_default44);
  7332. // node_modules/vant/es/checkbox-group/CheckboxGroup.mjs
  7333. var [name42, bem39] = createNamespace("checkbox-group");
  7334. var checkboxGroupProps = {
  7335. max: numericProp,
  7336. disabled: Boolean,
  7337. iconSize: numericProp,
  7338. direction: String,
  7339. modelValue: makeArrayProp(),
  7340. checkedColor: String
  7341. };
  7342. var CHECKBOX_GROUP_KEY = Symbol(name42);
  7343. var stdin_default45 = defineComponent({
  7344. name: name42,
  7345. props: checkboxGroupProps,
  7346. emits: ["change", "update:modelValue"],
  7347. setup(props, {
  7348. emit,
  7349. slots
  7350. }) {
  7351. const {
  7352. children,
  7353. linkChildren
  7354. } = useChildren(CHECKBOX_GROUP_KEY);
  7355. const updateValue = (value) => emit("update:modelValue", value);
  7356. const toggleAll = (options = {}) => {
  7357. if (typeof options === "boolean") {
  7358. options = {
  7359. checked: options
  7360. };
  7361. }
  7362. const {
  7363. checked,
  7364. skipDisabled
  7365. } = options;
  7366. const checkedChildren = children.filter((item) => {
  7367. if (!item.props.bindGroup) {
  7368. return false;
  7369. }
  7370. if (item.props.disabled && skipDisabled) {
  7371. return item.checked.value;
  7372. }
  7373. return checked != null ? checked : !item.checked.value;
  7374. });
  7375. const names = checkedChildren.map((item) => item.name);
  7376. updateValue(names);
  7377. };
  7378. watch(() => props.modelValue, (value) => emit("change", value));
  7379. useExpose({
  7380. toggleAll
  7381. });
  7382. useCustomFieldValue(() => props.modelValue);
  7383. linkChildren({
  7384. props,
  7385. updateValue
  7386. });
  7387. return () => {
  7388. var _a;
  7389. return createVNode("div", {
  7390. "class": bem39([props.direction])
  7391. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  7392. };
  7393. }
  7394. });
  7395. // node_modules/vant/es/checkbox/Checkbox.mjs
  7396. var [name43, bem40] = createNamespace("checkbox");
  7397. var checkboxProps = extend({}, checkerProps, {
  7398. bindGroup: truthProp
  7399. });
  7400. var stdin_default46 = defineComponent({
  7401. name: name43,
  7402. props: checkboxProps,
  7403. emits: ["change", "update:modelValue"],
  7404. setup(props, {
  7405. emit,
  7406. slots
  7407. }) {
  7408. const {
  7409. parent
  7410. } = useParent(CHECKBOX_GROUP_KEY);
  7411. const setParentValue = (checked2) => {
  7412. const {
  7413. name: name210
  7414. } = props;
  7415. const {
  7416. max,
  7417. modelValue
  7418. } = parent.props;
  7419. const value = modelValue.slice();
  7420. if (checked2) {
  7421. const overlimit = max && value.length >= max;
  7422. if (!overlimit && !value.includes(name210)) {
  7423. value.push(name210);
  7424. if (props.bindGroup) {
  7425. parent.updateValue(value);
  7426. }
  7427. }
  7428. } else {
  7429. const index = value.indexOf(name210);
  7430. if (index !== -1) {
  7431. value.splice(index, 1);
  7432. if (props.bindGroup) {
  7433. parent.updateValue(value);
  7434. }
  7435. }
  7436. }
  7437. };
  7438. const checked = computed(() => {
  7439. if (parent && props.bindGroup) {
  7440. return parent.props.modelValue.indexOf(props.name) !== -1;
  7441. }
  7442. return !!props.modelValue;
  7443. });
  7444. const toggle = (newValue = !checked.value) => {
  7445. if (parent && props.bindGroup) {
  7446. setParentValue(newValue);
  7447. } else {
  7448. emit("update:modelValue", newValue);
  7449. }
  7450. };
  7451. watch(() => props.modelValue, (value) => emit("change", value));
  7452. useExpose({
  7453. toggle,
  7454. props,
  7455. checked
  7456. });
  7457. useCustomFieldValue(() => props.modelValue);
  7458. return () => createVNode(stdin_default26, mergeProps({
  7459. "bem": bem40,
  7460. "role": "checkbox",
  7461. "parent": parent,
  7462. "checked": checked.value,
  7463. "onToggle": toggle
  7464. }, props), pick(slots, ["default", "icon"]));
  7465. }
  7466. });
  7467. // node_modules/vant/es/checkbox/index.mjs
  7468. var Checkbox = withInstall(stdin_default46);
  7469. // node_modules/vant/es/checkbox-group/index.mjs
  7470. var CheckboxGroup = withInstall(stdin_default45);
  7471. // node_modules/vant/es/circle/Circle.mjs
  7472. var [name44, bem41] = createNamespace("circle");
  7473. var uid = 0;
  7474. var format = (rate) => Math.min(Math.max(+rate, 0), 100);
  7475. function getPath(clockwise, viewBoxSize) {
  7476. const sweepFlag = clockwise ? 1 : 0;
  7477. 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`;
  7478. }
  7479. var circleProps = {
  7480. text: String,
  7481. size: numericProp,
  7482. fill: makeStringProp("none"),
  7483. rate: makeNumericProp(100),
  7484. speed: makeNumericProp(0),
  7485. color: [String, Object],
  7486. clockwise: truthProp,
  7487. layerColor: String,
  7488. currentRate: makeNumberProp(0),
  7489. strokeWidth: makeNumericProp(40),
  7490. strokeLinecap: String,
  7491. startPosition: makeStringProp("top")
  7492. };
  7493. var stdin_default47 = defineComponent({
  7494. name: name44,
  7495. props: circleProps,
  7496. emits: ["update:currentRate"],
  7497. setup(props, {
  7498. emit,
  7499. slots
  7500. }) {
  7501. const id = `van-circle-${uid++}`;
  7502. const viewBoxSize = computed(() => +props.strokeWidth + 1e3);
  7503. const path = computed(() => getPath(props.clockwise, viewBoxSize.value));
  7504. const svgStyle = computed(() => {
  7505. const ROTATE_ANGLE_MAP = {
  7506. top: 0,
  7507. right: 90,
  7508. bottom: 180,
  7509. left: 270
  7510. };
  7511. const angleValue = ROTATE_ANGLE_MAP[props.startPosition];
  7512. if (angleValue) {
  7513. return {
  7514. transform: `rotate(${angleValue}deg)`
  7515. };
  7516. }
  7517. });
  7518. watch(() => props.rate, (rate) => {
  7519. let rafId;
  7520. const startTime = Date.now();
  7521. const startRate = props.currentRate;
  7522. const endRate = format(rate);
  7523. const duration = Math.abs((startRate - endRate) * 1e3 / +props.speed);
  7524. const animate = () => {
  7525. const now = Date.now();
  7526. const progress = Math.min((now - startTime) / duration, 1);
  7527. const rate2 = progress * (endRate - startRate) + startRate;
  7528. emit("update:currentRate", format(parseFloat(rate2.toFixed(1))));
  7529. if (endRate > startRate ? rate2 < endRate : rate2 > endRate) {
  7530. rafId = raf(animate);
  7531. }
  7532. };
  7533. if (props.speed) {
  7534. if (rafId) {
  7535. cancelRaf(rafId);
  7536. }
  7537. rafId = raf(animate);
  7538. } else {
  7539. emit("update:currentRate", endRate);
  7540. }
  7541. }, {
  7542. immediate: true
  7543. });
  7544. const renderHover = () => {
  7545. const PERIMETER = 3140;
  7546. const {
  7547. strokeWidth,
  7548. currentRate,
  7549. strokeLinecap
  7550. } = props;
  7551. const offset2 = PERIMETER * currentRate / 100;
  7552. const color = isObject(props.color) ? `url(#${id})` : props.color;
  7553. const style = {
  7554. stroke: color,
  7555. strokeWidth: `${+strokeWidth + 1}px`,
  7556. strokeLinecap,
  7557. strokeDasharray: `${offset2}px ${PERIMETER}px`
  7558. };
  7559. return createVNode("path", {
  7560. "d": path.value,
  7561. "style": style,
  7562. "class": bem41("hover"),
  7563. "stroke": color
  7564. }, null);
  7565. };
  7566. const renderLayer = () => {
  7567. const style = {
  7568. fill: props.fill,
  7569. stroke: props.layerColor,
  7570. strokeWidth: `${props.strokeWidth}px`
  7571. };
  7572. return createVNode("path", {
  7573. "class": bem41("layer"),
  7574. "style": style,
  7575. "d": path.value
  7576. }, null);
  7577. };
  7578. const renderGradient = () => {
  7579. const {
  7580. color
  7581. } = props;
  7582. if (!isObject(color)) {
  7583. return;
  7584. }
  7585. const Stops = Object.keys(color).sort((a, b) => parseFloat(a) - parseFloat(b)).map((key, index) => createVNode("stop", {
  7586. "key": index,
  7587. "offset": key,
  7588. "stop-color": color[key]
  7589. }, null));
  7590. return createVNode("defs", null, [createVNode("linearGradient", {
  7591. "id": id,
  7592. "x1": "100%",
  7593. "y1": "0%",
  7594. "x2": "0%",
  7595. "y2": "0%"
  7596. }, [Stops])]);
  7597. };
  7598. const renderText = () => {
  7599. if (slots.default) {
  7600. return slots.default();
  7601. }
  7602. if (props.text) {
  7603. return createVNode("div", {
  7604. "class": bem41("text")
  7605. }, [props.text]);
  7606. }
  7607. };
  7608. return () => createVNode("div", {
  7609. "class": bem41(),
  7610. "style": getSizeStyle(props.size)
  7611. }, [createVNode("svg", {
  7612. "viewBox": `0 0 ${viewBoxSize.value} ${viewBoxSize.value}`,
  7613. "style": svgStyle.value
  7614. }, [renderGradient(), renderLayer(), renderHover()]), renderText()]);
  7615. }
  7616. });
  7617. // node_modules/vant/es/circle/index.mjs
  7618. var Circle = withInstall(stdin_default47);
  7619. // node_modules/vant/es/row/Row.mjs
  7620. var [name45, bem42] = createNamespace("row");
  7621. var ROW_KEY = Symbol(name45);
  7622. var rowProps = {
  7623. tag: makeStringProp("div"),
  7624. wrap: truthProp,
  7625. align: String,
  7626. gutter: makeNumericProp(0),
  7627. justify: String
  7628. };
  7629. var stdin_default48 = defineComponent({
  7630. name: name45,
  7631. props: rowProps,
  7632. setup(props, {
  7633. slots
  7634. }) {
  7635. const {
  7636. children,
  7637. linkChildren
  7638. } = useChildren(ROW_KEY);
  7639. const groups = computed(() => {
  7640. const groups2 = [[]];
  7641. let totalSpan = 0;
  7642. children.forEach((child, index) => {
  7643. totalSpan += Number(child.span);
  7644. if (totalSpan > 24) {
  7645. groups2.push([index]);
  7646. totalSpan -= 24;
  7647. } else {
  7648. groups2[groups2.length - 1].push(index);
  7649. }
  7650. });
  7651. return groups2;
  7652. });
  7653. const spaces = computed(() => {
  7654. const gutter = Number(props.gutter);
  7655. const spaces2 = [];
  7656. if (!gutter) {
  7657. return spaces2;
  7658. }
  7659. groups.value.forEach((group) => {
  7660. const averagePadding = gutter * (group.length - 1) / group.length;
  7661. group.forEach((item, index) => {
  7662. if (index === 0) {
  7663. spaces2.push({
  7664. right: averagePadding
  7665. });
  7666. } else {
  7667. const left2 = gutter - spaces2[item - 1].right;
  7668. const right2 = averagePadding - left2;
  7669. spaces2.push({
  7670. left: left2,
  7671. right: right2
  7672. });
  7673. }
  7674. });
  7675. });
  7676. return spaces2;
  7677. });
  7678. linkChildren({
  7679. spaces
  7680. });
  7681. return () => {
  7682. const {
  7683. tag,
  7684. wrap,
  7685. align,
  7686. justify
  7687. } = props;
  7688. return createVNode(tag, {
  7689. "class": bem42({
  7690. [`align-${align}`]: align,
  7691. [`justify-${justify}`]: justify,
  7692. nowrap: !wrap
  7693. })
  7694. }, {
  7695. default: () => {
  7696. var _a;
  7697. return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
  7698. }
  7699. });
  7700. };
  7701. }
  7702. });
  7703. // node_modules/vant/es/col/Col.mjs
  7704. var [name46, bem43] = createNamespace("col");
  7705. var colProps = {
  7706. tag: makeStringProp("div"),
  7707. span: makeNumericProp(0),
  7708. offset: numericProp
  7709. };
  7710. var stdin_default49 = defineComponent({
  7711. name: name46,
  7712. props: colProps,
  7713. setup(props, {
  7714. slots
  7715. }) {
  7716. const {
  7717. parent,
  7718. index
  7719. } = useParent(ROW_KEY);
  7720. const style = computed(() => {
  7721. if (!parent) {
  7722. return;
  7723. }
  7724. const {
  7725. spaces
  7726. } = parent;
  7727. if (spaces && spaces.value && spaces.value[index.value]) {
  7728. const {
  7729. left: left2,
  7730. right: right2
  7731. } = spaces.value[index.value];
  7732. return {
  7733. paddingLeft: left2 ? `${left2}px` : null,
  7734. paddingRight: right2 ? `${right2}px` : null
  7735. };
  7736. }
  7737. });
  7738. return () => {
  7739. const {
  7740. tag,
  7741. span,
  7742. offset: offset2
  7743. } = props;
  7744. return createVNode(tag, {
  7745. "style": style.value,
  7746. "class": bem43({
  7747. [span]: span,
  7748. [`offset-${offset2}`]: offset2
  7749. })
  7750. }, {
  7751. default: () => {
  7752. var _a;
  7753. return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
  7754. }
  7755. });
  7756. };
  7757. }
  7758. });
  7759. // node_modules/vant/es/col/index.mjs
  7760. var Col = withInstall(stdin_default49);
  7761. // node_modules/vant/es/collapse/Collapse.mjs
  7762. var [name47, bem44] = createNamespace("collapse");
  7763. var COLLAPSE_KEY = Symbol(name47);
  7764. var collapseProps = {
  7765. border: truthProp,
  7766. accordion: Boolean,
  7767. modelValue: {
  7768. type: [String, Number, Array],
  7769. default: ""
  7770. }
  7771. };
  7772. function validateModelValue(modelValue, accordion) {
  7773. if (accordion && Array.isArray(modelValue)) {
  7774. console.error('[Vant] Collapse: "v-model" should not be Array in accordion mode');
  7775. return false;
  7776. }
  7777. if (!accordion && !Array.isArray(modelValue)) {
  7778. console.error('[Vant] Collapse: "v-model" should be Array in non-accordion mode');
  7779. return false;
  7780. }
  7781. return true;
  7782. }
  7783. var stdin_default50 = defineComponent({
  7784. name: name47,
  7785. props: collapseProps,
  7786. emits: ["change", "update:modelValue"],
  7787. setup(props, {
  7788. emit,
  7789. slots
  7790. }) {
  7791. const {
  7792. linkChildren,
  7793. children
  7794. } = useChildren(COLLAPSE_KEY);
  7795. const updateName = (name210) => {
  7796. emit("change", name210);
  7797. emit("update:modelValue", name210);
  7798. };
  7799. const toggle = (name210, expanded) => {
  7800. const {
  7801. accordion,
  7802. modelValue
  7803. } = props;
  7804. if (accordion) {
  7805. updateName(name210 === modelValue ? "" : name210);
  7806. } else if (expanded) {
  7807. updateName(modelValue.concat(name210));
  7808. } else {
  7809. updateName(modelValue.filter((activeName) => activeName !== name210));
  7810. }
  7811. };
  7812. const toggleAll = (options = {}) => {
  7813. if (props.accordion) {
  7814. return;
  7815. }
  7816. if (typeof options === "boolean") {
  7817. options = {
  7818. expanded: options
  7819. };
  7820. }
  7821. const {
  7822. expanded,
  7823. skipDisabled
  7824. } = options;
  7825. const expandedChildren = children.filter((item) => {
  7826. if (item.disabled && skipDisabled) {
  7827. return item.expanded.value;
  7828. }
  7829. return expanded != null ? expanded : !item.expanded.value;
  7830. });
  7831. const names = expandedChildren.map((item) => item.itemName.value);
  7832. updateName(names);
  7833. };
  7834. const isExpanded = (name210) => {
  7835. const {
  7836. accordion,
  7837. modelValue
  7838. } = props;
  7839. if (!validateModelValue(modelValue, accordion)) {
  7840. return false;
  7841. }
  7842. return accordion ? modelValue === name210 : modelValue.includes(name210);
  7843. };
  7844. useExpose({
  7845. toggleAll
  7846. });
  7847. linkChildren({
  7848. toggle,
  7849. isExpanded
  7850. });
  7851. return () => {
  7852. var _a;
  7853. return createVNode("div", {
  7854. "class": [bem44(), {
  7855. [BORDER_TOP_BOTTOM]: props.border
  7856. }]
  7857. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  7858. };
  7859. }
  7860. });
  7861. // node_modules/vant/es/collapse/index.mjs
  7862. var Collapse = withInstall(stdin_default50);
  7863. // node_modules/vant/es/collapse-item/CollapseItem.mjs
  7864. var [name48, bem45] = createNamespace("collapse-item");
  7865. var CELL_SLOTS = ["icon", "title", "value", "label", "right-icon"];
  7866. var collapseItemProps = extend({}, cellSharedProps, {
  7867. name: numericProp,
  7868. isLink: truthProp,
  7869. disabled: Boolean,
  7870. readonly: Boolean,
  7871. lazyRender: truthProp
  7872. });
  7873. var stdin_default51 = defineComponent({
  7874. name: name48,
  7875. props: collapseItemProps,
  7876. setup(props, {
  7877. slots
  7878. }) {
  7879. const wrapperRef = ref();
  7880. const contentRef = ref();
  7881. const {
  7882. parent,
  7883. index
  7884. } = useParent(COLLAPSE_KEY);
  7885. if (!parent) {
  7886. if (true) {
  7887. console.error("[Vant] <CollapseItem> must be a child component of <Collapse>.");
  7888. }
  7889. return;
  7890. }
  7891. const name210 = computed(() => {
  7892. var _a;
  7893. return (_a = props.name) != null ? _a : index.value;
  7894. });
  7895. const expanded = computed(() => parent.isExpanded(name210.value));
  7896. const show = ref(expanded.value);
  7897. const lazyRender = useLazyRender(() => show.value || !props.lazyRender);
  7898. const onTransitionEnd = () => {
  7899. if (!expanded.value) {
  7900. show.value = false;
  7901. } else if (wrapperRef.value) {
  7902. wrapperRef.value.style.height = "";
  7903. }
  7904. };
  7905. watch(expanded, (value, oldValue) => {
  7906. if (oldValue === null) {
  7907. return;
  7908. }
  7909. if (value) {
  7910. show.value = true;
  7911. }
  7912. const tick = value ? nextTick : raf;
  7913. tick(() => {
  7914. if (!contentRef.value || !wrapperRef.value) {
  7915. return;
  7916. }
  7917. const {
  7918. offsetHeight
  7919. } = contentRef.value;
  7920. if (offsetHeight) {
  7921. const contentHeight = `${offsetHeight}px`;
  7922. wrapperRef.value.style.height = value ? "0" : contentHeight;
  7923. doubleRaf(() => {
  7924. if (wrapperRef.value) {
  7925. wrapperRef.value.style.height = value ? contentHeight : "0";
  7926. }
  7927. });
  7928. } else {
  7929. onTransitionEnd();
  7930. }
  7931. });
  7932. });
  7933. const toggle = (newValue = !expanded.value) => {
  7934. parent.toggle(name210.value, newValue);
  7935. };
  7936. const onClickTitle = () => {
  7937. if (!props.disabled && !props.readonly) {
  7938. toggle();
  7939. }
  7940. };
  7941. const renderTitle = () => {
  7942. const {
  7943. border,
  7944. disabled,
  7945. readonly
  7946. } = props;
  7947. const attrs = pick(props, Object.keys(cellSharedProps));
  7948. if (readonly) {
  7949. attrs.isLink = false;
  7950. }
  7951. if (disabled || readonly) {
  7952. attrs.clickable = false;
  7953. }
  7954. return createVNode(Cell, mergeProps({
  7955. "role": "button",
  7956. "class": bem45("title", {
  7957. disabled,
  7958. expanded: expanded.value,
  7959. borderless: !border
  7960. }),
  7961. "aria-expanded": String(expanded.value),
  7962. "onClick": onClickTitle
  7963. }, attrs), pick(slots, CELL_SLOTS));
  7964. };
  7965. const renderContent = lazyRender(() => {
  7966. var _a;
  7967. return withDirectives(createVNode("div", {
  7968. "ref": wrapperRef,
  7969. "class": bem45("wrapper"),
  7970. "onTransitionend": onTransitionEnd
  7971. }, [createVNode("div", {
  7972. "ref": contentRef,
  7973. "class": bem45("content")
  7974. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]), [[vShow, show.value]]);
  7975. });
  7976. useExpose({
  7977. toggle,
  7978. expanded,
  7979. itemName: name210
  7980. });
  7981. return () => createVNode("div", {
  7982. "class": [bem45({
  7983. border: index.value && props.border
  7984. })]
  7985. }, [renderTitle(), renderContent()]);
  7986. }
  7987. });
  7988. // node_modules/vant/es/collapse-item/index.mjs
  7989. var CollapseItem = withInstall(stdin_default51);
  7990. // node_modules/vant/es/config-provider/index.mjs
  7991. var ConfigProvider = withInstall(stdin_default5);
  7992. // node_modules/vant/es/contact-card/ContactCard.mjs
  7993. var [name49, bem46, t7] = createNamespace("contact-card");
  7994. var contactCardProps = {
  7995. tel: String,
  7996. name: String,
  7997. type: makeStringProp("add"),
  7998. addText: String,
  7999. editable: truthProp
  8000. };
  8001. var stdin_default52 = defineComponent({
  8002. name: name49,
  8003. props: contactCardProps,
  8004. emits: ["click"],
  8005. setup(props, {
  8006. emit
  8007. }) {
  8008. const onClick = (event) => {
  8009. if (props.editable) {
  8010. emit("click", event);
  8011. }
  8012. };
  8013. const renderContent = () => {
  8014. if (props.type === "add") {
  8015. return props.addText || t7("addContact");
  8016. }
  8017. return [createVNode("div", null, [`${t7("name")}\uFF1A${props.name}`]), createVNode("div", null, [`${t7("tel")}\uFF1A${props.tel}`])];
  8018. };
  8019. return () => createVNode(Cell, {
  8020. "center": true,
  8021. "icon": props.type === "edit" ? "contact" : "add-square",
  8022. "class": bem46([props.type]),
  8023. "border": false,
  8024. "isLink": props.editable,
  8025. "valueClass": bem46("value"),
  8026. "onClick": onClick
  8027. }, {
  8028. value: renderContent
  8029. });
  8030. }
  8031. });
  8032. // node_modules/vant/es/contact-card/index.mjs
  8033. var ContactCard = withInstall(stdin_default52);
  8034. // node_modules/vant/es/contact-edit/ContactEdit.mjs
  8035. var [name50, bem47, t8] = createNamespace("contact-edit");
  8036. var DEFAULT_CONTACT = {
  8037. tel: "",
  8038. name: ""
  8039. };
  8040. var contactEditProps = {
  8041. isEdit: Boolean,
  8042. isSaving: Boolean,
  8043. isDeleting: Boolean,
  8044. showSetDefault: Boolean,
  8045. setDefaultLabel: String,
  8046. contactInfo: {
  8047. type: Object,
  8048. default: () => extend({}, DEFAULT_CONTACT)
  8049. },
  8050. telValidator: {
  8051. type: Function,
  8052. default: isMobile
  8053. }
  8054. };
  8055. var stdin_default53 = defineComponent({
  8056. name: name50,
  8057. props: contactEditProps,
  8058. emits: ["save", "delete", "change-default"],
  8059. setup(props, {
  8060. emit
  8061. }) {
  8062. const contact = reactive(extend({}, DEFAULT_CONTACT, props.contactInfo));
  8063. const onSave = () => {
  8064. if (!props.isSaving) {
  8065. emit("save", contact);
  8066. }
  8067. };
  8068. const onDelete = () => emit("delete", contact);
  8069. const renderButtons = () => createVNode("div", {
  8070. "class": bem47("buttons")
  8071. }, [createVNode(Button, {
  8072. "block": true,
  8073. "round": true,
  8074. "type": "danger",
  8075. "text": t8("save"),
  8076. "class": bem47("button"),
  8077. "loading": props.isSaving,
  8078. "nativeType": "submit"
  8079. }, null), props.isEdit && createVNode(Button, {
  8080. "block": true,
  8081. "round": true,
  8082. "text": t8("delete"),
  8083. "class": bem47("button"),
  8084. "loading": props.isDeleting,
  8085. "onClick": onDelete
  8086. }, null)]);
  8087. const renderSwitch = () => createVNode(Switch, {
  8088. "modelValue": contact.isDefault,
  8089. "onUpdate:modelValue": ($event) => contact.isDefault = $event,
  8090. "size": 24,
  8091. "onChange": (checked) => emit("change-default", checked)
  8092. }, null);
  8093. const renderSetDefault = () => {
  8094. if (props.showSetDefault) {
  8095. return createVNode(Cell, {
  8096. "title": props.setDefaultLabel,
  8097. "class": bem47("switch-cell"),
  8098. "border": false
  8099. }, {
  8100. "right-icon": renderSwitch
  8101. });
  8102. }
  8103. };
  8104. watch(() => props.contactInfo, (value) => extend(contact, DEFAULT_CONTACT, value));
  8105. return () => createVNode(Form, {
  8106. "class": bem47(),
  8107. "onSubmit": onSave
  8108. }, {
  8109. default: () => [createVNode("div", {
  8110. "class": bem47("fields")
  8111. }, [createVNode(Field, {
  8112. "modelValue": contact.name,
  8113. "onUpdate:modelValue": ($event) => contact.name = $event,
  8114. "clearable": true,
  8115. "label": t8("name"),
  8116. "rules": [{
  8117. required: true,
  8118. message: t8("nameEmpty")
  8119. }],
  8120. "maxlength": "30",
  8121. "placeholder": t8("name")
  8122. }, null), createVNode(Field, {
  8123. "modelValue": contact.tel,
  8124. "onUpdate:modelValue": ($event) => contact.tel = $event,
  8125. "clearable": true,
  8126. "type": "tel",
  8127. "label": t8("tel"),
  8128. "rules": [{
  8129. validator: props.telValidator,
  8130. message: t8("telInvalid")
  8131. }],
  8132. "placeholder": t8("tel")
  8133. }, null)]), renderSetDefault(), renderButtons()]
  8134. });
  8135. }
  8136. });
  8137. // node_modules/vant/es/contact-edit/index.mjs
  8138. var ContactEdit = withInstall(stdin_default53);
  8139. // node_modules/vant/es/contact-list/ContactList.mjs
  8140. var [name51, bem48, t9] = createNamespace("contact-list");
  8141. var contactListProps = {
  8142. list: Array,
  8143. addText: String,
  8144. modelValue: unknownProp,
  8145. defaultTagText: String
  8146. };
  8147. var stdin_default54 = defineComponent({
  8148. name: name51,
  8149. props: contactListProps,
  8150. emits: ["add", "edit", "select", "update:modelValue"],
  8151. setup(props, {
  8152. emit
  8153. }) {
  8154. const renderItem = (item, index) => {
  8155. const onClick = () => {
  8156. emit("update:modelValue", item.id);
  8157. emit("select", item, index);
  8158. };
  8159. const renderRightIcon = () => createVNode(Radio, {
  8160. "class": bem48("radio"),
  8161. "name": item.id,
  8162. "iconSize": 16
  8163. }, null);
  8164. const renderEditIcon = () => createVNode(Icon, {
  8165. "name": "edit",
  8166. "class": bem48("edit"),
  8167. "onClick": (event) => {
  8168. event.stopPropagation();
  8169. emit("edit", item, index);
  8170. }
  8171. }, null);
  8172. const renderContent = () => {
  8173. const nodes = [`${item.name}\uFF0C${item.tel}`];
  8174. if (item.isDefault && props.defaultTagText) {
  8175. nodes.push(createVNode(Tag, {
  8176. "type": "danger",
  8177. "round": true,
  8178. "class": bem48("item-tag")
  8179. }, {
  8180. default: () => [props.defaultTagText]
  8181. }));
  8182. }
  8183. return nodes;
  8184. };
  8185. return createVNode(Cell, {
  8186. "key": item.id,
  8187. "isLink": true,
  8188. "center": true,
  8189. "class": bem48("item"),
  8190. "valueClass": bem48("item-value"),
  8191. "onClick": onClick
  8192. }, {
  8193. icon: renderEditIcon,
  8194. value: renderContent,
  8195. "right-icon": renderRightIcon
  8196. });
  8197. };
  8198. return () => createVNode("div", {
  8199. "class": bem48()
  8200. }, [createVNode(RadioGroup, {
  8201. "modelValue": props.modelValue,
  8202. "class": bem48("group")
  8203. }, {
  8204. default: () => [props.list && props.list.map(renderItem)]
  8205. }), createVNode("div", {
  8206. "class": [bem48("bottom"), "van-safe-area-bottom"]
  8207. }, [createVNode(Button, {
  8208. "round": true,
  8209. "block": true,
  8210. "type": "danger",
  8211. "class": bem48("add"),
  8212. "text": props.addText || t9("addContact"),
  8213. "onClick": () => emit("add")
  8214. }, null)])]);
  8215. }
  8216. });
  8217. // node_modules/vant/es/contact-list/index.mjs
  8218. var ContactList = withInstall(stdin_default54);
  8219. // node_modules/vant/es/count-down/utils.mjs
  8220. function parseFormat(format3, currentTime) {
  8221. const { days } = currentTime;
  8222. let { hours, minutes, seconds, milliseconds } = currentTime;
  8223. if (format3.includes("DD")) {
  8224. format3 = format3.replace("DD", padZero(days));
  8225. } else {
  8226. hours += days * 24;
  8227. }
  8228. if (format3.includes("HH")) {
  8229. format3 = format3.replace("HH", padZero(hours));
  8230. } else {
  8231. minutes += hours * 60;
  8232. }
  8233. if (format3.includes("mm")) {
  8234. format3 = format3.replace("mm", padZero(minutes));
  8235. } else {
  8236. seconds += minutes * 60;
  8237. }
  8238. if (format3.includes("ss")) {
  8239. format3 = format3.replace("ss", padZero(seconds));
  8240. } else {
  8241. milliseconds += seconds * 1e3;
  8242. }
  8243. if (format3.includes("S")) {
  8244. const ms = padZero(milliseconds, 3);
  8245. if (format3.includes("SSS")) {
  8246. format3 = format3.replace("SSS", ms);
  8247. } else if (format3.includes("SS")) {
  8248. format3 = format3.replace("SS", ms.slice(0, 2));
  8249. } else {
  8250. format3 = format3.replace("S", ms.charAt(0));
  8251. }
  8252. }
  8253. return format3;
  8254. }
  8255. // node_modules/vant/es/count-down/CountDown.mjs
  8256. var [name52, bem49] = createNamespace("count-down");
  8257. var countDownProps = {
  8258. time: makeNumericProp(0),
  8259. format: makeStringProp("HH:mm:ss"),
  8260. autoStart: truthProp,
  8261. millisecond: Boolean
  8262. };
  8263. var stdin_default55 = defineComponent({
  8264. name: name52,
  8265. props: countDownProps,
  8266. emits: ["change", "finish"],
  8267. setup(props, {
  8268. emit,
  8269. slots
  8270. }) {
  8271. const {
  8272. start: start2,
  8273. pause,
  8274. reset,
  8275. current: current2
  8276. } = useCountDown({
  8277. time: +props.time,
  8278. millisecond: props.millisecond,
  8279. onChange: (current22) => emit("change", current22),
  8280. onFinish: () => emit("finish")
  8281. });
  8282. const timeText = computed(() => parseFormat(props.format, current2.value));
  8283. const resetTime = () => {
  8284. reset(+props.time);
  8285. if (props.autoStart) {
  8286. start2();
  8287. }
  8288. };
  8289. watch(() => props.time, resetTime, {
  8290. immediate: true
  8291. });
  8292. useExpose({
  8293. start: start2,
  8294. pause,
  8295. reset: resetTime
  8296. });
  8297. return () => createVNode("div", {
  8298. "role": "timer",
  8299. "class": bem49()
  8300. }, [slots.default ? slots.default(current2.value) : timeText.value]);
  8301. }
  8302. });
  8303. // node_modules/vant/es/count-down/index.mjs
  8304. var CountDown = withInstall(stdin_default55);
  8305. // node_modules/vant/es/coupon/utils.mjs
  8306. function getDate(timeStamp) {
  8307. const date = new Date(timeStamp * 1e3);
  8308. return `${date.getFullYear()}.${padZero(date.getMonth() + 1)}.${padZero(date.getDate())}`;
  8309. }
  8310. var formatDiscount = (discount) => (discount / 10).toFixed(discount % 10 === 0 ? 0 : 1);
  8311. var formatAmount = (amount) => (amount / 100).toFixed(amount % 100 === 0 ? 0 : amount % 10 === 0 ? 1 : 2);
  8312. // node_modules/vant/es/coupon/Coupon.mjs
  8313. var [name53, bem50, t10] = createNamespace("coupon");
  8314. var stdin_default56 = defineComponent({
  8315. name: name53,
  8316. props: {
  8317. chosen: Boolean,
  8318. coupon: makeRequiredProp(Object),
  8319. disabled: Boolean,
  8320. currency: makeStringProp("\xA5")
  8321. },
  8322. setup(props) {
  8323. const validPeriod = computed(() => {
  8324. const {
  8325. startAt,
  8326. endAt
  8327. } = props.coupon;
  8328. return `${getDate(startAt)} - ${getDate(endAt)}`;
  8329. });
  8330. const faceAmount = computed(() => {
  8331. const {
  8332. coupon,
  8333. currency
  8334. } = props;
  8335. if (coupon.valueDesc) {
  8336. return [coupon.valueDesc, createVNode("span", null, [coupon.unitDesc || ""])];
  8337. }
  8338. if (coupon.denominations) {
  8339. const denominations = formatAmount(coupon.denominations);
  8340. return [createVNode("span", null, [currency]), ` ${denominations}`];
  8341. }
  8342. if (coupon.discount) {
  8343. return t10("discount", formatDiscount(coupon.discount));
  8344. }
  8345. return "";
  8346. });
  8347. const conditionMessage = computed(() => {
  8348. const condition = formatAmount(props.coupon.originCondition || 0);
  8349. return condition === "0" ? t10("unlimited") : t10("condition", condition);
  8350. });
  8351. return () => {
  8352. const {
  8353. chosen,
  8354. coupon,
  8355. disabled
  8356. } = props;
  8357. const description = disabled && coupon.reason || coupon.description;
  8358. return createVNode("div", {
  8359. "class": bem50({
  8360. disabled
  8361. })
  8362. }, [createVNode("div", {
  8363. "class": bem50("content")
  8364. }, [createVNode("div", {
  8365. "class": bem50("head")
  8366. }, [createVNode("h2", {
  8367. "class": bem50("amount")
  8368. }, [faceAmount.value]), createVNode("p", {
  8369. "class": bem50("condition")
  8370. }, [coupon.condition || conditionMessage.value])]), createVNode("div", {
  8371. "class": bem50("body")
  8372. }, [createVNode("p", {
  8373. "class": bem50("name")
  8374. }, [coupon.name]), createVNode("p", {
  8375. "class": bem50("valid")
  8376. }, [validPeriod.value]), !disabled && createVNode(Checkbox, {
  8377. "class": bem50("corner"),
  8378. "modelValue": chosen
  8379. }, null)])]), description && createVNode("p", {
  8380. "class": bem50("description")
  8381. }, [description])]);
  8382. };
  8383. }
  8384. });
  8385. // node_modules/vant/es/coupon/index.mjs
  8386. var Coupon = withInstall(stdin_default56);
  8387. // node_modules/vant/es/coupon-cell/CouponCell.mjs
  8388. var [name54, bem51, t11] = createNamespace("coupon-cell");
  8389. var couponCellProps = {
  8390. title: String,
  8391. border: truthProp,
  8392. editable: truthProp,
  8393. coupons: makeArrayProp(),
  8394. currency: makeStringProp("\xA5"),
  8395. chosenCoupon: makeNumericProp(-1)
  8396. };
  8397. function formatValue({
  8398. coupons,
  8399. chosenCoupon,
  8400. currency
  8401. }) {
  8402. const coupon = coupons[+chosenCoupon];
  8403. if (coupon) {
  8404. let value = 0;
  8405. if (isDef(coupon.value)) {
  8406. ({
  8407. value
  8408. } = coupon);
  8409. } else if (isDef(coupon.denominations)) {
  8410. value = coupon.denominations;
  8411. }
  8412. return `-${currency} ${(value / 100).toFixed(2)}`;
  8413. }
  8414. return coupons.length === 0 ? t11("noCoupon") : t11("count", coupons.length);
  8415. }
  8416. var stdin_default57 = defineComponent({
  8417. name: name54,
  8418. props: couponCellProps,
  8419. setup(props) {
  8420. return () => {
  8421. const selected = props.coupons[+props.chosenCoupon];
  8422. return createVNode(Cell, {
  8423. "class": bem51(),
  8424. "value": formatValue(props),
  8425. "title": props.title || t11("title"),
  8426. "border": props.border,
  8427. "isLink": props.editable,
  8428. "valueClass": bem51("value", {
  8429. selected
  8430. })
  8431. }, null);
  8432. };
  8433. }
  8434. });
  8435. // node_modules/vant/es/coupon-cell/index.mjs
  8436. var CouponCell = withInstall(stdin_default57);
  8437. // node_modules/vant/es/empty/Empty.mjs
  8438. var [name55, bem52] = createNamespace("empty");
  8439. var emptyProps = {
  8440. image: makeStringProp("default"),
  8441. imageSize: [Number, String, Array],
  8442. description: String
  8443. };
  8444. var stdin_default58 = defineComponent({
  8445. name: name55,
  8446. props: emptyProps,
  8447. setup(props, {
  8448. slots
  8449. }) {
  8450. const renderDescription = () => {
  8451. const description = slots.description ? slots.description() : props.description;
  8452. if (description) {
  8453. return createVNode("p", {
  8454. "class": bem52("description")
  8455. }, [description]);
  8456. }
  8457. };
  8458. const renderBottom = () => {
  8459. if (slots.default) {
  8460. return createVNode("div", {
  8461. "class": bem52("bottom")
  8462. }, [slots.default()]);
  8463. }
  8464. };
  8465. const baseId = useId();
  8466. const getId = (num) => `${baseId}-${num}`;
  8467. const getUrlById = (num) => `url(#${getId(num)})`;
  8468. const renderStop = (color, offset2, opacity) => createVNode("stop", {
  8469. "stop-color": color,
  8470. "offset": `${offset2}%`,
  8471. "stop-opacity": opacity
  8472. }, null);
  8473. const renderStops = (fromColor, toColor) => [renderStop(fromColor, 0), renderStop(toColor, 100)];
  8474. const renderShadow = (id) => [createVNode("defs", null, [createVNode("radialGradient", {
  8475. "id": getId(id),
  8476. "cx": "50%",
  8477. "cy": "54%",
  8478. "fx": "50%",
  8479. "fy": "54%",
  8480. "r": "297%",
  8481. "gradientTransform": "matrix(-.16 0 0 -.33 .58 .72)"
  8482. }, [renderStop("#EBEDF0", 0), renderStop("#F2F3F5", 100, 0.3)])]), createVNode("ellipse", {
  8483. "fill": getUrlById(id),
  8484. "opacity": ".8",
  8485. "cx": "80",
  8486. "cy": "140",
  8487. "rx": "46",
  8488. "ry": "8"
  8489. }, null)];
  8490. const renderBuilding = () => [createVNode("defs", null, [createVNode("linearGradient", {
  8491. "id": getId("a"),
  8492. "x1": "64%",
  8493. "y1": "100%",
  8494. "x2": "64%"
  8495. }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)])]), createVNode("g", {
  8496. "opacity": ".8"
  8497. }, [createVNode("path", {
  8498. "d": "M36 131V53H16v20H2v58h34z",
  8499. "fill": getUrlById("a")
  8500. }, null), createVNode("path", {
  8501. "d": "M123 15h22v14h9v77h-31V15z",
  8502. "fill": getUrlById("a")
  8503. }, null)])];
  8504. const renderCloud = () => [createVNode("defs", null, [createVNode("linearGradient", {
  8505. "id": getId("b"),
  8506. "x1": "64%",
  8507. "y1": "97%",
  8508. "x2": "64%",
  8509. "y2": "0%"
  8510. }, [renderStop("#F2F3F5", 0, 0.3), renderStop("#F2F3F5", 100)])]), createVNode("g", {
  8511. "opacity": ".8"
  8512. }, [createVNode("path", {
  8513. "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",
  8514. "fill": getUrlById("b")
  8515. }, null), createVNode("path", {
  8516. "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",
  8517. "fill": getUrlById("b")
  8518. }, null)])];
  8519. const renderNetwork = () => createVNode("svg", {
  8520. "viewBox": "0 0 160 160"
  8521. }, [createVNode("defs", null, [createVNode("linearGradient", {
  8522. "id": getId(1),
  8523. "x1": "64%",
  8524. "y1": "100%",
  8525. "x2": "64%"
  8526. }, [renderStop("#FFF", 0, 0.5), renderStop("#F2F3F5", 100)]), createVNode("linearGradient", {
  8527. "id": getId(2),
  8528. "x1": "50%",
  8529. "x2": "50%",
  8530. "y2": "84%"
  8531. }, [renderStop("#EBEDF0", 0), renderStop("#DCDEE0", 100, 0)]), createVNode("linearGradient", {
  8532. "id": getId(3),
  8533. "x1": "100%",
  8534. "x2": "100%",
  8535. "y2": "100%"
  8536. }, [renderStops("#EAEDF0", "#DCDEE0")]), createVNode("radialGradient", {
  8537. "id": getId(4),
  8538. "cx": "50%",
  8539. "cy": "0%",
  8540. "fx": "50%",
  8541. "fy": "0%",
  8542. "r": "100%",
  8543. "gradientTransform": "matrix(0 1 -.54 0 .5 -.5)"
  8544. }, [renderStop("#EBEDF0", 0), renderStop("#FFF", 100, 0)])]), createVNode("g", {
  8545. "fill": "none"
  8546. }, [renderBuilding(), createVNode("path", {
  8547. "fill": getUrlById(4),
  8548. "d": "M0 139h160v21H0z"
  8549. }, null), createVNode("path", {
  8550. "d": "M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",
  8551. "fill": getUrlById(2)
  8552. }, null), createVNode("g", {
  8553. "opacity": ".6",
  8554. "stroke-linecap": "round",
  8555. "stroke-width": "7"
  8556. }, [createVNode("path", {
  8557. "d": "M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",
  8558. "stroke": getUrlById(3)
  8559. }, null), createVNode("path", {
  8560. "d": "M53 36a34 34 0 0 0 0 48",
  8561. "stroke": getUrlById(3)
  8562. }, null), createVNode("path", {
  8563. "d": "M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",
  8564. "stroke": getUrlById(3)
  8565. }, null), createVNode("path", {
  8566. "d": "M106 84a34 34 0 0 0 0-48",
  8567. "stroke": getUrlById(3)
  8568. }, null)]), createVNode("g", {
  8569. "transform": "translate(31 105)"
  8570. }, [createVNode("rect", {
  8571. "fill": "#EBEDF0",
  8572. "width": "98",
  8573. "height": "34",
  8574. "rx": "2"
  8575. }, null), createVNode("rect", {
  8576. "fill": "#FFF",
  8577. "x": "9",
  8578. "y": "8",
  8579. "width": "80",
  8580. "height": "18",
  8581. "rx": "1.1"
  8582. }, null), createVNode("rect", {
  8583. "fill": "#EBEDF0",
  8584. "x": "15",
  8585. "y": "12",
  8586. "width": "18",
  8587. "height": "6",
  8588. "rx": "1.1"
  8589. }, null)])])]);
  8590. const renderMaterial = () => createVNode("svg", {
  8591. "viewBox": "0 0 160 160"
  8592. }, [createVNode("defs", null, [createVNode("linearGradient", {
  8593. "x1": "50%",
  8594. "x2": "50%",
  8595. "y2": "100%",
  8596. "id": getId(5)
  8597. }, [renderStops("#F2F3F5", "#DCDEE0")]), createVNode("linearGradient", {
  8598. "x1": "95%",
  8599. "y1": "48%",
  8600. "x2": "5.5%",
  8601. "y2": "51%",
  8602. "id": getId(6)
  8603. }, [renderStops("#EAEDF1", "#DCDEE0")]), createVNode("linearGradient", {
  8604. "y1": "45%",
  8605. "x2": "100%",
  8606. "y2": "54%",
  8607. "id": getId(7)
  8608. }, [renderStops("#EAEDF1", "#DCDEE0")])]), renderBuilding(), renderCloud(), createVNode("g", {
  8609. "transform": "translate(36 50)",
  8610. "fill": "none"
  8611. }, [createVNode("g", {
  8612. "transform": "translate(8)"
  8613. }, [createVNode("rect", {
  8614. "fill": "#EBEDF0",
  8615. "opacity": ".6",
  8616. "x": "38",
  8617. "y": "13",
  8618. "width": "36",
  8619. "height": "53",
  8620. "rx": "2"
  8621. }, null), createVNode("rect", {
  8622. "fill": getUrlById(5),
  8623. "width": "64",
  8624. "height": "66",
  8625. "rx": "2"
  8626. }, null), createVNode("rect", {
  8627. "fill": "#FFF",
  8628. "x": "6",
  8629. "y": "6",
  8630. "width": "52",
  8631. "height": "55",
  8632. "rx": "1"
  8633. }, null), createVNode("g", {
  8634. "transform": "translate(15 17)",
  8635. "fill": getUrlById(6)
  8636. }, [createVNode("rect", {
  8637. "width": "34",
  8638. "height": "6",
  8639. "rx": "1"
  8640. }, null), createVNode("path", {
  8641. "d": "M0 14h34v6H0z"
  8642. }, null), createVNode("rect", {
  8643. "y": "28",
  8644. "width": "34",
  8645. "height": "6",
  8646. "rx": "1"
  8647. }, null)])]), createVNode("rect", {
  8648. "fill": getUrlById(7),
  8649. "y": "61",
  8650. "width": "88",
  8651. "height": "28",
  8652. "rx": "1"
  8653. }, null), createVNode("rect", {
  8654. "fill": "#F7F8FA",
  8655. "x": "29",
  8656. "y": "72",
  8657. "width": "30",
  8658. "height": "6",
  8659. "rx": "1"
  8660. }, null)])]);
  8661. const renderError = () => createVNode("svg", {
  8662. "viewBox": "0 0 160 160"
  8663. }, [createVNode("defs", null, [createVNode("linearGradient", {
  8664. "x1": "50%",
  8665. "x2": "50%",
  8666. "y2": "100%",
  8667. "id": getId(8)
  8668. }, [renderStops("#EAEDF1", "#DCDEE0")])]), renderBuilding(), renderCloud(), renderShadow("c"), createVNode("path", {
  8669. "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",
  8670. "fill": getUrlById(8)
  8671. }, null)]);
  8672. const renderSearch = () => createVNode("svg", {
  8673. "viewBox": "0 0 160 160"
  8674. }, [createVNode("defs", null, [createVNode("linearGradient", {
  8675. "x1": "50%",
  8676. "y1": "100%",
  8677. "x2": "50%",
  8678. "id": getId(9)
  8679. }, [renderStops("#EEE", "#D8D8D8")]), createVNode("linearGradient", {
  8680. "x1": "100%",
  8681. "y1": "50%",
  8682. "y2": "50%",
  8683. "id": getId(10)
  8684. }, [renderStops("#F2F3F5", "#DCDEE0")]), createVNode("linearGradient", {
  8685. "x1": "50%",
  8686. "x2": "50%",
  8687. "y2": "100%",
  8688. "id": getId(11)
  8689. }, [renderStops("#F2F3F5", "#DCDEE0")]), createVNode("linearGradient", {
  8690. "x1": "50%",
  8691. "x2": "50%",
  8692. "y2": "100%",
  8693. "id": getId(12)
  8694. }, [renderStops("#FFF", "#F7F8FA")])]), renderBuilding(), renderCloud(), renderShadow("d"), createVNode("g", {
  8695. "transform": "rotate(-45 113 -4)",
  8696. "fill": "none"
  8697. }, [createVNode("rect", {
  8698. "fill": getUrlById(9),
  8699. "x": "24",
  8700. "y": "52.8",
  8701. "width": "5.8",
  8702. "height": "19",
  8703. "rx": "1"
  8704. }, null), createVNode("rect", {
  8705. "fill": getUrlById(10),
  8706. "x": "22.1",
  8707. "y": "67.3",
  8708. "width": "9.9",
  8709. "height": "28",
  8710. "rx": "1"
  8711. }, null), createVNode("circle", {
  8712. "stroke": getUrlById(11),
  8713. "stroke-width": "8",
  8714. "cx": "27",
  8715. "cy": "27",
  8716. "r": "27"
  8717. }, null), createVNode("circle", {
  8718. "fill": getUrlById(12),
  8719. "cx": "27",
  8720. "cy": "27",
  8721. "r": "16"
  8722. }, null), createVNode("path", {
  8723. "d": "M37 7c-8 0-15 5-16 12",
  8724. "stroke": getUrlById(11),
  8725. "stroke-width": "3",
  8726. "opacity": ".5",
  8727. "stroke-linecap": "round",
  8728. "transform": "rotate(45 29 13)"
  8729. }, null)])]);
  8730. const renderImage = () => {
  8731. var _a;
  8732. if (slots.image) {
  8733. return slots.image();
  8734. }
  8735. const PRESET_IMAGES = {
  8736. error: renderError,
  8737. search: renderSearch,
  8738. network: renderNetwork,
  8739. default: renderMaterial
  8740. };
  8741. return ((_a = PRESET_IMAGES[props.image]) == null ? void 0 : _a.call(PRESET_IMAGES)) || createVNode("img", {
  8742. "src": props.image
  8743. }, null);
  8744. };
  8745. return () => createVNode("div", {
  8746. "class": bem52()
  8747. }, [createVNode("div", {
  8748. "class": bem52("image"),
  8749. "style": getSizeStyle(props.imageSize)
  8750. }, [renderImage()]), renderDescription(), renderBottom()]);
  8751. }
  8752. });
  8753. // node_modules/vant/es/empty/index.mjs
  8754. var Empty = withInstall(stdin_default58);
  8755. // node_modules/vant/es/coupon-list/CouponList.mjs
  8756. var [name56, bem53, t12] = createNamespace("coupon-list");
  8757. var couponListProps = {
  8758. code: makeStringProp(""),
  8759. coupons: makeArrayProp(),
  8760. currency: makeStringProp("\xA5"),
  8761. showCount: truthProp,
  8762. emptyImage: String,
  8763. chosenCoupon: makeNumberProp(-1),
  8764. enabledTitle: String,
  8765. disabledTitle: String,
  8766. disabledCoupons: makeArrayProp(),
  8767. showExchangeBar: truthProp,
  8768. showCloseButton: truthProp,
  8769. closeButtonText: String,
  8770. inputPlaceholder: String,
  8771. exchangeMinLength: makeNumberProp(1),
  8772. exchangeButtonText: String,
  8773. displayedCouponIndex: makeNumberProp(-1),
  8774. exchangeButtonLoading: Boolean,
  8775. exchangeButtonDisabled: Boolean
  8776. };
  8777. var stdin_default59 = defineComponent({
  8778. name: name56,
  8779. props: couponListProps,
  8780. emits: ["change", "exchange", "update:code"],
  8781. setup(props, {
  8782. emit,
  8783. slots
  8784. }) {
  8785. const [couponRefs, setCouponRefs] = useRefs();
  8786. const root = ref();
  8787. const barRef = ref();
  8788. const activeTab = ref(0);
  8789. const listHeight = ref(0);
  8790. const currentCode = ref(props.code);
  8791. const buttonDisabled = computed(() => !props.exchangeButtonLoading && (props.exchangeButtonDisabled || !currentCode.value || currentCode.value.length < props.exchangeMinLength));
  8792. const updateListHeight = () => {
  8793. const TABS_HEIGHT = 44;
  8794. const rootHeight = useRect(root).height;
  8795. const headerHeight = useRect(barRef).height + TABS_HEIGHT;
  8796. listHeight.value = (rootHeight > headerHeight ? rootHeight : windowHeight.value) - headerHeight;
  8797. };
  8798. const onExchange = () => {
  8799. emit("exchange", currentCode.value);
  8800. if (!props.code) {
  8801. currentCode.value = "";
  8802. }
  8803. };
  8804. const scrollToCoupon = (index) => {
  8805. nextTick(() => {
  8806. var _a;
  8807. return (_a = couponRefs.value[index]) == null ? void 0 : _a.scrollIntoView();
  8808. });
  8809. };
  8810. const renderEmpty = () => createVNode(Empty, {
  8811. "image": props.emptyImage
  8812. }, {
  8813. default: () => [createVNode("p", {
  8814. "class": bem53("empty-tip")
  8815. }, [t12("noCoupon")])]
  8816. });
  8817. const renderExchangeBar = () => {
  8818. if (props.showExchangeBar) {
  8819. return createVNode("div", {
  8820. "ref": barRef,
  8821. "class": bem53("exchange-bar")
  8822. }, [createVNode(Field, {
  8823. "modelValue": currentCode.value,
  8824. "onUpdate:modelValue": ($event) => currentCode.value = $event,
  8825. "clearable": true,
  8826. "border": false,
  8827. "class": bem53("field"),
  8828. "placeholder": props.inputPlaceholder || t12("placeholder"),
  8829. "maxlength": "20"
  8830. }, null), createVNode(Button, {
  8831. "plain": true,
  8832. "type": "danger",
  8833. "class": bem53("exchange"),
  8834. "text": props.exchangeButtonText || t12("exchange"),
  8835. "loading": props.exchangeButtonLoading,
  8836. "disabled": buttonDisabled.value,
  8837. "onClick": onExchange
  8838. }, null)]);
  8839. }
  8840. };
  8841. const renderCouponTab = () => {
  8842. const {
  8843. coupons
  8844. } = props;
  8845. const count = props.showCount ? ` (${coupons.length})` : "";
  8846. const title = (props.enabledTitle || t12("enable")) + count;
  8847. return createVNode(Tab, {
  8848. "title": title
  8849. }, {
  8850. default: () => {
  8851. var _a;
  8852. return [createVNode("div", {
  8853. "class": bem53("list", {
  8854. "with-bottom": props.showCloseButton
  8855. }),
  8856. "style": {
  8857. height: `${listHeight.value}px`
  8858. }
  8859. }, [coupons.map((coupon, index) => createVNode(Coupon, {
  8860. "key": coupon.id,
  8861. "ref": setCouponRefs(index),
  8862. "coupon": coupon,
  8863. "chosen": index === props.chosenCoupon,
  8864. "currency": props.currency,
  8865. "onClick": () => emit("change", index)
  8866. }, null)), !coupons.length && renderEmpty(), (_a = slots["list-footer"]) == null ? void 0 : _a.call(slots)])];
  8867. }
  8868. });
  8869. };
  8870. const renderDisabledTab = () => {
  8871. const {
  8872. disabledCoupons
  8873. } = props;
  8874. const count = props.showCount ? ` (${disabledCoupons.length})` : "";
  8875. const title = (props.disabledTitle || t12("disabled")) + count;
  8876. return createVNode(Tab, {
  8877. "title": title
  8878. }, {
  8879. default: () => {
  8880. var _a;
  8881. return [createVNode("div", {
  8882. "class": bem53("list", {
  8883. "with-bottom": props.showCloseButton
  8884. }),
  8885. "style": {
  8886. height: `${listHeight.value}px`
  8887. }
  8888. }, [disabledCoupons.map((coupon) => createVNode(Coupon, {
  8889. "disabled": true,
  8890. "key": coupon.id,
  8891. "coupon": coupon,
  8892. "currency": props.currency
  8893. }, null)), !disabledCoupons.length && renderEmpty(), (_a = slots["disabled-list-footer"]) == null ? void 0 : _a.call(slots)])];
  8894. }
  8895. });
  8896. };
  8897. watch(() => props.code, (value) => {
  8898. currentCode.value = value;
  8899. });
  8900. watch(windowHeight, updateListHeight);
  8901. watch(currentCode, (value) => emit("update:code", value));
  8902. watch(() => props.displayedCouponIndex, scrollToCoupon);
  8903. onMounted(() => {
  8904. updateListHeight();
  8905. scrollToCoupon(props.displayedCouponIndex);
  8906. });
  8907. return () => createVNode("div", {
  8908. "ref": root,
  8909. "class": bem53()
  8910. }, [renderExchangeBar(), createVNode(Tabs, {
  8911. "active": activeTab.value,
  8912. "onUpdate:active": ($event) => activeTab.value = $event,
  8913. "class": bem53("tab")
  8914. }, {
  8915. default: () => [renderCouponTab(), renderDisabledTab()]
  8916. }), createVNode("div", {
  8917. "class": bem53("bottom")
  8918. }, [withDirectives(createVNode(Button, {
  8919. "round": true,
  8920. "block": true,
  8921. "type": "danger",
  8922. "class": bem53("close"),
  8923. "text": props.closeButtonText || t12("close"),
  8924. "onClick": () => emit("change", -1)
  8925. }, null), [[vShow, props.showCloseButton]])])]);
  8926. }
  8927. });
  8928. // node_modules/vant/es/coupon-list/index.mjs
  8929. var CouponList = withInstall(stdin_default59);
  8930. // node_modules/vant/es/datetime-picker/TimePicker.mjs
  8931. var [name57] = createNamespace("time-picker");
  8932. var stdin_default60 = defineComponent({
  8933. name: name57,
  8934. props: extend({}, sharedProps, {
  8935. minHour: makeNumericProp(0),
  8936. maxHour: makeNumericProp(23),
  8937. minMinute: makeNumericProp(0),
  8938. maxMinute: makeNumericProp(59),
  8939. modelValue: String
  8940. }),
  8941. emits: ["confirm", "cancel", "change", "update:modelValue"],
  8942. setup(props, {
  8943. emit,
  8944. slots
  8945. }) {
  8946. const formatValue2 = (value) => {
  8947. const {
  8948. minHour,
  8949. maxHour,
  8950. maxMinute,
  8951. minMinute
  8952. } = props;
  8953. if (!value) {
  8954. value = `${padZero(minHour)}:${padZero(minMinute)}`;
  8955. }
  8956. let [hour, minute] = value.split(":");
  8957. hour = padZero(clamp(+hour, +minHour, +maxHour));
  8958. minute = padZero(clamp(+minute, +minMinute, +maxMinute));
  8959. return `${hour}:${minute}`;
  8960. };
  8961. const picker = ref();
  8962. const currentDate = ref(formatValue2(props.modelValue));
  8963. const ranges = computed(() => [{
  8964. type: "hour",
  8965. range: [+props.minHour, +props.maxHour]
  8966. }, {
  8967. type: "minute",
  8968. range: [+props.minMinute, +props.maxMinute]
  8969. }]);
  8970. const originColumns = computed(() => ranges.value.map(({
  8971. type,
  8972. range: rangeArr
  8973. }) => {
  8974. let values = times(rangeArr[1] - rangeArr[0] + 1, (index) => padZero(rangeArr[0] + index));
  8975. if (props.filter) {
  8976. values = props.filter(type, values);
  8977. }
  8978. return {
  8979. type,
  8980. values
  8981. };
  8982. }));
  8983. const columns = computed(() => originColumns.value.map((column) => ({
  8984. values: column.values.map((value) => props.formatter(column.type, value))
  8985. })));
  8986. const updateColumnValue = () => {
  8987. const pair = currentDate.value.split(":");
  8988. const values = [props.formatter("hour", pair[0]), props.formatter("minute", pair[1])];
  8989. nextTick(() => {
  8990. var _a;
  8991. (_a = picker.value) == null ? void 0 : _a.setValues(values);
  8992. });
  8993. };
  8994. const updateInnerValue = () => {
  8995. const [hourIndex, minuteIndex] = picker.value.getIndexes();
  8996. const [hourColumn, minuteColumn] = originColumns.value;
  8997. const hour = hourColumn.values[hourIndex] || hourColumn.values[0];
  8998. const minute = minuteColumn.values[minuteIndex] || minuteColumn.values[0];
  8999. currentDate.value = formatValue2(`${hour}:${minute}`);
  9000. updateColumnValue();
  9001. };
  9002. const onConfirm = () => emit("confirm", currentDate.value);
  9003. const onCancel = () => emit("cancel");
  9004. const onChange = () => {
  9005. updateInnerValue();
  9006. nextTick(() => {
  9007. nextTick(() => emit("change", currentDate.value));
  9008. });
  9009. };
  9010. onMounted(() => {
  9011. updateColumnValue();
  9012. nextTick(updateInnerValue);
  9013. });
  9014. watch(columns, updateColumnValue);
  9015. watch(() => [props.filter, props.maxHour, props.minMinute, props.maxMinute], updateInnerValue);
  9016. watch(() => props.minHour, () => {
  9017. nextTick(updateInnerValue);
  9018. });
  9019. watch(currentDate, (value) => emit("update:modelValue", value));
  9020. watch(() => props.modelValue, (value) => {
  9021. value = formatValue2(value);
  9022. if (value !== currentDate.value) {
  9023. currentDate.value = value;
  9024. updateColumnValue();
  9025. }
  9026. });
  9027. useExpose({
  9028. getPicker: () => picker.value && proxyPickerMethods(picker.value, updateInnerValue)
  9029. });
  9030. return () => createVNode(Picker, mergeProps({
  9031. "ref": picker,
  9032. "columns": columns.value,
  9033. "onChange": onChange,
  9034. "onCancel": onCancel,
  9035. "onConfirm": onConfirm
  9036. }, pick(props, pickerInheritKeys)), slots);
  9037. }
  9038. });
  9039. // node_modules/vant/es/datetime-picker/DatePicker.mjs
  9040. var currentYear = new Date().getFullYear();
  9041. var [name58] = createNamespace("date-picker");
  9042. var stdin_default61 = defineComponent({
  9043. name: name58,
  9044. props: extend({}, sharedProps, {
  9045. type: makeStringProp("datetime"),
  9046. modelValue: Date,
  9047. minDate: {
  9048. type: Date,
  9049. default: () => new Date(currentYear - 10, 0, 1),
  9050. validator: isDate
  9051. },
  9052. maxDate: {
  9053. type: Date,
  9054. default: () => new Date(currentYear + 10, 11, 31),
  9055. validator: isDate
  9056. }
  9057. }),
  9058. emits: ["confirm", "cancel", "change", "update:modelValue"],
  9059. setup(props, {
  9060. emit,
  9061. slots
  9062. }) {
  9063. const formatValue2 = (value) => {
  9064. if (isDate(value)) {
  9065. const timestamp = clamp(value.getTime(), props.minDate.getTime(), props.maxDate.getTime());
  9066. return new Date(timestamp);
  9067. }
  9068. return void 0;
  9069. };
  9070. const picker = ref();
  9071. const currentDate = ref(formatValue2(props.modelValue));
  9072. const getBoundary = (type, value) => {
  9073. const boundary = props[`${type}Date`];
  9074. const year = boundary.getFullYear();
  9075. let month = 1;
  9076. let date = 1;
  9077. let hour = 0;
  9078. let minute = 0;
  9079. if (type === "max") {
  9080. month = 12;
  9081. date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1);
  9082. hour = 23;
  9083. minute = 59;
  9084. }
  9085. if (value.getFullYear() === year) {
  9086. month = boundary.getMonth() + 1;
  9087. if (value.getMonth() + 1 === month) {
  9088. date = boundary.getDate();
  9089. if (value.getDate() === date) {
  9090. hour = boundary.getHours();
  9091. if (value.getHours() === hour) {
  9092. minute = boundary.getMinutes();
  9093. }
  9094. }
  9095. }
  9096. }
  9097. return {
  9098. [`${type}Year`]: year,
  9099. [`${type}Month`]: month,
  9100. [`${type}Date`]: date,
  9101. [`${type}Hour`]: hour,
  9102. [`${type}Minute`]: minute
  9103. };
  9104. };
  9105. const ranges = computed(() => {
  9106. const {
  9107. maxYear,
  9108. maxDate,
  9109. maxMonth,
  9110. maxHour,
  9111. maxMinute
  9112. } = getBoundary("max", currentDate.value || props.minDate);
  9113. const {
  9114. minYear,
  9115. minDate,
  9116. minMonth,
  9117. minHour,
  9118. minMinute
  9119. } = getBoundary("min", currentDate.value || props.minDate);
  9120. let result = [{
  9121. type: "year",
  9122. range: [minYear, maxYear]
  9123. }, {
  9124. type: "month",
  9125. range: [minMonth, maxMonth]
  9126. }, {
  9127. type: "day",
  9128. range: [minDate, maxDate]
  9129. }, {
  9130. type: "hour",
  9131. range: [minHour, maxHour]
  9132. }, {
  9133. type: "minute",
  9134. range: [minMinute, maxMinute]
  9135. }];
  9136. switch (props.type) {
  9137. case "date":
  9138. result = result.slice(0, 3);
  9139. break;
  9140. case "year-month":
  9141. result = result.slice(0, 2);
  9142. break;
  9143. case "month-day":
  9144. result = result.slice(1, 3);
  9145. break;
  9146. case "datehour":
  9147. result = result.slice(0, 4);
  9148. break;
  9149. }
  9150. if (props.columnsOrder) {
  9151. const columnsOrder = props.columnsOrder.concat(result.map((column) => column.type));
  9152. result.sort((a, b) => columnsOrder.indexOf(a.type) - columnsOrder.indexOf(b.type));
  9153. }
  9154. return result;
  9155. });
  9156. const originColumns = computed(() => ranges.value.map(({
  9157. type,
  9158. range: rangeArr
  9159. }) => {
  9160. let values = times(rangeArr[1] - rangeArr[0] + 1, (index) => padZero(rangeArr[0] + index));
  9161. if (props.filter) {
  9162. values = props.filter(type, values);
  9163. }
  9164. return {
  9165. type,
  9166. values
  9167. };
  9168. }));
  9169. const columns = computed(() => originColumns.value.map((column) => ({
  9170. values: column.values.map((value) => props.formatter(column.type, value))
  9171. })));
  9172. const updateColumnValue = () => {
  9173. const value = currentDate.value || props.minDate;
  9174. const {
  9175. formatter
  9176. } = props;
  9177. const values = originColumns.value.map((column) => {
  9178. switch (column.type) {
  9179. case "year":
  9180. return formatter("year", `${value.getFullYear()}`);
  9181. case "month":
  9182. return formatter("month", padZero(value.getMonth() + 1));
  9183. case "day":
  9184. return formatter("day", padZero(value.getDate()));
  9185. case "hour":
  9186. return formatter("hour", padZero(value.getHours()));
  9187. case "minute":
  9188. return formatter("minute", padZero(value.getMinutes()));
  9189. default:
  9190. return "";
  9191. }
  9192. });
  9193. nextTick(() => {
  9194. var _a;
  9195. (_a = picker.value) == null ? void 0 : _a.setValues(values);
  9196. });
  9197. };
  9198. const updateInnerValue = () => {
  9199. const {
  9200. type
  9201. } = props;
  9202. const indexes = picker.value.getIndexes();
  9203. const getValue = (type2) => {
  9204. let index = 0;
  9205. originColumns.value.forEach((column, columnIndex) => {
  9206. if (type2 === column.type) {
  9207. index = columnIndex;
  9208. }
  9209. });
  9210. const {
  9211. values
  9212. } = originColumns.value[index];
  9213. return getTrueValue(values[indexes[index]]);
  9214. };
  9215. let year;
  9216. let month;
  9217. let day;
  9218. if (type === "month-day") {
  9219. year = (currentDate.value || props.minDate).getFullYear();
  9220. month = getValue("month");
  9221. day = getValue("day");
  9222. } else {
  9223. year = getValue("year");
  9224. month = getValue("month");
  9225. day = type === "year-month" ? 1 : getValue("day");
  9226. }
  9227. const maxDay = getMonthEndDay(year, month);
  9228. day = day > maxDay ? maxDay : day;
  9229. let hour = 0;
  9230. let minute = 0;
  9231. if (type === "datehour") {
  9232. hour = getValue("hour");
  9233. }
  9234. if (type === "datetime") {
  9235. hour = getValue("hour");
  9236. minute = getValue("minute");
  9237. }
  9238. const value = new Date(year, month - 1, day, hour, minute);
  9239. currentDate.value = formatValue2(value);
  9240. };
  9241. const onConfirm = () => {
  9242. emit("update:modelValue", currentDate.value);
  9243. emit("confirm", currentDate.value);
  9244. };
  9245. const onCancel = () => emit("cancel");
  9246. const onChange = () => {
  9247. updateInnerValue();
  9248. nextTick(() => {
  9249. updateInnerValue();
  9250. nextTick(() => emit("change", currentDate.value));
  9251. });
  9252. };
  9253. onMounted(() => {
  9254. updateColumnValue();
  9255. nextTick(updateInnerValue);
  9256. });
  9257. watch(columns, updateColumnValue);
  9258. watch(currentDate, (value, oldValue) => emit("update:modelValue", oldValue ? value : null));
  9259. watch(() => [props.filter, props.minDate, props.maxDate], () => {
  9260. nextTick(updateInnerValue);
  9261. });
  9262. watch(() => props.modelValue, (value) => {
  9263. var _a;
  9264. value = formatValue2(value);
  9265. if (value && value.valueOf() !== ((_a = currentDate.value) == null ? void 0 : _a.valueOf())) {
  9266. currentDate.value = value;
  9267. }
  9268. });
  9269. useExpose({
  9270. getPicker: () => picker.value && proxyPickerMethods(picker.value, updateInnerValue)
  9271. });
  9272. return () => createVNode(Picker, mergeProps({
  9273. "ref": picker,
  9274. "columns": columns.value,
  9275. "onChange": onChange,
  9276. "onCancel": onCancel,
  9277. "onConfirm": onConfirm
  9278. }, pick(props, pickerInheritKeys)), slots);
  9279. }
  9280. });
  9281. // node_modules/vant/es/datetime-picker/DatetimePicker.mjs
  9282. var [name59, bem54] = createNamespace("datetime-picker");
  9283. var timePickerPropKeys = Object.keys(stdin_default60.props);
  9284. var datePickerPropKeys = Object.keys(stdin_default61.props);
  9285. var datetimePickerProps = extend({}, stdin_default60.props, stdin_default61.props, {
  9286. modelValue: [String, Date]
  9287. });
  9288. var stdin_default62 = defineComponent({
  9289. name: name59,
  9290. props: datetimePickerProps,
  9291. setup(props, {
  9292. attrs,
  9293. slots
  9294. }) {
  9295. const root = ref();
  9296. useExpose({
  9297. getPicker: () => {
  9298. var _a;
  9299. return (_a = root.value) == null ? void 0 : _a.getPicker();
  9300. }
  9301. });
  9302. return () => {
  9303. const isTimePicker = props.type === "time";
  9304. const Component = isTimePicker ? stdin_default60 : stdin_default61;
  9305. const inheritProps = pick(props, isTimePicker ? timePickerPropKeys : datePickerPropKeys);
  9306. return createVNode(Component, mergeProps({
  9307. "ref": root,
  9308. "class": bem54()
  9309. }, inheritProps, attrs), slots);
  9310. };
  9311. }
  9312. });
  9313. // node_modules/vant/es/datetime-picker/index.mjs
  9314. var DatetimePicker = withInstall(stdin_default62);
  9315. // node_modules/vant/es/dialog/Dialog.mjs
  9316. var [name60, bem55, t13] = createNamespace("dialog");
  9317. var dialogProps = extend({}, popupSharedProps, {
  9318. title: String,
  9319. theme: String,
  9320. width: numericProp,
  9321. message: [String, Function],
  9322. callback: Function,
  9323. allowHtml: Boolean,
  9324. className: unknownProp,
  9325. transition: makeStringProp("van-dialog-bounce"),
  9326. messageAlign: String,
  9327. closeOnPopstate: truthProp,
  9328. showCancelButton: Boolean,
  9329. cancelButtonText: String,
  9330. cancelButtonColor: String,
  9331. cancelButtonDisabled: Boolean,
  9332. confirmButtonText: String,
  9333. confirmButtonColor: String,
  9334. confirmButtonDisabled: Boolean,
  9335. showConfirmButton: truthProp,
  9336. closeOnClickOverlay: Boolean
  9337. });
  9338. var popupInheritKeys2 = [...popupSharedPropKeys, "transition", "closeOnPopstate"];
  9339. var stdin_default63 = defineComponent({
  9340. name: name60,
  9341. props: dialogProps,
  9342. emits: ["confirm", "cancel", "keydown", "update:show"],
  9343. setup(props, {
  9344. emit,
  9345. slots
  9346. }) {
  9347. const root = ref();
  9348. const loading = reactive({
  9349. confirm: false,
  9350. cancel: false
  9351. });
  9352. const updateShow = (value) => emit("update:show", value);
  9353. const close = (action) => {
  9354. var _a;
  9355. updateShow(false);
  9356. (_a = props.callback) == null ? void 0 : _a.call(props, action);
  9357. };
  9358. const getActionHandler = (action) => () => {
  9359. if (!props.show) {
  9360. return;
  9361. }
  9362. emit(action);
  9363. if (props.beforeClose) {
  9364. loading[action] = true;
  9365. callInterceptor(props.beforeClose, {
  9366. args: [action],
  9367. done() {
  9368. close(action);
  9369. loading[action] = false;
  9370. },
  9371. canceled() {
  9372. loading[action] = false;
  9373. }
  9374. });
  9375. } else {
  9376. close(action);
  9377. }
  9378. };
  9379. const onCancel = getActionHandler("cancel");
  9380. const onConfirm = getActionHandler("confirm");
  9381. const onKeydown = withKeys((event) => {
  9382. var _a, _b;
  9383. if (event.target !== ((_b = (_a = root.value) == null ? void 0 : _a.popupRef) == null ? void 0 : _b.value)) {
  9384. return;
  9385. }
  9386. const onEventType = {
  9387. Enter: props.showConfirmButton ? onConfirm : noop,
  9388. Escape: props.showCancelButton ? onCancel : noop
  9389. };
  9390. onEventType[event.key]();
  9391. emit("keydown", event);
  9392. }, ["enter", "esc"]);
  9393. const renderTitle = () => {
  9394. const title = slots.title ? slots.title() : props.title;
  9395. if (title) {
  9396. return createVNode("div", {
  9397. "class": bem55("header", {
  9398. isolated: !props.message && !slots.default
  9399. })
  9400. }, [title]);
  9401. }
  9402. };
  9403. const renderMessage = (hasTitle) => {
  9404. const {
  9405. message,
  9406. allowHtml,
  9407. messageAlign
  9408. } = props;
  9409. const classNames = bem55("message", {
  9410. "has-title": hasTitle,
  9411. [messageAlign]: messageAlign
  9412. });
  9413. const content = isFunction(message) ? message() : message;
  9414. if (allowHtml && typeof content === "string") {
  9415. return createVNode("div", {
  9416. "class": classNames,
  9417. "innerHTML": content
  9418. }, null);
  9419. }
  9420. return createVNode("div", {
  9421. "class": classNames
  9422. }, [content]);
  9423. };
  9424. const renderContent = () => {
  9425. if (slots.default) {
  9426. return createVNode("div", {
  9427. "class": bem55("content")
  9428. }, [slots.default()]);
  9429. }
  9430. const {
  9431. title,
  9432. message,
  9433. allowHtml
  9434. } = props;
  9435. if (message) {
  9436. const hasTitle = !!(title || slots.title);
  9437. return createVNode("div", {
  9438. "key": allowHtml ? 1 : 0,
  9439. "class": bem55("content", {
  9440. isolated: !hasTitle
  9441. })
  9442. }, [renderMessage(hasTitle)]);
  9443. }
  9444. };
  9445. const renderButtons = () => createVNode("div", {
  9446. "class": [BORDER_TOP, bem55("footer")]
  9447. }, [props.showCancelButton && createVNode(Button, {
  9448. "size": "large",
  9449. "text": props.cancelButtonText || t13("cancel"),
  9450. "class": bem55("cancel"),
  9451. "style": {
  9452. color: props.cancelButtonColor
  9453. },
  9454. "loading": loading.cancel,
  9455. "disabled": props.cancelButtonDisabled,
  9456. "onClick": onCancel
  9457. }, null), props.showConfirmButton && createVNode(Button, {
  9458. "size": "large",
  9459. "text": props.confirmButtonText || t13("confirm"),
  9460. "class": [bem55("confirm"), {
  9461. [BORDER_LEFT]: props.showCancelButton
  9462. }],
  9463. "style": {
  9464. color: props.confirmButtonColor
  9465. },
  9466. "loading": loading.confirm,
  9467. "disabled": props.confirmButtonDisabled,
  9468. "onClick": onConfirm
  9469. }, null)]);
  9470. const renderRoundButtons = () => createVNode(ActionBar, {
  9471. "class": bem55("footer")
  9472. }, {
  9473. default: () => [props.showCancelButton && createVNode(ActionBarButton, {
  9474. "type": "warning",
  9475. "text": props.cancelButtonText || t13("cancel"),
  9476. "class": bem55("cancel"),
  9477. "color": props.cancelButtonColor,
  9478. "loading": loading.cancel,
  9479. "disabled": props.cancelButtonDisabled,
  9480. "onClick": onCancel
  9481. }, null), props.showConfirmButton && createVNode(ActionBarButton, {
  9482. "type": "danger",
  9483. "text": props.confirmButtonText || t13("confirm"),
  9484. "class": bem55("confirm"),
  9485. "color": props.confirmButtonColor,
  9486. "loading": loading.confirm,
  9487. "disabled": props.confirmButtonDisabled,
  9488. "onClick": onConfirm
  9489. }, null)]
  9490. });
  9491. const renderFooter = () => {
  9492. if (slots.footer) {
  9493. return slots.footer();
  9494. }
  9495. return props.theme === "round-button" ? renderRoundButtons() : renderButtons();
  9496. };
  9497. return () => {
  9498. const {
  9499. width: width2,
  9500. title,
  9501. theme,
  9502. message,
  9503. className
  9504. } = props;
  9505. return createVNode(Popup, mergeProps({
  9506. "ref": root,
  9507. "role": "dialog",
  9508. "class": [bem55([theme]), className],
  9509. "style": {
  9510. width: addUnit(width2)
  9511. },
  9512. "tabindex": 0,
  9513. "aria-labelledby": title || message,
  9514. "onKeydown": onKeydown,
  9515. "onUpdate:show": updateShow
  9516. }, pick(props, popupInheritKeys2)), {
  9517. default: () => [renderTitle(), renderContent(), renderFooter()]
  9518. });
  9519. };
  9520. }
  9521. });
  9522. // node_modules/vant/es/dialog/function-call.mjs
  9523. var instance;
  9524. function initInstance() {
  9525. const Wrapper = {
  9526. setup() {
  9527. const {
  9528. state,
  9529. toggle
  9530. } = usePopupState();
  9531. return () => createVNode(stdin_default63, mergeProps(state, {
  9532. "onUpdate:show": toggle
  9533. }), null);
  9534. }
  9535. };
  9536. ({
  9537. instance
  9538. } = mountComponent(Wrapper));
  9539. }
  9540. function Dialog(options) {
  9541. if (!inBrowser) {
  9542. return Promise.resolve();
  9543. }
  9544. return new Promise((resolve, reject) => {
  9545. if (!instance) {
  9546. initInstance();
  9547. }
  9548. instance.open(extend({}, Dialog.currentOptions, options, {
  9549. callback: (action) => {
  9550. (action === "confirm" ? resolve : reject)(action);
  9551. }
  9552. }));
  9553. });
  9554. }
  9555. Dialog.defaultOptions = {
  9556. title: "",
  9557. width: "",
  9558. theme: null,
  9559. message: "",
  9560. overlay: true,
  9561. callback: null,
  9562. teleport: "body",
  9563. className: "",
  9564. allowHtml: false,
  9565. lockScroll: true,
  9566. transition: void 0,
  9567. beforeClose: null,
  9568. overlayClass: "",
  9569. overlayStyle: void 0,
  9570. messageAlign: "",
  9571. cancelButtonText: "",
  9572. cancelButtonColor: null,
  9573. cancelButtonDisabled: false,
  9574. confirmButtonText: "",
  9575. confirmButtonColor: null,
  9576. confirmButtonDisabled: false,
  9577. showConfirmButton: true,
  9578. showCancelButton: false,
  9579. closeOnPopstate: true,
  9580. closeOnClickOverlay: false
  9581. };
  9582. Dialog.currentOptions = extend({}, Dialog.defaultOptions);
  9583. Dialog.alert = Dialog;
  9584. Dialog.confirm = (options) => Dialog(extend({
  9585. showCancelButton: true
  9586. }, options));
  9587. Dialog.close = () => {
  9588. if (instance) {
  9589. instance.toggle(false);
  9590. }
  9591. };
  9592. Dialog.setDefaultOptions = (options) => {
  9593. extend(Dialog.currentOptions, options);
  9594. };
  9595. Dialog.resetDefaultOptions = () => {
  9596. Dialog.currentOptions = extend({}, Dialog.defaultOptions);
  9597. };
  9598. Dialog.Component = withInstall(stdin_default63);
  9599. Dialog.install = (app) => {
  9600. app.use(Dialog.Component);
  9601. app.config.globalProperties.$dialog = Dialog;
  9602. };
  9603. // node_modules/vant/es/divider/Divider.mjs
  9604. var [name61, bem56] = createNamespace("divider");
  9605. var dividerProps = {
  9606. dashed: Boolean,
  9607. hairline: truthProp,
  9608. contentPosition: makeStringProp("center")
  9609. };
  9610. var stdin_default64 = defineComponent({
  9611. name: name61,
  9612. props: dividerProps,
  9613. setup(props, {
  9614. slots
  9615. }) {
  9616. return () => {
  9617. var _a;
  9618. return createVNode("div", {
  9619. "role": "separator",
  9620. "class": bem56({
  9621. dashed: props.dashed,
  9622. hairline: props.hairline,
  9623. [`content-${props.contentPosition}`]: !!slots.default
  9624. })
  9625. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  9626. };
  9627. }
  9628. });
  9629. // node_modules/vant/es/divider/index.mjs
  9630. var Divider = withInstall(stdin_default64);
  9631. // node_modules/vant/es/dropdown-menu/DropdownMenu.mjs
  9632. var [name62, bem57] = createNamespace("dropdown-menu");
  9633. var dropdownMenuProps = {
  9634. overlay: truthProp,
  9635. zIndex: numericProp,
  9636. duration: makeNumericProp(0.2),
  9637. direction: makeStringProp("down"),
  9638. activeColor: String,
  9639. closeOnClickOutside: truthProp,
  9640. closeOnClickOverlay: truthProp
  9641. };
  9642. var DROPDOWN_KEY = Symbol(name62);
  9643. var stdin_default65 = defineComponent({
  9644. name: name62,
  9645. props: dropdownMenuProps,
  9646. setup(props, {
  9647. slots
  9648. }) {
  9649. const id = useId();
  9650. const root = ref();
  9651. const barRef = ref();
  9652. const offset2 = ref(0);
  9653. const {
  9654. children,
  9655. linkChildren
  9656. } = useChildren(DROPDOWN_KEY);
  9657. const scrollParent = useScrollParent(root);
  9658. const opened = computed(() => children.some((item) => item.state.showWrapper));
  9659. const barStyle = computed(() => {
  9660. if (opened.value && isDef(props.zIndex)) {
  9661. return {
  9662. zIndex: +props.zIndex + 1
  9663. };
  9664. }
  9665. });
  9666. const onClickAway = () => {
  9667. if (props.closeOnClickOutside) {
  9668. children.forEach((item) => {
  9669. item.toggle(false);
  9670. });
  9671. }
  9672. };
  9673. const updateOffset = () => {
  9674. if (barRef.value) {
  9675. const rect = useRect(barRef);
  9676. if (props.direction === "down") {
  9677. offset2.value = rect.bottom;
  9678. } else {
  9679. offset2.value = windowHeight.value - rect.top;
  9680. }
  9681. }
  9682. };
  9683. const onScroll = () => {
  9684. if (opened.value) {
  9685. updateOffset();
  9686. }
  9687. };
  9688. const toggleItem = (active) => {
  9689. children.forEach((item, index) => {
  9690. if (index === active) {
  9691. updateOffset();
  9692. item.toggle();
  9693. } else if (item.state.showPopup) {
  9694. item.toggle(false, {
  9695. immediate: true
  9696. });
  9697. }
  9698. });
  9699. };
  9700. const renderTitle = (item, index) => {
  9701. const {
  9702. showPopup
  9703. } = item.state;
  9704. const {
  9705. disabled,
  9706. titleClass
  9707. } = item;
  9708. return createVNode("div", {
  9709. "id": `${id}-${index}`,
  9710. "role": "button",
  9711. "tabindex": disabled ? void 0 : 0,
  9712. "class": [bem57("item", {
  9713. disabled
  9714. }), {
  9715. [HAPTICS_FEEDBACK]: !disabled
  9716. }],
  9717. "onClick": () => {
  9718. if (!disabled) {
  9719. toggleItem(index);
  9720. }
  9721. }
  9722. }, [createVNode("span", {
  9723. "class": [bem57("title", {
  9724. down: showPopup === (props.direction === "down"),
  9725. active: showPopup
  9726. }), titleClass],
  9727. "style": {
  9728. color: showPopup ? props.activeColor : ""
  9729. }
  9730. }, [createVNode("div", {
  9731. "class": "van-ellipsis"
  9732. }, [item.renderTitle()])])]);
  9733. };
  9734. linkChildren({
  9735. id,
  9736. props,
  9737. offset: offset2
  9738. });
  9739. useClickAway(root, onClickAway);
  9740. useEventListener("scroll", onScroll, {
  9741. target: scrollParent,
  9742. passive: true
  9743. });
  9744. return () => {
  9745. var _a;
  9746. return createVNode("div", {
  9747. "ref": root,
  9748. "class": bem57()
  9749. }, [createVNode("div", {
  9750. "ref": barRef,
  9751. "style": barStyle.value,
  9752. "class": bem57("bar", {
  9753. opened: opened.value
  9754. })
  9755. }, [children.map(renderTitle)]), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
  9756. };
  9757. }
  9758. });
  9759. // node_modules/vant/es/dropdown-item/DropdownItem.mjs
  9760. var [name63, bem58] = createNamespace("dropdown-item");
  9761. var dropdownItemProps = {
  9762. title: String,
  9763. options: makeArrayProp(),
  9764. disabled: Boolean,
  9765. teleport: [String, Object],
  9766. lazyRender: truthProp,
  9767. modelValue: unknownProp,
  9768. titleClass: unknownProp
  9769. };
  9770. var stdin_default66 = defineComponent({
  9771. name: name63,
  9772. props: dropdownItemProps,
  9773. emits: ["open", "opened", "close", "closed", "change", "update:modelValue"],
  9774. setup(props, {
  9775. emit,
  9776. slots
  9777. }) {
  9778. const state = reactive({
  9779. showPopup: false,
  9780. transition: true,
  9781. showWrapper: false
  9782. });
  9783. const {
  9784. parent,
  9785. index
  9786. } = useParent(DROPDOWN_KEY);
  9787. if (!parent) {
  9788. if (true) {
  9789. console.error("[Vant] <DropdownItem> must be a child component of <DropdownMenu>.");
  9790. }
  9791. return;
  9792. }
  9793. const getEmitter = (name210) => () => emit(name210);
  9794. const onOpen = getEmitter("open");
  9795. const onClose = getEmitter("close");
  9796. const onOpened = getEmitter("opened");
  9797. const onClosed = () => {
  9798. state.showWrapper = false;
  9799. emit("closed");
  9800. };
  9801. const onClickWrapper = (event) => {
  9802. if (props.teleport) {
  9803. event.stopPropagation();
  9804. }
  9805. };
  9806. const toggle = (show = !state.showPopup, options = {}) => {
  9807. if (show === state.showPopup) {
  9808. return;
  9809. }
  9810. state.showPopup = show;
  9811. state.transition = !options.immediate;
  9812. if (show) {
  9813. state.showWrapper = true;
  9814. }
  9815. };
  9816. const renderTitle = () => {
  9817. if (slots.title) {
  9818. return slots.title();
  9819. }
  9820. if (props.title) {
  9821. return props.title;
  9822. }
  9823. const match = props.options.find((option) => option.value === props.modelValue);
  9824. return match ? match.text : "";
  9825. };
  9826. const renderOption = (option) => {
  9827. const {
  9828. activeColor
  9829. } = parent.props;
  9830. const active = option.value === props.modelValue;
  9831. const onClick = () => {
  9832. state.showPopup = false;
  9833. if (option.value !== props.modelValue) {
  9834. emit("update:modelValue", option.value);
  9835. emit("change", option.value);
  9836. }
  9837. };
  9838. const renderIcon = () => {
  9839. if (active) {
  9840. return createVNode(Icon, {
  9841. "class": bem58("icon"),
  9842. "color": activeColor,
  9843. "name": "success"
  9844. }, null);
  9845. }
  9846. };
  9847. return createVNode(Cell, {
  9848. "role": "menuitem",
  9849. "key": option.value,
  9850. "icon": option.icon,
  9851. "title": option.text,
  9852. "class": bem58("option", {
  9853. active
  9854. }),
  9855. "style": {
  9856. color: active ? activeColor : ""
  9857. },
  9858. "tabindex": active ? 0 : -1,
  9859. "clickable": true,
  9860. "onClick": onClick
  9861. }, {
  9862. value: renderIcon
  9863. });
  9864. };
  9865. const renderContent = () => {
  9866. const {
  9867. offset: offset2
  9868. } = parent;
  9869. const {
  9870. zIndex,
  9871. overlay,
  9872. duration,
  9873. direction,
  9874. closeOnClickOverlay
  9875. } = parent.props;
  9876. const style = getZIndexStyle(zIndex);
  9877. if (direction === "down") {
  9878. style.top = `${offset2.value}px`;
  9879. } else {
  9880. style.bottom = `${offset2.value}px`;
  9881. }
  9882. return withDirectives(createVNode("div", {
  9883. "style": style,
  9884. "class": bem58([direction]),
  9885. "onClick": onClickWrapper
  9886. }, [createVNode(Popup, {
  9887. "show": state.showPopup,
  9888. "onUpdate:show": ($event) => state.showPopup = $event,
  9889. "role": "menu",
  9890. "class": bem58("content"),
  9891. "overlay": overlay,
  9892. "position": direction === "down" ? "top" : "bottom",
  9893. "duration": state.transition ? duration : 0,
  9894. "lazyRender": props.lazyRender,
  9895. "overlayStyle": {
  9896. position: "absolute"
  9897. },
  9898. "aria-labelledby": `${parent.id}-${index.value}`,
  9899. "closeOnClickOverlay": closeOnClickOverlay,
  9900. "onOpen": onOpen,
  9901. "onClose": onClose,
  9902. "onOpened": onOpened,
  9903. "onClosed": onClosed
  9904. }, {
  9905. default: () => {
  9906. var _a;
  9907. return [props.options.map(renderOption), (_a = slots.default) == null ? void 0 : _a.call(slots)];
  9908. }
  9909. })]), [[vShow, state.showWrapper]]);
  9910. };
  9911. useExpose({
  9912. state,
  9913. toggle,
  9914. renderTitle
  9915. });
  9916. return () => {
  9917. if (props.teleport) {
  9918. return createVNode(Teleport, {
  9919. "to": props.teleport
  9920. }, {
  9921. default: () => [renderContent()]
  9922. });
  9923. }
  9924. return renderContent();
  9925. };
  9926. }
  9927. });
  9928. // node_modules/vant/es/dropdown-item/index.mjs
  9929. var DropdownItem = withInstall(stdin_default66);
  9930. // node_modules/vant/es/dropdown-menu/index.mjs
  9931. var DropdownMenu = withInstall(stdin_default65);
  9932. // node_modules/vant/es/grid/Grid.mjs
  9933. var [name64, bem59] = createNamespace("grid");
  9934. var gridProps = {
  9935. square: Boolean,
  9936. center: truthProp,
  9937. border: truthProp,
  9938. gutter: numericProp,
  9939. reverse: Boolean,
  9940. iconSize: numericProp,
  9941. direction: String,
  9942. clickable: Boolean,
  9943. columnNum: makeNumericProp(4)
  9944. };
  9945. var GRID_KEY = Symbol(name64);
  9946. var stdin_default67 = defineComponent({
  9947. name: name64,
  9948. props: gridProps,
  9949. setup(props, {
  9950. slots
  9951. }) {
  9952. const {
  9953. linkChildren
  9954. } = useChildren(GRID_KEY);
  9955. linkChildren({
  9956. props
  9957. });
  9958. return () => {
  9959. var _a;
  9960. return createVNode("div", {
  9961. "style": {
  9962. paddingLeft: addUnit(props.gutter)
  9963. },
  9964. "class": [bem59(), {
  9965. [BORDER_TOP]: props.border && !props.gutter
  9966. }]
  9967. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  9968. };
  9969. }
  9970. });
  9971. // node_modules/vant/es/grid/index.mjs
  9972. var Grid = withInstall(stdin_default67);
  9973. // node_modules/vant/es/grid-item/GridItem.mjs
  9974. var [name65, bem60] = createNamespace("grid-item");
  9975. var gridItemProps = extend({}, routeProps, {
  9976. dot: Boolean,
  9977. text: String,
  9978. icon: String,
  9979. badge: numericProp,
  9980. iconColor: String,
  9981. iconPrefix: String,
  9982. badgeProps: Object
  9983. });
  9984. var stdin_default68 = defineComponent({
  9985. name: name65,
  9986. props: gridItemProps,
  9987. setup(props, {
  9988. slots
  9989. }) {
  9990. const {
  9991. parent,
  9992. index
  9993. } = useParent(GRID_KEY);
  9994. const route2 = useRoute();
  9995. if (!parent) {
  9996. if (true) {
  9997. console.error("[Vant] <GridItem> must be a child component of <Grid>.");
  9998. }
  9999. return;
  10000. }
  10001. const rootStyle = computed(() => {
  10002. const {
  10003. square,
  10004. gutter,
  10005. columnNum
  10006. } = parent.props;
  10007. const percent = `${100 / +columnNum}%`;
  10008. const style = {
  10009. flexBasis: percent
  10010. };
  10011. if (square) {
  10012. style.paddingTop = percent;
  10013. } else if (gutter) {
  10014. const gutterValue = addUnit(gutter);
  10015. style.paddingRight = gutterValue;
  10016. if (index.value >= columnNum) {
  10017. style.marginTop = gutterValue;
  10018. }
  10019. }
  10020. return style;
  10021. });
  10022. const contentStyle = computed(() => {
  10023. const {
  10024. square,
  10025. gutter
  10026. } = parent.props;
  10027. if (square && gutter) {
  10028. const gutterValue = addUnit(gutter);
  10029. return {
  10030. right: gutterValue,
  10031. bottom: gutterValue,
  10032. height: "auto"
  10033. };
  10034. }
  10035. });
  10036. const renderIcon = () => {
  10037. if (slots.icon) {
  10038. return createVNode(Badge, mergeProps({
  10039. "dot": props.dot,
  10040. "content": props.badge
  10041. }, props.badgeProps), {
  10042. default: slots.icon
  10043. });
  10044. }
  10045. if (props.icon) {
  10046. return createVNode(Icon, {
  10047. "dot": props.dot,
  10048. "name": props.icon,
  10049. "size": parent.props.iconSize,
  10050. "badge": props.badge,
  10051. "class": bem60("icon"),
  10052. "color": props.iconColor,
  10053. "badgeProps": props.badgeProps,
  10054. "classPrefix": props.iconPrefix
  10055. }, null);
  10056. }
  10057. };
  10058. const renderText = () => {
  10059. if (slots.text) {
  10060. return slots.text();
  10061. }
  10062. if (props.text) {
  10063. return createVNode("span", {
  10064. "class": bem60("text")
  10065. }, [props.text]);
  10066. }
  10067. };
  10068. const renderContent = () => {
  10069. if (slots.default) {
  10070. return slots.default();
  10071. }
  10072. return [renderIcon(), renderText()];
  10073. };
  10074. return () => {
  10075. const {
  10076. center,
  10077. border,
  10078. square,
  10079. gutter,
  10080. reverse,
  10081. direction,
  10082. clickable
  10083. } = parent.props;
  10084. const classes = [bem60("content", [direction, {
  10085. center,
  10086. square,
  10087. reverse,
  10088. clickable,
  10089. surround: border && gutter
  10090. }]), {
  10091. [BORDER]: border
  10092. }];
  10093. return createVNode("div", {
  10094. "class": [bem60({
  10095. square
  10096. })],
  10097. "style": rootStyle.value
  10098. }, [createVNode("div", {
  10099. "role": clickable ? "button" : void 0,
  10100. "class": classes,
  10101. "style": contentStyle.value,
  10102. "tabindex": clickable ? 0 : void 0,
  10103. "onClick": route2
  10104. }, [renderContent()])]);
  10105. };
  10106. }
  10107. });
  10108. // node_modules/vant/es/grid-item/index.mjs
  10109. var GridItem = withInstall(stdin_default68);
  10110. // node_modules/vant/es/image-preview/ImagePreviewItem.mjs
  10111. var getDistance = (touches) => Math.sqrt((touches[0].clientX - touches[1].clientX) ** 2 + (touches[0].clientY - touches[1].clientY) ** 2);
  10112. var bem61 = createNamespace("image-preview")[1];
  10113. var stdin_default69 = defineComponent({
  10114. props: {
  10115. src: String,
  10116. show: Boolean,
  10117. active: Number,
  10118. minZoom: makeRequiredProp(numericProp),
  10119. maxZoom: makeRequiredProp(numericProp),
  10120. rootWidth: makeRequiredProp(Number),
  10121. rootHeight: makeRequiredProp(Number)
  10122. },
  10123. emits: ["scale", "close"],
  10124. setup(props, {
  10125. emit
  10126. }) {
  10127. const state = reactive({
  10128. scale: 1,
  10129. moveX: 0,
  10130. moveY: 0,
  10131. moving: false,
  10132. zooming: false,
  10133. imageRatio: 0,
  10134. displayWidth: 0,
  10135. displayHeight: 0
  10136. });
  10137. const touch = useTouch();
  10138. const swipeItem = ref();
  10139. const vertical = computed(() => {
  10140. const {
  10141. rootWidth,
  10142. rootHeight
  10143. } = props;
  10144. const rootRatio = rootHeight / rootWidth;
  10145. return state.imageRatio > rootRatio;
  10146. });
  10147. const imageStyle = computed(() => {
  10148. const {
  10149. scale,
  10150. moveX,
  10151. moveY,
  10152. moving,
  10153. zooming
  10154. } = state;
  10155. const style = {
  10156. transitionDuration: zooming || moving ? "0s" : ".3s"
  10157. };
  10158. if (scale !== 1) {
  10159. const offsetX = moveX / scale;
  10160. const offsetY = moveY / scale;
  10161. style.transform = `scale(${scale}, ${scale}) translate(${offsetX}px, ${offsetY}px)`;
  10162. }
  10163. return style;
  10164. });
  10165. const maxMoveX = computed(() => {
  10166. if (state.imageRatio) {
  10167. const {
  10168. rootWidth,
  10169. rootHeight
  10170. } = props;
  10171. const displayWidth = vertical.value ? rootHeight / state.imageRatio : rootWidth;
  10172. return Math.max(0, (state.scale * displayWidth - rootWidth) / 2);
  10173. }
  10174. return 0;
  10175. });
  10176. const maxMoveY = computed(() => {
  10177. if (state.imageRatio) {
  10178. const {
  10179. rootWidth,
  10180. rootHeight
  10181. } = props;
  10182. const displayHeight = vertical.value ? rootHeight : rootWidth * state.imageRatio;
  10183. return Math.max(0, (state.scale * displayHeight - rootHeight) / 2);
  10184. }
  10185. return 0;
  10186. });
  10187. const setScale = (scale) => {
  10188. scale = clamp(scale, +props.minZoom, +props.maxZoom + 1);
  10189. if (scale !== state.scale) {
  10190. state.scale = scale;
  10191. emit("scale", {
  10192. scale,
  10193. index: props.active
  10194. });
  10195. }
  10196. };
  10197. const resetScale = () => {
  10198. setScale(1);
  10199. state.moveX = 0;
  10200. state.moveY = 0;
  10201. };
  10202. const toggleScale = () => {
  10203. const scale = state.scale > 1 ? 1 : 2;
  10204. setScale(scale);
  10205. state.moveX = 0;
  10206. state.moveY = 0;
  10207. };
  10208. let fingerNum;
  10209. let startMoveX;
  10210. let startMoveY;
  10211. let startScale;
  10212. let startDistance;
  10213. let doubleTapTimer;
  10214. let touchStartTime;
  10215. const onTouchStart = (event) => {
  10216. const {
  10217. touches
  10218. } = event;
  10219. const {
  10220. offsetX
  10221. } = touch;
  10222. touch.start(event);
  10223. fingerNum = touches.length;
  10224. startMoveX = state.moveX;
  10225. startMoveY = state.moveY;
  10226. touchStartTime = Date.now();
  10227. state.moving = fingerNum === 1 && state.scale !== 1;
  10228. state.zooming = fingerNum === 2 && !offsetX.value;
  10229. if (state.zooming) {
  10230. startScale = state.scale;
  10231. startDistance = getDistance(event.touches);
  10232. }
  10233. };
  10234. const onTouchMove = (event) => {
  10235. const {
  10236. touches
  10237. } = event;
  10238. touch.move(event);
  10239. if (state.moving || state.zooming) {
  10240. preventDefault(event, true);
  10241. }
  10242. if (state.moving) {
  10243. const {
  10244. deltaX,
  10245. deltaY
  10246. } = touch;
  10247. const moveX = deltaX.value + startMoveX;
  10248. const moveY = deltaY.value + startMoveY;
  10249. state.moveX = clamp(moveX, -maxMoveX.value, maxMoveX.value);
  10250. state.moveY = clamp(moveY, -maxMoveY.value, maxMoveY.value);
  10251. }
  10252. if (state.zooming && touches.length === 2) {
  10253. const distance = getDistance(touches);
  10254. const scale = startScale * distance / startDistance;
  10255. setScale(scale);
  10256. }
  10257. };
  10258. const checkTap = () => {
  10259. if (fingerNum > 1) {
  10260. return;
  10261. }
  10262. const {
  10263. offsetX,
  10264. offsetY
  10265. } = touch;
  10266. const deltaTime = Date.now() - touchStartTime;
  10267. const TAP_TIME = 250;
  10268. const TAP_OFFSET = 5;
  10269. if (offsetX.value < TAP_OFFSET && offsetY.value < TAP_OFFSET && deltaTime < TAP_TIME) {
  10270. if (doubleTapTimer) {
  10271. clearTimeout(doubleTapTimer);
  10272. doubleTapTimer = null;
  10273. toggleScale();
  10274. } else {
  10275. doubleTapTimer = setTimeout(() => {
  10276. emit("close");
  10277. doubleTapTimer = null;
  10278. }, TAP_TIME);
  10279. }
  10280. }
  10281. };
  10282. const onTouchEnd = (event) => {
  10283. let stopPropagation2 = false;
  10284. if (state.moving || state.zooming) {
  10285. stopPropagation2 = true;
  10286. if (state.moving && startMoveX === state.moveX && startMoveY === state.moveY) {
  10287. stopPropagation2 = false;
  10288. }
  10289. if (!event.touches.length) {
  10290. if (state.zooming) {
  10291. state.moveX = clamp(state.moveX, -maxMoveX.value, maxMoveX.value);
  10292. state.moveY = clamp(state.moveY, -maxMoveY.value, maxMoveY.value);
  10293. state.zooming = false;
  10294. }
  10295. state.moving = false;
  10296. startMoveX = 0;
  10297. startMoveY = 0;
  10298. startScale = 1;
  10299. if (state.scale < 1) {
  10300. resetScale();
  10301. }
  10302. if (state.scale > props.maxZoom) {
  10303. state.scale = +props.maxZoom;
  10304. }
  10305. }
  10306. }
  10307. preventDefault(event, stopPropagation2);
  10308. checkTap();
  10309. touch.reset();
  10310. };
  10311. const onLoad = (event) => {
  10312. const {
  10313. naturalWidth,
  10314. naturalHeight
  10315. } = event.target;
  10316. state.imageRatio = naturalHeight / naturalWidth;
  10317. };
  10318. watch(() => props.active, resetScale);
  10319. watch(() => props.show, (value) => {
  10320. if (!value) {
  10321. resetScale();
  10322. }
  10323. });
  10324. useEventListener("touchmove", onTouchMove, {
  10325. target: computed(() => {
  10326. var _a;
  10327. return (_a = swipeItem.value) == null ? void 0 : _a.$el;
  10328. })
  10329. });
  10330. return () => {
  10331. const imageSlots = {
  10332. loading: () => createVNode(Loading, {
  10333. "type": "spinner"
  10334. }, null)
  10335. };
  10336. return createVNode(SwipeItem, {
  10337. "ref": swipeItem,
  10338. "class": bem61("swipe-item"),
  10339. "onTouchstartPassive": onTouchStart,
  10340. "onTouchend": onTouchEnd,
  10341. "onTouchcancel": onTouchEnd
  10342. }, {
  10343. default: () => [createVNode(Image2, {
  10344. "src": props.src,
  10345. "fit": "contain",
  10346. "class": bem61("image", {
  10347. vertical: vertical.value
  10348. }),
  10349. "style": imageStyle.value,
  10350. "onLoad": onLoad
  10351. }, imageSlots)]
  10352. });
  10353. };
  10354. }
  10355. });
  10356. // node_modules/vant/es/image-preview/ImagePreview.mjs
  10357. var [name66, bem62] = createNamespace("image-preview");
  10358. var popupProps2 = ["show", "transition", "overlayStyle", "closeOnPopstate"];
  10359. var imagePreviewProps = {
  10360. show: Boolean,
  10361. loop: truthProp,
  10362. images: makeArrayProp(),
  10363. minZoom: makeNumericProp(1 / 3),
  10364. maxZoom: makeNumericProp(3),
  10365. overlay: truthProp,
  10366. closeable: Boolean,
  10367. showIndex: truthProp,
  10368. className: unknownProp,
  10369. closeIcon: makeStringProp("clear"),
  10370. transition: String,
  10371. beforeClose: Function,
  10372. overlayClass: unknownProp,
  10373. overlayStyle: Object,
  10374. swipeDuration: makeNumericProp(300),
  10375. startPosition: makeNumericProp(0),
  10376. showIndicators: Boolean,
  10377. closeOnPopstate: truthProp,
  10378. closeIconPosition: makeStringProp("top-right")
  10379. };
  10380. var stdin_default70 = defineComponent({
  10381. name: name66,
  10382. props: imagePreviewProps,
  10383. emits: ["scale", "close", "closed", "change", "update:show"],
  10384. setup(props, {
  10385. emit,
  10386. slots
  10387. }) {
  10388. const swipeRef = ref();
  10389. const state = reactive({
  10390. active: 0,
  10391. rootWidth: 0,
  10392. rootHeight: 0
  10393. });
  10394. const resize = () => {
  10395. if (swipeRef.value) {
  10396. const rect = useRect(swipeRef.value.$el);
  10397. state.rootWidth = rect.width;
  10398. state.rootHeight = rect.height;
  10399. swipeRef.value.resize();
  10400. }
  10401. };
  10402. const emitScale = (args) => emit("scale", args);
  10403. const updateShow = (show) => emit("update:show", show);
  10404. const emitClose = () => {
  10405. callInterceptor(props.beforeClose, {
  10406. args: [state.active],
  10407. done: () => updateShow(false)
  10408. });
  10409. };
  10410. const setActive = (active) => {
  10411. if (active !== state.active) {
  10412. state.active = active;
  10413. emit("change", active);
  10414. }
  10415. };
  10416. const renderIndex = () => {
  10417. if (props.showIndex) {
  10418. return createVNode("div", {
  10419. "class": bem62("index")
  10420. }, [slots.index ? slots.index({
  10421. index: state.active
  10422. }) : `${state.active + 1} / ${props.images.length}`]);
  10423. }
  10424. };
  10425. const renderCover = () => {
  10426. if (slots.cover) {
  10427. return createVNode("div", {
  10428. "class": bem62("cover")
  10429. }, [slots.cover()]);
  10430. }
  10431. };
  10432. const renderImages = () => createVNode(Swipe, {
  10433. "ref": swipeRef,
  10434. "lazyRender": true,
  10435. "loop": props.loop,
  10436. "class": bem62("swipe"),
  10437. "duration": props.swipeDuration,
  10438. "initialSwipe": props.startPosition,
  10439. "showIndicators": props.showIndicators,
  10440. "indicatorColor": "white",
  10441. "onChange": setActive
  10442. }, {
  10443. default: () => [props.images.map((image) => createVNode(stdin_default69, {
  10444. "src": image,
  10445. "show": props.show,
  10446. "active": state.active,
  10447. "maxZoom": props.maxZoom,
  10448. "minZoom": props.minZoom,
  10449. "rootWidth": state.rootWidth,
  10450. "rootHeight": state.rootHeight,
  10451. "onScale": emitScale,
  10452. "onClose": emitClose
  10453. }, null))]
  10454. });
  10455. const renderClose = () => {
  10456. if (props.closeable) {
  10457. return createVNode(Icon, {
  10458. "role": "button",
  10459. "name": props.closeIcon,
  10460. "class": [bem62("close-icon", props.closeIconPosition), HAPTICS_FEEDBACK],
  10461. "onClick": emitClose
  10462. }, null);
  10463. }
  10464. };
  10465. const onClosed = () => emit("closed");
  10466. const swipeTo = (index, options) => {
  10467. var _a;
  10468. return (_a = swipeRef.value) == null ? void 0 : _a.swipeTo(index, options);
  10469. };
  10470. useExpose({
  10471. swipeTo
  10472. });
  10473. onMounted(resize);
  10474. watch([windowWidth, windowHeight], resize);
  10475. watch(() => props.startPosition, (value) => setActive(+value));
  10476. watch(() => props.show, (value) => {
  10477. const {
  10478. images,
  10479. startPosition
  10480. } = props;
  10481. if (value) {
  10482. setActive(+startPosition);
  10483. nextTick(() => {
  10484. resize();
  10485. swipeTo(+startPosition, {
  10486. immediate: true
  10487. });
  10488. });
  10489. } else {
  10490. emit("close", {
  10491. index: state.active,
  10492. url: images[state.active]
  10493. });
  10494. }
  10495. });
  10496. return () => createVNode(Popup, mergeProps({
  10497. "class": [bem62(), props.className],
  10498. "overlayClass": [bem62("overlay"), props.overlayClass],
  10499. "onClosed": onClosed,
  10500. "onUpdate:show": updateShow
  10501. }, pick(props, popupProps2)), {
  10502. default: () => [renderClose(), renderImages(), renderIndex(), renderCover()]
  10503. });
  10504. }
  10505. });
  10506. // node_modules/vant/es/image-preview/function-call.mjs
  10507. var instance2;
  10508. var defaultConfig = {
  10509. loop: true,
  10510. images: [],
  10511. maxZoom: 3,
  10512. minZoom: 1 / 3,
  10513. onScale: void 0,
  10514. onClose: void 0,
  10515. onChange: void 0,
  10516. teleport: "body",
  10517. className: "",
  10518. showIndex: true,
  10519. closeable: false,
  10520. closeIcon: "clear",
  10521. transition: void 0,
  10522. beforeClose: void 0,
  10523. overlayStyle: void 0,
  10524. overlayClass: void 0,
  10525. startPosition: 0,
  10526. swipeDuration: 300,
  10527. showIndicators: false,
  10528. closeOnPopstate: true,
  10529. closeIconPosition: "top-right"
  10530. };
  10531. function initInstance2() {
  10532. ({
  10533. instance: instance2
  10534. } = mountComponent({
  10535. setup() {
  10536. const {
  10537. state,
  10538. toggle
  10539. } = usePopupState();
  10540. const onClosed = () => {
  10541. state.images = [];
  10542. };
  10543. return () => createVNode(stdin_default70, mergeProps(state, {
  10544. "onClosed": onClosed,
  10545. "onUpdate:show": toggle
  10546. }), null);
  10547. }
  10548. }));
  10549. }
  10550. var ImagePreview = (options, startPosition = 0) => {
  10551. if (!inBrowser) {
  10552. return;
  10553. }
  10554. if (!instance2) {
  10555. initInstance2();
  10556. }
  10557. options = Array.isArray(options) ? {
  10558. images: options,
  10559. startPosition
  10560. } : options;
  10561. instance2.open(extend({}, defaultConfig, options));
  10562. return instance2;
  10563. };
  10564. ImagePreview.Component = withInstall(stdin_default70);
  10565. ImagePreview.install = (app) => {
  10566. app.use(ImagePreview.Component);
  10567. };
  10568. // node_modules/vant/es/index-bar/IndexBar.mjs
  10569. function genAlphabet() {
  10570. const charCodeOfA = "A".charCodeAt(0);
  10571. const indexList = Array(26).fill("").map((_, i) => String.fromCharCode(charCodeOfA + i));
  10572. return indexList;
  10573. }
  10574. var [name67, bem63] = createNamespace("index-bar");
  10575. var indexBarProps = {
  10576. sticky: truthProp,
  10577. zIndex: numericProp,
  10578. teleport: [String, Object],
  10579. highlightColor: String,
  10580. stickyOffsetTop: makeNumberProp(0),
  10581. indexList: {
  10582. type: Array,
  10583. default: genAlphabet
  10584. }
  10585. };
  10586. var INDEX_BAR_KEY = Symbol(name67);
  10587. var stdin_default71 = defineComponent({
  10588. name: name67,
  10589. props: indexBarProps,
  10590. emits: ["select", "change"],
  10591. setup(props, {
  10592. emit,
  10593. slots
  10594. }) {
  10595. const root = ref();
  10596. const sidebar = ref();
  10597. const activeAnchor = ref("");
  10598. const touch = useTouch();
  10599. const scrollParent = useScrollParent(root);
  10600. const {
  10601. children,
  10602. linkChildren
  10603. } = useChildren(INDEX_BAR_KEY);
  10604. let selectActiveIndex;
  10605. linkChildren({
  10606. props
  10607. });
  10608. const sidebarStyle = computed(() => {
  10609. if (isDef(props.zIndex)) {
  10610. return {
  10611. zIndex: +props.zIndex + 1
  10612. };
  10613. }
  10614. });
  10615. const highlightStyle = computed(() => {
  10616. if (props.highlightColor) {
  10617. return {
  10618. color: props.highlightColor
  10619. };
  10620. }
  10621. });
  10622. const getActiveAnchor = (scrollTop, rects) => {
  10623. for (let i = children.length - 1; i >= 0; i--) {
  10624. const prevHeight = i > 0 ? rects[i - 1].height : 0;
  10625. const reachTop = props.sticky ? prevHeight + props.stickyOffsetTop : 0;
  10626. if (scrollTop + reachTop >= rects[i].top) {
  10627. return i;
  10628. }
  10629. }
  10630. return -1;
  10631. };
  10632. const getMatchAnchor = (index) => children.find((item) => String(item.index) === index);
  10633. const onScroll = () => {
  10634. if (isHidden(root)) {
  10635. return;
  10636. }
  10637. const {
  10638. sticky,
  10639. indexList
  10640. } = props;
  10641. const scrollTop = getScrollTop(scrollParent.value);
  10642. const scrollParentRect = useRect(scrollParent);
  10643. const rects = children.map((item) => item.getRect(scrollParent.value, scrollParentRect));
  10644. let active = -1;
  10645. if (selectActiveIndex) {
  10646. const match = getMatchAnchor(selectActiveIndex);
  10647. if (match) {
  10648. const rect = match.getRect(scrollParent.value, scrollParentRect);
  10649. active = getActiveAnchor(rect.top, rects);
  10650. }
  10651. } else {
  10652. active = getActiveAnchor(scrollTop, rects);
  10653. }
  10654. activeAnchor.value = indexList[active];
  10655. if (sticky) {
  10656. children.forEach((item, index) => {
  10657. const {
  10658. state,
  10659. $el
  10660. } = item;
  10661. if (index === active || index === active - 1) {
  10662. const rect = $el.getBoundingClientRect();
  10663. state.left = rect.left;
  10664. state.width = rect.width;
  10665. } else {
  10666. state.left = null;
  10667. state.width = null;
  10668. }
  10669. if (index === active) {
  10670. state.active = true;
  10671. state.top = Math.max(props.stickyOffsetTop, rects[index].top - scrollTop) + scrollParentRect.top;
  10672. } else if (index === active - 1 && selectActiveIndex === "") {
  10673. const activeItemTop = rects[active].top - scrollTop;
  10674. state.active = activeItemTop > 0;
  10675. state.top = activeItemTop + scrollParentRect.top - rects[index].height;
  10676. } else {
  10677. state.active = false;
  10678. }
  10679. });
  10680. }
  10681. selectActiveIndex = "";
  10682. };
  10683. const init = () => {
  10684. nextTick(onScroll);
  10685. };
  10686. useEventListener("scroll", onScroll, {
  10687. target: scrollParent,
  10688. passive: true
  10689. });
  10690. onMounted(init);
  10691. watch(() => props.indexList, init);
  10692. watch(activeAnchor, (value) => {
  10693. if (value) {
  10694. emit("change", value);
  10695. }
  10696. });
  10697. const renderIndexes = () => props.indexList.map((index) => {
  10698. const active = index === activeAnchor.value;
  10699. return createVNode("span", {
  10700. "class": bem63("index", {
  10701. active
  10702. }),
  10703. "style": active ? highlightStyle.value : void 0,
  10704. "data-index": index
  10705. }, [index]);
  10706. });
  10707. const scrollTo = (index) => {
  10708. selectActiveIndex = String(index);
  10709. const match = getMatchAnchor(selectActiveIndex);
  10710. if (match) {
  10711. const scrollTop = getScrollTop(scrollParent.value);
  10712. const scrollParentRect = useRect(scrollParent);
  10713. const {
  10714. offsetHeight
  10715. } = document.documentElement;
  10716. match.$el.scrollIntoView();
  10717. if (scrollTop === offsetHeight - scrollParentRect.height) {
  10718. onScroll();
  10719. return;
  10720. }
  10721. if (props.sticky && props.stickyOffsetTop) {
  10722. setRootScrollTop(getRootScrollTop() - props.stickyOffsetTop);
  10723. }
  10724. emit("select", match.index);
  10725. }
  10726. };
  10727. const scrollToElement = (element) => {
  10728. const {
  10729. index
  10730. } = element.dataset;
  10731. if (index) {
  10732. scrollTo(index);
  10733. }
  10734. };
  10735. const onClickSidebar = (event) => {
  10736. scrollToElement(event.target);
  10737. };
  10738. let touchActiveIndex;
  10739. const onTouchMove = (event) => {
  10740. touch.move(event);
  10741. if (touch.isVertical()) {
  10742. preventDefault(event);
  10743. const {
  10744. clientX,
  10745. clientY
  10746. } = event.touches[0];
  10747. const target = document.elementFromPoint(clientX, clientY);
  10748. if (target) {
  10749. const {
  10750. index
  10751. } = target.dataset;
  10752. if (index && touchActiveIndex !== index) {
  10753. touchActiveIndex = index;
  10754. scrollToElement(target);
  10755. }
  10756. }
  10757. }
  10758. };
  10759. const renderSidebar = () => createVNode("div", {
  10760. "ref": sidebar,
  10761. "class": bem63("sidebar"),
  10762. "style": sidebarStyle.value,
  10763. "onClick": onClickSidebar,
  10764. "onTouchstartPassive": touch.start
  10765. }, [renderIndexes()]);
  10766. useExpose({
  10767. scrollTo
  10768. });
  10769. useEventListener("touchmove", onTouchMove, {
  10770. target: sidebar
  10771. });
  10772. return () => {
  10773. var _a;
  10774. return createVNode("div", {
  10775. "ref": root,
  10776. "class": bem63()
  10777. }, [props.teleport ? createVNode(Teleport, {
  10778. "to": props.teleport
  10779. }, {
  10780. default: () => [renderSidebar()]
  10781. }) : renderSidebar(), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
  10782. };
  10783. }
  10784. });
  10785. // node_modules/vant/es/index-anchor/IndexAnchor.mjs
  10786. var [name68, bem64] = createNamespace("index-anchor");
  10787. var indexAnchorProps = {
  10788. index: numericProp
  10789. };
  10790. var stdin_default72 = defineComponent({
  10791. name: name68,
  10792. props: indexAnchorProps,
  10793. setup(props, {
  10794. slots
  10795. }) {
  10796. const state = reactive({
  10797. top: 0,
  10798. left: null,
  10799. rect: {
  10800. top: 0,
  10801. height: 0
  10802. },
  10803. width: null,
  10804. active: false
  10805. });
  10806. const root = ref();
  10807. const {
  10808. parent
  10809. } = useParent(INDEX_BAR_KEY);
  10810. if (!parent) {
  10811. if (true) {
  10812. console.error("[Vant] <IndexAnchor> must be a child component of <IndexBar>.");
  10813. }
  10814. return;
  10815. }
  10816. const isSticky = () => state.active && parent.props.sticky;
  10817. const anchorStyle = computed(() => {
  10818. const {
  10819. zIndex,
  10820. highlightColor
  10821. } = parent.props;
  10822. if (isSticky()) {
  10823. return extend(getZIndexStyle(zIndex), {
  10824. left: state.left ? `${state.left}px` : void 0,
  10825. width: state.width ? `${state.width}px` : void 0,
  10826. transform: state.top ? `translate3d(0, ${state.top}px, 0)` : void 0,
  10827. color: highlightColor
  10828. });
  10829. }
  10830. });
  10831. const getRect = (scrollParent, scrollParentRect) => {
  10832. const rootRect = useRect(root);
  10833. state.rect.height = rootRect.height;
  10834. if (scrollParent === window || scrollParent === document.body) {
  10835. state.rect.top = rootRect.top + getRootScrollTop();
  10836. } else {
  10837. state.rect.top = rootRect.top + getScrollTop(scrollParent) - scrollParentRect.top;
  10838. }
  10839. return state.rect;
  10840. };
  10841. useExpose({
  10842. state,
  10843. getRect
  10844. });
  10845. return () => {
  10846. const sticky = isSticky();
  10847. return createVNode("div", {
  10848. "ref": root,
  10849. "style": {
  10850. height: sticky ? `${state.rect.height}px` : void 0
  10851. }
  10852. }, [createVNode("div", {
  10853. "style": anchorStyle.value,
  10854. "class": [bem64({
  10855. sticky
  10856. }), {
  10857. [BORDER_BOTTOM]: sticky
  10858. }]
  10859. }, [slots.default ? slots.default() : props.index])]);
  10860. };
  10861. }
  10862. });
  10863. // node_modules/vant/es/index-anchor/index.mjs
  10864. var IndexAnchor = withInstall(stdin_default72);
  10865. // node_modules/vant/es/index-bar/index.mjs
  10866. var IndexBar = withInstall(stdin_default71);
  10867. // node_modules/vant/es/list/List.mjs
  10868. var [name69, bem65, t14] = createNamespace("list");
  10869. var listProps = {
  10870. error: Boolean,
  10871. offset: makeNumericProp(300),
  10872. loading: Boolean,
  10873. finished: Boolean,
  10874. errorText: String,
  10875. direction: makeStringProp("down"),
  10876. loadingText: String,
  10877. finishedText: String,
  10878. immediateCheck: truthProp
  10879. };
  10880. var stdin_default73 = defineComponent({
  10881. name: name69,
  10882. props: listProps,
  10883. emits: ["load", "update:error", "update:loading"],
  10884. setup(props, {
  10885. emit,
  10886. slots
  10887. }) {
  10888. const loading = ref(false);
  10889. const root = ref();
  10890. const placeholder = ref();
  10891. const tabStatus = useTabStatus();
  10892. const scrollParent = useScrollParent(root);
  10893. const check = () => {
  10894. nextTick(() => {
  10895. if (loading.value || props.finished || props.error || (tabStatus == null ? void 0 : tabStatus.value) === false) {
  10896. return;
  10897. }
  10898. const {
  10899. offset: offset2,
  10900. direction
  10901. } = props;
  10902. const scrollParentRect = useRect(scrollParent);
  10903. if (!scrollParentRect.height || isHidden(root)) {
  10904. return;
  10905. }
  10906. let isReachEdge = false;
  10907. const placeholderRect = useRect(placeholder);
  10908. if (direction === "up") {
  10909. isReachEdge = scrollParentRect.top - placeholderRect.top <= offset2;
  10910. } else {
  10911. isReachEdge = placeholderRect.bottom - scrollParentRect.bottom <= offset2;
  10912. }
  10913. if (isReachEdge) {
  10914. loading.value = true;
  10915. emit("update:loading", true);
  10916. emit("load");
  10917. }
  10918. });
  10919. };
  10920. const renderFinishedText = () => {
  10921. if (props.finished) {
  10922. const text = slots.finished ? slots.finished() : props.finishedText;
  10923. if (text) {
  10924. return createVNode("div", {
  10925. "class": bem65("finished-text")
  10926. }, [text]);
  10927. }
  10928. }
  10929. };
  10930. const clickErrorText = () => {
  10931. emit("update:error", false);
  10932. check();
  10933. };
  10934. const renderErrorText = () => {
  10935. if (props.error) {
  10936. const text = slots.error ? slots.error() : props.errorText;
  10937. if (text) {
  10938. return createVNode("div", {
  10939. "role": "button",
  10940. "class": bem65("error-text"),
  10941. "tabindex": 0,
  10942. "onClick": clickErrorText
  10943. }, [text]);
  10944. }
  10945. }
  10946. };
  10947. const renderLoading = () => {
  10948. if (loading.value && !props.finished) {
  10949. return createVNode("div", {
  10950. "class": bem65("loading")
  10951. }, [slots.loading ? slots.loading() : createVNode(Loading, {
  10952. "class": bem65("loading-icon")
  10953. }, {
  10954. default: () => [props.loadingText || t14("loading")]
  10955. })]);
  10956. }
  10957. };
  10958. watch(() => [props.loading, props.finished, props.error], check);
  10959. if (tabStatus) {
  10960. watch(tabStatus, (tabActive) => {
  10961. if (tabActive) {
  10962. check();
  10963. }
  10964. });
  10965. }
  10966. onUpdated(() => {
  10967. loading.value = props.loading;
  10968. });
  10969. onMounted(() => {
  10970. if (props.immediateCheck) {
  10971. check();
  10972. }
  10973. });
  10974. useExpose({
  10975. check
  10976. });
  10977. useEventListener("scroll", check, {
  10978. target: scrollParent,
  10979. passive: true
  10980. });
  10981. return () => {
  10982. var _a;
  10983. const Content = (_a = slots.default) == null ? void 0 : _a.call(slots);
  10984. const Placeholder = createVNode("div", {
  10985. "ref": placeholder,
  10986. "class": bem65("placeholder")
  10987. }, null);
  10988. return createVNode("div", {
  10989. "ref": root,
  10990. "role": "feed",
  10991. "class": bem65(),
  10992. "aria-busy": loading.value
  10993. }, [props.direction === "down" ? Content : Placeholder, renderLoading(), renderFinishedText(), renderErrorText(), props.direction === "up" ? Content : Placeholder]);
  10994. };
  10995. }
  10996. });
  10997. // node_modules/vant/es/list/index.mjs
  10998. var List = withInstall(stdin_default73);
  10999. // node_modules/vant/es/nav-bar/NavBar.mjs
  11000. var [name70, bem66] = createNamespace("nav-bar");
  11001. var navBarProps = {
  11002. title: String,
  11003. fixed: Boolean,
  11004. zIndex: numericProp,
  11005. border: truthProp,
  11006. leftText: String,
  11007. rightText: String,
  11008. leftArrow: Boolean,
  11009. placeholder: Boolean,
  11010. safeAreaInsetTop: Boolean
  11011. };
  11012. var stdin_default74 = defineComponent({
  11013. name: name70,
  11014. props: navBarProps,
  11015. emits: ["click-left", "click-right"],
  11016. setup(props, {
  11017. emit,
  11018. slots
  11019. }) {
  11020. const navBarRef = ref();
  11021. const renderPlaceholder = usePlaceholder(navBarRef, bem66);
  11022. const onClickLeft = (event) => emit("click-left", event);
  11023. const onClickRight = (event) => emit("click-right", event);
  11024. const renderLeft = () => {
  11025. if (slots.left) {
  11026. return slots.left();
  11027. }
  11028. return [props.leftArrow && createVNode(Icon, {
  11029. "class": bem66("arrow"),
  11030. "name": "arrow-left"
  11031. }, null), props.leftText && createVNode("span", {
  11032. "class": bem66("text")
  11033. }, [props.leftText])];
  11034. };
  11035. const renderRight = () => {
  11036. if (slots.right) {
  11037. return slots.right();
  11038. }
  11039. return createVNode("span", {
  11040. "class": bem66("text")
  11041. }, [props.rightText]);
  11042. };
  11043. const renderNavBar = () => {
  11044. const {
  11045. title,
  11046. fixed,
  11047. border,
  11048. zIndex
  11049. } = props;
  11050. const style = getZIndexStyle(zIndex);
  11051. const hasLeft = props.leftArrow || props.leftText || slots.left;
  11052. const hasRight = props.rightText || slots.right;
  11053. return createVNode("div", {
  11054. "ref": navBarRef,
  11055. "style": style,
  11056. "class": [bem66({
  11057. fixed
  11058. }), {
  11059. [BORDER_BOTTOM]: border,
  11060. "van-safe-area-top": props.safeAreaInsetTop
  11061. }]
  11062. }, [createVNode("div", {
  11063. "class": bem66("content")
  11064. }, [hasLeft && createVNode("div", {
  11065. "class": [bem66("left"), HAPTICS_FEEDBACK],
  11066. "onClick": onClickLeft
  11067. }, [renderLeft()]), createVNode("div", {
  11068. "class": [bem66("title"), "van-ellipsis"]
  11069. }, [slots.title ? slots.title() : title]), hasRight && createVNode("div", {
  11070. "class": [bem66("right"), HAPTICS_FEEDBACK],
  11071. "onClick": onClickRight
  11072. }, [renderRight()])])]);
  11073. };
  11074. return () => {
  11075. if (props.fixed && props.placeholder) {
  11076. return renderPlaceholder(renderNavBar);
  11077. }
  11078. return renderNavBar();
  11079. };
  11080. }
  11081. });
  11082. // node_modules/vant/es/nav-bar/index.mjs
  11083. var NavBar = withInstall(stdin_default74);
  11084. // node_modules/vant/es/notice-bar/NoticeBar.mjs
  11085. var [name71, bem67] = createNamespace("notice-bar");
  11086. var noticeBarProps = {
  11087. text: String,
  11088. mode: String,
  11089. color: String,
  11090. delay: makeNumericProp(1),
  11091. speed: makeNumericProp(60),
  11092. leftIcon: String,
  11093. wrapable: Boolean,
  11094. background: String,
  11095. scrollable: {
  11096. type: Boolean,
  11097. default: null
  11098. }
  11099. };
  11100. var stdin_default75 = defineComponent({
  11101. name: name71,
  11102. props: noticeBarProps,
  11103. emits: ["close", "replay"],
  11104. setup(props, {
  11105. emit,
  11106. slots
  11107. }) {
  11108. let wrapWidth = 0;
  11109. let contentWidth = 0;
  11110. let startTimer;
  11111. const wrapRef = ref();
  11112. const contentRef = ref();
  11113. const state = reactive({
  11114. show: true,
  11115. offset: 0,
  11116. duration: 0
  11117. });
  11118. const renderLeftIcon = () => {
  11119. if (slots["left-icon"]) {
  11120. return slots["left-icon"]();
  11121. }
  11122. if (props.leftIcon) {
  11123. return createVNode(Icon, {
  11124. "class": bem67("left-icon"),
  11125. "name": props.leftIcon
  11126. }, null);
  11127. }
  11128. };
  11129. const getRightIconName = () => {
  11130. if (props.mode === "closeable") {
  11131. return "cross";
  11132. }
  11133. if (props.mode === "link") {
  11134. return "arrow";
  11135. }
  11136. };
  11137. const onClickRightIcon = (event) => {
  11138. if (props.mode === "closeable") {
  11139. state.show = false;
  11140. emit("close", event);
  11141. }
  11142. };
  11143. const renderRightIcon = () => {
  11144. if (slots["right-icon"]) {
  11145. return slots["right-icon"]();
  11146. }
  11147. const name210 = getRightIconName();
  11148. if (name210) {
  11149. return createVNode(Icon, {
  11150. "name": name210,
  11151. "class": bem67("right-icon"),
  11152. "onClick": onClickRightIcon
  11153. }, null);
  11154. }
  11155. };
  11156. const onTransitionEnd = () => {
  11157. state.offset = wrapWidth;
  11158. state.duration = 0;
  11159. raf(() => {
  11160. doubleRaf(() => {
  11161. state.offset = -contentWidth;
  11162. state.duration = (contentWidth + wrapWidth) / +props.speed;
  11163. emit("replay");
  11164. });
  11165. });
  11166. };
  11167. const renderMarquee = () => {
  11168. const ellipsis = props.scrollable === false && !props.wrapable;
  11169. const style = {
  11170. transform: state.offset ? `translateX(${state.offset}px)` : "",
  11171. transitionDuration: `${state.duration}s`
  11172. };
  11173. return createVNode("div", {
  11174. "ref": wrapRef,
  11175. "role": "marquee",
  11176. "class": bem67("wrap")
  11177. }, [createVNode("div", {
  11178. "ref": contentRef,
  11179. "style": style,
  11180. "class": [bem67("content"), {
  11181. "van-ellipsis": ellipsis
  11182. }],
  11183. "onTransitionend": onTransitionEnd
  11184. }, [slots.default ? slots.default() : props.text])]);
  11185. };
  11186. const reset = () => {
  11187. const {
  11188. delay,
  11189. speed,
  11190. scrollable
  11191. } = props;
  11192. const ms = isDef(delay) ? +delay * 1e3 : 0;
  11193. wrapWidth = 0;
  11194. contentWidth = 0;
  11195. state.offset = 0;
  11196. state.duration = 0;
  11197. clearTimeout(startTimer);
  11198. startTimer = setTimeout(() => {
  11199. if (!wrapRef.value || !contentRef.value || scrollable === false) {
  11200. return;
  11201. }
  11202. const wrapRefWidth = useRect(wrapRef).width;
  11203. const contentRefWidth = useRect(contentRef).width;
  11204. if (scrollable || contentRefWidth > wrapRefWidth) {
  11205. doubleRaf(() => {
  11206. wrapWidth = wrapRefWidth;
  11207. contentWidth = contentRefWidth;
  11208. state.offset = -contentWidth;
  11209. state.duration = contentWidth / +speed;
  11210. });
  11211. }
  11212. }, ms);
  11213. };
  11214. onPopupReopen(reset);
  11215. onMountedOrActivated(reset);
  11216. useEventListener("pageshow", reset);
  11217. useExpose({
  11218. reset
  11219. });
  11220. watch(() => [props.text, props.scrollable], reset);
  11221. return () => {
  11222. const {
  11223. color,
  11224. wrapable,
  11225. background
  11226. } = props;
  11227. return withDirectives(createVNode("div", {
  11228. "role": "alert",
  11229. "class": bem67({
  11230. wrapable
  11231. }),
  11232. "style": {
  11233. color,
  11234. background
  11235. }
  11236. }, [renderLeftIcon(), renderMarquee(), renderRightIcon()]), [[vShow, state.show]]);
  11237. };
  11238. }
  11239. });
  11240. // node_modules/vant/es/notice-bar/index.mjs
  11241. var NoticeBar = withInstall(stdin_default75);
  11242. // node_modules/vant/es/notify/Notify.mjs
  11243. var [name72, bem68] = createNamespace("notify");
  11244. var notifyProps = extend({}, popupSharedProps, {
  11245. type: makeStringProp("danger"),
  11246. color: String,
  11247. message: numericProp,
  11248. position: makeStringProp("top"),
  11249. className: unknownProp,
  11250. background: String,
  11251. lockScroll: Boolean
  11252. });
  11253. var stdin_default76 = defineComponent({
  11254. name: name72,
  11255. props: notifyProps,
  11256. emits: ["update:show"],
  11257. setup(props, {
  11258. emit,
  11259. slots
  11260. }) {
  11261. const updateShow = (show) => emit("update:show", show);
  11262. return () => createVNode(Popup, {
  11263. "show": props.show,
  11264. "class": [bem68([props.type]), props.className],
  11265. "style": {
  11266. color: props.color,
  11267. background: props.background
  11268. },
  11269. "overlay": false,
  11270. "position": props.position,
  11271. "duration": 0.2,
  11272. "lockScroll": props.lockScroll,
  11273. "onUpdate:show": updateShow
  11274. }, {
  11275. default: () => [slots.default ? slots.default() : props.message]
  11276. });
  11277. }
  11278. });
  11279. // node_modules/vant/es/notify/function-call.mjs
  11280. var timer;
  11281. var instance3;
  11282. var parseOptions2 = (message) => isObject(message) ? message : {
  11283. message
  11284. };
  11285. function initInstance3() {
  11286. ({
  11287. instance: instance3
  11288. } = mountComponent({
  11289. setup() {
  11290. const {
  11291. state,
  11292. toggle
  11293. } = usePopupState();
  11294. return () => createVNode(stdin_default76, mergeProps(state, {
  11295. "onUpdate:show": toggle
  11296. }), null);
  11297. }
  11298. }));
  11299. }
  11300. function Notify(options) {
  11301. if (!inBrowser) {
  11302. return;
  11303. }
  11304. if (!instance3) {
  11305. initInstance3();
  11306. }
  11307. options = extend({}, Notify.currentOptions, parseOptions2(options));
  11308. instance3.open(options);
  11309. clearTimeout(timer);
  11310. if (options.duration > 0) {
  11311. timer = window.setTimeout(Notify.clear, options.duration);
  11312. }
  11313. return instance3;
  11314. }
  11315. var getDefaultOptions = () => ({
  11316. type: "danger",
  11317. color: void 0,
  11318. message: "",
  11319. onClose: void 0,
  11320. onClick: void 0,
  11321. onOpened: void 0,
  11322. duration: 3e3,
  11323. position: void 0,
  11324. className: "",
  11325. lockScroll: false,
  11326. background: void 0
  11327. });
  11328. Notify.clear = () => {
  11329. if (instance3) {
  11330. instance3.toggle(false);
  11331. }
  11332. };
  11333. Notify.currentOptions = getDefaultOptions();
  11334. Notify.setDefaultOptions = (options) => {
  11335. extend(Notify.currentOptions, options);
  11336. };
  11337. Notify.resetDefaultOptions = () => {
  11338. Notify.currentOptions = getDefaultOptions();
  11339. };
  11340. Notify.Component = withInstall(stdin_default76);
  11341. Notify.install = (app) => {
  11342. app.use(Notify.Component);
  11343. app.config.globalProperties.$notify = Notify;
  11344. };
  11345. // node_modules/vant/es/number-keyboard/NumberKeyboardKey.mjs
  11346. var [name73, bem69] = createNamespace("key");
  11347. var CollapseIcon = createVNode("svg", {
  11348. "class": bem69("collapse-icon"),
  11349. "viewBox": "0 0 30 24"
  11350. }, [createVNode("path", {
  11351. "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",
  11352. "fill": "currentColor"
  11353. }, null)]);
  11354. var DeleteIcon = createVNode("svg", {
  11355. "class": bem69("delete-icon"),
  11356. "viewBox": "0 0 32 22"
  11357. }, [createVNode("path", {
  11358. "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",
  11359. "fill": "currentColor"
  11360. }, null)]);
  11361. var stdin_default77 = defineComponent({
  11362. name: name73,
  11363. props: {
  11364. type: String,
  11365. text: numericProp,
  11366. color: String,
  11367. wider: Boolean,
  11368. large: Boolean,
  11369. loading: Boolean
  11370. },
  11371. emits: ["press"],
  11372. setup(props, {
  11373. emit,
  11374. slots
  11375. }) {
  11376. const active = ref(false);
  11377. const touch = useTouch();
  11378. const onTouchStart = (event) => {
  11379. touch.start(event);
  11380. active.value = true;
  11381. };
  11382. const onTouchMove = (event) => {
  11383. touch.move(event);
  11384. if (touch.direction.value) {
  11385. active.value = false;
  11386. }
  11387. };
  11388. const onTouchEnd = (event) => {
  11389. if (active.value) {
  11390. if (!slots.default) {
  11391. preventDefault(event);
  11392. }
  11393. active.value = false;
  11394. emit("press", props.text, props.type);
  11395. }
  11396. };
  11397. const renderContent = () => {
  11398. if (props.loading) {
  11399. return createVNode(Loading, {
  11400. "class": bem69("loading-icon")
  11401. }, null);
  11402. }
  11403. const text = slots.default ? slots.default() : props.text;
  11404. switch (props.type) {
  11405. case "delete":
  11406. return text || DeleteIcon;
  11407. case "extra":
  11408. return text || CollapseIcon;
  11409. default:
  11410. return text;
  11411. }
  11412. };
  11413. return () => createVNode("div", {
  11414. "class": bem69("wrapper", {
  11415. wider: props.wider
  11416. }),
  11417. "onTouchstartPassive": onTouchStart,
  11418. "onTouchmovePassive": onTouchMove,
  11419. "onTouchend": onTouchEnd,
  11420. "onTouchcancel": onTouchEnd
  11421. }, [createVNode("div", {
  11422. "role": "button",
  11423. "tabindex": 0,
  11424. "class": bem69([props.color, {
  11425. large: props.large,
  11426. active: active.value,
  11427. delete: props.type === "delete"
  11428. }])
  11429. }, [renderContent()])]);
  11430. }
  11431. });
  11432. // node_modules/vant/es/number-keyboard/NumberKeyboard.mjs
  11433. var [name74, bem70] = createNamespace("number-keyboard");
  11434. var numberKeyboardProps = {
  11435. show: Boolean,
  11436. title: String,
  11437. theme: makeStringProp("default"),
  11438. zIndex: numericProp,
  11439. teleport: [String, Object],
  11440. maxlength: makeNumericProp(Infinity),
  11441. modelValue: makeStringProp(""),
  11442. transition: truthProp,
  11443. blurOnClose: truthProp,
  11444. showDeleteKey: truthProp,
  11445. randomKeyOrder: Boolean,
  11446. closeButtonText: String,
  11447. deleteButtonText: String,
  11448. closeButtonLoading: Boolean,
  11449. hideOnClickOutside: truthProp,
  11450. safeAreaInsetBottom: truthProp,
  11451. extraKey: {
  11452. type: [String, Array],
  11453. default: ""
  11454. }
  11455. };
  11456. function shuffle(array) {
  11457. for (let i = array.length - 1; i > 0; i--) {
  11458. const j = Math.floor(Math.random() * (i + 1));
  11459. const temp = array[i];
  11460. array[i] = array[j];
  11461. array[j] = temp;
  11462. }
  11463. return array;
  11464. }
  11465. var stdin_default78 = defineComponent({
  11466. name: name74,
  11467. props: numberKeyboardProps,
  11468. emits: ["show", "hide", "blur", "input", "close", "delete", "update:modelValue"],
  11469. setup(props, {
  11470. emit,
  11471. slots
  11472. }) {
  11473. const root = ref();
  11474. const genBasicKeys = () => {
  11475. const keys2 = Array(9).fill("").map((_, i) => ({
  11476. text: i + 1
  11477. }));
  11478. if (props.randomKeyOrder) {
  11479. shuffle(keys2);
  11480. }
  11481. return keys2;
  11482. };
  11483. const genDefaultKeys = () => [...genBasicKeys(), {
  11484. text: props.extraKey,
  11485. type: "extra"
  11486. }, {
  11487. text: 0
  11488. }, {
  11489. text: props.showDeleteKey ? props.deleteButtonText : "",
  11490. type: props.showDeleteKey ? "delete" : ""
  11491. }];
  11492. const genCustomKeys = () => {
  11493. const keys2 = genBasicKeys();
  11494. const {
  11495. extraKey
  11496. } = props;
  11497. const extraKeys = Array.isArray(extraKey) ? extraKey : [extraKey];
  11498. if (extraKeys.length === 1) {
  11499. keys2.push({
  11500. text: 0,
  11501. wider: true
  11502. }, {
  11503. text: extraKeys[0],
  11504. type: "extra"
  11505. });
  11506. } else if (extraKeys.length === 2) {
  11507. keys2.push({
  11508. text: extraKeys[0],
  11509. type: "extra"
  11510. }, {
  11511. text: 0
  11512. }, {
  11513. text: extraKeys[1],
  11514. type: "extra"
  11515. });
  11516. }
  11517. return keys2;
  11518. };
  11519. const keys = computed(() => props.theme === "custom" ? genCustomKeys() : genDefaultKeys());
  11520. const onBlur = () => {
  11521. if (props.show) {
  11522. emit("blur");
  11523. }
  11524. };
  11525. const onClose = () => {
  11526. emit("close");
  11527. if (props.blurOnClose) {
  11528. onBlur();
  11529. }
  11530. };
  11531. const onAnimationEnd = () => emit(props.show ? "show" : "hide");
  11532. const onPress = (text, type) => {
  11533. if (text === "") {
  11534. if (type === "extra") {
  11535. onBlur();
  11536. }
  11537. return;
  11538. }
  11539. const value = props.modelValue;
  11540. if (type === "delete") {
  11541. emit("delete");
  11542. emit("update:modelValue", value.slice(0, value.length - 1));
  11543. } else if (type === "close") {
  11544. onClose();
  11545. } else if (value.length < props.maxlength) {
  11546. emit("input", text);
  11547. emit("update:modelValue", value + text);
  11548. }
  11549. };
  11550. const renderTitle = () => {
  11551. const {
  11552. title,
  11553. theme,
  11554. closeButtonText
  11555. } = props;
  11556. const leftSlot = slots["title-left"];
  11557. const showClose = closeButtonText && theme === "default";
  11558. const showTitle = title || showClose || leftSlot;
  11559. if (!showTitle) {
  11560. return;
  11561. }
  11562. return createVNode("div", {
  11563. "class": bem70("header")
  11564. }, [leftSlot && createVNode("span", {
  11565. "class": bem70("title-left")
  11566. }, [leftSlot()]), title && createVNode("h2", {
  11567. "class": bem70("title")
  11568. }, [title]), showClose && createVNode("button", {
  11569. "type": "button",
  11570. "class": [bem70("close"), HAPTICS_FEEDBACK],
  11571. "onClick": onClose
  11572. }, [closeButtonText])]);
  11573. };
  11574. const renderKeys = () => keys.value.map((key) => {
  11575. const keySlots = {};
  11576. if (key.type === "delete") {
  11577. keySlots.default = slots.delete;
  11578. }
  11579. if (key.type === "extra") {
  11580. keySlots.default = slots["extra-key"];
  11581. }
  11582. return createVNode(stdin_default77, {
  11583. "key": key.text,
  11584. "text": key.text,
  11585. "type": key.type,
  11586. "wider": key.wider,
  11587. "color": key.color,
  11588. "onPress": onPress
  11589. }, keySlots);
  11590. });
  11591. const renderSidebar = () => {
  11592. if (props.theme === "custom") {
  11593. return createVNode("div", {
  11594. "class": bem70("sidebar")
  11595. }, [props.showDeleteKey && createVNode(stdin_default77, {
  11596. "large": true,
  11597. "text": props.deleteButtonText,
  11598. "type": "delete",
  11599. "onPress": onPress
  11600. }, {
  11601. delete: slots.delete
  11602. }), createVNode(stdin_default77, {
  11603. "large": true,
  11604. "text": props.closeButtonText,
  11605. "type": "close",
  11606. "color": "blue",
  11607. "loading": props.closeButtonLoading,
  11608. "onPress": onPress
  11609. }, null)]);
  11610. }
  11611. };
  11612. watch(() => props.show, (value) => {
  11613. if (!props.transition) {
  11614. emit(value ? "show" : "hide");
  11615. }
  11616. });
  11617. if (props.hideOnClickOutside) {
  11618. useClickAway(root, onBlur, {
  11619. eventName: "touchstart"
  11620. });
  11621. }
  11622. return () => {
  11623. const Title = renderTitle();
  11624. const Content = createVNode(Transition, {
  11625. "name": props.transition ? "van-slide-up" : ""
  11626. }, {
  11627. default: () => [withDirectives(createVNode("div", {
  11628. "ref": root,
  11629. "style": getZIndexStyle(props.zIndex),
  11630. "class": bem70({
  11631. unfit: !props.safeAreaInsetBottom,
  11632. "with-title": !!Title
  11633. }),
  11634. "onAnimationend": onAnimationEnd,
  11635. "onTouchstartPassive": stopPropagation
  11636. }, [Title, createVNode("div", {
  11637. "class": bem70("body")
  11638. }, [createVNode("div", {
  11639. "class": bem70("keys")
  11640. }, [renderKeys()]), renderSidebar()])]), [[vShow, props.show]])]
  11641. });
  11642. if (props.teleport) {
  11643. return createVNode(Teleport, {
  11644. "to": props.teleport
  11645. }, {
  11646. default: () => [Content]
  11647. });
  11648. }
  11649. return Content;
  11650. };
  11651. }
  11652. });
  11653. // node_modules/vant/es/number-keyboard/index.mjs
  11654. var NumberKeyboard = withInstall(stdin_default78);
  11655. // node_modules/vant/es/pagination/Pagination.mjs
  11656. var [name75, bem71, t15] = createNamespace("pagination");
  11657. var makePage = (number, text, active) => ({
  11658. number,
  11659. text,
  11660. active
  11661. });
  11662. var paginationProps = {
  11663. mode: makeStringProp("multi"),
  11664. prevText: String,
  11665. nextText: String,
  11666. pageCount: makeNumericProp(0),
  11667. modelValue: makeNumberProp(0),
  11668. totalItems: makeNumericProp(0),
  11669. showPageSize: makeNumericProp(5),
  11670. itemsPerPage: makeNumericProp(10),
  11671. forceEllipses: Boolean
  11672. };
  11673. var stdin_default79 = defineComponent({
  11674. name: name75,
  11675. props: paginationProps,
  11676. emits: ["change", "update:modelValue"],
  11677. setup(props, {
  11678. emit,
  11679. slots
  11680. }) {
  11681. const count = computed(() => {
  11682. const {
  11683. pageCount,
  11684. totalItems,
  11685. itemsPerPage
  11686. } = props;
  11687. const count2 = +pageCount || Math.ceil(+totalItems / +itemsPerPage);
  11688. return Math.max(1, count2);
  11689. });
  11690. const pages = computed(() => {
  11691. const items = [];
  11692. const pageCount = count.value;
  11693. const showPageSize = +props.showPageSize;
  11694. const {
  11695. modelValue,
  11696. forceEllipses
  11697. } = props;
  11698. let startPage = 1;
  11699. let endPage = pageCount;
  11700. const isMaxSized = showPageSize < pageCount;
  11701. if (isMaxSized) {
  11702. startPage = Math.max(modelValue - Math.floor(showPageSize / 2), 1);
  11703. endPage = startPage + showPageSize - 1;
  11704. if (endPage > pageCount) {
  11705. endPage = pageCount;
  11706. startPage = endPage - showPageSize + 1;
  11707. }
  11708. }
  11709. for (let number = startPage; number <= endPage; number++) {
  11710. const page = makePage(number, number, number === modelValue);
  11711. items.push(page);
  11712. }
  11713. if (isMaxSized && showPageSize > 0 && forceEllipses) {
  11714. if (startPage > 1) {
  11715. const prevPages = makePage(startPage - 1, "...");
  11716. items.unshift(prevPages);
  11717. }
  11718. if (endPage < pageCount) {
  11719. const nextPages = makePage(endPage + 1, "...");
  11720. items.push(nextPages);
  11721. }
  11722. }
  11723. return items;
  11724. });
  11725. const updateModelValue = (value, emitChange) => {
  11726. value = clamp(value, 1, count.value);
  11727. if (props.modelValue !== value) {
  11728. emit("update:modelValue", value);
  11729. if (emitChange) {
  11730. emit("change", value);
  11731. }
  11732. }
  11733. };
  11734. watchEffect(() => updateModelValue(props.modelValue));
  11735. const renderDesc = () => createVNode("li", {
  11736. "class": bem71("page-desc")
  11737. }, [slots.pageDesc ? slots.pageDesc() : `${props.modelValue}/${count.value}`]);
  11738. const renderPrevButton = () => {
  11739. const {
  11740. mode,
  11741. modelValue
  11742. } = props;
  11743. const slot = slots["prev-text"];
  11744. const disabled = modelValue === 1;
  11745. return createVNode("li", {
  11746. "class": [bem71("item", {
  11747. disabled,
  11748. border: mode === "simple",
  11749. prev: true
  11750. }), BORDER_SURROUND]
  11751. }, [createVNode("button", {
  11752. "type": "button",
  11753. "disabled": disabled,
  11754. "onClick": () => updateModelValue(modelValue - 1, true)
  11755. }, [slot ? slot() : props.prevText || t15("prev")])]);
  11756. };
  11757. const renderNextButton = () => {
  11758. const {
  11759. mode,
  11760. modelValue
  11761. } = props;
  11762. const slot = slots["next-text"];
  11763. const disabled = modelValue === count.value;
  11764. return createVNode("li", {
  11765. "class": [bem71("item", {
  11766. disabled,
  11767. border: mode === "simple",
  11768. next: true
  11769. }), BORDER_SURROUND]
  11770. }, [createVNode("button", {
  11771. "type": "button",
  11772. "disabled": disabled,
  11773. "onClick": () => updateModelValue(modelValue + 1, true)
  11774. }, [slot ? slot() : props.nextText || t15("next")])]);
  11775. };
  11776. const renderPages = () => pages.value.map((page) => createVNode("li", {
  11777. "class": [bem71("item", {
  11778. active: page.active,
  11779. page: true
  11780. }), BORDER_SURROUND]
  11781. }, [createVNode("button", {
  11782. "type": "button",
  11783. "aria-current": page.active || void 0,
  11784. "onClick": () => updateModelValue(page.number, true)
  11785. }, [slots.page ? slots.page(page) : page.text])]));
  11786. return () => createVNode("nav", {
  11787. "role": "navigation",
  11788. "class": bem71()
  11789. }, [createVNode("ul", {
  11790. "class": bem71("items")
  11791. }, [renderPrevButton(), props.mode === "simple" ? renderDesc() : renderPages(), renderNextButton()])]);
  11792. }
  11793. });
  11794. // node_modules/vant/es/pagination/index.mjs
  11795. var Pagination = withInstall(stdin_default79);
  11796. // node_modules/vant/es/password-input/PasswordInput.mjs
  11797. var [name76, bem72] = createNamespace("password-input");
  11798. var passwordInputProps = {
  11799. info: String,
  11800. mask: truthProp,
  11801. value: makeStringProp(""),
  11802. gutter: numericProp,
  11803. length: makeNumericProp(6),
  11804. focused: Boolean,
  11805. errorInfo: String
  11806. };
  11807. var stdin_default80 = defineComponent({
  11808. name: name76,
  11809. props: passwordInputProps,
  11810. emits: ["focus"],
  11811. setup(props, {
  11812. emit
  11813. }) {
  11814. const onTouchStart = (event) => {
  11815. event.stopPropagation();
  11816. emit("focus", event);
  11817. };
  11818. const renderPoints = () => {
  11819. const Points = [];
  11820. const {
  11821. mask,
  11822. value,
  11823. length,
  11824. gutter,
  11825. focused
  11826. } = props;
  11827. for (let i = 0; i < length; i++) {
  11828. const char = value[i];
  11829. const showBorder = i !== 0 && !gutter;
  11830. const showCursor = focused && i === value.length;
  11831. let style;
  11832. if (i !== 0 && gutter) {
  11833. style = {
  11834. marginLeft: addUnit(gutter)
  11835. };
  11836. }
  11837. Points.push(createVNode("li", {
  11838. "class": [{
  11839. [BORDER_LEFT]: showBorder
  11840. }, bem72("item", {
  11841. focus: showCursor
  11842. })],
  11843. "style": style
  11844. }, [mask ? createVNode("i", {
  11845. "style": {
  11846. visibility: char ? "visible" : "hidden"
  11847. }
  11848. }, null) : char, showCursor && createVNode("div", {
  11849. "class": bem72("cursor")
  11850. }, null)]));
  11851. }
  11852. return Points;
  11853. };
  11854. return () => {
  11855. const info = props.errorInfo || props.info;
  11856. return createVNode("div", {
  11857. "class": bem72()
  11858. }, [createVNode("ul", {
  11859. "class": [bem72("security"), {
  11860. [BORDER_SURROUND]: !props.gutter
  11861. }],
  11862. "onTouchstartPassive": onTouchStart
  11863. }, [renderPoints()]), info && createVNode("div", {
  11864. "class": bem72(props.errorInfo ? "error-info" : "info")
  11865. }, [info])]);
  11866. };
  11867. }
  11868. });
  11869. // node_modules/vant/es/password-input/index.mjs
  11870. var PasswordInput = withInstall(stdin_default80);
  11871. // node_modules/@vant/popperjs/dist/index.esm.mjs
  11872. function getWindow(node) {
  11873. if (node == null) {
  11874. return window;
  11875. }
  11876. if (node.toString() !== "[object Window]") {
  11877. var ownerDocument = node.ownerDocument;
  11878. return ownerDocument ? ownerDocument.defaultView || window : window;
  11879. }
  11880. return node;
  11881. }
  11882. function isElement2(node) {
  11883. var OwnElement = getWindow(node).Element;
  11884. return node instanceof OwnElement || node instanceof Element;
  11885. }
  11886. function isHTMLElement(node) {
  11887. var OwnElement = getWindow(node).HTMLElement;
  11888. return node instanceof OwnElement || node instanceof HTMLElement;
  11889. }
  11890. function isShadowRoot(node) {
  11891. if (typeof ShadowRoot === "undefined") {
  11892. return false;
  11893. }
  11894. var OwnElement = getWindow(node).ShadowRoot;
  11895. return node instanceof OwnElement || node instanceof ShadowRoot;
  11896. }
  11897. var round = Math.round;
  11898. function getUAString() {
  11899. var uaData = navigator.userAgentData;
  11900. if (uaData != null && uaData.brands) {
  11901. return uaData.brands.map(function(item) {
  11902. return item.brand + "/" + item.version;
  11903. }).join(" ");
  11904. }
  11905. return navigator.userAgent;
  11906. }
  11907. function isLayoutViewport() {
  11908. return !/^((?!chrome|android).)*safari/i.test(getUAString());
  11909. }
  11910. function getBoundingClientRect(element, includeScale, isFixedStrategy) {
  11911. if (includeScale === void 0) {
  11912. includeScale = false;
  11913. }
  11914. if (isFixedStrategy === void 0) {
  11915. isFixedStrategy = false;
  11916. }
  11917. var clientRect = element.getBoundingClientRect();
  11918. var scaleX = 1;
  11919. var scaleY = 1;
  11920. if (includeScale && isHTMLElement(element)) {
  11921. scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
  11922. scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
  11923. }
  11924. var _ref = isElement2(element) ? getWindow(element) : window, visualViewport = _ref.visualViewport;
  11925. var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
  11926. var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
  11927. var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
  11928. var width2 = clientRect.width / scaleX;
  11929. var height2 = clientRect.height / scaleY;
  11930. return {
  11931. width: width2,
  11932. height: height2,
  11933. top: y,
  11934. right: x + width2,
  11935. bottom: y + height2,
  11936. left: x,
  11937. x,
  11938. y
  11939. };
  11940. }
  11941. function getWindowScroll(node) {
  11942. var win = getWindow(node);
  11943. var scrollLeft = win.pageXOffset;
  11944. var scrollTop = win.pageYOffset;
  11945. return {
  11946. scrollLeft,
  11947. scrollTop
  11948. };
  11949. }
  11950. function getHTMLElementScroll(element) {
  11951. return {
  11952. scrollLeft: element.scrollLeft,
  11953. scrollTop: element.scrollTop
  11954. };
  11955. }
  11956. function getNodeScroll(node) {
  11957. if (node === getWindow(node) || !isHTMLElement(node)) {
  11958. return getWindowScroll(node);
  11959. } else {
  11960. return getHTMLElementScroll(node);
  11961. }
  11962. }
  11963. function getNodeName(element) {
  11964. return element ? (element.nodeName || "").toLowerCase() : null;
  11965. }
  11966. function getDocumentElement(element) {
  11967. return ((isElement2(element) ? element.ownerDocument : element.document) || window.document).documentElement;
  11968. }
  11969. function getWindowScrollBarX(element) {
  11970. return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
  11971. }
  11972. function getComputedStyle(element) {
  11973. return getWindow(element).getComputedStyle(element);
  11974. }
  11975. function isScrollParent(element) {
  11976. var _getComputedStyle = getComputedStyle(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY;
  11977. return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
  11978. }
  11979. function isElementScaled(element) {
  11980. var rect = element.getBoundingClientRect();
  11981. var scaleX = round(rect.width) / element.offsetWidth || 1;
  11982. var scaleY = round(rect.height) / element.offsetHeight || 1;
  11983. return scaleX !== 1 || scaleY !== 1;
  11984. }
  11985. function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
  11986. if (isFixed === void 0) {
  11987. isFixed = false;
  11988. }
  11989. var isOffsetParentAnElement = isHTMLElement(offsetParent);
  11990. var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
  11991. var documentElement = getDocumentElement(offsetParent);
  11992. var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
  11993. var scroll = {
  11994. scrollLeft: 0,
  11995. scrollTop: 0
  11996. };
  11997. var offsets = {
  11998. x: 0,
  11999. y: 0
  12000. };
  12001. if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
  12002. if (getNodeName(offsetParent) !== "body" || isScrollParent(documentElement)) {
  12003. scroll = getNodeScroll(offsetParent);
  12004. }
  12005. if (isHTMLElement(offsetParent)) {
  12006. offsets = getBoundingClientRect(offsetParent, true);
  12007. offsets.x += offsetParent.clientLeft;
  12008. offsets.y += offsetParent.clientTop;
  12009. } else if (documentElement) {
  12010. offsets.x = getWindowScrollBarX(documentElement);
  12011. }
  12012. }
  12013. return {
  12014. x: rect.left + scroll.scrollLeft - offsets.x,
  12015. y: rect.top + scroll.scrollTop - offsets.y,
  12016. width: rect.width,
  12017. height: rect.height
  12018. };
  12019. }
  12020. function getLayoutRect(element) {
  12021. var clientRect = getBoundingClientRect(element);
  12022. var width2 = element.offsetWidth;
  12023. var height2 = element.offsetHeight;
  12024. if (Math.abs(clientRect.width - width2) <= 1) {
  12025. width2 = clientRect.width;
  12026. }
  12027. if (Math.abs(clientRect.height - height2) <= 1) {
  12028. height2 = clientRect.height;
  12029. }
  12030. return {
  12031. x: element.offsetLeft,
  12032. y: element.offsetTop,
  12033. width: width2,
  12034. height: height2
  12035. };
  12036. }
  12037. function getParentNode(element) {
  12038. if (getNodeName(element) === "html") {
  12039. return element;
  12040. }
  12041. return element.assignedSlot || element.parentNode || (isShadowRoot(element) ? element.host : null) || getDocumentElement(element);
  12042. }
  12043. function getScrollParent2(node) {
  12044. if (["html", "body", "#document"].indexOf(getNodeName(node)) >= 0) {
  12045. return node.ownerDocument.body;
  12046. }
  12047. if (isHTMLElement(node) && isScrollParent(node)) {
  12048. return node;
  12049. }
  12050. return getScrollParent2(getParentNode(node));
  12051. }
  12052. function listScrollParents(element, list) {
  12053. var _element$ownerDocumen;
  12054. if (list === void 0) {
  12055. list = [];
  12056. }
  12057. var scrollParent = getScrollParent2(element);
  12058. var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
  12059. var win = getWindow(scrollParent);
  12060. var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
  12061. var updatedList = list.concat(target);
  12062. return isBody ? updatedList : updatedList.concat(listScrollParents(getParentNode(target)));
  12063. }
  12064. function isTableElement(element) {
  12065. return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0;
  12066. }
  12067. function getTrueOffsetParent(element) {
  12068. if (!isHTMLElement(element) || getComputedStyle(element).position === "fixed") {
  12069. return null;
  12070. }
  12071. return element.offsetParent;
  12072. }
  12073. function getContainingBlock(element) {
  12074. var isFirefox = /firefox/i.test(getUAString());
  12075. var isIE = /Trident/i.test(getUAString());
  12076. if (isIE && isHTMLElement(element)) {
  12077. var elementCss = getComputedStyle(element);
  12078. if (elementCss.position === "fixed") {
  12079. return null;
  12080. }
  12081. }
  12082. var currentNode = getParentNode(element);
  12083. if (isShadowRoot(currentNode)) {
  12084. currentNode = currentNode.host;
  12085. }
  12086. while (isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) {
  12087. var css = getComputedStyle(currentNode);
  12088. 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") {
  12089. return currentNode;
  12090. } else {
  12091. currentNode = currentNode.parentNode;
  12092. }
  12093. }
  12094. return null;
  12095. }
  12096. function getOffsetParent(element) {
  12097. var window2 = getWindow(element);
  12098. var offsetParent = getTrueOffsetParent(element);
  12099. while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static") {
  12100. offsetParent = getTrueOffsetParent(offsetParent);
  12101. }
  12102. if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static")) {
  12103. return window2;
  12104. }
  12105. return offsetParent || getContainingBlock(element) || window2;
  12106. }
  12107. var top = "top";
  12108. var bottom = "bottom";
  12109. var right = "right";
  12110. var left = "left";
  12111. var auto = "auto";
  12112. var basePlacements = [top, bottom, right, left];
  12113. var start = "start";
  12114. var end = "end";
  12115. var placements = [].concat(basePlacements, [auto]).reduce(function(acc, placement) {
  12116. return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
  12117. }, []);
  12118. var beforeRead = "beforeRead";
  12119. var read = "read";
  12120. var afterRead = "afterRead";
  12121. var beforeMain = "beforeMain";
  12122. var main = "main";
  12123. var afterMain = "afterMain";
  12124. var beforeWrite = "beforeWrite";
  12125. var write = "write";
  12126. var afterWrite = "afterWrite";
  12127. var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
  12128. function order(modifiers) {
  12129. var map = new Map();
  12130. var visited = new Set();
  12131. var result = [];
  12132. modifiers.forEach(function(modifier) {
  12133. map.set(modifier.name, modifier);
  12134. });
  12135. function sort(modifier) {
  12136. visited.add(modifier.name);
  12137. var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
  12138. requires.forEach(function(dep) {
  12139. if (!visited.has(dep)) {
  12140. var depModifier = map.get(dep);
  12141. if (depModifier) {
  12142. sort(depModifier);
  12143. }
  12144. }
  12145. });
  12146. result.push(modifier);
  12147. }
  12148. modifiers.forEach(function(modifier) {
  12149. if (!visited.has(modifier.name)) {
  12150. sort(modifier);
  12151. }
  12152. });
  12153. return result;
  12154. }
  12155. function orderModifiers(modifiers) {
  12156. var orderedModifiers = order(modifiers);
  12157. return modifierPhases.reduce(function(acc, phase) {
  12158. return acc.concat(orderedModifiers.filter(function(modifier) {
  12159. return modifier.phase === phase;
  12160. }));
  12161. }, []);
  12162. }
  12163. function debounce(fn2) {
  12164. var pending;
  12165. return function() {
  12166. if (!pending) {
  12167. pending = new Promise(function(resolve) {
  12168. Promise.resolve().then(function() {
  12169. pending = void 0;
  12170. resolve(fn2());
  12171. });
  12172. });
  12173. }
  12174. return pending;
  12175. };
  12176. }
  12177. function format2(str) {
  12178. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  12179. args[_key - 1] = arguments[_key];
  12180. }
  12181. return [].concat(args).reduce(function(p, c) {
  12182. return p.replace(/%s/, c);
  12183. }, str);
  12184. }
  12185. var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
  12186. var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
  12187. var VALID_PROPERTIES = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
  12188. function validateModifiers(modifiers) {
  12189. modifiers.forEach(function(modifier) {
  12190. [].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index, self) {
  12191. return self.indexOf(value) === index;
  12192. }).forEach(function(key) {
  12193. switch (key) {
  12194. case "name":
  12195. if (typeof modifier.name !== "string") {
  12196. console.error(format2(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', '"' + String(modifier.name) + '"'));
  12197. }
  12198. break;
  12199. case "enabled":
  12200. if (typeof modifier.enabled !== "boolean") {
  12201. console.error(format2(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', '"' + String(modifier.enabled) + '"'));
  12202. }
  12203. break;
  12204. case "phase":
  12205. if (modifierPhases.indexOf(modifier.phase) < 0) {
  12206. console.error(format2(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(", "), '"' + String(modifier.phase) + '"'));
  12207. }
  12208. break;
  12209. case "fn":
  12210. if (typeof modifier.fn !== "function") {
  12211. console.error(format2(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', '"' + String(modifier.fn) + '"'));
  12212. }
  12213. break;
  12214. case "effect":
  12215. if (modifier.effect != null && typeof modifier.effect !== "function") {
  12216. console.error(format2(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', '"' + String(modifier.fn) + '"'));
  12217. }
  12218. break;
  12219. case "requires":
  12220. if (modifier.requires != null && !Array.isArray(modifier.requires)) {
  12221. console.error(format2(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', '"' + String(modifier.requires) + '"'));
  12222. }
  12223. break;
  12224. case "requiresIfExists":
  12225. if (!Array.isArray(modifier.requiresIfExists)) {
  12226. console.error(format2(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', '"' + String(modifier.requiresIfExists) + '"'));
  12227. }
  12228. break;
  12229. case "options":
  12230. case "data":
  12231. break;
  12232. default:
  12233. console.error('PopperJS: an invalid property has been provided to the "' + modifier.name + '" modifier, valid properties are ' + VALID_PROPERTIES.map(function(s) {
  12234. return '"' + s + '"';
  12235. }).join(", ") + '; but "' + key + '" was provided.');
  12236. }
  12237. modifier.requires && modifier.requires.forEach(function(requirement) {
  12238. if (modifiers.find(function(mod) {
  12239. return mod.name === requirement;
  12240. }) == null) {
  12241. console.error(format2(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));
  12242. }
  12243. });
  12244. });
  12245. });
  12246. }
  12247. function uniqueBy(arr, fn2) {
  12248. var identifiers = new Set();
  12249. return arr.filter(function(item) {
  12250. var identifier = fn2(item);
  12251. if (!identifiers.has(identifier)) {
  12252. identifiers.add(identifier);
  12253. return true;
  12254. }
  12255. });
  12256. }
  12257. function getBasePlacement(placement) {
  12258. return placement.split("-")[0];
  12259. }
  12260. function mergeByName(modifiers) {
  12261. var merged = modifiers.reduce(function(merged2, current2) {
  12262. var existing = merged2[current2.name];
  12263. merged2[current2.name] = existing ? Object.assign({}, existing, current2, {
  12264. options: Object.assign({}, existing.options, current2.options),
  12265. data: Object.assign({}, existing.data, current2.data)
  12266. }) : current2;
  12267. return merged2;
  12268. }, {});
  12269. return Object.keys(merged).map(function(key) {
  12270. return merged[key];
  12271. });
  12272. }
  12273. function getVariation(placement) {
  12274. return placement.split("-")[1];
  12275. }
  12276. function getMainAxisFromPlacement(placement) {
  12277. return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y";
  12278. }
  12279. function computeOffsets(_ref) {
  12280. var reference = _ref.reference, element = _ref.element, placement = _ref.placement;
  12281. var basePlacement = placement ? getBasePlacement(placement) : null;
  12282. var variation = placement ? getVariation(placement) : null;
  12283. var commonX = reference.x + reference.width / 2 - element.width / 2;
  12284. var commonY = reference.y + reference.height / 2 - element.height / 2;
  12285. var offsets;
  12286. switch (basePlacement) {
  12287. case top:
  12288. offsets = {
  12289. x: commonX,
  12290. y: reference.y - element.height
  12291. };
  12292. break;
  12293. case bottom:
  12294. offsets = {
  12295. x: commonX,
  12296. y: reference.y + reference.height
  12297. };
  12298. break;
  12299. case right:
  12300. offsets = {
  12301. x: reference.x + reference.width,
  12302. y: commonY
  12303. };
  12304. break;
  12305. case left:
  12306. offsets = {
  12307. x: reference.x - element.width,
  12308. y: commonY
  12309. };
  12310. break;
  12311. default:
  12312. offsets = {
  12313. x: reference.x,
  12314. y: reference.y
  12315. };
  12316. }
  12317. var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
  12318. if (mainAxis != null) {
  12319. var len = mainAxis === "y" ? "height" : "width";
  12320. switch (variation) {
  12321. case start:
  12322. offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
  12323. break;
  12324. case end:
  12325. offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
  12326. break;
  12327. default:
  12328. }
  12329. }
  12330. return offsets;
  12331. }
  12332. var INVALID_ELEMENT_ERROR = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.";
  12333. 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.";
  12334. var DEFAULT_OPTIONS = {
  12335. placement: "bottom",
  12336. modifiers: [],
  12337. strategy: "absolute"
  12338. };
  12339. function areValidElements() {
  12340. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  12341. args[_key] = arguments[_key];
  12342. }
  12343. return !args.some(function(element) {
  12344. return !(element && typeof element.getBoundingClientRect === "function");
  12345. });
  12346. }
  12347. function popperGenerator(generatorOptions) {
  12348. if (generatorOptions === void 0) {
  12349. generatorOptions = {};
  12350. }
  12351. 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;
  12352. return function createPopper2(reference, popper, options) {
  12353. if (options === void 0) {
  12354. options = defaultOptions3;
  12355. }
  12356. var state = {
  12357. placement: "bottom",
  12358. orderedModifiers: [],
  12359. options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions3),
  12360. modifiersData: {},
  12361. elements: {
  12362. reference,
  12363. popper
  12364. },
  12365. attributes: {},
  12366. styles: {}
  12367. };
  12368. var effectCleanupFns = [];
  12369. var isDestroyed = false;
  12370. var instance4 = {
  12371. state,
  12372. setOptions: function setOptions(setOptionsAction) {
  12373. var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction;
  12374. cleanupModifierEffects();
  12375. state.options = Object.assign({}, defaultOptions3, state.options, options2);
  12376. state.scrollParents = {
  12377. reference: isElement2(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
  12378. popper: listScrollParents(popper)
  12379. };
  12380. var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers)));
  12381. state.orderedModifiers = orderedModifiers.filter(function(m) {
  12382. return m.enabled;
  12383. });
  12384. if (true) {
  12385. var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function(_ref) {
  12386. var name97 = _ref.name;
  12387. return name97;
  12388. });
  12389. validateModifiers(modifiers);
  12390. if (getBasePlacement(state.options.placement) === auto) {
  12391. var flipModifier = state.orderedModifiers.find(function(_ref2) {
  12392. var name97 = _ref2.name;
  12393. return name97 === "flip";
  12394. });
  12395. if (!flipModifier) {
  12396. console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "));
  12397. }
  12398. }
  12399. var _getComputedStyle = getComputedStyle(popper), marginTop = _getComputedStyle.marginTop, marginRight = _getComputedStyle.marginRight, marginBottom = _getComputedStyle.marginBottom, marginLeft = _getComputedStyle.marginLeft;
  12400. if ([marginTop, marginRight, marginBottom, marginLeft].some(function(margin) {
  12401. return parseFloat(margin);
  12402. })) {
  12403. 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(" "));
  12404. }
  12405. }
  12406. runModifierEffects();
  12407. return instance4.update();
  12408. },
  12409. forceUpdate: function forceUpdate() {
  12410. if (isDestroyed) {
  12411. return;
  12412. }
  12413. var _state$elements = state.elements, reference2 = _state$elements.reference, popper2 = _state$elements.popper;
  12414. if (!areValidElements(reference2, popper2)) {
  12415. if (true) {
  12416. console.error(INVALID_ELEMENT_ERROR);
  12417. }
  12418. return;
  12419. }
  12420. state.rects = {
  12421. reference: getCompositeRect(reference2, getOffsetParent(popper2), state.options.strategy === "fixed"),
  12422. popper: getLayoutRect(popper2)
  12423. };
  12424. state.reset = false;
  12425. state.placement = state.options.placement;
  12426. state.orderedModifiers.forEach(function(modifier) {
  12427. return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
  12428. });
  12429. var __debug_loops__ = 0;
  12430. for (var index = 0; index < state.orderedModifiers.length; index++) {
  12431. if (true) {
  12432. __debug_loops__ += 1;
  12433. if (__debug_loops__ > 100) {
  12434. console.error(INFINITE_LOOP_ERROR);
  12435. break;
  12436. }
  12437. }
  12438. if (state.reset === true) {
  12439. state.reset = false;
  12440. index = -1;
  12441. continue;
  12442. }
  12443. 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;
  12444. if (typeof fn2 === "function") {
  12445. state = fn2({
  12446. state,
  12447. options: _options,
  12448. name: name97,
  12449. instance: instance4
  12450. }) || state;
  12451. }
  12452. }
  12453. },
  12454. update: debounce(function() {
  12455. return new Promise(function(resolve) {
  12456. instance4.forceUpdate();
  12457. resolve(state);
  12458. });
  12459. }),
  12460. destroy: function destroy() {
  12461. cleanupModifierEffects();
  12462. isDestroyed = true;
  12463. }
  12464. };
  12465. if (!areValidElements(reference, popper)) {
  12466. if (true) {
  12467. console.error(INVALID_ELEMENT_ERROR);
  12468. }
  12469. return instance4;
  12470. }
  12471. instance4.setOptions(options).then(function(state2) {
  12472. if (!isDestroyed && options.onFirstUpdate) {
  12473. options.onFirstUpdate(state2);
  12474. }
  12475. });
  12476. function runModifierEffects() {
  12477. state.orderedModifiers.forEach(function(_ref3) {
  12478. var name97 = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options, effect3 = _ref3.effect;
  12479. if (typeof effect3 === "function") {
  12480. var cleanupFn = effect3({
  12481. state,
  12482. name: name97,
  12483. instance: instance4,
  12484. options: options2
  12485. });
  12486. var noopFn = function noopFn2() {
  12487. };
  12488. effectCleanupFns.push(cleanupFn || noopFn);
  12489. }
  12490. });
  12491. }
  12492. function cleanupModifierEffects() {
  12493. effectCleanupFns.forEach(function(fn2) {
  12494. return fn2();
  12495. });
  12496. effectCleanupFns = [];
  12497. }
  12498. return instance4;
  12499. };
  12500. }
  12501. var passive = {
  12502. passive: true
  12503. };
  12504. function effect(_ref) {
  12505. var state = _ref.state, instance4 = _ref.instance, options = _ref.options;
  12506. 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;
  12507. var window2 = getWindow(state.elements.popper);
  12508. var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
  12509. if (scroll) {
  12510. scrollParents.forEach(function(scrollParent) {
  12511. scrollParent.addEventListener("scroll", instance4.update, passive);
  12512. });
  12513. }
  12514. if (resize) {
  12515. window2.addEventListener("resize", instance4.update, passive);
  12516. }
  12517. return function() {
  12518. if (scroll) {
  12519. scrollParents.forEach(function(scrollParent) {
  12520. scrollParent.removeEventListener("scroll", instance4.update, passive);
  12521. });
  12522. }
  12523. if (resize) {
  12524. window2.removeEventListener("resize", instance4.update, passive);
  12525. }
  12526. };
  12527. }
  12528. var eventListeners_default = {
  12529. name: "eventListeners",
  12530. enabled: true,
  12531. phase: "write",
  12532. fn: function fn() {
  12533. },
  12534. effect,
  12535. data: {}
  12536. };
  12537. function popperOffsets(_ref) {
  12538. var state = _ref.state, name97 = _ref.name;
  12539. state.modifiersData[name97] = computeOffsets({
  12540. reference: state.rects.reference,
  12541. element: state.rects.popper,
  12542. strategy: "absolute",
  12543. placement: state.placement
  12544. });
  12545. }
  12546. var popperOffsets_default = {
  12547. name: "popperOffsets",
  12548. enabled: true,
  12549. phase: "read",
  12550. fn: popperOffsets,
  12551. data: {}
  12552. };
  12553. var unsetSides = {
  12554. top: "auto",
  12555. right: "auto",
  12556. bottom: "auto",
  12557. left: "auto"
  12558. };
  12559. function roundOffsetsByDPR(_ref) {
  12560. var x = _ref.x, y = _ref.y;
  12561. var win = window;
  12562. var dpr = win.devicePixelRatio || 1;
  12563. return {
  12564. x: round(x * dpr) / dpr || 0,
  12565. y: round(y * dpr) / dpr || 0
  12566. };
  12567. }
  12568. function mapToStyles(_ref2) {
  12569. var _Object$assign2;
  12570. 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;
  12571. 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;
  12572. var _ref3 = typeof roundOffsets === "function" ? roundOffsets({
  12573. x,
  12574. y
  12575. }) : {
  12576. x,
  12577. y
  12578. };
  12579. x = _ref3.x;
  12580. y = _ref3.y;
  12581. var hasX = offsets.hasOwnProperty("x");
  12582. var hasY = offsets.hasOwnProperty("y");
  12583. var sideX = left;
  12584. var sideY = top;
  12585. var win = window;
  12586. if (adaptive) {
  12587. var offsetParent = getOffsetParent(popper);
  12588. var heightProp = "clientHeight";
  12589. var widthProp = "clientWidth";
  12590. if (offsetParent === getWindow(popper)) {
  12591. offsetParent = getDocumentElement(popper);
  12592. if (getComputedStyle(offsetParent).position !== "static" && position === "absolute") {
  12593. heightProp = "scrollHeight";
  12594. widthProp = "scrollWidth";
  12595. }
  12596. }
  12597. offsetParent = offsetParent;
  12598. if (placement === top || (placement === left || placement === right) && variation === end) {
  12599. sideY = bottom;
  12600. var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : offsetParent[heightProp];
  12601. y -= offsetY - popperRect.height;
  12602. y *= gpuAcceleration ? 1 : -1;
  12603. }
  12604. if (placement === left || (placement === top || placement === bottom) && variation === end) {
  12605. sideX = right;
  12606. var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : offsetParent[widthProp];
  12607. x -= offsetX - popperRect.width;
  12608. x *= gpuAcceleration ? 1 : -1;
  12609. }
  12610. }
  12611. var commonStyles = Object.assign({
  12612. position
  12613. }, adaptive && unsetSides);
  12614. var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
  12615. x,
  12616. y
  12617. }) : {
  12618. x,
  12619. y
  12620. };
  12621. x = _ref4.x;
  12622. y = _ref4.y;
  12623. if (gpuAcceleration) {
  12624. var _Object$assign;
  12625. 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));
  12626. }
  12627. return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2));
  12628. }
  12629. function computeStyles(_ref5) {
  12630. var state = _ref5.state, options = _ref5.options;
  12631. 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;
  12632. if (true) {
  12633. var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || "";
  12634. if (adaptive && ["transform", "top", "right", "bottom", "left"].some(function(property) {
  12635. return transitionProperty.indexOf(property) >= 0;
  12636. })) {
  12637. 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(" "));
  12638. }
  12639. }
  12640. var commonStyles = {
  12641. placement: getBasePlacement(state.placement),
  12642. variation: getVariation(state.placement),
  12643. popper: state.elements.popper,
  12644. popperRect: state.rects.popper,
  12645. gpuAcceleration,
  12646. isFixed: state.options.strategy === "fixed"
  12647. };
  12648. if (state.modifiersData.popperOffsets != null) {
  12649. state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
  12650. offsets: state.modifiersData.popperOffsets,
  12651. position: state.options.strategy,
  12652. adaptive,
  12653. roundOffsets
  12654. })));
  12655. }
  12656. if (state.modifiersData.arrow != null) {
  12657. state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
  12658. offsets: state.modifiersData.arrow,
  12659. position: "absolute",
  12660. adaptive: false,
  12661. roundOffsets
  12662. })));
  12663. }
  12664. state.attributes.popper = Object.assign({}, state.attributes.popper, {
  12665. "data-popper-placement": state.placement
  12666. });
  12667. }
  12668. var computeStyles_default = {
  12669. name: "computeStyles",
  12670. enabled: true,
  12671. phase: "beforeWrite",
  12672. fn: computeStyles,
  12673. data: {}
  12674. };
  12675. function applyStyles(_ref) {
  12676. var state = _ref.state;
  12677. Object.keys(state.elements).forEach(function(name97) {
  12678. var style = state.styles[name97] || {};
  12679. var attributes = state.attributes[name97] || {};
  12680. var element = state.elements[name97];
  12681. if (!isHTMLElement(element) || !getNodeName(element)) {
  12682. return;
  12683. }
  12684. Object.assign(element.style, style);
  12685. Object.keys(attributes).forEach(function(name210) {
  12686. var value = attributes[name210];
  12687. if (value === false) {
  12688. element.removeAttribute(name210);
  12689. } else {
  12690. element.setAttribute(name210, value === true ? "" : value);
  12691. }
  12692. });
  12693. });
  12694. }
  12695. function effect2(_ref2) {
  12696. var state = _ref2.state;
  12697. var initialStyles = {
  12698. popper: {
  12699. position: state.options.strategy,
  12700. left: "0",
  12701. top: "0",
  12702. margin: "0"
  12703. },
  12704. arrow: {
  12705. position: "absolute"
  12706. },
  12707. reference: {}
  12708. };
  12709. Object.assign(state.elements.popper.style, initialStyles.popper);
  12710. state.styles = initialStyles;
  12711. if (state.elements.arrow) {
  12712. Object.assign(state.elements.arrow.style, initialStyles.arrow);
  12713. }
  12714. return function() {
  12715. Object.keys(state.elements).forEach(function(name97) {
  12716. var element = state.elements[name97];
  12717. var attributes = state.attributes[name97] || {};
  12718. var styleProperties = Object.keys(state.styles.hasOwnProperty(name97) ? state.styles[name97] : initialStyles[name97]);
  12719. var style = styleProperties.reduce(function(style2, property) {
  12720. style2[property] = "";
  12721. return style2;
  12722. }, {});
  12723. if (!isHTMLElement(element) || !getNodeName(element)) {
  12724. return;
  12725. }
  12726. Object.assign(element.style, style);
  12727. Object.keys(attributes).forEach(function(attribute) {
  12728. element.removeAttribute(attribute);
  12729. });
  12730. });
  12731. };
  12732. }
  12733. var applyStyles_default = {
  12734. name: "applyStyles",
  12735. enabled: true,
  12736. phase: "write",
  12737. fn: applyStyles,
  12738. effect: effect2,
  12739. requires: ["computeStyles"]
  12740. };
  12741. var defaultModifiers = [eventListeners_default, popperOffsets_default, computeStyles_default, applyStyles_default];
  12742. var createPopper = popperGenerator({
  12743. defaultModifiers
  12744. });
  12745. function distanceAndSkiddingToXY(placement, rects, offset2) {
  12746. var basePlacement = getBasePlacement(placement);
  12747. var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
  12748. var _ref = typeof offset2 === "function" ? offset2(Object.assign({}, rects, {
  12749. placement
  12750. })) : offset2, skidding = _ref[0], distance = _ref[1];
  12751. skidding = skidding || 0;
  12752. distance = (distance || 0) * invertDistance;
  12753. return [left, right].indexOf(basePlacement) >= 0 ? {
  12754. x: distance,
  12755. y: skidding
  12756. } : {
  12757. x: skidding,
  12758. y: distance
  12759. };
  12760. }
  12761. function offset(_ref2) {
  12762. var state = _ref2.state, options = _ref2.options, name97 = _ref2.name;
  12763. var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset;
  12764. var data = placements.reduce(function(acc, placement) {
  12765. acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2);
  12766. return acc;
  12767. }, {});
  12768. var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y;
  12769. if (state.modifiersData.popperOffsets != null) {
  12770. state.modifiersData.popperOffsets.x += x;
  12771. state.modifiersData.popperOffsets.y += y;
  12772. }
  12773. state.modifiersData[name97] = data;
  12774. }
  12775. var offset_default = {
  12776. name: "offset",
  12777. enabled: true,
  12778. phase: "main",
  12779. requires: ["popperOffsets"],
  12780. fn: offset
  12781. };
  12782. // node_modules/vant/es/popover/Popover.mjs
  12783. var [name77, bem73] = createNamespace("popover");
  12784. var popupProps3 = ["show", "overlay", "duration", "teleport", "overlayStyle", "overlayClass", "closeOnClickOverlay"];
  12785. var popoverProps = {
  12786. show: Boolean,
  12787. theme: makeStringProp("light"),
  12788. overlay: Boolean,
  12789. actions: makeArrayProp(),
  12790. trigger: makeStringProp("click"),
  12791. duration: numericProp,
  12792. showArrow: truthProp,
  12793. placement: makeStringProp("bottom"),
  12794. iconPrefix: String,
  12795. overlayClass: unknownProp,
  12796. overlayStyle: Object,
  12797. closeOnClickAction: truthProp,
  12798. closeOnClickOverlay: truthProp,
  12799. closeOnClickOutside: truthProp,
  12800. offset: {
  12801. type: Array,
  12802. default: () => [0, 8]
  12803. },
  12804. teleport: {
  12805. type: [String, Object],
  12806. default: "body"
  12807. }
  12808. };
  12809. var stdin_default81 = defineComponent({
  12810. name: name77,
  12811. props: popoverProps,
  12812. emits: ["select", "touchstart", "update:show"],
  12813. setup(props, {
  12814. emit,
  12815. slots,
  12816. attrs
  12817. }) {
  12818. let popper;
  12819. const popupRef = ref();
  12820. const wrapperRef = ref();
  12821. const popoverRef = ref();
  12822. const getPopoverOptions = () => ({
  12823. placement: props.placement,
  12824. modifiers: [{
  12825. name: "computeStyles",
  12826. options: {
  12827. adaptive: false,
  12828. gpuAcceleration: false
  12829. }
  12830. }, extend({}, offset_default, {
  12831. options: {
  12832. offset: props.offset
  12833. }
  12834. })]
  12835. });
  12836. const createPopperInstance = () => {
  12837. if (wrapperRef.value && popoverRef.value) {
  12838. return createPopper(wrapperRef.value, popoverRef.value.popupRef.value, getPopoverOptions());
  12839. }
  12840. return null;
  12841. };
  12842. const updateLocation = () => {
  12843. nextTick(() => {
  12844. if (!props.show) {
  12845. return;
  12846. }
  12847. if (!popper) {
  12848. popper = createPopperInstance();
  12849. } else {
  12850. popper.setOptions(getPopoverOptions());
  12851. }
  12852. });
  12853. };
  12854. const updateShow = (value) => emit("update:show", value);
  12855. const onClickWrapper = () => {
  12856. if (props.trigger === "click") {
  12857. updateShow(!props.show);
  12858. }
  12859. };
  12860. const onClickAction = (action, index) => {
  12861. if (action.disabled) {
  12862. return;
  12863. }
  12864. emit("select", action, index);
  12865. if (props.closeOnClickAction) {
  12866. updateShow(false);
  12867. }
  12868. };
  12869. const onClickAway = () => {
  12870. if (props.show && props.closeOnClickOutside && (!props.overlay || props.closeOnClickOverlay)) {
  12871. updateShow(false);
  12872. }
  12873. };
  12874. const renderActionContent = (action, index) => {
  12875. if (slots.action) {
  12876. return slots.action({
  12877. action,
  12878. index
  12879. });
  12880. }
  12881. return [action.icon && createVNode(Icon, {
  12882. "name": action.icon,
  12883. "classPrefix": props.iconPrefix,
  12884. "class": bem73("action-icon")
  12885. }, null), createVNode("div", {
  12886. "class": [bem73("action-text"), BORDER_BOTTOM]
  12887. }, [action.text])];
  12888. };
  12889. const renderAction = (action, index) => {
  12890. const {
  12891. icon,
  12892. color,
  12893. disabled,
  12894. className
  12895. } = action;
  12896. return createVNode("div", {
  12897. "role": "menuitem",
  12898. "class": [bem73("action", {
  12899. disabled,
  12900. "with-icon": icon
  12901. }), className],
  12902. "style": {
  12903. color
  12904. },
  12905. "tabindex": disabled ? void 0 : 0,
  12906. "aria-disabled": disabled || void 0,
  12907. "onClick": () => onClickAction(action, index)
  12908. }, [renderActionContent(action, index)]);
  12909. };
  12910. onMounted(() => {
  12911. updateLocation();
  12912. watchEffect(() => {
  12913. var _a;
  12914. popupRef.value = (_a = popoverRef.value) == null ? void 0 : _a.popupRef.value;
  12915. });
  12916. });
  12917. onBeforeUnmount(() => {
  12918. if (popper) {
  12919. popper.destroy();
  12920. popper = null;
  12921. }
  12922. });
  12923. watch(() => [props.show, props.offset, props.placement], updateLocation);
  12924. useClickAway([wrapperRef, popupRef], onClickAway, {
  12925. eventName: "touchstart"
  12926. });
  12927. return () => {
  12928. var _a;
  12929. return createVNode(Fragment, null, [createVNode("span", {
  12930. "ref": wrapperRef,
  12931. "class": bem73("wrapper"),
  12932. "onClick": onClickWrapper
  12933. }, [(_a = slots.reference) == null ? void 0 : _a.call(slots)]), createVNode(Popup, mergeProps({
  12934. "ref": popoverRef,
  12935. "class": bem73([props.theme]),
  12936. "position": "",
  12937. "transition": "van-popover-zoom",
  12938. "lockScroll": false,
  12939. "onUpdate:show": updateShow
  12940. }, attrs, pick(props, popupProps3)), {
  12941. default: () => [props.showArrow && createVNode("div", {
  12942. "class": bem73("arrow")
  12943. }, null), createVNode("div", {
  12944. "role": "menu",
  12945. "class": bem73("content")
  12946. }, [slots.default ? slots.default() : props.actions.map(renderAction)])]
  12947. })]);
  12948. };
  12949. }
  12950. });
  12951. // node_modules/vant/es/popover/index.mjs
  12952. var Popover = withInstall(stdin_default81);
  12953. // node_modules/vant/es/progress/Progress.mjs
  12954. var [name78, bem74] = createNamespace("progress");
  12955. var progressProps = {
  12956. color: String,
  12957. inactive: Boolean,
  12958. pivotText: String,
  12959. textColor: String,
  12960. showPivot: truthProp,
  12961. pivotColor: String,
  12962. trackColor: String,
  12963. strokeWidth: numericProp,
  12964. percentage: {
  12965. type: numericProp,
  12966. default: 0,
  12967. validator: (value) => value >= 0 && value <= 100
  12968. }
  12969. };
  12970. var stdin_default82 = defineComponent({
  12971. name: name78,
  12972. props: progressProps,
  12973. setup(props) {
  12974. const background = computed(() => props.inactive ? void 0 : props.color);
  12975. const renderPivot = () => {
  12976. const {
  12977. textColor,
  12978. pivotText,
  12979. pivotColor,
  12980. percentage
  12981. } = props;
  12982. const text = pivotText != null ? pivotText : `${percentage}%`;
  12983. if (props.showPivot && text) {
  12984. const style = {
  12985. color: textColor,
  12986. left: `${+percentage}%`,
  12987. transform: `translate(-${+percentage}%,-50%)`,
  12988. background: pivotColor || background.value
  12989. };
  12990. return createVNode("span", {
  12991. "style": style,
  12992. "class": bem74("pivot", {
  12993. inactive: props.inactive
  12994. })
  12995. }, [text]);
  12996. }
  12997. };
  12998. return () => {
  12999. const {
  13000. trackColor,
  13001. percentage,
  13002. strokeWidth
  13003. } = props;
  13004. const rootStyle = {
  13005. background: trackColor,
  13006. height: addUnit(strokeWidth)
  13007. };
  13008. const portionStyle = {
  13009. width: `${percentage}%`,
  13010. background: background.value
  13011. };
  13012. return createVNode("div", {
  13013. "class": bem74(),
  13014. "style": rootStyle
  13015. }, [createVNode("span", {
  13016. "class": bem74("portion", {
  13017. inactive: props.inactive
  13018. }),
  13019. "style": portionStyle
  13020. }, null), renderPivot()]);
  13021. };
  13022. }
  13023. });
  13024. // node_modules/vant/es/progress/index.mjs
  13025. var Progress = withInstall(stdin_default82);
  13026. // node_modules/vant/es/pull-refresh/PullRefresh.mjs
  13027. var [name79, bem75, t16] = createNamespace("pull-refresh");
  13028. var DEFAULT_HEAD_HEIGHT = 50;
  13029. var TEXT_STATUS = ["pulling", "loosing", "success"];
  13030. var pullRefreshProps = {
  13031. disabled: Boolean,
  13032. modelValue: Boolean,
  13033. headHeight: makeNumericProp(DEFAULT_HEAD_HEIGHT),
  13034. successText: String,
  13035. pullingText: String,
  13036. loosingText: String,
  13037. loadingText: String,
  13038. pullDistance: numericProp,
  13039. successDuration: makeNumericProp(500),
  13040. animationDuration: makeNumericProp(300)
  13041. };
  13042. var stdin_default83 = defineComponent({
  13043. name: name79,
  13044. props: pullRefreshProps,
  13045. emits: ["change", "refresh", "update:modelValue"],
  13046. setup(props, {
  13047. emit,
  13048. slots
  13049. }) {
  13050. let reachTop;
  13051. const root = ref();
  13052. const track = ref();
  13053. const scrollParent = useScrollParent(root);
  13054. const state = reactive({
  13055. status: "normal",
  13056. distance: 0,
  13057. duration: 0
  13058. });
  13059. const touch = useTouch();
  13060. const getHeadStyle = () => {
  13061. if (props.headHeight !== DEFAULT_HEAD_HEIGHT) {
  13062. return {
  13063. height: `${props.headHeight}px`
  13064. };
  13065. }
  13066. };
  13067. const isTouchable = () => state.status !== "loading" && state.status !== "success" && !props.disabled;
  13068. const ease = (distance) => {
  13069. const pullDistance = +(props.pullDistance || props.headHeight);
  13070. if (distance > pullDistance) {
  13071. if (distance < pullDistance * 2) {
  13072. distance = pullDistance + (distance - pullDistance) / 2;
  13073. } else {
  13074. distance = pullDistance * 1.5 + (distance - pullDistance * 2) / 4;
  13075. }
  13076. }
  13077. return Math.round(distance);
  13078. };
  13079. const setStatus = (distance, isLoading) => {
  13080. const pullDistance = +(props.pullDistance || props.headHeight);
  13081. state.distance = distance;
  13082. if (isLoading) {
  13083. state.status = "loading";
  13084. } else if (distance === 0) {
  13085. state.status = "normal";
  13086. } else if (distance < pullDistance) {
  13087. state.status = "pulling";
  13088. } else {
  13089. state.status = "loosing";
  13090. }
  13091. emit("change", {
  13092. status: state.status,
  13093. distance
  13094. });
  13095. };
  13096. const getStatusText = () => {
  13097. const {
  13098. status
  13099. } = state;
  13100. if (status === "normal") {
  13101. return "";
  13102. }
  13103. return props[`${status}Text`] || t16(status);
  13104. };
  13105. const renderStatus = () => {
  13106. const {
  13107. status,
  13108. distance
  13109. } = state;
  13110. if (slots[status]) {
  13111. return slots[status]({
  13112. distance
  13113. });
  13114. }
  13115. const nodes = [];
  13116. if (TEXT_STATUS.includes(status)) {
  13117. nodes.push(createVNode("div", {
  13118. "class": bem75("text")
  13119. }, [getStatusText()]));
  13120. }
  13121. if (status === "loading") {
  13122. nodes.push(createVNode(Loading, {
  13123. "class": bem75("loading")
  13124. }, {
  13125. default: getStatusText
  13126. }));
  13127. }
  13128. return nodes;
  13129. };
  13130. const showSuccessTip = () => {
  13131. state.status = "success";
  13132. setTimeout(() => {
  13133. setStatus(0);
  13134. }, +props.successDuration);
  13135. };
  13136. const checkPosition = (event) => {
  13137. reachTop = getScrollTop(scrollParent.value) === 0;
  13138. if (reachTop) {
  13139. state.duration = 0;
  13140. touch.start(event);
  13141. }
  13142. };
  13143. const onTouchStart = (event) => {
  13144. if (isTouchable()) {
  13145. checkPosition(event);
  13146. }
  13147. };
  13148. const onTouchMove = (event) => {
  13149. if (isTouchable()) {
  13150. if (!reachTop) {
  13151. checkPosition(event);
  13152. }
  13153. const {
  13154. deltaY
  13155. } = touch;
  13156. touch.move(event);
  13157. if (reachTop && deltaY.value >= 0 && touch.isVertical()) {
  13158. preventDefault(event);
  13159. setStatus(ease(deltaY.value));
  13160. }
  13161. }
  13162. };
  13163. const onTouchEnd = () => {
  13164. if (reachTop && touch.deltaY.value && isTouchable()) {
  13165. state.duration = +props.animationDuration;
  13166. if (state.status === "loosing") {
  13167. setStatus(+props.headHeight, true);
  13168. emit("update:modelValue", true);
  13169. nextTick(() => emit("refresh"));
  13170. } else {
  13171. setStatus(0);
  13172. }
  13173. }
  13174. };
  13175. watch(() => props.modelValue, (value) => {
  13176. state.duration = +props.animationDuration;
  13177. if (value) {
  13178. setStatus(+props.headHeight, true);
  13179. } else if (slots.success || props.successText) {
  13180. showSuccessTip();
  13181. } else {
  13182. setStatus(0, false);
  13183. }
  13184. });
  13185. useEventListener("touchmove", onTouchMove, {
  13186. target: track
  13187. });
  13188. return () => {
  13189. var _a;
  13190. const trackStyle = {
  13191. transitionDuration: `${state.duration}ms`,
  13192. transform: state.distance ? `translate3d(0,${state.distance}px, 0)` : ""
  13193. };
  13194. return createVNode("div", {
  13195. "ref": root,
  13196. "class": bem75()
  13197. }, [createVNode("div", {
  13198. "ref": track,
  13199. "class": bem75("track"),
  13200. "style": trackStyle,
  13201. "onTouchstartPassive": onTouchStart,
  13202. "onTouchend": onTouchEnd,
  13203. "onTouchcancel": onTouchEnd
  13204. }, [createVNode("div", {
  13205. "class": bem75("head"),
  13206. "style": getHeadStyle()
  13207. }, [renderStatus()]), (_a = slots.default) == null ? void 0 : _a.call(slots)])]);
  13208. };
  13209. }
  13210. });
  13211. // node_modules/vant/es/pull-refresh/index.mjs
  13212. var PullRefresh = withInstall(stdin_default83);
  13213. // node_modules/vant/es/rate/Rate.mjs
  13214. var [name80, bem76] = createNamespace("rate");
  13215. function getRateStatus(value, index, allowHalf, readonly) {
  13216. if (value >= index) {
  13217. return {
  13218. status: "full",
  13219. value: 1
  13220. };
  13221. }
  13222. if (value + 0.5 >= index && allowHalf && !readonly) {
  13223. return {
  13224. status: "half",
  13225. value: 0.5
  13226. };
  13227. }
  13228. if (value + 1 >= index && allowHalf && readonly) {
  13229. const cardinal = 10 ** 10;
  13230. return {
  13231. status: "half",
  13232. value: Math.round((value - index + 1) * cardinal) / cardinal
  13233. };
  13234. }
  13235. return {
  13236. status: "void",
  13237. value: 0
  13238. };
  13239. }
  13240. var rateProps = {
  13241. size: numericProp,
  13242. icon: makeStringProp("star"),
  13243. color: String,
  13244. count: makeNumericProp(5),
  13245. gutter: numericProp,
  13246. readonly: Boolean,
  13247. disabled: Boolean,
  13248. voidIcon: makeStringProp("star-o"),
  13249. allowHalf: Boolean,
  13250. voidColor: String,
  13251. touchable: truthProp,
  13252. iconPrefix: String,
  13253. modelValue: makeNumberProp(0),
  13254. disabledColor: String
  13255. };
  13256. var stdin_default84 = defineComponent({
  13257. name: name80,
  13258. props: rateProps,
  13259. emits: ["change", "update:modelValue"],
  13260. setup(props, {
  13261. emit
  13262. }) {
  13263. const touch = useTouch();
  13264. const [itemRefs, setItemRefs] = useRefs();
  13265. const groupRef = ref();
  13266. const untouchable = () => props.readonly || props.disabled || !props.touchable;
  13267. const list = computed(() => Array(+props.count).fill("").map((_, i) => getRateStatus(props.modelValue, i + 1, props.allowHalf, props.readonly)));
  13268. let ranges;
  13269. let groupRefRect;
  13270. let minRectTop = Number.MAX_SAFE_INTEGER;
  13271. let maxRectTop = Number.MIN_SAFE_INTEGER;
  13272. const updateRanges = () => {
  13273. groupRefRect = useRect(groupRef);
  13274. const rects = itemRefs.value.map(useRect);
  13275. ranges = [];
  13276. rects.forEach((rect, index) => {
  13277. minRectTop = Math.min(rect.top, minRectTop);
  13278. maxRectTop = Math.max(rect.top, maxRectTop);
  13279. if (props.allowHalf) {
  13280. ranges.push({
  13281. score: index + 0.5,
  13282. left: rect.left,
  13283. top: rect.top,
  13284. height: rect.height
  13285. }, {
  13286. score: index + 1,
  13287. left: rect.left + rect.width / 2,
  13288. top: rect.top,
  13289. height: rect.height
  13290. });
  13291. } else {
  13292. ranges.push({
  13293. score: index + 1,
  13294. left: rect.left,
  13295. top: rect.top,
  13296. height: rect.height
  13297. });
  13298. }
  13299. });
  13300. };
  13301. const getScoreByPosition = (x, y) => {
  13302. for (let i = ranges.length - 1; i > 0; i--) {
  13303. if (y >= groupRefRect.top && y <= groupRefRect.bottom) {
  13304. if (x > ranges[i].left && y >= ranges[i].top && y <= ranges[i].top + ranges[i].height) {
  13305. return ranges[i].score;
  13306. }
  13307. } else {
  13308. const curTop = y < groupRefRect.top ? minRectTop : maxRectTop;
  13309. if (x > ranges[i].left && ranges[i].top === curTop) {
  13310. return ranges[i].score;
  13311. }
  13312. }
  13313. }
  13314. return props.allowHalf ? 0.5 : 1;
  13315. };
  13316. const select = (index) => {
  13317. if (!props.disabled && !props.readonly && index !== props.modelValue) {
  13318. emit("update:modelValue", index);
  13319. emit("change", index);
  13320. }
  13321. };
  13322. const onTouchStart = (event) => {
  13323. if (untouchable()) {
  13324. return;
  13325. }
  13326. touch.start(event);
  13327. updateRanges();
  13328. };
  13329. const onTouchMove = (event) => {
  13330. if (untouchable()) {
  13331. return;
  13332. }
  13333. touch.move(event);
  13334. if (touch.isHorizontal()) {
  13335. const {
  13336. clientX,
  13337. clientY
  13338. } = event.touches[0];
  13339. preventDefault(event);
  13340. select(getScoreByPosition(clientX, clientY));
  13341. }
  13342. };
  13343. const renderStar = (item, index) => {
  13344. const {
  13345. icon,
  13346. size,
  13347. color,
  13348. count,
  13349. gutter,
  13350. voidIcon,
  13351. disabled,
  13352. voidColor,
  13353. allowHalf,
  13354. iconPrefix,
  13355. disabledColor
  13356. } = props;
  13357. const score = index + 1;
  13358. const isFull = item.status === "full";
  13359. const isVoid = item.status === "void";
  13360. const renderHalf = allowHalf && item.value > 0 && item.value < 1;
  13361. let style;
  13362. if (gutter && score !== +count) {
  13363. style = {
  13364. paddingRight: addUnit(gutter)
  13365. };
  13366. }
  13367. const onClickItem = (event) => {
  13368. updateRanges();
  13369. select(allowHalf ? getScoreByPosition(event.clientX, event.clientY) : score);
  13370. };
  13371. return createVNode("div", {
  13372. "key": index,
  13373. "ref": setItemRefs(index),
  13374. "role": "radio",
  13375. "style": style,
  13376. "class": bem76("item"),
  13377. "tabindex": disabled ? void 0 : 0,
  13378. "aria-setsize": count,
  13379. "aria-posinset": score,
  13380. "aria-checked": !isVoid,
  13381. "onClick": onClickItem
  13382. }, [createVNode(Icon, {
  13383. "size": size,
  13384. "name": isFull ? icon : voidIcon,
  13385. "class": bem76("icon", {
  13386. disabled,
  13387. full: isFull
  13388. }),
  13389. "color": disabled ? disabledColor : isFull ? color : voidColor,
  13390. "classPrefix": iconPrefix
  13391. }, null), renderHalf && createVNode(Icon, {
  13392. "size": size,
  13393. "style": {
  13394. width: item.value + "em"
  13395. },
  13396. "name": isVoid ? voidIcon : icon,
  13397. "class": bem76("icon", ["half", {
  13398. disabled,
  13399. full: !isVoid
  13400. }]),
  13401. "color": disabled ? disabledColor : isVoid ? voidColor : color,
  13402. "classPrefix": iconPrefix
  13403. }, null)]);
  13404. };
  13405. useCustomFieldValue(() => props.modelValue);
  13406. useEventListener("touchmove", onTouchMove, {
  13407. target: groupRef
  13408. });
  13409. return () => createVNode("div", {
  13410. "ref": groupRef,
  13411. "role": "radiogroup",
  13412. "class": bem76({
  13413. readonly: props.readonly,
  13414. disabled: props.disabled
  13415. }),
  13416. "tabindex": props.disabled ? void 0 : 0,
  13417. "aria-disabled": props.disabled,
  13418. "aria-readonly": props.readonly,
  13419. "onTouchstartPassive": onTouchStart
  13420. }, [list.value.map(renderStar)]);
  13421. }
  13422. });
  13423. // node_modules/vant/es/rate/index.mjs
  13424. var Rate = withInstall(stdin_default84);
  13425. // node_modules/vant/es/row/index.mjs
  13426. var Row = withInstall(stdin_default48);
  13427. // node_modules/vant/es/search/Search.mjs
  13428. var [name81, bem77, t17] = createNamespace("search");
  13429. var searchProps = extend({}, fieldSharedProps, {
  13430. label: String,
  13431. shape: makeStringProp("square"),
  13432. leftIcon: makeStringProp("search"),
  13433. clearable: truthProp,
  13434. actionText: String,
  13435. background: String,
  13436. showAction: Boolean
  13437. });
  13438. var stdin_default85 = defineComponent({
  13439. name: name81,
  13440. props: searchProps,
  13441. emits: ["blur", "focus", "clear", "search", "cancel", "click-input", "click-left-icon", "click-right-icon", "update:modelValue"],
  13442. setup(props, {
  13443. emit,
  13444. slots,
  13445. attrs
  13446. }) {
  13447. const id = useId();
  13448. const filedRef = ref();
  13449. const onCancel = () => {
  13450. if (!slots.action) {
  13451. emit("update:modelValue", "");
  13452. emit("cancel");
  13453. }
  13454. };
  13455. const onKeypress = (event) => {
  13456. const ENTER_CODE = 13;
  13457. if (event.keyCode === ENTER_CODE) {
  13458. preventDefault(event);
  13459. emit("search", props.modelValue);
  13460. }
  13461. };
  13462. const getInputId = () => props.id || `${id}-input`;
  13463. const renderLabel = () => {
  13464. if (slots.label || props.label) {
  13465. return createVNode("label", {
  13466. "class": bem77("label"),
  13467. "for": getInputId()
  13468. }, [slots.label ? slots.label() : props.label]);
  13469. }
  13470. };
  13471. const renderAction = () => {
  13472. if (props.showAction) {
  13473. const text = props.actionText || t17("cancel");
  13474. return createVNode("div", {
  13475. "class": bem77("action"),
  13476. "role": "button",
  13477. "tabindex": 0,
  13478. "onClick": onCancel
  13479. }, [slots.action ? slots.action() : text]);
  13480. }
  13481. };
  13482. const blur = () => {
  13483. var _a;
  13484. return (_a = filedRef.value) == null ? void 0 : _a.blur();
  13485. };
  13486. const focus = () => {
  13487. var _a;
  13488. return (_a = filedRef.value) == null ? void 0 : _a.focus();
  13489. };
  13490. const onBlur = (event) => emit("blur", event);
  13491. const onFocus = (event) => emit("focus", event);
  13492. const onClear = (event) => emit("clear", event);
  13493. const onClickInput = (event) => emit("click-input", event);
  13494. const onClickLeftIcon = (event) => emit("click-left-icon", event);
  13495. const onClickRightIcon = (event) => emit("click-right-icon", event);
  13496. const fieldPropNames = Object.keys(fieldSharedProps);
  13497. const renderField = () => {
  13498. const fieldAttrs = extend({}, attrs, pick(props, fieldPropNames), {
  13499. id: getInputId()
  13500. });
  13501. const onInput = (value) => emit("update:modelValue", value);
  13502. return createVNode(Field, mergeProps({
  13503. "ref": filedRef,
  13504. "type": "search",
  13505. "class": bem77("field"),
  13506. "border": false,
  13507. "onBlur": onBlur,
  13508. "onFocus": onFocus,
  13509. "onClear": onClear,
  13510. "onKeypress": onKeypress,
  13511. "onClick-input": onClickInput,
  13512. "onClick-left-icon": onClickLeftIcon,
  13513. "onClick-right-icon": onClickRightIcon,
  13514. "onUpdate:modelValue": onInput
  13515. }, fieldAttrs), pick(slots, ["left-icon", "right-icon"]));
  13516. };
  13517. useExpose({
  13518. focus,
  13519. blur
  13520. });
  13521. return () => {
  13522. var _a;
  13523. return createVNode("div", {
  13524. "class": bem77({
  13525. "show-action": props.showAction
  13526. }),
  13527. "style": {
  13528. background: props.background
  13529. }
  13530. }, [(_a = slots.left) == null ? void 0 : _a.call(slots), createVNode("div", {
  13531. "class": bem77("content", props.shape)
  13532. }, [renderLabel(), renderField()]), renderAction()]);
  13533. };
  13534. }
  13535. });
  13536. // node_modules/vant/es/search/index.mjs
  13537. var Search = withInstall(stdin_default85);
  13538. // node_modules/vant/es/share-sheet/ShareSheet.mjs
  13539. var popupInheritKeys3 = [...popupSharedPropKeys, "round", "closeOnPopstate", "safeAreaInsetBottom"];
  13540. var iconMap = {
  13541. qq: "qq",
  13542. link: "link-o",
  13543. weibo: "weibo",
  13544. qrcode: "qr",
  13545. poster: "photo-o",
  13546. wechat: "wechat",
  13547. "weapp-qrcode": "miniprogram-o",
  13548. "wechat-moments": "wechat-moments"
  13549. };
  13550. var [name82, bem78, t18] = createNamespace("share-sheet");
  13551. var shareSheetProps = extend({}, popupSharedProps, {
  13552. title: String,
  13553. round: truthProp,
  13554. options: makeArrayProp(),
  13555. cancelText: String,
  13556. description: String,
  13557. closeOnPopstate: truthProp,
  13558. safeAreaInsetBottom: truthProp
  13559. });
  13560. var stdin_default86 = defineComponent({
  13561. name: name82,
  13562. props: shareSheetProps,
  13563. emits: ["cancel", "select", "update:show"],
  13564. setup(props, {
  13565. emit,
  13566. slots
  13567. }) {
  13568. const updateShow = (value) => emit("update:show", value);
  13569. const onCancel = () => {
  13570. updateShow(false);
  13571. emit("cancel");
  13572. };
  13573. const onSelect = (option, index) => emit("select", option, index);
  13574. const renderHeader = () => {
  13575. const title = slots.title ? slots.title() : props.title;
  13576. const description = slots.description ? slots.description() : props.description;
  13577. if (title || description) {
  13578. return createVNode("div", {
  13579. "class": bem78("header")
  13580. }, [title && createVNode("h2", {
  13581. "class": bem78("title")
  13582. }, [title]), description && createVNode("span", {
  13583. "class": bem78("description")
  13584. }, [description])]);
  13585. }
  13586. };
  13587. const renderIcon = (icon) => {
  13588. if (iconMap[icon]) {
  13589. return createVNode("div", {
  13590. "class": bem78("icon", [icon])
  13591. }, [createVNode(Icon, {
  13592. "name": iconMap[icon] || icon
  13593. }, null)]);
  13594. }
  13595. return createVNode("img", {
  13596. "src": icon,
  13597. "class": bem78("image-icon")
  13598. }, null);
  13599. };
  13600. const renderOption = (option, index) => {
  13601. const {
  13602. name: name210,
  13603. icon,
  13604. className,
  13605. description
  13606. } = option;
  13607. return createVNode("div", {
  13608. "role": "button",
  13609. "tabindex": 0,
  13610. "class": [bem78("option"), className, HAPTICS_FEEDBACK],
  13611. "onClick": () => onSelect(option, index)
  13612. }, [renderIcon(icon), name210 && createVNode("span", {
  13613. "class": bem78("name")
  13614. }, [name210]), description && createVNode("span", {
  13615. "class": bem78("option-description")
  13616. }, [description])]);
  13617. };
  13618. const renderOptions = (options, border) => createVNode("div", {
  13619. "class": bem78("options", {
  13620. border
  13621. })
  13622. }, [options.map(renderOption)]);
  13623. const renderRows = () => {
  13624. const {
  13625. options
  13626. } = props;
  13627. if (Array.isArray(options[0])) {
  13628. return options.map((item, index) => renderOptions(item, index !== 0));
  13629. }
  13630. return renderOptions(options);
  13631. };
  13632. const renderCancelButton = () => {
  13633. var _a;
  13634. const cancelText = (_a = props.cancelText) != null ? _a : t18("cancel");
  13635. if (slots.cancel || cancelText) {
  13636. return createVNode("button", {
  13637. "type": "button",
  13638. "class": bem78("cancel"),
  13639. "onClick": onCancel
  13640. }, [slots.cancel ? slots.cancel() : cancelText]);
  13641. }
  13642. };
  13643. return () => createVNode(Popup, mergeProps({
  13644. "class": bem78(),
  13645. "position": "bottom",
  13646. "onUpdate:show": updateShow
  13647. }, pick(props, popupInheritKeys3)), {
  13648. default: () => [renderHeader(), renderRows(), renderCancelButton()]
  13649. });
  13650. }
  13651. });
  13652. // node_modules/vant/es/share-sheet/index.mjs
  13653. var ShareSheet = withInstall(stdin_default86);
  13654. // node_modules/vant/es/sidebar/Sidebar.mjs
  13655. var [name83, bem79] = createNamespace("sidebar");
  13656. var SIDEBAR_KEY = Symbol(name83);
  13657. var sidebarProps = {
  13658. modelValue: makeNumericProp(0)
  13659. };
  13660. var stdin_default87 = defineComponent({
  13661. name: name83,
  13662. props: sidebarProps,
  13663. emits: ["change", "update:modelValue"],
  13664. setup(props, {
  13665. emit,
  13666. slots
  13667. }) {
  13668. const {
  13669. linkChildren
  13670. } = useChildren(SIDEBAR_KEY);
  13671. const getActive = () => +props.modelValue;
  13672. const setActive = (value) => {
  13673. if (value !== getActive()) {
  13674. emit("update:modelValue", value);
  13675. emit("change", value);
  13676. }
  13677. };
  13678. linkChildren({
  13679. getActive,
  13680. setActive
  13681. });
  13682. return () => {
  13683. var _a;
  13684. return createVNode("div", {
  13685. "role": "tablist",
  13686. "class": bem79()
  13687. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  13688. };
  13689. }
  13690. });
  13691. // node_modules/vant/es/sidebar/index.mjs
  13692. var Sidebar = withInstall(stdin_default87);
  13693. // node_modules/vant/es/sidebar-item/SidebarItem.mjs
  13694. var [name84, bem80] = createNamespace("sidebar-item");
  13695. var sidebarItemProps = extend({}, routeProps, {
  13696. dot: Boolean,
  13697. title: String,
  13698. badge: numericProp,
  13699. disabled: Boolean,
  13700. badgeProps: Object
  13701. });
  13702. var stdin_default88 = defineComponent({
  13703. name: name84,
  13704. props: sidebarItemProps,
  13705. emits: ["click"],
  13706. setup(props, {
  13707. emit,
  13708. slots
  13709. }) {
  13710. const route2 = useRoute();
  13711. const {
  13712. parent,
  13713. index
  13714. } = useParent(SIDEBAR_KEY);
  13715. if (!parent) {
  13716. if (true) {
  13717. console.error("[Vant] <SidebarItem> must be a child component of <Sidebar>.");
  13718. }
  13719. return;
  13720. }
  13721. const onClick = () => {
  13722. if (props.disabled) {
  13723. return;
  13724. }
  13725. emit("click", index.value);
  13726. parent.setActive(index.value);
  13727. route2();
  13728. };
  13729. return () => {
  13730. const {
  13731. dot,
  13732. badge,
  13733. title,
  13734. disabled
  13735. } = props;
  13736. const selected = index.value === parent.getActive();
  13737. return createVNode("div", {
  13738. "role": "tab",
  13739. "class": bem80({
  13740. select: selected,
  13741. disabled
  13742. }),
  13743. "tabindex": disabled ? void 0 : 0,
  13744. "aria-selected": selected,
  13745. "onClick": onClick
  13746. }, [createVNode(Badge, mergeProps({
  13747. "dot": dot,
  13748. "class": bem80("text"),
  13749. "content": badge
  13750. }, props.badgeProps), {
  13751. default: () => [slots.title ? slots.title() : title]
  13752. })]);
  13753. };
  13754. }
  13755. });
  13756. // node_modules/vant/es/sidebar-item/index.mjs
  13757. var SidebarItem = withInstall(stdin_default88);
  13758. // node_modules/vant/es/skeleton/Skeleton.mjs
  13759. var [name85, bem81] = createNamespace("skeleton");
  13760. var DEFAULT_ROW_WIDTH = "100%";
  13761. var DEFAULT_LAST_ROW_WIDTH = "60%";
  13762. var skeletonProps = {
  13763. row: makeNumericProp(0),
  13764. title: Boolean,
  13765. round: Boolean,
  13766. avatar: Boolean,
  13767. loading: truthProp,
  13768. animate: truthProp,
  13769. avatarSize: numericProp,
  13770. titleWidth: numericProp,
  13771. avatarShape: makeStringProp("round"),
  13772. rowWidth: {
  13773. type: [Number, String, Array],
  13774. default: DEFAULT_ROW_WIDTH
  13775. }
  13776. };
  13777. var stdin_default89 = defineComponent({
  13778. name: name85,
  13779. inheritAttrs: false,
  13780. props: skeletonProps,
  13781. setup(props, {
  13782. slots,
  13783. attrs
  13784. }) {
  13785. const renderAvatar = () => {
  13786. if (props.avatar) {
  13787. return createVNode("div", {
  13788. "class": bem81("avatar", props.avatarShape),
  13789. "style": getSizeStyle(props.avatarSize)
  13790. }, null);
  13791. }
  13792. };
  13793. const renderTitle = () => {
  13794. if (props.title) {
  13795. return createVNode("h3", {
  13796. "class": bem81("title"),
  13797. "style": {
  13798. width: addUnit(props.titleWidth)
  13799. }
  13800. }, null);
  13801. }
  13802. };
  13803. const getRowWidth = (index) => {
  13804. const {
  13805. rowWidth
  13806. } = props;
  13807. if (rowWidth === DEFAULT_ROW_WIDTH && index === +props.row - 1) {
  13808. return DEFAULT_LAST_ROW_WIDTH;
  13809. }
  13810. if (Array.isArray(rowWidth)) {
  13811. return rowWidth[index];
  13812. }
  13813. return rowWidth;
  13814. };
  13815. const renderRows = () => Array(+props.row).fill("").map((_, i) => createVNode("div", {
  13816. "class": bem81("row"),
  13817. "style": {
  13818. width: addUnit(getRowWidth(i))
  13819. }
  13820. }, null));
  13821. return () => {
  13822. var _a;
  13823. if (!props.loading) {
  13824. return (_a = slots.default) == null ? void 0 : _a.call(slots);
  13825. }
  13826. return createVNode("div", mergeProps({
  13827. "class": bem81({
  13828. animate: props.animate,
  13829. round: props.round
  13830. })
  13831. }, attrs), [renderAvatar(), createVNode("div", {
  13832. "class": bem81("content")
  13833. }, [renderTitle(), renderRows()])]);
  13834. };
  13835. }
  13836. });
  13837. // node_modules/vant/es/skeleton/index.mjs
  13838. var Skeleton = withInstall(stdin_default89);
  13839. // node_modules/vant/es/slider/Slider.mjs
  13840. var [name86, bem82] = createNamespace("slider");
  13841. var sliderProps = {
  13842. min: makeNumericProp(0),
  13843. max: makeNumericProp(100),
  13844. step: makeNumericProp(1),
  13845. range: Boolean,
  13846. reverse: Boolean,
  13847. disabled: Boolean,
  13848. readonly: Boolean,
  13849. vertical: Boolean,
  13850. barHeight: numericProp,
  13851. buttonSize: numericProp,
  13852. activeColor: String,
  13853. inactiveColor: String,
  13854. modelValue: {
  13855. type: [Number, Array],
  13856. default: 0
  13857. }
  13858. };
  13859. var stdin_default90 = defineComponent({
  13860. name: name86,
  13861. props: sliderProps,
  13862. emits: ["change", "drag-end", "drag-start", "update:modelValue"],
  13863. setup(props, {
  13864. emit,
  13865. slots
  13866. }) {
  13867. let buttonIndex;
  13868. let current2;
  13869. let startValue;
  13870. const root = ref();
  13871. const slider = ref();
  13872. const dragStatus = ref();
  13873. const touch = useTouch();
  13874. const scope = computed(() => Number(props.max) - Number(props.min));
  13875. const wrapperStyle = computed(() => {
  13876. const crossAxis = props.vertical ? "width" : "height";
  13877. return {
  13878. background: props.inactiveColor,
  13879. [crossAxis]: addUnit(props.barHeight)
  13880. };
  13881. });
  13882. const isRange = (val) => props.range && Array.isArray(val);
  13883. const calcMainAxis = () => {
  13884. const {
  13885. modelValue,
  13886. min
  13887. } = props;
  13888. if (isRange(modelValue)) {
  13889. return `${(modelValue[1] - modelValue[0]) * 100 / scope.value}%`;
  13890. }
  13891. return `${(modelValue - Number(min)) * 100 / scope.value}%`;
  13892. };
  13893. const calcOffset = () => {
  13894. const {
  13895. modelValue,
  13896. min
  13897. } = props;
  13898. if (isRange(modelValue)) {
  13899. return `${(modelValue[0] - Number(min)) * 100 / scope.value}%`;
  13900. }
  13901. return "0%";
  13902. };
  13903. const barStyle = computed(() => {
  13904. const mainAxis = props.vertical ? "height" : "width";
  13905. const style = {
  13906. [mainAxis]: calcMainAxis(),
  13907. background: props.activeColor
  13908. };
  13909. if (dragStatus.value) {
  13910. style.transition = "none";
  13911. }
  13912. const getPositionKey = () => {
  13913. if (props.vertical) {
  13914. return props.reverse ? "bottom" : "top";
  13915. }
  13916. return props.reverse ? "right" : "left";
  13917. };
  13918. style[getPositionKey()] = calcOffset();
  13919. return style;
  13920. });
  13921. const format3 = (value) => {
  13922. const min = +props.min;
  13923. const max = +props.max;
  13924. const step = +props.step;
  13925. value = clamp(value, min, max);
  13926. const diff = Math.round((value - min) / step) * step;
  13927. return addNumber(min, diff);
  13928. };
  13929. const isSameValue = (newValue, oldValue) => JSON.stringify(newValue) === JSON.stringify(oldValue);
  13930. const handleRangeValue = (value) => {
  13931. var _a, _b;
  13932. const left2 = (_a = value[0]) != null ? _a : Number(props.min);
  13933. const right2 = (_b = value[1]) != null ? _b : Number(props.max);
  13934. return left2 > right2 ? [right2, left2] : [left2, right2];
  13935. };
  13936. const updateValue = (value, end2) => {
  13937. if (isRange(value)) {
  13938. value = handleRangeValue(value).map(format3);
  13939. } else {
  13940. value = format3(value);
  13941. }
  13942. if (!isSameValue(value, props.modelValue)) {
  13943. emit("update:modelValue", value);
  13944. }
  13945. if (end2 && !isSameValue(value, startValue)) {
  13946. emit("change", value);
  13947. }
  13948. };
  13949. const onClick = (event) => {
  13950. event.stopPropagation();
  13951. if (props.disabled || props.readonly) {
  13952. return;
  13953. }
  13954. const {
  13955. min,
  13956. reverse,
  13957. vertical,
  13958. modelValue
  13959. } = props;
  13960. const rect = useRect(root);
  13961. const getDelta = () => {
  13962. if (vertical) {
  13963. if (reverse) {
  13964. return rect.bottom - event.clientY;
  13965. }
  13966. return event.clientY - rect.top;
  13967. }
  13968. if (reverse) {
  13969. return rect.right - event.clientX;
  13970. }
  13971. return event.clientX - rect.left;
  13972. };
  13973. const total = vertical ? rect.height : rect.width;
  13974. const value = Number(min) + getDelta() / total * scope.value;
  13975. if (isRange(modelValue)) {
  13976. const [left2, right2] = modelValue;
  13977. const middle = (left2 + right2) / 2;
  13978. if (value <= middle) {
  13979. updateValue([value, right2], true);
  13980. } else {
  13981. updateValue([left2, value], true);
  13982. }
  13983. } else {
  13984. updateValue(value, true);
  13985. }
  13986. };
  13987. const onTouchStart = (event) => {
  13988. if (props.disabled || props.readonly) {
  13989. return;
  13990. }
  13991. touch.start(event);
  13992. current2 = props.modelValue;
  13993. if (isRange(current2)) {
  13994. startValue = current2.map(format3);
  13995. } else {
  13996. startValue = format3(current2);
  13997. }
  13998. dragStatus.value = "start";
  13999. };
  14000. const onTouchMove = (event) => {
  14001. if (props.disabled || props.readonly) {
  14002. return;
  14003. }
  14004. if (dragStatus.value === "start") {
  14005. emit("drag-start", event);
  14006. }
  14007. preventDefault(event, true);
  14008. touch.move(event);
  14009. dragStatus.value = "dragging";
  14010. const rect = useRect(root);
  14011. const delta = props.vertical ? touch.deltaY.value : touch.deltaX.value;
  14012. const total = props.vertical ? rect.height : rect.width;
  14013. let diff = delta / total * scope.value;
  14014. if (props.reverse) {
  14015. diff = -diff;
  14016. }
  14017. if (isRange(startValue)) {
  14018. const index = props.reverse ? 1 - buttonIndex : buttonIndex;
  14019. current2[index] = startValue[index] + diff;
  14020. } else {
  14021. current2 = startValue + diff;
  14022. }
  14023. updateValue(current2);
  14024. };
  14025. const onTouchEnd = (event) => {
  14026. if (props.disabled || props.readonly) {
  14027. return;
  14028. }
  14029. if (dragStatus.value === "dragging") {
  14030. updateValue(current2, true);
  14031. emit("drag-end", event);
  14032. }
  14033. dragStatus.value = "";
  14034. };
  14035. const getButtonClassName = (index) => {
  14036. if (typeof index === "number") {
  14037. const position = ["left", "right"];
  14038. return bem82(`button-wrapper`, position[index]);
  14039. }
  14040. return bem82("button-wrapper", props.reverse ? "left" : "right");
  14041. };
  14042. const renderButtonContent = (value, index) => {
  14043. if (typeof index === "number") {
  14044. const slot = slots[index === 0 ? "left-button" : "right-button"];
  14045. if (slot) {
  14046. return slot({
  14047. value
  14048. });
  14049. }
  14050. }
  14051. if (slots.button) {
  14052. return slots.button({
  14053. value
  14054. });
  14055. }
  14056. return createVNode("div", {
  14057. "class": bem82("button"),
  14058. "style": getSizeStyle(props.buttonSize)
  14059. }, null);
  14060. };
  14061. const renderButton = (index) => {
  14062. const current22 = typeof index === "number" ? props.modelValue[index] : props.modelValue;
  14063. return createVNode("div", {
  14064. "ref": slider,
  14065. "role": "slider",
  14066. "class": getButtonClassName(index),
  14067. "tabindex": props.disabled ? void 0 : 0,
  14068. "aria-valuemin": props.min,
  14069. "aria-valuenow": current22,
  14070. "aria-valuemax": props.max,
  14071. "aria-disabled": props.disabled || void 0,
  14072. "aria-readonly": props.readonly || void 0,
  14073. "aria-orientation": props.vertical ? "vertical" : "horizontal",
  14074. "onTouchstartPassive": (event) => {
  14075. if (typeof index === "number") {
  14076. buttonIndex = index;
  14077. }
  14078. onTouchStart(event);
  14079. },
  14080. "onTouchend": onTouchEnd,
  14081. "onTouchcancel": onTouchEnd,
  14082. "onClick": stopPropagation
  14083. }, [renderButtonContent(current22, index)]);
  14084. };
  14085. updateValue(props.modelValue);
  14086. useCustomFieldValue(() => props.modelValue);
  14087. useEventListener("touchmove", onTouchMove, {
  14088. target: slider
  14089. });
  14090. return () => createVNode("div", {
  14091. "ref": root,
  14092. "style": wrapperStyle.value,
  14093. "class": bem82({
  14094. vertical: props.vertical,
  14095. disabled: props.disabled
  14096. }),
  14097. "onClick": onClick
  14098. }, [createVNode("div", {
  14099. "class": bem82("bar"),
  14100. "style": barStyle.value
  14101. }, [props.range ? [renderButton(0), renderButton(1)] : renderButton()])]);
  14102. }
  14103. });
  14104. // node_modules/vant/es/slider/index.mjs
  14105. var Slider = withInstall(stdin_default90);
  14106. // node_modules/vant/es/space/Space.mjs
  14107. var [name87, bem83] = createNamespace("space");
  14108. var spaceProps = {
  14109. align: String,
  14110. direction: {
  14111. type: String,
  14112. default: "horizontal"
  14113. },
  14114. size: {
  14115. type: [Number, String, Array],
  14116. default: 8
  14117. },
  14118. wrap: Boolean,
  14119. fill: Boolean
  14120. };
  14121. function filterEmpty(children = []) {
  14122. const nodes = [];
  14123. children.forEach((child) => {
  14124. if (Array.isArray(child)) {
  14125. nodes.push(...child);
  14126. } else if (child.type === Fragment) {
  14127. nodes.push(...filterEmpty(child.children));
  14128. } else {
  14129. nodes.push(child);
  14130. }
  14131. });
  14132. return nodes.filter((c) => {
  14133. var _a;
  14134. 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() === ""));
  14135. });
  14136. }
  14137. var stdin_default91 = defineComponent({
  14138. name: name87,
  14139. props: spaceProps,
  14140. setup(props, {
  14141. slots
  14142. }) {
  14143. const mergedAlign = computed(() => {
  14144. var _a;
  14145. return (_a = props.align) != null ? _a : props.direction === "horizontal" ? "center" : "";
  14146. });
  14147. const getMargin = (size) => {
  14148. if (typeof size === "number") {
  14149. return size + "px";
  14150. }
  14151. return size;
  14152. };
  14153. const getMarginStyle = (isLast) => {
  14154. const style = {};
  14155. const marginRight = `${getMargin(Array.isArray(props.size) ? props.size[0] : props.size)}`;
  14156. const marginBottom = `${getMargin(Array.isArray(props.size) ? props.size[1] : props.size)}`;
  14157. if (isLast) {
  14158. return props.wrap ? {
  14159. marginBottom
  14160. } : {};
  14161. }
  14162. if (props.direction === "horizontal") {
  14163. style.marginRight = marginRight;
  14164. }
  14165. if (props.direction === "vertical" || props.wrap) {
  14166. style.marginBottom = marginBottom;
  14167. }
  14168. return style;
  14169. };
  14170. return () => {
  14171. var _a;
  14172. const children = filterEmpty((_a = slots.default) == null ? void 0 : _a.call(slots));
  14173. return createVNode("div", {
  14174. "class": [bem83({
  14175. [props.direction]: props.direction,
  14176. [`align-${mergedAlign.value}`]: mergedAlign.value,
  14177. wrap: props.wrap,
  14178. fill: props.fill
  14179. })]
  14180. }, [children.map((c, i) => createVNode("div", {
  14181. "key": `item-${i}`,
  14182. "class": `${name87}-item`,
  14183. "style": getMarginStyle(i === children.length - 1)
  14184. }, [c]))]);
  14185. };
  14186. }
  14187. });
  14188. // node_modules/vant/es/space/index.mjs
  14189. var Space = withInstall(stdin_default91);
  14190. // node_modules/vant/es/steps/Steps.mjs
  14191. var [name88, bem84] = createNamespace("steps");
  14192. var stepsProps = {
  14193. active: makeNumericProp(0),
  14194. direction: makeStringProp("horizontal"),
  14195. activeIcon: makeStringProp("checked"),
  14196. iconPrefix: String,
  14197. finishIcon: String,
  14198. activeColor: String,
  14199. inactiveIcon: String,
  14200. inactiveColor: String
  14201. };
  14202. var STEPS_KEY = Symbol(name88);
  14203. var stdin_default92 = defineComponent({
  14204. name: name88,
  14205. props: stepsProps,
  14206. emits: ["click-step"],
  14207. setup(props, {
  14208. emit,
  14209. slots
  14210. }) {
  14211. const {
  14212. linkChildren
  14213. } = useChildren(STEPS_KEY);
  14214. const onClickStep = (index) => emit("click-step", index);
  14215. linkChildren({
  14216. props,
  14217. onClickStep
  14218. });
  14219. return () => {
  14220. var _a;
  14221. return createVNode("div", {
  14222. "class": bem84([props.direction])
  14223. }, [createVNode("div", {
  14224. "class": bem84("items")
  14225. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
  14226. };
  14227. }
  14228. });
  14229. // node_modules/vant/es/step/Step.mjs
  14230. var [name89, bem85] = createNamespace("step");
  14231. var stdin_default93 = defineComponent({
  14232. name: name89,
  14233. setup(props, {
  14234. slots
  14235. }) {
  14236. const {
  14237. parent,
  14238. index
  14239. } = useParent(STEPS_KEY);
  14240. if (!parent) {
  14241. if (true) {
  14242. console.error("[Vant] <Step> must be a child component of <Steps>.");
  14243. }
  14244. return;
  14245. }
  14246. const parentProps = parent.props;
  14247. const getStatus = () => {
  14248. const active = +parentProps.active;
  14249. if (index.value < active) {
  14250. return "finish";
  14251. }
  14252. return index.value === active ? "process" : "waiting";
  14253. };
  14254. const isActive = () => getStatus() === "process";
  14255. const lineStyle = computed(() => ({
  14256. background: getStatus() === "finish" ? parentProps.activeColor : parentProps.inactiveColor
  14257. }));
  14258. const titleStyle = computed(() => {
  14259. if (isActive()) {
  14260. return {
  14261. color: parentProps.activeColor
  14262. };
  14263. }
  14264. if (getStatus() === "waiting") {
  14265. return {
  14266. color: parentProps.inactiveColor
  14267. };
  14268. }
  14269. });
  14270. const onClickStep = () => parent.onClickStep(index.value);
  14271. const renderCircle = () => {
  14272. const {
  14273. iconPrefix,
  14274. finishIcon,
  14275. activeIcon,
  14276. activeColor,
  14277. inactiveIcon
  14278. } = parentProps;
  14279. if (isActive()) {
  14280. if (slots["active-icon"]) {
  14281. return slots["active-icon"]();
  14282. }
  14283. return createVNode(Icon, {
  14284. "class": bem85("icon", "active"),
  14285. "name": activeIcon,
  14286. "color": activeColor,
  14287. "classPrefix": iconPrefix
  14288. }, null);
  14289. }
  14290. if (getStatus() === "finish" && (finishIcon || slots["finish-icon"])) {
  14291. if (slots["finish-icon"]) {
  14292. return slots["finish-icon"]();
  14293. }
  14294. return createVNode(Icon, {
  14295. "class": bem85("icon", "finish"),
  14296. "name": finishIcon,
  14297. "color": activeColor,
  14298. "classPrefix": iconPrefix
  14299. }, null);
  14300. }
  14301. if (slots["inactive-icon"]) {
  14302. return slots["inactive-icon"]();
  14303. }
  14304. if (inactiveIcon) {
  14305. return createVNode(Icon, {
  14306. "class": bem85("icon"),
  14307. "name": inactiveIcon,
  14308. "classPrefix": iconPrefix
  14309. }, null);
  14310. }
  14311. return createVNode("i", {
  14312. "class": bem85("circle"),
  14313. "style": lineStyle.value
  14314. }, null);
  14315. };
  14316. return () => {
  14317. var _a;
  14318. const status = getStatus();
  14319. return createVNode("div", {
  14320. "class": [BORDER, bem85([parentProps.direction, {
  14321. [status]: status
  14322. }])]
  14323. }, [createVNode("div", {
  14324. "class": bem85("title", {
  14325. active: isActive()
  14326. }),
  14327. "style": titleStyle.value,
  14328. "onClick": onClickStep
  14329. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), createVNode("div", {
  14330. "class": bem85("circle-container"),
  14331. "onClick": onClickStep
  14332. }, [renderCircle()]), createVNode("div", {
  14333. "class": bem85("line"),
  14334. "style": lineStyle.value
  14335. }, null)]);
  14336. };
  14337. }
  14338. });
  14339. // node_modules/vant/es/step/index.mjs
  14340. var Step = withInstall(stdin_default93);
  14341. // node_modules/vant/es/stepper/Stepper.mjs
  14342. var [name90, bem86] = createNamespace("stepper");
  14343. var LONG_PRESS_INTERVAL = 200;
  14344. var LONG_PRESS_START_TIME = 600;
  14345. var isEqual = (value1, value2) => String(value1) === String(value2);
  14346. var stepperProps = {
  14347. min: makeNumericProp(1),
  14348. max: makeNumericProp(Infinity),
  14349. name: makeNumericProp(""),
  14350. step: makeNumericProp(1),
  14351. theme: String,
  14352. integer: Boolean,
  14353. disabled: Boolean,
  14354. showPlus: truthProp,
  14355. showMinus: truthProp,
  14356. showInput: truthProp,
  14357. longPress: truthProp,
  14358. allowEmpty: Boolean,
  14359. modelValue: numericProp,
  14360. inputWidth: numericProp,
  14361. buttonSize: numericProp,
  14362. placeholder: String,
  14363. disablePlus: Boolean,
  14364. disableMinus: Boolean,
  14365. disableInput: Boolean,
  14366. beforeChange: Function,
  14367. defaultValue: makeNumericProp(1),
  14368. decimalLength: numericProp
  14369. };
  14370. var stdin_default94 = defineComponent({
  14371. name: name90,
  14372. props: stepperProps,
  14373. emits: ["plus", "blur", "minus", "focus", "change", "overlimit", "update:modelValue"],
  14374. setup(props, {
  14375. emit
  14376. }) {
  14377. const format3 = (value) => {
  14378. const {
  14379. min,
  14380. max,
  14381. allowEmpty,
  14382. decimalLength
  14383. } = props;
  14384. if (allowEmpty && value === "") {
  14385. return value;
  14386. }
  14387. value = formatNumber(String(value), !props.integer);
  14388. value = value === "" ? 0 : +value;
  14389. value = Number.isNaN(value) ? +min : value;
  14390. value = Math.max(Math.min(+max, value), +min);
  14391. if (isDef(decimalLength)) {
  14392. value = value.toFixed(+decimalLength);
  14393. }
  14394. return value;
  14395. };
  14396. const getInitialValue = () => {
  14397. var _a;
  14398. const defaultValue = (_a = props.modelValue) != null ? _a : props.defaultValue;
  14399. const value = format3(defaultValue);
  14400. if (!isEqual(value, props.modelValue)) {
  14401. emit("update:modelValue", value);
  14402. }
  14403. return value;
  14404. };
  14405. let actionType;
  14406. const inputRef = ref();
  14407. const current2 = ref(getInitialValue());
  14408. const minusDisabled = computed(() => props.disabled || props.disableMinus || current2.value <= +props.min);
  14409. const plusDisabled = computed(() => props.disabled || props.disablePlus || current2.value >= +props.max);
  14410. const inputStyle = computed(() => ({
  14411. width: addUnit(props.inputWidth),
  14412. height: addUnit(props.buttonSize)
  14413. }));
  14414. const buttonStyle = computed(() => getSizeStyle(props.buttonSize));
  14415. const check = () => {
  14416. const value = format3(current2.value);
  14417. if (!isEqual(value, current2.value)) {
  14418. current2.value = value;
  14419. }
  14420. };
  14421. const setValue = (value) => {
  14422. if (props.beforeChange) {
  14423. callInterceptor(props.beforeChange, {
  14424. args: [value],
  14425. done() {
  14426. current2.value = value;
  14427. }
  14428. });
  14429. } else {
  14430. current2.value = value;
  14431. }
  14432. };
  14433. const onChange = () => {
  14434. if (actionType === "plus" && plusDisabled.value || actionType === "minus" && minusDisabled.value) {
  14435. emit("overlimit", actionType);
  14436. return;
  14437. }
  14438. const diff = actionType === "minus" ? -props.step : +props.step;
  14439. const value = format3(addNumber(+current2.value, diff));
  14440. setValue(value);
  14441. emit(actionType);
  14442. };
  14443. const onInput = (event) => {
  14444. const input = event.target;
  14445. const {
  14446. value
  14447. } = input;
  14448. const {
  14449. decimalLength
  14450. } = props;
  14451. let formatted = formatNumber(String(value), !props.integer);
  14452. if (isDef(decimalLength) && formatted.includes(".")) {
  14453. const pair = formatted.split(".");
  14454. formatted = `${pair[0]}.${pair[1].slice(0, +decimalLength)}`;
  14455. }
  14456. if (props.beforeChange) {
  14457. input.value = String(current2.value);
  14458. } else if (!isEqual(value, formatted)) {
  14459. input.value = formatted;
  14460. }
  14461. const isNumeric2 = formatted === String(+formatted);
  14462. setValue(isNumeric2 ? +formatted : formatted);
  14463. };
  14464. const onFocus = (event) => {
  14465. var _a;
  14466. if (props.disableInput) {
  14467. (_a = inputRef.value) == null ? void 0 : _a.blur();
  14468. } else {
  14469. emit("focus", event);
  14470. }
  14471. };
  14472. const onBlur = (event) => {
  14473. const input = event.target;
  14474. const value = format3(input.value);
  14475. input.value = String(value);
  14476. current2.value = value;
  14477. nextTick(() => {
  14478. emit("blur", event);
  14479. resetScroll();
  14480. });
  14481. };
  14482. let isLongPress;
  14483. let longPressTimer;
  14484. const longPressStep = () => {
  14485. longPressTimer = setTimeout(() => {
  14486. onChange();
  14487. longPressStep();
  14488. }, LONG_PRESS_INTERVAL);
  14489. };
  14490. const onTouchStart = () => {
  14491. if (props.longPress) {
  14492. isLongPress = false;
  14493. clearTimeout(longPressTimer);
  14494. longPressTimer = setTimeout(() => {
  14495. isLongPress = true;
  14496. onChange();
  14497. longPressStep();
  14498. }, LONG_PRESS_START_TIME);
  14499. }
  14500. };
  14501. const onTouchEnd = (event) => {
  14502. if (props.longPress) {
  14503. clearTimeout(longPressTimer);
  14504. if (isLongPress) {
  14505. preventDefault(event);
  14506. }
  14507. }
  14508. };
  14509. const onMousedown = (event) => {
  14510. if (props.disableInput) {
  14511. preventDefault(event);
  14512. }
  14513. };
  14514. const createListeners = (type) => ({
  14515. onClick: (event) => {
  14516. preventDefault(event);
  14517. actionType = type;
  14518. onChange();
  14519. },
  14520. onTouchstartPassive: () => {
  14521. actionType = type;
  14522. onTouchStart();
  14523. },
  14524. onTouchend: onTouchEnd,
  14525. onTouchcancel: onTouchEnd
  14526. });
  14527. watch(() => [props.max, props.min, props.integer, props.decimalLength], check);
  14528. watch(() => props.modelValue, (value) => {
  14529. if (!isEqual(value, current2.value)) {
  14530. current2.value = format3(value);
  14531. }
  14532. });
  14533. watch(current2, (value) => {
  14534. emit("update:modelValue", value);
  14535. emit("change", value, {
  14536. name: props.name
  14537. });
  14538. });
  14539. useCustomFieldValue(() => props.modelValue);
  14540. return () => createVNode("div", {
  14541. "role": "group",
  14542. "class": bem86([props.theme])
  14543. }, [withDirectives(createVNode("button", mergeProps({
  14544. "type": "button",
  14545. "style": buttonStyle.value,
  14546. "class": [bem86("minus", {
  14547. disabled: minusDisabled.value
  14548. }), {
  14549. [HAPTICS_FEEDBACK]: !minusDisabled.value
  14550. }],
  14551. "aria-disabled": minusDisabled.value || void 0
  14552. }, createListeners("minus")), null), [[vShow, props.showMinus]]), withDirectives(createVNode("input", {
  14553. "ref": inputRef,
  14554. "type": props.integer ? "tel" : "text",
  14555. "role": "spinbutton",
  14556. "class": bem86("input"),
  14557. "value": current2.value,
  14558. "style": inputStyle.value,
  14559. "disabled": props.disabled,
  14560. "readonly": props.disableInput,
  14561. "inputmode": props.integer ? "numeric" : "decimal",
  14562. "placeholder": props.placeholder,
  14563. "aria-valuemax": props.max,
  14564. "aria-valuemin": props.min,
  14565. "aria-valuenow": current2.value,
  14566. "onBlur": onBlur,
  14567. "onInput": onInput,
  14568. "onFocus": onFocus,
  14569. "onMousedown": onMousedown
  14570. }, null), [[vShow, props.showInput]]), withDirectives(createVNode("button", mergeProps({
  14571. "type": "button",
  14572. "style": buttonStyle.value,
  14573. "class": [bem86("plus", {
  14574. disabled: plusDisabled.value
  14575. }), {
  14576. [HAPTICS_FEEDBACK]: !plusDisabled.value
  14577. }],
  14578. "aria-disabled": plusDisabled.value || void 0
  14579. }, createListeners("plus")), null), [[vShow, props.showPlus]])]);
  14580. }
  14581. });
  14582. // node_modules/vant/es/stepper/index.mjs
  14583. var Stepper = withInstall(stdin_default94);
  14584. // node_modules/vant/es/steps/index.mjs
  14585. var Steps = withInstall(stdin_default92);
  14586. // node_modules/vant/es/submit-bar/SubmitBar.mjs
  14587. var [name91, bem87, t19] = createNamespace("submit-bar");
  14588. var submitBarProps = {
  14589. tip: String,
  14590. label: String,
  14591. price: Number,
  14592. tipIcon: String,
  14593. loading: Boolean,
  14594. currency: makeStringProp("\xA5"),
  14595. disabled: Boolean,
  14596. textAlign: String,
  14597. buttonText: String,
  14598. buttonType: makeStringProp("danger"),
  14599. buttonColor: String,
  14600. suffixLabel: String,
  14601. placeholder: Boolean,
  14602. decimalLength: makeNumericProp(2),
  14603. safeAreaInsetBottom: truthProp
  14604. };
  14605. var stdin_default95 = defineComponent({
  14606. name: name91,
  14607. props: submitBarProps,
  14608. emits: ["submit"],
  14609. setup(props, {
  14610. emit,
  14611. slots
  14612. }) {
  14613. const root = ref();
  14614. const renderPlaceholder = usePlaceholder(root, bem87);
  14615. const renderText = () => {
  14616. const {
  14617. price,
  14618. label,
  14619. currency,
  14620. textAlign,
  14621. suffixLabel,
  14622. decimalLength
  14623. } = props;
  14624. if (typeof price === "number") {
  14625. const pricePair = (price / 100).toFixed(+decimalLength).split(".");
  14626. const decimal = decimalLength ? `.${pricePair[1]}` : "";
  14627. return createVNode("div", {
  14628. "class": bem87("text"),
  14629. "style": {
  14630. textAlign
  14631. }
  14632. }, [createVNode("span", null, [label || t19("label")]), createVNode("span", {
  14633. "class": bem87("price")
  14634. }, [currency, createVNode("span", {
  14635. "class": bem87("price-integer")
  14636. }, [pricePair[0]]), decimal]), suffixLabel && createVNode("span", {
  14637. "class": bem87("suffix-label")
  14638. }, [suffixLabel])]);
  14639. }
  14640. };
  14641. const renderTip = () => {
  14642. var _a;
  14643. const {
  14644. tip,
  14645. tipIcon
  14646. } = props;
  14647. if (slots.tip || tip) {
  14648. return createVNode("div", {
  14649. "class": bem87("tip")
  14650. }, [tipIcon && createVNode(Icon, {
  14651. "class": bem87("tip-icon"),
  14652. "name": tipIcon
  14653. }, null), tip && createVNode("span", {
  14654. "class": bem87("tip-text")
  14655. }, [tip]), (_a = slots.tip) == null ? void 0 : _a.call(slots)]);
  14656. }
  14657. };
  14658. const onClickButton = () => emit("submit");
  14659. const renderButton = () => {
  14660. if (slots.button) {
  14661. return slots.button();
  14662. }
  14663. return createVNode(Button, {
  14664. "round": true,
  14665. "type": props.buttonType,
  14666. "text": props.buttonText,
  14667. "class": bem87("button", props.buttonType),
  14668. "color": props.buttonColor,
  14669. "loading": props.loading,
  14670. "disabled": props.disabled,
  14671. "onClick": onClickButton
  14672. }, null);
  14673. };
  14674. const renderSubmitBar = () => {
  14675. var _a, _b;
  14676. return createVNode("div", {
  14677. "ref": root,
  14678. "class": [bem87(), {
  14679. "van-safe-area-bottom": props.safeAreaInsetBottom
  14680. }]
  14681. }, [(_a = slots.top) == null ? void 0 : _a.call(slots), renderTip(), createVNode("div", {
  14682. "class": bem87("bar")
  14683. }, [(_b = slots.default) == null ? void 0 : _b.call(slots), renderText(), renderButton()])]);
  14684. };
  14685. return () => {
  14686. if (props.placeholder) {
  14687. return renderPlaceholder(renderSubmitBar);
  14688. }
  14689. return renderSubmitBar();
  14690. };
  14691. }
  14692. });
  14693. // node_modules/vant/es/submit-bar/index.mjs
  14694. var SubmitBar = withInstall(stdin_default95);
  14695. // node_modules/vant/es/swipe-cell/SwipeCell.mjs
  14696. var [name92, bem88] = createNamespace("swipe-cell");
  14697. var swipeCellProps = {
  14698. name: makeNumericProp(""),
  14699. disabled: Boolean,
  14700. leftWidth: numericProp,
  14701. rightWidth: numericProp,
  14702. beforeClose: Function,
  14703. stopPropagation: Boolean
  14704. };
  14705. var stdin_default96 = defineComponent({
  14706. name: name92,
  14707. props: swipeCellProps,
  14708. emits: ["open", "close", "click"],
  14709. setup(props, {
  14710. emit,
  14711. slots
  14712. }) {
  14713. let opened;
  14714. let lockClick2;
  14715. let startOffset;
  14716. const root = ref();
  14717. const leftRef = ref();
  14718. const rightRef = ref();
  14719. const state = reactive({
  14720. offset: 0,
  14721. dragging: false
  14722. });
  14723. const touch = useTouch();
  14724. const getWidthByRef = (ref2) => ref2.value ? useRect(ref2).width : 0;
  14725. const leftWidth = computed(() => isDef(props.leftWidth) ? +props.leftWidth : getWidthByRef(leftRef));
  14726. const rightWidth = computed(() => isDef(props.rightWidth) ? +props.rightWidth : getWidthByRef(rightRef));
  14727. const open = (side) => {
  14728. state.offset = side === "left" ? leftWidth.value : -rightWidth.value;
  14729. if (!opened) {
  14730. opened = true;
  14731. emit("open", {
  14732. name: props.name,
  14733. position: side
  14734. });
  14735. }
  14736. };
  14737. const close = (position) => {
  14738. state.offset = 0;
  14739. if (opened) {
  14740. opened = false;
  14741. emit("close", {
  14742. name: props.name,
  14743. position
  14744. });
  14745. }
  14746. };
  14747. const toggle = (side) => {
  14748. const offset2 = Math.abs(state.offset);
  14749. const THRESHOLD = 0.15;
  14750. const threshold = opened ? 1 - THRESHOLD : THRESHOLD;
  14751. const width2 = side === "left" ? leftWidth.value : rightWidth.value;
  14752. if (width2 && offset2 > width2 * threshold) {
  14753. open(side);
  14754. } else {
  14755. close(side);
  14756. }
  14757. };
  14758. const onTouchStart = (event) => {
  14759. if (!props.disabled) {
  14760. startOffset = state.offset;
  14761. touch.start(event);
  14762. }
  14763. };
  14764. const onTouchMove = (event) => {
  14765. if (props.disabled) {
  14766. return;
  14767. }
  14768. const {
  14769. deltaX
  14770. } = touch;
  14771. touch.move(event);
  14772. if (touch.isHorizontal()) {
  14773. lockClick2 = true;
  14774. state.dragging = true;
  14775. const isEdge = !opened || deltaX.value * startOffset < 0;
  14776. if (isEdge) {
  14777. preventDefault(event, props.stopPropagation);
  14778. }
  14779. state.offset = clamp(deltaX.value + startOffset, -rightWidth.value, leftWidth.value);
  14780. }
  14781. };
  14782. const onTouchEnd = () => {
  14783. if (state.dragging) {
  14784. state.dragging = false;
  14785. toggle(state.offset > 0 ? "left" : "right");
  14786. setTimeout(() => {
  14787. lockClick2 = false;
  14788. }, 0);
  14789. }
  14790. };
  14791. const onClick = (position = "outside") => {
  14792. emit("click", position);
  14793. if (opened && !lockClick2) {
  14794. callInterceptor(props.beforeClose, {
  14795. args: [{
  14796. name: props.name,
  14797. position
  14798. }],
  14799. done: () => close(position)
  14800. });
  14801. }
  14802. };
  14803. const getClickHandler = (position, stop) => (event) => {
  14804. if (stop) {
  14805. event.stopPropagation();
  14806. }
  14807. onClick(position);
  14808. };
  14809. const renderSideContent = (side, ref2) => {
  14810. const contentSlot = slots[side];
  14811. if (contentSlot) {
  14812. return createVNode("div", {
  14813. "ref": ref2,
  14814. "class": bem88(side),
  14815. "onClick": getClickHandler(side, true)
  14816. }, [contentSlot()]);
  14817. }
  14818. };
  14819. useExpose({
  14820. open,
  14821. close
  14822. });
  14823. useClickAway(root, () => onClick("outside"), {
  14824. eventName: "touchstart"
  14825. });
  14826. useEventListener("touchmove", onTouchMove, {
  14827. target: root
  14828. });
  14829. return () => {
  14830. var _a;
  14831. const wrapperStyle = {
  14832. transform: `translate3d(${state.offset}px, 0, 0)`,
  14833. transitionDuration: state.dragging ? "0s" : ".6s"
  14834. };
  14835. return createVNode("div", {
  14836. "ref": root,
  14837. "class": bem88(),
  14838. "onClick": getClickHandler("cell", lockClick2),
  14839. "onTouchstartPassive": onTouchStart,
  14840. "onTouchend": onTouchEnd,
  14841. "onTouchcancel": onTouchEnd
  14842. }, [createVNode("div", {
  14843. "class": bem88("wrapper"),
  14844. "style": wrapperStyle
  14845. }, [renderSideContent("left", leftRef), (_a = slots.default) == null ? void 0 : _a.call(slots), renderSideContent("right", rightRef)])]);
  14846. };
  14847. }
  14848. });
  14849. // node_modules/vant/es/swipe-cell/index.mjs
  14850. var SwipeCell = withInstall(stdin_default96);
  14851. // node_modules/vant/es/tabbar/Tabbar.mjs
  14852. var [name93, bem89] = createNamespace("tabbar");
  14853. var tabbarProps = {
  14854. route: Boolean,
  14855. fixed: truthProp,
  14856. border: truthProp,
  14857. zIndex: numericProp,
  14858. placeholder: Boolean,
  14859. activeColor: String,
  14860. beforeChange: Function,
  14861. inactiveColor: String,
  14862. modelValue: makeNumericProp(0),
  14863. safeAreaInsetBottom: {
  14864. type: Boolean,
  14865. default: null
  14866. }
  14867. };
  14868. var TABBAR_KEY = Symbol(name93);
  14869. var stdin_default97 = defineComponent({
  14870. name: name93,
  14871. props: tabbarProps,
  14872. emits: ["change", "update:modelValue"],
  14873. setup(props, {
  14874. emit,
  14875. slots
  14876. }) {
  14877. const root = ref();
  14878. const {
  14879. linkChildren
  14880. } = useChildren(TABBAR_KEY);
  14881. const renderPlaceholder = usePlaceholder(root, bem89);
  14882. const enableSafeArea = () => {
  14883. var _a;
  14884. return (_a = props.safeAreaInsetBottom) != null ? _a : props.fixed;
  14885. };
  14886. const renderTabbar = () => {
  14887. var _a;
  14888. const {
  14889. fixed,
  14890. zIndex,
  14891. border
  14892. } = props;
  14893. return createVNode("div", {
  14894. "ref": root,
  14895. "role": "tablist",
  14896. "style": getZIndexStyle(zIndex),
  14897. "class": [bem89({
  14898. fixed
  14899. }), {
  14900. [BORDER_TOP_BOTTOM]: border,
  14901. "van-safe-area-bottom": enableSafeArea()
  14902. }]
  14903. }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  14904. };
  14905. const setActive = (active, afterChange) => {
  14906. callInterceptor(props.beforeChange, {
  14907. args: [active],
  14908. done() {
  14909. emit("update:modelValue", active);
  14910. emit("change", active);
  14911. afterChange();
  14912. }
  14913. });
  14914. };
  14915. linkChildren({
  14916. props,
  14917. setActive
  14918. });
  14919. return () => {
  14920. if (props.fixed && props.placeholder) {
  14921. return renderPlaceholder(renderTabbar);
  14922. }
  14923. return renderTabbar();
  14924. };
  14925. }
  14926. });
  14927. // node_modules/vant/es/tabbar/index.mjs
  14928. var Tabbar = withInstall(stdin_default97);
  14929. // node_modules/vant/es/tabbar-item/TabbarItem.mjs
  14930. var [name94, bem90] = createNamespace("tabbar-item");
  14931. var tabbarItemProps = extend({}, routeProps, {
  14932. dot: Boolean,
  14933. icon: String,
  14934. name: numericProp,
  14935. badge: numericProp,
  14936. badgeProps: Object,
  14937. iconPrefix: String
  14938. });
  14939. var stdin_default98 = defineComponent({
  14940. name: name94,
  14941. props: tabbarItemProps,
  14942. emits: ["click"],
  14943. setup(props, {
  14944. emit,
  14945. slots
  14946. }) {
  14947. const route2 = useRoute();
  14948. const vm = getCurrentInstance().proxy;
  14949. const {
  14950. parent,
  14951. index
  14952. } = useParent(TABBAR_KEY);
  14953. if (!parent) {
  14954. if (true) {
  14955. console.error("[Vant] <TabbarItem> must be a child component of <Tabbar>.");
  14956. }
  14957. return;
  14958. }
  14959. const active = computed(() => {
  14960. var _a;
  14961. const {
  14962. route: route22,
  14963. modelValue
  14964. } = parent.props;
  14965. if (route22 && "$route" in vm) {
  14966. const {
  14967. $route
  14968. } = vm;
  14969. const {
  14970. to
  14971. } = props;
  14972. const config = isObject(to) ? to : {
  14973. path: to
  14974. };
  14975. return !!$route.matched.find((val) => {
  14976. const pathMatched = "path" in config && config.path === val.path;
  14977. const nameMatched = "name" in config && config.name === val.name;
  14978. return pathMatched || nameMatched;
  14979. });
  14980. }
  14981. return ((_a = props.name) != null ? _a : index.value) === modelValue;
  14982. });
  14983. const onClick = (event) => {
  14984. var _a;
  14985. if (!active.value) {
  14986. parent.setActive((_a = props.name) != null ? _a : index.value, route2);
  14987. }
  14988. emit("click", event);
  14989. };
  14990. const renderIcon = () => {
  14991. if (slots.icon) {
  14992. return slots.icon({
  14993. active: active.value
  14994. });
  14995. }
  14996. if (props.icon) {
  14997. return createVNode(Icon, {
  14998. "name": props.icon,
  14999. "classPrefix": props.iconPrefix
  15000. }, null);
  15001. }
  15002. };
  15003. return () => {
  15004. var _a;
  15005. const {
  15006. dot,
  15007. badge
  15008. } = props;
  15009. const {
  15010. activeColor,
  15011. inactiveColor
  15012. } = parent.props;
  15013. const color = active.value ? activeColor : inactiveColor;
  15014. return createVNode("div", {
  15015. "role": "tab",
  15016. "class": bem90({
  15017. active: active.value
  15018. }),
  15019. "style": {
  15020. color
  15021. },
  15022. "tabindex": 0,
  15023. "aria-selected": active.value,
  15024. "onClick": onClick
  15025. }, [createVNode(Badge, mergeProps({
  15026. "dot": dot,
  15027. "class": bem90("icon"),
  15028. "content": badge
  15029. }, props.badgeProps), {
  15030. default: renderIcon
  15031. }), createVNode("div", {
  15032. "class": bem90("text")
  15033. }, [(_a = slots.default) == null ? void 0 : _a.call(slots, {
  15034. active: active.value
  15035. })])]);
  15036. };
  15037. }
  15038. });
  15039. // node_modules/vant/es/tabbar-item/index.mjs
  15040. var TabbarItem = withInstall(stdin_default98);
  15041. // node_modules/vant/es/tree-select/TreeSelect.mjs
  15042. var [name95, bem91] = createNamespace("tree-select");
  15043. var treeSelectProps = {
  15044. max: makeNumericProp(Infinity),
  15045. items: makeArrayProp(),
  15046. height: makeNumericProp(300),
  15047. selectedIcon: makeStringProp("success"),
  15048. mainActiveIndex: makeNumericProp(0),
  15049. activeId: {
  15050. type: [Number, String, Array],
  15051. default: 0
  15052. }
  15053. };
  15054. var stdin_default99 = defineComponent({
  15055. name: name95,
  15056. props: treeSelectProps,
  15057. emits: ["click-nav", "click-item", "update:activeId", "update:mainActiveIndex"],
  15058. setup(props, {
  15059. emit,
  15060. slots
  15061. }) {
  15062. const isActiveItem = (id) => Array.isArray(props.activeId) ? props.activeId.includes(id) : props.activeId === id;
  15063. const renderSubItem = (item) => {
  15064. const onClick = () => {
  15065. if (item.disabled) {
  15066. return;
  15067. }
  15068. let activeId;
  15069. if (Array.isArray(props.activeId)) {
  15070. activeId = props.activeId.slice();
  15071. const index = activeId.indexOf(item.id);
  15072. if (index !== -1) {
  15073. activeId.splice(index, 1);
  15074. } else if (activeId.length < props.max) {
  15075. activeId.push(item.id);
  15076. }
  15077. } else {
  15078. activeId = item.id;
  15079. }
  15080. emit("update:activeId", activeId);
  15081. emit("click-item", item);
  15082. };
  15083. return createVNode("div", {
  15084. "key": item.id,
  15085. "class": ["van-ellipsis", bem91("item", {
  15086. active: isActiveItem(item.id),
  15087. disabled: item.disabled
  15088. })],
  15089. "onClick": onClick
  15090. }, [item.text, isActiveItem(item.id) && createVNode(Icon, {
  15091. "name": props.selectedIcon,
  15092. "class": bem91("selected")
  15093. }, null)]);
  15094. };
  15095. const onSidebarChange = (index) => {
  15096. emit("update:mainActiveIndex", index);
  15097. };
  15098. const onClickSidebarItem = (index) => emit("click-nav", index);
  15099. const renderSidebar = () => {
  15100. const Items = props.items.map((item) => createVNode(SidebarItem, {
  15101. "dot": item.dot,
  15102. "title": item.text,
  15103. "badge": item.badge,
  15104. "class": [bem91("nav-item"), item.className],
  15105. "disabled": item.disabled,
  15106. "onClick": onClickSidebarItem
  15107. }, null));
  15108. return createVNode(Sidebar, {
  15109. "class": bem91("nav"),
  15110. "modelValue": props.mainActiveIndex,
  15111. "onChange": onSidebarChange
  15112. }, {
  15113. default: () => [Items]
  15114. });
  15115. };
  15116. const renderContent = () => {
  15117. if (slots.content) {
  15118. return slots.content();
  15119. }
  15120. const selected = props.items[+props.mainActiveIndex] || {};
  15121. if (selected.children) {
  15122. return selected.children.map(renderSubItem);
  15123. }
  15124. };
  15125. return () => createVNode("div", {
  15126. "class": bem91(),
  15127. "style": {
  15128. height: addUnit(props.height)
  15129. }
  15130. }, [renderSidebar(), createVNode("div", {
  15131. "class": bem91("content")
  15132. }, [renderContent()])]);
  15133. }
  15134. });
  15135. // node_modules/vant/es/tree-select/index.mjs
  15136. var TreeSelect = withInstall(stdin_default99);
  15137. // node_modules/vant/es/uploader/utils.mjs
  15138. var [name96, bem92, t20] = createNamespace("uploader");
  15139. function readFileContent(file, resultType) {
  15140. return new Promise((resolve) => {
  15141. if (resultType === "file") {
  15142. resolve();
  15143. return;
  15144. }
  15145. const reader = new FileReader();
  15146. reader.onload = (event) => {
  15147. resolve(event.target.result);
  15148. };
  15149. if (resultType === "dataUrl") {
  15150. reader.readAsDataURL(file);
  15151. } else if (resultType === "text") {
  15152. reader.readAsText(file);
  15153. }
  15154. });
  15155. }
  15156. function isOversize(items, maxSize) {
  15157. return toArray(items).some((item) => {
  15158. if (item.file) {
  15159. if (isFunction(maxSize)) {
  15160. return maxSize(item.file);
  15161. }
  15162. return item.file.size > maxSize;
  15163. }
  15164. return false;
  15165. });
  15166. }
  15167. function filterFiles(items, maxSize) {
  15168. const valid = [];
  15169. const invalid = [];
  15170. items.forEach((item) => {
  15171. if (isOversize(item, maxSize)) {
  15172. invalid.push(item);
  15173. } else {
  15174. valid.push(item);
  15175. }
  15176. });
  15177. return { valid, invalid };
  15178. }
  15179. var IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  15180. var isImageUrl = (url) => IMAGE_REGEXP.test(url);
  15181. function isImageFile(item) {
  15182. if (item.isImage) {
  15183. return true;
  15184. }
  15185. if (item.file && item.file.type) {
  15186. return item.file.type.indexOf("image") === 0;
  15187. }
  15188. if (item.url) {
  15189. return isImageUrl(item.url);
  15190. }
  15191. if (typeof item.content === "string") {
  15192. return item.content.indexOf("data:image") === 0;
  15193. }
  15194. return false;
  15195. }
  15196. // node_modules/vant/es/uploader/UploaderPreviewItem.mjs
  15197. var stdin_default100 = defineComponent({
  15198. props: {
  15199. name: numericProp,
  15200. item: makeRequiredProp(Object),
  15201. index: Number,
  15202. imageFit: String,
  15203. lazyLoad: Boolean,
  15204. deletable: Boolean,
  15205. previewSize: [Number, String, Array],
  15206. beforeDelete: Function
  15207. },
  15208. emits: ["delete", "preview"],
  15209. setup(props, {
  15210. emit,
  15211. slots
  15212. }) {
  15213. const renderMask = () => {
  15214. const {
  15215. status,
  15216. message
  15217. } = props.item;
  15218. if (status === "uploading" || status === "failed") {
  15219. const MaskIcon = status === "failed" ? createVNode(Icon, {
  15220. "name": "close",
  15221. "class": bem92("mask-icon")
  15222. }, null) : createVNode(Loading, {
  15223. "class": bem92("loading")
  15224. }, null);
  15225. const showMessage = isDef(message) && message !== "";
  15226. return createVNode("div", {
  15227. "class": bem92("mask")
  15228. }, [MaskIcon, showMessage && createVNode("div", {
  15229. "class": bem92("mask-message")
  15230. }, [message])]);
  15231. }
  15232. };
  15233. const onDelete = (event) => {
  15234. const {
  15235. name: name97,
  15236. item,
  15237. index,
  15238. beforeDelete
  15239. } = props;
  15240. event.stopPropagation();
  15241. callInterceptor(beforeDelete, {
  15242. args: [item, {
  15243. name: name97,
  15244. index
  15245. }],
  15246. done: () => emit("delete")
  15247. });
  15248. };
  15249. const onPreview = () => emit("preview");
  15250. const renderDeleteIcon = () => {
  15251. if (props.deletable && props.item.status !== "uploading") {
  15252. const slot = slots["preview-delete"];
  15253. return createVNode("div", {
  15254. "role": "button",
  15255. "class": bem92("preview-delete", {
  15256. shadow: !slot
  15257. }),
  15258. "tabindex": 0,
  15259. "aria-label": t20("delete"),
  15260. "onClick": onDelete
  15261. }, [slot ? slot() : createVNode(Icon, {
  15262. "name": "cross",
  15263. "class": bem92("preview-delete-icon")
  15264. }, null)]);
  15265. }
  15266. };
  15267. const renderCover = () => {
  15268. if (slots["preview-cover"]) {
  15269. const {
  15270. index,
  15271. item
  15272. } = props;
  15273. return createVNode("div", {
  15274. "class": bem92("preview-cover")
  15275. }, [slots["preview-cover"](extend({
  15276. index
  15277. }, item))]);
  15278. }
  15279. };
  15280. const renderPreview = () => {
  15281. const {
  15282. item,
  15283. lazyLoad,
  15284. imageFit,
  15285. previewSize
  15286. } = props;
  15287. if (isImageFile(item)) {
  15288. return createVNode(Image2, {
  15289. "fit": imageFit,
  15290. "src": item.content || item.url,
  15291. "class": bem92("preview-image"),
  15292. "width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
  15293. "height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
  15294. "lazyLoad": lazyLoad,
  15295. "onClick": onPreview
  15296. }, {
  15297. default: renderCover
  15298. });
  15299. }
  15300. return createVNode("div", {
  15301. "class": bem92("file"),
  15302. "style": getSizeStyle(props.previewSize)
  15303. }, [createVNode(Icon, {
  15304. "class": bem92("file-icon"),
  15305. "name": "description"
  15306. }, null), createVNode("div", {
  15307. "class": [bem92("file-name"), "van-ellipsis"]
  15308. }, [item.file ? item.file.name : item.url]), renderCover()]);
  15309. };
  15310. return () => createVNode("div", {
  15311. "class": bem92("preview")
  15312. }, [renderPreview(), renderMask(), renderDeleteIcon()]);
  15313. }
  15314. });
  15315. // node_modules/vant/es/uploader/Uploader.mjs
  15316. var uploaderProps = {
  15317. name: makeNumericProp(""),
  15318. accept: makeStringProp("image/*"),
  15319. capture: String,
  15320. multiple: Boolean,
  15321. disabled: Boolean,
  15322. readonly: Boolean,
  15323. lazyLoad: Boolean,
  15324. maxCount: makeNumericProp(Infinity),
  15325. imageFit: makeStringProp("cover"),
  15326. resultType: makeStringProp("dataUrl"),
  15327. uploadIcon: makeStringProp("photograph"),
  15328. uploadText: String,
  15329. deletable: truthProp,
  15330. afterRead: Function,
  15331. showUpload: truthProp,
  15332. modelValue: makeArrayProp(),
  15333. beforeRead: Function,
  15334. beforeDelete: Function,
  15335. previewSize: [Number, String, Array],
  15336. previewImage: truthProp,
  15337. previewOptions: Object,
  15338. previewFullImage: truthProp,
  15339. maxSize: {
  15340. type: [Number, String, Function],
  15341. default: Infinity
  15342. }
  15343. };
  15344. var stdin_default101 = defineComponent({
  15345. name: name96,
  15346. props: uploaderProps,
  15347. emits: ["delete", "oversize", "click-upload", "close-preview", "click-preview", "update:modelValue"],
  15348. setup(props, {
  15349. emit,
  15350. slots
  15351. }) {
  15352. const inputRef = ref();
  15353. const urls = [];
  15354. const getDetail = (index = props.modelValue.length) => ({
  15355. name: props.name,
  15356. index
  15357. });
  15358. const resetInput = () => {
  15359. if (inputRef.value) {
  15360. inputRef.value.value = "";
  15361. }
  15362. };
  15363. const onAfterRead = (items) => {
  15364. resetInput();
  15365. if (isOversize(items, props.maxSize)) {
  15366. if (Array.isArray(items)) {
  15367. const result = filterFiles(items, props.maxSize);
  15368. items = result.valid;
  15369. emit("oversize", result.invalid, getDetail());
  15370. if (!items.length) {
  15371. return;
  15372. }
  15373. } else {
  15374. emit("oversize", items, getDetail());
  15375. return;
  15376. }
  15377. }
  15378. items = reactive(items);
  15379. emit("update:modelValue", [...props.modelValue, ...toArray(items)]);
  15380. if (props.afterRead) {
  15381. props.afterRead(items, getDetail());
  15382. }
  15383. };
  15384. const readFile = (files) => {
  15385. const {
  15386. maxCount,
  15387. modelValue,
  15388. resultType
  15389. } = props;
  15390. if (Array.isArray(files)) {
  15391. const remainCount = +maxCount - modelValue.length;
  15392. if (files.length > remainCount) {
  15393. files = files.slice(0, remainCount);
  15394. }
  15395. Promise.all(files.map((file) => readFileContent(file, resultType))).then((contents) => {
  15396. const fileList = files.map((file, index) => {
  15397. const result = {
  15398. file,
  15399. status: "",
  15400. message: ""
  15401. };
  15402. if (contents[index]) {
  15403. result.content = contents[index];
  15404. }
  15405. return result;
  15406. });
  15407. onAfterRead(fileList);
  15408. });
  15409. } else {
  15410. readFileContent(files, resultType).then((content) => {
  15411. const result = {
  15412. file: files,
  15413. status: "",
  15414. message: ""
  15415. };
  15416. if (content) {
  15417. result.content = content;
  15418. }
  15419. onAfterRead(result);
  15420. });
  15421. }
  15422. };
  15423. const onChange = (event) => {
  15424. const {
  15425. files
  15426. } = event.target;
  15427. if (props.disabled || !files || !files.length) {
  15428. return;
  15429. }
  15430. const file = files.length === 1 ? files[0] : [].slice.call(files);
  15431. if (props.beforeRead) {
  15432. const response = props.beforeRead(file, getDetail());
  15433. if (!response) {
  15434. resetInput();
  15435. return;
  15436. }
  15437. if (isPromise(response)) {
  15438. response.then((data) => {
  15439. if (data) {
  15440. readFile(data);
  15441. } else {
  15442. readFile(file);
  15443. }
  15444. }).catch(resetInput);
  15445. return;
  15446. }
  15447. }
  15448. readFile(file);
  15449. };
  15450. let imagePreview;
  15451. const onClosePreview = () => emit("close-preview");
  15452. const previewImage = (item) => {
  15453. if (props.previewFullImage) {
  15454. const imageFiles = props.modelValue.filter(isImageFile);
  15455. const images = imageFiles.map((item2) => {
  15456. if (item2.file && !item2.url && item2.status !== "failed") {
  15457. item2.url = URL.createObjectURL(item2.file);
  15458. urls.push(item2.url);
  15459. }
  15460. return item2.url;
  15461. }).filter(Boolean);
  15462. imagePreview = ImagePreview(extend({
  15463. images,
  15464. startPosition: imageFiles.indexOf(item),
  15465. onClose: onClosePreview
  15466. }, props.previewOptions));
  15467. }
  15468. };
  15469. const closeImagePreview = () => {
  15470. if (imagePreview) {
  15471. imagePreview.close();
  15472. }
  15473. };
  15474. const deleteFile = (item, index) => {
  15475. const fileList = props.modelValue.slice(0);
  15476. fileList.splice(index, 1);
  15477. emit("update:modelValue", fileList);
  15478. emit("delete", item, getDetail(index));
  15479. };
  15480. const renderPreviewItem = (item, index) => {
  15481. const needPickData = ["imageFit", "deletable", "previewSize", "beforeDelete"];
  15482. const previewData = extend(pick(props, needPickData), pick(item, needPickData, true));
  15483. return createVNode(stdin_default100, mergeProps({
  15484. "item": item,
  15485. "index": index,
  15486. "onClick": () => emit("click-preview", item, getDetail(index)),
  15487. "onDelete": () => deleteFile(item, index),
  15488. "onPreview": () => previewImage(item)
  15489. }, pick(props, ["name", "lazyLoad"]), previewData), pick(slots, ["preview-cover", "preview-delete"]));
  15490. };
  15491. const renderPreviewList = () => {
  15492. if (props.previewImage) {
  15493. return props.modelValue.map(renderPreviewItem);
  15494. }
  15495. };
  15496. const onClickUpload = (event) => emit("click-upload", event);
  15497. const renderUpload = () => {
  15498. if (props.modelValue.length >= props.maxCount || !props.showUpload) {
  15499. return;
  15500. }
  15501. const Input = props.readonly ? null : createVNode("input", {
  15502. "ref": inputRef,
  15503. "type": "file",
  15504. "class": bem92("input"),
  15505. "accept": props.accept,
  15506. "capture": props.capture,
  15507. "multiple": props.multiple,
  15508. "disabled": props.disabled,
  15509. "onChange": onChange
  15510. }, null);
  15511. if (slots.default) {
  15512. return createVNode("div", {
  15513. "class": bem92("input-wrapper"),
  15514. "onClick": onClickUpload
  15515. }, [slots.default(), Input]);
  15516. }
  15517. return createVNode("div", {
  15518. "class": bem92("upload", {
  15519. readonly: props.readonly
  15520. }),
  15521. "style": getSizeStyle(props.previewSize),
  15522. "onClick": onClickUpload
  15523. }, [createVNode(Icon, {
  15524. "name": props.uploadIcon,
  15525. "class": bem92("upload-icon")
  15526. }, null), props.uploadText && createVNode("span", {
  15527. "class": bem92("upload-text")
  15528. }, [props.uploadText]), Input]);
  15529. };
  15530. const chooseFile = () => {
  15531. if (inputRef.value && !props.disabled) {
  15532. inputRef.value.click();
  15533. }
  15534. };
  15535. onBeforeUnmount(() => {
  15536. urls.forEach((url) => URL.revokeObjectURL(url));
  15537. });
  15538. useExpose({
  15539. chooseFile,
  15540. closeImagePreview
  15541. });
  15542. useCustomFieldValue(() => props.modelValue);
  15543. return () => createVNode("div", {
  15544. "class": bem92()
  15545. }, [createVNode("div", {
  15546. "class": bem92("wrapper", {
  15547. disabled: props.disabled
  15548. })
  15549. }, [renderPreviewList(), renderUpload()])]);
  15550. }
  15551. });
  15552. // node_modules/vant/es/uploader/index.mjs
  15553. var Uploader = withInstall(stdin_default101);
  15554. // node_modules/vant/es/lazyload/vue-lazyload/util.mjs
  15555. var hasIntersectionObserver = inBrowser2 && "IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype;
  15556. var modeType = {
  15557. event: "event",
  15558. observer: "observer"
  15559. };
  15560. function remove(arr, item) {
  15561. if (!arr.length)
  15562. return;
  15563. const index = arr.indexOf(item);
  15564. if (index > -1)
  15565. return arr.splice(index, 1);
  15566. }
  15567. function getBestSelectionFromSrcset(el, scale) {
  15568. if (el.tagName !== "IMG" || !el.getAttribute("data-srcset"))
  15569. return;
  15570. let options = el.getAttribute("data-srcset");
  15571. const container = el.parentNode;
  15572. const containerWidth = container.offsetWidth * scale;
  15573. let spaceIndex;
  15574. let tmpSrc;
  15575. let tmpWidth;
  15576. options = options.trim().split(",");
  15577. const result = options.map((item) => {
  15578. item = item.trim();
  15579. spaceIndex = item.lastIndexOf(" ");
  15580. if (spaceIndex === -1) {
  15581. tmpSrc = item;
  15582. tmpWidth = 999998;
  15583. } else {
  15584. tmpSrc = item.substr(0, spaceIndex);
  15585. tmpWidth = parseInt(item.substr(spaceIndex + 1, item.length - spaceIndex - 2), 10);
  15586. }
  15587. return [tmpWidth, tmpSrc];
  15588. });
  15589. result.sort((a, b) => {
  15590. if (a[0] < b[0]) {
  15591. return 1;
  15592. }
  15593. if (a[0] > b[0]) {
  15594. return -1;
  15595. }
  15596. if (a[0] === b[0]) {
  15597. if (b[1].indexOf(".webp", b[1].length - 5) !== -1) {
  15598. return 1;
  15599. }
  15600. if (a[1].indexOf(".webp", a[1].length - 5) !== -1) {
  15601. return -1;
  15602. }
  15603. }
  15604. return 0;
  15605. });
  15606. let bestSelectedSrc = "";
  15607. let tmpOption;
  15608. for (let i = 0; i < result.length; i++) {
  15609. tmpOption = result[i];
  15610. bestSelectedSrc = tmpOption[1];
  15611. const next = result[i + 1];
  15612. if (next && next[0] < containerWidth) {
  15613. bestSelectedSrc = tmpOption[1];
  15614. break;
  15615. } else if (!next) {
  15616. bestSelectedSrc = tmpOption[1];
  15617. break;
  15618. }
  15619. }
  15620. return bestSelectedSrc;
  15621. }
  15622. var getDPR = (scale = 1) => inBrowser2 ? window.devicePixelRatio || scale : scale;
  15623. function supportWebp() {
  15624. if (!inBrowser2)
  15625. return false;
  15626. let support = true;
  15627. try {
  15628. const elem = document.createElement("canvas");
  15629. if (elem.getContext && elem.getContext("2d")) {
  15630. support = elem.toDataURL("image/webp").indexOf("data:image/webp") === 0;
  15631. }
  15632. } catch (err) {
  15633. support = false;
  15634. }
  15635. return support;
  15636. }
  15637. function throttle(action, delay) {
  15638. let timeout = null;
  15639. let lastRun = 0;
  15640. return function(...args) {
  15641. if (timeout) {
  15642. return;
  15643. }
  15644. const elapsed = Date.now() - lastRun;
  15645. const runCallback = () => {
  15646. lastRun = Date.now();
  15647. timeout = false;
  15648. action.apply(this, args);
  15649. };
  15650. if (elapsed >= delay) {
  15651. runCallback();
  15652. } else {
  15653. timeout = setTimeout(runCallback, delay);
  15654. }
  15655. };
  15656. }
  15657. function on(el, type, func) {
  15658. el.addEventListener(type, func, {
  15659. capture: false,
  15660. passive: true
  15661. });
  15662. }
  15663. function off(el, type, func) {
  15664. el.removeEventListener(type, func, false);
  15665. }
  15666. var loadImageAsync = (item, resolve, reject) => {
  15667. const image = new Image();
  15668. if (!item || !item.src) {
  15669. return reject(new Error("image src is required"));
  15670. }
  15671. image.src = item.src;
  15672. if (item.cors) {
  15673. image.crossOrigin = item.cors;
  15674. }
  15675. image.onload = () => resolve({
  15676. naturalHeight: image.naturalHeight,
  15677. naturalWidth: image.naturalWidth,
  15678. src: image.src
  15679. });
  15680. image.onerror = (e) => reject(e);
  15681. };
  15682. var ImageCache = class {
  15683. constructor({ max }) {
  15684. this.options = {
  15685. max: max || 100
  15686. };
  15687. this.caches = [];
  15688. }
  15689. has(key) {
  15690. return this.caches.indexOf(key) > -1;
  15691. }
  15692. add(key) {
  15693. if (this.has(key))
  15694. return;
  15695. this.caches.push(key);
  15696. if (this.caches.length > this.options.max) {
  15697. this.free();
  15698. }
  15699. }
  15700. free() {
  15701. this.caches.shift();
  15702. }
  15703. };
  15704. // node_modules/vant/es/lazyload/vue-lazyload/listener.mjs
  15705. var ReactiveListener = class {
  15706. constructor({
  15707. el,
  15708. src,
  15709. error,
  15710. loading,
  15711. bindType,
  15712. $parent,
  15713. options,
  15714. cors,
  15715. elRenderer,
  15716. imageCache
  15717. }) {
  15718. this.el = el;
  15719. this.src = src;
  15720. this.error = error;
  15721. this.loading = loading;
  15722. this.bindType = bindType;
  15723. this.attempt = 0;
  15724. this.cors = cors;
  15725. this.naturalHeight = 0;
  15726. this.naturalWidth = 0;
  15727. this.options = options;
  15728. this.$parent = $parent;
  15729. this.elRenderer = elRenderer;
  15730. this.imageCache = imageCache;
  15731. this.performanceData = {
  15732. loadStart: 0,
  15733. loadEnd: 0
  15734. };
  15735. this.filter();
  15736. this.initState();
  15737. this.render("loading", false);
  15738. }
  15739. initState() {
  15740. if ("dataset" in this.el) {
  15741. this.el.dataset.src = this.src;
  15742. } else {
  15743. this.el.setAttribute("data-src", this.src);
  15744. }
  15745. this.state = {
  15746. loading: false,
  15747. error: false,
  15748. loaded: false,
  15749. rendered: false
  15750. };
  15751. }
  15752. record(event) {
  15753. this.performanceData[event] = Date.now();
  15754. }
  15755. update({ src, loading, error }) {
  15756. const oldSrc = this.src;
  15757. this.src = src;
  15758. this.loading = loading;
  15759. this.error = error;
  15760. this.filter();
  15761. if (oldSrc !== this.src) {
  15762. this.attempt = 0;
  15763. this.initState();
  15764. }
  15765. }
  15766. checkInView() {
  15767. const rect = useRect(this.el);
  15768. return rect.top < window.innerHeight * this.options.preLoad && rect.bottom > this.options.preLoadTop && rect.left < window.innerWidth * this.options.preLoad && rect.right > 0;
  15769. }
  15770. filter() {
  15771. Object.keys(this.options.filter).forEach((key) => {
  15772. this.options.filter[key](this, this.options);
  15773. });
  15774. }
  15775. renderLoading(cb) {
  15776. this.state.loading = true;
  15777. loadImageAsync({
  15778. src: this.loading,
  15779. cors: this.cors
  15780. }, () => {
  15781. this.render("loading", false);
  15782. this.state.loading = false;
  15783. cb();
  15784. }, () => {
  15785. cb();
  15786. this.state.loading = false;
  15787. if (!this.options.silent)
  15788. console.warn(`[@vant/lazyload] load failed with loading image(${this.loading})`);
  15789. });
  15790. }
  15791. load(onFinish = noop) {
  15792. if (this.attempt > this.options.attempt - 1 && this.state.error) {
  15793. if (!this.options.silent) {
  15794. console.log(`[@vant/lazyload] ${this.src} tried too more than ${this.options.attempt} times`);
  15795. }
  15796. onFinish();
  15797. return;
  15798. }
  15799. if (this.state.rendered && this.state.loaded)
  15800. return;
  15801. if (this.imageCache.has(this.src)) {
  15802. this.state.loaded = true;
  15803. this.render("loaded", true);
  15804. this.state.rendered = true;
  15805. return onFinish();
  15806. }
  15807. this.renderLoading(() => {
  15808. var _a, _b;
  15809. this.attempt++;
  15810. (_b = (_a = this.options.adapter).beforeLoad) == null ? void 0 : _b.call(_a, this, this.options);
  15811. this.record("loadStart");
  15812. loadImageAsync({
  15813. src: this.src,
  15814. cors: this.cors
  15815. }, (data) => {
  15816. this.naturalHeight = data.naturalHeight;
  15817. this.naturalWidth = data.naturalWidth;
  15818. this.state.loaded = true;
  15819. this.state.error = false;
  15820. this.record("loadEnd");
  15821. this.render("loaded", false);
  15822. this.state.rendered = true;
  15823. this.imageCache.add(this.src);
  15824. onFinish();
  15825. }, (err) => {
  15826. !this.options.silent && console.error(err);
  15827. this.state.error = true;
  15828. this.state.loaded = false;
  15829. this.render("error", false);
  15830. });
  15831. });
  15832. }
  15833. render(state, cache) {
  15834. this.elRenderer(this, state, cache);
  15835. }
  15836. performance() {
  15837. let state = "loading";
  15838. let time = 0;
  15839. if (this.state.loaded) {
  15840. state = "loaded";
  15841. time = (this.performanceData.loadEnd - this.performanceData.loadStart) / 1e3;
  15842. }
  15843. if (this.state.error)
  15844. state = "error";
  15845. return {
  15846. src: this.src,
  15847. state,
  15848. time
  15849. };
  15850. }
  15851. $destroy() {
  15852. this.el = null;
  15853. this.src = null;
  15854. this.error = null;
  15855. this.loading = null;
  15856. this.bindType = null;
  15857. this.attempt = 0;
  15858. }
  15859. };
  15860. // node_modules/vant/es/lazyload/vue-lazyload/lazy.mjs
  15861. var DEFAULT_URL = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
  15862. var DEFAULT_EVENTS = [
  15863. "scroll",
  15864. "wheel",
  15865. "mousewheel",
  15866. "resize",
  15867. "animationend",
  15868. "transitionend",
  15869. "touchmove"
  15870. ];
  15871. var DEFAULT_OBSERVER_OPTIONS = {
  15872. rootMargin: "0px",
  15873. threshold: 0
  15874. };
  15875. function stdin_default102() {
  15876. return class Lazy {
  15877. constructor({
  15878. preLoad,
  15879. error,
  15880. throttleWait,
  15881. preLoadTop,
  15882. dispatchEvent,
  15883. loading,
  15884. attempt,
  15885. silent = true,
  15886. scale,
  15887. listenEvents,
  15888. filter,
  15889. adapter,
  15890. observer,
  15891. observerOptions
  15892. }) {
  15893. this.mode = modeType.event;
  15894. this.listeners = [];
  15895. this.targetIndex = 0;
  15896. this.targets = [];
  15897. this.options = {
  15898. silent,
  15899. dispatchEvent: !!dispatchEvent,
  15900. throttleWait: throttleWait || 200,
  15901. preLoad: preLoad || 1.3,
  15902. preLoadTop: preLoadTop || 0,
  15903. error: error || DEFAULT_URL,
  15904. loading: loading || DEFAULT_URL,
  15905. attempt: attempt || 3,
  15906. scale: scale || getDPR(scale),
  15907. ListenEvents: listenEvents || DEFAULT_EVENTS,
  15908. supportWebp: supportWebp(),
  15909. filter: filter || {},
  15910. adapter: adapter || {},
  15911. observer: !!observer,
  15912. observerOptions: observerOptions || DEFAULT_OBSERVER_OPTIONS
  15913. };
  15914. this.initEvent();
  15915. this.imageCache = new ImageCache({ max: 200 });
  15916. this.lazyLoadHandler = throttle(this.lazyLoadHandler.bind(this), this.options.throttleWait);
  15917. this.setMode(this.options.observer ? modeType.observer : modeType.event);
  15918. }
  15919. config(options = {}) {
  15920. Object.assign(this.options, options);
  15921. }
  15922. performance() {
  15923. return this.listeners.map((item) => item.performance());
  15924. }
  15925. addLazyBox(vm) {
  15926. this.listeners.push(vm);
  15927. if (inBrowser2) {
  15928. this.addListenerTarget(window);
  15929. this.observer && this.observer.observe(vm.el);
  15930. if (vm.$el && vm.$el.parentNode) {
  15931. this.addListenerTarget(vm.$el.parentNode);
  15932. }
  15933. }
  15934. }
  15935. add(el, binding, vnode) {
  15936. if (this.listeners.some((item) => item.el === el)) {
  15937. this.update(el, binding);
  15938. return nextTick(this.lazyLoadHandler);
  15939. }
  15940. const value = this.valueFormatter(binding.value);
  15941. let { src } = value;
  15942. nextTick(() => {
  15943. src = getBestSelectionFromSrcset(el, this.options.scale) || src;
  15944. this.observer && this.observer.observe(el);
  15945. const container = Object.keys(binding.modifiers)[0];
  15946. let $parent;
  15947. if (container) {
  15948. $parent = vnode.context.$refs[container];
  15949. $parent = $parent ? $parent.$el || $parent : document.getElementById(container);
  15950. }
  15951. if (!$parent) {
  15952. $parent = getScrollParent(el);
  15953. }
  15954. const newListener = new ReactiveListener({
  15955. bindType: binding.arg,
  15956. $parent,
  15957. el,
  15958. src,
  15959. loading: value.loading,
  15960. error: value.error,
  15961. cors: value.cors,
  15962. elRenderer: this.elRenderer.bind(this),
  15963. options: this.options,
  15964. imageCache: this.imageCache
  15965. });
  15966. this.listeners.push(newListener);
  15967. if (inBrowser2) {
  15968. this.addListenerTarget(window);
  15969. this.addListenerTarget($parent);
  15970. }
  15971. this.lazyLoadHandler();
  15972. nextTick(() => this.lazyLoadHandler());
  15973. });
  15974. }
  15975. update(el, binding, vnode) {
  15976. const value = this.valueFormatter(binding.value);
  15977. let { src } = value;
  15978. src = getBestSelectionFromSrcset(el, this.options.scale) || src;
  15979. const exist = this.listeners.find((item) => item.el === el);
  15980. if (!exist) {
  15981. this.add(el, binding, vnode);
  15982. } else {
  15983. exist.update({
  15984. src,
  15985. error: value.error,
  15986. loading: value.loading
  15987. });
  15988. }
  15989. if (this.observer) {
  15990. this.observer.unobserve(el);
  15991. this.observer.observe(el);
  15992. }
  15993. this.lazyLoadHandler();
  15994. nextTick(() => this.lazyLoadHandler());
  15995. }
  15996. remove(el) {
  15997. if (!el)
  15998. return;
  15999. this.observer && this.observer.unobserve(el);
  16000. const existItem = this.listeners.find((item) => item.el === el);
  16001. if (existItem) {
  16002. this.removeListenerTarget(existItem.$parent);
  16003. this.removeListenerTarget(window);
  16004. remove(this.listeners, existItem);
  16005. existItem.$destroy();
  16006. }
  16007. }
  16008. removeComponent(vm) {
  16009. if (!vm)
  16010. return;
  16011. remove(this.listeners, vm);
  16012. this.observer && this.observer.unobserve(vm.el);
  16013. if (vm.$parent && vm.$el.parentNode) {
  16014. this.removeListenerTarget(vm.$el.parentNode);
  16015. }
  16016. this.removeListenerTarget(window);
  16017. }
  16018. setMode(mode) {
  16019. if (!hasIntersectionObserver && mode === modeType.observer) {
  16020. mode = modeType.event;
  16021. }
  16022. this.mode = mode;
  16023. if (mode === modeType.event) {
  16024. if (this.observer) {
  16025. this.listeners.forEach((listener) => {
  16026. this.observer.unobserve(listener.el);
  16027. });
  16028. this.observer = null;
  16029. }
  16030. this.targets.forEach((target) => {
  16031. this.initListen(target.el, true);
  16032. });
  16033. } else {
  16034. this.targets.forEach((target) => {
  16035. this.initListen(target.el, false);
  16036. });
  16037. this.initIntersectionObserver();
  16038. }
  16039. }
  16040. addListenerTarget(el) {
  16041. if (!el)
  16042. return;
  16043. let target = this.targets.find((target2) => target2.el === el);
  16044. if (!target) {
  16045. target = {
  16046. el,
  16047. id: ++this.targetIndex,
  16048. childrenCount: 1,
  16049. listened: true
  16050. };
  16051. this.mode === modeType.event && this.initListen(target.el, true);
  16052. this.targets.push(target);
  16053. } else {
  16054. target.childrenCount++;
  16055. }
  16056. return this.targetIndex;
  16057. }
  16058. removeListenerTarget(el) {
  16059. this.targets.forEach((target, index) => {
  16060. if (target.el === el) {
  16061. target.childrenCount--;
  16062. if (!target.childrenCount) {
  16063. this.initListen(target.el, false);
  16064. this.targets.splice(index, 1);
  16065. target = null;
  16066. }
  16067. }
  16068. });
  16069. }
  16070. initListen(el, start2) {
  16071. this.options.ListenEvents.forEach((evt) => (start2 ? on : off)(el, evt, this.lazyLoadHandler));
  16072. }
  16073. initEvent() {
  16074. this.Event = {
  16075. listeners: {
  16076. loading: [],
  16077. loaded: [],
  16078. error: []
  16079. }
  16080. };
  16081. this.$on = (event, func) => {
  16082. if (!this.Event.listeners[event])
  16083. this.Event.listeners[event] = [];
  16084. this.Event.listeners[event].push(func);
  16085. };
  16086. this.$once = (event, func) => {
  16087. const on2 = (...args) => {
  16088. this.$off(event, on2);
  16089. func.apply(this, args);
  16090. };
  16091. this.$on(event, on2);
  16092. };
  16093. this.$off = (event, func) => {
  16094. if (!func) {
  16095. if (!this.Event.listeners[event])
  16096. return;
  16097. this.Event.listeners[event].length = 0;
  16098. return;
  16099. }
  16100. remove(this.Event.listeners[event], func);
  16101. };
  16102. this.$emit = (event, context, inCache) => {
  16103. if (!this.Event.listeners[event])
  16104. return;
  16105. this.Event.listeners[event].forEach((func) => func(context, inCache));
  16106. };
  16107. }
  16108. lazyLoadHandler() {
  16109. const freeList = [];
  16110. this.listeners.forEach((listener) => {
  16111. if (!listener.el || !listener.el.parentNode) {
  16112. freeList.push(listener);
  16113. }
  16114. const catIn = listener.checkInView();
  16115. if (!catIn)
  16116. return;
  16117. listener.load();
  16118. });
  16119. freeList.forEach((item) => {
  16120. remove(this.listeners, item);
  16121. item.$destroy();
  16122. });
  16123. }
  16124. initIntersectionObserver() {
  16125. if (!hasIntersectionObserver) {
  16126. return;
  16127. }
  16128. this.observer = new IntersectionObserver(this.observerHandler.bind(this), this.options.observerOptions);
  16129. if (this.listeners.length) {
  16130. this.listeners.forEach((listener) => {
  16131. this.observer.observe(listener.el);
  16132. });
  16133. }
  16134. }
  16135. observerHandler(entries) {
  16136. entries.forEach((entry) => {
  16137. if (entry.isIntersecting) {
  16138. this.listeners.forEach((listener) => {
  16139. if (listener.el === entry.target) {
  16140. if (listener.state.loaded)
  16141. return this.observer.unobserve(listener.el);
  16142. listener.load();
  16143. }
  16144. });
  16145. }
  16146. });
  16147. }
  16148. elRenderer(listener, state, cache) {
  16149. if (!listener.el)
  16150. return;
  16151. const { el, bindType } = listener;
  16152. let src;
  16153. switch (state) {
  16154. case "loading":
  16155. src = listener.loading;
  16156. break;
  16157. case "error":
  16158. src = listener.error;
  16159. break;
  16160. default:
  16161. ({ src } = listener);
  16162. break;
  16163. }
  16164. if (bindType) {
  16165. el.style[bindType] = 'url("' + src + '")';
  16166. } else if (el.getAttribute("src") !== src) {
  16167. el.setAttribute("src", src);
  16168. }
  16169. el.setAttribute("lazy", state);
  16170. this.$emit(state, listener, cache);
  16171. this.options.adapter[state] && this.options.adapter[state](listener, this.options);
  16172. if (this.options.dispatchEvent) {
  16173. const event = new CustomEvent(state, {
  16174. detail: listener
  16175. });
  16176. el.dispatchEvent(event);
  16177. }
  16178. }
  16179. valueFormatter(value) {
  16180. let src = value;
  16181. let { loading, error } = this.options;
  16182. if (isObject(value)) {
  16183. if (!value.src && !this.options.silent) {
  16184. console.error("[@vant/lazyload] miss src with " + value);
  16185. }
  16186. ({ src } = value);
  16187. loading = value.loading || this.options.loading;
  16188. error = value.error || this.options.error;
  16189. }
  16190. return {
  16191. src,
  16192. loading,
  16193. error
  16194. };
  16195. }
  16196. };
  16197. }
  16198. // node_modules/vant/es/lazyload/vue-lazyload/lazy-component.mjs
  16199. var stdin_default103 = (lazy) => ({
  16200. props: {
  16201. tag: {
  16202. type: String,
  16203. default: "div"
  16204. }
  16205. },
  16206. emits: ["show"],
  16207. render() {
  16208. return h(this.tag, this.show && this.$slots.default ? this.$slots.default() : null);
  16209. },
  16210. data() {
  16211. return {
  16212. el: null,
  16213. state: {
  16214. loaded: false
  16215. },
  16216. show: false
  16217. };
  16218. },
  16219. mounted() {
  16220. this.el = this.$el;
  16221. lazy.addLazyBox(this);
  16222. lazy.lazyLoadHandler();
  16223. },
  16224. beforeUnmount() {
  16225. lazy.removeComponent(this);
  16226. },
  16227. methods: {
  16228. checkInView() {
  16229. const rect = useRect(this.$el);
  16230. return inBrowser2 && rect.top < window.innerHeight * lazy.options.preLoad && rect.bottom > 0 && rect.left < window.innerWidth * lazy.options.preLoad && rect.right > 0;
  16231. },
  16232. load() {
  16233. this.show = true;
  16234. this.state.loaded = true;
  16235. this.$emit("show", this);
  16236. },
  16237. destroy() {
  16238. return this.$destroy;
  16239. }
  16240. }
  16241. });
  16242. // node_modules/vant/es/lazyload/vue-lazyload/lazy-container.mjs
  16243. var defaultOptions2 = {
  16244. selector: "img"
  16245. };
  16246. var LazyContainer = class {
  16247. constructor({ el, binding, vnode, lazy }) {
  16248. this.el = null;
  16249. this.vnode = vnode;
  16250. this.binding = binding;
  16251. this.options = {};
  16252. this.lazy = lazy;
  16253. this.queue = [];
  16254. this.update({ el, binding });
  16255. }
  16256. update({ el, binding }) {
  16257. this.el = el;
  16258. this.options = Object.assign({}, defaultOptions2, binding.value);
  16259. const imgs = this.getImgs();
  16260. imgs.forEach((el2) => {
  16261. this.lazy.add(el2, Object.assign({}, this.binding, {
  16262. value: {
  16263. src: "dataset" in el2 ? el2.dataset.src : el2.getAttribute("data-src"),
  16264. error: ("dataset" in el2 ? el2.dataset.error : el2.getAttribute("data-error")) || this.options.error,
  16265. loading: ("dataset" in el2 ? el2.dataset.loading : el2.getAttribute("data-loading")) || this.options.loading
  16266. }
  16267. }), this.vnode);
  16268. });
  16269. }
  16270. getImgs() {
  16271. return Array.from(this.el.querySelectorAll(this.options.selector));
  16272. }
  16273. clear() {
  16274. const imgs = this.getImgs();
  16275. imgs.forEach((el) => this.lazy.remove(el));
  16276. this.vnode = null;
  16277. this.binding = null;
  16278. this.lazy = null;
  16279. }
  16280. };
  16281. var LazyContainerManager = class {
  16282. constructor({ lazy }) {
  16283. this.lazy = lazy;
  16284. this.queue = [];
  16285. }
  16286. bind(el, binding, vnode) {
  16287. const container = new LazyContainer({
  16288. el,
  16289. binding,
  16290. vnode,
  16291. lazy: this.lazy
  16292. });
  16293. this.queue.push(container);
  16294. }
  16295. update(el, binding, vnode) {
  16296. const container = this.queue.find((item) => item.el === el);
  16297. if (!container)
  16298. return;
  16299. container.update({ el, binding, vnode });
  16300. }
  16301. unbind(el) {
  16302. const container = this.queue.find((item) => item.el === el);
  16303. if (!container)
  16304. return;
  16305. container.clear();
  16306. remove(this.queue, container);
  16307. }
  16308. };
  16309. // node_modules/vant/es/lazyload/vue-lazyload/lazy-image.mjs
  16310. var stdin_default104 = (lazyManager) => ({
  16311. props: {
  16312. src: [String, Object],
  16313. tag: {
  16314. type: String,
  16315. default: "img"
  16316. }
  16317. },
  16318. render(h2) {
  16319. return h2(this.tag, {
  16320. attrs: {
  16321. src: this.renderSrc
  16322. }
  16323. }, this.$slots.default);
  16324. },
  16325. data() {
  16326. return {
  16327. el: null,
  16328. options: {
  16329. src: "",
  16330. error: "",
  16331. loading: "",
  16332. attempt: lazyManager.options.attempt
  16333. },
  16334. state: {
  16335. loaded: false,
  16336. error: false,
  16337. attempt: 0
  16338. },
  16339. renderSrc: ""
  16340. };
  16341. },
  16342. watch: {
  16343. src() {
  16344. this.init();
  16345. lazyManager.addLazyBox(this);
  16346. lazyManager.lazyLoadHandler();
  16347. }
  16348. },
  16349. created() {
  16350. this.init();
  16351. this.renderSrc = this.options.loading;
  16352. },
  16353. mounted() {
  16354. this.el = this.$el;
  16355. lazyManager.addLazyBox(this);
  16356. lazyManager.lazyLoadHandler();
  16357. },
  16358. beforeUnmount() {
  16359. lazyManager.removeComponent(this);
  16360. },
  16361. methods: {
  16362. init() {
  16363. const { src, loading, error } = lazyManager.valueFormatter(this.src);
  16364. this.state.loaded = false;
  16365. this.options.src = src;
  16366. this.options.error = error;
  16367. this.options.loading = loading;
  16368. this.renderSrc = this.options.loading;
  16369. },
  16370. checkInView() {
  16371. const rect = useRect(this.$el);
  16372. return rect.top < window.innerHeight * lazyManager.options.preLoad && rect.bottom > 0 && rect.left < window.innerWidth * lazyManager.options.preLoad && rect.right > 0;
  16373. },
  16374. load(onFinish = noop) {
  16375. if (this.state.attempt > this.options.attempt - 1 && this.state.error) {
  16376. if (!lazyManager.options.silent) {
  16377. console.log(`[@vant/lazyload] ${this.options.src} tried too more than ${this.options.attempt} times`);
  16378. }
  16379. onFinish();
  16380. return;
  16381. }
  16382. const { src } = this.options;
  16383. loadImageAsync({ src }, ({ src: src2 }) => {
  16384. this.renderSrc = src2;
  16385. this.state.loaded = true;
  16386. }, () => {
  16387. this.state.attempt++;
  16388. this.renderSrc = this.options.error;
  16389. this.state.error = true;
  16390. });
  16391. }
  16392. }
  16393. });
  16394. // node_modules/vant/es/lazyload/vue-lazyload/index.mjs
  16395. var Lazyload = {
  16396. install(app, options = {}) {
  16397. const LazyClass = stdin_default102();
  16398. const lazy = new LazyClass(options);
  16399. const lazyContainer = new LazyContainerManager({ lazy });
  16400. app.config.globalProperties.$Lazyload = lazy;
  16401. if (options.lazyComponent) {
  16402. app.component("LazyComponent", stdin_default103(lazy));
  16403. }
  16404. if (options.lazyImage) {
  16405. app.component("LazyImage", stdin_default104(lazy));
  16406. }
  16407. app.directive("lazy", {
  16408. beforeMount: lazy.add.bind(lazy),
  16409. updated: lazy.update.bind(lazy),
  16410. unmounted: lazy.remove.bind(lazy)
  16411. });
  16412. app.directive("lazy-container", {
  16413. beforeMount: lazyContainer.bind.bind(lazyContainer),
  16414. updated: lazyContainer.update.bind(lazyContainer),
  16415. unmounted: lazyContainer.unbind.bind(lazyContainer)
  16416. });
  16417. }
  16418. };
  16419. // node_modules/vant/es/index.mjs
  16420. var version = "3.6.4";
  16421. function install(app) {
  16422. const components = [
  16423. ActionBar,
  16424. ActionBarButton,
  16425. ActionBarIcon,
  16426. ActionSheet,
  16427. AddressEdit,
  16428. AddressList,
  16429. Area,
  16430. Badge,
  16431. Button,
  16432. Calendar,
  16433. Card,
  16434. Cascader,
  16435. Cell,
  16436. CellGroup,
  16437. Checkbox,
  16438. CheckboxGroup,
  16439. Circle,
  16440. Col,
  16441. Collapse,
  16442. CollapseItem,
  16443. ConfigProvider,
  16444. ContactCard,
  16445. ContactEdit,
  16446. ContactList,
  16447. CountDown,
  16448. Coupon,
  16449. CouponCell,
  16450. CouponList,
  16451. DatetimePicker,
  16452. Dialog,
  16453. Divider,
  16454. DropdownItem,
  16455. DropdownMenu,
  16456. Empty,
  16457. Field,
  16458. Form,
  16459. Grid,
  16460. GridItem,
  16461. Icon,
  16462. Image2,
  16463. ImagePreview,
  16464. IndexAnchor,
  16465. IndexBar,
  16466. List,
  16467. Loading,
  16468. Locale,
  16469. NavBar,
  16470. NoticeBar,
  16471. Notify,
  16472. NumberKeyboard,
  16473. Overlay,
  16474. Pagination,
  16475. PasswordInput,
  16476. Picker,
  16477. Popover,
  16478. Popup,
  16479. Progress,
  16480. PullRefresh,
  16481. Radio,
  16482. RadioGroup,
  16483. Rate,
  16484. Row,
  16485. Search,
  16486. ShareSheet,
  16487. Sidebar,
  16488. SidebarItem,
  16489. Skeleton,
  16490. Slider,
  16491. Space,
  16492. Step,
  16493. Stepper,
  16494. Steps,
  16495. Sticky,
  16496. SubmitBar,
  16497. Swipe,
  16498. SwipeCell,
  16499. SwipeItem,
  16500. Switch,
  16501. Tab,
  16502. Tabbar,
  16503. TabbarItem,
  16504. Tabs,
  16505. Tag,
  16506. Toast,
  16507. TreeSelect,
  16508. Uploader
  16509. ];
  16510. components.forEach((item) => {
  16511. if (item.install) {
  16512. app.use(item);
  16513. } else if (item.name) {
  16514. app.component(item.name, item);
  16515. }
  16516. });
  16517. }
  16518. var stdin_default105 = {
  16519. install,
  16520. version
  16521. };
  16522. export {
  16523. Locale,
  16524. ActionBar,
  16525. Badge,
  16526. Icon,
  16527. Loading,
  16528. Button,
  16529. ActionBarButton,
  16530. ActionBarIcon,
  16531. Overlay,
  16532. Popup,
  16533. ActionSheet,
  16534. Picker,
  16535. Area,
  16536. Cell,
  16537. Form,
  16538. Field,
  16539. Toast,
  16540. Switch,
  16541. AddressEdit,
  16542. RadioGroup,
  16543. Tag,
  16544. Radio,
  16545. AddressList,
  16546. Calendar,
  16547. Image2 as Image,
  16548. Card,
  16549. Sticky,
  16550. Swipe,
  16551. SwipeItem,
  16552. Tab,
  16553. Tabs,
  16554. Cascader,
  16555. CellGroup,
  16556. Checkbox,
  16557. CheckboxGroup,
  16558. Circle,
  16559. Col,
  16560. Collapse,
  16561. CollapseItem,
  16562. ConfigProvider,
  16563. ContactCard,
  16564. ContactEdit,
  16565. ContactList,
  16566. CountDown,
  16567. Coupon,
  16568. CouponCell,
  16569. Empty,
  16570. CouponList,
  16571. DatetimePicker,
  16572. Dialog,
  16573. Divider,
  16574. DropdownItem,
  16575. DropdownMenu,
  16576. Grid,
  16577. GridItem,
  16578. ImagePreview,
  16579. IndexAnchor,
  16580. IndexBar,
  16581. List,
  16582. NavBar,
  16583. NoticeBar,
  16584. Notify,
  16585. NumberKeyboard,
  16586. Pagination,
  16587. PasswordInput,
  16588. Popover,
  16589. Progress,
  16590. PullRefresh,
  16591. Rate,
  16592. Row,
  16593. Search,
  16594. ShareSheet,
  16595. Sidebar,
  16596. SidebarItem,
  16597. Skeleton,
  16598. Slider,
  16599. Space,
  16600. Step,
  16601. Stepper,
  16602. Steps,
  16603. SubmitBar,
  16604. SwipeCell,
  16605. Tabbar,
  16606. TabbarItem,
  16607. TreeSelect,
  16608. Uploader,
  16609. Lazyload,
  16610. version,
  16611. install,
  16612. stdin_default105 as stdin_default
  16613. };
  16614. //# sourceMappingURL=chunk-AOLS5UT5.js.map