vendor.js 426 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638
  1. "use strict";
  2. const _export_sfc = (sfc, props2) => {
  3. const target = sfc.__vccOpts || sfc;
  4. for (const [key, val] of props2) {
  5. target[key] = val;
  6. }
  7. return target;
  8. };
  9. function makeMap(str, expectsLowerCase) {
  10. const map = /* @__PURE__ */ Object.create(null);
  11. const list = str.split(",");
  12. for (let i = 0; i < list.length; i++) {
  13. map[list[i]] = true;
  14. }
  15. return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
  16. }
  17. function normalizeStyle(value) {
  18. if (isArray$1(value)) {
  19. const res = {};
  20. for (let i = 0; i < value.length; i++) {
  21. const item = value[i];
  22. const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
  23. if (normalized) {
  24. for (const key in normalized) {
  25. res[key] = normalized[key];
  26. }
  27. }
  28. }
  29. return res;
  30. } else if (isString(value)) {
  31. return value;
  32. } else if (isObject$1(value)) {
  33. return value;
  34. }
  35. }
  36. const listDelimiterRE = /;(?![^(]*\))/g;
  37. const propertyDelimiterRE = /:([^]+)/;
  38. const styleCommentRE = /\/\*.*?\*\//gs;
  39. function parseStringStyle(cssText) {
  40. const ret = {};
  41. cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
  42. if (item) {
  43. const tmp = item.split(propertyDelimiterRE);
  44. tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
  45. }
  46. });
  47. return ret;
  48. }
  49. function normalizeClass(value) {
  50. let res = "";
  51. if (isString(value)) {
  52. res = value;
  53. } else if (isArray$1(value)) {
  54. for (let i = 0; i < value.length; i++) {
  55. const normalized = normalizeClass(value[i]);
  56. if (normalized) {
  57. res += normalized + " ";
  58. }
  59. }
  60. } else if (isObject$1(value)) {
  61. for (const name in value) {
  62. if (value[name]) {
  63. res += name + " ";
  64. }
  65. }
  66. }
  67. return res.trim();
  68. }
  69. const toDisplayString = (val) => {
  70. return isString(val) ? val : val == null ? "" : isArray$1(val) || isObject$1(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
  71. };
  72. const replacer = (_key, val) => {
  73. if (val && val.__v_isRef) {
  74. return replacer(_key, val.value);
  75. } else if (isMap(val)) {
  76. return {
  77. [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {
  78. entries[`${key} =>`] = val2;
  79. return entries;
  80. }, {})
  81. };
  82. } else if (isSet(val)) {
  83. return {
  84. [`Set(${val.size})`]: [...val.values()]
  85. };
  86. } else if (isObject$1(val) && !isArray$1(val) && !isPlainObject$2(val)) {
  87. return String(val);
  88. }
  89. return val;
  90. };
  91. const EMPTY_OBJ = Object.freeze({});
  92. const EMPTY_ARR = Object.freeze([]);
  93. const NOOP = () => {
  94. };
  95. const NO = () => false;
  96. const onRE = /^on[^a-z]/;
  97. const isOn = (key) => onRE.test(key);
  98. const isModelListener = (key) => key.startsWith("onUpdate:");
  99. const extend = Object.assign;
  100. const remove = (arr, el) => {
  101. const i = arr.indexOf(el);
  102. if (i > -1) {
  103. arr.splice(i, 1);
  104. }
  105. };
  106. const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
  107. const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
  108. const isArray$1 = Array.isArray;
  109. const isMap = (val) => toTypeString(val) === "[object Map]";
  110. const isSet = (val) => toTypeString(val) === "[object Set]";
  111. const isFunction = (val) => typeof val === "function";
  112. const isString = (val) => typeof val === "string";
  113. const isSymbol = (val) => typeof val === "symbol";
  114. const isObject$1 = (val) => val !== null && typeof val === "object";
  115. const isPromise = (val) => {
  116. return isObject$1(val) && isFunction(val.then) && isFunction(val.catch);
  117. };
  118. const objectToString = Object.prototype.toString;
  119. const toTypeString = (value) => objectToString.call(value);
  120. const toRawType = (value) => {
  121. return toTypeString(value).slice(8, -1);
  122. };
  123. const isPlainObject$2 = (val) => toTypeString(val) === "[object Object]";
  124. const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
  125. const isReservedProp = /* @__PURE__ */ makeMap(
  126. // the leading comma is intentional so empty string "" is also included
  127. ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
  128. );
  129. const isBuiltInDirective = /* @__PURE__ */ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
  130. const cacheStringFunction = (fn) => {
  131. const cache = /* @__PURE__ */ Object.create(null);
  132. return (str) => {
  133. const hit = cache[str];
  134. return hit || (cache[str] = fn(str));
  135. };
  136. };
  137. const camelizeRE = /-(\w)/g;
  138. const camelize = cacheStringFunction((str) => {
  139. return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
  140. });
  141. const hyphenateRE = /\B([A-Z])/g;
  142. const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
  143. const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1));
  144. const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``);
  145. const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
  146. const invokeArrayFns$1 = (fns, arg) => {
  147. for (let i = 0; i < fns.length; i++) {
  148. fns[i](arg);
  149. }
  150. };
  151. const def = (obj, key, value) => {
  152. Object.defineProperty(obj, key, {
  153. configurable: true,
  154. enumerable: false,
  155. value
  156. });
  157. };
  158. const looseToNumber = (val) => {
  159. const n2 = parseFloat(val);
  160. return isNaN(n2) ? val : n2;
  161. };
  162. const LINEFEED = "\n";
  163. const SLOT_DEFAULT_NAME = "d";
  164. const ON_SHOW = "onShow";
  165. const ON_HIDE = "onHide";
  166. const ON_LAUNCH = "onLaunch";
  167. const ON_ERROR = "onError";
  168. const ON_THEME_CHANGE = "onThemeChange";
  169. const ON_PAGE_NOT_FOUND = "onPageNotFound";
  170. const ON_UNHANDLE_REJECTION = "onUnhandledRejection";
  171. const ON_LOAD = "onLoad";
  172. const ON_READY = "onReady";
  173. const ON_UNLOAD = "onUnload";
  174. const ON_INIT = "onInit";
  175. const ON_SAVE_EXIT_STATE = "onSaveExitState";
  176. const ON_RESIZE = "onResize";
  177. const ON_BACK_PRESS = "onBackPress";
  178. const ON_PAGE_SCROLL = "onPageScroll";
  179. const ON_TAB_ITEM_TAP = "onTabItemTap";
  180. const ON_REACH_BOTTOM = "onReachBottom";
  181. const ON_PULL_DOWN_REFRESH = "onPullDownRefresh";
  182. const ON_SHARE_TIMELINE = "onShareTimeline";
  183. const ON_ADD_TO_FAVORITES = "onAddToFavorites";
  184. const ON_SHARE_APP_MESSAGE = "onShareAppMessage";
  185. const ON_NAVIGATION_BAR_BUTTON_TAP = "onNavigationBarButtonTap";
  186. const ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED = "onNavigationBarSearchInputClicked";
  187. const ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED = "onNavigationBarSearchInputChanged";
  188. const ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED = "onNavigationBarSearchInputConfirmed";
  189. const ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED = "onNavigationBarSearchInputFocusChanged";
  190. const customizeRE = /:/g;
  191. function customizeEvent(str) {
  192. return camelize(str.replace(customizeRE, "-"));
  193. }
  194. function hasLeadingSlash(str) {
  195. return str.indexOf("/") === 0;
  196. }
  197. function addLeadingSlash(str) {
  198. return hasLeadingSlash(str) ? str : "/" + str;
  199. }
  200. const invokeArrayFns = (fns, arg) => {
  201. let ret;
  202. for (let i = 0; i < fns.length; i++) {
  203. ret = fns[i](arg);
  204. }
  205. return ret;
  206. };
  207. function once(fn, ctx = null) {
  208. let res;
  209. return (...args) => {
  210. if (fn) {
  211. res = fn.apply(ctx, args);
  212. fn = null;
  213. }
  214. return res;
  215. };
  216. }
  217. function getValueByDataPath(obj, path) {
  218. if (!isString(path)) {
  219. return;
  220. }
  221. path = path.replace(/\[(\d+)\]/g, ".$1");
  222. const parts = path.split(".");
  223. let key = parts[0];
  224. if (!obj) {
  225. obj = {};
  226. }
  227. if (parts.length === 1) {
  228. return obj[key];
  229. }
  230. return getValueByDataPath(obj[key], parts.slice(1).join("."));
  231. }
  232. function sortObject(obj) {
  233. let sortObj = {};
  234. if (isPlainObject$2(obj)) {
  235. Object.keys(obj).sort().forEach((key) => {
  236. const _key = key;
  237. sortObj[_key] = obj[_key];
  238. });
  239. }
  240. return !Object.keys(sortObj) ? obj : sortObj;
  241. }
  242. const encode$1 = encodeURIComponent;
  243. function stringifyQuery(obj, encodeStr = encode$1) {
  244. const res = obj ? Object.keys(obj).map((key) => {
  245. let val = obj[key];
  246. if (typeof val === void 0 || val === null) {
  247. val = "";
  248. } else if (isPlainObject$2(val)) {
  249. val = JSON.stringify(val);
  250. }
  251. return encodeStr(key) + "=" + encodeStr(val);
  252. }).filter((x) => x.length > 0).join("&") : null;
  253. return res ? `?${res}` : "";
  254. }
  255. const PAGE_HOOKS = [
  256. ON_INIT,
  257. ON_LOAD,
  258. ON_SHOW,
  259. ON_HIDE,
  260. ON_UNLOAD,
  261. ON_BACK_PRESS,
  262. ON_PAGE_SCROLL,
  263. ON_TAB_ITEM_TAP,
  264. ON_REACH_BOTTOM,
  265. ON_PULL_DOWN_REFRESH,
  266. ON_SHARE_TIMELINE,
  267. ON_SHARE_APP_MESSAGE,
  268. ON_ADD_TO_FAVORITES,
  269. ON_SAVE_EXIT_STATE,
  270. ON_NAVIGATION_BAR_BUTTON_TAP,
  271. ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED,
  272. ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED,
  273. ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED,
  274. ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED
  275. ];
  276. function isRootHook(name) {
  277. return PAGE_HOOKS.indexOf(name) > -1;
  278. }
  279. const UniLifecycleHooks = [
  280. ON_SHOW,
  281. ON_HIDE,
  282. ON_LAUNCH,
  283. ON_ERROR,
  284. ON_THEME_CHANGE,
  285. ON_PAGE_NOT_FOUND,
  286. ON_UNHANDLE_REJECTION,
  287. ON_INIT,
  288. ON_LOAD,
  289. ON_READY,
  290. ON_UNLOAD,
  291. ON_RESIZE,
  292. ON_BACK_PRESS,
  293. ON_PAGE_SCROLL,
  294. ON_TAB_ITEM_TAP,
  295. ON_REACH_BOTTOM,
  296. ON_PULL_DOWN_REFRESH,
  297. ON_SHARE_TIMELINE,
  298. ON_ADD_TO_FAVORITES,
  299. ON_SHARE_APP_MESSAGE,
  300. ON_SAVE_EXIT_STATE,
  301. ON_NAVIGATION_BAR_BUTTON_TAP,
  302. ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED,
  303. ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED,
  304. ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED,
  305. ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED
  306. ];
  307. const MINI_PROGRAM_PAGE_RUNTIME_HOOKS = /* @__PURE__ */ (() => {
  308. return {
  309. onPageScroll: 1,
  310. onShareAppMessage: 1 << 1,
  311. onShareTimeline: 1 << 2
  312. };
  313. })();
  314. function isUniLifecycleHook(name, value, checkType = true) {
  315. if (checkType && !isFunction(value)) {
  316. return false;
  317. }
  318. if (UniLifecycleHooks.indexOf(name) > -1) {
  319. return true;
  320. } else if (name.indexOf("on") === 0) {
  321. return true;
  322. }
  323. return false;
  324. }
  325. let vueApp;
  326. const createVueAppHooks = [];
  327. function onCreateVueApp(hook) {
  328. if (vueApp) {
  329. return hook(vueApp);
  330. }
  331. createVueAppHooks.push(hook);
  332. }
  333. function invokeCreateVueAppHook(app) {
  334. vueApp = app;
  335. createVueAppHooks.forEach((hook) => hook(app));
  336. }
  337. const invokeCreateErrorHandler = once((app, createErrorHandler2) => {
  338. if (isFunction(app._component.onError)) {
  339. return createErrorHandler2(app);
  340. }
  341. });
  342. const E = function() {
  343. };
  344. E.prototype = {
  345. on: function(name, callback, ctx) {
  346. var e2 = this.e || (this.e = {});
  347. (e2[name] || (e2[name] = [])).push({
  348. fn: callback,
  349. ctx
  350. });
  351. return this;
  352. },
  353. once: function(name, callback, ctx) {
  354. var self2 = this;
  355. function listener() {
  356. self2.off(name, listener);
  357. callback.apply(ctx, arguments);
  358. }
  359. listener._ = callback;
  360. return this.on(name, listener, ctx);
  361. },
  362. emit: function(name) {
  363. var data = [].slice.call(arguments, 1);
  364. var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
  365. var i = 0;
  366. var len = evtArr.length;
  367. for (i; i < len; i++) {
  368. evtArr[i].fn.apply(evtArr[i].ctx, data);
  369. }
  370. return this;
  371. },
  372. off: function(name, callback) {
  373. var e2 = this.e || (this.e = {});
  374. var evts = e2[name];
  375. var liveEvents = [];
  376. if (evts && callback) {
  377. for (var i = 0, len = evts.length; i < len; i++) {
  378. if (evts[i].fn !== callback && evts[i].fn._ !== callback)
  379. liveEvents.push(evts[i]);
  380. }
  381. }
  382. liveEvents.length ? e2[name] = liveEvents : delete e2[name];
  383. return this;
  384. }
  385. };
  386. var E$1 = E;
  387. const LOCALE_ZH_HANS = "zh-Hans";
  388. const LOCALE_ZH_HANT = "zh-Hant";
  389. const LOCALE_EN = "en";
  390. const LOCALE_FR = "fr";
  391. const LOCALE_ES = "es";
  392. function include(str, parts) {
  393. return !!parts.find((part) => str.indexOf(part) !== -1);
  394. }
  395. function startsWith(str, parts) {
  396. return parts.find((part) => str.indexOf(part) === 0);
  397. }
  398. function normalizeLocale(locale, messages3) {
  399. if (!locale) {
  400. return;
  401. }
  402. locale = locale.trim().replace(/_/g, "-");
  403. if (messages3 && messages3[locale]) {
  404. return locale;
  405. }
  406. locale = locale.toLowerCase();
  407. if (locale === "chinese") {
  408. return LOCALE_ZH_HANS;
  409. }
  410. if (locale.indexOf("zh") === 0) {
  411. if (locale.indexOf("-hans") > -1) {
  412. return LOCALE_ZH_HANS;
  413. }
  414. if (locale.indexOf("-hant") > -1) {
  415. return LOCALE_ZH_HANT;
  416. }
  417. if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) {
  418. return LOCALE_ZH_HANT;
  419. }
  420. return LOCALE_ZH_HANS;
  421. }
  422. let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  423. if (messages3 && Object.keys(messages3).length > 0) {
  424. locales = Object.keys(messages3);
  425. }
  426. const lang = startsWith(locale, locales);
  427. if (lang) {
  428. return lang;
  429. }
  430. }
  431. function getBaseSystemInfo() {
  432. return wx.getSystemInfoSync();
  433. }
  434. function validateProtocolFail(name, msg) {
  435. console.warn(`${name}: ${msg}`);
  436. }
  437. function validateProtocol(name, data, protocol, onFail) {
  438. if (!onFail) {
  439. onFail = validateProtocolFail;
  440. }
  441. for (const key in protocol) {
  442. const errMsg = validateProp$1(key, data[key], protocol[key], !hasOwn(data, key));
  443. if (isString(errMsg)) {
  444. onFail(name, errMsg);
  445. }
  446. }
  447. }
  448. function validateProtocols(name, args, protocol, onFail) {
  449. if (!protocol) {
  450. return;
  451. }
  452. if (!isArray$1(protocol)) {
  453. return validateProtocol(name, args[0] || /* @__PURE__ */ Object.create(null), protocol, onFail);
  454. }
  455. const len = protocol.length;
  456. const argsLen = args.length;
  457. for (let i = 0; i < len; i++) {
  458. const opts = protocol[i];
  459. const data = /* @__PURE__ */ Object.create(null);
  460. if (argsLen > i) {
  461. data[opts.name] = args[i];
  462. }
  463. validateProtocol(name, data, { [opts.name]: opts }, onFail);
  464. }
  465. }
  466. function validateProp$1(name, value, prop, isAbsent) {
  467. if (!isPlainObject$2(prop)) {
  468. prop = { type: prop };
  469. }
  470. const { type: type2, required: required2, validator } = prop;
  471. if (required2 && isAbsent) {
  472. return 'Missing required args: "' + name + '"';
  473. }
  474. if (value == null && !required2) {
  475. return;
  476. }
  477. if (type2 != null) {
  478. let isValid = false;
  479. const types2 = isArray$1(type2) ? type2 : [type2];
  480. const expectedTypes = [];
  481. for (let i = 0; i < types2.length && !isValid; i++) {
  482. const { valid, expectedType } = assertType$1(value, types2[i]);
  483. expectedTypes.push(expectedType || "");
  484. isValid = valid;
  485. }
  486. if (!isValid) {
  487. return getInvalidTypeMessage$1(name, value, expectedTypes);
  488. }
  489. }
  490. if (validator) {
  491. return validator(value);
  492. }
  493. }
  494. const isSimpleType$1 = /* @__PURE__ */ makeMap("String,Number,Boolean,Function,Symbol");
  495. function assertType$1(value, type2) {
  496. let valid;
  497. const expectedType = getType$1(type2);
  498. if (isSimpleType$1(expectedType)) {
  499. const t2 = typeof value;
  500. valid = t2 === expectedType.toLowerCase();
  501. if (!valid && t2 === "object") {
  502. valid = value instanceof type2;
  503. }
  504. } else if (expectedType === "Object") {
  505. valid = isObject$1(value);
  506. } else if (expectedType === "Array") {
  507. valid = isArray$1(value);
  508. } else {
  509. {
  510. valid = value instanceof type2;
  511. }
  512. }
  513. return {
  514. valid,
  515. expectedType
  516. };
  517. }
  518. function getInvalidTypeMessage$1(name, value, expectedTypes) {
  519. let message = `Invalid args: type check failed for args "${name}". Expected ${expectedTypes.map(capitalize).join(", ")}`;
  520. const expectedType = expectedTypes[0];
  521. const receivedType = toRawType(value);
  522. const expectedValue = styleValue$1(value, expectedType);
  523. const receivedValue = styleValue$1(value, receivedType);
  524. if (expectedTypes.length === 1 && isExplicable$1(expectedType) && !isBoolean$1(expectedType, receivedType)) {
  525. message += ` with value ${expectedValue}`;
  526. }
  527. message += `, got ${receivedType} `;
  528. if (isExplicable$1(receivedType)) {
  529. message += `with value ${receivedValue}.`;
  530. }
  531. return message;
  532. }
  533. function getType$1(ctor) {
  534. const match = ctor && ctor.toString().match(/^\s*function (\w+)/);
  535. return match ? match[1] : "";
  536. }
  537. function styleValue$1(value, type2) {
  538. if (type2 === "String") {
  539. return `"${value}"`;
  540. } else if (type2 === "Number") {
  541. return `${Number(value)}`;
  542. } else {
  543. return `${value}`;
  544. }
  545. }
  546. function isExplicable$1(type2) {
  547. const explicitTypes = ["string", "number", "boolean"];
  548. return explicitTypes.some((elem) => type2.toLowerCase() === elem);
  549. }
  550. function isBoolean$1(...args) {
  551. return args.some((elem) => elem.toLowerCase() === "boolean");
  552. }
  553. function tryCatch(fn) {
  554. return function() {
  555. try {
  556. return fn.apply(fn, arguments);
  557. } catch (e2) {
  558. console.error(e2);
  559. }
  560. };
  561. }
  562. let invokeCallbackId = 1;
  563. const invokeCallbacks = {};
  564. function addInvokeCallback(id, name, callback, keepAlive = false) {
  565. invokeCallbacks[id] = {
  566. name,
  567. keepAlive,
  568. callback
  569. };
  570. return id;
  571. }
  572. function invokeCallback(id, res, extras) {
  573. if (typeof id === "number") {
  574. const opts = invokeCallbacks[id];
  575. if (opts) {
  576. if (!opts.keepAlive) {
  577. delete invokeCallbacks[id];
  578. }
  579. return opts.callback(res, extras);
  580. }
  581. }
  582. return res;
  583. }
  584. const API_SUCCESS = "success";
  585. const API_FAIL = "fail";
  586. const API_COMPLETE = "complete";
  587. function getApiCallbacks(args) {
  588. const apiCallbacks = {};
  589. for (const name in args) {
  590. const fn = args[name];
  591. if (isFunction(fn)) {
  592. apiCallbacks[name] = tryCatch(fn);
  593. delete args[name];
  594. }
  595. }
  596. return apiCallbacks;
  597. }
  598. function normalizeErrMsg$1(errMsg, name) {
  599. if (!errMsg || errMsg.indexOf(":fail") === -1) {
  600. return name + ":ok";
  601. }
  602. return name + errMsg.substring(errMsg.indexOf(":fail"));
  603. }
  604. function createAsyncApiCallback(name, args = {}, { beforeAll, beforeSuccess } = {}) {
  605. if (!isPlainObject$2(args)) {
  606. args = {};
  607. }
  608. const { success, fail, complete } = getApiCallbacks(args);
  609. const hasSuccess = isFunction(success);
  610. const hasFail = isFunction(fail);
  611. const hasComplete = isFunction(complete);
  612. const callbackId = invokeCallbackId++;
  613. addInvokeCallback(callbackId, name, (res) => {
  614. res = res || {};
  615. res.errMsg = normalizeErrMsg$1(res.errMsg, name);
  616. isFunction(beforeAll) && beforeAll(res);
  617. if (res.errMsg === name + ":ok") {
  618. isFunction(beforeSuccess) && beforeSuccess(res, args);
  619. hasSuccess && success(res);
  620. } else {
  621. hasFail && fail(res);
  622. }
  623. hasComplete && complete(res);
  624. });
  625. return callbackId;
  626. }
  627. const HOOK_SUCCESS = "success";
  628. const HOOK_FAIL = "fail";
  629. const HOOK_COMPLETE = "complete";
  630. const globalInterceptors = {};
  631. const scopedInterceptors = {};
  632. function wrapperHook(hook, params) {
  633. return function(data) {
  634. return hook(data, params) || data;
  635. };
  636. }
  637. function queue$1(hooks, data, params) {
  638. let promise2 = false;
  639. for (let i = 0; i < hooks.length; i++) {
  640. const hook = hooks[i];
  641. if (promise2) {
  642. promise2 = Promise.resolve(wrapperHook(hook, params));
  643. } else {
  644. const res = hook(data, params);
  645. if (isPromise(res)) {
  646. promise2 = Promise.resolve(res);
  647. }
  648. if (res === false) {
  649. return {
  650. then() {
  651. },
  652. catch() {
  653. }
  654. };
  655. }
  656. }
  657. }
  658. return promise2 || {
  659. then(callback) {
  660. return callback(data);
  661. },
  662. catch() {
  663. }
  664. };
  665. }
  666. function wrapperOptions(interceptors2, options = {}) {
  667. [HOOK_SUCCESS, HOOK_FAIL, HOOK_COMPLETE].forEach((name) => {
  668. const hooks = interceptors2[name];
  669. if (!isArray$1(hooks)) {
  670. return;
  671. }
  672. const oldCallback = options[name];
  673. options[name] = function callbackInterceptor(res) {
  674. queue$1(hooks, res, options).then((res2) => {
  675. return isFunction(oldCallback) && oldCallback(res2) || res2;
  676. });
  677. };
  678. });
  679. return options;
  680. }
  681. function wrapperReturnValue(method3, returnValue) {
  682. const returnValueHooks = [];
  683. if (isArray$1(globalInterceptors.returnValue)) {
  684. returnValueHooks.push(...globalInterceptors.returnValue);
  685. }
  686. const interceptor = scopedInterceptors[method3];
  687. if (interceptor && isArray$1(interceptor.returnValue)) {
  688. returnValueHooks.push(...interceptor.returnValue);
  689. }
  690. returnValueHooks.forEach((hook) => {
  691. returnValue = hook(returnValue) || returnValue;
  692. });
  693. return returnValue;
  694. }
  695. function getApiInterceptorHooks(method3) {
  696. const interceptor = /* @__PURE__ */ Object.create(null);
  697. Object.keys(globalInterceptors).forEach((hook) => {
  698. if (hook !== "returnValue") {
  699. interceptor[hook] = globalInterceptors[hook].slice();
  700. }
  701. });
  702. const scopedInterceptor = scopedInterceptors[method3];
  703. if (scopedInterceptor) {
  704. Object.keys(scopedInterceptor).forEach((hook) => {
  705. if (hook !== "returnValue") {
  706. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  707. }
  708. });
  709. }
  710. return interceptor;
  711. }
  712. function invokeApi(method3, api, options, params) {
  713. const interceptor = getApiInterceptorHooks(method3);
  714. if (interceptor && Object.keys(interceptor).length) {
  715. if (isArray$1(interceptor.invoke)) {
  716. const res = queue$1(interceptor.invoke, options);
  717. return res.then((options2) => {
  718. return api(wrapperOptions(getApiInterceptorHooks(method3), options2), ...params);
  719. });
  720. } else {
  721. return api(wrapperOptions(interceptor, options), ...params);
  722. }
  723. }
  724. return api(options, ...params);
  725. }
  726. function hasCallback(args) {
  727. if (isPlainObject$2(args) && [API_SUCCESS, API_FAIL, API_COMPLETE].find((cb) => isFunction(args[cb]))) {
  728. return true;
  729. }
  730. return false;
  731. }
  732. function handlePromise(promise2) {
  733. return promise2;
  734. }
  735. function promisify$1(name, fn) {
  736. return (args = {}, ...rest) => {
  737. if (hasCallback(args)) {
  738. return wrapperReturnValue(name, invokeApi(name, fn, args, rest));
  739. }
  740. return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
  741. invokeApi(name, fn, extend(args, { success: resolve2, fail: reject }), rest);
  742. })));
  743. };
  744. }
  745. function formatApiArgs(args, options) {
  746. const params = args[0];
  747. if (!options || !isPlainObject$2(options.formatArgs) && isPlainObject$2(params)) {
  748. return;
  749. }
  750. const formatArgs = options.formatArgs;
  751. const keys = Object.keys(formatArgs);
  752. for (let i = 0; i < keys.length; i++) {
  753. const name = keys[i];
  754. const formatterOrDefaultValue = formatArgs[name];
  755. if (isFunction(formatterOrDefaultValue)) {
  756. const errMsg = formatterOrDefaultValue(args[0][name], params);
  757. if (isString(errMsg)) {
  758. return errMsg;
  759. }
  760. } else {
  761. if (!hasOwn(params, name)) {
  762. params[name] = formatterOrDefaultValue;
  763. }
  764. }
  765. }
  766. }
  767. function invokeSuccess(id, name, res) {
  768. return invokeCallback(id, extend(res || {}, { errMsg: name + ":ok" }));
  769. }
  770. function invokeFail(id, name, errMsg, errRes) {
  771. return invokeCallback(id, extend({ errMsg: name + ":fail" + (errMsg ? " " + errMsg : "") }, errRes));
  772. }
  773. function beforeInvokeApi(name, args, protocol, options) {
  774. {
  775. validateProtocols(name, args, protocol);
  776. }
  777. if (options && options.beforeInvoke) {
  778. const errMsg2 = options.beforeInvoke(args);
  779. if (isString(errMsg2)) {
  780. return errMsg2;
  781. }
  782. }
  783. const errMsg = formatApiArgs(args, options);
  784. if (errMsg) {
  785. return errMsg;
  786. }
  787. }
  788. function normalizeErrMsg(errMsg) {
  789. if (!errMsg || isString(errMsg)) {
  790. return errMsg;
  791. }
  792. if (errMsg.stack) {
  793. console.error(errMsg.message + LINEFEED + errMsg.stack);
  794. return errMsg.message;
  795. }
  796. return errMsg;
  797. }
  798. function wrapperTaskApi(name, fn, protocol, options) {
  799. return (args) => {
  800. const id = createAsyncApiCallback(name, args, options);
  801. const errMsg = beforeInvokeApi(name, [args], protocol, options);
  802. if (errMsg) {
  803. return invokeFail(id, name, errMsg);
  804. }
  805. return fn(args, {
  806. resolve: (res) => invokeSuccess(id, name, res),
  807. reject: (errMsg2, errRes) => invokeFail(id, name, normalizeErrMsg(errMsg2), errRes)
  808. });
  809. };
  810. }
  811. function wrapperSyncApi(name, fn, protocol, options) {
  812. return (...args) => {
  813. const errMsg = beforeInvokeApi(name, args, protocol, options);
  814. if (errMsg) {
  815. throw new Error(errMsg);
  816. }
  817. return fn.apply(null, args);
  818. };
  819. }
  820. function wrapperAsyncApi(name, fn, protocol, options) {
  821. return wrapperTaskApi(name, fn, protocol, options);
  822. }
  823. function defineSyncApi(name, fn, protocol, options) {
  824. return wrapperSyncApi(name, fn, protocol, options);
  825. }
  826. function defineAsyncApi(name, fn, protocol, options) {
  827. return promisify$1(name, wrapperAsyncApi(name, fn, protocol, options));
  828. }
  829. const API_UPX2PX = "upx2px";
  830. const Upx2pxProtocol = [
  831. {
  832. name: "upx",
  833. type: [Number, String],
  834. required: true
  835. }
  836. ];
  837. const EPS = 1e-4;
  838. const BASE_DEVICE_WIDTH = 750;
  839. let isIOS = false;
  840. let deviceWidth = 0;
  841. let deviceDPR = 0;
  842. function checkDeviceWidth() {
  843. const { platform: platform2, pixelRatio, windowWidth } = getBaseSystemInfo();
  844. deviceWidth = windowWidth;
  845. deviceDPR = pixelRatio;
  846. isIOS = platform2 === "ios";
  847. }
  848. const upx2px = defineSyncApi(API_UPX2PX, (number3, newDeviceWidth) => {
  849. if (deviceWidth === 0) {
  850. checkDeviceWidth();
  851. }
  852. number3 = Number(number3);
  853. if (number3 === 0) {
  854. return 0;
  855. }
  856. let width = newDeviceWidth || deviceWidth;
  857. let result = number3 / BASE_DEVICE_WIDTH * width;
  858. if (result < 0) {
  859. result = -result;
  860. }
  861. result = Math.floor(result + EPS);
  862. if (result === 0) {
  863. if (deviceDPR === 1 || !isIOS) {
  864. result = 1;
  865. } else {
  866. result = 0.5;
  867. }
  868. }
  869. return number3 < 0 ? -result : result;
  870. }, Upx2pxProtocol);
  871. const API_ADD_INTERCEPTOR = "addInterceptor";
  872. const API_REMOVE_INTERCEPTOR = "removeInterceptor";
  873. const AddInterceptorProtocol = [
  874. {
  875. name: "method",
  876. type: [String, Object],
  877. required: true
  878. }
  879. ];
  880. const RemoveInterceptorProtocol = AddInterceptorProtocol;
  881. function mergeInterceptorHook(interceptors2, interceptor) {
  882. Object.keys(interceptor).forEach((hook) => {
  883. if (isFunction(interceptor[hook])) {
  884. interceptors2[hook] = mergeHook(interceptors2[hook], interceptor[hook]);
  885. }
  886. });
  887. }
  888. function removeInterceptorHook(interceptors2, interceptor) {
  889. if (!interceptors2 || !interceptor) {
  890. return;
  891. }
  892. Object.keys(interceptor).forEach((name) => {
  893. const hooks = interceptors2[name];
  894. const hook = interceptor[name];
  895. if (isArray$1(hooks) && isFunction(hook)) {
  896. remove(hooks, hook);
  897. }
  898. });
  899. }
  900. function mergeHook(parentVal, childVal) {
  901. const res = childVal ? parentVal ? parentVal.concat(childVal) : isArray$1(childVal) ? childVal : [childVal] : parentVal;
  902. return res ? dedupeHooks(res) : res;
  903. }
  904. function dedupeHooks(hooks) {
  905. const res = [];
  906. for (let i = 0; i < hooks.length; i++) {
  907. if (res.indexOf(hooks[i]) === -1) {
  908. res.push(hooks[i]);
  909. }
  910. }
  911. return res;
  912. }
  913. const addInterceptor = defineSyncApi(API_ADD_INTERCEPTOR, (method3, interceptor) => {
  914. if (isString(method3) && isPlainObject$2(interceptor)) {
  915. mergeInterceptorHook(scopedInterceptors[method3] || (scopedInterceptors[method3] = {}), interceptor);
  916. } else if (isPlainObject$2(method3)) {
  917. mergeInterceptorHook(globalInterceptors, method3);
  918. }
  919. }, AddInterceptorProtocol);
  920. const removeInterceptor = defineSyncApi(API_REMOVE_INTERCEPTOR, (method3, interceptor) => {
  921. if (isString(method3)) {
  922. if (isPlainObject$2(interceptor)) {
  923. removeInterceptorHook(scopedInterceptors[method3], interceptor);
  924. } else {
  925. delete scopedInterceptors[method3];
  926. }
  927. } else if (isPlainObject$2(method3)) {
  928. removeInterceptorHook(globalInterceptors, method3);
  929. }
  930. }, RemoveInterceptorProtocol);
  931. const interceptors = {};
  932. const API_ON = "$on";
  933. const OnProtocol = [
  934. {
  935. name: "event",
  936. type: String,
  937. required: true
  938. },
  939. {
  940. name: "callback",
  941. type: Function,
  942. required: true
  943. }
  944. ];
  945. const API_ONCE = "$once";
  946. const OnceProtocol = OnProtocol;
  947. const API_OFF = "$off";
  948. const OffProtocol = [
  949. {
  950. name: "event",
  951. type: [String, Array]
  952. },
  953. {
  954. name: "callback",
  955. type: Function
  956. }
  957. ];
  958. const API_EMIT = "$emit";
  959. const EmitProtocol = [
  960. {
  961. name: "event",
  962. type: String,
  963. required: true
  964. }
  965. ];
  966. const emitter = new E$1();
  967. const $on = defineSyncApi(API_ON, (name, callback) => {
  968. emitter.on(name, callback);
  969. return () => emitter.off(name, callback);
  970. }, OnProtocol);
  971. const $once = defineSyncApi(API_ONCE, (name, callback) => {
  972. emitter.once(name, callback);
  973. return () => emitter.off(name, callback);
  974. }, OnceProtocol);
  975. const $off = defineSyncApi(API_OFF, (name, callback) => {
  976. if (!name) {
  977. emitter.e = {};
  978. return;
  979. }
  980. if (!isArray$1(name))
  981. name = [name];
  982. name.forEach((n2) => emitter.off(n2, callback));
  983. }, OffProtocol);
  984. const $emit = defineSyncApi(API_EMIT, (name, ...args) => {
  985. emitter.emit(name, ...args);
  986. }, EmitProtocol);
  987. let cid;
  988. let cidErrMsg;
  989. let enabled;
  990. function normalizePushMessage(message) {
  991. try {
  992. return JSON.parse(message);
  993. } catch (e2) {
  994. }
  995. return message;
  996. }
  997. function invokePushCallback(args) {
  998. if (args.type === "enabled") {
  999. enabled = true;
  1000. } else if (args.type === "clientId") {
  1001. cid = args.cid;
  1002. cidErrMsg = args.errMsg;
  1003. invokeGetPushCidCallbacks(cid, args.errMsg);
  1004. } else if (args.type === "pushMsg") {
  1005. const message = {
  1006. type: "receive",
  1007. data: normalizePushMessage(args.message)
  1008. };
  1009. for (let i = 0; i < onPushMessageCallbacks.length; i++) {
  1010. const callback = onPushMessageCallbacks[i];
  1011. callback(message);
  1012. if (message.stopped) {
  1013. break;
  1014. }
  1015. }
  1016. } else if (args.type === "click") {
  1017. onPushMessageCallbacks.forEach((callback) => {
  1018. callback({
  1019. type: "click",
  1020. data: normalizePushMessage(args.message)
  1021. });
  1022. });
  1023. }
  1024. }
  1025. const getPushCidCallbacks = [];
  1026. function invokeGetPushCidCallbacks(cid2, errMsg) {
  1027. getPushCidCallbacks.forEach((callback) => {
  1028. callback(cid2, errMsg);
  1029. });
  1030. getPushCidCallbacks.length = 0;
  1031. }
  1032. const API_GET_PUSH_CLIENT_ID = "getPushClientId";
  1033. const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve: resolve2, reject }) => {
  1034. Promise.resolve().then(() => {
  1035. if (typeof enabled === "undefined") {
  1036. enabled = false;
  1037. cid = "";
  1038. cidErrMsg = "uniPush is not enabled";
  1039. }
  1040. getPushCidCallbacks.push((cid2, errMsg) => {
  1041. if (cid2) {
  1042. resolve2({ cid: cid2 });
  1043. } else {
  1044. reject(errMsg);
  1045. }
  1046. });
  1047. if (typeof cid !== "undefined") {
  1048. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1049. }
  1050. });
  1051. });
  1052. const onPushMessageCallbacks = [];
  1053. const onPushMessage = (fn) => {
  1054. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1055. onPushMessageCallbacks.push(fn);
  1056. }
  1057. };
  1058. const offPushMessage = (fn) => {
  1059. if (!fn) {
  1060. onPushMessageCallbacks.length = 0;
  1061. } else {
  1062. const index2 = onPushMessageCallbacks.indexOf(fn);
  1063. if (index2 > -1) {
  1064. onPushMessageCallbacks.splice(index2, 1);
  1065. }
  1066. }
  1067. };
  1068. const SYNC_API_RE = /^\$|getLocale|setLocale|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getDeviceInfo|getAppBaseInfo|getWindowInfo|getSystemSetting|getAppAuthorizeSetting/;
  1069. const CONTEXT_API_RE = /^create|Manager$/;
  1070. const CONTEXT_API_RE_EXC = ["createBLEConnection"];
  1071. const ASYNC_API = ["createBLEConnection"];
  1072. const CALLBACK_API_RE = /^on|^off/;
  1073. function isContextApi(name) {
  1074. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  1075. }
  1076. function isSyncApi(name) {
  1077. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  1078. }
  1079. function isCallbackApi(name) {
  1080. return CALLBACK_API_RE.test(name) && name !== "onPush";
  1081. }
  1082. function shouldPromise(name) {
  1083. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  1084. return false;
  1085. }
  1086. return true;
  1087. }
  1088. if (!Promise.prototype.finally) {
  1089. Promise.prototype.finally = function(onfinally) {
  1090. const promise2 = this.constructor;
  1091. return this.then((value) => promise2.resolve(onfinally && onfinally()).then(() => value), (reason) => promise2.resolve(onfinally && onfinally()).then(() => {
  1092. throw reason;
  1093. }));
  1094. };
  1095. }
  1096. function promisify(name, api) {
  1097. if (!shouldPromise(name)) {
  1098. return api;
  1099. }
  1100. if (!isFunction(api)) {
  1101. return api;
  1102. }
  1103. return function promiseApi(options = {}, ...rest) {
  1104. if (isFunction(options.success) || isFunction(options.fail) || isFunction(options.complete)) {
  1105. return wrapperReturnValue(name, invokeApi(name, api, options, rest));
  1106. }
  1107. return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
  1108. invokeApi(name, api, extend({}, options, {
  1109. success: resolve2,
  1110. fail: reject
  1111. }), rest);
  1112. })));
  1113. };
  1114. }
  1115. const CALLBACKS = ["success", "fail", "cancel", "complete"];
  1116. function initWrapper(protocols2) {
  1117. function processCallback(methodName, method3, returnValue) {
  1118. return function(res) {
  1119. return method3(processReturnValue(methodName, res, returnValue));
  1120. };
  1121. }
  1122. function processArgs(methodName, fromArgs, argsOption = {}, returnValue = {}, keepFromArgs = false) {
  1123. if (isPlainObject$2(fromArgs)) {
  1124. const toArgs = keepFromArgs === true ? fromArgs : {};
  1125. if (isFunction(argsOption)) {
  1126. argsOption = argsOption(fromArgs, toArgs) || {};
  1127. }
  1128. for (const key in fromArgs) {
  1129. if (hasOwn(argsOption, key)) {
  1130. let keyOption = argsOption[key];
  1131. if (isFunction(keyOption)) {
  1132. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  1133. }
  1134. if (!keyOption) {
  1135. console.warn(`微信小程序 ${methodName} 暂不支持 ${key}`);
  1136. } else if (isString(keyOption)) {
  1137. toArgs[keyOption] = fromArgs[key];
  1138. } else if (isPlainObject$2(keyOption)) {
  1139. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  1140. }
  1141. } else if (CALLBACKS.indexOf(key) !== -1) {
  1142. const callback = fromArgs[key];
  1143. if (isFunction(callback)) {
  1144. toArgs[key] = processCallback(methodName, callback, returnValue);
  1145. }
  1146. } else {
  1147. if (!keepFromArgs && !hasOwn(toArgs, key)) {
  1148. toArgs[key] = fromArgs[key];
  1149. }
  1150. }
  1151. }
  1152. return toArgs;
  1153. } else if (isFunction(fromArgs)) {
  1154. fromArgs = processCallback(methodName, fromArgs, returnValue);
  1155. }
  1156. return fromArgs;
  1157. }
  1158. function processReturnValue(methodName, res, returnValue, keepReturnValue = false) {
  1159. if (isFunction(protocols2.returnValue)) {
  1160. res = protocols2.returnValue(methodName, res);
  1161. }
  1162. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  1163. }
  1164. return function wrapper(methodName, method3) {
  1165. if (!hasOwn(protocols2, methodName)) {
  1166. return method3;
  1167. }
  1168. const protocol = protocols2[methodName];
  1169. if (!protocol) {
  1170. return function() {
  1171. console.error(`微信小程序 暂不支持${methodName}`);
  1172. };
  1173. }
  1174. return function(arg1, arg2) {
  1175. let options = protocol;
  1176. if (isFunction(protocol)) {
  1177. options = protocol(arg1);
  1178. }
  1179. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  1180. const args = [arg1];
  1181. if (typeof arg2 !== "undefined") {
  1182. args.push(arg2);
  1183. }
  1184. const returnValue = wx[options.name || methodName].apply(wx, args);
  1185. if (isSyncApi(methodName)) {
  1186. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1187. }
  1188. return returnValue;
  1189. };
  1190. };
  1191. }
  1192. const getLocale = () => {
  1193. const app = isFunction(getApp) && getApp({ allowDefault: true });
  1194. if (app && app.$vm) {
  1195. return app.$vm.$locale;
  1196. }
  1197. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  1198. };
  1199. const setLocale = (locale) => {
  1200. const app = isFunction(getApp) && getApp();
  1201. if (!app) {
  1202. return false;
  1203. }
  1204. const oldLocale = app.$vm.$locale;
  1205. if (oldLocale !== locale) {
  1206. app.$vm.$locale = locale;
  1207. onLocaleChangeCallbacks.forEach((fn) => fn({ locale }));
  1208. return true;
  1209. }
  1210. return false;
  1211. };
  1212. const onLocaleChangeCallbacks = [];
  1213. const onLocaleChange = (fn) => {
  1214. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  1215. onLocaleChangeCallbacks.push(fn);
  1216. }
  1217. };
  1218. if (typeof global !== "undefined") {
  1219. global.getLocale = getLocale;
  1220. }
  1221. const UUID_KEY = "__DC_STAT_UUID";
  1222. let deviceId;
  1223. function useDeviceId(global2 = wx) {
  1224. return function addDeviceId(_, toRes) {
  1225. deviceId = deviceId || global2.getStorageSync(UUID_KEY);
  1226. if (!deviceId) {
  1227. deviceId = Date.now() + "" + Math.floor(Math.random() * 1e7);
  1228. wx.setStorage({
  1229. key: UUID_KEY,
  1230. data: deviceId
  1231. });
  1232. }
  1233. toRes.deviceId = deviceId;
  1234. };
  1235. }
  1236. function addSafeAreaInsets(fromRes, toRes) {
  1237. if (fromRes.safeArea) {
  1238. const safeArea = fromRes.safeArea;
  1239. toRes.safeAreaInsets = {
  1240. top: safeArea.top,
  1241. left: safeArea.left,
  1242. right: fromRes.windowWidth - safeArea.right,
  1243. bottom: fromRes.screenHeight - safeArea.bottom
  1244. };
  1245. }
  1246. }
  1247. function populateParameters(fromRes, toRes) {
  1248. const { brand = "", model = "", system = "", language = "", theme, version: version2, platform: platform2, fontSizeSetting, SDKVersion, pixelRatio, deviceOrientation } = fromRes;
  1249. let osName = "";
  1250. let osVersion = "";
  1251. {
  1252. osName = system.split(" ")[0] || "";
  1253. osVersion = system.split(" ")[1] || "";
  1254. }
  1255. let hostVersion = version2;
  1256. let deviceType = getGetDeviceType(fromRes, model);
  1257. let deviceBrand = getDeviceBrand(brand);
  1258. let _hostName = getHostName(fromRes);
  1259. let _deviceOrientation = deviceOrientation;
  1260. let _devicePixelRatio = pixelRatio;
  1261. let _SDKVersion = SDKVersion;
  1262. const hostLanguage = language.replace(/_/g, "-");
  1263. const parameters = {
  1264. appId: "wxde6edfb4b2c1e7db",
  1265. appName: "喵星人平台管理系统小程序",
  1266. appVersion: "1.0.0",
  1267. appVersionCode: "100",
  1268. appLanguage: getAppLanguage(hostLanguage),
  1269. uniCompileVersion: "3.8.4",
  1270. uniRuntimeVersion: "3.8.4",
  1271. uniPlatform: "mp-weixin",
  1272. deviceBrand,
  1273. deviceModel: model,
  1274. deviceType,
  1275. devicePixelRatio: _devicePixelRatio,
  1276. deviceOrientation: _deviceOrientation,
  1277. osName: osName.toLocaleLowerCase(),
  1278. osVersion,
  1279. hostTheme: theme,
  1280. hostVersion,
  1281. hostLanguage,
  1282. hostName: _hostName,
  1283. hostSDKVersion: _SDKVersion,
  1284. hostFontSizeSetting: fontSizeSetting,
  1285. windowTop: 0,
  1286. windowBottom: 0,
  1287. // TODO
  1288. osLanguage: void 0,
  1289. osTheme: void 0,
  1290. ua: void 0,
  1291. hostPackageName: void 0,
  1292. browserName: void 0,
  1293. browserVersion: void 0
  1294. };
  1295. extend(toRes, parameters);
  1296. }
  1297. function getGetDeviceType(fromRes, model) {
  1298. let deviceType = fromRes.deviceType || "phone";
  1299. {
  1300. const deviceTypeMaps = {
  1301. ipad: "pad",
  1302. windows: "pc",
  1303. mac: "pc"
  1304. };
  1305. const deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  1306. const _model = model.toLocaleLowerCase();
  1307. for (let index2 = 0; index2 < deviceTypeMapsKeys.length; index2++) {
  1308. const _m = deviceTypeMapsKeys[index2];
  1309. if (_model.indexOf(_m) !== -1) {
  1310. deviceType = deviceTypeMaps[_m];
  1311. break;
  1312. }
  1313. }
  1314. }
  1315. return deviceType;
  1316. }
  1317. function getDeviceBrand(brand) {
  1318. let deviceBrand = brand;
  1319. if (deviceBrand) {
  1320. deviceBrand = deviceBrand.toLocaleLowerCase();
  1321. }
  1322. return deviceBrand;
  1323. }
  1324. function getAppLanguage(defaultLanguage) {
  1325. return getLocale ? getLocale() : defaultLanguage;
  1326. }
  1327. function getHostName(fromRes) {
  1328. const _platform = "WeChat";
  1329. let _hostName = fromRes.hostName || _platform;
  1330. {
  1331. if (fromRes.environment) {
  1332. _hostName = fromRes.environment;
  1333. } else if (fromRes.host && fromRes.host.env) {
  1334. _hostName = fromRes.host.env;
  1335. }
  1336. }
  1337. return _hostName;
  1338. }
  1339. const getSystemInfo = {
  1340. returnValue: (fromRes, toRes) => {
  1341. addSafeAreaInsets(fromRes, toRes);
  1342. useDeviceId()(fromRes, toRes);
  1343. populateParameters(fromRes, toRes);
  1344. }
  1345. };
  1346. const getSystemInfoSync = getSystemInfo;
  1347. const redirectTo = {};
  1348. const previewImage = {
  1349. args(fromArgs, toArgs) {
  1350. let currentIndex = parseInt(fromArgs.current);
  1351. if (isNaN(currentIndex)) {
  1352. return;
  1353. }
  1354. const urls = fromArgs.urls;
  1355. if (!isArray$1(urls)) {
  1356. return;
  1357. }
  1358. const len = urls.length;
  1359. if (!len) {
  1360. return;
  1361. }
  1362. if (currentIndex < 0) {
  1363. currentIndex = 0;
  1364. } else if (currentIndex >= len) {
  1365. currentIndex = len - 1;
  1366. }
  1367. if (currentIndex > 0) {
  1368. toArgs.current = urls[currentIndex];
  1369. toArgs.urls = urls.filter((item, index2) => index2 < currentIndex ? item !== urls[currentIndex] : true);
  1370. } else {
  1371. toArgs.current = urls[0];
  1372. }
  1373. return {
  1374. indicator: false,
  1375. loop: false
  1376. };
  1377. }
  1378. };
  1379. const showActionSheet = {
  1380. args(fromArgs, toArgs) {
  1381. toArgs.alertText = fromArgs.title;
  1382. }
  1383. };
  1384. const getDeviceInfo = {
  1385. returnValue: (fromRes, toRes) => {
  1386. const { brand, model } = fromRes;
  1387. let deviceType = getGetDeviceType(fromRes, model);
  1388. let deviceBrand = getDeviceBrand(brand);
  1389. useDeviceId()(fromRes, toRes);
  1390. toRes = sortObject(extend(toRes, {
  1391. deviceType,
  1392. deviceBrand,
  1393. deviceModel: model
  1394. }));
  1395. }
  1396. };
  1397. const getAppBaseInfo = {
  1398. returnValue: (fromRes, toRes) => {
  1399. const { version: version2, language, SDKVersion, theme } = fromRes;
  1400. let _hostName = getHostName(fromRes);
  1401. let hostLanguage = language.replace(/_/g, "-");
  1402. toRes = sortObject(extend(toRes, {
  1403. hostVersion: version2,
  1404. hostLanguage,
  1405. hostName: _hostName,
  1406. hostSDKVersion: SDKVersion,
  1407. hostTheme: theme,
  1408. appId: "wxde6edfb4b2c1e7db",
  1409. appName: "喵星人平台管理系统小程序",
  1410. appVersion: "1.0.0",
  1411. appVersionCode: "100",
  1412. appLanguage: getAppLanguage(hostLanguage)
  1413. }));
  1414. }
  1415. };
  1416. const getWindowInfo = {
  1417. returnValue: (fromRes, toRes) => {
  1418. addSafeAreaInsets(fromRes, toRes);
  1419. toRes = sortObject(extend(toRes, {
  1420. windowTop: 0,
  1421. windowBottom: 0
  1422. }));
  1423. }
  1424. };
  1425. const getAppAuthorizeSetting = {
  1426. returnValue: function(fromRes, toRes) {
  1427. const { locationReducedAccuracy } = fromRes;
  1428. toRes.locationAccuracy = "unsupported";
  1429. if (locationReducedAccuracy === true) {
  1430. toRes.locationAccuracy = "reduced";
  1431. } else if (locationReducedAccuracy === false) {
  1432. toRes.locationAccuracy = "full";
  1433. }
  1434. }
  1435. };
  1436. const baseApis = {
  1437. $on,
  1438. $off,
  1439. $once,
  1440. $emit,
  1441. upx2px,
  1442. interceptors,
  1443. addInterceptor,
  1444. removeInterceptor,
  1445. onCreateVueApp,
  1446. invokeCreateVueAppHook,
  1447. getLocale,
  1448. setLocale,
  1449. onLocaleChange,
  1450. getPushClientId,
  1451. onPushMessage,
  1452. offPushMessage,
  1453. invokePushCallback
  1454. };
  1455. function initUni(api, protocols2, platform2 = wx) {
  1456. const wrapper = initWrapper(protocols2);
  1457. const UniProxyHandlers = {
  1458. get(target, key) {
  1459. if (hasOwn(target, key)) {
  1460. return target[key];
  1461. }
  1462. if (hasOwn(api, key)) {
  1463. return promisify(key, api[key]);
  1464. }
  1465. if (hasOwn(baseApis, key)) {
  1466. return promisify(key, baseApis[key]);
  1467. }
  1468. return promisify(key, wrapper(key, platform2[key]));
  1469. }
  1470. };
  1471. return new Proxy({}, UniProxyHandlers);
  1472. }
  1473. function initGetProvider(providers) {
  1474. return function getProvider2({ service, success, fail, complete }) {
  1475. let res;
  1476. if (providers[service]) {
  1477. res = {
  1478. errMsg: "getProvider:ok",
  1479. service,
  1480. provider: providers[service]
  1481. };
  1482. isFunction(success) && success(res);
  1483. } else {
  1484. res = {
  1485. errMsg: "getProvider:fail:服务[" + service + "]不存在"
  1486. };
  1487. isFunction(fail) && fail(res);
  1488. }
  1489. isFunction(complete) && complete(res);
  1490. };
  1491. }
  1492. const objectKeys = [
  1493. "qy",
  1494. "env",
  1495. "error",
  1496. "version",
  1497. "lanDebug",
  1498. "cloud",
  1499. "serviceMarket",
  1500. "router",
  1501. "worklet"
  1502. ];
  1503. const singlePageDisableKey = ["lanDebug", "router", "worklet"];
  1504. const launchOption = wx.getLaunchOptionsSync ? wx.getLaunchOptionsSync() : null;
  1505. function isWxKey(key) {
  1506. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  1507. return false;
  1508. }
  1509. return objectKeys.indexOf(key) > -1 || typeof wx[key] === "function";
  1510. }
  1511. function initWx() {
  1512. let global2 = wx;
  1513. if (typeof globalThis !== "undefined" && globalThis.wx && wx !== globalThis.wx) {
  1514. global2 = globalThis.wx;
  1515. }
  1516. const newWx = {};
  1517. for (const key in global2) {
  1518. if (isWxKey(key)) {
  1519. newWx[key] = global2[key];
  1520. }
  1521. }
  1522. if (typeof globalThis !== "undefined") {
  1523. globalThis.wx = newWx;
  1524. }
  1525. return newWx;
  1526. }
  1527. const mocks$1 = ["__route__", "__wxExparserNodeId__", "__wxWebviewId__"];
  1528. const getProvider = initGetProvider({
  1529. oauth: ["weixin"],
  1530. share: ["weixin"],
  1531. payment: ["wxpay"],
  1532. push: ["weixin"]
  1533. });
  1534. function initComponentMocks(component) {
  1535. const res = /* @__PURE__ */ Object.create(null);
  1536. mocks$1.forEach((name) => {
  1537. res[name] = component[name];
  1538. });
  1539. return res;
  1540. }
  1541. function createSelectorQuery() {
  1542. const query = wx$2.createSelectorQuery();
  1543. const oldIn = query.in;
  1544. query.in = function newIn(component) {
  1545. return oldIn.call(this, initComponentMocks(component));
  1546. };
  1547. return query;
  1548. }
  1549. const wx$2 = initWx();
  1550. let baseInfo = wx$2.getAppBaseInfo && wx$2.getAppBaseInfo();
  1551. if (!baseInfo) {
  1552. baseInfo = wx$2.getSystemInfoSync();
  1553. }
  1554. const host = baseInfo ? baseInfo.host : null;
  1555. const shareVideoMessage = host && host.env === "SAAASDK" ? wx$2.miniapp.shareVideoMessage : wx$2.shareVideoMessage;
  1556. var shims = /* @__PURE__ */ Object.freeze({
  1557. __proto__: null,
  1558. createSelectorQuery,
  1559. getProvider,
  1560. shareVideoMessage
  1561. });
  1562. const compressImage = {
  1563. args(fromArgs, toArgs) {
  1564. if (fromArgs.compressedHeight && !toArgs.compressHeight) {
  1565. toArgs.compressHeight = fromArgs.compressedHeight;
  1566. }
  1567. if (fromArgs.compressedWidth && !toArgs.compressWidth) {
  1568. toArgs.compressWidth = fromArgs.compressedWidth;
  1569. }
  1570. }
  1571. };
  1572. var protocols = /* @__PURE__ */ Object.freeze({
  1573. __proto__: null,
  1574. compressImage,
  1575. getAppAuthorizeSetting,
  1576. getAppBaseInfo,
  1577. getDeviceInfo,
  1578. getSystemInfo,
  1579. getSystemInfoSync,
  1580. getWindowInfo,
  1581. previewImage,
  1582. redirectTo,
  1583. showActionSheet
  1584. });
  1585. const wx$1 = initWx();
  1586. var index$1 = initUni(shims, protocols, wx$1);
  1587. function warn$1(msg, ...args) {
  1588. console.warn(`[Vue warn] ${msg}`, ...args);
  1589. }
  1590. let activeEffectScope;
  1591. class EffectScope {
  1592. constructor(detached = false) {
  1593. this.detached = detached;
  1594. this._active = true;
  1595. this.effects = [];
  1596. this.cleanups = [];
  1597. this.parent = activeEffectScope;
  1598. if (!detached && activeEffectScope) {
  1599. this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
  1600. }
  1601. }
  1602. get active() {
  1603. return this._active;
  1604. }
  1605. run(fn) {
  1606. if (this._active) {
  1607. const currentEffectScope = activeEffectScope;
  1608. try {
  1609. activeEffectScope = this;
  1610. return fn();
  1611. } finally {
  1612. activeEffectScope = currentEffectScope;
  1613. }
  1614. } else {
  1615. warn$1(`cannot run an inactive effect scope.`);
  1616. }
  1617. }
  1618. /**
  1619. * This should only be called on non-detached scopes
  1620. * @internal
  1621. */
  1622. on() {
  1623. activeEffectScope = this;
  1624. }
  1625. /**
  1626. * This should only be called on non-detached scopes
  1627. * @internal
  1628. */
  1629. off() {
  1630. activeEffectScope = this.parent;
  1631. }
  1632. stop(fromParent) {
  1633. if (this._active) {
  1634. let i, l;
  1635. for (i = 0, l = this.effects.length; i < l; i++) {
  1636. this.effects[i].stop();
  1637. }
  1638. for (i = 0, l = this.cleanups.length; i < l; i++) {
  1639. this.cleanups[i]();
  1640. }
  1641. if (this.scopes) {
  1642. for (i = 0, l = this.scopes.length; i < l; i++) {
  1643. this.scopes[i].stop(true);
  1644. }
  1645. }
  1646. if (!this.detached && this.parent && !fromParent) {
  1647. const last = this.parent.scopes.pop();
  1648. if (last && last !== this) {
  1649. this.parent.scopes[this.index] = last;
  1650. last.index = this.index;
  1651. }
  1652. }
  1653. this.parent = void 0;
  1654. this._active = false;
  1655. }
  1656. }
  1657. }
  1658. function effectScope(detached) {
  1659. return new EffectScope(detached);
  1660. }
  1661. function recordEffectScope(effect, scope = activeEffectScope) {
  1662. if (scope && scope.active) {
  1663. scope.effects.push(effect);
  1664. }
  1665. }
  1666. function getCurrentScope() {
  1667. return activeEffectScope;
  1668. }
  1669. function onScopeDispose(fn) {
  1670. if (activeEffectScope) {
  1671. activeEffectScope.cleanups.push(fn);
  1672. } else {
  1673. warn$1(`onScopeDispose() is called when there is no active effect scope to be associated with.`);
  1674. }
  1675. }
  1676. const createDep = (effects) => {
  1677. const dep = new Set(effects);
  1678. dep.w = 0;
  1679. dep.n = 0;
  1680. return dep;
  1681. };
  1682. const wasTracked = (dep) => (dep.w & trackOpBit) > 0;
  1683. const newTracked = (dep) => (dep.n & trackOpBit) > 0;
  1684. const initDepMarkers = ({ deps }) => {
  1685. if (deps.length) {
  1686. for (let i = 0; i < deps.length; i++) {
  1687. deps[i].w |= trackOpBit;
  1688. }
  1689. }
  1690. };
  1691. const finalizeDepMarkers = (effect) => {
  1692. const { deps } = effect;
  1693. if (deps.length) {
  1694. let ptr = 0;
  1695. for (let i = 0; i < deps.length; i++) {
  1696. const dep = deps[i];
  1697. if (wasTracked(dep) && !newTracked(dep)) {
  1698. dep.delete(effect);
  1699. } else {
  1700. deps[ptr++] = dep;
  1701. }
  1702. dep.w &= ~trackOpBit;
  1703. dep.n &= ~trackOpBit;
  1704. }
  1705. deps.length = ptr;
  1706. }
  1707. };
  1708. const targetMap = /* @__PURE__ */ new WeakMap();
  1709. let effectTrackDepth = 0;
  1710. let trackOpBit = 1;
  1711. const maxMarkerBits = 30;
  1712. let activeEffect;
  1713. const ITERATE_KEY = Symbol("iterate");
  1714. const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate");
  1715. class ReactiveEffect {
  1716. constructor(fn, scheduler = null, scope) {
  1717. this.fn = fn;
  1718. this.scheduler = scheduler;
  1719. this.active = true;
  1720. this.deps = [];
  1721. this.parent = void 0;
  1722. recordEffectScope(this, scope);
  1723. }
  1724. run() {
  1725. if (!this.active) {
  1726. return this.fn();
  1727. }
  1728. let parent = activeEffect;
  1729. let lastShouldTrack = shouldTrack;
  1730. while (parent) {
  1731. if (parent === this) {
  1732. return;
  1733. }
  1734. parent = parent.parent;
  1735. }
  1736. try {
  1737. this.parent = activeEffect;
  1738. activeEffect = this;
  1739. shouldTrack = true;
  1740. trackOpBit = 1 << ++effectTrackDepth;
  1741. if (effectTrackDepth <= maxMarkerBits) {
  1742. initDepMarkers(this);
  1743. } else {
  1744. cleanupEffect(this);
  1745. }
  1746. return this.fn();
  1747. } finally {
  1748. if (effectTrackDepth <= maxMarkerBits) {
  1749. finalizeDepMarkers(this);
  1750. }
  1751. trackOpBit = 1 << --effectTrackDepth;
  1752. activeEffect = this.parent;
  1753. shouldTrack = lastShouldTrack;
  1754. this.parent = void 0;
  1755. if (this.deferStop) {
  1756. this.stop();
  1757. }
  1758. }
  1759. }
  1760. stop() {
  1761. if (activeEffect === this) {
  1762. this.deferStop = true;
  1763. } else if (this.active) {
  1764. cleanupEffect(this);
  1765. if (this.onStop) {
  1766. this.onStop();
  1767. }
  1768. this.active = false;
  1769. }
  1770. }
  1771. }
  1772. function cleanupEffect(effect) {
  1773. const { deps } = effect;
  1774. if (deps.length) {
  1775. for (let i = 0; i < deps.length; i++) {
  1776. deps[i].delete(effect);
  1777. }
  1778. deps.length = 0;
  1779. }
  1780. }
  1781. let shouldTrack = true;
  1782. const trackStack = [];
  1783. function pauseTracking() {
  1784. trackStack.push(shouldTrack);
  1785. shouldTrack = false;
  1786. }
  1787. function resetTracking() {
  1788. const last = trackStack.pop();
  1789. shouldTrack = last === void 0 ? true : last;
  1790. }
  1791. function track(target, type2, key) {
  1792. if (shouldTrack && activeEffect) {
  1793. let depsMap = targetMap.get(target);
  1794. if (!depsMap) {
  1795. targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
  1796. }
  1797. let dep = depsMap.get(key);
  1798. if (!dep) {
  1799. depsMap.set(key, dep = createDep());
  1800. }
  1801. const eventInfo = { effect: activeEffect, target, type: type2, key };
  1802. trackEffects(dep, eventInfo);
  1803. }
  1804. }
  1805. function trackEffects(dep, debuggerEventExtraInfo) {
  1806. let shouldTrack2 = false;
  1807. if (effectTrackDepth <= maxMarkerBits) {
  1808. if (!newTracked(dep)) {
  1809. dep.n |= trackOpBit;
  1810. shouldTrack2 = !wasTracked(dep);
  1811. }
  1812. } else {
  1813. shouldTrack2 = !dep.has(activeEffect);
  1814. }
  1815. if (shouldTrack2) {
  1816. dep.add(activeEffect);
  1817. activeEffect.deps.push(dep);
  1818. if (activeEffect.onTrack) {
  1819. activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo));
  1820. }
  1821. }
  1822. }
  1823. function trigger(target, type2, key, newValue, oldValue, oldTarget) {
  1824. const depsMap = targetMap.get(target);
  1825. if (!depsMap) {
  1826. return;
  1827. }
  1828. let deps = [];
  1829. if (type2 === "clear") {
  1830. deps = [...depsMap.values()];
  1831. } else if (key === "length" && isArray$1(target)) {
  1832. const newLength = Number(newValue);
  1833. depsMap.forEach((dep, key2) => {
  1834. if (key2 === "length" || key2 >= newLength) {
  1835. deps.push(dep);
  1836. }
  1837. });
  1838. } else {
  1839. if (key !== void 0) {
  1840. deps.push(depsMap.get(key));
  1841. }
  1842. switch (type2) {
  1843. case "add":
  1844. if (!isArray$1(target)) {
  1845. deps.push(depsMap.get(ITERATE_KEY));
  1846. if (isMap(target)) {
  1847. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  1848. }
  1849. } else if (isIntegerKey(key)) {
  1850. deps.push(depsMap.get("length"));
  1851. }
  1852. break;
  1853. case "delete":
  1854. if (!isArray$1(target)) {
  1855. deps.push(depsMap.get(ITERATE_KEY));
  1856. if (isMap(target)) {
  1857. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  1858. }
  1859. }
  1860. break;
  1861. case "set":
  1862. if (isMap(target)) {
  1863. deps.push(depsMap.get(ITERATE_KEY));
  1864. }
  1865. break;
  1866. }
  1867. }
  1868. const eventInfo = { target, type: type2, key, newValue, oldValue, oldTarget };
  1869. if (deps.length === 1) {
  1870. if (deps[0]) {
  1871. {
  1872. triggerEffects(deps[0], eventInfo);
  1873. }
  1874. }
  1875. } else {
  1876. const effects = [];
  1877. for (const dep of deps) {
  1878. if (dep) {
  1879. effects.push(...dep);
  1880. }
  1881. }
  1882. {
  1883. triggerEffects(createDep(effects), eventInfo);
  1884. }
  1885. }
  1886. }
  1887. function triggerEffects(dep, debuggerEventExtraInfo) {
  1888. const effects = isArray$1(dep) ? dep : [...dep];
  1889. for (const effect of effects) {
  1890. if (effect.computed) {
  1891. triggerEffect(effect, debuggerEventExtraInfo);
  1892. }
  1893. }
  1894. for (const effect of effects) {
  1895. if (!effect.computed) {
  1896. triggerEffect(effect, debuggerEventExtraInfo);
  1897. }
  1898. }
  1899. }
  1900. function triggerEffect(effect, debuggerEventExtraInfo) {
  1901. if (effect !== activeEffect || effect.allowRecurse) {
  1902. if (effect.onTrigger) {
  1903. effect.onTrigger(extend({ effect }, debuggerEventExtraInfo));
  1904. }
  1905. if (effect.scheduler) {
  1906. effect.scheduler();
  1907. } else {
  1908. effect.run();
  1909. }
  1910. }
  1911. }
  1912. function getDepFromReactive(object3, key) {
  1913. var _a2;
  1914. return (_a2 = targetMap.get(object3)) === null || _a2 === void 0 ? void 0 : _a2.get(key);
  1915. }
  1916. const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
  1917. const builtInSymbols = new Set(
  1918. /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
  1919. );
  1920. const get$1 = /* @__PURE__ */ createGetter();
  1921. const shallowGet = /* @__PURE__ */ createGetter(false, true);
  1922. const readonlyGet = /* @__PURE__ */ createGetter(true);
  1923. const shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);
  1924. const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
  1925. function createArrayInstrumentations() {
  1926. const instrumentations = {};
  1927. ["includes", "indexOf", "lastIndexOf"].forEach((key) => {
  1928. instrumentations[key] = function(...args) {
  1929. const arr = toRaw(this);
  1930. for (let i = 0, l = this.length; i < l; i++) {
  1931. track(arr, "get", i + "");
  1932. }
  1933. const res = arr[key](...args);
  1934. if (res === -1 || res === false) {
  1935. return arr[key](...args.map(toRaw));
  1936. } else {
  1937. return res;
  1938. }
  1939. };
  1940. });
  1941. ["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
  1942. instrumentations[key] = function(...args) {
  1943. pauseTracking();
  1944. const res = toRaw(this)[key].apply(this, args);
  1945. resetTracking();
  1946. return res;
  1947. };
  1948. });
  1949. return instrumentations;
  1950. }
  1951. function hasOwnProperty(key) {
  1952. const obj = toRaw(this);
  1953. track(obj, "has", key);
  1954. return obj.hasOwnProperty(key);
  1955. }
  1956. function createGetter(isReadonly2 = false, shallow = false) {
  1957. return function get2(target, key, receiver) {
  1958. if (key === "__v_isReactive") {
  1959. return !isReadonly2;
  1960. } else if (key === "__v_isReadonly") {
  1961. return isReadonly2;
  1962. } else if (key === "__v_isShallow") {
  1963. return shallow;
  1964. } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {
  1965. return target;
  1966. }
  1967. const targetIsArray = isArray$1(target);
  1968. if (!isReadonly2) {
  1969. if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
  1970. return Reflect.get(arrayInstrumentations, key, receiver);
  1971. }
  1972. if (key === "hasOwnProperty") {
  1973. return hasOwnProperty;
  1974. }
  1975. }
  1976. const res = Reflect.get(target, key, receiver);
  1977. if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
  1978. return res;
  1979. }
  1980. if (!isReadonly2) {
  1981. track(target, "get", key);
  1982. }
  1983. if (shallow) {
  1984. return res;
  1985. }
  1986. if (isRef(res)) {
  1987. return targetIsArray && isIntegerKey(key) ? res : res.value;
  1988. }
  1989. if (isObject$1(res)) {
  1990. return isReadonly2 ? readonly(res) : reactive(res);
  1991. }
  1992. return res;
  1993. };
  1994. }
  1995. const set$1 = /* @__PURE__ */ createSetter();
  1996. const shallowSet = /* @__PURE__ */ createSetter(true);
  1997. function createSetter(shallow = false) {
  1998. return function set2(target, key, value, receiver) {
  1999. let oldValue = target[key];
  2000. if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
  2001. return false;
  2002. }
  2003. if (!shallow) {
  2004. if (!isShallow(value) && !isReadonly(value)) {
  2005. oldValue = toRaw(oldValue);
  2006. value = toRaw(value);
  2007. }
  2008. if (!isArray$1(target) && isRef(oldValue) && !isRef(value)) {
  2009. oldValue.value = value;
  2010. return true;
  2011. }
  2012. }
  2013. const hadKey = isArray$1(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
  2014. const result = Reflect.set(target, key, value, receiver);
  2015. if (target === toRaw(receiver)) {
  2016. if (!hadKey) {
  2017. trigger(target, "add", key, value);
  2018. } else if (hasChanged(value, oldValue)) {
  2019. trigger(target, "set", key, value, oldValue);
  2020. }
  2021. }
  2022. return result;
  2023. };
  2024. }
  2025. function deleteProperty(target, key) {
  2026. const hadKey = hasOwn(target, key);
  2027. const oldValue = target[key];
  2028. const result = Reflect.deleteProperty(target, key);
  2029. if (result && hadKey) {
  2030. trigger(target, "delete", key, void 0, oldValue);
  2031. }
  2032. return result;
  2033. }
  2034. function has$1(target, key) {
  2035. const result = Reflect.has(target, key);
  2036. if (!isSymbol(key) || !builtInSymbols.has(key)) {
  2037. track(target, "has", key);
  2038. }
  2039. return result;
  2040. }
  2041. function ownKeys(target) {
  2042. track(target, "iterate", isArray$1(target) ? "length" : ITERATE_KEY);
  2043. return Reflect.ownKeys(target);
  2044. }
  2045. const mutableHandlers = {
  2046. get: get$1,
  2047. set: set$1,
  2048. deleteProperty,
  2049. has: has$1,
  2050. ownKeys
  2051. };
  2052. const readonlyHandlers = {
  2053. get: readonlyGet,
  2054. set(target, key) {
  2055. {
  2056. warn$1(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
  2057. }
  2058. return true;
  2059. },
  2060. deleteProperty(target, key) {
  2061. {
  2062. warn$1(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
  2063. }
  2064. return true;
  2065. }
  2066. };
  2067. const shallowReactiveHandlers = /* @__PURE__ */ extend({}, mutableHandlers, {
  2068. get: shallowGet,
  2069. set: shallowSet
  2070. });
  2071. const shallowReadonlyHandlers = /* @__PURE__ */ extend({}, readonlyHandlers, {
  2072. get: shallowReadonlyGet
  2073. });
  2074. const toShallow = (value) => value;
  2075. const getProto = (v) => Reflect.getPrototypeOf(v);
  2076. function get(target, key, isReadonly2 = false, isShallow2 = false) {
  2077. target = target[
  2078. "__v_raw"
  2079. /* ReactiveFlags.RAW */
  2080. ];
  2081. const rawTarget = toRaw(target);
  2082. const rawKey = toRaw(key);
  2083. if (!isReadonly2) {
  2084. if (key !== rawKey) {
  2085. track(rawTarget, "get", key);
  2086. }
  2087. track(rawTarget, "get", rawKey);
  2088. }
  2089. const { has: has2 } = getProto(rawTarget);
  2090. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  2091. if (has2.call(rawTarget, key)) {
  2092. return wrap(target.get(key));
  2093. } else if (has2.call(rawTarget, rawKey)) {
  2094. return wrap(target.get(rawKey));
  2095. } else if (target !== rawTarget) {
  2096. target.get(key);
  2097. }
  2098. }
  2099. function has(key, isReadonly2 = false) {
  2100. const target = this[
  2101. "__v_raw"
  2102. /* ReactiveFlags.RAW */
  2103. ];
  2104. const rawTarget = toRaw(target);
  2105. const rawKey = toRaw(key);
  2106. if (!isReadonly2) {
  2107. if (key !== rawKey) {
  2108. track(rawTarget, "has", key);
  2109. }
  2110. track(rawTarget, "has", rawKey);
  2111. }
  2112. return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
  2113. }
  2114. function size(target, isReadonly2 = false) {
  2115. target = target[
  2116. "__v_raw"
  2117. /* ReactiveFlags.RAW */
  2118. ];
  2119. !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
  2120. return Reflect.get(target, "size", target);
  2121. }
  2122. function add(value) {
  2123. value = toRaw(value);
  2124. const target = toRaw(this);
  2125. const proto = getProto(target);
  2126. const hadKey = proto.has.call(target, value);
  2127. if (!hadKey) {
  2128. target.add(value);
  2129. trigger(target, "add", value, value);
  2130. }
  2131. return this;
  2132. }
  2133. function set$2(key, value) {
  2134. value = toRaw(value);
  2135. const target = toRaw(this);
  2136. const { has: has2, get: get2 } = getProto(target);
  2137. let hadKey = has2.call(target, key);
  2138. if (!hadKey) {
  2139. key = toRaw(key);
  2140. hadKey = has2.call(target, key);
  2141. } else {
  2142. checkIdentityKeys(target, has2, key);
  2143. }
  2144. const oldValue = get2.call(target, key);
  2145. target.set(key, value);
  2146. if (!hadKey) {
  2147. trigger(target, "add", key, value);
  2148. } else if (hasChanged(value, oldValue)) {
  2149. trigger(target, "set", key, value, oldValue);
  2150. }
  2151. return this;
  2152. }
  2153. function deleteEntry(key) {
  2154. const target = toRaw(this);
  2155. const { has: has2, get: get2 } = getProto(target);
  2156. let hadKey = has2.call(target, key);
  2157. if (!hadKey) {
  2158. key = toRaw(key);
  2159. hadKey = has2.call(target, key);
  2160. } else {
  2161. checkIdentityKeys(target, has2, key);
  2162. }
  2163. const oldValue = get2 ? get2.call(target, key) : void 0;
  2164. const result = target.delete(key);
  2165. if (hadKey) {
  2166. trigger(target, "delete", key, void 0, oldValue);
  2167. }
  2168. return result;
  2169. }
  2170. function clear() {
  2171. const target = toRaw(this);
  2172. const hadItems = target.size !== 0;
  2173. const oldTarget = isMap(target) ? new Map(target) : new Set(target);
  2174. const result = target.clear();
  2175. if (hadItems) {
  2176. trigger(target, "clear", void 0, void 0, oldTarget);
  2177. }
  2178. return result;
  2179. }
  2180. function createForEach(isReadonly2, isShallow2) {
  2181. return function forEach3(callback, thisArg) {
  2182. const observed = this;
  2183. const target = observed[
  2184. "__v_raw"
  2185. /* ReactiveFlags.RAW */
  2186. ];
  2187. const rawTarget = toRaw(target);
  2188. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  2189. !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
  2190. return target.forEach((value, key) => {
  2191. return callback.call(thisArg, wrap(value), wrap(key), observed);
  2192. });
  2193. };
  2194. }
  2195. function createIterableMethod(method3, isReadonly2, isShallow2) {
  2196. return function(...args) {
  2197. const target = this[
  2198. "__v_raw"
  2199. /* ReactiveFlags.RAW */
  2200. ];
  2201. const rawTarget = toRaw(target);
  2202. const targetIsMap = isMap(rawTarget);
  2203. const isPair = method3 === "entries" || method3 === Symbol.iterator && targetIsMap;
  2204. const isKeyOnly = method3 === "keys" && targetIsMap;
  2205. const innerIterator = target[method3](...args);
  2206. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  2207. !isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
  2208. return {
  2209. // iterator protocol
  2210. next() {
  2211. const { value, done } = innerIterator.next();
  2212. return done ? { value, done } : {
  2213. value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
  2214. done
  2215. };
  2216. },
  2217. // iterable protocol
  2218. [Symbol.iterator]() {
  2219. return this;
  2220. }
  2221. };
  2222. };
  2223. }
  2224. function createReadonlyMethod(type2) {
  2225. return function(...args) {
  2226. {
  2227. const key = args[0] ? `on key "${args[0]}" ` : ``;
  2228. console.warn(`${capitalize(type2)} operation ${key}failed: target is readonly.`, toRaw(this));
  2229. }
  2230. return type2 === "delete" ? false : this;
  2231. };
  2232. }
  2233. function createInstrumentations() {
  2234. const mutableInstrumentations2 = {
  2235. get(key) {
  2236. return get(this, key);
  2237. },
  2238. get size() {
  2239. return size(this);
  2240. },
  2241. has,
  2242. add,
  2243. set: set$2,
  2244. delete: deleteEntry,
  2245. clear,
  2246. forEach: createForEach(false, false)
  2247. };
  2248. const shallowInstrumentations2 = {
  2249. get(key) {
  2250. return get(this, key, false, true);
  2251. },
  2252. get size() {
  2253. return size(this);
  2254. },
  2255. has,
  2256. add,
  2257. set: set$2,
  2258. delete: deleteEntry,
  2259. clear,
  2260. forEach: createForEach(false, true)
  2261. };
  2262. const readonlyInstrumentations2 = {
  2263. get(key) {
  2264. return get(this, key, true);
  2265. },
  2266. get size() {
  2267. return size(this, true);
  2268. },
  2269. has(key) {
  2270. return has.call(this, key, true);
  2271. },
  2272. add: createReadonlyMethod(
  2273. "add"
  2274. /* TriggerOpTypes.ADD */
  2275. ),
  2276. set: createReadonlyMethod(
  2277. "set"
  2278. /* TriggerOpTypes.SET */
  2279. ),
  2280. delete: createReadonlyMethod(
  2281. "delete"
  2282. /* TriggerOpTypes.DELETE */
  2283. ),
  2284. clear: createReadonlyMethod(
  2285. "clear"
  2286. /* TriggerOpTypes.CLEAR */
  2287. ),
  2288. forEach: createForEach(true, false)
  2289. };
  2290. const shallowReadonlyInstrumentations2 = {
  2291. get(key) {
  2292. return get(this, key, true, true);
  2293. },
  2294. get size() {
  2295. return size(this, true);
  2296. },
  2297. has(key) {
  2298. return has.call(this, key, true);
  2299. },
  2300. add: createReadonlyMethod(
  2301. "add"
  2302. /* TriggerOpTypes.ADD */
  2303. ),
  2304. set: createReadonlyMethod(
  2305. "set"
  2306. /* TriggerOpTypes.SET */
  2307. ),
  2308. delete: createReadonlyMethod(
  2309. "delete"
  2310. /* TriggerOpTypes.DELETE */
  2311. ),
  2312. clear: createReadonlyMethod(
  2313. "clear"
  2314. /* TriggerOpTypes.CLEAR */
  2315. ),
  2316. forEach: createForEach(true, true)
  2317. };
  2318. const iteratorMethods = ["keys", "values", "entries", Symbol.iterator];
  2319. iteratorMethods.forEach((method3) => {
  2320. mutableInstrumentations2[method3] = createIterableMethod(method3, false, false);
  2321. readonlyInstrumentations2[method3] = createIterableMethod(method3, true, false);
  2322. shallowInstrumentations2[method3] = createIterableMethod(method3, false, true);
  2323. shallowReadonlyInstrumentations2[method3] = createIterableMethod(method3, true, true);
  2324. });
  2325. return [
  2326. mutableInstrumentations2,
  2327. readonlyInstrumentations2,
  2328. shallowInstrumentations2,
  2329. shallowReadonlyInstrumentations2
  2330. ];
  2331. }
  2332. const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* @__PURE__ */ createInstrumentations();
  2333. function createInstrumentationGetter(isReadonly2, shallow) {
  2334. const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
  2335. return (target, key, receiver) => {
  2336. if (key === "__v_isReactive") {
  2337. return !isReadonly2;
  2338. } else if (key === "__v_isReadonly") {
  2339. return isReadonly2;
  2340. } else if (key === "__v_raw") {
  2341. return target;
  2342. }
  2343. return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
  2344. };
  2345. }
  2346. const mutableCollectionHandlers = {
  2347. get: /* @__PURE__ */ createInstrumentationGetter(false, false)
  2348. };
  2349. const shallowCollectionHandlers = {
  2350. get: /* @__PURE__ */ createInstrumentationGetter(false, true)
  2351. };
  2352. const readonlyCollectionHandlers = {
  2353. get: /* @__PURE__ */ createInstrumentationGetter(true, false)
  2354. };
  2355. const shallowReadonlyCollectionHandlers = {
  2356. get: /* @__PURE__ */ createInstrumentationGetter(true, true)
  2357. };
  2358. function checkIdentityKeys(target, has2, key) {
  2359. const rawKey = toRaw(key);
  2360. if (rawKey !== key && has2.call(target, rawKey)) {
  2361. const type2 = toRawType(target);
  2362. console.warn(`Reactive ${type2} contains both the raw and reactive versions of the same object${type2 === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`);
  2363. }
  2364. }
  2365. const reactiveMap = /* @__PURE__ */ new WeakMap();
  2366. const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
  2367. const readonlyMap = /* @__PURE__ */ new WeakMap();
  2368. const shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
  2369. function targetTypeMap(rawType) {
  2370. switch (rawType) {
  2371. case "Object":
  2372. case "Array":
  2373. return 1;
  2374. case "Map":
  2375. case "Set":
  2376. case "WeakMap":
  2377. case "WeakSet":
  2378. return 2;
  2379. default:
  2380. return 0;
  2381. }
  2382. }
  2383. function getTargetType(value) {
  2384. return value[
  2385. "__v_skip"
  2386. /* ReactiveFlags.SKIP */
  2387. ] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
  2388. }
  2389. function reactive(target) {
  2390. if (isReadonly(target)) {
  2391. return target;
  2392. }
  2393. return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
  2394. }
  2395. function shallowReactive(target) {
  2396. return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
  2397. }
  2398. function readonly(target) {
  2399. return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
  2400. }
  2401. function shallowReadonly(target) {
  2402. return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
  2403. }
  2404. function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
  2405. if (!isObject$1(target)) {
  2406. {
  2407. console.warn(`value cannot be made reactive: ${String(target)}`);
  2408. }
  2409. return target;
  2410. }
  2411. if (target[
  2412. "__v_raw"
  2413. /* ReactiveFlags.RAW */
  2414. ] && !(isReadonly2 && target[
  2415. "__v_isReactive"
  2416. /* ReactiveFlags.IS_REACTIVE */
  2417. ])) {
  2418. return target;
  2419. }
  2420. const existingProxy = proxyMap.get(target);
  2421. if (existingProxy) {
  2422. return existingProxy;
  2423. }
  2424. const targetType = getTargetType(target);
  2425. if (targetType === 0) {
  2426. return target;
  2427. }
  2428. const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
  2429. proxyMap.set(target, proxy);
  2430. return proxy;
  2431. }
  2432. function isReactive(value) {
  2433. if (isReadonly(value)) {
  2434. return isReactive(value[
  2435. "__v_raw"
  2436. /* ReactiveFlags.RAW */
  2437. ]);
  2438. }
  2439. return !!(value && value[
  2440. "__v_isReactive"
  2441. /* ReactiveFlags.IS_REACTIVE */
  2442. ]);
  2443. }
  2444. function isReadonly(value) {
  2445. return !!(value && value[
  2446. "__v_isReadonly"
  2447. /* ReactiveFlags.IS_READONLY */
  2448. ]);
  2449. }
  2450. function isShallow(value) {
  2451. return !!(value && value[
  2452. "__v_isShallow"
  2453. /* ReactiveFlags.IS_SHALLOW */
  2454. ]);
  2455. }
  2456. function isProxy(value) {
  2457. return isReactive(value) || isReadonly(value);
  2458. }
  2459. function toRaw(observed) {
  2460. const raw = observed && observed[
  2461. "__v_raw"
  2462. /* ReactiveFlags.RAW */
  2463. ];
  2464. return raw ? toRaw(raw) : observed;
  2465. }
  2466. function markRaw(value) {
  2467. def(value, "__v_skip", true);
  2468. return value;
  2469. }
  2470. const toReactive = (value) => isObject$1(value) ? reactive(value) : value;
  2471. const toReadonly = (value) => isObject$1(value) ? readonly(value) : value;
  2472. function trackRefValue(ref2) {
  2473. if (shouldTrack && activeEffect) {
  2474. ref2 = toRaw(ref2);
  2475. {
  2476. trackEffects(ref2.dep || (ref2.dep = createDep()), {
  2477. target: ref2,
  2478. type: "get",
  2479. key: "value"
  2480. });
  2481. }
  2482. }
  2483. }
  2484. function triggerRefValue(ref2, newVal) {
  2485. ref2 = toRaw(ref2);
  2486. const dep = ref2.dep;
  2487. if (dep) {
  2488. {
  2489. triggerEffects(dep, {
  2490. target: ref2,
  2491. type: "set",
  2492. key: "value",
  2493. newValue: newVal
  2494. });
  2495. }
  2496. }
  2497. }
  2498. function isRef(r) {
  2499. return !!(r && r.__v_isRef === true);
  2500. }
  2501. function ref(value) {
  2502. return createRef(value, false);
  2503. }
  2504. function createRef(rawValue, shallow) {
  2505. if (isRef(rawValue)) {
  2506. return rawValue;
  2507. }
  2508. return new RefImpl(rawValue, shallow);
  2509. }
  2510. class RefImpl {
  2511. constructor(value, __v_isShallow) {
  2512. this.__v_isShallow = __v_isShallow;
  2513. this.dep = void 0;
  2514. this.__v_isRef = true;
  2515. this._rawValue = __v_isShallow ? value : toRaw(value);
  2516. this._value = __v_isShallow ? value : toReactive(value);
  2517. }
  2518. get value() {
  2519. trackRefValue(this);
  2520. return this._value;
  2521. }
  2522. set value(newVal) {
  2523. const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);
  2524. newVal = useDirectValue ? newVal : toRaw(newVal);
  2525. if (hasChanged(newVal, this._rawValue)) {
  2526. this._rawValue = newVal;
  2527. this._value = useDirectValue ? newVal : toReactive(newVal);
  2528. triggerRefValue(this, newVal);
  2529. }
  2530. }
  2531. }
  2532. function unref(ref2) {
  2533. return isRef(ref2) ? ref2.value : ref2;
  2534. }
  2535. const shallowUnwrapHandlers = {
  2536. get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
  2537. set: (target, key, value, receiver) => {
  2538. const oldValue = target[key];
  2539. if (isRef(oldValue) && !isRef(value)) {
  2540. oldValue.value = value;
  2541. return true;
  2542. } else {
  2543. return Reflect.set(target, key, value, receiver);
  2544. }
  2545. }
  2546. };
  2547. function proxyRefs(objectWithRefs) {
  2548. return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
  2549. }
  2550. function toRefs(object3) {
  2551. if (!isProxy(object3)) {
  2552. console.warn(`toRefs() expects a reactive object but received a plain one.`);
  2553. }
  2554. const ret = isArray$1(object3) ? new Array(object3.length) : {};
  2555. for (const key in object3) {
  2556. ret[key] = toRef(object3, key);
  2557. }
  2558. return ret;
  2559. }
  2560. class ObjectRefImpl {
  2561. constructor(_object, _key, _defaultValue) {
  2562. this._object = _object;
  2563. this._key = _key;
  2564. this._defaultValue = _defaultValue;
  2565. this.__v_isRef = true;
  2566. }
  2567. get value() {
  2568. const val = this._object[this._key];
  2569. return val === void 0 ? this._defaultValue : val;
  2570. }
  2571. set value(newVal) {
  2572. this._object[this._key] = newVal;
  2573. }
  2574. get dep() {
  2575. return getDepFromReactive(toRaw(this._object), this._key);
  2576. }
  2577. }
  2578. function toRef(object3, key, defaultValue) {
  2579. const val = object3[key];
  2580. return isRef(val) ? val : new ObjectRefImpl(object3, key, defaultValue);
  2581. }
  2582. var _a;
  2583. class ComputedRefImpl {
  2584. constructor(getter, _setter, isReadonly2, isSSR) {
  2585. this._setter = _setter;
  2586. this.dep = void 0;
  2587. this.__v_isRef = true;
  2588. this[_a] = false;
  2589. this._dirty = true;
  2590. this.effect = new ReactiveEffect(getter, () => {
  2591. if (!this._dirty) {
  2592. this._dirty = true;
  2593. triggerRefValue(this);
  2594. }
  2595. });
  2596. this.effect.computed = this;
  2597. this.effect.active = this._cacheable = !isSSR;
  2598. this[
  2599. "__v_isReadonly"
  2600. /* ReactiveFlags.IS_READONLY */
  2601. ] = isReadonly2;
  2602. }
  2603. get value() {
  2604. const self2 = toRaw(this);
  2605. trackRefValue(self2);
  2606. if (self2._dirty || !self2._cacheable) {
  2607. self2._dirty = false;
  2608. self2._value = self2.effect.run();
  2609. }
  2610. return self2._value;
  2611. }
  2612. set value(newValue) {
  2613. this._setter(newValue);
  2614. }
  2615. }
  2616. _a = "__v_isReadonly";
  2617. function computed$1(getterOrOptions, debugOptions, isSSR = false) {
  2618. let getter;
  2619. let setter;
  2620. const onlyGetter = isFunction(getterOrOptions);
  2621. if (onlyGetter) {
  2622. getter = getterOrOptions;
  2623. setter = () => {
  2624. console.warn("Write operation failed: computed value is readonly");
  2625. };
  2626. } else {
  2627. getter = getterOrOptions.get;
  2628. setter = getterOrOptions.set;
  2629. }
  2630. const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);
  2631. if (debugOptions && !isSSR) {
  2632. cRef.effect.onTrack = debugOptions.onTrack;
  2633. cRef.effect.onTrigger = debugOptions.onTrigger;
  2634. }
  2635. return cRef;
  2636. }
  2637. const stack = [];
  2638. function pushWarningContext(vnode) {
  2639. stack.push(vnode);
  2640. }
  2641. function popWarningContext() {
  2642. stack.pop();
  2643. }
  2644. function warn(msg, ...args) {
  2645. pauseTracking();
  2646. const instance = stack.length ? stack[stack.length - 1].component : null;
  2647. const appWarnHandler = instance && instance.appContext.config.warnHandler;
  2648. const trace = getComponentTrace();
  2649. if (appWarnHandler) {
  2650. callWithErrorHandling(appWarnHandler, instance, 11, [
  2651. msg + args.join(""),
  2652. instance && instance.proxy,
  2653. trace.map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`).join("\n"),
  2654. trace
  2655. ]);
  2656. } else {
  2657. const warnArgs = [`[Vue warn]: ${msg}`, ...args];
  2658. if (trace.length && // avoid spamming console during tests
  2659. true) {
  2660. warnArgs.push(`
  2661. `, ...formatTrace(trace));
  2662. }
  2663. console.warn(...warnArgs);
  2664. }
  2665. resetTracking();
  2666. }
  2667. function getComponentTrace() {
  2668. let currentVNode = stack[stack.length - 1];
  2669. if (!currentVNode) {
  2670. return [];
  2671. }
  2672. const normalizedStack = [];
  2673. while (currentVNode) {
  2674. const last = normalizedStack[0];
  2675. if (last && last.vnode === currentVNode) {
  2676. last.recurseCount++;
  2677. } else {
  2678. normalizedStack.push({
  2679. vnode: currentVNode,
  2680. recurseCount: 0
  2681. });
  2682. }
  2683. const parentInstance = currentVNode.component && currentVNode.component.parent;
  2684. currentVNode = parentInstance && parentInstance.vnode;
  2685. }
  2686. return normalizedStack;
  2687. }
  2688. function formatTrace(trace) {
  2689. const logs = [];
  2690. trace.forEach((entry, i) => {
  2691. logs.push(...i === 0 ? [] : [`
  2692. `], ...formatTraceEntry(entry));
  2693. });
  2694. return logs;
  2695. }
  2696. function formatTraceEntry({ vnode, recurseCount }) {
  2697. const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
  2698. const isRoot = vnode.component ? vnode.component.parent == null : false;
  2699. const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`;
  2700. const close = `>` + postfix;
  2701. return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
  2702. }
  2703. function formatProps(props2) {
  2704. const res = [];
  2705. const keys = Object.keys(props2);
  2706. keys.slice(0, 3).forEach((key) => {
  2707. res.push(...formatProp(key, props2[key]));
  2708. });
  2709. if (keys.length > 3) {
  2710. res.push(` ...`);
  2711. }
  2712. return res;
  2713. }
  2714. function formatProp(key, value, raw) {
  2715. if (isString(value)) {
  2716. value = JSON.stringify(value);
  2717. return raw ? value : [`${key}=${value}`];
  2718. } else if (typeof value === "number" || typeof value === "boolean" || value == null) {
  2719. return raw ? value : [`${key}=${value}`];
  2720. } else if (isRef(value)) {
  2721. value = formatProp(key, toRaw(value.value), true);
  2722. return raw ? value : [`${key}=Ref<`, value, `>`];
  2723. } else if (isFunction(value)) {
  2724. return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
  2725. } else {
  2726. value = toRaw(value);
  2727. return raw ? value : [`${key}=`, value];
  2728. }
  2729. }
  2730. const ErrorTypeStrings = {
  2731. [
  2732. "sp"
  2733. /* LifecycleHooks.SERVER_PREFETCH */
  2734. ]: "serverPrefetch hook",
  2735. [
  2736. "bc"
  2737. /* LifecycleHooks.BEFORE_CREATE */
  2738. ]: "beforeCreate hook",
  2739. [
  2740. "c"
  2741. /* LifecycleHooks.CREATED */
  2742. ]: "created hook",
  2743. [
  2744. "bm"
  2745. /* LifecycleHooks.BEFORE_MOUNT */
  2746. ]: "beforeMount hook",
  2747. [
  2748. "m"
  2749. /* LifecycleHooks.MOUNTED */
  2750. ]: "mounted hook",
  2751. [
  2752. "bu"
  2753. /* LifecycleHooks.BEFORE_UPDATE */
  2754. ]: "beforeUpdate hook",
  2755. [
  2756. "u"
  2757. /* LifecycleHooks.UPDATED */
  2758. ]: "updated",
  2759. [
  2760. "bum"
  2761. /* LifecycleHooks.BEFORE_UNMOUNT */
  2762. ]: "beforeUnmount hook",
  2763. [
  2764. "um"
  2765. /* LifecycleHooks.UNMOUNTED */
  2766. ]: "unmounted hook",
  2767. [
  2768. "a"
  2769. /* LifecycleHooks.ACTIVATED */
  2770. ]: "activated hook",
  2771. [
  2772. "da"
  2773. /* LifecycleHooks.DEACTIVATED */
  2774. ]: "deactivated hook",
  2775. [
  2776. "ec"
  2777. /* LifecycleHooks.ERROR_CAPTURED */
  2778. ]: "errorCaptured hook",
  2779. [
  2780. "rtc"
  2781. /* LifecycleHooks.RENDER_TRACKED */
  2782. ]: "renderTracked hook",
  2783. [
  2784. "rtg"
  2785. /* LifecycleHooks.RENDER_TRIGGERED */
  2786. ]: "renderTriggered hook",
  2787. [
  2788. 0
  2789. /* ErrorCodes.SETUP_FUNCTION */
  2790. ]: "setup function",
  2791. [
  2792. 1
  2793. /* ErrorCodes.RENDER_FUNCTION */
  2794. ]: "render function",
  2795. [
  2796. 2
  2797. /* ErrorCodes.WATCH_GETTER */
  2798. ]: "watcher getter",
  2799. [
  2800. 3
  2801. /* ErrorCodes.WATCH_CALLBACK */
  2802. ]: "watcher callback",
  2803. [
  2804. 4
  2805. /* ErrorCodes.WATCH_CLEANUP */
  2806. ]: "watcher cleanup function",
  2807. [
  2808. 5
  2809. /* ErrorCodes.NATIVE_EVENT_HANDLER */
  2810. ]: "native event handler",
  2811. [
  2812. 6
  2813. /* ErrorCodes.COMPONENT_EVENT_HANDLER */
  2814. ]: "component event handler",
  2815. [
  2816. 7
  2817. /* ErrorCodes.VNODE_HOOK */
  2818. ]: "vnode hook",
  2819. [
  2820. 8
  2821. /* ErrorCodes.DIRECTIVE_HOOK */
  2822. ]: "directive hook",
  2823. [
  2824. 9
  2825. /* ErrorCodes.TRANSITION_HOOK */
  2826. ]: "transition hook",
  2827. [
  2828. 10
  2829. /* ErrorCodes.APP_ERROR_HANDLER */
  2830. ]: "app errorHandler",
  2831. [
  2832. 11
  2833. /* ErrorCodes.APP_WARN_HANDLER */
  2834. ]: "app warnHandler",
  2835. [
  2836. 12
  2837. /* ErrorCodes.FUNCTION_REF */
  2838. ]: "ref function",
  2839. [
  2840. 13
  2841. /* ErrorCodes.ASYNC_COMPONENT_LOADER */
  2842. ]: "async component loader",
  2843. [
  2844. 14
  2845. /* ErrorCodes.SCHEDULER */
  2846. ]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
  2847. };
  2848. function callWithErrorHandling(fn, instance, type2, args) {
  2849. let res;
  2850. try {
  2851. res = args ? fn(...args) : fn();
  2852. } catch (err) {
  2853. handleError(err, instance, type2);
  2854. }
  2855. return res;
  2856. }
  2857. function callWithAsyncErrorHandling(fn, instance, type2, args) {
  2858. if (isFunction(fn)) {
  2859. const res = callWithErrorHandling(fn, instance, type2, args);
  2860. if (res && isPromise(res)) {
  2861. res.catch((err) => {
  2862. handleError(err, instance, type2);
  2863. });
  2864. }
  2865. return res;
  2866. }
  2867. const values = [];
  2868. for (let i = 0; i < fn.length; i++) {
  2869. values.push(callWithAsyncErrorHandling(fn[i], instance, type2, args));
  2870. }
  2871. return values;
  2872. }
  2873. function handleError(err, instance, type2, throwInDev = true) {
  2874. const contextVNode = instance ? instance.vnode : null;
  2875. if (instance) {
  2876. let cur = instance.parent;
  2877. const exposedInstance = instance.proxy;
  2878. const errorInfo = ErrorTypeStrings[type2] || type2;
  2879. while (cur) {
  2880. const errorCapturedHooks = cur.ec;
  2881. if (errorCapturedHooks) {
  2882. for (let i = 0; i < errorCapturedHooks.length; i++) {
  2883. if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
  2884. return;
  2885. }
  2886. }
  2887. }
  2888. cur = cur.parent;
  2889. }
  2890. const appErrorHandler = instance.appContext.config.errorHandler;
  2891. if (appErrorHandler) {
  2892. callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]);
  2893. return;
  2894. }
  2895. }
  2896. logError(err, type2, contextVNode, throwInDev);
  2897. }
  2898. function logError(err, type2, contextVNode, throwInDev = true) {
  2899. {
  2900. const info = ErrorTypeStrings[type2] || type2;
  2901. if (contextVNode) {
  2902. pushWarningContext(contextVNode);
  2903. }
  2904. warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
  2905. if (contextVNode) {
  2906. popWarningContext();
  2907. }
  2908. if (throwInDev) {
  2909. console.error(err);
  2910. } else {
  2911. console.error(err);
  2912. }
  2913. }
  2914. }
  2915. let isFlushing = false;
  2916. let isFlushPending = false;
  2917. const queue = [];
  2918. let flushIndex = 0;
  2919. const pendingPostFlushCbs = [];
  2920. let activePostFlushCbs = null;
  2921. let postFlushIndex = 0;
  2922. const resolvedPromise = /* @__PURE__ */ Promise.resolve();
  2923. let currentFlushPromise = null;
  2924. const RECURSION_LIMIT = 100;
  2925. function nextTick$1(fn) {
  2926. const p2 = currentFlushPromise || resolvedPromise;
  2927. return fn ? p2.then(this ? fn.bind(this) : fn) : p2;
  2928. }
  2929. function findInsertionIndex(id) {
  2930. let start = flushIndex + 1;
  2931. let end = queue.length;
  2932. while (start < end) {
  2933. const middle = start + end >>> 1;
  2934. const middleJobId = getId(queue[middle]);
  2935. middleJobId < id ? start = middle + 1 : end = middle;
  2936. }
  2937. return start;
  2938. }
  2939. function queueJob(job) {
  2940. if (!queue.length || !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) {
  2941. if (job.id == null) {
  2942. queue.push(job);
  2943. } else {
  2944. queue.splice(findInsertionIndex(job.id), 0, job);
  2945. }
  2946. queueFlush();
  2947. }
  2948. }
  2949. function queueFlush() {
  2950. if (!isFlushing && !isFlushPending) {
  2951. isFlushPending = true;
  2952. currentFlushPromise = resolvedPromise.then(flushJobs);
  2953. }
  2954. }
  2955. function hasQueueJob(job) {
  2956. return queue.indexOf(job) > -1;
  2957. }
  2958. function invalidateJob(job) {
  2959. const i = queue.indexOf(job);
  2960. if (i > flushIndex) {
  2961. queue.splice(i, 1);
  2962. }
  2963. }
  2964. function queuePostFlushCb(cb) {
  2965. if (!isArray$1(cb)) {
  2966. if (!activePostFlushCbs || !activePostFlushCbs.includes(cb, cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex)) {
  2967. pendingPostFlushCbs.push(cb);
  2968. }
  2969. } else {
  2970. pendingPostFlushCbs.push(...cb);
  2971. }
  2972. queueFlush();
  2973. }
  2974. function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {
  2975. {
  2976. seen = seen || /* @__PURE__ */ new Map();
  2977. }
  2978. for (; i < queue.length; i++) {
  2979. const cb = queue[i];
  2980. if (cb && cb.pre) {
  2981. if (checkRecursiveUpdates(seen, cb)) {
  2982. continue;
  2983. }
  2984. queue.splice(i, 1);
  2985. i--;
  2986. cb();
  2987. }
  2988. }
  2989. }
  2990. function flushPostFlushCbs(seen) {
  2991. if (pendingPostFlushCbs.length) {
  2992. const deduped = [...new Set(pendingPostFlushCbs)];
  2993. pendingPostFlushCbs.length = 0;
  2994. if (activePostFlushCbs) {
  2995. activePostFlushCbs.push(...deduped);
  2996. return;
  2997. }
  2998. activePostFlushCbs = deduped;
  2999. {
  3000. seen = seen || /* @__PURE__ */ new Map();
  3001. }
  3002. activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
  3003. for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
  3004. if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
  3005. continue;
  3006. }
  3007. activePostFlushCbs[postFlushIndex]();
  3008. }
  3009. activePostFlushCbs = null;
  3010. postFlushIndex = 0;
  3011. }
  3012. }
  3013. const getId = (job) => job.id == null ? Infinity : job.id;
  3014. const comparator = (a, b) => {
  3015. const diff2 = getId(a) - getId(b);
  3016. if (diff2 === 0) {
  3017. if (a.pre && !b.pre)
  3018. return -1;
  3019. if (b.pre && !a.pre)
  3020. return 1;
  3021. }
  3022. return diff2;
  3023. };
  3024. function flushJobs(seen) {
  3025. isFlushPending = false;
  3026. isFlushing = true;
  3027. {
  3028. seen = seen || /* @__PURE__ */ new Map();
  3029. }
  3030. queue.sort(comparator);
  3031. const check = (job) => checkRecursiveUpdates(seen, job);
  3032. try {
  3033. for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
  3034. const job = queue[flushIndex];
  3035. if (job && job.active !== false) {
  3036. if (check(job)) {
  3037. continue;
  3038. }
  3039. callWithErrorHandling(
  3040. job,
  3041. null,
  3042. 14
  3043. /* ErrorCodes.SCHEDULER */
  3044. );
  3045. }
  3046. }
  3047. } finally {
  3048. flushIndex = 0;
  3049. queue.length = 0;
  3050. flushPostFlushCbs(seen);
  3051. isFlushing = false;
  3052. currentFlushPromise = null;
  3053. if (queue.length || pendingPostFlushCbs.length) {
  3054. flushJobs(seen);
  3055. }
  3056. }
  3057. }
  3058. function checkRecursiveUpdates(seen, fn) {
  3059. if (!seen.has(fn)) {
  3060. seen.set(fn, 1);
  3061. } else {
  3062. const count = seen.get(fn);
  3063. if (count > RECURSION_LIMIT) {
  3064. const instance = fn.ownerInstance;
  3065. const componentName = instance && getComponentName(instance.type);
  3066. warn(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`);
  3067. return true;
  3068. } else {
  3069. seen.set(fn, count + 1);
  3070. }
  3071. }
  3072. }
  3073. let devtools;
  3074. let buffer = [];
  3075. let devtoolsNotInstalled = false;
  3076. function emit$1(event, ...args) {
  3077. if (devtools) {
  3078. devtools.emit(event, ...args);
  3079. } else if (!devtoolsNotInstalled) {
  3080. buffer.push({ event, args });
  3081. }
  3082. }
  3083. function setDevtoolsHook(hook, target) {
  3084. var _a2, _b;
  3085. devtools = hook;
  3086. if (devtools) {
  3087. devtools.enabled = true;
  3088. buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
  3089. buffer = [];
  3090. } else if (
  3091. // handle late devtools injection - only do this if we are in an actual
  3092. // browser environment to avoid the timer handle stalling test runner exit
  3093. // (#4815)
  3094. typeof window !== "undefined" && // some envs mock window but not fully
  3095. // eslint-disable-next-line no-restricted-globals
  3096. window.HTMLElement && // also exclude jsdom
  3097. // eslint-disable-next-line no-restricted-globals
  3098. !((_b = (_a2 = window.navigator) === null || _a2 === void 0 ? void 0 : _a2.userAgent) === null || _b === void 0 ? void 0 : _b.includes("jsdom"))
  3099. ) {
  3100. const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
  3101. replay.push((newHook) => {
  3102. setDevtoolsHook(newHook, target);
  3103. });
  3104. setTimeout(() => {
  3105. if (!devtools) {
  3106. target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
  3107. devtoolsNotInstalled = true;
  3108. buffer = [];
  3109. }
  3110. }, 3e3);
  3111. } else {
  3112. devtoolsNotInstalled = true;
  3113. buffer = [];
  3114. }
  3115. }
  3116. function devtoolsInitApp(app, version2) {
  3117. emit$1("app:init", app, version2, {
  3118. Fragment,
  3119. Text: Text$1,
  3120. Comment,
  3121. Static
  3122. });
  3123. }
  3124. const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(
  3125. "component:added"
  3126. /* DevtoolsHooks.COMPONENT_ADDED */
  3127. );
  3128. const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(
  3129. "component:updated"
  3130. /* DevtoolsHooks.COMPONENT_UPDATED */
  3131. );
  3132. const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(
  3133. "component:removed"
  3134. /* DevtoolsHooks.COMPONENT_REMOVED */
  3135. );
  3136. const devtoolsComponentRemoved = (component) => {
  3137. if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered
  3138. !devtools.cleanupBuffer(component)) {
  3139. _devtoolsComponentRemoved(component);
  3140. }
  3141. };
  3142. function createDevtoolsComponentHook(hook) {
  3143. return (component) => {
  3144. emit$1(
  3145. hook,
  3146. component.appContext.app,
  3147. component.uid,
  3148. // fixed by xxxxxx
  3149. // 为 0 是 App,无 parent 是 Page 指向 App
  3150. component.uid === 0 ? void 0 : component.parent ? component.parent.uid : 0,
  3151. component
  3152. );
  3153. };
  3154. }
  3155. const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(
  3156. "perf:start"
  3157. /* DevtoolsHooks.PERFORMANCE_START */
  3158. );
  3159. const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(
  3160. "perf:end"
  3161. /* DevtoolsHooks.PERFORMANCE_END */
  3162. );
  3163. function createDevtoolsPerformanceHook(hook) {
  3164. return (component, type2, time) => {
  3165. emit$1(hook, component.appContext.app, component.uid, component, type2, time);
  3166. };
  3167. }
  3168. function devtoolsComponentEmit(component, event, params) {
  3169. emit$1("component:emit", component.appContext.app, component, event, params);
  3170. }
  3171. function emit(instance, event, ...rawArgs) {
  3172. if (instance.isUnmounted)
  3173. return;
  3174. const props2 = instance.vnode.props || EMPTY_OBJ;
  3175. {
  3176. const { emitsOptions, propsOptions: [propsOptions] } = instance;
  3177. if (emitsOptions) {
  3178. if (!(event in emitsOptions) && true) {
  3179. if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
  3180. warn(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`);
  3181. }
  3182. } else {
  3183. const validator = emitsOptions[event];
  3184. if (isFunction(validator)) {
  3185. const isValid = validator(...rawArgs);
  3186. if (!isValid) {
  3187. warn(`Invalid event arguments: event validation failed for event "${event}".`);
  3188. }
  3189. }
  3190. }
  3191. }
  3192. }
  3193. let args = rawArgs;
  3194. const isModelListener2 = event.startsWith("update:");
  3195. const modelArg = isModelListener2 && event.slice(7);
  3196. if (modelArg && modelArg in props2) {
  3197. const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`;
  3198. const { number: number3, trim: trim2 } = props2[modifiersKey] || EMPTY_OBJ;
  3199. if (trim2) {
  3200. args = rawArgs.map((a) => isString(a) ? a.trim() : a);
  3201. }
  3202. if (number3) {
  3203. args = rawArgs.map(looseToNumber);
  3204. }
  3205. }
  3206. {
  3207. devtoolsComponentEmit(instance, event, args);
  3208. }
  3209. {
  3210. const lowerCaseEvent = event.toLowerCase();
  3211. if (lowerCaseEvent !== event && props2[toHandlerKey(lowerCaseEvent)]) {
  3212. warn(`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(event)}" instead of "${event}".`);
  3213. }
  3214. }
  3215. let handlerName;
  3216. let handler = props2[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
  3217. props2[handlerName = toHandlerKey(camelize(event))];
  3218. if (!handler && isModelListener2) {
  3219. handler = props2[handlerName = toHandlerKey(hyphenate(event))];
  3220. }
  3221. if (handler) {
  3222. callWithAsyncErrorHandling(handler, instance, 6, args);
  3223. }
  3224. const onceHandler = props2[handlerName + `Once`];
  3225. if (onceHandler) {
  3226. if (!instance.emitted) {
  3227. instance.emitted = {};
  3228. } else if (instance.emitted[handlerName]) {
  3229. return;
  3230. }
  3231. instance.emitted[handlerName] = true;
  3232. callWithAsyncErrorHandling(onceHandler, instance, 6, args);
  3233. }
  3234. }
  3235. function normalizeEmitsOptions(comp, appContext, asMixin = false) {
  3236. const cache = appContext.emitsCache;
  3237. const cached = cache.get(comp);
  3238. if (cached !== void 0) {
  3239. return cached;
  3240. }
  3241. const raw = comp.emits;
  3242. let normalized = {};
  3243. let hasExtends = false;
  3244. if (!isFunction(comp)) {
  3245. const extendEmits = (raw2) => {
  3246. const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
  3247. if (normalizedFromExtend) {
  3248. hasExtends = true;
  3249. extend(normalized, normalizedFromExtend);
  3250. }
  3251. };
  3252. if (!asMixin && appContext.mixins.length) {
  3253. appContext.mixins.forEach(extendEmits);
  3254. }
  3255. if (comp.extends) {
  3256. extendEmits(comp.extends);
  3257. }
  3258. if (comp.mixins) {
  3259. comp.mixins.forEach(extendEmits);
  3260. }
  3261. }
  3262. if (!raw && !hasExtends) {
  3263. if (isObject$1(comp)) {
  3264. cache.set(comp, null);
  3265. }
  3266. return null;
  3267. }
  3268. if (isArray$1(raw)) {
  3269. raw.forEach((key) => normalized[key] = null);
  3270. } else {
  3271. extend(normalized, raw);
  3272. }
  3273. if (isObject$1(comp)) {
  3274. cache.set(comp, normalized);
  3275. }
  3276. return normalized;
  3277. }
  3278. function isEmitListener(options, key) {
  3279. if (!options || !isOn(key)) {
  3280. return false;
  3281. }
  3282. key = key.slice(2).replace(/Once$/, "");
  3283. return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
  3284. }
  3285. let currentRenderingInstance = null;
  3286. function setCurrentRenderingInstance(instance) {
  3287. const prev = currentRenderingInstance;
  3288. currentRenderingInstance = instance;
  3289. instance && instance.type.__scopeId || null;
  3290. return prev;
  3291. }
  3292. function provide(key, value) {
  3293. if (!currentInstance) {
  3294. {
  3295. warn(`provide() can only be used inside setup().`);
  3296. }
  3297. } else {
  3298. let provides = currentInstance.provides;
  3299. const parentProvides = currentInstance.parent && currentInstance.parent.provides;
  3300. if (parentProvides === provides) {
  3301. provides = currentInstance.provides = Object.create(parentProvides);
  3302. }
  3303. provides[key] = value;
  3304. if (currentInstance.type.mpType === "app") {
  3305. currentInstance.appContext.app.provide(key, value);
  3306. }
  3307. }
  3308. }
  3309. function inject(key, defaultValue, treatDefaultAsFactory = false) {
  3310. const instance = currentInstance || currentRenderingInstance;
  3311. if (instance) {
  3312. const provides = instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides;
  3313. if (provides && key in provides) {
  3314. return provides[key];
  3315. } else if (arguments.length > 1) {
  3316. return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance.proxy) : defaultValue;
  3317. } else {
  3318. warn(`injection "${String(key)}" not found.`);
  3319. }
  3320. } else {
  3321. warn(`inject() can only be used inside setup() or functional components.`);
  3322. }
  3323. }
  3324. const INITIAL_WATCHER_VALUE = {};
  3325. function watch(source, cb, options) {
  3326. if (!isFunction(cb)) {
  3327. warn(`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`);
  3328. }
  3329. return doWatch(source, cb, options);
  3330. }
  3331. function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
  3332. if (!cb) {
  3333. if (immediate !== void 0) {
  3334. warn(`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`);
  3335. }
  3336. if (deep !== void 0) {
  3337. warn(`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`);
  3338. }
  3339. }
  3340. const warnInvalidSource = (s2) => {
  3341. warn(`Invalid watch source: `, s2, `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`);
  3342. };
  3343. const instance = getCurrentScope() === (currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope) ? currentInstance : null;
  3344. let getter;
  3345. let forceTrigger = false;
  3346. let isMultiSource = false;
  3347. if (isRef(source)) {
  3348. getter = () => source.value;
  3349. forceTrigger = isShallow(source);
  3350. } else if (isReactive(source)) {
  3351. getter = () => source;
  3352. deep = true;
  3353. } else if (isArray$1(source)) {
  3354. isMultiSource = true;
  3355. forceTrigger = source.some((s2) => isReactive(s2) || isShallow(s2));
  3356. getter = () => source.map((s2) => {
  3357. if (isRef(s2)) {
  3358. return s2.value;
  3359. } else if (isReactive(s2)) {
  3360. return traverse(s2);
  3361. } else if (isFunction(s2)) {
  3362. return callWithErrorHandling(
  3363. s2,
  3364. instance,
  3365. 2
  3366. /* ErrorCodes.WATCH_GETTER */
  3367. );
  3368. } else {
  3369. warnInvalidSource(s2);
  3370. }
  3371. });
  3372. } else if (isFunction(source)) {
  3373. if (cb) {
  3374. getter = () => callWithErrorHandling(
  3375. source,
  3376. instance,
  3377. 2
  3378. /* ErrorCodes.WATCH_GETTER */
  3379. );
  3380. } else {
  3381. getter = () => {
  3382. if (instance && instance.isUnmounted) {
  3383. return;
  3384. }
  3385. if (cleanup) {
  3386. cleanup();
  3387. }
  3388. return callWithAsyncErrorHandling(source, instance, 3, [onCleanup]);
  3389. };
  3390. }
  3391. } else {
  3392. getter = NOOP;
  3393. warnInvalidSource(source);
  3394. }
  3395. if (cb && deep) {
  3396. const baseGetter = getter;
  3397. getter = () => traverse(baseGetter());
  3398. }
  3399. let cleanup;
  3400. let onCleanup = (fn) => {
  3401. cleanup = effect.onStop = () => {
  3402. callWithErrorHandling(
  3403. fn,
  3404. instance,
  3405. 4
  3406. /* ErrorCodes.WATCH_CLEANUP */
  3407. );
  3408. };
  3409. };
  3410. let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
  3411. const job = () => {
  3412. if (!effect.active) {
  3413. return;
  3414. }
  3415. if (cb) {
  3416. const newValue = effect.run();
  3417. if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {
  3418. if (cleanup) {
  3419. cleanup();
  3420. }
  3421. callWithAsyncErrorHandling(cb, instance, 3, [
  3422. newValue,
  3423. // pass undefined as the old value when it's changed for the first time
  3424. oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
  3425. onCleanup
  3426. ]);
  3427. oldValue = newValue;
  3428. }
  3429. } else {
  3430. effect.run();
  3431. }
  3432. };
  3433. job.allowRecurse = !!cb;
  3434. let scheduler;
  3435. if (flush === "sync") {
  3436. scheduler = job;
  3437. } else if (flush === "post") {
  3438. scheduler = () => queuePostRenderEffect$1(job, instance && instance.suspense);
  3439. } else {
  3440. job.pre = true;
  3441. if (instance)
  3442. job.id = instance.uid;
  3443. scheduler = () => queueJob(job);
  3444. }
  3445. const effect = new ReactiveEffect(getter, scheduler);
  3446. {
  3447. effect.onTrack = onTrack;
  3448. effect.onTrigger = onTrigger;
  3449. }
  3450. if (cb) {
  3451. if (immediate) {
  3452. job();
  3453. } else {
  3454. oldValue = effect.run();
  3455. }
  3456. } else if (flush === "post") {
  3457. queuePostRenderEffect$1(effect.run.bind(effect), instance && instance.suspense);
  3458. } else {
  3459. effect.run();
  3460. }
  3461. const unwatch = () => {
  3462. effect.stop();
  3463. if (instance && instance.scope) {
  3464. remove(instance.scope.effects, effect);
  3465. }
  3466. };
  3467. return unwatch;
  3468. }
  3469. function instanceWatch(source, value, options) {
  3470. const publicThis = this.proxy;
  3471. const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
  3472. let cb;
  3473. if (isFunction(value)) {
  3474. cb = value;
  3475. } else {
  3476. cb = value.handler;
  3477. options = value;
  3478. }
  3479. const cur = currentInstance;
  3480. setCurrentInstance(this);
  3481. const res = doWatch(getter, cb.bind(publicThis), options);
  3482. if (cur) {
  3483. setCurrentInstance(cur);
  3484. } else {
  3485. unsetCurrentInstance();
  3486. }
  3487. return res;
  3488. }
  3489. function createPathGetter(ctx, path) {
  3490. const segments = path.split(".");
  3491. return () => {
  3492. let cur = ctx;
  3493. for (let i = 0; i < segments.length && cur; i++) {
  3494. cur = cur[segments[i]];
  3495. }
  3496. return cur;
  3497. };
  3498. }
  3499. function traverse(value, seen) {
  3500. if (!isObject$1(value) || value[
  3501. "__v_skip"
  3502. /* ReactiveFlags.SKIP */
  3503. ]) {
  3504. return value;
  3505. }
  3506. seen = seen || /* @__PURE__ */ new Set();
  3507. if (seen.has(value)) {
  3508. return value;
  3509. }
  3510. seen.add(value);
  3511. if (isRef(value)) {
  3512. traverse(value.value, seen);
  3513. } else if (isArray$1(value)) {
  3514. for (let i = 0; i < value.length; i++) {
  3515. traverse(value[i], seen);
  3516. }
  3517. } else if (isSet(value) || isMap(value)) {
  3518. value.forEach((v) => {
  3519. traverse(v, seen);
  3520. });
  3521. } else if (isPlainObject$2(value)) {
  3522. for (const key in value) {
  3523. traverse(value[key], seen);
  3524. }
  3525. }
  3526. return value;
  3527. }
  3528. const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
  3529. function onActivated(hook, target) {
  3530. registerKeepAliveHook(hook, "a", target);
  3531. }
  3532. function onDeactivated(hook, target) {
  3533. registerKeepAliveHook(hook, "da", target);
  3534. }
  3535. function registerKeepAliveHook(hook, type2, target = currentInstance) {
  3536. const wrappedHook = hook.__wdc || (hook.__wdc = () => {
  3537. let current = target;
  3538. while (current) {
  3539. if (current.isDeactivated) {
  3540. return;
  3541. }
  3542. current = current.parent;
  3543. }
  3544. return hook();
  3545. });
  3546. injectHook(type2, wrappedHook, target);
  3547. if (target) {
  3548. let current = target.parent;
  3549. while (current && current.parent) {
  3550. if (isKeepAlive(current.parent.vnode)) {
  3551. injectToKeepAliveRoot(wrappedHook, type2, target, current);
  3552. }
  3553. current = current.parent;
  3554. }
  3555. }
  3556. }
  3557. function injectToKeepAliveRoot(hook, type2, target, keepAliveRoot) {
  3558. const injected = injectHook(
  3559. type2,
  3560. hook,
  3561. keepAliveRoot,
  3562. true
  3563. /* prepend */
  3564. );
  3565. onUnmounted(() => {
  3566. remove(keepAliveRoot[type2], injected);
  3567. }, target);
  3568. }
  3569. function injectHook(type2, hook, target = currentInstance, prepend = false) {
  3570. if (target) {
  3571. if (isRootHook(type2)) {
  3572. target = target.root;
  3573. }
  3574. const hooks = target[type2] || (target[type2] = []);
  3575. const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
  3576. if (target.isUnmounted) {
  3577. return;
  3578. }
  3579. pauseTracking();
  3580. setCurrentInstance(target);
  3581. const res = callWithAsyncErrorHandling(hook, target, type2, args);
  3582. unsetCurrentInstance();
  3583. resetTracking();
  3584. return res;
  3585. });
  3586. if (prepend) {
  3587. hooks.unshift(wrappedHook);
  3588. } else {
  3589. hooks.push(wrappedHook);
  3590. }
  3591. return wrappedHook;
  3592. } else {
  3593. const apiName = toHandlerKey((ErrorTypeStrings[type2] || type2.replace(/^on/, "")).replace(/ hook$/, ""));
  3594. warn(`${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().`);
  3595. }
  3596. }
  3597. const createHook$1 = (lifecycle) => (hook, target = currentInstance) => (
  3598. // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
  3599. (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target)
  3600. );
  3601. const onBeforeMount = createHook$1(
  3602. "bm"
  3603. /* LifecycleHooks.BEFORE_MOUNT */
  3604. );
  3605. const onMounted = createHook$1(
  3606. "m"
  3607. /* LifecycleHooks.MOUNTED */
  3608. );
  3609. const onBeforeUpdate = createHook$1(
  3610. "bu"
  3611. /* LifecycleHooks.BEFORE_UPDATE */
  3612. );
  3613. const onUpdated = createHook$1(
  3614. "u"
  3615. /* LifecycleHooks.UPDATED */
  3616. );
  3617. const onBeforeUnmount = createHook$1(
  3618. "bum"
  3619. /* LifecycleHooks.BEFORE_UNMOUNT */
  3620. );
  3621. const onUnmounted = createHook$1(
  3622. "um"
  3623. /* LifecycleHooks.UNMOUNTED */
  3624. );
  3625. const onServerPrefetch = createHook$1(
  3626. "sp"
  3627. /* LifecycleHooks.SERVER_PREFETCH */
  3628. );
  3629. const onRenderTriggered = createHook$1(
  3630. "rtg"
  3631. /* LifecycleHooks.RENDER_TRIGGERED */
  3632. );
  3633. const onRenderTracked = createHook$1(
  3634. "rtc"
  3635. /* LifecycleHooks.RENDER_TRACKED */
  3636. );
  3637. function onErrorCaptured(hook, target = currentInstance) {
  3638. injectHook("ec", hook, target);
  3639. }
  3640. function validateDirectiveName(name) {
  3641. if (isBuiltInDirective(name)) {
  3642. warn("Do not use built-in directive ids as custom directive id: " + name);
  3643. }
  3644. }
  3645. const COMPONENTS = "components";
  3646. function resolveComponent(name, maybeSelfReference) {
  3647. return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
  3648. }
  3649. function resolveAsset(type2, name, warnMissing = true, maybeSelfReference = false) {
  3650. const instance = currentRenderingInstance || currentInstance;
  3651. if (instance) {
  3652. const Component2 = instance.type;
  3653. if (type2 === COMPONENTS) {
  3654. const selfName = getComponentName(
  3655. Component2,
  3656. false
  3657. /* do not include inferred name to avoid breaking existing code */
  3658. );
  3659. if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
  3660. return Component2;
  3661. }
  3662. }
  3663. const res = (
  3664. // local registration
  3665. // check instance[type] first which is resolved for options API
  3666. resolve(instance[type2] || Component2[type2], name) || // global registration
  3667. resolve(instance.appContext[type2], name)
  3668. );
  3669. if (!res && maybeSelfReference) {
  3670. return Component2;
  3671. }
  3672. if (warnMissing && !res) {
  3673. const extra = type2 === COMPONENTS ? `
  3674. If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
  3675. warn(`Failed to resolve ${type2.slice(0, -1)}: ${name}${extra}`);
  3676. }
  3677. return res;
  3678. } else {
  3679. warn(`resolve${capitalize(type2.slice(0, -1))} can only be used in render() or setup().`);
  3680. }
  3681. }
  3682. function resolve(registry, name) {
  3683. return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
  3684. }
  3685. const getPublicInstance = (i) => {
  3686. if (!i)
  3687. return null;
  3688. if (isStatefulComponent(i))
  3689. return getExposeProxy(i) || i.proxy;
  3690. return getPublicInstance(i.parent);
  3691. };
  3692. const publicPropertiesMap = (
  3693. // Move PURE marker to new line to workaround compiler discarding it
  3694. // due to type annotation
  3695. /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
  3696. $: (i) => i,
  3697. // fixed by xxxxxx vue-i18n 在 dev 模式,访问了 $el,故模拟一个假的
  3698. // $el: i => i.vnode.el,
  3699. $el: (i) => i.__$el || (i.__$el = {}),
  3700. $data: (i) => i.data,
  3701. $props: (i) => shallowReadonly(i.props),
  3702. $attrs: (i) => shallowReadonly(i.attrs),
  3703. $slots: (i) => shallowReadonly(i.slots),
  3704. $refs: (i) => shallowReadonly(i.refs),
  3705. $parent: (i) => getPublicInstance(i.parent),
  3706. $root: (i) => getPublicInstance(i.root),
  3707. $emit: (i) => i.emit,
  3708. $options: (i) => resolveMergedOptions(i),
  3709. $forceUpdate: (i) => i.f || (i.f = () => queueJob(i.update)),
  3710. // $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy!)),// fixed by xxxxxx
  3711. $watch: (i) => instanceWatch.bind(i)
  3712. })
  3713. );
  3714. const isReservedPrefix = (key) => key === "_" || key === "$";
  3715. const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
  3716. const PublicInstanceProxyHandlers = {
  3717. get({ _: instance }, key) {
  3718. const { ctx, setupState, data, props: props2, accessCache, type: type2, appContext } = instance;
  3719. if (key === "__isVue") {
  3720. return true;
  3721. }
  3722. let normalizedProps;
  3723. if (key[0] !== "$") {
  3724. const n2 = accessCache[key];
  3725. if (n2 !== void 0) {
  3726. switch (n2) {
  3727. case 1:
  3728. return setupState[key];
  3729. case 2:
  3730. return data[key];
  3731. case 4:
  3732. return ctx[key];
  3733. case 3:
  3734. return props2[key];
  3735. }
  3736. } else if (hasSetupBinding(setupState, key)) {
  3737. accessCache[key] = 1;
  3738. return setupState[key];
  3739. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  3740. accessCache[key] = 2;
  3741. return data[key];
  3742. } else if (
  3743. // only cache other properties when instance has declared (thus stable)
  3744. // props
  3745. (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)
  3746. ) {
  3747. accessCache[key] = 3;
  3748. return props2[key];
  3749. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  3750. accessCache[key] = 4;
  3751. return ctx[key];
  3752. } else if (shouldCacheAccess) {
  3753. accessCache[key] = 0;
  3754. }
  3755. }
  3756. const publicGetter = publicPropertiesMap[key];
  3757. let cssModule, globalProperties;
  3758. if (publicGetter) {
  3759. if (key === "$attrs") {
  3760. track(instance, "get", key);
  3761. }
  3762. return publicGetter(instance);
  3763. } else if (
  3764. // css module (injected by vue-loader)
  3765. (cssModule = type2.__cssModules) && (cssModule = cssModule[key])
  3766. ) {
  3767. return cssModule;
  3768. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  3769. accessCache[key] = 4;
  3770. return ctx[key];
  3771. } else if (
  3772. // global properties
  3773. globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)
  3774. ) {
  3775. {
  3776. return globalProperties[key];
  3777. }
  3778. } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading
  3779. // to infinite warning loop
  3780. key.indexOf("__v") !== 0)) {
  3781. if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
  3782. warn(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`);
  3783. } else if (instance === currentRenderingInstance) {
  3784. warn(`Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`);
  3785. }
  3786. }
  3787. },
  3788. set({ _: instance }, key, value) {
  3789. const { data, setupState, ctx } = instance;
  3790. if (hasSetupBinding(setupState, key)) {
  3791. setupState[key] = value;
  3792. return true;
  3793. } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) {
  3794. warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
  3795. return false;
  3796. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  3797. data[key] = value;
  3798. return true;
  3799. } else if (hasOwn(instance.props, key)) {
  3800. warn(`Attempting to mutate prop "${key}". Props are readonly.`);
  3801. return false;
  3802. }
  3803. if (key[0] === "$" && key.slice(1) in instance) {
  3804. warn(`Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`);
  3805. return false;
  3806. } else {
  3807. if (key in instance.appContext.config.globalProperties) {
  3808. Object.defineProperty(ctx, key, {
  3809. enumerable: true,
  3810. configurable: true,
  3811. value
  3812. });
  3813. } else {
  3814. ctx[key] = value;
  3815. }
  3816. }
  3817. return true;
  3818. },
  3819. has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
  3820. let normalizedProps;
  3821. return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
  3822. },
  3823. defineProperty(target, key, descriptor) {
  3824. if (descriptor.get != null) {
  3825. target._.accessCache[key] = 0;
  3826. } else if (hasOwn(descriptor, "value")) {
  3827. this.set(target, key, descriptor.value, null);
  3828. }
  3829. return Reflect.defineProperty(target, key, descriptor);
  3830. }
  3831. };
  3832. {
  3833. PublicInstanceProxyHandlers.ownKeys = (target) => {
  3834. warn(`Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`);
  3835. return Reflect.ownKeys(target);
  3836. };
  3837. }
  3838. function createDevRenderContext(instance) {
  3839. const target = {};
  3840. Object.defineProperty(target, `_`, {
  3841. configurable: true,
  3842. enumerable: false,
  3843. get: () => instance
  3844. });
  3845. Object.keys(publicPropertiesMap).forEach((key) => {
  3846. Object.defineProperty(target, key, {
  3847. configurable: true,
  3848. enumerable: false,
  3849. get: () => publicPropertiesMap[key](instance),
  3850. // intercepted by the proxy so no need for implementation,
  3851. // but needed to prevent set errors
  3852. set: NOOP
  3853. });
  3854. });
  3855. return target;
  3856. }
  3857. function exposePropsOnRenderContext(instance) {
  3858. const { ctx, propsOptions: [propsOptions] } = instance;
  3859. if (propsOptions) {
  3860. Object.keys(propsOptions).forEach((key) => {
  3861. Object.defineProperty(ctx, key, {
  3862. enumerable: true,
  3863. configurable: true,
  3864. get: () => instance.props[key],
  3865. set: NOOP
  3866. });
  3867. });
  3868. }
  3869. }
  3870. function exposeSetupStateOnRenderContext(instance) {
  3871. const { ctx, setupState } = instance;
  3872. Object.keys(toRaw(setupState)).forEach((key) => {
  3873. if (!setupState.__isScriptSetup) {
  3874. if (isReservedPrefix(key[0])) {
  3875. warn(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);
  3876. return;
  3877. }
  3878. Object.defineProperty(ctx, key, {
  3879. enumerable: true,
  3880. configurable: true,
  3881. get: () => setupState[key],
  3882. set: NOOP
  3883. });
  3884. }
  3885. });
  3886. }
  3887. function createDuplicateChecker() {
  3888. const cache = /* @__PURE__ */ Object.create(null);
  3889. return (type2, key) => {
  3890. if (cache[key]) {
  3891. warn(`${type2} property "${key}" is already defined in ${cache[key]}.`);
  3892. } else {
  3893. cache[key] = type2;
  3894. }
  3895. };
  3896. }
  3897. let shouldCacheAccess = true;
  3898. function applyOptions$1(instance) {
  3899. const options = resolveMergedOptions(instance);
  3900. const publicThis = instance.proxy;
  3901. const ctx = instance.ctx;
  3902. shouldCacheAccess = false;
  3903. if (options.beforeCreate) {
  3904. callHook$1(
  3905. options.beforeCreate,
  3906. instance,
  3907. "bc"
  3908. /* LifecycleHooks.BEFORE_CREATE */
  3909. );
  3910. }
  3911. const {
  3912. // state
  3913. data: dataOptions,
  3914. computed: computedOptions,
  3915. methods,
  3916. watch: watchOptions,
  3917. provide: provideOptions,
  3918. inject: injectOptions,
  3919. // lifecycle
  3920. created,
  3921. beforeMount,
  3922. mounted,
  3923. beforeUpdate,
  3924. updated,
  3925. activated,
  3926. deactivated,
  3927. beforeDestroy,
  3928. beforeUnmount,
  3929. destroyed,
  3930. unmounted,
  3931. render,
  3932. renderTracked,
  3933. renderTriggered,
  3934. errorCaptured,
  3935. serverPrefetch,
  3936. // public API
  3937. expose,
  3938. inheritAttrs,
  3939. // assets
  3940. components,
  3941. directives,
  3942. filters
  3943. } = options;
  3944. const checkDuplicateProperties = createDuplicateChecker();
  3945. {
  3946. const [propsOptions] = instance.propsOptions;
  3947. if (propsOptions) {
  3948. for (const key in propsOptions) {
  3949. checkDuplicateProperties("Props", key);
  3950. }
  3951. }
  3952. }
  3953. if (injectOptions) {
  3954. resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef);
  3955. }
  3956. if (methods) {
  3957. for (const key in methods) {
  3958. const methodHandler = methods[key];
  3959. if (isFunction(methodHandler)) {
  3960. {
  3961. Object.defineProperty(ctx, key, {
  3962. value: methodHandler.bind(publicThis),
  3963. configurable: true,
  3964. enumerable: true,
  3965. writable: true
  3966. });
  3967. }
  3968. {
  3969. checkDuplicateProperties("Methods", key);
  3970. }
  3971. } else {
  3972. warn(`Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`);
  3973. }
  3974. }
  3975. }
  3976. if (dataOptions) {
  3977. if (!isFunction(dataOptions)) {
  3978. warn(`The data option must be a function. Plain object usage is no longer supported.`);
  3979. }
  3980. const data = dataOptions.call(publicThis, publicThis);
  3981. if (isPromise(data)) {
  3982. warn(`data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`);
  3983. }
  3984. if (!isObject$1(data)) {
  3985. warn(`data() should return an object.`);
  3986. } else {
  3987. instance.data = reactive(data);
  3988. {
  3989. for (const key in data) {
  3990. checkDuplicateProperties("Data", key);
  3991. if (!isReservedPrefix(key[0])) {
  3992. Object.defineProperty(ctx, key, {
  3993. configurable: true,
  3994. enumerable: true,
  3995. get: () => data[key],
  3996. set: NOOP
  3997. });
  3998. }
  3999. }
  4000. }
  4001. }
  4002. }
  4003. shouldCacheAccess = true;
  4004. if (computedOptions) {
  4005. for (const key in computedOptions) {
  4006. const opt = computedOptions[key];
  4007. const get2 = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
  4008. if (get2 === NOOP) {
  4009. warn(`Computed property "${key}" has no getter.`);
  4010. }
  4011. const set2 = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
  4012. warn(`Write operation failed: computed property "${key}" is readonly.`);
  4013. };
  4014. const c = computed({
  4015. get: get2,
  4016. set: set2
  4017. });
  4018. Object.defineProperty(ctx, key, {
  4019. enumerable: true,
  4020. configurable: true,
  4021. get: () => c.value,
  4022. set: (v) => c.value = v
  4023. });
  4024. {
  4025. checkDuplicateProperties("Computed", key);
  4026. }
  4027. }
  4028. }
  4029. if (watchOptions) {
  4030. for (const key in watchOptions) {
  4031. createWatcher(watchOptions[key], ctx, publicThis, key);
  4032. }
  4033. }
  4034. {
  4035. if (provideOptions) {
  4036. const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
  4037. Reflect.ownKeys(provides).forEach((key) => {
  4038. provide(key, provides[key]);
  4039. });
  4040. }
  4041. }
  4042. {
  4043. if (created) {
  4044. callHook$1(
  4045. created,
  4046. instance,
  4047. "c"
  4048. /* LifecycleHooks.CREATED */
  4049. );
  4050. }
  4051. }
  4052. function registerLifecycleHook(register2, hook) {
  4053. if (isArray$1(hook)) {
  4054. hook.forEach((_hook) => register2(_hook.bind(publicThis)));
  4055. } else if (hook) {
  4056. register2(hook.bind(publicThis));
  4057. }
  4058. }
  4059. registerLifecycleHook(onBeforeMount, beforeMount);
  4060. registerLifecycleHook(onMounted, mounted);
  4061. registerLifecycleHook(onBeforeUpdate, beforeUpdate);
  4062. registerLifecycleHook(onUpdated, updated);
  4063. registerLifecycleHook(onActivated, activated);
  4064. registerLifecycleHook(onDeactivated, deactivated);
  4065. registerLifecycleHook(onErrorCaptured, errorCaptured);
  4066. registerLifecycleHook(onRenderTracked, renderTracked);
  4067. registerLifecycleHook(onRenderTriggered, renderTriggered);
  4068. registerLifecycleHook(onBeforeUnmount, beforeUnmount);
  4069. registerLifecycleHook(onUnmounted, unmounted);
  4070. registerLifecycleHook(onServerPrefetch, serverPrefetch);
  4071. if (isArray$1(expose)) {
  4072. if (expose.length) {
  4073. const exposed = instance.exposed || (instance.exposed = {});
  4074. expose.forEach((key) => {
  4075. Object.defineProperty(exposed, key, {
  4076. get: () => publicThis[key],
  4077. set: (val) => publicThis[key] = val
  4078. });
  4079. });
  4080. } else if (!instance.exposed) {
  4081. instance.exposed = {};
  4082. }
  4083. }
  4084. if (render && instance.render === NOOP) {
  4085. instance.render = render;
  4086. }
  4087. if (inheritAttrs != null) {
  4088. instance.inheritAttrs = inheritAttrs;
  4089. }
  4090. if (components)
  4091. instance.components = components;
  4092. if (directives)
  4093. instance.directives = directives;
  4094. if (instance.ctx.$onApplyOptions) {
  4095. instance.ctx.$onApplyOptions(options, instance, publicThis);
  4096. }
  4097. }
  4098. function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) {
  4099. if (isArray$1(injectOptions)) {
  4100. injectOptions = normalizeInject(injectOptions);
  4101. }
  4102. for (const key in injectOptions) {
  4103. const opt = injectOptions[key];
  4104. let injected;
  4105. if (isObject$1(opt)) {
  4106. if ("default" in opt) {
  4107. injected = inject(
  4108. opt.from || key,
  4109. opt.default,
  4110. true
  4111. /* treat default function as factory */
  4112. );
  4113. } else {
  4114. injected = inject(opt.from || key);
  4115. }
  4116. } else {
  4117. injected = inject(opt);
  4118. }
  4119. if (isRef(injected)) {
  4120. if (unwrapRef) {
  4121. Object.defineProperty(ctx, key, {
  4122. enumerable: true,
  4123. configurable: true,
  4124. get: () => injected.value,
  4125. set: (v) => injected.value = v
  4126. });
  4127. } else {
  4128. {
  4129. warn(`injected property "${key}" is a ref and will be auto-unwrapped and no longer needs \`.value\` in the next minor release. To opt-in to the new behavior now, set \`app.config.unwrapInjectedRef = true\` (this config is temporary and will not be needed in the future.)`);
  4130. }
  4131. ctx[key] = injected;
  4132. }
  4133. } else {
  4134. ctx[key] = injected;
  4135. }
  4136. {
  4137. checkDuplicateProperties("Inject", key);
  4138. }
  4139. }
  4140. }
  4141. function callHook$1(hook, instance, type2) {
  4142. callWithAsyncErrorHandling(isArray$1(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), instance, type2);
  4143. }
  4144. function createWatcher(raw, ctx, publicThis, key) {
  4145. const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
  4146. if (isString(raw)) {
  4147. const handler = ctx[raw];
  4148. if (isFunction(handler)) {
  4149. watch(getter, handler);
  4150. } else {
  4151. warn(`Invalid watch handler specified by key "${raw}"`, handler);
  4152. }
  4153. } else if (isFunction(raw)) {
  4154. watch(getter, raw.bind(publicThis));
  4155. } else if (isObject$1(raw)) {
  4156. if (isArray$1(raw)) {
  4157. raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
  4158. } else {
  4159. const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
  4160. if (isFunction(handler)) {
  4161. watch(getter, handler, raw);
  4162. } else {
  4163. warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
  4164. }
  4165. }
  4166. } else {
  4167. warn(`Invalid watch option: "${key}"`, raw);
  4168. }
  4169. }
  4170. function resolveMergedOptions(instance) {
  4171. const base = instance.type;
  4172. const { mixins, extends: extendsOptions } = base;
  4173. const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext;
  4174. const cached = cache.get(base);
  4175. let resolved;
  4176. if (cached) {
  4177. resolved = cached;
  4178. } else if (!globalMixins.length && !mixins && !extendsOptions) {
  4179. {
  4180. resolved = base;
  4181. }
  4182. } else {
  4183. resolved = {};
  4184. if (globalMixins.length) {
  4185. globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
  4186. }
  4187. mergeOptions(resolved, base, optionMergeStrategies);
  4188. }
  4189. if (isObject$1(base)) {
  4190. cache.set(base, resolved);
  4191. }
  4192. return resolved;
  4193. }
  4194. function mergeOptions(to, from, strats, asMixin = false) {
  4195. const { mixins, extends: extendsOptions } = from;
  4196. if (extendsOptions) {
  4197. mergeOptions(to, extendsOptions, strats, true);
  4198. }
  4199. if (mixins) {
  4200. mixins.forEach((m) => mergeOptions(to, m, strats, true));
  4201. }
  4202. for (const key in from) {
  4203. if (asMixin && key === "expose") {
  4204. warn(`"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`);
  4205. } else {
  4206. const strat = internalOptionMergeStrats[key] || strats && strats[key];
  4207. to[key] = strat ? strat(to[key], from[key]) : from[key];
  4208. }
  4209. }
  4210. return to;
  4211. }
  4212. const internalOptionMergeStrats = {
  4213. data: mergeDataFn,
  4214. props: mergeObjectOptions,
  4215. emits: mergeObjectOptions,
  4216. // objects
  4217. methods: mergeObjectOptions,
  4218. computed: mergeObjectOptions,
  4219. // lifecycle
  4220. beforeCreate: mergeAsArray$1,
  4221. created: mergeAsArray$1,
  4222. beforeMount: mergeAsArray$1,
  4223. mounted: mergeAsArray$1,
  4224. beforeUpdate: mergeAsArray$1,
  4225. updated: mergeAsArray$1,
  4226. beforeDestroy: mergeAsArray$1,
  4227. beforeUnmount: mergeAsArray$1,
  4228. destroyed: mergeAsArray$1,
  4229. unmounted: mergeAsArray$1,
  4230. activated: mergeAsArray$1,
  4231. deactivated: mergeAsArray$1,
  4232. errorCaptured: mergeAsArray$1,
  4233. serverPrefetch: mergeAsArray$1,
  4234. // assets
  4235. components: mergeObjectOptions,
  4236. directives: mergeObjectOptions,
  4237. // watch
  4238. watch: mergeWatchOptions,
  4239. // provide / inject
  4240. provide: mergeDataFn,
  4241. inject: mergeInject
  4242. };
  4243. function mergeDataFn(to, from) {
  4244. if (!from) {
  4245. return to;
  4246. }
  4247. if (!to) {
  4248. return from;
  4249. }
  4250. return function mergedDataFn() {
  4251. return extend(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
  4252. };
  4253. }
  4254. function mergeInject(to, from) {
  4255. return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
  4256. }
  4257. function normalizeInject(raw) {
  4258. if (isArray$1(raw)) {
  4259. const res = {};
  4260. for (let i = 0; i < raw.length; i++) {
  4261. res[raw[i]] = raw[i];
  4262. }
  4263. return res;
  4264. }
  4265. return raw;
  4266. }
  4267. function mergeAsArray$1(to, from) {
  4268. return to ? [...new Set([].concat(to, from))] : from;
  4269. }
  4270. function mergeObjectOptions(to, from) {
  4271. return to ? extend(extend(/* @__PURE__ */ Object.create(null), to), from) : from;
  4272. }
  4273. function mergeWatchOptions(to, from) {
  4274. if (!to)
  4275. return from;
  4276. if (!from)
  4277. return to;
  4278. const merged = extend(/* @__PURE__ */ Object.create(null), to);
  4279. for (const key in from) {
  4280. merged[key] = mergeAsArray$1(to[key], from[key]);
  4281. }
  4282. return merged;
  4283. }
  4284. function initProps$1(instance, rawProps, isStateful, isSSR = false) {
  4285. const props2 = {};
  4286. const attrs = {};
  4287. instance.propsDefaults = /* @__PURE__ */ Object.create(null);
  4288. setFullProps(instance, rawProps, props2, attrs);
  4289. for (const key in instance.propsOptions[0]) {
  4290. if (!(key in props2)) {
  4291. props2[key] = void 0;
  4292. }
  4293. }
  4294. {
  4295. validateProps(rawProps || {}, props2, instance);
  4296. }
  4297. if (isStateful) {
  4298. instance.props = isSSR ? props2 : shallowReactive(props2);
  4299. } else {
  4300. if (!instance.type.props) {
  4301. instance.props = attrs;
  4302. } else {
  4303. instance.props = props2;
  4304. }
  4305. }
  4306. instance.attrs = attrs;
  4307. }
  4308. function isInHmrContext(instance) {
  4309. while (instance) {
  4310. if (instance.type.__hmrId)
  4311. return true;
  4312. instance = instance.parent;
  4313. }
  4314. }
  4315. function updateProps(instance, rawProps, rawPrevProps, optimized) {
  4316. const { props: props2, attrs, vnode: { patchFlag } } = instance;
  4317. const rawCurrentProps = toRaw(props2);
  4318. const [options] = instance.propsOptions;
  4319. let hasAttrsChanged = false;
  4320. if (
  4321. // always force full diff in dev
  4322. // - #1942 if hmr is enabled with sfc component
  4323. // - vite#872 non-sfc component used by sfc component
  4324. !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16)
  4325. ) {
  4326. if (patchFlag & 8) {
  4327. const propsToUpdate = instance.vnode.dynamicProps;
  4328. for (let i = 0; i < propsToUpdate.length; i++) {
  4329. let key = propsToUpdate[i];
  4330. if (isEmitListener(instance.emitsOptions, key)) {
  4331. continue;
  4332. }
  4333. const value = rawProps[key];
  4334. if (options) {
  4335. if (hasOwn(attrs, key)) {
  4336. if (value !== attrs[key]) {
  4337. attrs[key] = value;
  4338. hasAttrsChanged = true;
  4339. }
  4340. } else {
  4341. const camelizedKey = camelize(key);
  4342. props2[camelizedKey] = resolvePropValue(
  4343. options,
  4344. rawCurrentProps,
  4345. camelizedKey,
  4346. value,
  4347. instance,
  4348. false
  4349. /* isAbsent */
  4350. );
  4351. }
  4352. } else {
  4353. if (value !== attrs[key]) {
  4354. attrs[key] = value;
  4355. hasAttrsChanged = true;
  4356. }
  4357. }
  4358. }
  4359. }
  4360. } else {
  4361. if (setFullProps(instance, rawProps, props2, attrs)) {
  4362. hasAttrsChanged = true;
  4363. }
  4364. let kebabKey;
  4365. for (const key in rawCurrentProps) {
  4366. if (!rawProps || // for camelCase
  4367. !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case
  4368. // and converted to camelCase (#955)
  4369. ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
  4370. if (options) {
  4371. if (rawPrevProps && // for camelCase
  4372. (rawPrevProps[key] !== void 0 || // for kebab-case
  4373. rawPrevProps[kebabKey] !== void 0)) {
  4374. props2[key] = resolvePropValue(
  4375. options,
  4376. rawCurrentProps,
  4377. key,
  4378. void 0,
  4379. instance,
  4380. true
  4381. /* isAbsent */
  4382. );
  4383. }
  4384. } else {
  4385. delete props2[key];
  4386. }
  4387. }
  4388. }
  4389. if (attrs !== rawCurrentProps) {
  4390. for (const key in attrs) {
  4391. if (!rawProps || !hasOwn(rawProps, key) && true) {
  4392. delete attrs[key];
  4393. hasAttrsChanged = true;
  4394. }
  4395. }
  4396. }
  4397. }
  4398. if (hasAttrsChanged) {
  4399. trigger(instance, "set", "$attrs");
  4400. }
  4401. {
  4402. validateProps(rawProps || {}, props2, instance);
  4403. }
  4404. }
  4405. function setFullProps(instance, rawProps, props2, attrs) {
  4406. const [options, needCastKeys] = instance.propsOptions;
  4407. let hasAttrsChanged = false;
  4408. let rawCastValues;
  4409. if (rawProps) {
  4410. for (let key in rawProps) {
  4411. if (isReservedProp(key)) {
  4412. continue;
  4413. }
  4414. const value = rawProps[key];
  4415. let camelKey;
  4416. if (options && hasOwn(options, camelKey = camelize(key))) {
  4417. if (!needCastKeys || !needCastKeys.includes(camelKey)) {
  4418. props2[camelKey] = value;
  4419. } else {
  4420. (rawCastValues || (rawCastValues = {}))[camelKey] = value;
  4421. }
  4422. } else if (!isEmitListener(instance.emitsOptions, key)) {
  4423. if (!(key in attrs) || value !== attrs[key]) {
  4424. attrs[key] = value;
  4425. hasAttrsChanged = true;
  4426. }
  4427. }
  4428. }
  4429. }
  4430. if (needCastKeys) {
  4431. const rawCurrentProps = toRaw(props2);
  4432. const castValues = rawCastValues || EMPTY_OBJ;
  4433. for (let i = 0; i < needCastKeys.length; i++) {
  4434. const key = needCastKeys[i];
  4435. props2[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key));
  4436. }
  4437. }
  4438. return hasAttrsChanged;
  4439. }
  4440. function resolvePropValue(options, props2, key, value, instance, isAbsent) {
  4441. const opt = options[key];
  4442. if (opt != null) {
  4443. const hasDefault = hasOwn(opt, "default");
  4444. if (hasDefault && value === void 0) {
  4445. const defaultValue = opt.default;
  4446. if (opt.type !== Function && isFunction(defaultValue)) {
  4447. const { propsDefaults } = instance;
  4448. if (key in propsDefaults) {
  4449. value = propsDefaults[key];
  4450. } else {
  4451. setCurrentInstance(instance);
  4452. value = propsDefaults[key] = defaultValue.call(null, props2);
  4453. unsetCurrentInstance();
  4454. }
  4455. } else {
  4456. value = defaultValue;
  4457. }
  4458. }
  4459. if (opt[
  4460. 0
  4461. /* BooleanFlags.shouldCast */
  4462. ]) {
  4463. if (isAbsent && !hasDefault) {
  4464. value = false;
  4465. } else if (opt[
  4466. 1
  4467. /* BooleanFlags.shouldCastTrue */
  4468. ] && (value === "" || value === hyphenate(key))) {
  4469. value = true;
  4470. }
  4471. }
  4472. }
  4473. return value;
  4474. }
  4475. function normalizePropsOptions(comp, appContext, asMixin = false) {
  4476. const cache = appContext.propsCache;
  4477. const cached = cache.get(comp);
  4478. if (cached) {
  4479. return cached;
  4480. }
  4481. const raw = comp.props;
  4482. const normalized = {};
  4483. const needCastKeys = [];
  4484. let hasExtends = false;
  4485. if (!isFunction(comp)) {
  4486. const extendProps = (raw2) => {
  4487. hasExtends = true;
  4488. const [props2, keys] = normalizePropsOptions(raw2, appContext, true);
  4489. extend(normalized, props2);
  4490. if (keys)
  4491. needCastKeys.push(...keys);
  4492. };
  4493. if (!asMixin && appContext.mixins.length) {
  4494. appContext.mixins.forEach(extendProps);
  4495. }
  4496. if (comp.extends) {
  4497. extendProps(comp.extends);
  4498. }
  4499. if (comp.mixins) {
  4500. comp.mixins.forEach(extendProps);
  4501. }
  4502. }
  4503. if (!raw && !hasExtends) {
  4504. if (isObject$1(comp)) {
  4505. cache.set(comp, EMPTY_ARR);
  4506. }
  4507. return EMPTY_ARR;
  4508. }
  4509. if (isArray$1(raw)) {
  4510. for (let i = 0; i < raw.length; i++) {
  4511. if (!isString(raw[i])) {
  4512. warn(`props must be strings when using array syntax.`, raw[i]);
  4513. }
  4514. const normalizedKey = camelize(raw[i]);
  4515. if (validatePropName(normalizedKey)) {
  4516. normalized[normalizedKey] = EMPTY_OBJ;
  4517. }
  4518. }
  4519. } else if (raw) {
  4520. if (!isObject$1(raw)) {
  4521. warn(`invalid props options`, raw);
  4522. }
  4523. for (const key in raw) {
  4524. const normalizedKey = camelize(key);
  4525. if (validatePropName(normalizedKey)) {
  4526. const opt = raw[key];
  4527. const prop = normalized[normalizedKey] = isArray$1(opt) || isFunction(opt) ? { type: opt } : Object.assign({}, opt);
  4528. if (prop) {
  4529. const booleanIndex = getTypeIndex(Boolean, prop.type);
  4530. const stringIndex = getTypeIndex(String, prop.type);
  4531. prop[
  4532. 0
  4533. /* BooleanFlags.shouldCast */
  4534. ] = booleanIndex > -1;
  4535. prop[
  4536. 1
  4537. /* BooleanFlags.shouldCastTrue */
  4538. ] = stringIndex < 0 || booleanIndex < stringIndex;
  4539. if (booleanIndex > -1 || hasOwn(prop, "default")) {
  4540. needCastKeys.push(normalizedKey);
  4541. }
  4542. }
  4543. }
  4544. }
  4545. }
  4546. const res = [normalized, needCastKeys];
  4547. if (isObject$1(comp)) {
  4548. cache.set(comp, res);
  4549. }
  4550. return res;
  4551. }
  4552. function validatePropName(key) {
  4553. if (key[0] !== "$") {
  4554. return true;
  4555. } else {
  4556. warn(`Invalid prop name: "${key}" is a reserved property.`);
  4557. }
  4558. return false;
  4559. }
  4560. function getType(ctor) {
  4561. const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/);
  4562. return match ? match[2] : ctor === null ? "null" : "";
  4563. }
  4564. function isSameType(a, b) {
  4565. return getType(a) === getType(b);
  4566. }
  4567. function getTypeIndex(type2, expectedTypes) {
  4568. if (isArray$1(expectedTypes)) {
  4569. return expectedTypes.findIndex((t2) => isSameType(t2, type2));
  4570. } else if (isFunction(expectedTypes)) {
  4571. return isSameType(expectedTypes, type2) ? 0 : -1;
  4572. }
  4573. return -1;
  4574. }
  4575. function validateProps(rawProps, props2, instance) {
  4576. const resolvedValues = toRaw(props2);
  4577. const options = instance.propsOptions[0];
  4578. for (const key in options) {
  4579. let opt = options[key];
  4580. if (opt == null)
  4581. continue;
  4582. validateProp(key, resolvedValues[key], opt, !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key)));
  4583. }
  4584. }
  4585. function validateProp(name, value, prop, isAbsent) {
  4586. const { type: type2, required: required2, validator } = prop;
  4587. if (required2 && isAbsent) {
  4588. warn('Missing required prop: "' + name + '"');
  4589. return;
  4590. }
  4591. if (value == null && !prop.required) {
  4592. return;
  4593. }
  4594. if (type2 != null && type2 !== true) {
  4595. let isValid = false;
  4596. const types2 = isArray$1(type2) ? type2 : [type2];
  4597. const expectedTypes = [];
  4598. for (let i = 0; i < types2.length && !isValid; i++) {
  4599. const { valid, expectedType } = assertType(value, types2[i]);
  4600. expectedTypes.push(expectedType || "");
  4601. isValid = valid;
  4602. }
  4603. if (!isValid) {
  4604. warn(getInvalidTypeMessage(name, value, expectedTypes));
  4605. return;
  4606. }
  4607. }
  4608. if (validator && !validator(value)) {
  4609. warn('Invalid prop: custom validator check failed for prop "' + name + '".');
  4610. }
  4611. }
  4612. const isSimpleType = /* @__PURE__ */ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
  4613. function assertType(value, type2) {
  4614. let valid;
  4615. const expectedType = getType(type2);
  4616. if (isSimpleType(expectedType)) {
  4617. const t2 = typeof value;
  4618. valid = t2 === expectedType.toLowerCase();
  4619. if (!valid && t2 === "object") {
  4620. valid = value instanceof type2;
  4621. }
  4622. } else if (expectedType === "Object") {
  4623. valid = isObject$1(value);
  4624. } else if (expectedType === "Array") {
  4625. valid = isArray$1(value);
  4626. } else if (expectedType === "null") {
  4627. valid = value === null;
  4628. } else {
  4629. valid = value instanceof type2;
  4630. }
  4631. return {
  4632. valid,
  4633. expectedType
  4634. };
  4635. }
  4636. function getInvalidTypeMessage(name, value, expectedTypes) {
  4637. let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
  4638. const expectedType = expectedTypes[0];
  4639. const receivedType = toRawType(value);
  4640. const expectedValue = styleValue(value, expectedType);
  4641. const receivedValue = styleValue(value, receivedType);
  4642. if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
  4643. message += ` with value ${expectedValue}`;
  4644. }
  4645. message += `, got ${receivedType} `;
  4646. if (isExplicable(receivedType)) {
  4647. message += `with value ${receivedValue}.`;
  4648. }
  4649. return message;
  4650. }
  4651. function styleValue(value, type2) {
  4652. if (type2 === "String") {
  4653. return `"${value}"`;
  4654. } else if (type2 === "Number") {
  4655. return `${Number(value)}`;
  4656. } else {
  4657. return `${value}`;
  4658. }
  4659. }
  4660. function isExplicable(type2) {
  4661. const explicitTypes = ["string", "number", "boolean"];
  4662. return explicitTypes.some((elem) => type2.toLowerCase() === elem);
  4663. }
  4664. function isBoolean(...args) {
  4665. return args.some((elem) => elem.toLowerCase() === "boolean");
  4666. }
  4667. function createAppContext() {
  4668. return {
  4669. app: null,
  4670. config: {
  4671. isNativeTag: NO,
  4672. performance: false,
  4673. globalProperties: {},
  4674. optionMergeStrategies: {},
  4675. errorHandler: void 0,
  4676. warnHandler: void 0,
  4677. compilerOptions: {}
  4678. },
  4679. mixins: [],
  4680. components: {},
  4681. directives: {},
  4682. provides: /* @__PURE__ */ Object.create(null),
  4683. optionsCache: /* @__PURE__ */ new WeakMap(),
  4684. propsCache: /* @__PURE__ */ new WeakMap(),
  4685. emitsCache: /* @__PURE__ */ new WeakMap()
  4686. };
  4687. }
  4688. let uid$1 = 0;
  4689. function createAppAPI(render, hydrate) {
  4690. return function createApp2(rootComponent, rootProps = null) {
  4691. if (!isFunction(rootComponent)) {
  4692. rootComponent = Object.assign({}, rootComponent);
  4693. }
  4694. if (rootProps != null && !isObject$1(rootProps)) {
  4695. warn(`root props passed to app.mount() must be an object.`);
  4696. rootProps = null;
  4697. }
  4698. const context = createAppContext();
  4699. const installedPlugins = /* @__PURE__ */ new Set();
  4700. const app = context.app = {
  4701. _uid: uid$1++,
  4702. _component: rootComponent,
  4703. _props: rootProps,
  4704. _container: null,
  4705. _context: context,
  4706. _instance: null,
  4707. version: version$1,
  4708. get config() {
  4709. return context.config;
  4710. },
  4711. set config(v) {
  4712. {
  4713. warn(`app.config cannot be replaced. Modify individual options instead.`);
  4714. }
  4715. },
  4716. use(plugin2, ...options) {
  4717. if (installedPlugins.has(plugin2)) {
  4718. warn(`Plugin has already been applied to target app.`);
  4719. } else if (plugin2 && isFunction(plugin2.install)) {
  4720. installedPlugins.add(plugin2);
  4721. plugin2.install(app, ...options);
  4722. } else if (isFunction(plugin2)) {
  4723. installedPlugins.add(plugin2);
  4724. plugin2(app, ...options);
  4725. } else {
  4726. warn(`A plugin must either be a function or an object with an "install" function.`);
  4727. }
  4728. return app;
  4729. },
  4730. mixin(mixin2) {
  4731. {
  4732. if (!context.mixins.includes(mixin2)) {
  4733. context.mixins.push(mixin2);
  4734. } else {
  4735. warn("Mixin has already been applied to target app" + (mixin2.name ? `: ${mixin2.name}` : ""));
  4736. }
  4737. }
  4738. return app;
  4739. },
  4740. component(name, component) {
  4741. {
  4742. validateComponentName(name, context.config);
  4743. }
  4744. if (!component) {
  4745. return context.components[name];
  4746. }
  4747. if (context.components[name]) {
  4748. warn(`Component "${name}" has already been registered in target app.`);
  4749. }
  4750. context.components[name] = component;
  4751. return app;
  4752. },
  4753. directive(name, directive) {
  4754. {
  4755. validateDirectiveName(name);
  4756. }
  4757. if (!directive) {
  4758. return context.directives[name];
  4759. }
  4760. if (context.directives[name]) {
  4761. warn(`Directive "${name}" has already been registered in target app.`);
  4762. }
  4763. context.directives[name] = directive;
  4764. return app;
  4765. },
  4766. // fixed by xxxxxx
  4767. mount() {
  4768. },
  4769. // fixed by xxxxxx
  4770. unmount() {
  4771. },
  4772. provide(key, value) {
  4773. if (key in context.provides) {
  4774. warn(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
  4775. }
  4776. context.provides[key] = value;
  4777. return app;
  4778. }
  4779. };
  4780. return app;
  4781. };
  4782. }
  4783. let supported;
  4784. let perf;
  4785. function startMeasure(instance, type2) {
  4786. if (instance.appContext.config.performance && isSupported()) {
  4787. perf.mark(`vue-${type2}-${instance.uid}`);
  4788. }
  4789. {
  4790. devtoolsPerfStart(instance, type2, isSupported() ? perf.now() : Date.now());
  4791. }
  4792. }
  4793. function endMeasure(instance, type2) {
  4794. if (instance.appContext.config.performance && isSupported()) {
  4795. const startTag = `vue-${type2}-${instance.uid}`;
  4796. const endTag = startTag + `:end`;
  4797. perf.mark(endTag);
  4798. perf.measure(`<${formatComponentName(instance, instance.type)}> ${type2}`, startTag, endTag);
  4799. perf.clearMarks(startTag);
  4800. perf.clearMarks(endTag);
  4801. }
  4802. {
  4803. devtoolsPerfEnd(instance, type2, isSupported() ? perf.now() : Date.now());
  4804. }
  4805. }
  4806. function isSupported() {
  4807. if (supported !== void 0) {
  4808. return supported;
  4809. }
  4810. if (typeof window !== "undefined" && window.performance) {
  4811. supported = true;
  4812. perf = window.performance;
  4813. } else {
  4814. supported = false;
  4815. }
  4816. return supported;
  4817. }
  4818. const queuePostRenderEffect$1 = queuePostFlushCb;
  4819. const Fragment = Symbol("Fragment");
  4820. const Text$1 = Symbol("Text");
  4821. const Comment = Symbol("Comment");
  4822. const Static = Symbol("Static");
  4823. function isVNode(value) {
  4824. return value ? value.__v_isVNode === true : false;
  4825. }
  4826. const InternalObjectKey = `__vInternal`;
  4827. function guardReactiveProps(props2) {
  4828. if (!props2)
  4829. return null;
  4830. return isProxy(props2) || InternalObjectKey in props2 ? extend({}, props2) : props2;
  4831. }
  4832. const emptyAppContext = createAppContext();
  4833. let uid = 0;
  4834. function createComponentInstance(vnode, parent, suspense) {
  4835. const type2 = vnode.type;
  4836. const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
  4837. const instance = {
  4838. uid: uid++,
  4839. vnode,
  4840. type: type2,
  4841. parent,
  4842. appContext,
  4843. root: null,
  4844. next: null,
  4845. subTree: null,
  4846. effect: null,
  4847. update: null,
  4848. scope: new EffectScope(
  4849. true
  4850. /* detached */
  4851. ),
  4852. render: null,
  4853. proxy: null,
  4854. exposed: null,
  4855. exposeProxy: null,
  4856. withProxy: null,
  4857. provides: parent ? parent.provides : Object.create(appContext.provides),
  4858. accessCache: null,
  4859. renderCache: [],
  4860. // local resolved assets
  4861. components: null,
  4862. directives: null,
  4863. // resolved props and emits options
  4864. propsOptions: normalizePropsOptions(type2, appContext),
  4865. emitsOptions: normalizeEmitsOptions(type2, appContext),
  4866. // emit
  4867. emit: null,
  4868. emitted: null,
  4869. // props default value
  4870. propsDefaults: EMPTY_OBJ,
  4871. // inheritAttrs
  4872. inheritAttrs: type2.inheritAttrs,
  4873. // state
  4874. ctx: EMPTY_OBJ,
  4875. data: EMPTY_OBJ,
  4876. props: EMPTY_OBJ,
  4877. attrs: EMPTY_OBJ,
  4878. slots: EMPTY_OBJ,
  4879. refs: EMPTY_OBJ,
  4880. setupState: EMPTY_OBJ,
  4881. setupContext: null,
  4882. // suspense related
  4883. suspense,
  4884. suspenseId: suspense ? suspense.pendingId : 0,
  4885. asyncDep: null,
  4886. asyncResolved: false,
  4887. // lifecycle hooks
  4888. // not using enums here because it results in computed properties
  4889. isMounted: false,
  4890. isUnmounted: false,
  4891. isDeactivated: false,
  4892. bc: null,
  4893. c: null,
  4894. bm: null,
  4895. m: null,
  4896. bu: null,
  4897. u: null,
  4898. um: null,
  4899. bum: null,
  4900. da: null,
  4901. a: null,
  4902. rtg: null,
  4903. rtc: null,
  4904. ec: null,
  4905. sp: null
  4906. };
  4907. {
  4908. instance.ctx = createDevRenderContext(instance);
  4909. }
  4910. instance.root = parent ? parent.root : instance;
  4911. instance.emit = emit.bind(null, instance);
  4912. if (vnode.ce) {
  4913. vnode.ce(instance);
  4914. }
  4915. return instance;
  4916. }
  4917. let currentInstance = null;
  4918. const getCurrentInstance = () => currentInstance || currentRenderingInstance;
  4919. const setCurrentInstance = (instance) => {
  4920. currentInstance = instance;
  4921. instance.scope.on();
  4922. };
  4923. const unsetCurrentInstance = () => {
  4924. currentInstance && currentInstance.scope.off();
  4925. currentInstance = null;
  4926. };
  4927. const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
  4928. function validateComponentName(name, config2) {
  4929. const appIsNativeTag = config2.isNativeTag || NO;
  4930. if (isBuiltInTag(name) || appIsNativeTag(name)) {
  4931. warn("Do not use built-in or reserved HTML elements as component id: " + name);
  4932. }
  4933. }
  4934. function isStatefulComponent(instance) {
  4935. return instance.vnode.shapeFlag & 4;
  4936. }
  4937. let isInSSRComponentSetup = false;
  4938. function setupComponent(instance, isSSR = false) {
  4939. isInSSRComponentSetup = isSSR;
  4940. const {
  4941. props: props2
  4942. /*, children*/
  4943. } = instance.vnode;
  4944. const isStateful = isStatefulComponent(instance);
  4945. initProps$1(instance, props2, isStateful, isSSR);
  4946. const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
  4947. isInSSRComponentSetup = false;
  4948. return setupResult;
  4949. }
  4950. function setupStatefulComponent(instance, isSSR) {
  4951. const Component2 = instance.type;
  4952. {
  4953. if (Component2.name) {
  4954. validateComponentName(Component2.name, instance.appContext.config);
  4955. }
  4956. if (Component2.components) {
  4957. const names = Object.keys(Component2.components);
  4958. for (let i = 0; i < names.length; i++) {
  4959. validateComponentName(names[i], instance.appContext.config);
  4960. }
  4961. }
  4962. if (Component2.directives) {
  4963. const names = Object.keys(Component2.directives);
  4964. for (let i = 0; i < names.length; i++) {
  4965. validateDirectiveName(names[i]);
  4966. }
  4967. }
  4968. if (Component2.compilerOptions && isRuntimeOnly()) {
  4969. warn(`"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.`);
  4970. }
  4971. }
  4972. instance.accessCache = /* @__PURE__ */ Object.create(null);
  4973. instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
  4974. {
  4975. exposePropsOnRenderContext(instance);
  4976. }
  4977. const { setup } = Component2;
  4978. if (setup) {
  4979. const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
  4980. setCurrentInstance(instance);
  4981. pauseTracking();
  4982. const setupResult = callWithErrorHandling(setup, instance, 0, [shallowReadonly(instance.props), setupContext]);
  4983. resetTracking();
  4984. unsetCurrentInstance();
  4985. if (isPromise(setupResult)) {
  4986. setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
  4987. {
  4988. warn(`setup() returned a Promise, but the version of Vue you are using does not support it yet.`);
  4989. }
  4990. } else {
  4991. handleSetupResult(instance, setupResult, isSSR);
  4992. }
  4993. } else {
  4994. finishComponentSetup(instance, isSSR);
  4995. }
  4996. }
  4997. function handleSetupResult(instance, setupResult, isSSR) {
  4998. if (isFunction(setupResult)) {
  4999. {
  5000. instance.render = setupResult;
  5001. }
  5002. } else if (isObject$1(setupResult)) {
  5003. if (isVNode(setupResult)) {
  5004. warn(`setup() should not return VNodes directly - return a render function instead.`);
  5005. }
  5006. {
  5007. instance.devtoolsRawSetupState = setupResult;
  5008. }
  5009. instance.setupState = proxyRefs(setupResult);
  5010. {
  5011. exposeSetupStateOnRenderContext(instance);
  5012. }
  5013. } else if (setupResult !== void 0) {
  5014. warn(`setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`);
  5015. }
  5016. finishComponentSetup(instance, isSSR);
  5017. }
  5018. let compile;
  5019. const isRuntimeOnly = () => !compile;
  5020. function finishComponentSetup(instance, isSSR, skipOptions) {
  5021. const Component2 = instance.type;
  5022. if (!instance.render) {
  5023. instance.render = Component2.render || NOOP;
  5024. }
  5025. {
  5026. setCurrentInstance(instance);
  5027. pauseTracking();
  5028. applyOptions$1(instance);
  5029. resetTracking();
  5030. unsetCurrentInstance();
  5031. }
  5032. if (!Component2.render && instance.render === NOOP && !isSSR) {
  5033. if (Component2.template) {
  5034. warn(
  5035. `Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".`
  5036. /* should not happen */
  5037. );
  5038. } else {
  5039. warn(`Component is missing template or render function.`);
  5040. }
  5041. }
  5042. }
  5043. function createAttrsProxy(instance) {
  5044. return new Proxy(
  5045. instance.attrs,
  5046. {
  5047. get(target, key) {
  5048. track(instance, "get", "$attrs");
  5049. return target[key];
  5050. },
  5051. set() {
  5052. warn(`setupContext.attrs is readonly.`);
  5053. return false;
  5054. },
  5055. deleteProperty() {
  5056. warn(`setupContext.attrs is readonly.`);
  5057. return false;
  5058. }
  5059. }
  5060. );
  5061. }
  5062. function createSetupContext(instance) {
  5063. const expose = (exposed) => {
  5064. {
  5065. if (instance.exposed) {
  5066. warn(`expose() should be called only once per setup().`);
  5067. }
  5068. if (exposed != null) {
  5069. let exposedType = typeof exposed;
  5070. if (exposedType === "object") {
  5071. if (isArray$1(exposed)) {
  5072. exposedType = "array";
  5073. } else if (isRef(exposed)) {
  5074. exposedType = "ref";
  5075. }
  5076. }
  5077. if (exposedType !== "object") {
  5078. warn(`expose() should be passed a plain object, received ${exposedType}.`);
  5079. }
  5080. }
  5081. }
  5082. instance.exposed = exposed || {};
  5083. };
  5084. let attrs;
  5085. {
  5086. return Object.freeze({
  5087. get attrs() {
  5088. return attrs || (attrs = createAttrsProxy(instance));
  5089. },
  5090. get slots() {
  5091. return shallowReadonly(instance.slots);
  5092. },
  5093. get emit() {
  5094. return (event, ...args) => instance.emit(event, ...args);
  5095. },
  5096. expose
  5097. });
  5098. }
  5099. }
  5100. function getExposeProxy(instance) {
  5101. if (instance.exposed) {
  5102. return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
  5103. get(target, key) {
  5104. if (key in target) {
  5105. return target[key];
  5106. }
  5107. return instance.proxy[key];
  5108. },
  5109. has(target, key) {
  5110. return key in target || key in publicPropertiesMap;
  5111. }
  5112. }));
  5113. }
  5114. }
  5115. const classifyRE = /(?:^|[-_])(\w)/g;
  5116. const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
  5117. function getComponentName(Component2, includeInferred = true) {
  5118. return isFunction(Component2) ? Component2.displayName || Component2.name : Component2.name || includeInferred && Component2.__name;
  5119. }
  5120. function formatComponentName(instance, Component2, isRoot = false) {
  5121. let name = getComponentName(Component2);
  5122. if (!name && Component2.__file) {
  5123. const match = Component2.__file.match(/([^/\\]+)\.\w+$/);
  5124. if (match) {
  5125. name = match[1];
  5126. }
  5127. }
  5128. if (!name && instance && instance.parent) {
  5129. const inferFromRegistry = (registry) => {
  5130. for (const key in registry) {
  5131. if (registry[key] === Component2) {
  5132. return key;
  5133. }
  5134. }
  5135. };
  5136. name = inferFromRegistry(instance.components || instance.parent.type.components) || inferFromRegistry(instance.appContext.components);
  5137. }
  5138. return name ? classify(name) : isRoot ? `App` : `Anonymous`;
  5139. }
  5140. const computed = (getterOrOptions, debugOptions) => {
  5141. return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
  5142. };
  5143. const version$1 = "3.2.47";
  5144. function unwrapper(target) {
  5145. return unref(target);
  5146. }
  5147. const ARRAYTYPE = "[object Array]";
  5148. const OBJECTTYPE = "[object Object]";
  5149. function diff(current, pre) {
  5150. const result = {};
  5151. syncKeys(current, pre);
  5152. _diff(current, pre, "", result);
  5153. return result;
  5154. }
  5155. function syncKeys(current, pre) {
  5156. current = unwrapper(current);
  5157. if (current === pre)
  5158. return;
  5159. const rootCurrentType = toTypeString(current);
  5160. const rootPreType = toTypeString(pre);
  5161. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  5162. for (let key in pre) {
  5163. const currentValue = current[key];
  5164. if (currentValue === void 0) {
  5165. current[key] = null;
  5166. } else {
  5167. syncKeys(currentValue, pre[key]);
  5168. }
  5169. }
  5170. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  5171. if (current.length >= pre.length) {
  5172. pre.forEach((item, index2) => {
  5173. syncKeys(current[index2], item);
  5174. });
  5175. }
  5176. }
  5177. }
  5178. function _diff(current, pre, path, result) {
  5179. current = unwrapper(current);
  5180. if (current === pre)
  5181. return;
  5182. const rootCurrentType = toTypeString(current);
  5183. const rootPreType = toTypeString(pre);
  5184. if (rootCurrentType == OBJECTTYPE) {
  5185. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  5186. setResult(result, path, current);
  5187. } else {
  5188. for (let key in current) {
  5189. const currentValue = unwrapper(current[key]);
  5190. const preValue = pre[key];
  5191. const currentType = toTypeString(currentValue);
  5192. const preType = toTypeString(preValue);
  5193. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  5194. if (currentValue != preValue) {
  5195. setResult(result, (path == "" ? "" : path + ".") + key, currentValue);
  5196. }
  5197. } else if (currentType == ARRAYTYPE) {
  5198. if (preType != ARRAYTYPE) {
  5199. setResult(result, (path == "" ? "" : path + ".") + key, currentValue);
  5200. } else {
  5201. if (currentValue.length < preValue.length) {
  5202. setResult(result, (path == "" ? "" : path + ".") + key, currentValue);
  5203. } else {
  5204. currentValue.forEach((item, index2) => {
  5205. _diff(item, preValue[index2], (path == "" ? "" : path + ".") + key + "[" + index2 + "]", result);
  5206. });
  5207. }
  5208. }
  5209. } else if (currentType == OBJECTTYPE) {
  5210. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  5211. setResult(result, (path == "" ? "" : path + ".") + key, currentValue);
  5212. } else {
  5213. for (let subKey in currentValue) {
  5214. _diff(currentValue[subKey], preValue[subKey], (path == "" ? "" : path + ".") + key + "." + subKey, result);
  5215. }
  5216. }
  5217. }
  5218. }
  5219. }
  5220. } else if (rootCurrentType == ARRAYTYPE) {
  5221. if (rootPreType != ARRAYTYPE) {
  5222. setResult(result, path, current);
  5223. } else {
  5224. if (current.length < pre.length) {
  5225. setResult(result, path, current);
  5226. } else {
  5227. current.forEach((item, index2) => {
  5228. _diff(item, pre[index2], path + "[" + index2 + "]", result);
  5229. });
  5230. }
  5231. }
  5232. } else {
  5233. setResult(result, path, current);
  5234. }
  5235. }
  5236. function setResult(result, k, v) {
  5237. result[k] = v;
  5238. }
  5239. function hasComponentEffect(instance) {
  5240. return queue.includes(instance.update);
  5241. }
  5242. function flushCallbacks(instance) {
  5243. const ctx = instance.ctx;
  5244. const callbacks = ctx.__next_tick_callbacks;
  5245. if (callbacks && callbacks.length) {
  5246. const copies = callbacks.slice(0);
  5247. callbacks.length = 0;
  5248. for (let i = 0; i < copies.length; i++) {
  5249. copies[i]();
  5250. }
  5251. }
  5252. }
  5253. function nextTick(instance, fn) {
  5254. const ctx = instance.ctx;
  5255. if (!ctx.__next_tick_pending && !hasComponentEffect(instance)) {
  5256. return nextTick$1(fn && fn.bind(instance.proxy));
  5257. }
  5258. let _resolve;
  5259. if (!ctx.__next_tick_callbacks) {
  5260. ctx.__next_tick_callbacks = [];
  5261. }
  5262. ctx.__next_tick_callbacks.push(() => {
  5263. if (fn) {
  5264. callWithErrorHandling(
  5265. fn.bind(instance.proxy),
  5266. instance,
  5267. 14
  5268. /* ErrorCodes.SCHEDULER */
  5269. );
  5270. } else if (_resolve) {
  5271. _resolve(instance.proxy);
  5272. }
  5273. });
  5274. return new Promise((resolve2) => {
  5275. _resolve = resolve2;
  5276. });
  5277. }
  5278. function clone$1(src, seen) {
  5279. src = unwrapper(src);
  5280. const type2 = typeof src;
  5281. if (type2 === "object" && src !== null) {
  5282. let copy = seen.get(src);
  5283. if (typeof copy !== "undefined") {
  5284. return copy;
  5285. }
  5286. if (isArray$1(src)) {
  5287. const len = src.length;
  5288. copy = new Array(len);
  5289. seen.set(src, copy);
  5290. for (let i = 0; i < len; i++) {
  5291. copy[i] = clone$1(src[i], seen);
  5292. }
  5293. } else {
  5294. copy = {};
  5295. seen.set(src, copy);
  5296. for (const name in src) {
  5297. if (hasOwn(src, name)) {
  5298. copy[name] = clone$1(src[name], seen);
  5299. }
  5300. }
  5301. }
  5302. return copy;
  5303. }
  5304. if (type2 !== "symbol") {
  5305. return src;
  5306. }
  5307. }
  5308. function deepCopy(src) {
  5309. return clone$1(src, typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : /* @__PURE__ */ new Map());
  5310. }
  5311. function getMPInstanceData(instance, keys) {
  5312. const data = instance.data;
  5313. const ret = /* @__PURE__ */ Object.create(null);
  5314. keys.forEach((key) => {
  5315. ret[key] = data[key];
  5316. });
  5317. return ret;
  5318. }
  5319. function patch(instance, data, oldData) {
  5320. if (!data) {
  5321. return;
  5322. }
  5323. data = deepCopy(data);
  5324. const ctx = instance.ctx;
  5325. const mpType = ctx.mpType;
  5326. if (mpType === "page" || mpType === "component") {
  5327. data.r0 = 1;
  5328. const mpInstance = ctx.$scope;
  5329. const keys = Object.keys(data);
  5330. const diffData = diff(data, oldData || getMPInstanceData(mpInstance, keys));
  5331. if (Object.keys(diffData).length) {
  5332. ctx.__next_tick_pending = true;
  5333. mpInstance.setData(diffData, () => {
  5334. ctx.__next_tick_pending = false;
  5335. flushCallbacks(instance);
  5336. });
  5337. flushPreFlushCbs();
  5338. } else {
  5339. flushCallbacks(instance);
  5340. }
  5341. }
  5342. }
  5343. function initAppConfig(appConfig) {
  5344. appConfig.globalProperties.$nextTick = function $nextTick(fn) {
  5345. return nextTick(this.$, fn);
  5346. };
  5347. }
  5348. function onApplyOptions(options, instance, publicThis) {
  5349. instance.appContext.config.globalProperties.$applyOptions(options, instance, publicThis);
  5350. const computedOptions = options.computed;
  5351. if (computedOptions) {
  5352. const keys = Object.keys(computedOptions);
  5353. if (keys.length) {
  5354. const ctx = instance.ctx;
  5355. if (!ctx.$computedKeys) {
  5356. ctx.$computedKeys = [];
  5357. }
  5358. ctx.$computedKeys.push(...keys);
  5359. }
  5360. }
  5361. delete instance.ctx.$onApplyOptions;
  5362. }
  5363. function setRef$1(instance, isUnmount = false) {
  5364. const { setupState, $templateRefs, ctx: { $scope, $mpPlatform } } = instance;
  5365. if ($mpPlatform === "mp-alipay") {
  5366. return;
  5367. }
  5368. if (!$templateRefs || !$scope) {
  5369. return;
  5370. }
  5371. if (isUnmount) {
  5372. return $templateRefs.forEach((templateRef) => setTemplateRef(templateRef, null, setupState));
  5373. }
  5374. const check = $mpPlatform === "mp-baidu" || $mpPlatform === "mp-toutiao";
  5375. const doSetByRefs = (refs) => {
  5376. const mpComponents = (
  5377. // 字节小程序 selectAllComponents 可能返回 null
  5378. // https://github.com/dcloudio/uni-app/issues/3954
  5379. ($scope.selectAllComponents(".r") || []).concat($scope.selectAllComponents(".r-i-f") || [])
  5380. );
  5381. return refs.filter((templateRef) => {
  5382. const refValue = findComponentPublicInstance(mpComponents, templateRef.i);
  5383. if (check && refValue === null) {
  5384. return true;
  5385. }
  5386. setTemplateRef(templateRef, refValue, setupState);
  5387. return false;
  5388. });
  5389. };
  5390. const doSet = () => {
  5391. const refs = doSetByRefs($templateRefs);
  5392. if (refs.length && instance.proxy && instance.proxy.$scope) {
  5393. instance.proxy.$scope.setData({ r1: 1 }, () => {
  5394. doSetByRefs(refs);
  5395. });
  5396. }
  5397. };
  5398. if ($scope._$setRef) {
  5399. $scope._$setRef(doSet);
  5400. } else {
  5401. nextTick(instance, doSet);
  5402. }
  5403. }
  5404. function toSkip(value) {
  5405. if (isObject$1(value)) {
  5406. markRaw(value);
  5407. }
  5408. return value;
  5409. }
  5410. function findComponentPublicInstance(mpComponents, id) {
  5411. const mpInstance = mpComponents.find((com) => com && (com.properties || com.props).uI === id);
  5412. if (mpInstance) {
  5413. const vm = mpInstance.$vm;
  5414. if (vm) {
  5415. return getExposeProxy(vm.$) || vm;
  5416. }
  5417. return toSkip(mpInstance);
  5418. }
  5419. return null;
  5420. }
  5421. function setTemplateRef({ r, f: f2 }, refValue, setupState) {
  5422. if (isFunction(r)) {
  5423. r(refValue, {});
  5424. } else {
  5425. const _isString = isString(r);
  5426. const _isRef = isRef(r);
  5427. if (_isString || _isRef) {
  5428. if (f2) {
  5429. if (!_isRef) {
  5430. return;
  5431. }
  5432. if (!isArray$1(r.value)) {
  5433. r.value = [];
  5434. }
  5435. const existing = r.value;
  5436. if (existing.indexOf(refValue) === -1) {
  5437. existing.push(refValue);
  5438. if (!refValue) {
  5439. return;
  5440. }
  5441. onBeforeUnmount(() => remove(existing, refValue), refValue.$);
  5442. }
  5443. } else if (_isString) {
  5444. if (hasOwn(setupState, r)) {
  5445. setupState[r] = refValue;
  5446. }
  5447. } else if (isRef(r)) {
  5448. r.value = refValue;
  5449. } else {
  5450. warnRef(r);
  5451. }
  5452. } else {
  5453. warnRef(r);
  5454. }
  5455. }
  5456. }
  5457. function warnRef(ref2) {
  5458. warn("Invalid template ref type:", ref2, `(${typeof ref2})`);
  5459. }
  5460. var MPType;
  5461. (function(MPType2) {
  5462. MPType2["APP"] = "app";
  5463. MPType2["PAGE"] = "page";
  5464. MPType2["COMPONENT"] = "component";
  5465. })(MPType || (MPType = {}));
  5466. const queuePostRenderEffect = queuePostFlushCb;
  5467. function mountComponent(initialVNode, options) {
  5468. const instance = initialVNode.component = createComponentInstance(initialVNode, options.parentComponent, null);
  5469. {
  5470. instance.ctx.$onApplyOptions = onApplyOptions;
  5471. instance.ctx.$children = [];
  5472. }
  5473. if (options.mpType === "app") {
  5474. instance.render = NOOP;
  5475. }
  5476. if (options.onBeforeSetup) {
  5477. options.onBeforeSetup(instance, options);
  5478. }
  5479. {
  5480. pushWarningContext(initialVNode);
  5481. startMeasure(instance, `mount`);
  5482. }
  5483. {
  5484. startMeasure(instance, `init`);
  5485. }
  5486. setupComponent(instance);
  5487. {
  5488. endMeasure(instance, `init`);
  5489. }
  5490. {
  5491. if (options.parentComponent && instance.proxy) {
  5492. options.parentComponent.ctx.$children.push(getExposeProxy(instance) || instance.proxy);
  5493. }
  5494. }
  5495. setupRenderEffect(instance);
  5496. {
  5497. popWarningContext();
  5498. endMeasure(instance, `mount`);
  5499. }
  5500. return instance.proxy;
  5501. }
  5502. const getFunctionalFallthrough = (attrs) => {
  5503. let res;
  5504. for (const key in attrs) {
  5505. if (key === "class" || key === "style" || isOn(key)) {
  5506. (res || (res = {}))[key] = attrs[key];
  5507. }
  5508. }
  5509. return res;
  5510. };
  5511. function renderComponentRoot(instance) {
  5512. const { type: Component2, vnode, proxy, withProxy, props: props2, propsOptions: [propsOptions], slots, attrs, emit: emit2, render, renderCache, data, setupState, ctx, uid: uid2, appContext: { app: { config: { globalProperties: { pruneComponentPropsCache: pruneComponentPropsCache2 } } } }, inheritAttrs } = instance;
  5513. instance.$templateRefs = [];
  5514. instance.$ei = 0;
  5515. pruneComponentPropsCache2(uid2);
  5516. instance.__counter = instance.__counter === 0 ? 1 : 0;
  5517. let result;
  5518. const prev = setCurrentRenderingInstance(instance);
  5519. try {
  5520. if (vnode.shapeFlag & 4) {
  5521. fallthroughAttrs(inheritAttrs, props2, propsOptions, attrs);
  5522. const proxyToUse = withProxy || proxy;
  5523. result = render.call(proxyToUse, proxyToUse, renderCache, props2, setupState, data, ctx);
  5524. } else {
  5525. fallthroughAttrs(inheritAttrs, props2, propsOptions, Component2.props ? attrs : getFunctionalFallthrough(attrs));
  5526. const render2 = Component2;
  5527. result = render2.length > 1 ? render2(props2, { attrs, slots, emit: emit2 }) : render2(
  5528. props2,
  5529. null
  5530. /* we know it doesn't need it */
  5531. );
  5532. }
  5533. } catch (err) {
  5534. handleError(
  5535. err,
  5536. instance,
  5537. 1
  5538. /* ErrorCodes.RENDER_FUNCTION */
  5539. );
  5540. result = false;
  5541. }
  5542. setRef$1(instance);
  5543. setCurrentRenderingInstance(prev);
  5544. return result;
  5545. }
  5546. function fallthroughAttrs(inheritAttrs, props2, propsOptions, fallthroughAttrs2) {
  5547. if (props2 && fallthroughAttrs2 && inheritAttrs !== false) {
  5548. const keys = Object.keys(fallthroughAttrs2).filter((key) => key !== "class" && key !== "style");
  5549. if (!keys.length) {
  5550. return;
  5551. }
  5552. if (propsOptions && keys.some(isModelListener)) {
  5553. keys.forEach((key) => {
  5554. if (!isModelListener(key) || !(key.slice(9) in propsOptions)) {
  5555. props2[key] = fallthroughAttrs2[key];
  5556. }
  5557. });
  5558. } else {
  5559. keys.forEach((key) => props2[key] = fallthroughAttrs2[key]);
  5560. }
  5561. }
  5562. }
  5563. const updateComponentPreRender = (instance) => {
  5564. pauseTracking();
  5565. flushPreFlushCbs();
  5566. resetTracking();
  5567. };
  5568. function componentUpdateScopedSlotsFn() {
  5569. const scopedSlotsData = this.$scopedSlotsData;
  5570. if (!scopedSlotsData || scopedSlotsData.length === 0) {
  5571. return;
  5572. }
  5573. const mpInstance = this.ctx.$scope;
  5574. const oldData = mpInstance.data;
  5575. const diffData = /* @__PURE__ */ Object.create(null);
  5576. scopedSlotsData.forEach(({ path, index: index2, data }) => {
  5577. const oldScopedSlotData = getValueByDataPath(oldData, path);
  5578. const diffPath = isString(index2) ? `${path}.${index2}` : `${path}[${index2}]`;
  5579. if (typeof oldScopedSlotData === "undefined" || typeof oldScopedSlotData[index2] === "undefined") {
  5580. diffData[diffPath] = data;
  5581. } else {
  5582. const diffScopedSlotData = diff(data, oldScopedSlotData[index2]);
  5583. Object.keys(diffScopedSlotData).forEach((name) => {
  5584. diffData[diffPath + "." + name] = diffScopedSlotData[name];
  5585. });
  5586. }
  5587. });
  5588. scopedSlotsData.length = 0;
  5589. if (Object.keys(diffData).length) {
  5590. mpInstance.setData(diffData);
  5591. }
  5592. }
  5593. function toggleRecurse({ effect, update }, allowed) {
  5594. effect.allowRecurse = update.allowRecurse = allowed;
  5595. }
  5596. function setupRenderEffect(instance) {
  5597. const updateScopedSlots = componentUpdateScopedSlotsFn.bind(instance);
  5598. instance.$updateScopedSlots = () => nextTick$1(() => queueJob(updateScopedSlots));
  5599. const componentUpdateFn = () => {
  5600. if (!instance.isMounted) {
  5601. onBeforeUnmount(() => {
  5602. setRef$1(instance, true);
  5603. }, instance);
  5604. {
  5605. startMeasure(instance, `patch`);
  5606. }
  5607. patch(instance, renderComponentRoot(instance));
  5608. {
  5609. endMeasure(instance, `patch`);
  5610. }
  5611. {
  5612. devtoolsComponentAdded(instance);
  5613. }
  5614. } else {
  5615. const { next, bu, u } = instance;
  5616. {
  5617. pushWarningContext(next || instance.vnode);
  5618. }
  5619. toggleRecurse(instance, false);
  5620. updateComponentPreRender();
  5621. if (bu) {
  5622. invokeArrayFns$1(bu);
  5623. }
  5624. toggleRecurse(instance, true);
  5625. {
  5626. startMeasure(instance, `patch`);
  5627. }
  5628. patch(instance, renderComponentRoot(instance));
  5629. {
  5630. endMeasure(instance, `patch`);
  5631. }
  5632. if (u) {
  5633. queuePostRenderEffect(u);
  5634. }
  5635. {
  5636. devtoolsComponentUpdated(instance);
  5637. }
  5638. {
  5639. popWarningContext();
  5640. }
  5641. }
  5642. };
  5643. const effect = instance.effect = new ReactiveEffect(
  5644. componentUpdateFn,
  5645. () => queueJob(instance.update),
  5646. instance.scope
  5647. // track it in component's effect scope
  5648. );
  5649. const update = instance.update = effect.run.bind(effect);
  5650. update.id = instance.uid;
  5651. toggleRecurse(instance, true);
  5652. {
  5653. effect.onTrack = instance.rtc ? (e2) => invokeArrayFns$1(instance.rtc, e2) : void 0;
  5654. effect.onTrigger = instance.rtg ? (e2) => invokeArrayFns$1(instance.rtg, e2) : void 0;
  5655. update.ownerInstance = instance;
  5656. }
  5657. update();
  5658. }
  5659. function unmountComponent(instance) {
  5660. const { bum, scope, update, um } = instance;
  5661. if (bum) {
  5662. invokeArrayFns$1(bum);
  5663. }
  5664. scope.stop();
  5665. if (update) {
  5666. update.active = false;
  5667. }
  5668. if (um) {
  5669. queuePostRenderEffect(um);
  5670. }
  5671. queuePostRenderEffect(() => {
  5672. instance.isUnmounted = true;
  5673. });
  5674. {
  5675. devtoolsComponentRemoved(instance);
  5676. }
  5677. }
  5678. const oldCreateApp = createAppAPI();
  5679. function getTarget() {
  5680. if (typeof window !== "undefined") {
  5681. return window;
  5682. }
  5683. if (typeof globalThis !== "undefined") {
  5684. return globalThis;
  5685. }
  5686. if (typeof global !== "undefined") {
  5687. return global;
  5688. }
  5689. if (typeof my !== "undefined") {
  5690. return my;
  5691. }
  5692. }
  5693. function createVueApp(rootComponent, rootProps = null) {
  5694. const target = getTarget();
  5695. target.__VUE__ = true;
  5696. {
  5697. setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
  5698. }
  5699. const app = oldCreateApp(rootComponent, rootProps);
  5700. const appContext = app._context;
  5701. initAppConfig(appContext.config);
  5702. const createVNode = (initialVNode) => {
  5703. initialVNode.appContext = appContext;
  5704. initialVNode.shapeFlag = 6;
  5705. return initialVNode;
  5706. };
  5707. const createComponent2 = function createComponent3(initialVNode, options) {
  5708. return mountComponent(createVNode(initialVNode), options);
  5709. };
  5710. const destroyComponent = function destroyComponent2(component) {
  5711. return component && unmountComponent(component.$);
  5712. };
  5713. app.mount = function mount() {
  5714. rootComponent.render = NOOP;
  5715. const instance = mountComponent(createVNode({ type: rootComponent }), {
  5716. mpType: MPType.APP,
  5717. mpInstance: null,
  5718. parentComponent: null,
  5719. slots: [],
  5720. props: null
  5721. });
  5722. app._instance = instance.$;
  5723. {
  5724. devtoolsInitApp(app, version$1);
  5725. }
  5726. instance.$app = app;
  5727. instance.$createComponent = createComponent2;
  5728. instance.$destroyComponent = destroyComponent;
  5729. appContext.$appInstance = instance;
  5730. return instance;
  5731. };
  5732. app.unmount = function unmount() {
  5733. warn(`Cannot unmount an app.`);
  5734. };
  5735. return app;
  5736. }
  5737. function injectLifecycleHook(name, hook, publicThis, instance) {
  5738. if (isFunction(hook)) {
  5739. injectHook(name, hook.bind(publicThis), instance);
  5740. }
  5741. }
  5742. function initHooks$1(options, instance, publicThis) {
  5743. const mpType = options.mpType || publicThis.$mpType;
  5744. if (!mpType || mpType === "component") {
  5745. return;
  5746. }
  5747. Object.keys(options).forEach((name) => {
  5748. if (isUniLifecycleHook(name, options[name], false)) {
  5749. const hooks = options[name];
  5750. if (isArray$1(hooks)) {
  5751. hooks.forEach((hook) => injectLifecycleHook(name, hook, publicThis, instance));
  5752. } else {
  5753. injectLifecycleHook(name, hooks, publicThis, instance);
  5754. }
  5755. }
  5756. });
  5757. }
  5758. function applyOptions$2(options, instance, publicThis) {
  5759. initHooks$1(options, instance, publicThis);
  5760. }
  5761. function set$3(target, key, val) {
  5762. return target[key] = val;
  5763. }
  5764. function createErrorHandler(app) {
  5765. return function errorHandler(err, instance, _info) {
  5766. if (!instance) {
  5767. throw err;
  5768. }
  5769. const appInstance = app._instance;
  5770. if (!appInstance || !appInstance.proxy) {
  5771. throw err;
  5772. }
  5773. {
  5774. appInstance.proxy.$callHook(ON_ERROR, err);
  5775. }
  5776. };
  5777. }
  5778. function mergeAsArray(to, from) {
  5779. return to ? [...new Set([].concat(to, from))] : from;
  5780. }
  5781. function initOptionMergeStrategies(optionMergeStrategies) {
  5782. UniLifecycleHooks.forEach((name) => {
  5783. optionMergeStrategies[name] = mergeAsArray;
  5784. });
  5785. }
  5786. let realAtob;
  5787. const b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
  5788. const b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  5789. if (typeof atob !== "function") {
  5790. realAtob = function(str) {
  5791. str = String(str).replace(/[\t\n\f\r ]+/g, "");
  5792. if (!b64re.test(str)) {
  5793. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  5794. }
  5795. str += "==".slice(2 - (str.length & 3));
  5796. var bitmap;
  5797. var result = "";
  5798. var r1;
  5799. var r2;
  5800. var i = 0;
  5801. for (; i < str.length; ) {
  5802. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  5803. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  5804. }
  5805. return result;
  5806. };
  5807. } else {
  5808. realAtob = atob;
  5809. }
  5810. function b64DecodeUnicode(str) {
  5811. return decodeURIComponent(realAtob(str).split("").map(function(c) {
  5812. return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
  5813. }).join(""));
  5814. }
  5815. function getCurrentUserInfo() {
  5816. const token = index$1.getStorageSync("uni_id_token") || "";
  5817. const tokenArr = token.split(".");
  5818. if (!token || tokenArr.length !== 3) {
  5819. return {
  5820. uid: null,
  5821. role: [],
  5822. permission: [],
  5823. tokenExpired: 0
  5824. };
  5825. }
  5826. let userInfo;
  5827. try {
  5828. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  5829. } catch (error2) {
  5830. throw new Error("获取当前用户信息出错,详细错误信息为:" + error2.message);
  5831. }
  5832. userInfo.tokenExpired = userInfo.exp * 1e3;
  5833. delete userInfo.exp;
  5834. delete userInfo.iat;
  5835. return userInfo;
  5836. }
  5837. function uniIdMixin(globalProperties) {
  5838. globalProperties.uniIDHasRole = function(roleId) {
  5839. const { role } = getCurrentUserInfo();
  5840. return role.indexOf(roleId) > -1;
  5841. };
  5842. globalProperties.uniIDHasPermission = function(permissionId) {
  5843. const { permission } = getCurrentUserInfo();
  5844. return this.uniIDHasRole("admin") || permission.indexOf(permissionId) > -1;
  5845. };
  5846. globalProperties.uniIDTokenValid = function() {
  5847. const { tokenExpired } = getCurrentUserInfo();
  5848. return tokenExpired > Date.now();
  5849. };
  5850. }
  5851. function initApp(app) {
  5852. const appConfig = app._context.config;
  5853. appConfig.errorHandler = invokeCreateErrorHandler(app, createErrorHandler);
  5854. initOptionMergeStrategies(appConfig.optionMergeStrategies);
  5855. const globalProperties = appConfig.globalProperties;
  5856. {
  5857. uniIdMixin(globalProperties);
  5858. }
  5859. {
  5860. globalProperties.$set = set$3;
  5861. globalProperties.$applyOptions = applyOptions$2;
  5862. }
  5863. {
  5864. index$1.invokeCreateVueAppHook(app);
  5865. }
  5866. }
  5867. const propsCaches = /* @__PURE__ */ Object.create(null);
  5868. function renderProps(props2) {
  5869. const { uid: uid2, __counter } = getCurrentInstance();
  5870. const propsId = (propsCaches[uid2] || (propsCaches[uid2] = [])).push(guardReactiveProps(props2)) - 1;
  5871. return uid2 + "," + propsId + "," + __counter;
  5872. }
  5873. function pruneComponentPropsCache(uid2) {
  5874. delete propsCaches[uid2];
  5875. }
  5876. function findComponentPropsData(up) {
  5877. if (!up) {
  5878. return;
  5879. }
  5880. const [uid2, propsId] = up.split(",");
  5881. if (!propsCaches[uid2]) {
  5882. return;
  5883. }
  5884. return propsCaches[uid2][parseInt(propsId)];
  5885. }
  5886. var plugin = {
  5887. install(app) {
  5888. initApp(app);
  5889. app.config.globalProperties.pruneComponentPropsCache = pruneComponentPropsCache;
  5890. const oldMount = app.mount;
  5891. app.mount = function mount(rootContainer) {
  5892. const instance = oldMount.call(app, rootContainer);
  5893. const createApp2 = getCreateApp();
  5894. if (createApp2) {
  5895. createApp2(instance);
  5896. } else {
  5897. if (typeof createMiniProgramApp !== "undefined") {
  5898. createMiniProgramApp(instance);
  5899. }
  5900. }
  5901. return instance;
  5902. };
  5903. }
  5904. };
  5905. function getCreateApp() {
  5906. const method3 = "createApp";
  5907. if (typeof global !== "undefined") {
  5908. return global[method3];
  5909. } else if (typeof my !== "undefined") {
  5910. return my[method3];
  5911. }
  5912. }
  5913. function vOn(value, key) {
  5914. const instance = getCurrentInstance();
  5915. const ctx = instance.ctx;
  5916. const extraKey = typeof key !== "undefined" && (ctx.$mpPlatform === "mp-weixin" || ctx.$mpPlatform === "mp-qq") && (isString(key) || typeof key === "number") ? "_" + key : "";
  5917. const name = "e" + instance.$ei++ + extraKey;
  5918. const mpInstance = ctx.$scope;
  5919. if (!value) {
  5920. delete mpInstance[name];
  5921. return name;
  5922. }
  5923. const existingInvoker = mpInstance[name];
  5924. if (existingInvoker) {
  5925. existingInvoker.value = value;
  5926. } else {
  5927. mpInstance[name] = createInvoker(value, instance);
  5928. }
  5929. return name;
  5930. }
  5931. function createInvoker(initialValue, instance) {
  5932. const invoker = (e2) => {
  5933. patchMPEvent(e2);
  5934. let args = [e2];
  5935. if (e2.detail && e2.detail.__args__) {
  5936. args = e2.detail.__args__;
  5937. }
  5938. const eventValue = invoker.value;
  5939. const invoke = () => callWithAsyncErrorHandling(patchStopImmediatePropagation(e2, eventValue), instance, 5, args);
  5940. const eventTarget = e2.target;
  5941. const eventSync = eventTarget ? eventTarget.dataset ? String(eventTarget.dataset.eventsync) === "true" : false : false;
  5942. if (bubbles.includes(e2.type) && !eventSync) {
  5943. setTimeout(invoke);
  5944. } else {
  5945. const res = invoke();
  5946. if (e2.type === "input" && (isArray$1(res) || isPromise(res))) {
  5947. return;
  5948. }
  5949. return res;
  5950. }
  5951. };
  5952. invoker.value = initialValue;
  5953. return invoker;
  5954. }
  5955. const bubbles = [
  5956. // touch事件暂不做延迟,否则在 Android 上会影响性能,比如一些拖拽跟手手势等
  5957. // 'touchstart',
  5958. // 'touchmove',
  5959. // 'touchcancel',
  5960. // 'touchend',
  5961. "tap",
  5962. "longpress",
  5963. "longtap",
  5964. "transitionend",
  5965. "animationstart",
  5966. "animationiteration",
  5967. "animationend",
  5968. "touchforcechange"
  5969. ];
  5970. function patchMPEvent(event) {
  5971. if (event.type && event.target) {
  5972. event.preventDefault = NOOP;
  5973. event.stopPropagation = NOOP;
  5974. event.stopImmediatePropagation = NOOP;
  5975. if (!hasOwn(event, "detail")) {
  5976. event.detail = {};
  5977. }
  5978. if (hasOwn(event, "markerId")) {
  5979. event.detail = typeof event.detail === "object" ? event.detail : {};
  5980. event.detail.markerId = event.markerId;
  5981. }
  5982. if (isPlainObject$2(event.detail) && hasOwn(event.detail, "checked") && !hasOwn(event.detail, "value")) {
  5983. event.detail.value = event.detail.checked;
  5984. }
  5985. if (isPlainObject$2(event.detail)) {
  5986. event.target = extend({}, event.target, event.detail);
  5987. }
  5988. }
  5989. }
  5990. function patchStopImmediatePropagation(e2, value) {
  5991. if (isArray$1(value)) {
  5992. const originalStop = e2.stopImmediatePropagation;
  5993. e2.stopImmediatePropagation = () => {
  5994. originalStop && originalStop.call(e2);
  5995. e2._stopped = true;
  5996. };
  5997. return value.map((fn) => (e3) => !e3._stopped && fn(e3));
  5998. } else {
  5999. return value;
  6000. }
  6001. }
  6002. function vFor(source, renderItem) {
  6003. let ret;
  6004. if (isArray$1(source) || isString(source)) {
  6005. ret = new Array(source.length);
  6006. for (let i = 0, l = source.length; i < l; i++) {
  6007. ret[i] = renderItem(source[i], i, i);
  6008. }
  6009. } else if (typeof source === "number") {
  6010. if (!Number.isInteger(source)) {
  6011. warn(`The v-for range expect an integer value but got ${source}.`);
  6012. return [];
  6013. }
  6014. ret = new Array(source);
  6015. for (let i = 0; i < source; i++) {
  6016. ret[i] = renderItem(i + 1, i, i);
  6017. }
  6018. } else if (isObject$1(source)) {
  6019. if (source[Symbol.iterator]) {
  6020. ret = Array.from(source, (item, i) => renderItem(item, i, i));
  6021. } else {
  6022. const keys = Object.keys(source);
  6023. ret = new Array(keys.length);
  6024. for (let i = 0, l = keys.length; i < l; i++) {
  6025. const key = keys[i];
  6026. ret[i] = renderItem(source[key], key, i);
  6027. }
  6028. }
  6029. } else {
  6030. ret = [];
  6031. }
  6032. return ret;
  6033. }
  6034. function stringifyStyle(value) {
  6035. if (isString(value)) {
  6036. return value;
  6037. }
  6038. return stringify(normalizeStyle(value));
  6039. }
  6040. function stringify(styles) {
  6041. let ret = "";
  6042. if (!styles || isString(styles)) {
  6043. return ret;
  6044. }
  6045. for (const key in styles) {
  6046. ret += `${key.startsWith(`--`) ? key : hyphenate(key)}:${styles[key]};`;
  6047. }
  6048. return ret;
  6049. }
  6050. function setRef(ref2, id, opts = {}) {
  6051. const { $templateRefs } = getCurrentInstance();
  6052. $templateRefs.push({ i: id, r: ref2, k: opts.k, f: opts.f });
  6053. }
  6054. const o = (value, key) => vOn(value, key);
  6055. const f = (source, renderItem) => vFor(source, renderItem);
  6056. const s = (value) => stringifyStyle(value);
  6057. const e = (target, ...sources) => extend(target, ...sources);
  6058. const n = (value) => normalizeClass(value);
  6059. const t = (val) => toDisplayString(val);
  6060. const p = (props2) => renderProps(props2);
  6061. const sr = (ref2, id, opts) => setRef(ref2, id, opts);
  6062. function createApp$1(rootComponent, rootProps = null) {
  6063. rootComponent && (rootComponent.mpType = "app");
  6064. return createVueApp(rootComponent, rootProps).use(plugin);
  6065. }
  6066. const createSSRApp = createApp$1;
  6067. const MP_METHODS = [
  6068. "createSelectorQuery",
  6069. "createIntersectionObserver",
  6070. "selectAllComponents",
  6071. "selectComponent"
  6072. ];
  6073. function createEmitFn(oldEmit, ctx) {
  6074. return function emit2(event, ...args) {
  6075. const scope = ctx.$scope;
  6076. if (scope && event) {
  6077. const detail = { __args__: args };
  6078. {
  6079. scope.triggerEvent(event, detail);
  6080. }
  6081. }
  6082. return oldEmit.apply(this, [event, ...args]);
  6083. };
  6084. }
  6085. function initBaseInstance(instance, options) {
  6086. const ctx = instance.ctx;
  6087. ctx.mpType = options.mpType;
  6088. ctx.$mpType = options.mpType;
  6089. ctx.$mpPlatform = "mp-weixin";
  6090. ctx.$scope = options.mpInstance;
  6091. ctx.$mp = {};
  6092. {
  6093. ctx._self = {};
  6094. }
  6095. instance.slots = {};
  6096. if (isArray$1(options.slots) && options.slots.length) {
  6097. options.slots.forEach((name) => {
  6098. instance.slots[name] = true;
  6099. });
  6100. if (instance.slots[SLOT_DEFAULT_NAME]) {
  6101. instance.slots.default = true;
  6102. }
  6103. }
  6104. ctx.getOpenerEventChannel = function() {
  6105. {
  6106. return options.mpInstance.getOpenerEventChannel();
  6107. }
  6108. };
  6109. ctx.$hasHook = hasHook;
  6110. ctx.$callHook = callHook;
  6111. instance.emit = createEmitFn(instance.emit, ctx);
  6112. }
  6113. function initComponentInstance(instance, options) {
  6114. initBaseInstance(instance, options);
  6115. const ctx = instance.ctx;
  6116. MP_METHODS.forEach((method3) => {
  6117. ctx[method3] = function(...args) {
  6118. const mpInstance = ctx.$scope;
  6119. if (mpInstance && mpInstance[method3]) {
  6120. return mpInstance[method3].apply(mpInstance, args);
  6121. }
  6122. };
  6123. });
  6124. }
  6125. function initMocks(instance, mpInstance, mocks2) {
  6126. const ctx = instance.ctx;
  6127. mocks2.forEach((mock) => {
  6128. if (hasOwn(mpInstance, mock)) {
  6129. instance[mock] = ctx[mock] = mpInstance[mock];
  6130. }
  6131. });
  6132. }
  6133. function hasHook(name) {
  6134. const hooks = this.$[name];
  6135. if (hooks && hooks.length) {
  6136. return true;
  6137. }
  6138. return false;
  6139. }
  6140. function callHook(name, args) {
  6141. if (name === "mounted") {
  6142. callHook.call(this, "bm");
  6143. this.$.isMounted = true;
  6144. name = "m";
  6145. }
  6146. const hooks = this.$[name];
  6147. return hooks && invokeArrayFns(hooks, args);
  6148. }
  6149. const PAGE_INIT_HOOKS = [
  6150. ON_LOAD,
  6151. ON_SHOW,
  6152. ON_HIDE,
  6153. ON_UNLOAD,
  6154. ON_RESIZE,
  6155. ON_TAB_ITEM_TAP,
  6156. ON_REACH_BOTTOM,
  6157. ON_PULL_DOWN_REFRESH,
  6158. ON_ADD_TO_FAVORITES
  6159. // 'onReady', // lifetimes.ready
  6160. // 'onPageScroll', // 影响性能,开发者手动注册
  6161. // 'onShareTimeline', // 右上角菜单,开发者手动注册
  6162. // 'onShareAppMessage' // 右上角菜单,开发者手动注册
  6163. ];
  6164. function findHooks(vueOptions, hooks = /* @__PURE__ */ new Set()) {
  6165. if (vueOptions) {
  6166. Object.keys(vueOptions).forEach((name) => {
  6167. if (isUniLifecycleHook(name, vueOptions[name])) {
  6168. hooks.add(name);
  6169. }
  6170. });
  6171. {
  6172. const { extends: extendsOptions, mixins } = vueOptions;
  6173. if (mixins) {
  6174. mixins.forEach((mixin2) => findHooks(mixin2, hooks));
  6175. }
  6176. if (extendsOptions) {
  6177. findHooks(extendsOptions, hooks);
  6178. }
  6179. }
  6180. }
  6181. return hooks;
  6182. }
  6183. function initHook(mpOptions, hook, excludes) {
  6184. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  6185. mpOptions[hook] = function(args) {
  6186. return this.$vm && this.$vm.$callHook(hook, args);
  6187. };
  6188. }
  6189. }
  6190. const EXCLUDE_HOOKS = [ON_READY];
  6191. function initHooks(mpOptions, hooks, excludes = EXCLUDE_HOOKS) {
  6192. hooks.forEach((hook) => initHook(mpOptions, hook, excludes));
  6193. }
  6194. function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
  6195. findHooks(vueOptions).forEach((hook) => initHook(mpOptions, hook, excludes));
  6196. }
  6197. function initRuntimeHooks(mpOptions, runtimeHooks) {
  6198. if (!runtimeHooks) {
  6199. return;
  6200. }
  6201. const hooks = Object.keys(MINI_PROGRAM_PAGE_RUNTIME_HOOKS);
  6202. hooks.forEach((hook) => {
  6203. if (runtimeHooks & MINI_PROGRAM_PAGE_RUNTIME_HOOKS[hook]) {
  6204. initHook(mpOptions, hook, []);
  6205. }
  6206. });
  6207. }
  6208. const findMixinRuntimeHooks = /* @__PURE__ */ once(() => {
  6209. const runtimeHooks = [];
  6210. const app = isFunction(getApp) && getApp({ allowDefault: true });
  6211. if (app && app.$vm && app.$vm.$) {
  6212. const mixins = app.$vm.$.appContext.mixins;
  6213. if (isArray$1(mixins)) {
  6214. const hooks = Object.keys(MINI_PROGRAM_PAGE_RUNTIME_HOOKS);
  6215. mixins.forEach((mixin2) => {
  6216. hooks.forEach((hook) => {
  6217. if (hasOwn(mixin2, hook) && !runtimeHooks.includes(hook)) {
  6218. runtimeHooks.push(hook);
  6219. }
  6220. });
  6221. });
  6222. }
  6223. }
  6224. return runtimeHooks;
  6225. });
  6226. function initMixinRuntimeHooks(mpOptions) {
  6227. initHooks(mpOptions, findMixinRuntimeHooks());
  6228. }
  6229. const HOOKS = [
  6230. ON_SHOW,
  6231. ON_HIDE,
  6232. ON_ERROR,
  6233. ON_THEME_CHANGE,
  6234. ON_PAGE_NOT_FOUND,
  6235. ON_UNHANDLE_REJECTION
  6236. ];
  6237. function parseApp(instance, parseAppOptions) {
  6238. const internalInstance = instance.$;
  6239. const appOptions = {
  6240. globalData: instance.$options && instance.$options.globalData || {},
  6241. $vm: instance,
  6242. onLaunch(options) {
  6243. this.$vm = instance;
  6244. const ctx = internalInstance.ctx;
  6245. if (this.$vm && ctx.$scope) {
  6246. return;
  6247. }
  6248. initBaseInstance(internalInstance, {
  6249. mpType: "app",
  6250. mpInstance: this,
  6251. slots: []
  6252. });
  6253. ctx.globalData = this.globalData;
  6254. instance.$callHook(ON_LAUNCH, options);
  6255. }
  6256. };
  6257. initLocale(instance);
  6258. const vueOptions = instance.$.type;
  6259. initHooks(appOptions, HOOKS);
  6260. initUnknownHooks(appOptions, vueOptions);
  6261. {
  6262. const methods = vueOptions.methods;
  6263. methods && extend(appOptions, methods);
  6264. }
  6265. if (parseAppOptions) {
  6266. parseAppOptions.parse(appOptions);
  6267. }
  6268. return appOptions;
  6269. }
  6270. function initCreateApp(parseAppOptions) {
  6271. return function createApp2(vm) {
  6272. return App(parseApp(vm, parseAppOptions));
  6273. };
  6274. }
  6275. function initCreateSubpackageApp(parseAppOptions) {
  6276. return function createApp2(vm) {
  6277. const appOptions = parseApp(vm, parseAppOptions);
  6278. const app = isFunction(getApp) && getApp({
  6279. allowDefault: true
  6280. });
  6281. if (!app)
  6282. return;
  6283. vm.$.ctx.$scope = app;
  6284. const globalData = app.globalData;
  6285. if (globalData) {
  6286. Object.keys(appOptions.globalData).forEach((name) => {
  6287. if (!hasOwn(globalData, name)) {
  6288. globalData[name] = appOptions.globalData[name];
  6289. }
  6290. });
  6291. }
  6292. Object.keys(appOptions).forEach((name) => {
  6293. if (!hasOwn(app, name)) {
  6294. app[name] = appOptions[name];
  6295. }
  6296. });
  6297. initAppLifecycle(appOptions, vm);
  6298. };
  6299. }
  6300. function initAppLifecycle(appOptions, vm) {
  6301. if (isFunction(appOptions.onLaunch)) {
  6302. const args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  6303. appOptions.onLaunch(args);
  6304. }
  6305. if (isFunction(appOptions.onShow) && wx.onAppShow) {
  6306. wx.onAppShow((args) => {
  6307. vm.$callHook("onShow", args);
  6308. });
  6309. }
  6310. if (isFunction(appOptions.onHide) && wx.onAppHide) {
  6311. wx.onAppHide((args) => {
  6312. vm.$callHook("onHide", args);
  6313. });
  6314. }
  6315. }
  6316. function initLocale(appVm) {
  6317. const locale = ref(normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  6318. Object.defineProperty(appVm, "$locale", {
  6319. get() {
  6320. return locale.value;
  6321. },
  6322. set(v) {
  6323. locale.value = v;
  6324. }
  6325. });
  6326. }
  6327. function initVueIds(vueIds, mpInstance) {
  6328. if (!vueIds) {
  6329. return;
  6330. }
  6331. const ids = vueIds.split(",");
  6332. const len = ids.length;
  6333. if (len === 1) {
  6334. mpInstance._$vueId = ids[0];
  6335. } else if (len === 2) {
  6336. mpInstance._$vueId = ids[0];
  6337. mpInstance._$vuePid = ids[1];
  6338. }
  6339. }
  6340. const EXTRAS = ["externalClasses"];
  6341. function initExtraOptions(miniProgramComponentOptions, vueOptions) {
  6342. EXTRAS.forEach((name) => {
  6343. if (hasOwn(vueOptions, name)) {
  6344. miniProgramComponentOptions[name] = vueOptions[name];
  6345. }
  6346. });
  6347. }
  6348. const WORKLET_RE = /_(.*)_worklet_factory_/;
  6349. function initWorkletMethods(mpMethods, vueMethods) {
  6350. if (vueMethods) {
  6351. Object.keys(vueMethods).forEach((name) => {
  6352. const matches = name.match(WORKLET_RE);
  6353. if (matches) {
  6354. const workletName = matches[1];
  6355. mpMethods[name] = vueMethods[name];
  6356. mpMethods[workletName] = vueMethods[workletName];
  6357. }
  6358. });
  6359. }
  6360. }
  6361. function initWxsCallMethods(methods, wxsCallMethods) {
  6362. if (!isArray$1(wxsCallMethods)) {
  6363. return;
  6364. }
  6365. wxsCallMethods.forEach((callMethod) => {
  6366. methods[callMethod] = function(args) {
  6367. return this.$vm[callMethod](args);
  6368. };
  6369. });
  6370. }
  6371. function selectAllComponents(mpInstance, selector, $refs) {
  6372. const components = mpInstance.selectAllComponents(selector);
  6373. components.forEach((component) => {
  6374. const ref2 = component.properties.uR;
  6375. $refs[ref2] = component.$vm || component;
  6376. });
  6377. }
  6378. function initRefs(instance, mpInstance) {
  6379. Object.defineProperty(instance, "refs", {
  6380. get() {
  6381. const $refs = {};
  6382. selectAllComponents(mpInstance, ".r", $refs);
  6383. const forComponents = mpInstance.selectAllComponents(".r-i-f");
  6384. forComponents.forEach((component) => {
  6385. const ref2 = component.properties.uR;
  6386. if (!ref2) {
  6387. return;
  6388. }
  6389. if (!$refs[ref2]) {
  6390. $refs[ref2] = [];
  6391. }
  6392. $refs[ref2].push(component.$vm || component);
  6393. });
  6394. return $refs;
  6395. }
  6396. });
  6397. }
  6398. function findVmByVueId(instance, vuePid) {
  6399. const $children = instance.$children;
  6400. for (let i = $children.length - 1; i >= 0; i--) {
  6401. const childVm = $children[i];
  6402. if (childVm.$scope._$vueId === vuePid) {
  6403. return childVm;
  6404. }
  6405. }
  6406. let parentVm;
  6407. for (let i = $children.length - 1; i >= 0; i--) {
  6408. parentVm = findVmByVueId($children[i], vuePid);
  6409. if (parentVm) {
  6410. return parentVm;
  6411. }
  6412. }
  6413. }
  6414. const builtInProps = [
  6415. // 百度小程序,快手小程序自定义组件不支持绑定动态事件,动态dataset,故通过props传递事件信息
  6416. // event-opts
  6417. "eO",
  6418. // 组件 ref
  6419. "uR",
  6420. // 组件 ref-in-for
  6421. "uRIF",
  6422. // 组件 id
  6423. "uI",
  6424. // 组件类型 m: 小程序组件
  6425. "uT",
  6426. // 组件 props
  6427. "uP",
  6428. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  6429. "uS"
  6430. ];
  6431. function initDefaultProps(options, isBehavior = false) {
  6432. const properties = {};
  6433. if (!isBehavior) {
  6434. builtInProps.forEach((name) => {
  6435. properties[name] = {
  6436. type: null,
  6437. value: ""
  6438. };
  6439. });
  6440. properties.uS = {
  6441. type: null,
  6442. value: [],
  6443. observer: function(newVal) {
  6444. const $slots = /* @__PURE__ */ Object.create(null);
  6445. newVal && newVal.forEach((slotName) => {
  6446. $slots[slotName] = true;
  6447. });
  6448. this.setData({
  6449. $slots
  6450. });
  6451. }
  6452. };
  6453. }
  6454. if (options.behaviors) {
  6455. if (options.behaviors.includes("wx://form-field")) {
  6456. properties.name = {
  6457. type: null,
  6458. value: ""
  6459. };
  6460. properties.value = {
  6461. type: null,
  6462. value: ""
  6463. };
  6464. }
  6465. }
  6466. return properties;
  6467. }
  6468. function initVirtualHostProps(options) {
  6469. const properties = {};
  6470. {
  6471. if (options && options.virtualHost) {
  6472. properties.virtualHostStyle = {
  6473. type: null,
  6474. value: ""
  6475. };
  6476. properties.virtualHostClass = {
  6477. type: null,
  6478. value: ""
  6479. };
  6480. }
  6481. }
  6482. return properties;
  6483. }
  6484. function initProps(mpComponentOptions) {
  6485. if (!mpComponentOptions.properties) {
  6486. mpComponentOptions.properties = {};
  6487. }
  6488. extend(mpComponentOptions.properties, initDefaultProps(mpComponentOptions), initVirtualHostProps(mpComponentOptions.options));
  6489. }
  6490. const PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  6491. function parsePropType(type2, defaultValue) {
  6492. if (isArray$1(type2) && type2.length === 1) {
  6493. return type2[0];
  6494. }
  6495. return type2;
  6496. }
  6497. function normalizePropType(type2, defaultValue) {
  6498. const res = parsePropType(type2);
  6499. return PROP_TYPES.indexOf(res) !== -1 ? res : null;
  6500. }
  6501. function initPageProps({ properties }, rawProps) {
  6502. if (isArray$1(rawProps)) {
  6503. rawProps.forEach((key) => {
  6504. properties[key] = {
  6505. type: String,
  6506. value: ""
  6507. };
  6508. });
  6509. } else if (isPlainObject$2(rawProps)) {
  6510. Object.keys(rawProps).forEach((key) => {
  6511. const opts = rawProps[key];
  6512. if (isPlainObject$2(opts)) {
  6513. let value = opts.default;
  6514. if (isFunction(value)) {
  6515. value = value();
  6516. }
  6517. const type2 = opts.type;
  6518. opts.type = normalizePropType(type2);
  6519. properties[key] = {
  6520. type: opts.type,
  6521. value
  6522. };
  6523. } else {
  6524. properties[key] = {
  6525. type: normalizePropType(opts)
  6526. };
  6527. }
  6528. });
  6529. }
  6530. }
  6531. function findPropsData(properties, isPage2) {
  6532. return (isPage2 ? findPagePropsData(properties) : findComponentPropsData(properties.uP)) || {};
  6533. }
  6534. function findPagePropsData(properties) {
  6535. const propsData = {};
  6536. if (isPlainObject$2(properties)) {
  6537. Object.keys(properties).forEach((name) => {
  6538. if (builtInProps.indexOf(name) === -1) {
  6539. propsData[name] = properties[name];
  6540. }
  6541. });
  6542. }
  6543. return propsData;
  6544. }
  6545. function initFormField(vm) {
  6546. const vueOptions = vm.$options;
  6547. if (isArray$1(vueOptions.behaviors) && vueOptions.behaviors.includes("uni://form-field")) {
  6548. vm.$watch("modelValue", () => {
  6549. vm.$scope && vm.$scope.setData({
  6550. name: vm.name,
  6551. value: vm.modelValue
  6552. });
  6553. }, {
  6554. immediate: true
  6555. });
  6556. }
  6557. }
  6558. function initData(_) {
  6559. return {};
  6560. }
  6561. function initPropsObserver(componentOptions) {
  6562. const observe = function observe2() {
  6563. const up = this.properties.uP;
  6564. if (!up) {
  6565. return;
  6566. }
  6567. if (this.$vm) {
  6568. updateComponentProps(up, this.$vm.$);
  6569. } else if (this.properties.uT === "m") {
  6570. updateMiniProgramComponentProperties(up, this);
  6571. }
  6572. };
  6573. {
  6574. if (!componentOptions.observers) {
  6575. componentOptions.observers = {};
  6576. }
  6577. componentOptions.observers.uP = observe;
  6578. }
  6579. }
  6580. function updateMiniProgramComponentProperties(up, mpInstance) {
  6581. const prevProps = mpInstance.properties;
  6582. const nextProps = findComponentPropsData(up) || {};
  6583. if (hasPropsChanged(prevProps, nextProps, false)) {
  6584. mpInstance.setData(nextProps);
  6585. }
  6586. }
  6587. function updateComponentProps(up, instance) {
  6588. const prevProps = toRaw(instance.props);
  6589. const nextProps = findComponentPropsData(up) || {};
  6590. if (hasPropsChanged(prevProps, nextProps)) {
  6591. updateProps(instance, nextProps, prevProps, false);
  6592. if (hasQueueJob(instance.update)) {
  6593. invalidateJob(instance.update);
  6594. }
  6595. {
  6596. instance.update();
  6597. }
  6598. }
  6599. }
  6600. function hasPropsChanged(prevProps, nextProps, checkLen = true) {
  6601. const nextKeys = Object.keys(nextProps);
  6602. if (checkLen && nextKeys.length !== Object.keys(prevProps).length) {
  6603. return true;
  6604. }
  6605. for (let i = 0; i < nextKeys.length; i++) {
  6606. const key = nextKeys[i];
  6607. if (nextProps[key] !== prevProps[key]) {
  6608. return true;
  6609. }
  6610. }
  6611. return false;
  6612. }
  6613. function initBehaviors(vueOptions) {
  6614. const vueBehaviors = vueOptions.behaviors;
  6615. let vueProps = vueOptions.props;
  6616. if (!vueProps) {
  6617. vueOptions.props = vueProps = [];
  6618. }
  6619. const behaviors = [];
  6620. if (isArray$1(vueBehaviors)) {
  6621. vueBehaviors.forEach((behavior) => {
  6622. behaviors.push(behavior.replace("uni://", "wx://"));
  6623. if (behavior === "uni://form-field") {
  6624. if (isArray$1(vueProps)) {
  6625. vueProps.push("name");
  6626. vueProps.push("modelValue");
  6627. } else {
  6628. vueProps.name = {
  6629. type: String,
  6630. default: ""
  6631. };
  6632. vueProps.modelValue = {
  6633. type: [String, Number, Boolean, Array, Object, Date],
  6634. default: ""
  6635. };
  6636. }
  6637. }
  6638. });
  6639. }
  6640. return behaviors;
  6641. }
  6642. function applyOptions(componentOptions, vueOptions) {
  6643. componentOptions.data = initData();
  6644. componentOptions.behaviors = initBehaviors(vueOptions);
  6645. }
  6646. function parseComponent(vueOptions, { parse, mocks: mocks2, isPage: isPage2, initRelation: initRelation2, handleLink: handleLink2, initLifetimes: initLifetimes2 }) {
  6647. vueOptions = vueOptions.default || vueOptions;
  6648. const options = {
  6649. multipleSlots: true,
  6650. // styleIsolation: 'apply-shared',
  6651. addGlobalClass: true,
  6652. pureDataPattern: /^uP$/
  6653. };
  6654. if (isArray$1(vueOptions.mixins)) {
  6655. vueOptions.mixins.forEach((item) => {
  6656. if (isObject$1(item.options)) {
  6657. extend(options, item.options);
  6658. }
  6659. });
  6660. }
  6661. if (vueOptions.options) {
  6662. extend(options, vueOptions.options);
  6663. }
  6664. const mpComponentOptions = {
  6665. options,
  6666. lifetimes: initLifetimes2({ mocks: mocks2, isPage: isPage2, initRelation: initRelation2, vueOptions }),
  6667. pageLifetimes: {
  6668. show() {
  6669. this.$vm && this.$vm.$callHook("onPageShow");
  6670. },
  6671. hide() {
  6672. this.$vm && this.$vm.$callHook("onPageHide");
  6673. },
  6674. resize(size2) {
  6675. this.$vm && this.$vm.$callHook("onPageResize", size2);
  6676. }
  6677. },
  6678. methods: {
  6679. __l: handleLink2
  6680. }
  6681. };
  6682. {
  6683. applyOptions(mpComponentOptions, vueOptions);
  6684. }
  6685. initProps(mpComponentOptions);
  6686. initPropsObserver(mpComponentOptions);
  6687. initExtraOptions(mpComponentOptions, vueOptions);
  6688. initWxsCallMethods(mpComponentOptions.methods, vueOptions.wxsCallMethods);
  6689. {
  6690. initWorkletMethods(mpComponentOptions.methods, vueOptions.methods);
  6691. }
  6692. if (parse) {
  6693. parse(mpComponentOptions, { handleLink: handleLink2 });
  6694. }
  6695. return mpComponentOptions;
  6696. }
  6697. function initCreateComponent(parseOptions2) {
  6698. return function createComponent2(vueComponentOptions) {
  6699. return Component(parseComponent(vueComponentOptions, parseOptions2));
  6700. };
  6701. }
  6702. let $createComponentFn;
  6703. let $destroyComponentFn;
  6704. function getAppVm() {
  6705. return getApp().$vm;
  6706. }
  6707. function $createComponent(initialVNode, options) {
  6708. if (!$createComponentFn) {
  6709. $createComponentFn = getAppVm().$createComponent;
  6710. }
  6711. const proxy = $createComponentFn(initialVNode, options);
  6712. return getExposeProxy(proxy.$) || proxy;
  6713. }
  6714. function $destroyComponent(instance) {
  6715. if (!$destroyComponentFn) {
  6716. $destroyComponentFn = getAppVm().$destroyComponent;
  6717. }
  6718. return $destroyComponentFn(instance);
  6719. }
  6720. function parsePage(vueOptions, parseOptions2) {
  6721. const { parse, mocks: mocks2, isPage: isPage2, initRelation: initRelation2, handleLink: handleLink2, initLifetimes: initLifetimes2 } = parseOptions2;
  6722. const miniProgramPageOptions = parseComponent(vueOptions, {
  6723. mocks: mocks2,
  6724. isPage: isPage2,
  6725. initRelation: initRelation2,
  6726. handleLink: handleLink2,
  6727. initLifetimes: initLifetimes2
  6728. });
  6729. initPageProps(miniProgramPageOptions, (vueOptions.default || vueOptions).props);
  6730. const methods = miniProgramPageOptions.methods;
  6731. methods.onLoad = function(query) {
  6732. this.options = query;
  6733. this.$page = {
  6734. fullPath: addLeadingSlash(this.route + stringifyQuery(query))
  6735. };
  6736. return this.$vm && this.$vm.$callHook(ON_LOAD, query);
  6737. };
  6738. initHooks(methods, PAGE_INIT_HOOKS);
  6739. {
  6740. initUnknownHooks(methods, vueOptions);
  6741. }
  6742. initRuntimeHooks(methods, vueOptions.__runtimeHooks);
  6743. initMixinRuntimeHooks(methods);
  6744. parse && parse(miniProgramPageOptions, { handleLink: handleLink2 });
  6745. return miniProgramPageOptions;
  6746. }
  6747. function initCreatePage(parseOptions2) {
  6748. return function createPage2(vuePageOptions) {
  6749. return Component(parsePage(vuePageOptions, parseOptions2));
  6750. };
  6751. }
  6752. function initCreatePluginApp(parseAppOptions) {
  6753. return function createApp2(vm) {
  6754. initAppLifecycle(parseApp(vm, parseAppOptions), vm);
  6755. };
  6756. }
  6757. const MPPage = Page;
  6758. const MPComponent = Component;
  6759. function initTriggerEvent(mpInstance) {
  6760. const oldTriggerEvent = mpInstance.triggerEvent;
  6761. const newTriggerEvent = function(event, ...args) {
  6762. return oldTriggerEvent.apply(mpInstance, [customizeEvent(event), ...args]);
  6763. };
  6764. try {
  6765. mpInstance.triggerEvent = newTriggerEvent;
  6766. } catch (error2) {
  6767. mpInstance._triggerEvent = newTriggerEvent;
  6768. }
  6769. }
  6770. function initMiniProgramHook(name, options, isComponent) {
  6771. const oldHook = options[name];
  6772. if (!oldHook) {
  6773. options[name] = function() {
  6774. initTriggerEvent(this);
  6775. };
  6776. } else {
  6777. options[name] = function(...args) {
  6778. initTriggerEvent(this);
  6779. return oldHook.apply(this, args);
  6780. };
  6781. }
  6782. }
  6783. Page = function(options) {
  6784. initMiniProgramHook(ON_LOAD, options);
  6785. return MPPage(options);
  6786. };
  6787. Component = function(options) {
  6788. initMiniProgramHook("created", options);
  6789. const isVueComponent = options.properties && options.properties.uP;
  6790. if (!isVueComponent) {
  6791. initProps(options);
  6792. initPropsObserver(options);
  6793. }
  6794. return MPComponent(options);
  6795. };
  6796. function initLifetimes({ mocks: mocks2, isPage: isPage2, initRelation: initRelation2, vueOptions }) {
  6797. return {
  6798. attached() {
  6799. let properties = this.properties;
  6800. initVueIds(properties.uI, this);
  6801. const relationOptions = {
  6802. vuePid: this._$vuePid
  6803. };
  6804. initRelation2(this, relationOptions);
  6805. const mpInstance = this;
  6806. const isMiniProgramPage = isPage2(mpInstance);
  6807. let propsData = properties;
  6808. this.$vm = $createComponent({
  6809. type: vueOptions,
  6810. props: findPropsData(propsData, isMiniProgramPage)
  6811. }, {
  6812. mpType: isMiniProgramPage ? "page" : "component",
  6813. mpInstance,
  6814. slots: properties.uS || {},
  6815. parentComponent: relationOptions.parent && relationOptions.parent.$,
  6816. onBeforeSetup(instance, options) {
  6817. initRefs(instance, mpInstance);
  6818. initMocks(instance, mpInstance, mocks2);
  6819. initComponentInstance(instance, options);
  6820. }
  6821. });
  6822. if (!isMiniProgramPage) {
  6823. initFormField(this.$vm);
  6824. }
  6825. },
  6826. ready() {
  6827. if (this.$vm) {
  6828. {
  6829. this.$vm.$callHook("mounted");
  6830. this.$vm.$callHook(ON_READY);
  6831. }
  6832. }
  6833. },
  6834. detached() {
  6835. if (this.$vm) {
  6836. pruneComponentPropsCache(this.$vm.$.uid);
  6837. $destroyComponent(this.$vm);
  6838. }
  6839. }
  6840. };
  6841. }
  6842. const mocks = ["__route__", "__wxExparserNodeId__", "__wxWebviewId__"];
  6843. function isPage(mpInstance) {
  6844. return !!mpInstance.route;
  6845. }
  6846. function initRelation(mpInstance, detail) {
  6847. mpInstance.triggerEvent("__l", detail);
  6848. }
  6849. function handleLink(event) {
  6850. const detail = event.detail || event.value;
  6851. const vuePid = detail.vuePid;
  6852. let parentVm;
  6853. if (vuePid) {
  6854. parentVm = findVmByVueId(this.$vm, vuePid);
  6855. }
  6856. if (!parentVm) {
  6857. parentVm = this.$vm;
  6858. }
  6859. detail.parent = parentVm;
  6860. }
  6861. var parseOptions = /* @__PURE__ */ Object.freeze({
  6862. __proto__: null,
  6863. handleLink,
  6864. initLifetimes,
  6865. initRelation,
  6866. isPage,
  6867. mocks
  6868. });
  6869. const createApp = initCreateApp();
  6870. const createPage = initCreatePage(parseOptions);
  6871. const createComponent = initCreateComponent(parseOptions);
  6872. const createPluginApp = initCreatePluginApp();
  6873. const createSubpackageApp = initCreateSubpackageApp();
  6874. {
  6875. wx.createApp = global.createApp = createApp;
  6876. wx.createPage = createPage;
  6877. wx.createComponent = createComponent;
  6878. wx.createPluginApp = global.createPluginApp = createPluginApp;
  6879. wx.createSubpackageApp = global.createSubpackageApp = createSubpackageApp;
  6880. }
  6881. const createHook = (lifecycle) => (hook, target = getCurrentInstance()) => {
  6882. !isInSSRComponentSetup && injectHook(lifecycle, hook, target);
  6883. };
  6884. const onShow = /* @__PURE__ */ createHook(ON_SHOW);
  6885. const onLaunch = /* @__PURE__ */ createHook(ON_LAUNCH);
  6886. const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
  6887. var isVue2 = false;
  6888. function set(target, key, val) {
  6889. if (Array.isArray(target)) {
  6890. target.length = Math.max(target.length, key);
  6891. target.splice(key, 1, val);
  6892. return val;
  6893. }
  6894. target[key] = val;
  6895. return val;
  6896. }
  6897. function del(target, key) {
  6898. if (Array.isArray(target)) {
  6899. target.splice(key, 1);
  6900. return;
  6901. }
  6902. delete target[key];
  6903. }
  6904. /*!
  6905. * pinia v2.0.36
  6906. * (c) 2023 Eduardo San Martin Morote
  6907. * @license MIT
  6908. */
  6909. let activePinia;
  6910. const setActivePinia = (pinia) => activePinia = pinia;
  6911. const getActivePinia = () => getCurrentInstance() && inject(piniaSymbol) || activePinia;
  6912. const piniaSymbol = Symbol("pinia");
  6913. function isPlainObject$1(o2) {
  6914. return o2 && typeof o2 === "object" && Object.prototype.toString.call(o2) === "[object Object]" && typeof o2.toJSON !== "function";
  6915. }
  6916. var MutationType;
  6917. (function(MutationType2) {
  6918. MutationType2["direct"] = "direct";
  6919. MutationType2["patchObject"] = "patch object";
  6920. MutationType2["patchFunction"] = "patch function";
  6921. })(MutationType || (MutationType = {}));
  6922. const IS_CLIENT = typeof window !== "undefined";
  6923. const USE_DEVTOOLS = IS_CLIENT;
  6924. const componentStateTypes = [];
  6925. const getStoreType = (id) => "🍍 " + id;
  6926. function registerPiniaDevtools(app, pinia) {
  6927. }
  6928. function addStoreToDevtools(app, store) {
  6929. if (!componentStateTypes.includes(getStoreType(store.$id))) {
  6930. componentStateTypes.push(getStoreType(store.$id));
  6931. }
  6932. }
  6933. function patchActionForGrouping(store, actionNames) {
  6934. const actions = actionNames.reduce((storeActions, actionName) => {
  6935. storeActions[actionName] = toRaw(store)[actionName];
  6936. return storeActions;
  6937. }, {});
  6938. for (const actionName in actions) {
  6939. store[actionName] = function() {
  6940. const trackedStore = new Proxy(store, {
  6941. get(...args) {
  6942. return Reflect.get(...args);
  6943. },
  6944. set(...args) {
  6945. return Reflect.set(...args);
  6946. }
  6947. });
  6948. return actions[actionName].apply(trackedStore, arguments);
  6949. };
  6950. }
  6951. }
  6952. function devtoolsPlugin({ app, store, options }) {
  6953. if (store.$id.startsWith("__hot:")) {
  6954. return;
  6955. }
  6956. if (options.state) {
  6957. store._isOptionsAPI = true;
  6958. }
  6959. if (typeof options.state === "function") {
  6960. patchActionForGrouping(
  6961. // @ts-expect-error: can cast the store...
  6962. store,
  6963. Object.keys(options.actions)
  6964. );
  6965. const originalHotUpdate = store._hotUpdate;
  6966. toRaw(store)._hotUpdate = function(newStore) {
  6967. originalHotUpdate.apply(this, arguments);
  6968. patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions));
  6969. };
  6970. }
  6971. addStoreToDevtools(
  6972. app,
  6973. // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
  6974. store
  6975. );
  6976. }
  6977. function createPinia() {
  6978. const scope = effectScope(true);
  6979. const state = scope.run(() => ref({}));
  6980. let _p = [];
  6981. let toBeInstalled = [];
  6982. const pinia = markRaw({
  6983. install(app) {
  6984. setActivePinia(pinia);
  6985. {
  6986. pinia._a = app;
  6987. app.provide(piniaSymbol, pinia);
  6988. app.config.globalProperties.$pinia = pinia;
  6989. toBeInstalled.forEach((plugin2) => _p.push(plugin2));
  6990. toBeInstalled = [];
  6991. }
  6992. },
  6993. use(plugin2) {
  6994. if (!this._a && !isVue2) {
  6995. toBeInstalled.push(plugin2);
  6996. } else {
  6997. _p.push(plugin2);
  6998. }
  6999. return this;
  7000. },
  7001. _p,
  7002. // it's actually undefined here
  7003. // @ts-expect-error
  7004. _a: null,
  7005. _e: scope,
  7006. _s: /* @__PURE__ */ new Map(),
  7007. state
  7008. });
  7009. if (USE_DEVTOOLS && typeof Proxy !== "undefined") {
  7010. pinia.use(devtoolsPlugin);
  7011. }
  7012. return pinia;
  7013. }
  7014. const isUseStore = (fn) => {
  7015. return typeof fn === "function" && typeof fn.$id === "string";
  7016. };
  7017. function patchObject(newState, oldState) {
  7018. for (const key in oldState) {
  7019. const subPatch = oldState[key];
  7020. if (!(key in newState)) {
  7021. continue;
  7022. }
  7023. const targetValue = newState[key];
  7024. if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && !isRef(subPatch) && !isReactive(subPatch)) {
  7025. newState[key] = patchObject(targetValue, subPatch);
  7026. } else {
  7027. {
  7028. newState[key] = subPatch;
  7029. }
  7030. }
  7031. }
  7032. return newState;
  7033. }
  7034. function acceptHMRUpdate(initialUseStore, hot) {
  7035. return (newModule) => {
  7036. const pinia = hot.data.pinia || initialUseStore._pinia;
  7037. if (!pinia) {
  7038. return;
  7039. }
  7040. hot.data.pinia = pinia;
  7041. for (const exportName in newModule) {
  7042. const useStore = newModule[exportName];
  7043. if (isUseStore(useStore) && pinia._s.has(useStore.$id)) {
  7044. const id = useStore.$id;
  7045. if (id !== initialUseStore.$id) {
  7046. console.warn(`The id of the store changed from "${initialUseStore.$id}" to "${id}". Reloading.`);
  7047. return hot.invalidate();
  7048. }
  7049. const existingStore = pinia._s.get(id);
  7050. if (!existingStore) {
  7051. console.log(`[Pinia]: skipping hmr because store doesn't exist yet`);
  7052. return;
  7053. }
  7054. useStore(pinia, existingStore);
  7055. }
  7056. }
  7057. };
  7058. }
  7059. const noop = () => {
  7060. };
  7061. function addSubscription(subscriptions, callback, detached, onCleanup = noop) {
  7062. subscriptions.push(callback);
  7063. const removeSubscription = () => {
  7064. const idx = subscriptions.indexOf(callback);
  7065. if (idx > -1) {
  7066. subscriptions.splice(idx, 1);
  7067. onCleanup();
  7068. }
  7069. };
  7070. if (!detached && getCurrentScope()) {
  7071. onScopeDispose(removeSubscription);
  7072. }
  7073. return removeSubscription;
  7074. }
  7075. function triggerSubscriptions(subscriptions, ...args) {
  7076. subscriptions.slice().forEach((callback) => {
  7077. callback(...args);
  7078. });
  7079. }
  7080. function mergeReactiveObjects(target, patchToApply) {
  7081. if (target instanceof Map && patchToApply instanceof Map) {
  7082. patchToApply.forEach((value, key) => target.set(key, value));
  7083. }
  7084. if (target instanceof Set && patchToApply instanceof Set) {
  7085. patchToApply.forEach(target.add, target);
  7086. }
  7087. for (const key in patchToApply) {
  7088. if (!patchToApply.hasOwnProperty(key))
  7089. continue;
  7090. const subPatch = patchToApply[key];
  7091. const targetValue = target[key];
  7092. if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) {
  7093. target[key] = mergeReactiveObjects(targetValue, subPatch);
  7094. } else {
  7095. target[key] = subPatch;
  7096. }
  7097. }
  7098. return target;
  7099. }
  7100. const skipHydrateSymbol = Symbol("pinia:skipHydration");
  7101. function skipHydrate(obj) {
  7102. return Object.defineProperty(obj, skipHydrateSymbol, {});
  7103. }
  7104. function shouldHydrate(obj) {
  7105. return !isPlainObject$1(obj) || !obj.hasOwnProperty(skipHydrateSymbol);
  7106. }
  7107. const { assign } = Object;
  7108. function isComputed(o2) {
  7109. return !!(isRef(o2) && o2.effect);
  7110. }
  7111. function createOptionsStore(id, options, pinia, hot) {
  7112. const { state, actions, getters } = options;
  7113. const initialState = pinia.state.value[id];
  7114. let store;
  7115. function setup() {
  7116. if (!initialState && !hot) {
  7117. {
  7118. pinia.state.value[id] = state ? state() : {};
  7119. }
  7120. }
  7121. const localState = hot ? (
  7122. // use ref() to unwrap refs inside state TODO: check if this is still necessary
  7123. toRefs(ref(state ? state() : {}).value)
  7124. ) : toRefs(pinia.state.value[id]);
  7125. return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {
  7126. if (name in localState) {
  7127. console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name}" in store "${id}".`);
  7128. }
  7129. computedGetters[name] = markRaw(computed(() => {
  7130. setActivePinia(pinia);
  7131. const store2 = pinia._s.get(id);
  7132. return getters[name].call(store2, store2);
  7133. }));
  7134. return computedGetters;
  7135. }, {}));
  7136. }
  7137. store = createSetupStore(id, setup, options, pinia, hot, true);
  7138. return store;
  7139. }
  7140. function createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) {
  7141. let scope;
  7142. const optionsForPlugin = assign({ actions: {} }, options);
  7143. if (!pinia._e.active) {
  7144. throw new Error("Pinia destroyed");
  7145. }
  7146. const $subscribeOptions = {
  7147. deep: true
  7148. // flush: 'post',
  7149. };
  7150. {
  7151. $subscribeOptions.onTrigger = (event) => {
  7152. if (isListening) {
  7153. debuggerEvents = event;
  7154. } else if (isListening == false && !store._hotUpdating) {
  7155. if (Array.isArray(debuggerEvents)) {
  7156. debuggerEvents.push(event);
  7157. } else {
  7158. console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.");
  7159. }
  7160. }
  7161. };
  7162. }
  7163. let isListening;
  7164. let isSyncListening;
  7165. let subscriptions = markRaw([]);
  7166. let actionSubscriptions = markRaw([]);
  7167. let debuggerEvents;
  7168. const initialState = pinia.state.value[$id];
  7169. if (!isOptionsStore && !initialState && !hot) {
  7170. {
  7171. pinia.state.value[$id] = {};
  7172. }
  7173. }
  7174. const hotState = ref({});
  7175. let activeListener;
  7176. function $patch(partialStateOrMutator) {
  7177. let subscriptionMutation;
  7178. isListening = isSyncListening = false;
  7179. {
  7180. debuggerEvents = [];
  7181. }
  7182. if (typeof partialStateOrMutator === "function") {
  7183. partialStateOrMutator(pinia.state.value[$id]);
  7184. subscriptionMutation = {
  7185. type: MutationType.patchFunction,
  7186. storeId: $id,
  7187. events: debuggerEvents
  7188. };
  7189. } else {
  7190. mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);
  7191. subscriptionMutation = {
  7192. type: MutationType.patchObject,
  7193. payload: partialStateOrMutator,
  7194. storeId: $id,
  7195. events: debuggerEvents
  7196. };
  7197. }
  7198. const myListenerId = activeListener = Symbol();
  7199. nextTick$1().then(() => {
  7200. if (activeListener === myListenerId) {
  7201. isListening = true;
  7202. }
  7203. });
  7204. isSyncListening = true;
  7205. triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);
  7206. }
  7207. const $reset = isOptionsStore ? function $reset2() {
  7208. const { state } = options;
  7209. const newState = state ? state() : {};
  7210. this.$patch(($state) => {
  7211. assign($state, newState);
  7212. });
  7213. } : (
  7214. /* istanbul ignore next */
  7215. () => {
  7216. throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`);
  7217. }
  7218. );
  7219. function $dispose() {
  7220. scope.stop();
  7221. subscriptions = [];
  7222. actionSubscriptions = [];
  7223. pinia._s.delete($id);
  7224. }
  7225. function wrapAction(name, action) {
  7226. return function() {
  7227. setActivePinia(pinia);
  7228. const args = Array.from(arguments);
  7229. const afterCallbackList = [];
  7230. const onErrorCallbackList = [];
  7231. function after(callback) {
  7232. afterCallbackList.push(callback);
  7233. }
  7234. function onError(callback) {
  7235. onErrorCallbackList.push(callback);
  7236. }
  7237. triggerSubscriptions(actionSubscriptions, {
  7238. args,
  7239. name,
  7240. store,
  7241. after,
  7242. onError
  7243. });
  7244. let ret;
  7245. try {
  7246. ret = action.apply(this && this.$id === $id ? this : store, args);
  7247. } catch (error2) {
  7248. triggerSubscriptions(onErrorCallbackList, error2);
  7249. throw error2;
  7250. }
  7251. if (ret instanceof Promise) {
  7252. return ret.then((value) => {
  7253. triggerSubscriptions(afterCallbackList, value);
  7254. return value;
  7255. }).catch((error2) => {
  7256. triggerSubscriptions(onErrorCallbackList, error2);
  7257. return Promise.reject(error2);
  7258. });
  7259. }
  7260. triggerSubscriptions(afterCallbackList, ret);
  7261. return ret;
  7262. };
  7263. }
  7264. const _hmrPayload = /* @__PURE__ */ markRaw({
  7265. actions: {},
  7266. getters: {},
  7267. state: [],
  7268. hotState
  7269. });
  7270. const partialStore = {
  7271. _p: pinia,
  7272. // _s: scope,
  7273. $id,
  7274. $onAction: addSubscription.bind(null, actionSubscriptions),
  7275. $patch,
  7276. $reset,
  7277. $subscribe(callback, options2 = {}) {
  7278. const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());
  7279. const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => {
  7280. if (options2.flush === "sync" ? isSyncListening : isListening) {
  7281. callback({
  7282. storeId: $id,
  7283. type: MutationType.direct,
  7284. events: debuggerEvents
  7285. }, state);
  7286. }
  7287. }, assign({}, $subscribeOptions, options2)));
  7288. return removeSubscription;
  7289. },
  7290. $dispose
  7291. };
  7292. const store = reactive(
  7293. assign(
  7294. {
  7295. _hmrPayload,
  7296. _customProperties: markRaw(/* @__PURE__ */ new Set())
  7297. // devtools custom properties
  7298. },
  7299. partialStore
  7300. // must be added later
  7301. // setupStore
  7302. )
  7303. );
  7304. pinia._s.set($id, store);
  7305. const setupStore = pinia._e.run(() => {
  7306. scope = effectScope();
  7307. return scope.run(() => setup());
  7308. });
  7309. for (const key in setupStore) {
  7310. const prop = setupStore[key];
  7311. if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {
  7312. if (hot) {
  7313. set(hotState.value, key, toRef(setupStore, key));
  7314. } else if (!isOptionsStore) {
  7315. if (initialState && shouldHydrate(prop)) {
  7316. if (isRef(prop)) {
  7317. prop.value = initialState[key];
  7318. } else {
  7319. mergeReactiveObjects(prop, initialState[key]);
  7320. }
  7321. }
  7322. {
  7323. pinia.state.value[$id][key] = prop;
  7324. }
  7325. }
  7326. {
  7327. _hmrPayload.state.push(key);
  7328. }
  7329. } else if (typeof prop === "function") {
  7330. const actionValue = hot ? prop : wrapAction(key, prop);
  7331. {
  7332. setupStore[key] = actionValue;
  7333. }
  7334. {
  7335. _hmrPayload.actions[key] = prop;
  7336. }
  7337. optionsForPlugin.actions[key] = prop;
  7338. } else {
  7339. if (isComputed(prop)) {
  7340. _hmrPayload.getters[key] = isOptionsStore ? (
  7341. // @ts-expect-error
  7342. options.getters[key]
  7343. ) : prop;
  7344. if (IS_CLIENT) {
  7345. const getters = setupStore._getters || // @ts-expect-error: same
  7346. (setupStore._getters = markRaw([]));
  7347. getters.push(key);
  7348. }
  7349. }
  7350. }
  7351. }
  7352. {
  7353. assign(store, setupStore);
  7354. assign(toRaw(store), setupStore);
  7355. }
  7356. Object.defineProperty(store, "$state", {
  7357. get: () => hot ? hotState.value : pinia.state.value[$id],
  7358. set: (state) => {
  7359. if (hot) {
  7360. throw new Error("cannot set hotState");
  7361. }
  7362. $patch(($state) => {
  7363. assign($state, state);
  7364. });
  7365. }
  7366. });
  7367. {
  7368. store._hotUpdate = markRaw((newStore) => {
  7369. store._hotUpdating = true;
  7370. newStore._hmrPayload.state.forEach((stateKey) => {
  7371. if (stateKey in store.$state) {
  7372. const newStateTarget = newStore.$state[stateKey];
  7373. const oldStateSource = store.$state[stateKey];
  7374. if (typeof newStateTarget === "object" && isPlainObject$1(newStateTarget) && isPlainObject$1(oldStateSource)) {
  7375. patchObject(newStateTarget, oldStateSource);
  7376. } else {
  7377. newStore.$state[stateKey] = oldStateSource;
  7378. }
  7379. }
  7380. set(store, stateKey, toRef(newStore.$state, stateKey));
  7381. });
  7382. Object.keys(store.$state).forEach((stateKey) => {
  7383. if (!(stateKey in newStore.$state)) {
  7384. del(store, stateKey);
  7385. }
  7386. });
  7387. isListening = false;
  7388. isSyncListening = false;
  7389. pinia.state.value[$id] = toRef(newStore._hmrPayload, "hotState");
  7390. isSyncListening = true;
  7391. nextTick$1().then(() => {
  7392. isListening = true;
  7393. });
  7394. for (const actionName in newStore._hmrPayload.actions) {
  7395. const action = newStore[actionName];
  7396. set(store, actionName, wrapAction(actionName, action));
  7397. }
  7398. for (const getterName in newStore._hmrPayload.getters) {
  7399. const getter = newStore._hmrPayload.getters[getterName];
  7400. const getterValue = isOptionsStore ? (
  7401. // special handling of options api
  7402. computed(() => {
  7403. setActivePinia(pinia);
  7404. return getter.call(store, store);
  7405. })
  7406. ) : getter;
  7407. set(store, getterName, getterValue);
  7408. }
  7409. Object.keys(store._hmrPayload.getters).forEach((key) => {
  7410. if (!(key in newStore._hmrPayload.getters)) {
  7411. del(store, key);
  7412. }
  7413. });
  7414. Object.keys(store._hmrPayload.actions).forEach((key) => {
  7415. if (!(key in newStore._hmrPayload.actions)) {
  7416. del(store, key);
  7417. }
  7418. });
  7419. store._hmrPayload = newStore._hmrPayload;
  7420. store._getters = newStore._getters;
  7421. store._hotUpdating = false;
  7422. });
  7423. }
  7424. if (USE_DEVTOOLS) {
  7425. const nonEnumerable = {
  7426. writable: true,
  7427. configurable: true,
  7428. // avoid warning on devtools trying to display this property
  7429. enumerable: false
  7430. };
  7431. ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p2) => {
  7432. Object.defineProperty(store, p2, assign({ value: store[p2] }, nonEnumerable));
  7433. });
  7434. }
  7435. pinia._p.forEach((extender) => {
  7436. if (USE_DEVTOOLS) {
  7437. const extensions = scope.run(() => extender({
  7438. store,
  7439. app: pinia._a,
  7440. pinia,
  7441. options: optionsForPlugin
  7442. }));
  7443. Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));
  7444. assign(store, extensions);
  7445. } else {
  7446. assign(store, scope.run(() => extender({
  7447. store,
  7448. app: pinia._a,
  7449. pinia,
  7450. options: optionsForPlugin
  7451. })));
  7452. }
  7453. });
  7454. if (store.$state && typeof store.$state === "object" && typeof store.$state.constructor === "function" && !store.$state.constructor.toString().includes("[native code]")) {
  7455. console.warn(`[🍍]: The "state" must be a plain object. It cannot be
  7456. state: () => new MyClass()
  7457. Found in store "${store.$id}".`);
  7458. }
  7459. if (initialState && isOptionsStore && options.hydrate) {
  7460. options.hydrate(store.$state, initialState);
  7461. }
  7462. isListening = true;
  7463. isSyncListening = true;
  7464. return store;
  7465. }
  7466. function defineStore(idOrOptions, setup, setupOptions) {
  7467. let id;
  7468. let options;
  7469. const isSetupStore = typeof setup === "function";
  7470. if (typeof idOrOptions === "string") {
  7471. id = idOrOptions;
  7472. options = isSetupStore ? setupOptions : setup;
  7473. } else {
  7474. options = idOrOptions;
  7475. id = idOrOptions.id;
  7476. if (typeof id !== "string") {
  7477. throw new Error(`[🍍]: "defineStore()" must be passed a store id as its first argument.`);
  7478. }
  7479. }
  7480. function useStore(pinia, hot) {
  7481. const currentInstance2 = getCurrentInstance();
  7482. pinia = // in test mode, ignore the argument provided as we can always retrieve a
  7483. // pinia instance with getActivePinia()
  7484. pinia || currentInstance2 && inject(piniaSymbol, null);
  7485. if (pinia)
  7486. setActivePinia(pinia);
  7487. if (!activePinia) {
  7488. throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Did you forget to install pinia?
  7489. const pinia = createPinia()
  7490. app.use(pinia)
  7491. This will fail in production.`);
  7492. }
  7493. pinia = activePinia;
  7494. if (!pinia._s.has(id)) {
  7495. if (isSetupStore) {
  7496. createSetupStore(id, setup, options, pinia);
  7497. } else {
  7498. createOptionsStore(id, options, pinia);
  7499. }
  7500. {
  7501. useStore._pinia = pinia;
  7502. }
  7503. }
  7504. const store = pinia._s.get(id);
  7505. if (hot) {
  7506. const hotId = "__hot:" + id;
  7507. const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia, true) : createOptionsStore(hotId, assign({}, options), pinia, true);
  7508. hot._hotUpdate(newStore);
  7509. delete pinia.state.value[hotId];
  7510. pinia._s.delete(hotId);
  7511. }
  7512. if (IS_CLIENT && currentInstance2 && currentInstance2.proxy && // avoid adding stores that are just built for hot module replacement
  7513. !hot) {
  7514. const vm = currentInstance2.proxy;
  7515. const cache = "_pStores" in vm ? vm._pStores : vm._pStores = {};
  7516. cache[id] = store;
  7517. }
  7518. return store;
  7519. }
  7520. useStore.$id = id;
  7521. return useStore;
  7522. }
  7523. let mapStoreSuffix = "Store";
  7524. function setMapStoreSuffix(suffix) {
  7525. mapStoreSuffix = suffix;
  7526. }
  7527. function mapStores(...stores) {
  7528. if (Array.isArray(stores[0])) {
  7529. console.warn(`[🍍]: Directly pass all stores to "mapStores()" without putting them in an array:
  7530. Replace
  7531. mapStores([useAuthStore, useCartStore])
  7532. with
  7533. mapStores(useAuthStore, useCartStore)
  7534. This will fail in production if not fixed.`);
  7535. stores = stores[0];
  7536. }
  7537. return stores.reduce((reduced, useStore) => {
  7538. reduced[useStore.$id + mapStoreSuffix] = function() {
  7539. return useStore(this.$pinia);
  7540. };
  7541. return reduced;
  7542. }, {});
  7543. }
  7544. function mapState(useStore, keysOrMapper) {
  7545. return Array.isArray(keysOrMapper) ? keysOrMapper.reduce((reduced, key) => {
  7546. reduced[key] = function() {
  7547. return useStore(this.$pinia)[key];
  7548. };
  7549. return reduced;
  7550. }, {}) : Object.keys(keysOrMapper).reduce((reduced, key) => {
  7551. reduced[key] = function() {
  7552. const store = useStore(this.$pinia);
  7553. const storeKey = keysOrMapper[key];
  7554. return typeof storeKey === "function" ? storeKey.call(this, store) : store[storeKey];
  7555. };
  7556. return reduced;
  7557. }, {});
  7558. }
  7559. const mapGetters = mapState;
  7560. function mapActions(useStore, keysOrMapper) {
  7561. return Array.isArray(keysOrMapper) ? keysOrMapper.reduce((reduced, key) => {
  7562. reduced[key] = function(...args) {
  7563. return useStore(this.$pinia)[key](...args);
  7564. };
  7565. return reduced;
  7566. }, {}) : Object.keys(keysOrMapper).reduce((reduced, key) => {
  7567. reduced[key] = function(...args) {
  7568. return useStore(this.$pinia)[keysOrMapper[key]](...args);
  7569. };
  7570. return reduced;
  7571. }, {});
  7572. }
  7573. function mapWritableState(useStore, keysOrMapper) {
  7574. return Array.isArray(keysOrMapper) ? keysOrMapper.reduce((reduced, key) => {
  7575. reduced[key] = {
  7576. get() {
  7577. return useStore(this.$pinia)[key];
  7578. },
  7579. set(value) {
  7580. return useStore(this.$pinia)[key] = value;
  7581. }
  7582. };
  7583. return reduced;
  7584. }, {}) : Object.keys(keysOrMapper).reduce((reduced, key) => {
  7585. reduced[key] = {
  7586. get() {
  7587. return useStore(this.$pinia)[keysOrMapper[key]];
  7588. },
  7589. set(value) {
  7590. return useStore(this.$pinia)[keysOrMapper[key]] = value;
  7591. }
  7592. };
  7593. return reduced;
  7594. }, {});
  7595. }
  7596. function storeToRefs(store) {
  7597. {
  7598. store = toRaw(store);
  7599. const refs = {};
  7600. for (const key in store) {
  7601. const value = store[key];
  7602. if (isRef(value) || isReactive(value)) {
  7603. refs[key] = // ---
  7604. toRef(store, key);
  7605. }
  7606. }
  7607. return refs;
  7608. }
  7609. }
  7610. const PiniaVuePlugin = function(_Vue) {
  7611. _Vue.mixin({
  7612. beforeCreate() {
  7613. const options = this.$options;
  7614. if (options.pinia) {
  7615. const pinia = options.pinia;
  7616. if (!this._provided) {
  7617. const provideCache = {};
  7618. Object.defineProperty(this, "_provided", {
  7619. get: () => provideCache,
  7620. set: (v) => Object.assign(provideCache, v)
  7621. });
  7622. }
  7623. this._provided[piniaSymbol] = pinia;
  7624. if (!this.$pinia) {
  7625. this.$pinia = pinia;
  7626. }
  7627. pinia._a = this;
  7628. if (IS_CLIENT) {
  7629. setActivePinia(pinia);
  7630. }
  7631. if (USE_DEVTOOLS) {
  7632. registerPiniaDevtools(pinia._a);
  7633. }
  7634. } else if (!this.$pinia && options.parent && options.parent.$pinia) {
  7635. this.$pinia = options.parent.$pinia;
  7636. }
  7637. },
  7638. destroyed() {
  7639. delete this._pStores;
  7640. }
  7641. });
  7642. };
  7643. const Pinia = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  7644. __proto__: null,
  7645. get MutationType() {
  7646. return MutationType;
  7647. },
  7648. PiniaVuePlugin,
  7649. acceptHMRUpdate,
  7650. createPinia,
  7651. defineStore,
  7652. getActivePinia,
  7653. mapActions,
  7654. mapGetters,
  7655. mapState,
  7656. mapStores,
  7657. mapWritableState,
  7658. setActivePinia,
  7659. setMapStoreSuffix,
  7660. skipHydrate,
  7661. storeToRefs
  7662. }, Symbol.toStringTag, { value: "Module" }));
  7663. const mixin = {
  7664. // 定义每个组件都可能需要用到的外部样式以及类名
  7665. props: {
  7666. // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
  7667. customStyle: {
  7668. type: [Object, String],
  7669. default: () => ({})
  7670. },
  7671. customClass: {
  7672. type: String,
  7673. default: ""
  7674. },
  7675. // 跳转的页面路径
  7676. url: {
  7677. type: String,
  7678. default: ""
  7679. },
  7680. // 页面跳转的类型
  7681. linkType: {
  7682. type: String,
  7683. default: "navigateTo"
  7684. }
  7685. },
  7686. data() {
  7687. return {};
  7688. },
  7689. onLoad() {
  7690. this.$u.getRect = this.$uGetRect;
  7691. },
  7692. created() {
  7693. this.$u.getRect = this.$uGetRect;
  7694. },
  7695. computed: {
  7696. // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
  7697. // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
  7698. // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
  7699. $u() {
  7700. return index$1.$u.deepMerge(index$1.$u, {
  7701. props: void 0,
  7702. http: void 0,
  7703. mixin: void 0
  7704. });
  7705. },
  7706. /**
  7707. * 生成bem规则类名
  7708. * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
  7709. * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
  7710. * @param {String} name 组件名称
  7711. * @param {Array} fixed 一直会存在的类名
  7712. * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
  7713. * @returns {Array|string}
  7714. */
  7715. bem() {
  7716. return function(name, fixed, change) {
  7717. const prefix = `u-${name}--`;
  7718. const classes = {};
  7719. if (fixed) {
  7720. fixed.map((item) => {
  7721. classes[prefix + this[item]] = true;
  7722. });
  7723. }
  7724. if (change) {
  7725. change.map((item) => {
  7726. this[item] ? classes[prefix + item] = this[item] : delete classes[prefix + item];
  7727. });
  7728. }
  7729. return Object.keys(classes);
  7730. };
  7731. }
  7732. },
  7733. methods: {
  7734. // 跳转某一个页面
  7735. openPage(urlKey = "url") {
  7736. const url3 = this[urlKey];
  7737. if (url3) {
  7738. this.$u.route({ type: this.linkType, url: url3 });
  7739. }
  7740. },
  7741. // 查询节点信息
  7742. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  7743. // 解决办法为在组件根部再套一个没有任何作用的view元素
  7744. $uGetRect(selector, all) {
  7745. return new Promise((resolve2) => {
  7746. index$1.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
  7747. if (all && Array.isArray(rect) && rect.length) {
  7748. resolve2(rect);
  7749. }
  7750. if (!all && rect) {
  7751. resolve2(rect);
  7752. }
  7753. }).exec();
  7754. });
  7755. },
  7756. getParentData(parentName = "") {
  7757. if (!this.parent)
  7758. this.parent = {};
  7759. this.parent = index$1.$u.$parent.call(this, parentName);
  7760. if (this.parent.children) {
  7761. this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
  7762. }
  7763. if (this.parent && this.parentData) {
  7764. Object.keys(this.parentData).map((key) => {
  7765. this.parentData[key] = this.parent[key];
  7766. });
  7767. }
  7768. },
  7769. // 阻止事件冒泡
  7770. preventEvent(e2) {
  7771. e2 && typeof e2.stopPropagation === "function" && e2.stopPropagation();
  7772. },
  7773. // 空操作
  7774. noop(e2) {
  7775. this.preventEvent(e2);
  7776. }
  7777. },
  7778. onReachBottom() {
  7779. index$1.$emit("uOnReachBottom");
  7780. },
  7781. beforeDestroy() {
  7782. if (this.parent && index$1.$u.test.array(this.parent.children)) {
  7783. const childrenList = this.parent.children;
  7784. childrenList.map((child, index2) => {
  7785. if (child === this) {
  7786. childrenList.splice(index2, 1);
  7787. }
  7788. });
  7789. }
  7790. }
  7791. };
  7792. const mpMixin = {
  7793. // 将自定义节点设置成虚拟的,更加接近Vue组件的表现,能更好的使用flex属性
  7794. options: {
  7795. virtualHost: true
  7796. }
  7797. };
  7798. const { toString } = Object.prototype;
  7799. function isArray(val) {
  7800. return toString.call(val) === "[object Array]";
  7801. }
  7802. function isObject(val) {
  7803. return val !== null && typeof val === "object";
  7804. }
  7805. function isDate(val) {
  7806. return toString.call(val) === "[object Date]";
  7807. }
  7808. function isURLSearchParams(val) {
  7809. return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
  7810. }
  7811. function forEach(obj, fn) {
  7812. if (obj === null || typeof obj === "undefined") {
  7813. return;
  7814. }
  7815. if (typeof obj !== "object") {
  7816. obj = [obj];
  7817. }
  7818. if (isArray(obj)) {
  7819. for (let i = 0, l = obj.length; i < l; i++) {
  7820. fn.call(null, obj[i], i, obj);
  7821. }
  7822. } else {
  7823. for (const key in obj) {
  7824. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  7825. fn.call(null, obj[key], key, obj);
  7826. }
  7827. }
  7828. }
  7829. }
  7830. function isPlainObject(obj) {
  7831. return Object.prototype.toString.call(obj) === "[object Object]";
  7832. }
  7833. function deepMerge$2() {
  7834. const result = {};
  7835. function assignValue(val, key) {
  7836. if (typeof result[key] === "object" && typeof val === "object") {
  7837. result[key] = deepMerge$2(result[key], val);
  7838. } else if (typeof val === "object") {
  7839. result[key] = deepMerge$2({}, val);
  7840. } else {
  7841. result[key] = val;
  7842. }
  7843. }
  7844. for (let i = 0, l = arguments.length; i < l; i++) {
  7845. forEach(arguments[i], assignValue);
  7846. }
  7847. return result;
  7848. }
  7849. function isUndefined(val) {
  7850. return typeof val === "undefined";
  7851. }
  7852. function encode(val) {
  7853. return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  7854. }
  7855. function buildURL(url3, params) {
  7856. if (!params) {
  7857. return url3;
  7858. }
  7859. let serializedParams;
  7860. if (isURLSearchParams(params)) {
  7861. serializedParams = params.toString();
  7862. } else {
  7863. const parts = [];
  7864. forEach(params, (val, key) => {
  7865. if (val === null || typeof val === "undefined") {
  7866. return;
  7867. }
  7868. if (isArray(val)) {
  7869. key = `${key}[]`;
  7870. } else {
  7871. val = [val];
  7872. }
  7873. forEach(val, (v) => {
  7874. if (isDate(v)) {
  7875. v = v.toISOString();
  7876. } else if (isObject(v)) {
  7877. v = JSON.stringify(v);
  7878. }
  7879. parts.push(`${encode(key)}=${encode(v)}`);
  7880. });
  7881. });
  7882. serializedParams = parts.join("&");
  7883. }
  7884. if (serializedParams) {
  7885. const hashmarkIndex = url3.indexOf("#");
  7886. if (hashmarkIndex !== -1) {
  7887. url3 = url3.slice(0, hashmarkIndex);
  7888. }
  7889. url3 += (url3.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  7890. }
  7891. return url3;
  7892. }
  7893. function isAbsoluteURL(url3) {
  7894. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url3);
  7895. }
  7896. function combineURLs(baseURL, relativeURL) {
  7897. return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
  7898. }
  7899. function buildFullPath(baseURL, requestedURL) {
  7900. if (baseURL && !isAbsoluteURL(requestedURL)) {
  7901. return combineURLs(baseURL, requestedURL);
  7902. }
  7903. return requestedURL;
  7904. }
  7905. function settle(resolve2, reject, response) {
  7906. const { validateStatus: validateStatus2 } = response.config;
  7907. const status = response.statusCode;
  7908. if (status && (!validateStatus2 || validateStatus2(status))) {
  7909. resolve2(response);
  7910. } else {
  7911. reject(response);
  7912. }
  7913. }
  7914. const mergeKeys$1 = (keys, config2) => {
  7915. const config3 = {};
  7916. keys.forEach((prop) => {
  7917. if (!isUndefined(config2[prop])) {
  7918. config3[prop] = config2[prop];
  7919. }
  7920. });
  7921. return config3;
  7922. };
  7923. const adapter = (config2) => new Promise((resolve2, reject) => {
  7924. const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params);
  7925. const _config = {
  7926. url: fullPath,
  7927. header: config2.header,
  7928. complete: (response) => {
  7929. config2.fullPath = fullPath;
  7930. response.config = config2;
  7931. try {
  7932. if (typeof response.data === "string") {
  7933. response.data = JSON.parse(response.data);
  7934. }
  7935. } catch (e2) {
  7936. }
  7937. settle(resolve2, reject, response);
  7938. }
  7939. };
  7940. let requestTask;
  7941. if (config2.method === "UPLOAD") {
  7942. delete _config.header["content-type"];
  7943. delete _config.header["Content-Type"];
  7944. const otherConfig = {
  7945. filePath: config2.filePath,
  7946. name: config2.name
  7947. };
  7948. const optionalKeys = [
  7949. "formData"
  7950. ];
  7951. requestTask = index$1.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
  7952. } else if (config2.method === "DOWNLOAD") {
  7953. requestTask = index$1.downloadFile(_config);
  7954. } else {
  7955. const optionalKeys = [
  7956. "data",
  7957. "method",
  7958. "timeout",
  7959. "dataType",
  7960. "responseType"
  7961. ];
  7962. requestTask = index$1.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
  7963. }
  7964. if (config2.getTask) {
  7965. config2.getTask(requestTask, config2);
  7966. }
  7967. });
  7968. const dispatchRequest = (config2) => adapter(config2);
  7969. function InterceptorManager() {
  7970. this.handlers = [];
  7971. }
  7972. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  7973. this.handlers.push({
  7974. fulfilled,
  7975. rejected
  7976. });
  7977. return this.handlers.length - 1;
  7978. };
  7979. InterceptorManager.prototype.eject = function eject(id) {
  7980. if (this.handlers[id]) {
  7981. this.handlers[id] = null;
  7982. }
  7983. };
  7984. InterceptorManager.prototype.forEach = function forEach2(fn) {
  7985. this.handlers.forEach((h) => {
  7986. if (h !== null) {
  7987. fn(h);
  7988. }
  7989. });
  7990. };
  7991. const mergeKeys = (keys, globalsConfig, config2) => {
  7992. const config3 = {};
  7993. keys.forEach((prop) => {
  7994. if (!isUndefined(config2[prop])) {
  7995. config3[prop] = config2[prop];
  7996. } else if (!isUndefined(globalsConfig[prop])) {
  7997. config3[prop] = globalsConfig[prop];
  7998. }
  7999. });
  8000. return config3;
  8001. };
  8002. const mergeConfig = (globalsConfig, config2 = {}) => {
  8003. const method3 = config2.method || globalsConfig.method || "GET";
  8004. let config3 = {
  8005. baseURL: globalsConfig.baseURL || "",
  8006. method: method3,
  8007. url: config2.url || "",
  8008. params: config2.params || {},
  8009. custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
  8010. header: deepMerge$2(globalsConfig.header || {}, config2.header || {})
  8011. };
  8012. const defaultToConfig2Keys = ["getTask", "validateStatus"];
  8013. config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
  8014. if (method3 === "DOWNLOAD")
  8015. ;
  8016. else if (method3 === "UPLOAD") {
  8017. delete config3.header["content-type"];
  8018. delete config3.header["Content-Type"];
  8019. const uploadKeys = [
  8020. "filePath",
  8021. "name",
  8022. "formData"
  8023. ];
  8024. uploadKeys.forEach((prop) => {
  8025. if (!isUndefined(config2[prop])) {
  8026. config3[prop] = config2[prop];
  8027. }
  8028. });
  8029. } else {
  8030. const defaultsKeys = [
  8031. "data",
  8032. "timeout",
  8033. "dataType",
  8034. "responseType"
  8035. ];
  8036. config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
  8037. }
  8038. return config3;
  8039. };
  8040. const defaults = {
  8041. baseURL: "",
  8042. header: {},
  8043. method: "GET",
  8044. dataType: "json",
  8045. responseType: "text",
  8046. custom: {},
  8047. timeout: 6e4,
  8048. validateStatus: function validateStatus(status) {
  8049. return status >= 200 && status < 300;
  8050. }
  8051. };
  8052. var clone = function() {
  8053. function _instanceof(obj, type2) {
  8054. return type2 != null && obj instanceof type2;
  8055. }
  8056. var nativeMap;
  8057. try {
  8058. nativeMap = Map;
  8059. } catch (_) {
  8060. nativeMap = function() {
  8061. };
  8062. }
  8063. var nativeSet;
  8064. try {
  8065. nativeSet = Set;
  8066. } catch (_) {
  8067. nativeSet = function() {
  8068. };
  8069. }
  8070. var nativePromise;
  8071. try {
  8072. nativePromise = Promise;
  8073. } catch (_) {
  8074. nativePromise = function() {
  8075. };
  8076. }
  8077. function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
  8078. if (typeof circular === "object") {
  8079. depth = circular.depth;
  8080. prototype = circular.prototype;
  8081. includeNonEnumerable = circular.includeNonEnumerable;
  8082. circular = circular.circular;
  8083. }
  8084. var allParents = [];
  8085. var allChildren = [];
  8086. var useBuffer = typeof Buffer != "undefined";
  8087. if (typeof circular == "undefined")
  8088. circular = true;
  8089. if (typeof depth == "undefined")
  8090. depth = Infinity;
  8091. function _clone(parent2, depth2) {
  8092. if (parent2 === null)
  8093. return null;
  8094. if (depth2 === 0)
  8095. return parent2;
  8096. var child;
  8097. var proto;
  8098. if (typeof parent2 != "object") {
  8099. return parent2;
  8100. }
  8101. if (_instanceof(parent2, nativeMap)) {
  8102. child = new nativeMap();
  8103. } else if (_instanceof(parent2, nativeSet)) {
  8104. child = new nativeSet();
  8105. } else if (_instanceof(parent2, nativePromise)) {
  8106. child = new nativePromise(function(resolve2, reject) {
  8107. parent2.then(function(value) {
  8108. resolve2(_clone(value, depth2 - 1));
  8109. }, function(err) {
  8110. reject(_clone(err, depth2 - 1));
  8111. });
  8112. });
  8113. } else if (clone2.__isArray(parent2)) {
  8114. child = [];
  8115. } else if (clone2.__isRegExp(parent2)) {
  8116. child = new RegExp(parent2.source, __getRegExpFlags(parent2));
  8117. if (parent2.lastIndex)
  8118. child.lastIndex = parent2.lastIndex;
  8119. } else if (clone2.__isDate(parent2)) {
  8120. child = new Date(parent2.getTime());
  8121. } else if (useBuffer && Buffer.isBuffer(parent2)) {
  8122. if (Buffer.from) {
  8123. child = Buffer.from(parent2);
  8124. } else {
  8125. child = new Buffer(parent2.length);
  8126. parent2.copy(child);
  8127. }
  8128. return child;
  8129. } else if (_instanceof(parent2, Error)) {
  8130. child = Object.create(parent2);
  8131. } else {
  8132. if (typeof prototype == "undefined") {
  8133. proto = Object.getPrototypeOf(parent2);
  8134. child = Object.create(proto);
  8135. } else {
  8136. child = Object.create(prototype);
  8137. proto = prototype;
  8138. }
  8139. }
  8140. if (circular) {
  8141. var index2 = allParents.indexOf(parent2);
  8142. if (index2 != -1) {
  8143. return allChildren[index2];
  8144. }
  8145. allParents.push(parent2);
  8146. allChildren.push(child);
  8147. }
  8148. if (_instanceof(parent2, nativeMap)) {
  8149. parent2.forEach(function(value, key) {
  8150. var keyChild = _clone(key, depth2 - 1);
  8151. var valueChild = _clone(value, depth2 - 1);
  8152. child.set(keyChild, valueChild);
  8153. });
  8154. }
  8155. if (_instanceof(parent2, nativeSet)) {
  8156. parent2.forEach(function(value) {
  8157. var entryChild = _clone(value, depth2 - 1);
  8158. child.add(entryChild);
  8159. });
  8160. }
  8161. for (var i in parent2) {
  8162. var attrs = Object.getOwnPropertyDescriptor(parent2, i);
  8163. if (attrs) {
  8164. child[i] = _clone(parent2[i], depth2 - 1);
  8165. }
  8166. try {
  8167. var objProperty = Object.getOwnPropertyDescriptor(parent2, i);
  8168. if (objProperty.set === "undefined") {
  8169. continue;
  8170. }
  8171. child[i] = _clone(parent2[i], depth2 - 1);
  8172. } catch (e2) {
  8173. if (e2 instanceof TypeError) {
  8174. continue;
  8175. } else if (e2 instanceof ReferenceError) {
  8176. continue;
  8177. }
  8178. }
  8179. }
  8180. if (Object.getOwnPropertySymbols) {
  8181. var symbols = Object.getOwnPropertySymbols(parent2);
  8182. for (var i = 0; i < symbols.length; i++) {
  8183. var symbol = symbols[i];
  8184. var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
  8185. if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
  8186. continue;
  8187. }
  8188. child[symbol] = _clone(parent2[symbol], depth2 - 1);
  8189. Object.defineProperty(child, symbol, descriptor);
  8190. }
  8191. }
  8192. if (includeNonEnumerable) {
  8193. var allPropertyNames = Object.getOwnPropertyNames(parent2);
  8194. for (var i = 0; i < allPropertyNames.length; i++) {
  8195. var propertyName = allPropertyNames[i];
  8196. var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
  8197. if (descriptor && descriptor.enumerable) {
  8198. continue;
  8199. }
  8200. child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
  8201. Object.defineProperty(child, propertyName, descriptor);
  8202. }
  8203. }
  8204. return child;
  8205. }
  8206. return _clone(parent, depth);
  8207. }
  8208. clone2.clonePrototype = function clonePrototype(parent) {
  8209. if (parent === null)
  8210. return null;
  8211. var c = function() {
  8212. };
  8213. c.prototype = parent;
  8214. return new c();
  8215. };
  8216. function __objToStr(o2) {
  8217. return Object.prototype.toString.call(o2);
  8218. }
  8219. clone2.__objToStr = __objToStr;
  8220. function __isDate(o2) {
  8221. return typeof o2 === "object" && __objToStr(o2) === "[object Date]";
  8222. }
  8223. clone2.__isDate = __isDate;
  8224. function __isArray(o2) {
  8225. return typeof o2 === "object" && __objToStr(o2) === "[object Array]";
  8226. }
  8227. clone2.__isArray = __isArray;
  8228. function __isRegExp(o2) {
  8229. return typeof o2 === "object" && __objToStr(o2) === "[object RegExp]";
  8230. }
  8231. clone2.__isRegExp = __isRegExp;
  8232. function __getRegExpFlags(re) {
  8233. var flags = "";
  8234. if (re.global)
  8235. flags += "g";
  8236. if (re.ignoreCase)
  8237. flags += "i";
  8238. if (re.multiline)
  8239. flags += "m";
  8240. return flags;
  8241. }
  8242. clone2.__getRegExpFlags = __getRegExpFlags;
  8243. return clone2;
  8244. }();
  8245. class Request {
  8246. /**
  8247. * @param {Object} arg - 全局配置
  8248. * @param {String} arg.baseURL - 全局根路径
  8249. * @param {Object} arg.header - 全局header
  8250. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  8251. * @param {String} arg.dataType = [json] - 全局默认的dataType
  8252. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
  8253. * @param {Object} arg.custom - 全局默认的自定义参数
  8254. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
  8255. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  8256. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  8257. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  8258. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  8259. */
  8260. constructor(arg = {}) {
  8261. if (!isPlainObject(arg)) {
  8262. arg = {};
  8263. console.warn("设置全局参数必须接收一个Object");
  8264. }
  8265. this.config = clone({ ...defaults, ...arg });
  8266. this.interceptors = {
  8267. request: new InterceptorManager(),
  8268. response: new InterceptorManager()
  8269. };
  8270. }
  8271. /**
  8272. * @Function
  8273. * @param {Request~setConfigCallback} f - 设置全局默认配置
  8274. */
  8275. setConfig(f2) {
  8276. this.config = f2(this.config);
  8277. }
  8278. middleware(config2) {
  8279. config2 = mergeConfig(this.config, config2);
  8280. const chain = [dispatchRequest, void 0];
  8281. let promise2 = Promise.resolve(config2);
  8282. this.interceptors.request.forEach((interceptor) => {
  8283. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  8284. });
  8285. this.interceptors.response.forEach((interceptor) => {
  8286. chain.push(interceptor.fulfilled, interceptor.rejected);
  8287. });
  8288. while (chain.length) {
  8289. promise2 = promise2.then(chain.shift(), chain.shift());
  8290. }
  8291. return promise2;
  8292. }
  8293. /**
  8294. * @Function
  8295. * @param {Object} config - 请求配置项
  8296. * @prop {String} options.url - 请求路径
  8297. * @prop {Object} options.data - 请求参数
  8298. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  8299. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  8300. * @prop {Object} [options.header = config.header] - 请求header
  8301. * @prop {Object} [options.method = config.method] - 请求方法
  8302. * @returns {Promise<unknown>}
  8303. */
  8304. request(config2 = {}) {
  8305. return this.middleware(config2);
  8306. }
  8307. get(url3, options = {}) {
  8308. return this.middleware({
  8309. url: url3,
  8310. method: "GET",
  8311. ...options
  8312. });
  8313. }
  8314. post(url3, data, options = {}) {
  8315. return this.middleware({
  8316. url: url3,
  8317. data,
  8318. method: "POST",
  8319. ...options
  8320. });
  8321. }
  8322. put(url3, data, options = {}) {
  8323. return this.middleware({
  8324. url: url3,
  8325. data,
  8326. method: "PUT",
  8327. ...options
  8328. });
  8329. }
  8330. delete(url3, data, options = {}) {
  8331. return this.middleware({
  8332. url: url3,
  8333. data,
  8334. method: "DELETE",
  8335. ...options
  8336. });
  8337. }
  8338. connect(url3, data, options = {}) {
  8339. return this.middleware({
  8340. url: url3,
  8341. data,
  8342. method: "CONNECT",
  8343. ...options
  8344. });
  8345. }
  8346. head(url3, data, options = {}) {
  8347. return this.middleware({
  8348. url: url3,
  8349. data,
  8350. method: "HEAD",
  8351. ...options
  8352. });
  8353. }
  8354. options(url3, data, options = {}) {
  8355. return this.middleware({
  8356. url: url3,
  8357. data,
  8358. method: "OPTIONS",
  8359. ...options
  8360. });
  8361. }
  8362. trace(url3, data, options = {}) {
  8363. return this.middleware({
  8364. url: url3,
  8365. data,
  8366. method: "TRACE",
  8367. ...options
  8368. });
  8369. }
  8370. upload(url3, config2 = {}) {
  8371. config2.url = url3;
  8372. config2.method = "UPLOAD";
  8373. return this.middleware(config2);
  8374. }
  8375. download(url3, config2 = {}) {
  8376. config2.url = url3;
  8377. config2.method = "DOWNLOAD";
  8378. return this.middleware(config2);
  8379. }
  8380. }
  8381. class Router {
  8382. constructor() {
  8383. this.config = {
  8384. type: "navigateTo",
  8385. url: "",
  8386. delta: 1,
  8387. // navigateBack页面后退时,回退的层数
  8388. params: {},
  8389. // 传递的参数
  8390. animationType: "pop-in",
  8391. // 窗口动画,只在APP有效
  8392. animationDuration: 300,
  8393. // 窗口动画持续时间,单位毫秒,只在APP有效
  8394. intercept: false
  8395. // 是否需要拦截
  8396. };
  8397. this.route = this.route.bind(this);
  8398. }
  8399. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  8400. addRootPath(url3) {
  8401. return url3[0] === "/" ? url3 : `/${url3}`;
  8402. }
  8403. // 整合路由参数
  8404. mixinParam(url3, params) {
  8405. url3 = url3 && this.addRootPath(url3);
  8406. let query = "";
  8407. if (/.*\/.*\?.*=.*/.test(url3)) {
  8408. query = index$1.$u.queryParams(params, false);
  8409. return url3 += `&${query}`;
  8410. }
  8411. query = index$1.$u.queryParams(params);
  8412. return url3 += query;
  8413. }
  8414. // 对外的方法名称
  8415. async route(options = {}, params = {}) {
  8416. let mergeConfig2 = {};
  8417. if (typeof options === "string") {
  8418. mergeConfig2.url = this.mixinParam(options, params);
  8419. mergeConfig2.type = "navigateTo";
  8420. } else {
  8421. mergeConfig2 = index$1.$u.deepMerge(this.config, options);
  8422. mergeConfig2.url = this.mixinParam(options.url, options.params);
  8423. }
  8424. if (mergeConfig2.url === index$1.$u.page())
  8425. return;
  8426. if (params.intercept) {
  8427. this.config.intercept = params.intercept;
  8428. }
  8429. mergeConfig2.params = params;
  8430. mergeConfig2 = index$1.$u.deepMerge(this.config, mergeConfig2);
  8431. if (typeof index$1.$u.routeIntercept === "function") {
  8432. const isNext = await new Promise((resolve2, reject) => {
  8433. index$1.$u.routeIntercept(mergeConfig2, resolve2);
  8434. });
  8435. isNext && this.openPage(mergeConfig2);
  8436. } else {
  8437. this.openPage(mergeConfig2);
  8438. }
  8439. }
  8440. // 执行路由跳转
  8441. openPage(config2) {
  8442. const {
  8443. url: url3,
  8444. type: type2,
  8445. delta,
  8446. animationType,
  8447. animationDuration
  8448. } = config2;
  8449. if (config2.type == "navigateTo" || config2.type == "to") {
  8450. index$1.navigateTo({
  8451. url: url3,
  8452. animationType,
  8453. animationDuration
  8454. });
  8455. }
  8456. if (config2.type == "redirectTo" || config2.type == "redirect") {
  8457. index$1.redirectTo({
  8458. url: url3
  8459. });
  8460. }
  8461. if (config2.type == "switchTab" || config2.type == "tab") {
  8462. index$1.switchTab({
  8463. url: url3
  8464. });
  8465. }
  8466. if (config2.type == "reLaunch" || config2.type == "launch") {
  8467. index$1.reLaunch({
  8468. url: url3
  8469. });
  8470. }
  8471. if (config2.type == "navigateBack" || config2.type == "back") {
  8472. index$1.navigateBack({
  8473. delta
  8474. });
  8475. }
  8476. }
  8477. }
  8478. const route = new Router().route;
  8479. function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
  8480. const startRGB = hexToRgb(startColor, false);
  8481. const startR = startRGB[0];
  8482. const startG = startRGB[1];
  8483. const startB = startRGB[2];
  8484. const endRGB = hexToRgb(endColor, false);
  8485. const endR = endRGB[0];
  8486. const endG = endRGB[1];
  8487. const endB = endRGB[2];
  8488. const sR = (endR - startR) / step;
  8489. const sG = (endG - startG) / step;
  8490. const sB = (endB - startB) / step;
  8491. const colorArr = [];
  8492. for (let i = 0; i < step; i++) {
  8493. let hex2 = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`);
  8494. if (i === 0)
  8495. hex2 = rgbToHex(startColor);
  8496. if (i === step - 1)
  8497. hex2 = rgbToHex(endColor);
  8498. colorArr.push(hex2);
  8499. }
  8500. return colorArr;
  8501. }
  8502. function hexToRgb(sColor, str = true) {
  8503. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  8504. sColor = String(sColor).toLowerCase();
  8505. if (sColor && reg.test(sColor)) {
  8506. if (sColor.length === 4) {
  8507. let sColorNew = "#";
  8508. for (let i = 1; i < 4; i += 1) {
  8509. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  8510. }
  8511. sColor = sColorNew;
  8512. }
  8513. const sColorChange = [];
  8514. for (let i = 1; i < 7; i += 2) {
  8515. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  8516. }
  8517. if (!str) {
  8518. return sColorChange;
  8519. }
  8520. return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
  8521. }
  8522. if (/^(rgb|RGB)/.test(sColor)) {
  8523. const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  8524. return arr.map((val) => Number(val));
  8525. }
  8526. return sColor;
  8527. }
  8528. function rgbToHex(rgb) {
  8529. const _this = rgb;
  8530. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  8531. if (/^(rgb|RGB)/.test(_this)) {
  8532. const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  8533. let strHex = "#";
  8534. for (let i = 0; i < aColor.length; i++) {
  8535. let hex2 = Number(aColor[i]).toString(16);
  8536. hex2 = String(hex2).length == 1 ? `${0}${hex2}` : hex2;
  8537. if (hex2 === "0") {
  8538. hex2 += hex2;
  8539. }
  8540. strHex += hex2;
  8541. }
  8542. if (strHex.length !== 7) {
  8543. strHex = _this;
  8544. }
  8545. return strHex;
  8546. }
  8547. if (reg.test(_this)) {
  8548. const aNum = _this.replace(/#/, "").split("");
  8549. if (aNum.length === 6) {
  8550. return _this;
  8551. }
  8552. if (aNum.length === 3) {
  8553. let numHex = "#";
  8554. for (let i = 0; i < aNum.length; i += 1) {
  8555. numHex += aNum[i] + aNum[i];
  8556. }
  8557. return numHex;
  8558. }
  8559. } else {
  8560. return _this;
  8561. }
  8562. }
  8563. function colorToRgba(color2, alpha) {
  8564. color2 = rgbToHex(color2);
  8565. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  8566. let sColor = String(color2).toLowerCase();
  8567. if (sColor && reg.test(sColor)) {
  8568. if (sColor.length === 4) {
  8569. let sColorNew = "#";
  8570. for (let i = 1; i < 4; i += 1) {
  8571. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  8572. }
  8573. sColor = sColorNew;
  8574. }
  8575. const sColorChange = [];
  8576. for (let i = 1; i < 7; i += 2) {
  8577. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  8578. }
  8579. return `rgba(${sColorChange.join(",")},${alpha})`;
  8580. }
  8581. return sColor;
  8582. }
  8583. const colorGradient$1 = {
  8584. colorGradient,
  8585. hexToRgb,
  8586. rgbToHex,
  8587. colorToRgba
  8588. };
  8589. function email(value) {
  8590. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value);
  8591. }
  8592. function mobile(value) {
  8593. return /^1[23456789]\d{9}$/.test(value);
  8594. }
  8595. function url(value) {
  8596. return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test(value);
  8597. }
  8598. function date$1(value) {
  8599. if (!value)
  8600. return false;
  8601. if (number$1(value))
  8602. value = +value;
  8603. return !/Invalid|NaN/.test(new Date(value).toString());
  8604. }
  8605. function dateISO(value) {
  8606. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  8607. }
  8608. function number$1(value) {
  8609. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value);
  8610. }
  8611. function string$1(value) {
  8612. return typeof value === "string";
  8613. }
  8614. function digits(value) {
  8615. return /^\d+$/.test(value);
  8616. }
  8617. function idCard(value) {
  8618. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(
  8619. value
  8620. );
  8621. }
  8622. function carNo(value) {
  8623. const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  8624. const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  8625. if (value.length === 7) {
  8626. return creg.test(value);
  8627. }
  8628. if (value.length === 8) {
  8629. return xreg.test(value);
  8630. }
  8631. return false;
  8632. }
  8633. function amount(value) {
  8634. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  8635. }
  8636. function chinese(value) {
  8637. const reg = /^[\u4e00-\u9fa5]+$/gi;
  8638. return reg.test(value);
  8639. }
  8640. function letter(value) {
  8641. return /^[a-zA-Z]*$/.test(value);
  8642. }
  8643. function enOrNum(value) {
  8644. const reg = /^[0-9a-zA-Z]*$/g;
  8645. return reg.test(value);
  8646. }
  8647. function contains(value, param) {
  8648. return value.indexOf(param) >= 0;
  8649. }
  8650. function range$2(value, param) {
  8651. return value >= param[0] && value <= param[1];
  8652. }
  8653. function rangeLength(value, param) {
  8654. return value.length >= param[0] && value.length <= param[1];
  8655. }
  8656. function landline(value) {
  8657. const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  8658. return reg.test(value);
  8659. }
  8660. function empty(value) {
  8661. switch (typeof value) {
  8662. case "undefined":
  8663. return true;
  8664. case "string":
  8665. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
  8666. return true;
  8667. break;
  8668. case "boolean":
  8669. if (!value)
  8670. return true;
  8671. break;
  8672. case "number":
  8673. if (value === 0 || isNaN(value))
  8674. return true;
  8675. break;
  8676. case "object":
  8677. if (value === null || value.length === 0)
  8678. return true;
  8679. for (const i in value) {
  8680. return false;
  8681. }
  8682. return true;
  8683. }
  8684. return false;
  8685. }
  8686. function jsonString(value) {
  8687. if (typeof value === "string") {
  8688. try {
  8689. const obj = JSON.parse(value);
  8690. if (typeof obj === "object" && obj) {
  8691. return true;
  8692. }
  8693. return false;
  8694. } catch (e2) {
  8695. return false;
  8696. }
  8697. }
  8698. return false;
  8699. }
  8700. function array$1(value) {
  8701. if (typeof Array.isArray === "function") {
  8702. return Array.isArray(value);
  8703. }
  8704. return Object.prototype.toString.call(value) === "[object Array]";
  8705. }
  8706. function object$1(value) {
  8707. return Object.prototype.toString.call(value) === "[object Object]";
  8708. }
  8709. function code(value, len = 6) {
  8710. return new RegExp(`^\\d{${len}}$`).test(value);
  8711. }
  8712. function func(value) {
  8713. return typeof value === "function";
  8714. }
  8715. function promise(value) {
  8716. return object$1(value) && func(value.then) && func(value.catch);
  8717. }
  8718. function image(value) {
  8719. const newValue = value.split("?")[0];
  8720. const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  8721. return IMAGE_REGEXP.test(newValue);
  8722. }
  8723. function video(value) {
  8724. const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
  8725. return VIDEO_REGEXP.test(value);
  8726. }
  8727. function regExp(o2) {
  8728. return o2 && Object.prototype.toString.call(o2) === "[object RegExp]";
  8729. }
  8730. const test = {
  8731. email,
  8732. mobile,
  8733. url,
  8734. date: date$1,
  8735. dateISO,
  8736. number: number$1,
  8737. digits,
  8738. idCard,
  8739. carNo,
  8740. amount,
  8741. chinese,
  8742. letter,
  8743. enOrNum,
  8744. contains,
  8745. range: range$2,
  8746. rangeLength,
  8747. empty,
  8748. isEmpty: empty,
  8749. jsonString,
  8750. landline,
  8751. object: object$1,
  8752. array: array$1,
  8753. code,
  8754. func,
  8755. promise,
  8756. video,
  8757. image,
  8758. regExp,
  8759. string: string$1
  8760. };
  8761. let timeout = null;
  8762. function debounce(func2, wait = 500, immediate = false) {
  8763. if (timeout !== null)
  8764. clearTimeout(timeout);
  8765. if (immediate) {
  8766. const callNow = !timeout;
  8767. timeout = setTimeout(() => {
  8768. timeout = null;
  8769. }, wait);
  8770. if (callNow)
  8771. typeof func2 === "function" && func2();
  8772. } else {
  8773. timeout = setTimeout(() => {
  8774. typeof func2 === "function" && func2();
  8775. }, wait);
  8776. }
  8777. }
  8778. let flag;
  8779. function throttle(func2, wait = 500, immediate = true) {
  8780. if (immediate) {
  8781. if (!flag) {
  8782. flag = true;
  8783. typeof func2 === "function" && func2();
  8784. setTimeout(() => {
  8785. flag = false;
  8786. }, wait);
  8787. }
  8788. } else if (!flag) {
  8789. flag = true;
  8790. setTimeout(() => {
  8791. flag = false;
  8792. typeof func2 === "function" && func2();
  8793. }, wait);
  8794. }
  8795. }
  8796. function strip(num, precision = 15) {
  8797. return +parseFloat(Number(num).toPrecision(precision));
  8798. }
  8799. function digitLength(num) {
  8800. const eSplit = num.toString().split(/[eE]/);
  8801. const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
  8802. return len > 0 ? len : 0;
  8803. }
  8804. function float2Fixed(num) {
  8805. if (num.toString().indexOf("e") === -1) {
  8806. return Number(num.toString().replace(".", ""));
  8807. }
  8808. const dLen = digitLength(num);
  8809. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  8810. }
  8811. function checkBoundary(num) {
  8812. {
  8813. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  8814. console.warn(`${num} 超出了精度限制,结果可能不正确`);
  8815. }
  8816. }
  8817. }
  8818. function iteratorOperation(arr, operation) {
  8819. const [num1, num2, ...others] = arr;
  8820. let res = operation(num1, num2);
  8821. others.forEach((num) => {
  8822. res = operation(res, num);
  8823. });
  8824. return res;
  8825. }
  8826. function times(...nums) {
  8827. if (nums.length > 2) {
  8828. return iteratorOperation(nums, times);
  8829. }
  8830. const [num1, num2] = nums;
  8831. const num1Changed = float2Fixed(num1);
  8832. const num2Changed = float2Fixed(num2);
  8833. const baseNum = digitLength(num1) + digitLength(num2);
  8834. const leftValue = num1Changed * num2Changed;
  8835. checkBoundary(leftValue);
  8836. return leftValue / Math.pow(10, baseNum);
  8837. }
  8838. function divide(...nums) {
  8839. if (nums.length > 2) {
  8840. return iteratorOperation(nums, divide);
  8841. }
  8842. const [num1, num2] = nums;
  8843. const num1Changed = float2Fixed(num1);
  8844. const num2Changed = float2Fixed(num2);
  8845. checkBoundary(num1Changed);
  8846. checkBoundary(num2Changed);
  8847. return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
  8848. }
  8849. function round(num, ratio) {
  8850. const base = Math.pow(10, ratio);
  8851. let result = divide(Math.round(Math.abs(times(num, base))), base);
  8852. if (num < 0 && result !== 0) {
  8853. result = times(result, -1);
  8854. }
  8855. return result;
  8856. }
  8857. function range$1(min = 0, max = 0, value = 0) {
  8858. return Math.max(min, Math.min(max, Number(value)));
  8859. }
  8860. function getPx(value, unit = false) {
  8861. if (test.number(value)) {
  8862. return unit ? `${value}px` : Number(value);
  8863. }
  8864. if (/(rpx|upx)$/.test(value)) {
  8865. return unit ? `${index$1.upx2px(parseInt(value))}px` : Number(index$1.upx2px(parseInt(value)));
  8866. }
  8867. return unit ? `${parseInt(value)}px` : parseInt(value);
  8868. }
  8869. function sleep(value = 30) {
  8870. return new Promise((resolve2) => {
  8871. setTimeout(() => {
  8872. resolve2();
  8873. }, value);
  8874. });
  8875. }
  8876. function os() {
  8877. return index$1.getSystemInfoSync().platform.toLowerCase();
  8878. }
  8879. function sys() {
  8880. return index$1.getSystemInfoSync();
  8881. }
  8882. function random(min, max) {
  8883. if (min >= 0 && max > 0 && max >= min) {
  8884. const gab = max - min + 1;
  8885. return Math.floor(Math.random() * gab + min);
  8886. }
  8887. return 0;
  8888. }
  8889. function guid(len = 32, firstU = true, radix = null) {
  8890. const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  8891. const uuid = [];
  8892. radix = radix || chars.length;
  8893. if (len) {
  8894. for (let i = 0; i < len; i++)
  8895. uuid[i] = chars[0 | Math.random() * radix];
  8896. } else {
  8897. let r;
  8898. uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
  8899. uuid[14] = "4";
  8900. for (let i = 0; i < 36; i++) {
  8901. if (!uuid[i]) {
  8902. r = 0 | Math.random() * 16;
  8903. uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
  8904. }
  8905. }
  8906. }
  8907. if (firstU) {
  8908. uuid.shift();
  8909. return `u${uuid.join("")}`;
  8910. }
  8911. return uuid.join("");
  8912. }
  8913. function $parent(name = void 0) {
  8914. let parent = this.$parent;
  8915. while (parent) {
  8916. if (parent.$options && parent.$options.name !== name) {
  8917. parent = parent.$parent;
  8918. } else {
  8919. return parent;
  8920. }
  8921. }
  8922. return false;
  8923. }
  8924. function addStyle(customStyle, target = "object") {
  8925. if (test.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
  8926. return customStyle;
  8927. }
  8928. if (target === "object") {
  8929. customStyle = trim(customStyle);
  8930. const styleArray = customStyle.split(";");
  8931. const style = {};
  8932. for (let i = 0; i < styleArray.length; i++) {
  8933. if (styleArray[i]) {
  8934. const item = styleArray[i].split(":");
  8935. style[trim(item[0])] = trim(item[1]);
  8936. }
  8937. }
  8938. return style;
  8939. }
  8940. let string2 = "";
  8941. for (const i in customStyle) {
  8942. const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
  8943. string2 += `${key}:${customStyle[i]};`;
  8944. }
  8945. return trim(string2);
  8946. }
  8947. function addUnit(value = "auto", unit = "") {
  8948. if (!unit) {
  8949. unit = index$1.$u.config.unit || "px";
  8950. }
  8951. value = String(value);
  8952. return test.number(value) ? `${value}${unit}` : value;
  8953. }
  8954. function deepClone(obj) {
  8955. if ([null, void 0, NaN, false].includes(obj))
  8956. return obj;
  8957. if (typeof obj !== "object" && typeof obj !== "function") {
  8958. return obj;
  8959. }
  8960. const o2 = test.array(obj) ? [] : {};
  8961. for (const i in obj) {
  8962. if (obj.hasOwnProperty(i)) {
  8963. o2[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  8964. }
  8965. }
  8966. return o2;
  8967. }
  8968. function deepMerge$1(target = {}, source = {}) {
  8969. target = deepClone(target);
  8970. if (typeof target !== "object" || typeof source !== "object")
  8971. return false;
  8972. for (const prop in source) {
  8973. if (!source.hasOwnProperty(prop))
  8974. continue;
  8975. if (prop in target) {
  8976. if (typeof target[prop] !== "object") {
  8977. target[prop] = source[prop];
  8978. } else if (typeof source[prop] !== "object") {
  8979. target[prop] = source[prop];
  8980. } else if (target[prop].concat && source[prop].concat) {
  8981. target[prop] = target[prop].concat(source[prop]);
  8982. } else {
  8983. target[prop] = deepMerge$1(target[prop], source[prop]);
  8984. }
  8985. } else {
  8986. target[prop] = source[prop];
  8987. }
  8988. }
  8989. return target;
  8990. }
  8991. function error(err) {
  8992. {
  8993. console.error(`uView提示:${err}`);
  8994. }
  8995. }
  8996. function randomArray(array3 = []) {
  8997. return array3.sort(() => Math.random() - 0.5);
  8998. }
  8999. if (!String.prototype.padStart) {
  9000. String.prototype.padStart = function(maxLength, fillString = " ") {
  9001. if (Object.prototype.toString.call(fillString) !== "[object String]") {
  9002. throw new TypeError(
  9003. "fillString must be String"
  9004. );
  9005. }
  9006. const str = this;
  9007. if (str.length >= maxLength)
  9008. return String(str);
  9009. const fillLength = maxLength - str.length;
  9010. let times2 = Math.ceil(fillLength / fillString.length);
  9011. while (times2 >>= 1) {
  9012. fillString += fillString;
  9013. if (times2 === 1) {
  9014. fillString += fillString;
  9015. }
  9016. }
  9017. return fillString.slice(0, fillLength) + str;
  9018. };
  9019. }
  9020. function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
  9021. let date3;
  9022. if (!dateTime) {
  9023. date3 = new Date();
  9024. } else if (/^\d{10}$/.test(dateTime.toString().trim())) {
  9025. date3 = new Date(dateTime * 1e3);
  9026. } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
  9027. date3 = new Date(Number(dateTime));
  9028. } else {
  9029. date3 = new Date(
  9030. typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
  9031. );
  9032. }
  9033. const timeSource = {
  9034. "y": date3.getFullYear().toString(),
  9035. // 年
  9036. "m": (date3.getMonth() + 1).toString().padStart(2, "0"),
  9037. // 月
  9038. "d": date3.getDate().toString().padStart(2, "0"),
  9039. // 日
  9040. "h": date3.getHours().toString().padStart(2, "0"),
  9041. // 时
  9042. "M": date3.getMinutes().toString().padStart(2, "0"),
  9043. // 分
  9044. "s": date3.getSeconds().toString().padStart(2, "0")
  9045. // 秒
  9046. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  9047. };
  9048. for (const key in timeSource) {
  9049. const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
  9050. if (ret) {
  9051. const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
  9052. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  9053. }
  9054. }
  9055. return formatStr;
  9056. }
  9057. function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") {
  9058. if (timestamp == null)
  9059. timestamp = Number(new Date());
  9060. timestamp = parseInt(timestamp);
  9061. if (timestamp.toString().length == 10)
  9062. timestamp *= 1e3;
  9063. let timer = new Date().getTime() - timestamp;
  9064. timer = parseInt(timer / 1e3);
  9065. let tips = "";
  9066. switch (true) {
  9067. case timer < 300:
  9068. tips = "刚刚";
  9069. break;
  9070. case (timer >= 300 && timer < 3600):
  9071. tips = `${parseInt(timer / 60)}分钟前`;
  9072. break;
  9073. case (timer >= 3600 && timer < 86400):
  9074. tips = `${parseInt(timer / 3600)}小时前`;
  9075. break;
  9076. case (timer >= 86400 && timer < 2592e3):
  9077. tips = `${parseInt(timer / 86400)}天前`;
  9078. break;
  9079. default:
  9080. if (format2 === false) {
  9081. if (timer >= 2592e3 && timer < 365 * 86400) {
  9082. tips = `${parseInt(timer / (86400 * 30))}个月前`;
  9083. } else {
  9084. tips = `${parseInt(timer / (86400 * 365))}年前`;
  9085. }
  9086. } else {
  9087. tips = timeFormat(timestamp, format2);
  9088. }
  9089. }
  9090. return tips;
  9091. }
  9092. function trim(str, pos = "both") {
  9093. str = String(str);
  9094. if (pos == "both") {
  9095. return str.replace(/^\s+|\s+$/g, "");
  9096. }
  9097. if (pos == "left") {
  9098. return str.replace(/^\s*/, "");
  9099. }
  9100. if (pos == "right") {
  9101. return str.replace(/(\s*$)/g, "");
  9102. }
  9103. if (pos == "all") {
  9104. return str.replace(/\s+/g, "");
  9105. }
  9106. return str;
  9107. }
  9108. function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
  9109. const prefix = isPrefix ? "?" : "";
  9110. const _result = [];
  9111. if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
  9112. arrayFormat = "brackets";
  9113. for (const key in data) {
  9114. const value = data[key];
  9115. if (["", void 0, null].indexOf(value) >= 0) {
  9116. continue;
  9117. }
  9118. if (value.constructor === Array) {
  9119. switch (arrayFormat) {
  9120. case "indices":
  9121. for (let i = 0; i < value.length; i++) {
  9122. _result.push(`${key}[${i}]=${value[i]}`);
  9123. }
  9124. break;
  9125. case "brackets":
  9126. value.forEach((_value) => {
  9127. _result.push(`${key}[]=${_value}`);
  9128. });
  9129. break;
  9130. case "repeat":
  9131. value.forEach((_value) => {
  9132. _result.push(`${key}=${_value}`);
  9133. });
  9134. break;
  9135. case "comma":
  9136. let commaStr = "";
  9137. value.forEach((_value) => {
  9138. commaStr += (commaStr ? "," : "") + _value;
  9139. });
  9140. _result.push(`${key}=${commaStr}`);
  9141. break;
  9142. default:
  9143. value.forEach((_value) => {
  9144. _result.push(`${key}[]=${_value}`);
  9145. });
  9146. }
  9147. } else {
  9148. _result.push(`${key}=${value}`);
  9149. }
  9150. }
  9151. return _result.length ? prefix + _result.join("&") : "";
  9152. }
  9153. function toast(title, duration = 2e3) {
  9154. index$1.showToast({
  9155. title: String(title),
  9156. icon: "none",
  9157. duration
  9158. });
  9159. }
  9160. function type2icon(type2 = "success", fill = false) {
  9161. if (["primary", "info", "error", "warning", "success"].indexOf(type2) == -1)
  9162. type2 = "success";
  9163. let iconName = "";
  9164. switch (type2) {
  9165. case "primary":
  9166. iconName = "info-circle";
  9167. break;
  9168. case "info":
  9169. iconName = "info-circle";
  9170. break;
  9171. case "error":
  9172. iconName = "close-circle";
  9173. break;
  9174. case "warning":
  9175. iconName = "error-circle";
  9176. break;
  9177. case "success":
  9178. iconName = "checkmark-circle";
  9179. break;
  9180. default:
  9181. iconName = "checkmark-circle";
  9182. }
  9183. if (fill)
  9184. iconName += "-fill";
  9185. return iconName;
  9186. }
  9187. function priceFormat(number3, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
  9188. number3 = `${number3}`.replace(/[^0-9+-Ee.]/g, "");
  9189. const n2 = !isFinite(+number3) ? 0 : +number3;
  9190. const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  9191. const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
  9192. const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
  9193. let s2 = "";
  9194. s2 = (prec ? round(n2, prec) + "" : `${Math.round(n2)}`).split(".");
  9195. const re = /(-?\d+)(\d{3})/;
  9196. while (re.test(s2[0])) {
  9197. s2[0] = s2[0].replace(re, `$1${sep}$2`);
  9198. }
  9199. if ((s2[1] || "").length < prec) {
  9200. s2[1] = s2[1] || "";
  9201. s2[1] += new Array(prec - s2[1].length + 1).join("0");
  9202. }
  9203. return s2.join(dec);
  9204. }
  9205. function getDuration(value, unit = true) {
  9206. const valueNum = parseInt(value);
  9207. if (unit) {
  9208. if (/s$/.test(value))
  9209. return value;
  9210. return value > 30 ? `${value}ms` : `${value}s`;
  9211. }
  9212. if (/ms$/.test(value))
  9213. return valueNum;
  9214. if (/s$/.test(value))
  9215. return valueNum > 30 ? valueNum : valueNum * 1e3;
  9216. return valueNum;
  9217. }
  9218. function padZero(value) {
  9219. return `00${value}`.slice(-2);
  9220. }
  9221. function formValidate(instance, event) {
  9222. const formItem = index$1.$u.$parent.call(instance, "u-form-item");
  9223. const form = index$1.$u.$parent.call(instance, "u-form");
  9224. if (formItem && form) {
  9225. form.validateField(formItem.prop, () => {
  9226. }, event);
  9227. }
  9228. }
  9229. function getProperty(obj, key) {
  9230. if (!obj) {
  9231. return;
  9232. }
  9233. if (typeof key !== "string" || key === "") {
  9234. return "";
  9235. }
  9236. if (key.indexOf(".") !== -1) {
  9237. const keys = key.split(".");
  9238. let firstObj = obj[keys[0]] || {};
  9239. for (let i = 1; i < keys.length; i++) {
  9240. if (firstObj) {
  9241. firstObj = firstObj[keys[i]];
  9242. }
  9243. }
  9244. return firstObj;
  9245. }
  9246. return obj[key];
  9247. }
  9248. function setProperty(obj, key, value) {
  9249. if (!obj) {
  9250. return;
  9251. }
  9252. const inFn = function(_obj, keys, v) {
  9253. if (keys.length === 1) {
  9254. _obj[keys[0]] = v;
  9255. return;
  9256. }
  9257. while (keys.length > 1) {
  9258. const k = keys[0];
  9259. if (!_obj[k] || typeof _obj[k] !== "object") {
  9260. _obj[k] = {};
  9261. }
  9262. keys.shift();
  9263. inFn(_obj[k], keys, v);
  9264. }
  9265. };
  9266. if (typeof key !== "string" || key === "")
  9267. ;
  9268. else if (key.indexOf(".") !== -1) {
  9269. const keys = key.split(".");
  9270. inFn(obj, keys, value);
  9271. } else {
  9272. obj[key] = value;
  9273. }
  9274. }
  9275. function page() {
  9276. const pages2 = getCurrentPages();
  9277. return `/${pages2[pages2.length - 1].route || ""}`;
  9278. }
  9279. function pages() {
  9280. const pages2 = getCurrentPages();
  9281. return pages2;
  9282. }
  9283. function setConfig({
  9284. props: props2 = {},
  9285. config: config2 = {},
  9286. color: color2 = {},
  9287. zIndex: zIndex2 = {}
  9288. }) {
  9289. const {
  9290. deepMerge: deepMerge2
  9291. } = index$1.$u;
  9292. index$1.$u.config = deepMerge2(index$1.$u.config, config2);
  9293. index$1.$u.props = deepMerge2(index$1.$u.props, props2);
  9294. index$1.$u.color = deepMerge2(index$1.$u.color, color2);
  9295. index$1.$u.zIndex = deepMerge2(index$1.$u.zIndex, zIndex2);
  9296. }
  9297. const index = {
  9298. range: range$1,
  9299. getPx,
  9300. sleep,
  9301. os,
  9302. sys,
  9303. random,
  9304. guid,
  9305. $parent,
  9306. addStyle,
  9307. addUnit,
  9308. deepClone,
  9309. deepMerge: deepMerge$1,
  9310. error,
  9311. randomArray,
  9312. timeFormat,
  9313. timeFrom,
  9314. trim,
  9315. queryParams,
  9316. toast,
  9317. type2icon,
  9318. priceFormat,
  9319. getDuration,
  9320. padZero,
  9321. formValidate,
  9322. getProperty,
  9323. setProperty,
  9324. page,
  9325. pages,
  9326. setConfig
  9327. };
  9328. const version = "3";
  9329. {
  9330. console.log(`
  9331. %c uview-plus V${version} %c https://ijry.github.io/uview-plus/
  9332. `, "color: #ffffff; background: #3c9cff; padding:5px 0;", "color: #3c9cff;background: #ffffff; padding:5px 0;");
  9333. }
  9334. const config = {
  9335. v: version,
  9336. version,
  9337. // 主题名称
  9338. type: [
  9339. "primary",
  9340. "success",
  9341. "info",
  9342. "error",
  9343. "warning"
  9344. ],
  9345. // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持
  9346. color: {
  9347. "u-primary": "#2979ff",
  9348. "u-warning": "#ff9900",
  9349. "u-success": "#19be6b",
  9350. "u-error": "#fa3534",
  9351. "u-info": "#909399",
  9352. "u-main-color": "#303133",
  9353. "u-content-color": "#606266",
  9354. "u-tips-color": "#909399",
  9355. "u-light-color": "#c0c4cc"
  9356. },
  9357. // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx
  9358. unit: "px"
  9359. };
  9360. const ActionSheet = {
  9361. // action-sheet组件
  9362. actionSheet: {
  9363. show: false,
  9364. title: "",
  9365. description: "",
  9366. actions: () => [],
  9367. index: "",
  9368. cancelText: "",
  9369. closeOnClickAction: true,
  9370. safeAreaInsetBottom: true,
  9371. openType: "",
  9372. closeOnClickOverlay: true,
  9373. round: 0
  9374. }
  9375. };
  9376. const Album = {
  9377. // album 组件
  9378. album: {
  9379. urls: () => [],
  9380. keyName: "",
  9381. singleSize: 180,
  9382. multipleSize: 70,
  9383. space: 6,
  9384. singleMode: "scaleToFill",
  9385. multipleMode: "aspectFill",
  9386. maxCount: 9,
  9387. previewFullImage: true,
  9388. rowCount: 3,
  9389. showMore: true
  9390. }
  9391. };
  9392. const Alert = {
  9393. // alert警告组件
  9394. alert: {
  9395. title: "",
  9396. type: "warning",
  9397. description: "",
  9398. closable: false,
  9399. showIcon: false,
  9400. effect: "light",
  9401. center: false,
  9402. fontSize: 14
  9403. }
  9404. };
  9405. const Avatar = {
  9406. // avatar 组件
  9407. avatar: {
  9408. src: "",
  9409. shape: "circle",
  9410. size: 40,
  9411. mode: "scaleToFill",
  9412. text: "",
  9413. bgColor: "#c0c4cc",
  9414. color: "#ffffff",
  9415. fontSize: 18,
  9416. icon: "",
  9417. mpAvatar: false,
  9418. randomBgColor: false,
  9419. defaultUrl: "",
  9420. colorIndex: "",
  9421. name: ""
  9422. }
  9423. };
  9424. const AvatarGroup = {
  9425. // avatarGroup 组件
  9426. avatarGroup: {
  9427. urls: () => [],
  9428. maxCount: 5,
  9429. shape: "circle",
  9430. mode: "scaleToFill",
  9431. showMore: true,
  9432. size: 40,
  9433. keyName: "",
  9434. gap: 0.5,
  9435. extraValue: 0
  9436. }
  9437. };
  9438. const Backtop = {
  9439. // backtop组件
  9440. backtop: {
  9441. mode: "circle",
  9442. icon: "arrow-upward",
  9443. text: "",
  9444. duration: 100,
  9445. scrollTop: 0,
  9446. top: 400,
  9447. bottom: 100,
  9448. right: 20,
  9449. zIndex: 9,
  9450. iconStyle: () => ({
  9451. color: "#909399",
  9452. fontSize: "19px"
  9453. })
  9454. }
  9455. };
  9456. const Badge = {
  9457. // 徽标数组件
  9458. badge: {
  9459. isDot: false,
  9460. value: "",
  9461. show: true,
  9462. max: 999,
  9463. type: "error",
  9464. showZero: false,
  9465. bgColor: null,
  9466. color: null,
  9467. shape: "circle",
  9468. numberType: "overflow",
  9469. offset: () => [],
  9470. inverted: false,
  9471. absolute: false
  9472. }
  9473. };
  9474. const Button = {
  9475. // button组件
  9476. button: {
  9477. hairline: false,
  9478. type: "info",
  9479. size: "normal",
  9480. shape: "square",
  9481. plain: false,
  9482. disabled: false,
  9483. loading: false,
  9484. loadingText: "",
  9485. loadingMode: "spinner",
  9486. loadingSize: 15,
  9487. openType: "",
  9488. formType: "",
  9489. appParameter: "",
  9490. hoverStopPropagation: true,
  9491. lang: "en",
  9492. sessionFrom: "",
  9493. sendMessageTitle: "",
  9494. sendMessagePath: "",
  9495. sendMessageImg: "",
  9496. showMessageCard: false,
  9497. dataName: "",
  9498. throttleTime: 0,
  9499. hoverStartTime: 0,
  9500. hoverStayTime: 200,
  9501. text: "",
  9502. icon: "",
  9503. iconColor: "",
  9504. color: ""
  9505. }
  9506. };
  9507. const Calendar = {
  9508. // calendar 组件
  9509. calendar: {
  9510. title: "日期选择",
  9511. showTitle: true,
  9512. showSubtitle: true,
  9513. mode: "single",
  9514. startText: "开始",
  9515. endText: "结束",
  9516. customList: () => [],
  9517. color: "#3c9cff",
  9518. minDate: 0,
  9519. maxDate: 0,
  9520. defaultDate: null,
  9521. maxCount: Number.MAX_SAFE_INTEGER,
  9522. // Infinity
  9523. rowHeight: 56,
  9524. formatter: null,
  9525. showLunar: false,
  9526. showMark: true,
  9527. confirmText: "确定",
  9528. confirmDisabledText: "确定",
  9529. show: false,
  9530. closeOnClickOverlay: false,
  9531. readonly: false,
  9532. showConfirm: true,
  9533. maxRange: Number.MAX_SAFE_INTEGER,
  9534. // Infinity
  9535. rangePrompt: "",
  9536. showRangePrompt: true,
  9537. allowSameDay: false,
  9538. round: 0,
  9539. monthNum: 3
  9540. }
  9541. };
  9542. const CarKeyboard = {
  9543. // 车牌号键盘
  9544. carKeyboard: {
  9545. random: false
  9546. }
  9547. };
  9548. const Cell = {
  9549. // cell组件的props
  9550. cell: {
  9551. customClass: "",
  9552. title: "",
  9553. label: "",
  9554. value: "",
  9555. icon: "",
  9556. disabled: false,
  9557. border: true,
  9558. center: false,
  9559. url: "",
  9560. linkType: "navigateTo",
  9561. clickable: false,
  9562. isLink: false,
  9563. required: false,
  9564. arrowDirection: "",
  9565. iconStyle: {},
  9566. rightIconStyle: {},
  9567. rightIcon: "arrow-right",
  9568. titleStyle: {},
  9569. size: "",
  9570. stop: true,
  9571. name: ""
  9572. }
  9573. };
  9574. const CellGroup = {
  9575. // cell-group组件的props
  9576. cellGroup: {
  9577. title: "",
  9578. border: true,
  9579. customStyle: {}
  9580. }
  9581. };
  9582. const Checkbox = {
  9583. // checkbox组件
  9584. checkbox: {
  9585. name: "",
  9586. shape: "",
  9587. size: "",
  9588. checkbox: false,
  9589. disabled: "",
  9590. activeColor: "",
  9591. inactiveColor: "",
  9592. iconSize: "",
  9593. iconColor: "",
  9594. label: "",
  9595. labelSize: "",
  9596. labelColor: "",
  9597. labelDisabled: ""
  9598. }
  9599. };
  9600. const CheckboxGroup = {
  9601. // checkbox-group组件
  9602. checkboxGroup: {
  9603. name: "",
  9604. value: () => [],
  9605. shape: "square",
  9606. disabled: false,
  9607. activeColor: "#2979ff",
  9608. inactiveColor: "#c8c9cc",
  9609. size: 18,
  9610. placement: "row",
  9611. labelSize: 14,
  9612. labelColor: "#303133",
  9613. labelDisabled: false,
  9614. iconColor: "#ffffff",
  9615. iconSize: 12,
  9616. iconPlacement: "left",
  9617. borderBottom: false
  9618. }
  9619. };
  9620. const CircleProgress = {
  9621. // circleProgress 组件
  9622. circleProgress: {
  9623. percentage: 30
  9624. }
  9625. };
  9626. const Code = {
  9627. // code 组件
  9628. code: {
  9629. seconds: 60,
  9630. startText: "获取验证码",
  9631. changeText: "X秒重新获取",
  9632. endText: "重新获取",
  9633. keepRunning: false,
  9634. uniqueKey: ""
  9635. }
  9636. };
  9637. const CodeInput = {
  9638. // codeInput 组件
  9639. codeInput: {
  9640. adjustPosition: true,
  9641. maxlength: 6,
  9642. dot: false,
  9643. mode: "box",
  9644. hairline: false,
  9645. space: 10,
  9646. value: "",
  9647. focus: false,
  9648. bold: false,
  9649. color: "#606266",
  9650. fontSize: 18,
  9651. size: 35,
  9652. disabledKeyboard: false,
  9653. borderColor: "#c9cacc",
  9654. disabledDot: true
  9655. }
  9656. };
  9657. const Col = {
  9658. // col 组件
  9659. col: {
  9660. span: 12,
  9661. offset: 0,
  9662. justify: "start",
  9663. align: "stretch",
  9664. textAlign: "left"
  9665. }
  9666. };
  9667. const Collapse = {
  9668. // collapse 组件
  9669. collapse: {
  9670. value: null,
  9671. accordion: false,
  9672. border: true
  9673. }
  9674. };
  9675. const CollapseItem = {
  9676. // collapseItem 组件
  9677. collapseItem: {
  9678. title: "",
  9679. value: "",
  9680. label: "",
  9681. disabled: false,
  9682. isLink: true,
  9683. clickable: true,
  9684. border: true,
  9685. align: "left",
  9686. name: "",
  9687. icon: "",
  9688. duration: 300
  9689. }
  9690. };
  9691. const ColumnNotice = {
  9692. // columnNotice 组件
  9693. columnNotice: {
  9694. text: "",
  9695. icon: "volume",
  9696. mode: "",
  9697. color: "#f9ae3d",
  9698. bgColor: "#fdf6ec",
  9699. fontSize: 14,
  9700. speed: 80,
  9701. step: false,
  9702. duration: 1500,
  9703. disableTouch: true
  9704. }
  9705. };
  9706. const CountDown = {
  9707. // u-count-down 计时器组件
  9708. countDown: {
  9709. time: 0,
  9710. format: "HH:mm:ss",
  9711. autoStart: true,
  9712. millisecond: false
  9713. }
  9714. };
  9715. const CountTo = {
  9716. // countTo 组件
  9717. countTo: {
  9718. startVal: 0,
  9719. endVal: 0,
  9720. duration: 2e3,
  9721. autoplay: true,
  9722. decimals: 0,
  9723. useEasing: true,
  9724. decimal: ".",
  9725. color: "#606266",
  9726. fontSize: 22,
  9727. bold: false,
  9728. separator: ""
  9729. }
  9730. };
  9731. const DatetimePicker = {
  9732. // datetimePicker 组件
  9733. datetimePicker: {
  9734. show: false,
  9735. showToolbar: true,
  9736. value: "",
  9737. title: "",
  9738. mode: "datetime",
  9739. maxDate: new Date(new Date().getFullYear() + 10, 0, 1).getTime(),
  9740. minDate: new Date(new Date().getFullYear() - 10, 0, 1).getTime(),
  9741. minHour: 0,
  9742. maxHour: 23,
  9743. minMinute: 0,
  9744. maxMinute: 59,
  9745. filter: null,
  9746. formatter: null,
  9747. loading: false,
  9748. itemHeight: 44,
  9749. cancelText: "取消",
  9750. confirmText: "确认",
  9751. cancelColor: "#909193",
  9752. confirmColor: "#3c9cff",
  9753. visibleItemCount: 5,
  9754. closeOnClickOverlay: false,
  9755. defaultIndex: () => []
  9756. }
  9757. };
  9758. const Divider = {
  9759. // divider组件
  9760. divider: {
  9761. dashed: false,
  9762. hairline: true,
  9763. dot: false,
  9764. textPosition: "center",
  9765. text: "",
  9766. textSize: 14,
  9767. textColor: "#909399",
  9768. lineColor: "#dcdfe6"
  9769. }
  9770. };
  9771. const Empty = {
  9772. // empty组件
  9773. empty: {
  9774. icon: "",
  9775. text: "",
  9776. textColor: "#c0c4cc",
  9777. textSize: 14,
  9778. iconColor: "#c0c4cc",
  9779. iconSize: 90,
  9780. mode: "data",
  9781. width: 160,
  9782. height: 160,
  9783. show: true,
  9784. marginTop: 0
  9785. }
  9786. };
  9787. const Form = {
  9788. // form 组件
  9789. form: {
  9790. model: () => ({}),
  9791. rules: () => ({}),
  9792. errorType: "message",
  9793. borderBottom: true,
  9794. labelPosition: "left",
  9795. labelWidth: 45,
  9796. labelAlign: "left",
  9797. labelStyle: () => ({})
  9798. }
  9799. };
  9800. const GormItem = {
  9801. // formItem 组件
  9802. formItem: {
  9803. label: "",
  9804. prop: "",
  9805. borderBottom: "",
  9806. labelWidth: "",
  9807. rightIcon: "",
  9808. leftIcon: "",
  9809. required: false,
  9810. leftIconStyle: ""
  9811. }
  9812. };
  9813. const Gap = {
  9814. // gap组件
  9815. gap: {
  9816. bgColor: "transparent",
  9817. height: 20,
  9818. marginTop: 0,
  9819. marginBottom: 0,
  9820. customStyle: {}
  9821. }
  9822. };
  9823. const Grid = {
  9824. // grid组件
  9825. grid: {
  9826. col: 3,
  9827. border: false,
  9828. align: "left"
  9829. }
  9830. };
  9831. const GridItem = {
  9832. // grid-item组件
  9833. gridItem: {
  9834. name: null,
  9835. bgColor: "transparent"
  9836. }
  9837. };
  9838. const {
  9839. color: color$3
  9840. } = config;
  9841. const Icon = {
  9842. // icon组件
  9843. icon: {
  9844. name: "",
  9845. color: color$3["u-content-color"],
  9846. size: "16px",
  9847. bold: false,
  9848. index: "",
  9849. hoverClass: "",
  9850. customPrefix: "uicon",
  9851. label: "",
  9852. labelPos: "right",
  9853. labelSize: "15px",
  9854. labelColor: color$3["u-content-color"],
  9855. space: "3px",
  9856. imgMode: "",
  9857. width: "",
  9858. height: "",
  9859. top: 0,
  9860. stop: false
  9861. }
  9862. };
  9863. const Image = {
  9864. // image组件
  9865. image: {
  9866. src: "",
  9867. mode: "aspectFill",
  9868. width: "300",
  9869. height: "225",
  9870. shape: "square",
  9871. radius: 0,
  9872. lazyLoad: true,
  9873. showMenuByLongpress: true,
  9874. loadingIcon: "photo",
  9875. errorIcon: "error-circle",
  9876. showLoading: true,
  9877. showError: true,
  9878. fade: true,
  9879. webp: false,
  9880. duration: 500,
  9881. bgColor: "#f3f4f6"
  9882. }
  9883. };
  9884. const IndexAnchor = {
  9885. // indexAnchor 组件
  9886. indexAnchor: {
  9887. text: "",
  9888. color: "#606266",
  9889. size: 14,
  9890. bgColor: "#dedede",
  9891. height: 32
  9892. }
  9893. };
  9894. const IndexList = {
  9895. // indexList 组件
  9896. indexList: {
  9897. inactiveColor: "#606266",
  9898. activeColor: "#5677fc",
  9899. indexList: () => [],
  9900. sticky: true,
  9901. customNavHeight: 0
  9902. }
  9903. };
  9904. const Input = {
  9905. // index 组件
  9906. input: {
  9907. value: "",
  9908. type: "text",
  9909. fixed: false,
  9910. disabled: false,
  9911. disabledColor: "#f5f7fa",
  9912. clearable: false,
  9913. password: false,
  9914. maxlength: -1,
  9915. placeholder: null,
  9916. placeholderClass: "input-placeholder",
  9917. placeholderStyle: "color: #c0c4cc",
  9918. showWordLimit: false,
  9919. confirmType: "done",
  9920. confirmHold: false,
  9921. holdKeyboard: false,
  9922. focus: false,
  9923. autoBlur: false,
  9924. disableDefaultPadding: false,
  9925. cursor: -1,
  9926. cursorSpacing: 30,
  9927. selectionStart: -1,
  9928. selectionEnd: -1,
  9929. adjustPosition: true,
  9930. inputAlign: "left",
  9931. fontSize: "15px",
  9932. color: "#303133",
  9933. prefixIcon: "",
  9934. prefixIconStyle: "",
  9935. suffixIcon: "",
  9936. suffixIconStyle: "",
  9937. border: "surround",
  9938. readonly: false,
  9939. shape: "square",
  9940. formatter: null
  9941. }
  9942. };
  9943. const Keyboard = {
  9944. // 键盘组件
  9945. keyboard: {
  9946. mode: "number",
  9947. dotDisabled: false,
  9948. tooltip: true,
  9949. showTips: true,
  9950. tips: "",
  9951. showCancel: true,
  9952. showConfirm: true,
  9953. random: false,
  9954. safeAreaInsetBottom: true,
  9955. closeOnClickOverlay: true,
  9956. show: false,
  9957. overlay: true,
  9958. zIndex: 10075,
  9959. cancelText: "取消",
  9960. confirmText: "确定",
  9961. autoChange: false
  9962. }
  9963. };
  9964. const Line = {
  9965. // line组件
  9966. line: {
  9967. color: "#d6d7d9",
  9968. length: "100%",
  9969. direction: "row",
  9970. hairline: true,
  9971. margin: 0,
  9972. dashed: false
  9973. }
  9974. };
  9975. const LineProgress = {
  9976. // lineProgress 组件
  9977. lineProgress: {
  9978. activeColor: "#19be6b",
  9979. inactiveColor: "#ececec",
  9980. percentage: 0,
  9981. showText: true,
  9982. height: 12
  9983. }
  9984. };
  9985. const {
  9986. color: color$2
  9987. } = config;
  9988. const Link = {
  9989. // link超链接组件props参数
  9990. link: {
  9991. color: color$2["u-primary"],
  9992. fontSize: 15,
  9993. underLine: false,
  9994. href: "",
  9995. mpTips: "链接已复制,请在浏览器打开",
  9996. lineColor: "",
  9997. text: ""
  9998. }
  9999. };
  10000. const List = {
  10001. // list 组件
  10002. list: {
  10003. showScrollbar: false,
  10004. lowerThreshold: 50,
  10005. upperThreshold: 0,
  10006. scrollTop: 0,
  10007. offsetAccuracy: 10,
  10008. enableFlex: false,
  10009. pagingEnabled: false,
  10010. scrollable: true,
  10011. scrollIntoView: "",
  10012. scrollWithAnimation: false,
  10013. enableBackToTop: false,
  10014. height: 0,
  10015. width: 0,
  10016. preLoadScreen: 1
  10017. }
  10018. };
  10019. const ListItem = {
  10020. // listItem 组件
  10021. listItem: {
  10022. anchor: ""
  10023. }
  10024. };
  10025. const {
  10026. color: color$1
  10027. } = config;
  10028. const LoadingIcon = {
  10029. // loading-icon加载中图标组件
  10030. loadingIcon: {
  10031. show: true,
  10032. color: color$1["u-tips-color"],
  10033. textColor: color$1["u-tips-color"],
  10034. vertical: false,
  10035. mode: "spinner",
  10036. size: 24,
  10037. textSize: 15,
  10038. text: "",
  10039. timingFunction: "ease-in-out",
  10040. duration: 1200,
  10041. inactiveColor: ""
  10042. }
  10043. };
  10044. const LoadingPage = {
  10045. // loading-page组件
  10046. loadingPage: {
  10047. loadingText: "正在加载",
  10048. image: "",
  10049. loadingMode: "circle",
  10050. loading: false,
  10051. bgColor: "#ffffff",
  10052. color: "#C8C8C8",
  10053. fontSize: 19,
  10054. iconSize: 28,
  10055. loadingColor: "#C8C8C8"
  10056. }
  10057. };
  10058. const Loadmore = {
  10059. // loadmore 组件
  10060. loadmore: {
  10061. status: "loadmore",
  10062. bgColor: "transparent",
  10063. icon: true,
  10064. fontSize: 14,
  10065. iconSize: 17,
  10066. color: "#606266",
  10067. loadingIcon: "spinner",
  10068. loadmoreText: "加载更多",
  10069. loadingText: "正在加载...",
  10070. nomoreText: "没有更多了",
  10071. isDot: false,
  10072. iconColor: "#b7b7b7",
  10073. marginTop: 10,
  10074. marginBottom: 10,
  10075. height: "auto",
  10076. line: false,
  10077. lineColor: "#E6E8EB",
  10078. dashed: false
  10079. }
  10080. };
  10081. const Modal = {
  10082. // modal 组件
  10083. modal: {
  10084. show: false,
  10085. title: "",
  10086. content: "",
  10087. confirmText: "确认",
  10088. cancelText: "取消",
  10089. showConfirmButton: true,
  10090. showCancelButton: false,
  10091. confirmColor: "#2979ff",
  10092. cancelColor: "#606266",
  10093. buttonReverse: false,
  10094. zoom: true,
  10095. asyncClose: false,
  10096. closeOnClickOverlay: false,
  10097. negativeTop: 0,
  10098. width: "650rpx",
  10099. confirmButtonShape: ""
  10100. }
  10101. };
  10102. const color = {
  10103. primary: "#3c9cff",
  10104. info: "#909399",
  10105. default: "#909399",
  10106. warning: "#f9ae3d",
  10107. error: "#f56c6c",
  10108. success: "#5ac725",
  10109. mainColor: "#303133",
  10110. contentColor: "#606266",
  10111. tipsColor: "#909399",
  10112. lightColor: "#c0c4cc",
  10113. borderColor: "#e4e7ed"
  10114. };
  10115. const Navbar = {
  10116. // navbar 组件
  10117. navbar: {
  10118. safeAreaInsetTop: true,
  10119. placeholder: false,
  10120. fixed: true,
  10121. border: false,
  10122. leftIcon: "arrow-left",
  10123. leftText: "",
  10124. rightText: "",
  10125. rightIcon: "",
  10126. title: "",
  10127. bgColor: "#ffffff",
  10128. titleWidth: "400rpx",
  10129. height: "44px",
  10130. leftIconSize: 20,
  10131. leftIconColor: color.mainColor,
  10132. autoBack: false,
  10133. titleStyle: ""
  10134. }
  10135. };
  10136. const NoNetwork = {
  10137. // noNetwork
  10138. noNetwork: {
  10139. tips: "哎呀,网络信号丢失",
  10140. zIndex: "",
  10141. image: "data:image/png;base64,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"
  10142. }
  10143. };
  10144. const NoticeBar = {
  10145. // noticeBar
  10146. noticeBar: {
  10147. text: () => [],
  10148. direction: "row",
  10149. step: false,
  10150. icon: "volume",
  10151. mode: "",
  10152. color: "#f9ae3d",
  10153. bgColor: "#fdf6ec",
  10154. speed: 80,
  10155. fontSize: 14,
  10156. duration: 2e3,
  10157. disableTouch: true,
  10158. url: "",
  10159. linkType: "navigateTo"
  10160. }
  10161. };
  10162. const Notify = {
  10163. // notify组件
  10164. notify: {
  10165. top: 0,
  10166. type: "primary",
  10167. color: "#ffffff",
  10168. bgColor: "",
  10169. message: "",
  10170. duration: 3e3,
  10171. fontSize: 15,
  10172. safeAreaInsetTop: false
  10173. }
  10174. };
  10175. const NumberBox = {
  10176. // 步进器组件
  10177. numberBox: {
  10178. name: "",
  10179. value: 0,
  10180. min: 1,
  10181. max: Number.MAX_SAFE_INTEGER,
  10182. step: 1,
  10183. integer: false,
  10184. disabled: false,
  10185. disabledInput: false,
  10186. asyncChange: false,
  10187. inputWidth: 35,
  10188. showMinus: true,
  10189. showPlus: true,
  10190. decimalLength: null,
  10191. longPress: true,
  10192. color: "#323233",
  10193. buttonSize: 30,
  10194. bgColor: "#EBECEE",
  10195. cursorSpacing: 100,
  10196. disableMinus: false,
  10197. disablePlus: false,
  10198. iconStyle: ""
  10199. }
  10200. };
  10201. const NumberKeyboard = {
  10202. // 数字键盘
  10203. numberKeyboard: {
  10204. mode: "number",
  10205. dotDisabled: false,
  10206. random: false
  10207. }
  10208. };
  10209. const Overlay = {
  10210. // overlay组件
  10211. overlay: {
  10212. show: false,
  10213. zIndex: 10070,
  10214. duration: 300,
  10215. opacity: 0.5
  10216. }
  10217. };
  10218. const Parse = {
  10219. // parse
  10220. parse: {
  10221. copyLink: true,
  10222. errorImg: "",
  10223. lazyLoad: false,
  10224. loadingImg: "",
  10225. pauseVideo: true,
  10226. previewImg: true,
  10227. setTitle: true,
  10228. showImgMenu: true
  10229. }
  10230. };
  10231. const Picker = {
  10232. // picker
  10233. picker: {
  10234. show: false,
  10235. showToolbar: true,
  10236. title: "",
  10237. columns: () => [],
  10238. loading: false,
  10239. itemHeight: 44,
  10240. cancelText: "取消",
  10241. confirmText: "确定",
  10242. cancelColor: "#909193",
  10243. confirmColor: "#3c9cff",
  10244. visibleItemCount: 5,
  10245. keyName: "text",
  10246. closeOnClickOverlay: false,
  10247. defaultIndex: () => [],
  10248. immediateChange: false
  10249. }
  10250. };
  10251. const Popup = {
  10252. // popup组件
  10253. popup: {
  10254. show: false,
  10255. overlay: true,
  10256. mode: "bottom",
  10257. duration: 300,
  10258. closeable: false,
  10259. overlayStyle: () => {
  10260. },
  10261. closeOnClickOverlay: true,
  10262. zIndex: 10075,
  10263. safeAreaInsetBottom: true,
  10264. safeAreaInsetTop: false,
  10265. closeIconPos: "top-right",
  10266. round: 0,
  10267. zoom: true,
  10268. bgColor: "",
  10269. overlayOpacity: 0.5
  10270. }
  10271. };
  10272. const Radio = {
  10273. // radio组件
  10274. radio: {
  10275. name: "",
  10276. shape: "",
  10277. disabled: "",
  10278. labelDisabled: "",
  10279. activeColor: "",
  10280. inactiveColor: "",
  10281. iconSize: "",
  10282. labelSize: "",
  10283. label: "",
  10284. labelColor: "",
  10285. size: "",
  10286. iconColor: "",
  10287. placement: ""
  10288. }
  10289. };
  10290. const RadioGroup = {
  10291. // radio-group组件
  10292. radioGroup: {
  10293. value: "",
  10294. disabled: false,
  10295. shape: "circle",
  10296. activeColor: "#2979ff",
  10297. inactiveColor: "#c8c9cc",
  10298. name: "",
  10299. size: 18,
  10300. placement: "row",
  10301. label: "",
  10302. labelColor: "#303133",
  10303. labelSize: 14,
  10304. labelDisabled: false,
  10305. iconColor: "#ffffff",
  10306. iconSize: 12,
  10307. borderBottom: false,
  10308. iconPlacement: "left"
  10309. }
  10310. };
  10311. const Rate = {
  10312. // rate组件
  10313. rate: {
  10314. value: 1,
  10315. count: 5,
  10316. disabled: false,
  10317. size: 18,
  10318. inactiveColor: "#b2b2b2",
  10319. activeColor: "#FA3534",
  10320. gutter: 4,
  10321. minCount: 1,
  10322. allowHalf: false,
  10323. activeIcon: "star-fill",
  10324. inactiveIcon: "star",
  10325. touchable: true
  10326. }
  10327. };
  10328. const ReadMore = {
  10329. // readMore
  10330. readMore: {
  10331. showHeight: 400,
  10332. toggle: false,
  10333. closeText: "展开阅读全文",
  10334. openText: "收起",
  10335. color: "#2979ff",
  10336. fontSize: 14,
  10337. textIndent: "2em",
  10338. name: ""
  10339. }
  10340. };
  10341. const Row = {
  10342. // row
  10343. row: {
  10344. gutter: 0,
  10345. justify: "start",
  10346. align: "center"
  10347. }
  10348. };
  10349. const RowNotice = {
  10350. // rowNotice
  10351. rowNotice: {
  10352. text: "",
  10353. icon: "volume",
  10354. mode: "",
  10355. color: "#f9ae3d",
  10356. bgColor: "#fdf6ec",
  10357. fontSize: 14,
  10358. speed: 80
  10359. }
  10360. };
  10361. const ScrollList = {
  10362. // scrollList
  10363. scrollList: {
  10364. indicatorWidth: 50,
  10365. indicatorBarWidth: 20,
  10366. indicator: true,
  10367. indicatorColor: "#f2f2f2",
  10368. indicatorActiveColor: "#3c9cff",
  10369. indicatorStyle: ""
  10370. }
  10371. };
  10372. const Search = {
  10373. // search
  10374. search: {
  10375. shape: "round",
  10376. bgColor: "#f2f2f2",
  10377. placeholder: "请输入关键字",
  10378. clearabled: true,
  10379. focus: false,
  10380. showAction: true,
  10381. actionStyle: () => ({}),
  10382. actionText: "搜索",
  10383. inputAlign: "left",
  10384. inputStyle: () => ({}),
  10385. disabled: false,
  10386. borderColor: "transparent",
  10387. searchIconColor: "#909399",
  10388. searchIconSize: 22,
  10389. color: "#606266",
  10390. placeholderColor: "#909399",
  10391. searchIcon: "search",
  10392. margin: "0",
  10393. animation: false,
  10394. value: "",
  10395. maxlength: "-1",
  10396. height: 32,
  10397. label: null
  10398. }
  10399. };
  10400. const Section = {
  10401. // u-section组件
  10402. section: {
  10403. title: "",
  10404. subTitle: "更多",
  10405. right: true,
  10406. fontSize: 15,
  10407. bold: true,
  10408. color: "#303133",
  10409. subColor: "#909399",
  10410. showLine: true,
  10411. lineColor: "",
  10412. arrow: true
  10413. }
  10414. };
  10415. const Skeleton = {
  10416. // skeleton
  10417. skeleton: {
  10418. loading: true,
  10419. animate: true,
  10420. rows: 0,
  10421. rowsWidth: "100%",
  10422. rowsHeight: 18,
  10423. title: true,
  10424. titleWidth: "50%",
  10425. titleHeight: 18,
  10426. avatar: false,
  10427. avatarSize: 32,
  10428. avatarShape: "circle"
  10429. }
  10430. };
  10431. const Slider = {
  10432. // slider组件
  10433. slider: {
  10434. value: 0,
  10435. blockSize: 18,
  10436. min: 0,
  10437. max: 100,
  10438. step: 1,
  10439. activeColor: "#2979ff",
  10440. inactiveColor: "#c0c4cc",
  10441. blockColor: "#ffffff",
  10442. showValue: false,
  10443. disabled: false,
  10444. blockStyle: () => {
  10445. }
  10446. }
  10447. };
  10448. const StatusBar = {
  10449. // statusBar
  10450. statusBar: {
  10451. bgColor: "transparent"
  10452. }
  10453. };
  10454. const Steps = {
  10455. // steps组件
  10456. steps: {
  10457. direction: "row",
  10458. current: 0,
  10459. activeColor: "#3c9cff",
  10460. inactiveColor: "#969799",
  10461. activeIcon: "",
  10462. inactiveIcon: "",
  10463. dot: false
  10464. }
  10465. };
  10466. const StepsItem = {
  10467. // steps-item组件
  10468. stepsItem: {
  10469. title: "",
  10470. desc: "",
  10471. iconSize: 17,
  10472. error: false
  10473. }
  10474. };
  10475. const Sticky = {
  10476. // sticky组件
  10477. sticky: {
  10478. offsetTop: 0,
  10479. customNavHeight: 0,
  10480. disabled: false,
  10481. bgColor: "transparent",
  10482. zIndex: "",
  10483. index: ""
  10484. }
  10485. };
  10486. const Subsection = {
  10487. // subsection组件
  10488. subsection: {
  10489. list: [],
  10490. current: 0,
  10491. activeColor: "#3c9cff",
  10492. inactiveColor: "#303133",
  10493. mode: "button",
  10494. fontSize: 12,
  10495. bold: true,
  10496. bgColor: "#eeeeef",
  10497. keyName: "name"
  10498. }
  10499. };
  10500. const SwipeAction = {
  10501. // swipe-action组件
  10502. swipeAction: {
  10503. autoClose: true
  10504. }
  10505. };
  10506. const SwipeActionItem = {
  10507. // swipeActionItem 组件
  10508. swipeActionItem: {
  10509. show: false,
  10510. name: "",
  10511. disabled: false,
  10512. threshold: 20,
  10513. autoClose: true,
  10514. options: [],
  10515. duration: 300
  10516. }
  10517. };
  10518. const Swiper = {
  10519. // swiper 组件
  10520. swiper: {
  10521. list: () => [],
  10522. indicator: false,
  10523. indicatorActiveColor: "#FFFFFF",
  10524. indicatorInactiveColor: "rgba(255, 255, 255, 0.35)",
  10525. indicatorStyle: "",
  10526. indicatorMode: "line",
  10527. autoplay: true,
  10528. current: 0,
  10529. currentItemId: "",
  10530. interval: 3e3,
  10531. duration: 300,
  10532. circular: false,
  10533. previousMargin: 0,
  10534. nextMargin: 0,
  10535. acceleration: false,
  10536. displayMultipleItems: 1,
  10537. easingFunction: "default",
  10538. keyName: "url",
  10539. imgMode: "aspectFill",
  10540. height: 130,
  10541. bgColor: "#f3f4f6",
  10542. radius: 4,
  10543. loading: false,
  10544. showTitle: false
  10545. }
  10546. };
  10547. const SwipterIndicator = {
  10548. // swiperIndicator 组件
  10549. swiperIndicator: {
  10550. length: 0,
  10551. current: 0,
  10552. indicatorActiveColor: "",
  10553. indicatorInactiveColor: "",
  10554. indicatorMode: "line"
  10555. }
  10556. };
  10557. const Switch = {
  10558. // switch
  10559. switch: {
  10560. loading: false,
  10561. disabled: false,
  10562. size: 25,
  10563. activeColor: "#2979ff",
  10564. inactiveColor: "#ffffff",
  10565. value: false,
  10566. activeValue: true,
  10567. inactiveValue: false,
  10568. asyncChange: false,
  10569. space: 0
  10570. }
  10571. };
  10572. const Tabbar = {
  10573. // tabbar
  10574. tabbar: {
  10575. value: null,
  10576. safeAreaInsetBottom: true,
  10577. border: true,
  10578. zIndex: 1,
  10579. activeColor: "#1989fa",
  10580. inactiveColor: "#7d7e80",
  10581. fixed: true,
  10582. placeholder: true
  10583. }
  10584. };
  10585. const TabbarItem = {
  10586. //
  10587. tabbarItem: {
  10588. name: null,
  10589. icon: "",
  10590. badge: null,
  10591. dot: false,
  10592. text: "",
  10593. badgeStyle: "top: 6px;right:2px;"
  10594. }
  10595. };
  10596. const Tabs = {
  10597. //
  10598. tabs: {
  10599. duration: 300,
  10600. list: () => [],
  10601. lineColor: "#3c9cff",
  10602. activeStyle: () => ({
  10603. color: "#303133"
  10604. }),
  10605. inactiveStyle: () => ({
  10606. color: "#606266"
  10607. }),
  10608. lineWidth: 20,
  10609. lineHeight: 3,
  10610. lineBgSize: "cover",
  10611. itemStyle: () => ({
  10612. height: "44px"
  10613. }),
  10614. scrollable: true,
  10615. current: 0,
  10616. keyName: "name"
  10617. }
  10618. };
  10619. const Tag = {
  10620. // tag 组件
  10621. tag: {
  10622. type: "primary",
  10623. disabled: false,
  10624. size: "medium",
  10625. shape: "square",
  10626. text: "",
  10627. bgColor: "",
  10628. color: "",
  10629. borderColor: "",
  10630. closeColor: "#C6C7CB",
  10631. name: "",
  10632. plainFill: false,
  10633. plain: false,
  10634. closable: false,
  10635. show: true,
  10636. icon: ""
  10637. }
  10638. };
  10639. const Text = {
  10640. // text 组件
  10641. text: {
  10642. type: "",
  10643. show: true,
  10644. text: "",
  10645. prefixIcon: "",
  10646. suffixIcon: "",
  10647. mode: "",
  10648. href: "",
  10649. format: "",
  10650. call: false,
  10651. openType: "",
  10652. bold: false,
  10653. block: false,
  10654. lines: "",
  10655. color: "#303133",
  10656. size: 15,
  10657. iconStyle: () => ({
  10658. fontSize: "15px"
  10659. }),
  10660. decoration: "none",
  10661. margin: 0,
  10662. lineHeight: "",
  10663. align: "left",
  10664. wordWrap: "normal"
  10665. }
  10666. };
  10667. const Textarea = {
  10668. // textarea 组件
  10669. textarea: {
  10670. value: "",
  10671. placeholder: "",
  10672. placeholderClass: "textarea-placeholder",
  10673. placeholderStyle: "color: #c0c4cc",
  10674. height: 70,
  10675. confirmType: "done",
  10676. disabled: false,
  10677. count: false,
  10678. focus: false,
  10679. autoHeight: false,
  10680. fixed: false,
  10681. cursorSpacing: 0,
  10682. cursor: "",
  10683. showConfirmBar: true,
  10684. selectionStart: -1,
  10685. selectionEnd: -1,
  10686. adjustPosition: true,
  10687. disableDefaultPadding: false,
  10688. holdKeyboard: false,
  10689. maxlength: 140,
  10690. border: "surround",
  10691. formatter: null
  10692. }
  10693. };
  10694. const Toast = {
  10695. // toast组件
  10696. toast: {
  10697. zIndex: 10090,
  10698. loading: false,
  10699. text: "",
  10700. icon: "",
  10701. type: "",
  10702. loadingMode: "",
  10703. show: "",
  10704. overlay: false,
  10705. position: "center",
  10706. params: () => {
  10707. },
  10708. duration: 2e3,
  10709. isTab: false,
  10710. url: "",
  10711. callback: null,
  10712. back: false
  10713. }
  10714. };
  10715. const Toolbar = {
  10716. // toolbar 组件
  10717. toolbar: {
  10718. show: true,
  10719. cancelText: "取消",
  10720. confirmText: "确认",
  10721. cancelColor: "#909193",
  10722. confirmColor: "#3c9cff",
  10723. title: ""
  10724. }
  10725. };
  10726. const Tooltip = {
  10727. // tooltip 组件
  10728. tooltip: {
  10729. text: "",
  10730. copyText: "",
  10731. size: 14,
  10732. color: "#606266",
  10733. bgColor: "transparent",
  10734. direction: "top",
  10735. zIndex: 10071,
  10736. showCopy: true,
  10737. buttons: () => [],
  10738. overlay: true,
  10739. showToast: true
  10740. }
  10741. };
  10742. const Transition = {
  10743. // transition动画组件的props
  10744. transition: {
  10745. show: false,
  10746. mode: "fade",
  10747. duration: "300",
  10748. timingFunction: "ease-out"
  10749. }
  10750. };
  10751. const Upload = {
  10752. // upload组件
  10753. upload: {
  10754. accept: "image",
  10755. capture: () => ["album", "camera"],
  10756. compressed: true,
  10757. camera: "back",
  10758. maxDuration: 60,
  10759. uploadIcon: "camera-fill",
  10760. uploadIconColor: "#D3D4D6",
  10761. useBeforeRead: false,
  10762. previewFullImage: true,
  10763. maxCount: 52,
  10764. disabled: false,
  10765. imageMode: "aspectFill",
  10766. name: "",
  10767. sizeType: () => ["original", "compressed"],
  10768. multiple: false,
  10769. deletable: true,
  10770. maxSize: Number.MAX_VALUE,
  10771. fileList: () => [],
  10772. uploadText: "",
  10773. width: 80,
  10774. height: 80,
  10775. previewImage: true
  10776. }
  10777. };
  10778. const defprops = {
  10779. ...ActionSheet,
  10780. ...Album,
  10781. ...Alert,
  10782. ...Avatar,
  10783. ...AvatarGroup,
  10784. ...Backtop,
  10785. ...Badge,
  10786. ...Button,
  10787. ...Calendar,
  10788. ...CarKeyboard,
  10789. ...Cell,
  10790. ...CellGroup,
  10791. ...Checkbox,
  10792. ...CheckboxGroup,
  10793. ...CircleProgress,
  10794. ...Code,
  10795. ...CodeInput,
  10796. ...Col,
  10797. ...Collapse,
  10798. ...CollapseItem,
  10799. ...ColumnNotice,
  10800. ...CountDown,
  10801. ...CountTo,
  10802. ...DatetimePicker,
  10803. ...Divider,
  10804. ...Empty,
  10805. ...Form,
  10806. ...GormItem,
  10807. ...Gap,
  10808. ...Grid,
  10809. ...GridItem,
  10810. ...Icon,
  10811. ...Image,
  10812. ...IndexAnchor,
  10813. ...IndexList,
  10814. ...Input,
  10815. ...Keyboard,
  10816. ...Line,
  10817. ...LineProgress,
  10818. ...Link,
  10819. ...List,
  10820. ...ListItem,
  10821. ...LoadingIcon,
  10822. ...LoadingPage,
  10823. ...Loadmore,
  10824. ...Modal,
  10825. ...Navbar,
  10826. ...NoNetwork,
  10827. ...NoticeBar,
  10828. ...Notify,
  10829. ...NumberBox,
  10830. ...NumberKeyboard,
  10831. ...Overlay,
  10832. ...Parse,
  10833. ...Picker,
  10834. ...Popup,
  10835. ...Radio,
  10836. ...RadioGroup,
  10837. ...Rate,
  10838. ...ReadMore,
  10839. ...Row,
  10840. ...RowNotice,
  10841. ...ScrollList,
  10842. ...Search,
  10843. ...Section,
  10844. ...Skeleton,
  10845. ...Slider,
  10846. ...StatusBar,
  10847. ...Steps,
  10848. ...StepsItem,
  10849. ...Sticky,
  10850. ...Subsection,
  10851. ...SwipeAction,
  10852. ...SwipeActionItem,
  10853. ...Swiper,
  10854. ...SwipterIndicator,
  10855. ...Switch,
  10856. ...Tabbar,
  10857. ...TabbarItem,
  10858. ...Tabs,
  10859. ...Tag,
  10860. ...Text,
  10861. ...Textarea,
  10862. ...Toast,
  10863. ...Toolbar,
  10864. ...Tooltip,
  10865. ...Transition,
  10866. ...Upload
  10867. };
  10868. const zIndex = {
  10869. toast: 10090,
  10870. noNetwork: 10080,
  10871. // popup包含popup,actionsheet,keyboard,picker的值
  10872. popup: 10075,
  10873. mask: 10070,
  10874. navbar: 980,
  10875. topTips: 975,
  10876. sticky: 970,
  10877. indexListSticky: 965
  10878. };
  10879. let platform = "none";
  10880. platform = "vue3";
  10881. platform = "weixin";
  10882. platform = "mp";
  10883. const platform$1 = platform;
  10884. const $u = {
  10885. route,
  10886. date: index.timeFormat,
  10887. // 另名date
  10888. colorGradient: colorGradient$1.colorGradient,
  10889. hexToRgb: colorGradient$1.hexToRgb,
  10890. rgbToHex: colorGradient$1.rgbToHex,
  10891. colorToRgba: colorGradient$1.colorToRgba,
  10892. test,
  10893. type: ["primary", "success", "error", "warning", "info"],
  10894. http: new Request(),
  10895. config,
  10896. // uView配置信息相关,比如版本号
  10897. zIndex,
  10898. debounce,
  10899. throttle,
  10900. mixin,
  10901. mpMixin,
  10902. props: defprops,
  10903. ...index,
  10904. color,
  10905. platform: platform$1
  10906. };
  10907. index$1.$u = $u;
  10908. const install = (Vue) => {
  10909. Vue.config.globalProperties.$u = $u;
  10910. Vue.config.globalProperties.$nextTick = (cb) => {
  10911. cb();
  10912. };
  10913. Vue.mixin(mixin);
  10914. };
  10915. const uviewPlus = {
  10916. install
  10917. };
  10918. const props$w = {
  10919. props: {
  10920. // checkbox的名称
  10921. name: {
  10922. type: [String, Number, Boolean],
  10923. default: defprops.checkbox.name
  10924. },
  10925. // 形状,square为方形,circle为圆型
  10926. shape: {
  10927. type: String,
  10928. default: defprops.checkbox.shape
  10929. },
  10930. // 整体的大小
  10931. size: {
  10932. type: [String, Number],
  10933. default: defprops.checkbox.size
  10934. },
  10935. // 是否默认选中
  10936. checked: {
  10937. type: Boolean,
  10938. default: defprops.checkbox.checked
  10939. },
  10940. // 是否禁用
  10941. disabled: {
  10942. type: [String, Boolean],
  10943. default: defprops.checkbox.disabled
  10944. },
  10945. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  10946. activeColor: {
  10947. type: String,
  10948. default: defprops.checkbox.activeColor
  10949. },
  10950. // 未选中的颜色
  10951. inactiveColor: {
  10952. type: String,
  10953. default: defprops.checkbox.inactiveColor
  10954. },
  10955. // 图标的大小,单位px
  10956. iconSize: {
  10957. type: [String, Number],
  10958. default: defprops.checkbox.iconSize
  10959. },
  10960. // 图标颜色
  10961. iconColor: {
  10962. type: String,
  10963. default: defprops.checkbox.iconColor
  10964. },
  10965. // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
  10966. label: {
  10967. type: [String, Number],
  10968. default: defprops.checkbox.label
  10969. },
  10970. // label的字体大小,px单位
  10971. labelSize: {
  10972. type: [String, Number],
  10973. default: defprops.checkbox.labelSize
  10974. },
  10975. // label的颜色
  10976. labelColor: {
  10977. type: String,
  10978. default: defprops.checkbox.labelColor
  10979. },
  10980. // 是否禁止点击提示语选中复选框
  10981. labelDisabled: {
  10982. type: [String, Boolean],
  10983. default: defprops.checkbox.labelDisabled
  10984. }
  10985. }
  10986. };
  10987. const props$v = {
  10988. props: {
  10989. // 标识符
  10990. name: {
  10991. type: String,
  10992. default: defprops.checkboxGroup.name
  10993. },
  10994. // 绑定的值
  10995. modelValue: {
  10996. type: Array,
  10997. default: defprops.checkboxGroup.value
  10998. },
  10999. // 形状,circle-圆形,square-方形
  11000. shape: {
  11001. type: String,
  11002. default: defprops.checkboxGroup.shape
  11003. },
  11004. // 是否禁用全部checkbox
  11005. disabled: {
  11006. type: Boolean,
  11007. default: defprops.checkboxGroup.disabled
  11008. },
  11009. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  11010. activeColor: {
  11011. type: String,
  11012. default: defprops.checkboxGroup.activeColor
  11013. },
  11014. // 未选中的颜色
  11015. inactiveColor: {
  11016. type: String,
  11017. default: defprops.checkboxGroup.inactiveColor
  11018. },
  11019. // 整个组件的尺寸,默认px
  11020. size: {
  11021. type: [String, Number],
  11022. default: defprops.checkboxGroup.size
  11023. },
  11024. // 布局方式,row-横向,column-纵向
  11025. placement: {
  11026. type: String,
  11027. default: defprops.checkboxGroup.placement
  11028. },
  11029. // label的字体大小,px单位
  11030. labelSize: {
  11031. type: [String, Number],
  11032. default: defprops.checkboxGroup.labelSize
  11033. },
  11034. // label的字体颜色
  11035. labelColor: {
  11036. type: [String],
  11037. default: defprops.checkboxGroup.labelColor
  11038. },
  11039. // 是否禁止点击文本操作
  11040. labelDisabled: {
  11041. type: Boolean,
  11042. default: defprops.checkboxGroup.labelDisabled
  11043. },
  11044. // 图标颜色
  11045. iconColor: {
  11046. type: String,
  11047. default: defprops.checkboxGroup.iconColor
  11048. },
  11049. // 图标的大小,单位px
  11050. iconSize: {
  11051. type: [String, Number],
  11052. default: defprops.checkboxGroup.iconSize
  11053. },
  11054. // 勾选图标的对齐方式,left-左边,right-右边
  11055. iconPlacement: {
  11056. type: String,
  11057. default: defprops.checkboxGroup.iconPlacement
  11058. },
  11059. // 竖向配列时,是否显示下划线
  11060. borderBottom: {
  11061. type: Boolean,
  11062. default: defprops.checkboxGroup.borderBottom
  11063. }
  11064. }
  11065. };
  11066. const props$u = {
  11067. props: {
  11068. // item标签的名称,作为与u-tabbar的value参数匹配的标识符
  11069. name: {
  11070. type: [String, Number, null],
  11071. default: defprops.tabbarItem.name
  11072. },
  11073. // uView内置图标或者绝对路径的图片
  11074. icon: {
  11075. icon: String,
  11076. default: defprops.tabbarItem.icon
  11077. },
  11078. // 右上角的角标提示信息
  11079. badge: {
  11080. type: [String, Number, null],
  11081. default: defprops.tabbarItem.badge
  11082. },
  11083. // 是否显示圆点,将会覆盖badge参数
  11084. dot: {
  11085. type: Boolean,
  11086. default: defprops.tabbarItem.dot
  11087. },
  11088. // 描述文本
  11089. text: {
  11090. type: String,
  11091. default: defprops.tabbarItem.text
  11092. },
  11093. // 控制徽标的位置,对象或者字符串形式,可以设置top和right属性
  11094. badgeStyle: {
  11095. type: [Object, String],
  11096. default: defprops.tabbarItem.badgeStyle
  11097. }
  11098. }
  11099. };
  11100. const props$t = {
  11101. props: {
  11102. // 当前匹配项的name
  11103. value: {
  11104. type: [String, Number, null],
  11105. default: defprops.tabbar.value
  11106. },
  11107. // 是否为iPhoneX留出底部安全距离
  11108. safeAreaInsetBottom: {
  11109. type: Boolean,
  11110. default: defprops.tabbar.safeAreaInsetBottom
  11111. },
  11112. // 是否显示上方边框
  11113. border: {
  11114. type: Boolean,
  11115. default: defprops.tabbar.border
  11116. },
  11117. // 元素层级z-index
  11118. zIndex: {
  11119. type: [String, Number],
  11120. default: defprops.tabbar.zIndex
  11121. },
  11122. // 选中标签的颜色
  11123. activeColor: {
  11124. type: String,
  11125. default: defprops.tabbar.activeColor
  11126. },
  11127. // 未选中标签的颜色
  11128. inactiveColor: {
  11129. type: String,
  11130. default: defprops.tabbar.inactiveColor
  11131. },
  11132. // 是否固定在底部
  11133. fixed: {
  11134. type: Boolean,
  11135. default: defprops.tabbar.fixed
  11136. },
  11137. // fixed定位固定在底部时,是否生成一个等高元素防止塌陷
  11138. placeholder: {
  11139. type: Boolean,
  11140. default: defprops.tabbar.placeholder
  11141. }
  11142. }
  11143. };
  11144. const props$s = {
  11145. props: {
  11146. // 是否开启顶部安全区适配
  11147. safeAreaInsetTop: {
  11148. type: Boolean,
  11149. default: defprops.navbar.safeAreaInsetTop
  11150. },
  11151. // 固定在顶部时,是否生成一个等高元素,以防止塌陷
  11152. placeholder: {
  11153. type: Boolean,
  11154. default: defprops.navbar.placeholder
  11155. },
  11156. // 是否固定在顶部
  11157. fixed: {
  11158. type: Boolean,
  11159. default: defprops.navbar.fixed
  11160. },
  11161. // 是否显示下边框
  11162. border: {
  11163. type: Boolean,
  11164. default: defprops.navbar.border
  11165. },
  11166. // 左边的图标
  11167. leftIcon: {
  11168. type: String,
  11169. default: defprops.navbar.leftIcon
  11170. },
  11171. // 左边的提示文字
  11172. leftText: {
  11173. type: String,
  11174. default: defprops.navbar.leftText
  11175. },
  11176. // 左右的提示文字
  11177. rightText: {
  11178. type: String,
  11179. default: defprops.navbar.rightText
  11180. },
  11181. // 右边的图标
  11182. rightIcon: {
  11183. type: String,
  11184. default: defprops.navbar.rightIcon
  11185. },
  11186. // 标题
  11187. title: {
  11188. type: [String, Number],
  11189. default: defprops.navbar.title
  11190. },
  11191. // 背景颜色
  11192. bgColor: {
  11193. type: String,
  11194. default: defprops.navbar.bgColor
  11195. },
  11196. // 标题的宽度
  11197. titleWidth: {
  11198. type: [String, Number],
  11199. default: defprops.navbar.titleWidth
  11200. },
  11201. // 导航栏高度
  11202. height: {
  11203. type: [String, Number],
  11204. default: defprops.navbar.height
  11205. },
  11206. // 左侧返回图标的大小
  11207. leftIconSize: {
  11208. type: [String, Number],
  11209. default: defprops.navbar.leftIconSize
  11210. },
  11211. // 左侧返回图标的颜色
  11212. leftIconColor: {
  11213. type: String,
  11214. default: defprops.navbar.leftIconColor
  11215. },
  11216. // 点击左侧区域(返回图标),是否自动返回上一页
  11217. autoBack: {
  11218. type: Boolean,
  11219. default: defprops.navbar.autoBack
  11220. },
  11221. // 标题的样式,对象或字符串
  11222. titleStyle: {
  11223. type: [String, Object],
  11224. default: defprops.navbar.titleStyle
  11225. }
  11226. }
  11227. };
  11228. const icons = {
  11229. "uicon-level": "",
  11230. "uicon-column-line": "",
  11231. "uicon-checkbox-mark": "",
  11232. "uicon-folder": "",
  11233. "uicon-movie": "",
  11234. "uicon-star-fill": "",
  11235. "uicon-star": "",
  11236. "uicon-phone-fill": "",
  11237. "uicon-phone": "",
  11238. "uicon-apple-fill": "",
  11239. "uicon-chrome-circle-fill": "",
  11240. "uicon-backspace": "",
  11241. "uicon-attach": "",
  11242. "uicon-cut": "",
  11243. "uicon-empty-car": "",
  11244. "uicon-empty-coupon": "",
  11245. "uicon-empty-address": "",
  11246. "uicon-empty-favor": "",
  11247. "uicon-empty-permission": "",
  11248. "uicon-empty-news": "",
  11249. "uicon-empty-search": "",
  11250. "uicon-github-circle-fill": "",
  11251. "uicon-rmb": "",
  11252. "uicon-person-delete-fill": "",
  11253. "uicon-reload": "",
  11254. "uicon-order": "",
  11255. "uicon-server-man": "",
  11256. "uicon-search": "",
  11257. "uicon-fingerprint": "",
  11258. "uicon-more-dot-fill": "",
  11259. "uicon-scan": "",
  11260. "uicon-share-square": "",
  11261. "uicon-map": "",
  11262. "uicon-map-fill": "",
  11263. "uicon-tags": "",
  11264. "uicon-tags-fill": "",
  11265. "uicon-bookmark-fill": "",
  11266. "uicon-bookmark": "",
  11267. "uicon-eye": "",
  11268. "uicon-eye-fill": "",
  11269. "uicon-mic": "",
  11270. "uicon-mic-off": "",
  11271. "uicon-calendar": "",
  11272. "uicon-calendar-fill": "",
  11273. "uicon-trash": "",
  11274. "uicon-trash-fill": "",
  11275. "uicon-play-left": "",
  11276. "uicon-play-right": "",
  11277. "uicon-minus": "",
  11278. "uicon-plus": "",
  11279. "uicon-info": "",
  11280. "uicon-info-circle": "",
  11281. "uicon-info-circle-fill": "",
  11282. "uicon-question": "",
  11283. "uicon-error": "",
  11284. "uicon-close": "",
  11285. "uicon-checkmark": "",
  11286. "uicon-android-circle-fill": "",
  11287. "uicon-android-fill": "",
  11288. "uicon-ie": "",
  11289. "uicon-IE-circle-fill": "",
  11290. "uicon-google": "",
  11291. "uicon-google-circle-fill": "",
  11292. "uicon-setting-fill": "",
  11293. "uicon-setting": "",
  11294. "uicon-minus-square-fill": "",
  11295. "uicon-plus-square-fill": "",
  11296. "uicon-heart": "",
  11297. "uicon-heart-fill": "",
  11298. "uicon-camera": "",
  11299. "uicon-camera-fill": "",
  11300. "uicon-more-circle": "",
  11301. "uicon-more-circle-fill": "",
  11302. "uicon-chat": "",
  11303. "uicon-chat-fill": "",
  11304. "uicon-bag-fill": "",
  11305. "uicon-bag": "",
  11306. "uicon-error-circle-fill": "",
  11307. "uicon-error-circle": "",
  11308. "uicon-close-circle": "",
  11309. "uicon-close-circle-fill": "",
  11310. "uicon-checkmark-circle": "",
  11311. "uicon-checkmark-circle-fill": "",
  11312. "uicon-question-circle-fill": "",
  11313. "uicon-question-circle": "",
  11314. "uicon-share": "",
  11315. "uicon-share-fill": "",
  11316. "uicon-shopping-cart": "",
  11317. "uicon-shopping-cart-fill": "",
  11318. "uicon-bell": "",
  11319. "uicon-bell-fill": "",
  11320. "uicon-list": "",
  11321. "uicon-list-dot": "",
  11322. "uicon-zhihu": "",
  11323. "uicon-zhihu-circle-fill": "",
  11324. "uicon-zhifubao": "",
  11325. "uicon-zhifubao-circle-fill": "",
  11326. "uicon-weixin-circle-fill": "",
  11327. "uicon-weixin-fill": "",
  11328. "uicon-twitter-circle-fill": "",
  11329. "uicon-twitter": "",
  11330. "uicon-taobao-circle-fill": "",
  11331. "uicon-taobao": "",
  11332. "uicon-weibo-circle-fill": "",
  11333. "uicon-weibo": "",
  11334. "uicon-qq-fill": "",
  11335. "uicon-qq-circle-fill": "",
  11336. "uicon-moments-circel-fill": "",
  11337. "uicon-moments": "",
  11338. "uicon-qzone": "",
  11339. "uicon-qzone-circle-fill": "",
  11340. "uicon-baidu-circle-fill": "",
  11341. "uicon-baidu": "",
  11342. "uicon-facebook-circle-fill": "",
  11343. "uicon-facebook": "",
  11344. "uicon-car": "",
  11345. "uicon-car-fill": "",
  11346. "uicon-warning-fill": "",
  11347. "uicon-warning": "",
  11348. "uicon-clock-fill": "",
  11349. "uicon-clock": "",
  11350. "uicon-edit-pen": "",
  11351. "uicon-edit-pen-fill": "",
  11352. "uicon-email": "",
  11353. "uicon-email-fill": "",
  11354. "uicon-minus-circle": "",
  11355. "uicon-minus-circle-fill": "",
  11356. "uicon-plus-circle": "",
  11357. "uicon-plus-circle-fill": "",
  11358. "uicon-file-text": "",
  11359. "uicon-file-text-fill": "",
  11360. "uicon-pushpin": "",
  11361. "uicon-pushpin-fill": "",
  11362. "uicon-grid": "",
  11363. "uicon-grid-fill": "",
  11364. "uicon-play-circle": "",
  11365. "uicon-play-circle-fill": "",
  11366. "uicon-pause-circle-fill": "",
  11367. "uicon-pause": "",
  11368. "uicon-pause-circle": "",
  11369. "uicon-eye-off": "",
  11370. "uicon-eye-off-outline": "",
  11371. "uicon-gift-fill": "",
  11372. "uicon-gift": "",
  11373. "uicon-rmb-circle-fill": "",
  11374. "uicon-rmb-circle": "",
  11375. "uicon-kefu-ermai": "",
  11376. "uicon-server-fill": "",
  11377. "uicon-coupon-fill": "",
  11378. "uicon-coupon": "",
  11379. "uicon-integral": "",
  11380. "uicon-integral-fill": "",
  11381. "uicon-home-fill": "",
  11382. "uicon-home": "",
  11383. "uicon-hourglass-half-fill": "",
  11384. "uicon-hourglass": "",
  11385. "uicon-account": "",
  11386. "uicon-plus-people-fill": "",
  11387. "uicon-minus-people-fill": "",
  11388. "uicon-account-fill": "",
  11389. "uicon-thumb-down-fill": "",
  11390. "uicon-thumb-down": "",
  11391. "uicon-thumb-up": "",
  11392. "uicon-thumb-up-fill": "",
  11393. "uicon-lock-fill": "",
  11394. "uicon-lock-open": "",
  11395. "uicon-lock-opened-fill": "",
  11396. "uicon-lock": "",
  11397. "uicon-red-packet-fill": "",
  11398. "uicon-photo-fill": "",
  11399. "uicon-photo": "",
  11400. "uicon-volume-off-fill": "",
  11401. "uicon-volume-off": "",
  11402. "uicon-volume-fill": "",
  11403. "uicon-volume": "",
  11404. "uicon-red-packet": "",
  11405. "uicon-download": "",
  11406. "uicon-arrow-up-fill": "",
  11407. "uicon-arrow-down-fill": "",
  11408. "uicon-play-left-fill": "",
  11409. "uicon-play-right-fill": "",
  11410. "uicon-rewind-left-fill": "",
  11411. "uicon-rewind-right-fill": "",
  11412. "uicon-arrow-downward": "",
  11413. "uicon-arrow-leftward": "",
  11414. "uicon-arrow-rightward": "",
  11415. "uicon-arrow-upward": "",
  11416. "uicon-arrow-down": "",
  11417. "uicon-arrow-right": "",
  11418. "uicon-arrow-left": "",
  11419. "uicon-arrow-up": "",
  11420. "uicon-skip-back-left": "",
  11421. "uicon-skip-forward-right": "",
  11422. "uicon-rewind-right": "",
  11423. "uicon-rewind-left": "",
  11424. "uicon-arrow-right-double": "",
  11425. "uicon-arrow-left-double": "",
  11426. "uicon-wifi-off": "",
  11427. "uicon-wifi": "",
  11428. "uicon-empty-data": "",
  11429. "uicon-empty-history": "",
  11430. "uicon-empty-list": "",
  11431. "uicon-empty-page": "",
  11432. "uicon-empty-order": "",
  11433. "uicon-man": "",
  11434. "uicon-woman": "",
  11435. "uicon-man-add": "",
  11436. "uicon-man-add-fill": "",
  11437. "uicon-man-delete": "",
  11438. "uicon-man-delete-fill": "",
  11439. "uicon-zh": "",
  11440. "uicon-en": ""
  11441. };
  11442. const props$r = {
  11443. props: {
  11444. // 图标类名
  11445. name: {
  11446. type: String,
  11447. default: defprops.icon.name
  11448. },
  11449. // 图标颜色,可接受主题色
  11450. color: {
  11451. type: String,
  11452. default: defprops.icon.color
  11453. },
  11454. // 字体大小,单位px
  11455. size: {
  11456. type: [String, Number],
  11457. default: defprops.icon.size
  11458. },
  11459. // 是否显示粗体
  11460. bold: {
  11461. type: Boolean,
  11462. default: defprops.icon.bold
  11463. },
  11464. // 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
  11465. index: {
  11466. type: [String, Number],
  11467. default: defprops.icon.index
  11468. },
  11469. // 触摸图标时的类名
  11470. hoverClass: {
  11471. type: String,
  11472. default: defprops.icon.hoverClass
  11473. },
  11474. // 自定义扩展前缀,方便用户扩展自己的图标库
  11475. customPrefix: {
  11476. type: String,
  11477. default: defprops.icon.customPrefix
  11478. },
  11479. // 图标右边或者下面的文字
  11480. label: {
  11481. type: [String, Number],
  11482. default: defprops.icon.label
  11483. },
  11484. // label的位置,只能右边或者下边
  11485. labelPos: {
  11486. type: String,
  11487. default: defprops.icon.labelPos
  11488. },
  11489. // label的大小
  11490. labelSize: {
  11491. type: [String, Number],
  11492. default: defprops.icon.labelSize
  11493. },
  11494. // label的颜色
  11495. labelColor: {
  11496. type: String,
  11497. default: defprops.icon.labelColor
  11498. },
  11499. // label与图标的距离
  11500. space: {
  11501. type: [String, Number],
  11502. default: defprops.icon.space
  11503. },
  11504. // 图片的mode
  11505. imgMode: {
  11506. type: String,
  11507. default: defprops.icon.imgMode
  11508. },
  11509. // 用于显示图片小图标时,图片的宽度
  11510. width: {
  11511. type: [String, Number],
  11512. default: defprops.icon.width
  11513. },
  11514. // 用于显示图片小图标时,图片的高度
  11515. height: {
  11516. type: [String, Number],
  11517. default: defprops.icon.height
  11518. },
  11519. // 用于解决某些情况下,让图标垂直居中的用途
  11520. top: {
  11521. type: [String, Number],
  11522. default: defprops.icon.top
  11523. },
  11524. // 是否阻止事件传播
  11525. stop: {
  11526. type: Boolean,
  11527. default: defprops.icon.stop
  11528. }
  11529. }
  11530. };
  11531. const props$q = {
  11532. props: {
  11533. // 组件状态,loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
  11534. status: {
  11535. type: String,
  11536. default: defprops.loadmore.status
  11537. },
  11538. // 组件背景色
  11539. bgColor: {
  11540. type: String,
  11541. default: defprops.loadmore.bgColor
  11542. },
  11543. // 是否显示加载中的图标
  11544. icon: {
  11545. type: Boolean,
  11546. default: defprops.loadmore.icon
  11547. },
  11548. // 字体大小
  11549. fontSize: {
  11550. type: [String, Number],
  11551. default: defprops.loadmore.fontSize
  11552. },
  11553. // 图标大小
  11554. iconSize: {
  11555. type: [String, Number],
  11556. default: defprops.loadmore.iconSize
  11557. },
  11558. // 字体颜色
  11559. color: {
  11560. type: String,
  11561. default: defprops.loadmore.color
  11562. },
  11563. // 加载中状态的图标,spinner-花朵状图标,circle-圆圈状,semicircle-半圆
  11564. loadingIcon: {
  11565. type: String,
  11566. default: defprops.loadmore.loadingIcon
  11567. },
  11568. // 加载前的提示语
  11569. loadmoreText: {
  11570. type: String,
  11571. default: defprops.loadmore.loadmoreText
  11572. },
  11573. // 加载中提示语
  11574. loadingText: {
  11575. type: String,
  11576. default: defprops.loadmore.loadingText
  11577. },
  11578. // 没有更多的提示语
  11579. nomoreText: {
  11580. type: String,
  11581. default: defprops.loadmore.nomoreText
  11582. },
  11583. // 在“没有更多”状态下,是否显示粗点
  11584. isDot: {
  11585. type: Boolean,
  11586. default: defprops.loadmore.isDot
  11587. },
  11588. // 加载中图标的颜色
  11589. iconColor: {
  11590. type: String,
  11591. default: defprops.loadmore.iconColor
  11592. },
  11593. // 上边距
  11594. marginTop: {
  11595. type: [String, Number],
  11596. default: defprops.loadmore.marginTop
  11597. },
  11598. // 下边距
  11599. marginBottom: {
  11600. type: [String, Number],
  11601. default: defprops.loadmore.marginBottom
  11602. },
  11603. // 高度,单位px
  11604. height: {
  11605. type: [String, Number],
  11606. default: defprops.loadmore.height
  11607. },
  11608. // 是否显示左边分割线
  11609. line: {
  11610. type: Boolean,
  11611. default: defprops.loadmore.line
  11612. },
  11613. // 线条颜色
  11614. lineColor: {
  11615. type: String,
  11616. default: defprops.loadmore.lineColor
  11617. },
  11618. // 是否虚线,true-虚线,false-实线
  11619. dashed: {
  11620. type: Boolean,
  11621. default: defprops.loadmore.dashed
  11622. }
  11623. }
  11624. };
  11625. const props$p = {
  11626. props: {
  11627. // 内置图标名称,或图片路径,建议绝对路径
  11628. icon: {
  11629. type: String,
  11630. default: defprops.empty.icon
  11631. },
  11632. // 提示文字
  11633. text: {
  11634. type: String,
  11635. default: defprops.empty.text
  11636. },
  11637. // 文字颜色
  11638. textColor: {
  11639. type: String,
  11640. default: defprops.empty.textColor
  11641. },
  11642. // 文字大小
  11643. textSize: {
  11644. type: [String, Number],
  11645. default: defprops.empty.textSize
  11646. },
  11647. // 图标的颜色
  11648. iconColor: {
  11649. type: String,
  11650. default: defprops.empty.iconColor
  11651. },
  11652. // 图标的大小
  11653. iconSize: {
  11654. type: [String, Number],
  11655. default: defprops.empty.iconSize
  11656. },
  11657. // 选择预置的图标类型
  11658. mode: {
  11659. type: String,
  11660. default: defprops.empty.mode
  11661. },
  11662. // 图标宽度,单位px
  11663. width: {
  11664. type: [String, Number],
  11665. default: defprops.empty.width
  11666. },
  11667. // 图标高度,单位px
  11668. height: {
  11669. type: [String, Number],
  11670. default: defprops.empty.height
  11671. },
  11672. // 是否显示组件
  11673. show: {
  11674. type: Boolean,
  11675. default: defprops.empty.show
  11676. },
  11677. // 组件距离上一个元素之间的距离,默认px单位
  11678. marginTop: {
  11679. type: [String, Number],
  11680. default: defprops.empty.marginTop
  11681. }
  11682. }
  11683. };
  11684. const props$o = {
  11685. props: {
  11686. // tab的数据
  11687. list: {
  11688. type: Array,
  11689. default: defprops.subsection.list
  11690. },
  11691. // 当前活动的tab的index
  11692. current: {
  11693. type: [String, Number],
  11694. default: defprops.subsection.current
  11695. },
  11696. // 激活的颜色
  11697. activeColor: {
  11698. type: String,
  11699. default: defprops.subsection.activeColor
  11700. },
  11701. // 未激活的颜色
  11702. inactiveColor: {
  11703. type: String,
  11704. default: defprops.subsection.inactiveColor
  11705. },
  11706. // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
  11707. mode: {
  11708. type: String,
  11709. default: defprops.subsection.mode
  11710. },
  11711. // 字体大小
  11712. fontSize: {
  11713. type: [String, Number],
  11714. default: defprops.subsection.fontSize
  11715. },
  11716. // 激活tab的字体是否加粗
  11717. bold: {
  11718. type: Boolean,
  11719. default: defprops.subsection.bold
  11720. },
  11721. // mode = button时,组件背景颜色
  11722. bgColor: {
  11723. type: String,
  11724. default: defprops.subsection.bgColor
  11725. },
  11726. // 从list元素对象中读取的键名
  11727. keyName: {
  11728. type: String,
  11729. default: defprops.subsection.keyName
  11730. }
  11731. }
  11732. };
  11733. const props$n = {
  11734. props: {
  11735. // 是否展示弹窗
  11736. show: {
  11737. type: Boolean,
  11738. default: defprops.popup.show
  11739. },
  11740. // 是否显示遮罩
  11741. overlay: {
  11742. type: Boolean,
  11743. default: defprops.popup.overlay
  11744. },
  11745. // 弹出的方向,可选值为 top bottom right left center
  11746. mode: {
  11747. type: String,
  11748. default: defprops.popup.mode
  11749. },
  11750. // 动画时长,单位ms
  11751. duration: {
  11752. type: [String, Number],
  11753. default: defprops.popup.duration
  11754. },
  11755. // 是否显示关闭图标
  11756. closeable: {
  11757. type: Boolean,
  11758. default: defprops.popup.closeable
  11759. },
  11760. // 自定义遮罩的样式
  11761. overlayStyle: {
  11762. type: [Object, String],
  11763. default: defprops.popup.overlayStyle
  11764. },
  11765. // 点击遮罩是否关闭弹窗
  11766. closeOnClickOverlay: {
  11767. type: Boolean,
  11768. default: defprops.popup.closeOnClickOverlay
  11769. },
  11770. // 层级
  11771. zIndex: {
  11772. type: [String, Number],
  11773. default: defprops.popup.zIndex
  11774. },
  11775. // 是否为iPhoneX留出底部安全距离
  11776. safeAreaInsetBottom: {
  11777. type: Boolean,
  11778. default: defprops.popup.safeAreaInsetBottom
  11779. },
  11780. // 是否留出顶部安全距离(状态栏高度)
  11781. safeAreaInsetTop: {
  11782. type: Boolean,
  11783. default: defprops.popup.safeAreaInsetTop
  11784. },
  11785. // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
  11786. closeIconPos: {
  11787. type: String,
  11788. default: defprops.popup.closeIconPos
  11789. },
  11790. // 是否显示圆角
  11791. round: {
  11792. type: [Boolean, String, Number],
  11793. default: defprops.popup.round
  11794. },
  11795. // mode=center,也即中部弹出时,是否使用缩放模式
  11796. zoom: {
  11797. type: Boolean,
  11798. default: defprops.popup.zoom
  11799. },
  11800. // 弹窗背景色,设置为transparent可去除白色背景
  11801. bgColor: {
  11802. type: String,
  11803. default: defprops.popup.bgColor
  11804. },
  11805. // 遮罩的透明度,0-1之间
  11806. overlayOpacity: {
  11807. type: [Number, String],
  11808. default: defprops.popup.overlayOpacity
  11809. }
  11810. }
  11811. };
  11812. const props$m = {
  11813. props: {
  11814. // 绑定的值
  11815. modelValue: {
  11816. type: [String, Number],
  11817. default: defprops.input.value
  11818. },
  11819. // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数
  11820. // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序
  11821. // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序
  11822. // text-文本输入键盘
  11823. type: {
  11824. type: String,
  11825. default: defprops.input.type
  11826. },
  11827. // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,
  11828. // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序
  11829. fixed: {
  11830. type: Boolean,
  11831. default: defprops.input.fixed
  11832. },
  11833. // 是否禁用输入框
  11834. disabled: {
  11835. type: Boolean,
  11836. default: defprops.input.disabled
  11837. },
  11838. // 禁用状态时的背景色
  11839. disabledColor: {
  11840. type: String,
  11841. default: defprops.input.disabledColor
  11842. },
  11843. // 是否显示清除控件
  11844. clearable: {
  11845. type: Boolean,
  11846. default: defprops.input.clearable
  11847. },
  11848. // 是否密码类型
  11849. password: {
  11850. type: Boolean,
  11851. default: defprops.input.password
  11852. },
  11853. // 最大输入长度,设置为 -1 的时候不限制最大长度
  11854. maxlength: {
  11855. type: [String, Number],
  11856. default: defprops.input.maxlength
  11857. },
  11858. // 输入框为空时的占位符
  11859. placeholder: {
  11860. type: String,
  11861. default: defprops.input.placeholder
  11862. },
  11863. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  11864. placeholderClass: {
  11865. type: String,
  11866. default: defprops.input.placeholderClass
  11867. },
  11868. // 指定placeholder的样式
  11869. placeholderStyle: {
  11870. type: [String, Object],
  11871. default: defprops.input.placeholderStyle
  11872. },
  11873. // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效
  11874. showWordLimit: {
  11875. type: Boolean,
  11876. default: defprops.input.showWordLimit
  11877. },
  11878. // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档
  11879. // https://uniapp.dcloud.io/component/input
  11880. // https://uniapp.dcloud.io/component/textarea
  11881. confirmType: {
  11882. type: String,
  11883. default: defprops.input.confirmType
  11884. },
  11885. // 点击键盘右下角按钮时是否保持键盘不收起,H5无效
  11886. confirmHold: {
  11887. type: Boolean,
  11888. default: defprops.input.confirmHold
  11889. },
  11890. // focus时,点击页面的时候不收起键盘,微信小程序有效
  11891. holdKeyboard: {
  11892. type: Boolean,
  11893. default: defprops.input.holdKeyboard
  11894. },
  11895. // 自动获取焦点
  11896. // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
  11897. focus: {
  11898. type: Boolean,
  11899. default: defprops.input.focus
  11900. },
  11901. // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
  11902. autoBlur: {
  11903. type: Boolean,
  11904. default: defprops.input.autoBlur
  11905. },
  11906. // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效
  11907. disableDefaultPadding: {
  11908. type: Boolean,
  11909. default: defprops.input.disableDefaultPadding
  11910. },
  11911. // 指定focus时光标的位置
  11912. cursor: {
  11913. type: [String, Number],
  11914. default: defprops.input.cursor
  11915. },
  11916. // 输入框聚焦时底部与键盘的距离
  11917. cursorSpacing: {
  11918. type: [String, Number],
  11919. default: defprops.input.cursorSpacing
  11920. },
  11921. // 光标起始位置,自动聚集时有效,需与selection-end搭配使用
  11922. selectionStart: {
  11923. type: [String, Number],
  11924. default: defprops.input.selectionStart
  11925. },
  11926. // 光标结束位置,自动聚集时有效,需与selection-start搭配使用
  11927. selectionEnd: {
  11928. type: [String, Number],
  11929. default: defprops.input.selectionEnd
  11930. },
  11931. // 键盘弹起时,是否自动上推页面
  11932. adjustPosition: {
  11933. type: Boolean,
  11934. default: defprops.input.adjustPosition
  11935. },
  11936. // 输入框内容对齐方式,可选值为:left|center|right
  11937. inputAlign: {
  11938. type: String,
  11939. default: defprops.input.inputAlign
  11940. },
  11941. // 输入框字体的大小
  11942. fontSize: {
  11943. type: [String, Number],
  11944. default: defprops.input.fontSize
  11945. },
  11946. // 输入框字体颜色
  11947. color: {
  11948. type: String,
  11949. default: defprops.input.color
  11950. },
  11951. // 输入框前置图标
  11952. prefixIcon: {
  11953. type: String,
  11954. default: defprops.input.prefixIcon
  11955. },
  11956. // 前置图标样式,对象或字符串
  11957. prefixIconStyle: {
  11958. type: [String, Object],
  11959. default: defprops.input.prefixIconStyle
  11960. },
  11961. // 输入框后置图标
  11962. suffixIcon: {
  11963. type: String,
  11964. default: defprops.input.suffixIcon
  11965. },
  11966. // 后置图标样式,对象或字符串
  11967. suffixIconStyle: {
  11968. type: [String, Object],
  11969. default: defprops.input.suffixIconStyle
  11970. },
  11971. // 边框类型,surround-四周边框,bottom-底部边框,none-无边框
  11972. border: {
  11973. type: String,
  11974. default: defprops.input.border
  11975. },
  11976. // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
  11977. readonly: {
  11978. type: Boolean,
  11979. default: defprops.input.readonly
  11980. },
  11981. // 输入框形状,circle-圆形,square-方形
  11982. shape: {
  11983. type: String,
  11984. default: defprops.input.shape
  11985. },
  11986. // 用于处理或者过滤输入框内容的方法
  11987. formatter: {
  11988. type: [Function, null],
  11989. default: defprops.input.formatter
  11990. },
  11991. // 是否忽略组件内对文本合成系统事件的处理
  11992. ignoreCompositionEvent: {
  11993. type: Boolean,
  11994. default: true
  11995. }
  11996. }
  11997. };
  11998. const button = {
  11999. props: {
  12000. lang: String,
  12001. sessionFrom: String,
  12002. sendMessageTitle: String,
  12003. sendMessagePath: String,
  12004. sendMessageImg: String,
  12005. showMessageCard: Boolean,
  12006. appParameter: String,
  12007. formType: String,
  12008. openType: String
  12009. }
  12010. };
  12011. const openType = {
  12012. props: {
  12013. openType: String
  12014. },
  12015. methods: {
  12016. onGetUserInfo(event) {
  12017. this.$emit("getuserinfo", event.detail);
  12018. },
  12019. onContact(event) {
  12020. this.$emit("contact", event.detail);
  12021. },
  12022. onGetPhoneNumber(event) {
  12023. this.$emit("getphonenumber", event.detail);
  12024. },
  12025. onError(event) {
  12026. this.$emit("error", event.detail);
  12027. },
  12028. onLaunchApp(event) {
  12029. this.$emit("launchapp", event.detail);
  12030. },
  12031. onOpenSetting(event) {
  12032. this.$emit("opensetting", event.detail);
  12033. }
  12034. }
  12035. };
  12036. const props$l = {
  12037. props: {
  12038. // 是否细边框
  12039. hairline: {
  12040. type: Boolean,
  12041. default: defprops.button.hairline
  12042. },
  12043. // 按钮的预置样式,info,primary,error,warning,success
  12044. type: {
  12045. type: String,
  12046. default: defprops.button.type
  12047. },
  12048. // 按钮尺寸,large,normal,small,mini
  12049. size: {
  12050. type: String,
  12051. default: defprops.button.size
  12052. },
  12053. // 按钮形状,circle(两边为半圆),square(带圆角)
  12054. shape: {
  12055. type: String,
  12056. default: defprops.button.shape
  12057. },
  12058. // 按钮是否镂空
  12059. plain: {
  12060. type: Boolean,
  12061. default: defprops.button.plain
  12062. },
  12063. // 是否禁止状态
  12064. disabled: {
  12065. type: Boolean,
  12066. default: defprops.button.disabled
  12067. },
  12068. // 是否加载中
  12069. loading: {
  12070. type: Boolean,
  12071. default: defprops.button.loading
  12072. },
  12073. // 加载中提示文字
  12074. loadingText: {
  12075. type: [String, Number],
  12076. default: defprops.button.loadingText
  12077. },
  12078. // 加载状态图标类型
  12079. loadingMode: {
  12080. type: String,
  12081. default: defprops.button.loadingMode
  12082. },
  12083. // 加载图标大小
  12084. loadingSize: {
  12085. type: [String, Number],
  12086. default: defprops.button.loadingSize
  12087. },
  12088. // 开放能力,具体请看uniapp稳定关于button组件部分说明
  12089. // https://uniapp.dcloud.io/component/button
  12090. openType: {
  12091. type: String,
  12092. default: defprops.button.openType
  12093. },
  12094. // 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
  12095. // 取值为submit(提交表单),reset(重置表单)
  12096. formType: {
  12097. type: String,
  12098. default: defprops.button.formType
  12099. },
  12100. // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
  12101. // 只微信小程序、QQ小程序有效
  12102. appParameter: {
  12103. type: String,
  12104. default: defprops.button.appParameter
  12105. },
  12106. // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
  12107. hoverStopPropagation: {
  12108. type: Boolean,
  12109. default: defprops.button.hoverStopPropagation
  12110. },
  12111. // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
  12112. lang: {
  12113. type: String,
  12114. default: defprops.button.lang
  12115. },
  12116. // 会话来源,open-type="contact"时有效。只微信小程序有效
  12117. sessionFrom: {
  12118. type: String,
  12119. default: defprops.button.sessionFrom
  12120. },
  12121. // 会话内消息卡片标题,open-type="contact"时有效
  12122. // 默认当前标题,只微信小程序有效
  12123. sendMessageTitle: {
  12124. type: String,
  12125. default: defprops.button.sendMessageTitle
  12126. },
  12127. // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
  12128. // 默认当前分享路径,只微信小程序有效
  12129. sendMessagePath: {
  12130. type: String,
  12131. default: defprops.button.sendMessagePath
  12132. },
  12133. // 会话内消息卡片图片,open-type="contact"时有效
  12134. // 默认当前页面截图,只微信小程序有效
  12135. sendMessageImg: {
  12136. type: String,
  12137. default: defprops.button.sendMessageImg
  12138. },
  12139. // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
  12140. // 用户点击后可以快速发送小程序消息,open-type="contact"时有效
  12141. showMessageCard: {
  12142. type: Boolean,
  12143. default: defprops.button.showMessageCard
  12144. },
  12145. // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
  12146. dataName: {
  12147. type: String,
  12148. default: defprops.button.dataName
  12149. },
  12150. // 节流,一定时间内只能触发一次
  12151. throttleTime: {
  12152. type: [String, Number],
  12153. default: defprops.button.throttleTime
  12154. },
  12155. // 按住后多久出现点击态,单位毫秒
  12156. hoverStartTime: {
  12157. type: [String, Number],
  12158. default: defprops.button.hoverStartTime
  12159. },
  12160. // 手指松开后点击态保留时间,单位毫秒
  12161. hoverStayTime: {
  12162. type: [String, Number],
  12163. default: defprops.button.hoverStayTime
  12164. },
  12165. // 按钮文字,之所以通过props传入,是因为slot传入的话
  12166. // nvue中无法控制文字的样式
  12167. text: {
  12168. type: [String, Number],
  12169. default: defprops.button.text
  12170. },
  12171. // 按钮图标
  12172. icon: {
  12173. type: String,
  12174. default: defprops.button.icon
  12175. },
  12176. // 按钮图标
  12177. iconColor: {
  12178. type: String,
  12179. default: defprops.button.icon
  12180. },
  12181. // 按钮颜色,支持传入linear-gradient渐变色
  12182. color: {
  12183. type: String,
  12184. default: defprops.button.color
  12185. }
  12186. }
  12187. };
  12188. const props$k = {
  12189. props: {
  12190. // 滑块的移动过渡时间,单位ms
  12191. duration: {
  12192. type: Number,
  12193. default: defprops.tabs.duration
  12194. },
  12195. // tabs标签数组
  12196. list: {
  12197. type: Array,
  12198. default: defprops.tabs.list
  12199. },
  12200. // 滑块颜色
  12201. lineColor: {
  12202. type: String,
  12203. default: defprops.tabs.lineColor
  12204. },
  12205. // 菜单选择中时的样式
  12206. activeStyle: {
  12207. type: [String, Object],
  12208. default: defprops.tabs.activeStyle
  12209. },
  12210. // 菜单非选中时的样式
  12211. inactiveStyle: {
  12212. type: [String, Object],
  12213. default: defprops.tabs.inactiveStyle
  12214. },
  12215. // 滑块长度
  12216. lineWidth: {
  12217. type: [String, Number],
  12218. default: defprops.tabs.lineWidth
  12219. },
  12220. // 滑块高度
  12221. lineHeight: {
  12222. type: [String, Number],
  12223. default: defprops.tabs.lineHeight
  12224. },
  12225. // 滑块背景显示大小,当滑块背景设置为图片时使用
  12226. lineBgSize: {
  12227. type: String,
  12228. default: defprops.tabs.lineBgSize
  12229. },
  12230. // 菜单item的样式
  12231. itemStyle: {
  12232. type: [String, Object],
  12233. default: defprops.tabs.itemStyle
  12234. },
  12235. // 菜单是否可滚动
  12236. scrollable: {
  12237. type: Boolean,
  12238. default: defprops.tabs.scrollable
  12239. },
  12240. // 当前选中标签的索引
  12241. current: {
  12242. type: [Number, String],
  12243. default: defprops.tabs.current
  12244. },
  12245. // 默认读取的键名
  12246. keyName: {
  12247. type: String,
  12248. default: defprops.tabs.keyName
  12249. }
  12250. }
  12251. };
  12252. const props$j = {
  12253. props: {
  12254. // 图片地址
  12255. src: {
  12256. type: String,
  12257. default: defprops.image.src
  12258. },
  12259. // 裁剪模式
  12260. mode: {
  12261. type: String,
  12262. default: defprops.image.mode
  12263. },
  12264. // 宽度,单位任意
  12265. width: {
  12266. type: [String, Number],
  12267. default: defprops.image.width
  12268. },
  12269. // 高度,单位任意
  12270. height: {
  12271. type: [String, Number],
  12272. default: defprops.image.height
  12273. },
  12274. // 图片形状,circle-圆形,square-方形
  12275. shape: {
  12276. type: String,
  12277. default: defprops.image.shape
  12278. },
  12279. // 圆角,单位任意
  12280. radius: {
  12281. type: [String, Number],
  12282. default: defprops.image.radius
  12283. },
  12284. // 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序
  12285. lazyLoad: {
  12286. type: Boolean,
  12287. default: defprops.image.lazyLoad
  12288. },
  12289. // 开启长按图片显示识别微信小程序码菜单
  12290. showMenuByLongpress: {
  12291. type: Boolean,
  12292. default: defprops.image.showMenuByLongpress
  12293. },
  12294. // 加载中的图标,或者小图片
  12295. loadingIcon: {
  12296. type: String,
  12297. default: defprops.image.loadingIcon
  12298. },
  12299. // 加载失败的图标,或者小图片
  12300. errorIcon: {
  12301. type: String,
  12302. default: defprops.image.errorIcon
  12303. },
  12304. // 是否显示加载中的图标或者自定义的slot
  12305. showLoading: {
  12306. type: Boolean,
  12307. default: defprops.image.showLoading
  12308. },
  12309. // 是否显示加载错误的图标或者自定义的slot
  12310. showError: {
  12311. type: Boolean,
  12312. default: defprops.image.showError
  12313. },
  12314. // 是否需要淡入效果
  12315. fade: {
  12316. type: Boolean,
  12317. default: defprops.image.fade
  12318. },
  12319. // 只支持网络资源,只对微信小程序有效
  12320. webp: {
  12321. type: Boolean,
  12322. default: defprops.image.webp
  12323. },
  12324. // 过渡时间,单位ms
  12325. duration: {
  12326. type: [String, Number],
  12327. default: defprops.image.duration
  12328. },
  12329. // 背景颜色,用于深色页面加载图片时,为了和背景色融合
  12330. bgColor: {
  12331. type: String,
  12332. default: defprops.image.bgColor
  12333. }
  12334. }
  12335. };
  12336. const props$i = {
  12337. props: {
  12338. // input的label提示语
  12339. label: {
  12340. type: String,
  12341. default: defprops.formItem.label
  12342. },
  12343. // 绑定的值
  12344. prop: {
  12345. type: String,
  12346. default: defprops.formItem.prop
  12347. },
  12348. // 是否显示表单域的下划线边框
  12349. borderBottom: {
  12350. type: [String, Boolean],
  12351. default: defprops.formItem.borderBottom
  12352. },
  12353. // label的宽度,单位px
  12354. labelWidth: {
  12355. type: [String, Number],
  12356. default: defprops.formItem.labelWidth
  12357. },
  12358. // 右侧图标
  12359. rightIcon: {
  12360. type: String,
  12361. default: defprops.formItem.rightIcon
  12362. },
  12363. // 左侧图标
  12364. leftIcon: {
  12365. type: String,
  12366. default: defprops.formItem.leftIcon
  12367. },
  12368. // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
  12369. required: {
  12370. type: Boolean,
  12371. default: defprops.formItem.required
  12372. },
  12373. leftIconStyle: {
  12374. type: [String, Object],
  12375. default: defprops.formItem.leftIconStyle
  12376. }
  12377. }
  12378. };
  12379. const props$h = {
  12380. props: {
  12381. // 当前form的需要验证字段的集合
  12382. model: {
  12383. type: Object,
  12384. default: defprops.form.model
  12385. },
  12386. // 验证规则
  12387. rules: {
  12388. type: [Object, Function, Array],
  12389. default: defprops.form.rules
  12390. },
  12391. // 有错误时的提示方式,message-提示信息,toast-进行toast提示
  12392. // border-bottom-下边框呈现红色,none-无提示
  12393. errorType: {
  12394. type: String,
  12395. default: defprops.form.errorType
  12396. },
  12397. // 是否显示表单域的下划线边框
  12398. borderBottom: {
  12399. type: Boolean,
  12400. default: defprops.form.borderBottom
  12401. },
  12402. // label的位置,left-左边,top-上边
  12403. labelPosition: {
  12404. type: String,
  12405. default: defprops.form.labelPosition
  12406. },
  12407. // label的宽度,单位px
  12408. labelWidth: {
  12409. type: [String, Number],
  12410. default: defprops.form.labelWidth
  12411. },
  12412. // lable字体的对齐方式
  12413. labelAlign: {
  12414. type: String,
  12415. default: defprops.form.labelAlign
  12416. },
  12417. // lable的样式,对象形式
  12418. labelStyle: {
  12419. type: Object,
  12420. default: defprops.form.labelStyle
  12421. }
  12422. }
  12423. };
  12424. const props$g = {
  12425. props: {
  12426. // 最小可选值
  12427. min: {
  12428. type: [Number, String],
  12429. default: defprops.slider.min
  12430. },
  12431. // 最大可选值
  12432. max: {
  12433. type: [Number, String],
  12434. default: defprops.slider.max
  12435. },
  12436. // 步长,取值必须大于 0,并且可被(max - min)整除
  12437. step: {
  12438. type: [Number, String],
  12439. default: defprops.slider.step
  12440. },
  12441. // 当前取值
  12442. value: {
  12443. type: [Number, String],
  12444. default: defprops.slider.value
  12445. },
  12446. // 滑块右侧已选择部分的背景色
  12447. activeColor: {
  12448. type: String,
  12449. default: defprops.slider.activeColor
  12450. },
  12451. // 滑块左侧未选择部分的背景色
  12452. inactiveColor: {
  12453. type: String,
  12454. default: defprops.slider.inactiveColor
  12455. },
  12456. // 滑块的大小,取值范围为 12 - 28
  12457. blockSize: {
  12458. type: [Number, String],
  12459. default: defprops.slider.blockSize
  12460. },
  12461. // 滑块的颜色
  12462. blockColor: {
  12463. type: String,
  12464. default: defprops.slider.blockColor
  12465. },
  12466. // 禁用状态
  12467. disabled: {
  12468. type: Boolean,
  12469. default: defprops.slider.disabled
  12470. },
  12471. // 是否显示当前的选择值
  12472. showValue: {
  12473. type: Boolean,
  12474. default: defprops.slider.showValue
  12475. }
  12476. }
  12477. };
  12478. const props$f = {
  12479. props: {
  12480. // radio的名称
  12481. name: {
  12482. type: [String, Number, Boolean],
  12483. default: defprops.radio.name
  12484. },
  12485. // 形状,square为方形,circle为圆型
  12486. shape: {
  12487. type: String,
  12488. default: defprops.radio.shape
  12489. },
  12490. // 是否禁用
  12491. disabled: {
  12492. type: [String, Boolean],
  12493. default: defprops.radio.disabled
  12494. },
  12495. // 是否禁止点击提示语选中单选框
  12496. labelDisabled: {
  12497. type: [String, Boolean],
  12498. default: defprops.radio.labelDisabled
  12499. },
  12500. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  12501. activeColor: {
  12502. type: String,
  12503. default: defprops.radio.activeColor
  12504. },
  12505. // 未选中的颜色
  12506. inactiveColor: {
  12507. type: String,
  12508. default: defprops.radio.inactiveColor
  12509. },
  12510. // 图标的大小,单位px
  12511. iconSize: {
  12512. type: [String, Number],
  12513. default: defprops.radio.iconSize
  12514. },
  12515. // label的字体大小,px单位
  12516. labelSize: {
  12517. type: [String, Number],
  12518. default: defprops.radio.labelSize
  12519. },
  12520. // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
  12521. label: {
  12522. type: [String, Number],
  12523. default: defprops.radio.label
  12524. },
  12525. // 整体的大小
  12526. size: {
  12527. type: [String, Number],
  12528. default: defprops.radio.size
  12529. },
  12530. // 图标颜色
  12531. color: {
  12532. type: String,
  12533. default: defprops.radio.color
  12534. },
  12535. // label的颜色
  12536. labelColor: {
  12537. type: String,
  12538. default: defprops.radio.labelColor
  12539. },
  12540. // 图标颜色
  12541. iconColor: {
  12542. type: String,
  12543. default: defprops.radio.iconColor
  12544. }
  12545. }
  12546. };
  12547. const props$e = {
  12548. props: {
  12549. // 绑定的值
  12550. modelValue: {
  12551. type: [String, Number, Boolean],
  12552. default: defprops.radioGroup.value
  12553. },
  12554. // 是否禁用全部radio
  12555. disabled: {
  12556. type: Boolean,
  12557. default: defprops.radioGroup.disabled
  12558. },
  12559. // 形状,circle-圆形,square-方形
  12560. shape: {
  12561. type: String,
  12562. default: defprops.radioGroup.shape
  12563. },
  12564. // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
  12565. activeColor: {
  12566. type: String,
  12567. default: defprops.radioGroup.activeColor
  12568. },
  12569. // 未选中的颜色
  12570. inactiveColor: {
  12571. type: String,
  12572. default: defprops.radioGroup.inactiveColor
  12573. },
  12574. // 标识符
  12575. name: {
  12576. type: String,
  12577. default: defprops.radioGroup.name
  12578. },
  12579. // 整个组件的尺寸,默认px
  12580. size: {
  12581. type: [String, Number],
  12582. default: defprops.radioGroup.size
  12583. },
  12584. // 布局方式,row-横向,column-纵向
  12585. placement: {
  12586. type: String,
  12587. default: defprops.radioGroup.placement
  12588. },
  12589. // label的文本
  12590. label: {
  12591. type: [String],
  12592. default: defprops.radioGroup.label
  12593. },
  12594. // label的颜色 (默认 '#303133' )
  12595. labelColor: {
  12596. type: [String],
  12597. default: defprops.radioGroup.labelColor
  12598. },
  12599. // label的字体大小,px单位
  12600. labelSize: {
  12601. type: [String, Number],
  12602. default: defprops.radioGroup.labelSize
  12603. },
  12604. // 是否禁止点击文本操作checkbox(默认 false )
  12605. labelDisabled: {
  12606. type: Boolean,
  12607. default: defprops.radioGroup.labelDisabled
  12608. },
  12609. // 图标颜色
  12610. iconColor: {
  12611. type: String,
  12612. default: defprops.radioGroup.iconColor
  12613. },
  12614. // 图标的大小,单位px
  12615. iconSize: {
  12616. type: [String, Number],
  12617. default: defprops.radioGroup.iconSize
  12618. },
  12619. // 竖向配列时,是否显示下划线
  12620. borderBottom: {
  12621. type: Boolean,
  12622. default: defprops.radioGroup.borderBottom
  12623. },
  12624. // 图标与文字的对齐方式
  12625. iconPlacement: {
  12626. type: String,
  12627. default: defprops.radio.iconPlacement
  12628. }
  12629. }
  12630. };
  12631. const props$d = {
  12632. props: {
  12633. // 步进器标识符,在change回调返回
  12634. name: {
  12635. type: [String, Number],
  12636. default: defprops.numberBox.name
  12637. },
  12638. // 用于双向绑定的值,初始化时设置设为默认min值(最小值)
  12639. modelValue: {
  12640. type: [String, Number],
  12641. default: defprops.numberBox.value
  12642. },
  12643. // 最小值
  12644. min: {
  12645. type: [String, Number],
  12646. default: defprops.numberBox.min
  12647. },
  12648. // 最大值
  12649. max: {
  12650. type: [String, Number],
  12651. default: defprops.numberBox.max
  12652. },
  12653. // 加减的步长,可为小数
  12654. step: {
  12655. type: [String, Number],
  12656. default: defprops.numberBox.step
  12657. },
  12658. // 是否只允许输入整数
  12659. integer: {
  12660. type: Boolean,
  12661. default: defprops.numberBox.integer
  12662. },
  12663. // 是否禁用,包括输入框,加减按钮
  12664. disabled: {
  12665. type: Boolean,
  12666. default: defprops.numberBox.disabled
  12667. },
  12668. // 是否禁用输入框
  12669. disabledInput: {
  12670. type: Boolean,
  12671. default: defprops.numberBox.disabledInput
  12672. },
  12673. // 是否开启异步变更,开启后需要手动控制输入值
  12674. asyncChange: {
  12675. type: Boolean,
  12676. default: defprops.numberBox.asyncChange
  12677. },
  12678. // 输入框宽度,单位为px
  12679. inputWidth: {
  12680. type: [String, Number],
  12681. default: defprops.numberBox.inputWidth
  12682. },
  12683. // 是否显示减少按钮
  12684. showMinus: {
  12685. type: Boolean,
  12686. default: defprops.numberBox.showMinus
  12687. },
  12688. // 是否显示增加按钮
  12689. showPlus: {
  12690. type: Boolean,
  12691. default: defprops.numberBox.showPlus
  12692. },
  12693. // 显示的小数位数
  12694. decimalLength: {
  12695. type: [String, Number, null],
  12696. default: defprops.numberBox.decimalLength
  12697. },
  12698. // 是否开启长按加减手势
  12699. longPress: {
  12700. type: Boolean,
  12701. default: defprops.numberBox.longPress
  12702. },
  12703. // 输入框文字和加减按钮图标的颜色
  12704. color: {
  12705. type: String,
  12706. default: defprops.numberBox.color
  12707. },
  12708. // 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
  12709. buttonSize: {
  12710. type: [String, Number],
  12711. default: defprops.numberBox.buttonSize
  12712. },
  12713. // 输入框和按钮的背景颜色
  12714. bgColor: {
  12715. type: String,
  12716. default: defprops.numberBox.bgColor
  12717. },
  12718. // 指定光标于键盘的距离,避免键盘遮挡输入框,单位px
  12719. cursorSpacing: {
  12720. type: [String, Number],
  12721. default: defprops.numberBox.cursorSpacing
  12722. },
  12723. // 是否禁用增加按钮
  12724. disablePlus: {
  12725. type: Boolean,
  12726. default: defprops.numberBox.disablePlus
  12727. },
  12728. // 是否禁用减少按钮
  12729. disableMinus: {
  12730. type: Boolean,
  12731. default: defprops.numberBox.disableMinus
  12732. },
  12733. // 加减按钮图标的样式
  12734. iconStyle: {
  12735. type: [Object, String],
  12736. default: defprops.numberBox.iconStyle
  12737. }
  12738. }
  12739. };
  12740. const props$c = {
  12741. props: {
  12742. // 是否展示picker弹窗
  12743. show: {
  12744. type: Boolean,
  12745. default: defprops.picker.show
  12746. },
  12747. // 是否展示顶部的操作栏
  12748. showToolbar: {
  12749. type: Boolean,
  12750. default: defprops.picker.showToolbar
  12751. },
  12752. // 顶部标题
  12753. title: {
  12754. type: String,
  12755. default: defprops.picker.title
  12756. },
  12757. // 对象数组,设置每一列的数据
  12758. columns: {
  12759. type: Array,
  12760. default: defprops.picker.columns
  12761. },
  12762. // 是否显示加载中状态
  12763. loading: {
  12764. type: Boolean,
  12765. default: defprops.picker.loading
  12766. },
  12767. // 各列中,单个选项的高度
  12768. itemHeight: {
  12769. type: [String, Number],
  12770. default: defprops.picker.itemHeight
  12771. },
  12772. // 取消按钮的文字
  12773. cancelText: {
  12774. type: String,
  12775. default: defprops.picker.cancelText
  12776. },
  12777. // 确认按钮的文字
  12778. confirmText: {
  12779. type: String,
  12780. default: defprops.picker.confirmText
  12781. },
  12782. // 取消按钮的颜色
  12783. cancelColor: {
  12784. type: String,
  12785. default: defprops.picker.cancelColor
  12786. },
  12787. // 确认按钮的颜色
  12788. confirmColor: {
  12789. type: String,
  12790. default: defprops.picker.confirmColor
  12791. },
  12792. // 每列中可见选项的数量
  12793. visibleItemCount: {
  12794. type: [String, Number],
  12795. default: defprops.picker.visibleItemCount
  12796. },
  12797. // 选项对象中,需要展示的属性键名
  12798. keyName: {
  12799. type: String,
  12800. default: defprops.picker.keyName
  12801. },
  12802. // 是否允许点击遮罩关闭选择器
  12803. closeOnClickOverlay: {
  12804. type: Boolean,
  12805. default: defprops.picker.closeOnClickOverlay
  12806. },
  12807. // 各列的默认索引
  12808. defaultIndex: {
  12809. type: Array,
  12810. default: defprops.picker.defaultIndex
  12811. },
  12812. // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
  12813. immediateChange: {
  12814. type: Boolean,
  12815. default: defprops.picker.immediateChange
  12816. }
  12817. }
  12818. };
  12819. const props$b = {
  12820. props: {
  12821. // 返回顶部的形状,circle-圆形,square-方形
  12822. mode: {
  12823. type: String,
  12824. default: defprops.backtop.mode
  12825. },
  12826. // 自定义图标
  12827. icon: {
  12828. type: String,
  12829. default: defprops.backtop.icon
  12830. },
  12831. // 提示文字
  12832. text: {
  12833. type: String,
  12834. default: defprops.backtop.text
  12835. },
  12836. // 返回顶部滚动时间
  12837. duration: {
  12838. type: [String, Number],
  12839. default: defprops.backtop.duration
  12840. },
  12841. // 滚动距离
  12842. scrollTop: {
  12843. type: [String, Number],
  12844. default: defprops.backtop.scrollTop
  12845. },
  12846. // 距离顶部多少距离显示,单位px
  12847. top: {
  12848. type: [String, Number],
  12849. default: defprops.backtop.top
  12850. },
  12851. // 返回顶部按钮到底部的距离,单位px
  12852. bottom: {
  12853. type: [String, Number],
  12854. default: defprops.backtop.bottom
  12855. },
  12856. // 返回顶部按钮到右边的距离,单位px
  12857. right: {
  12858. type: [String, Number],
  12859. default: defprops.backtop.right
  12860. },
  12861. // 层级
  12862. zIndex: {
  12863. type: [String, Number],
  12864. default: defprops.backtop.zIndex
  12865. },
  12866. // 图标的样式,对象形式
  12867. iconStyle: {
  12868. type: Object,
  12869. default: defprops.backtop.iconStyle
  12870. }
  12871. }
  12872. };
  12873. const props$a = {
  12874. props: {
  12875. // 是否打开组件
  12876. show: {
  12877. type: Boolean,
  12878. default: defprops.datetimePicker.show
  12879. },
  12880. // 是否展示顶部的操作栏
  12881. showToolbar: {
  12882. type: Boolean,
  12883. default: defprops.datetimePicker.showToolbar
  12884. },
  12885. // 绑定值
  12886. modelValue: {
  12887. type: [String, Number],
  12888. default: defprops.datetimePicker.value
  12889. },
  12890. // 顶部标题
  12891. title: {
  12892. type: String,
  12893. default: defprops.datetimePicker.title
  12894. },
  12895. // 展示格式,mode=date为日期选择,mode=time为时间选择,mode=year-month为年月选择,mode=datetime为日期时间选择
  12896. mode: {
  12897. type: String,
  12898. default: defprops.datetimePicker.mode
  12899. },
  12900. // 可选的最大时间
  12901. maxDate: {
  12902. type: Number,
  12903. // 最大默认值为后10年
  12904. default: defprops.datetimePicker.maxDate
  12905. },
  12906. // 可选的最小时间
  12907. minDate: {
  12908. type: Number,
  12909. // 最小默认值为前10年
  12910. default: defprops.datetimePicker.minDate
  12911. },
  12912. // 可选的最小小时,仅mode=time有效
  12913. minHour: {
  12914. type: Number,
  12915. default: defprops.datetimePicker.minHour
  12916. },
  12917. // 可选的最大小时,仅mode=time有效
  12918. maxHour: {
  12919. type: Number,
  12920. default: defprops.datetimePicker.maxHour
  12921. },
  12922. // 可选的最小分钟,仅mode=time有效
  12923. minMinute: {
  12924. type: Number,
  12925. default: defprops.datetimePicker.minMinute
  12926. },
  12927. // 可选的最大分钟,仅mode=time有效
  12928. maxMinute: {
  12929. type: Number,
  12930. default: defprops.datetimePicker.maxMinute
  12931. },
  12932. // 选项过滤函数
  12933. filter: {
  12934. type: [Function, null],
  12935. default: defprops.datetimePicker.filter
  12936. },
  12937. // 选项格式化函数
  12938. formatter: {
  12939. type: [Function, null],
  12940. default: defprops.datetimePicker.formatter
  12941. },
  12942. // 是否显示加载中状态
  12943. loading: {
  12944. type: Boolean,
  12945. default: defprops.datetimePicker.loading
  12946. },
  12947. // 各列中,单个选项的高度
  12948. itemHeight: {
  12949. type: [String, Number],
  12950. default: defprops.datetimePicker.itemHeight
  12951. },
  12952. // 取消按钮的文字
  12953. cancelText: {
  12954. type: String,
  12955. default: defprops.datetimePicker.cancelText
  12956. },
  12957. // 确认按钮的文字
  12958. confirmText: {
  12959. type: String,
  12960. default: defprops.datetimePicker.confirmText
  12961. },
  12962. // 取消按钮的颜色
  12963. cancelColor: {
  12964. type: String,
  12965. default: defprops.datetimePicker.cancelColor
  12966. },
  12967. // 确认按钮的颜色
  12968. confirmColor: {
  12969. type: String,
  12970. default: defprops.datetimePicker.confirmColor
  12971. },
  12972. // 每列中可见选项的数量
  12973. visibleItemCount: {
  12974. type: [String, Number],
  12975. default: defprops.datetimePicker.visibleItemCount
  12976. },
  12977. // 是否允许点击遮罩关闭选择器
  12978. closeOnClickOverlay: {
  12979. type: Boolean,
  12980. default: defprops.datetimePicker.closeOnClickOverlay
  12981. },
  12982. // 各列的默认索引
  12983. defaultIndex: {
  12984. type: Array,
  12985. default: defprops.datetimePicker.defaultIndex
  12986. }
  12987. }
  12988. };
  12989. var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
  12990. var dayjs_minExports = {};
  12991. var dayjs_min = {
  12992. get exports() {
  12993. return dayjs_minExports;
  12994. },
  12995. set exports(v) {
  12996. dayjs_minExports = v;
  12997. }
  12998. };
  12999. (function(module2, exports2) {
  13000. !function(t2, e2) {
  13001. module2.exports = e2();
  13002. }(commonjsGlobal, function() {
  13003. var t2 = 1e3, e2 = 6e4, n2 = 36e5, r = "millisecond", i = "second", s2 = "minute", u = "hour", a = "day", o2 = "week", f2 = "month", h = "quarter", c = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
  13004. var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
  13005. return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
  13006. } }, m = function(t3, e3, n3) {
  13007. var r2 = String(t3);
  13008. return !r2 || r2.length >= e3 ? t3 : "" + Array(e3 + 1 - r2.length).join(n3) + t3;
  13009. }, v = { s: m, z: function(t3) {
  13010. var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r2 = Math.floor(n3 / 60), i2 = n3 % 60;
  13011. return (e3 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
  13012. }, m: function t3(e3, n3) {
  13013. if (e3.date() < n3.date())
  13014. return -t3(n3, e3);
  13015. var r2 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i2 = e3.clone().add(r2, f2), s3 = n3 - i2 < 0, u2 = e3.clone().add(r2 + (s3 ? -1 : 1), f2);
  13016. return +(-(r2 + (n3 - i2) / (s3 ? i2 - u2 : u2 - i2)) || 0);
  13017. }, a: function(t3) {
  13018. return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
  13019. }, p: function(t3) {
  13020. return { M: f2, y: c, w: o2, d: a, D: d, h: u, m: s2, s: i, ms: r, Q: h }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
  13021. }, u: function(t3) {
  13022. return void 0 === t3;
  13023. } }, g = "en", D = {};
  13024. D[g] = M;
  13025. var p2 = function(t3) {
  13026. return t3 instanceof _;
  13027. }, S = function t3(e3, n3, r2) {
  13028. var i2;
  13029. if (!e3)
  13030. return g;
  13031. if ("string" == typeof e3) {
  13032. var s3 = e3.toLowerCase();
  13033. D[s3] && (i2 = s3), n3 && (D[s3] = n3, i2 = s3);
  13034. var u2 = e3.split("-");
  13035. if (!i2 && u2.length > 1)
  13036. return t3(u2[0]);
  13037. } else {
  13038. var a2 = e3.name;
  13039. D[a2] = e3, i2 = a2;
  13040. }
  13041. return !r2 && i2 && (g = i2), i2 || !r2 && g;
  13042. }, w = function(t3, e3) {
  13043. if (p2(t3))
  13044. return t3.clone();
  13045. var n3 = "object" == typeof e3 ? e3 : {};
  13046. return n3.date = t3, n3.args = arguments, new _(n3);
  13047. }, O = v;
  13048. O.l = S, O.i = p2, O.w = function(t3, e3) {
  13049. return w(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
  13050. };
  13051. var _ = function() {
  13052. function M2(t3) {
  13053. this.$L = S(t3.locale, null, true), this.parse(t3);
  13054. }
  13055. var m2 = M2.prototype;
  13056. return m2.parse = function(t3) {
  13057. this.$d = function(t4) {
  13058. var e3 = t4.date, n3 = t4.utc;
  13059. if (null === e3)
  13060. return new Date(NaN);
  13061. if (O.u(e3))
  13062. return new Date();
  13063. if (e3 instanceof Date)
  13064. return new Date(e3);
  13065. if ("string" == typeof e3 && !/Z$/i.test(e3)) {
  13066. var r2 = e3.match($);
  13067. if (r2) {
  13068. var i2 = r2[2] - 1 || 0, s3 = (r2[7] || "0").substring(0, 3);
  13069. return n3 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s3)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s3);
  13070. }
  13071. }
  13072. return new Date(e3);
  13073. }(t3), this.$x = t3.x || {}, this.init();
  13074. }, m2.init = function() {
  13075. var t3 = this.$d;
  13076. this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
  13077. }, m2.$utils = function() {
  13078. return O;
  13079. }, m2.isValid = function() {
  13080. return !(this.$d.toString() === l);
  13081. }, m2.isSame = function(t3, e3) {
  13082. var n3 = w(t3);
  13083. return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
  13084. }, m2.isAfter = function(t3, e3) {
  13085. return w(t3) < this.startOf(e3);
  13086. }, m2.isBefore = function(t3, e3) {
  13087. return this.endOf(e3) < w(t3);
  13088. }, m2.$g = function(t3, e3, n3) {
  13089. return O.u(t3) ? this[e3] : this.set(n3, t3);
  13090. }, m2.unix = function() {
  13091. return Math.floor(this.valueOf() / 1e3);
  13092. }, m2.valueOf = function() {
  13093. return this.$d.getTime();
  13094. }, m2.startOf = function(t3, e3) {
  13095. var n3 = this, r2 = !!O.u(e3) || e3, h2 = O.p(t3), l2 = function(t4, e4) {
  13096. var i2 = O.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
  13097. return r2 ? i2 : i2.endOf(a);
  13098. }, $2 = function(t4, e4) {
  13099. return O.w(n3.toDate()[t4].apply(n3.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
  13100. }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
  13101. switch (h2) {
  13102. case c:
  13103. return r2 ? l2(1, 0) : l2(31, 11);
  13104. case f2:
  13105. return r2 ? l2(1, M3) : l2(0, M3 + 1);
  13106. case o2:
  13107. var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
  13108. return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
  13109. case a:
  13110. case d:
  13111. return $2(v2 + "Hours", 0);
  13112. case u:
  13113. return $2(v2 + "Minutes", 1);
  13114. case s2:
  13115. return $2(v2 + "Seconds", 2);
  13116. case i:
  13117. return $2(v2 + "Milliseconds", 3);
  13118. default:
  13119. return this.clone();
  13120. }
  13121. }, m2.endOf = function(t3) {
  13122. return this.startOf(t3, false);
  13123. }, m2.$set = function(t3, e3) {
  13124. var n3, o3 = O.p(t3), h2 = "set" + (this.$u ? "UTC" : ""), l2 = (n3 = {}, n3[a] = h2 + "Date", n3[d] = h2 + "Date", n3[f2] = h2 + "Month", n3[c] = h2 + "FullYear", n3[u] = h2 + "Hours", n3[s2] = h2 + "Minutes", n3[i] = h2 + "Seconds", n3[r] = h2 + "Milliseconds", n3)[o3], $2 = o3 === a ? this.$D + (e3 - this.$W) : e3;
  13125. if (o3 === f2 || o3 === c) {
  13126. var y2 = this.clone().set(d, 1);
  13127. y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
  13128. } else
  13129. l2 && this.$d[l2]($2);
  13130. return this.init(), this;
  13131. }, m2.set = function(t3, e3) {
  13132. return this.clone().$set(t3, e3);
  13133. }, m2.get = function(t3) {
  13134. return this[O.p(t3)]();
  13135. }, m2.add = function(r2, h2) {
  13136. var d2, l2 = this;
  13137. r2 = Number(r2);
  13138. var $2 = O.p(h2), y2 = function(t3) {
  13139. var e3 = w(l2);
  13140. return O.w(e3.date(e3.date() + Math.round(t3 * r2)), l2);
  13141. };
  13142. if ($2 === f2)
  13143. return this.set(f2, this.$M + r2);
  13144. if ($2 === c)
  13145. return this.set(c, this.$y + r2);
  13146. if ($2 === a)
  13147. return y2(1);
  13148. if ($2 === o2)
  13149. return y2(7);
  13150. var M3 = (d2 = {}, d2[s2] = e2, d2[u] = n2, d2[i] = t2, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
  13151. return O.w(m3, this);
  13152. }, m2.subtract = function(t3, e3) {
  13153. return this.add(-1 * t3, e3);
  13154. }, m2.format = function(t3) {
  13155. var e3 = this, n3 = this.$locale();
  13156. if (!this.isValid())
  13157. return n3.invalidDate || l;
  13158. var r2 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i2 = O.z(this), s3 = this.$H, u2 = this.$m, a2 = this.$M, o3 = n3.weekdays, f3 = n3.months, h2 = function(t4, n4, i3, s4) {
  13159. return t4 && (t4[n4] || t4(e3, r2)) || i3[n4].slice(0, s4);
  13160. }, c2 = function(t4) {
  13161. return O.s(s3 % 12 || 12, t4, "0");
  13162. }, d2 = n3.meridiem || function(t4, e4, n4) {
  13163. var r3 = t4 < 12 ? "AM" : "PM";
  13164. return n4 ? r3.toLowerCase() : r3;
  13165. }, $2 = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: a2 + 1, MM: O.s(a2 + 1, 2, "0"), MMM: h2(n3.monthsShort, a2, f3, 3), MMMM: h2(f3, a2), D: this.$D, DD: O.s(this.$D, 2, "0"), d: String(this.$W), dd: h2(n3.weekdaysMin, this.$W, o3, 2), ddd: h2(n3.weekdaysShort, this.$W, o3, 3), dddd: o3[this.$W], H: String(s3), HH: O.s(s3, 2, "0"), h: c2(1), hh: c2(2), a: d2(s3, u2, true), A: d2(s3, u2, false), m: String(u2), mm: O.s(u2, 2, "0"), s: String(this.$s), ss: O.s(this.$s, 2, "0"), SSS: O.s(this.$ms, 3, "0"), Z: i2 };
  13166. return r2.replace(y, function(t4, e4) {
  13167. return e4 || $2[t4] || i2.replace(":", "");
  13168. });
  13169. }, m2.utcOffset = function() {
  13170. return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
  13171. }, m2.diff = function(r2, d2, l2) {
  13172. var $2, y2 = O.p(d2), M3 = w(r2), m3 = (M3.utcOffset() - this.utcOffset()) * e2, v2 = this - M3, g2 = O.m(this, M3);
  13173. return g2 = ($2 = {}, $2[c] = g2 / 12, $2[f2] = g2, $2[h] = g2 / 3, $2[o2] = (v2 - m3) / 6048e5, $2[a] = (v2 - m3) / 864e5, $2[u] = v2 / n2, $2[s2] = v2 / e2, $2[i] = v2 / t2, $2)[y2] || v2, l2 ? g2 : O.a(g2);
  13174. }, m2.daysInMonth = function() {
  13175. return this.endOf(f2).$D;
  13176. }, m2.$locale = function() {
  13177. return D[this.$L];
  13178. }, m2.locale = function(t3, e3) {
  13179. if (!t3)
  13180. return this.$L;
  13181. var n3 = this.clone(), r2 = S(t3, e3, true);
  13182. return r2 && (n3.$L = r2), n3;
  13183. }, m2.clone = function() {
  13184. return O.w(this.$d, this);
  13185. }, m2.toDate = function() {
  13186. return new Date(this.valueOf());
  13187. }, m2.toJSON = function() {
  13188. return this.isValid() ? this.toISOString() : null;
  13189. }, m2.toISOString = function() {
  13190. return this.$d.toISOString();
  13191. }, m2.toString = function() {
  13192. return this.$d.toUTCString();
  13193. }, M2;
  13194. }(), T = _.prototype;
  13195. return w.prototype = T, [["$ms", r], ["$s", i], ["$m", s2], ["$H", u], ["$W", a], ["$M", f2], ["$y", c], ["$D", d]].forEach(function(t3) {
  13196. T[t3[1]] = function(e3) {
  13197. return this.$g(e3, t3[0], t3[1]);
  13198. };
  13199. }), w.extend = function(t3, e3) {
  13200. return t3.$i || (t3(e3, _, w), t3.$i = true), w;
  13201. }, w.locale = S, w.isDayjs = p2, w.unix = function(t3) {
  13202. return w(1e3 * t3);
  13203. }, w.en = D[g], w.Ls = D, w.p = {}, w;
  13204. });
  13205. })(dayjs_min);
  13206. const dayjs = dayjs_minExports;
  13207. const props$9 = {
  13208. props: {
  13209. // 是否显示圆点
  13210. isDot: {
  13211. type: Boolean,
  13212. default: defprops.badge.isDot
  13213. },
  13214. // 显示的内容
  13215. value: {
  13216. type: [Number, String],
  13217. default: defprops.badge.value
  13218. },
  13219. // 显示的内容
  13220. modelValue: {
  13221. type: [Number, String],
  13222. default: defprops.badge.modelValue
  13223. },
  13224. // 是否显示
  13225. show: {
  13226. type: Boolean,
  13227. default: defprops.badge.show
  13228. },
  13229. // 最大值,超过最大值会显示 '{max}+'
  13230. max: {
  13231. type: [Number, String],
  13232. default: defprops.badge.max
  13233. },
  13234. // 主题类型,error|warning|success|primary
  13235. type: {
  13236. type: String,
  13237. default: defprops.badge.type
  13238. },
  13239. // 当数值为 0 时,是否展示 Badge
  13240. showZero: {
  13241. type: Boolean,
  13242. default: defprops.badge.showZero
  13243. },
  13244. // 背景颜色,优先级比type高,如设置,type参数会失效
  13245. bgColor: {
  13246. type: [String, null],
  13247. default: defprops.badge.bgColor
  13248. },
  13249. // 字体颜色
  13250. color: {
  13251. type: [String, null],
  13252. default: defprops.badge.color
  13253. },
  13254. // 徽标形状,circle-四角均为圆角,horn-左下角为直角
  13255. shape: {
  13256. type: String,
  13257. default: defprops.badge.shape
  13258. },
  13259. // 设置数字的显示方式,overflow|ellipsis|limit
  13260. // overflow会根据max字段判断,超出显示`${max}+`
  13261. // ellipsis会根据max判断,超出显示`${max}...`
  13262. // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
  13263. numberType: {
  13264. type: String,
  13265. default: defprops.badge.numberType
  13266. },
  13267. // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
  13268. offset: {
  13269. type: Array,
  13270. default: defprops.badge.offset
  13271. },
  13272. // 是否反转背景和字体颜色
  13273. inverted: {
  13274. type: Boolean,
  13275. default: defprops.badge.inverted
  13276. },
  13277. // 是否绝对定位
  13278. absolute: {
  13279. type: Boolean,
  13280. default: defprops.badge.absolute
  13281. }
  13282. }
  13283. };
  13284. const props$8 = {
  13285. props: {}
  13286. };
  13287. const props$7 = {
  13288. props: {
  13289. // 列表数组,元素可为字符串,如为对象可通过keyName指定目标属性名
  13290. list: {
  13291. type: Array,
  13292. default: defprops.swiper.list
  13293. },
  13294. // 是否显示面板指示器
  13295. indicator: {
  13296. type: Boolean,
  13297. default: defprops.swiper.indicator
  13298. },
  13299. // 指示器非激活颜色
  13300. indicatorActiveColor: {
  13301. type: String,
  13302. default: defprops.swiper.indicatorActiveColor
  13303. },
  13304. // 指示器的激活颜色
  13305. indicatorInactiveColor: {
  13306. type: String,
  13307. default: defprops.swiper.indicatorInactiveColor
  13308. },
  13309. // 指示器样式,可通过bottom,left,right进行定位
  13310. indicatorStyle: {
  13311. type: [String, Object],
  13312. default: defprops.swiper.indicatorStyle
  13313. },
  13314. // 指示器模式,line-线型,dot-点型
  13315. indicatorMode: {
  13316. type: String,
  13317. default: defprops.swiper.indicatorMode
  13318. },
  13319. // 是否自动切换
  13320. autoplay: {
  13321. type: Boolean,
  13322. default: defprops.swiper.autoplay
  13323. },
  13324. // 当前所在滑块的 index
  13325. current: {
  13326. type: [String, Number],
  13327. default: defprops.swiper.current
  13328. },
  13329. // 当前所在滑块的 item-id ,不能与 current 被同时指定
  13330. currentItemId: {
  13331. type: String,
  13332. default: defprops.swiper.currentItemId
  13333. },
  13334. // 滑块自动切换时间间隔
  13335. interval: {
  13336. type: [String, Number],
  13337. default: defprops.swiper.interval
  13338. },
  13339. // 滑块切换过程所需时间
  13340. duration: {
  13341. type: [String, Number],
  13342. default: defprops.swiper.duration
  13343. },
  13344. // 播放到末尾后是否重新回到开头
  13345. circular: {
  13346. type: Boolean,
  13347. default: defprops.swiper.circular
  13348. },
  13349. // 前边距,可用于露出前一项的一小部分,nvue和支付宝不支持
  13350. previousMargin: {
  13351. type: [String, Number],
  13352. default: defprops.swiper.previousMargin
  13353. },
  13354. // 后边距,可用于露出后一项的一小部分,nvue和支付宝不支持
  13355. nextMargin: {
  13356. type: [String, Number],
  13357. default: defprops.swiper.nextMargin
  13358. },
  13359. // 当开启时,会根据滑动速度,连续滑动多屏,支付宝不支持
  13360. acceleration: {
  13361. type: Boolean,
  13362. default: defprops.swiper.acceleration
  13363. },
  13364. // 同时显示的滑块数量,nvue、支付宝小程序不支持
  13365. displayMultipleItems: {
  13366. type: Number,
  13367. default: defprops.swiper.displayMultipleItems
  13368. },
  13369. // 指定swiper切换缓动动画类型,有效值:default、linear、easeInCubic、easeOutCubic、easeInOutCubic
  13370. // 只对微信小程序有效
  13371. easingFunction: {
  13372. type: String,
  13373. default: defprops.swiper.easingFunction
  13374. },
  13375. // list数组中指定对象的目标属性名
  13376. keyName: {
  13377. type: String,
  13378. default: defprops.swiper.keyName
  13379. },
  13380. // 图片的裁剪模式
  13381. imgMode: {
  13382. type: String,
  13383. default: defprops.swiper.imgMode
  13384. },
  13385. // 组件高度
  13386. height: {
  13387. type: [String, Number],
  13388. default: defprops.swiper.height
  13389. },
  13390. // 背景颜色
  13391. bgColor: {
  13392. type: String,
  13393. default: defprops.swiper.bgColor
  13394. },
  13395. // 组件圆角,数值或带单位的字符串
  13396. radius: {
  13397. type: [String, Number],
  13398. default: defprops.swiper.radius
  13399. },
  13400. // 是否加载中
  13401. loading: {
  13402. type: Boolean,
  13403. default: defprops.swiper.loading
  13404. },
  13405. // 是否显示标题,要求数组对象中有title属性
  13406. showTitle: {
  13407. type: Boolean,
  13408. default: defprops.swiper.showTitle
  13409. }
  13410. }
  13411. };
  13412. const props$6 = {
  13413. props: {
  13414. bgColor: {
  13415. type: String,
  13416. default: defprops.statusBar.bgColor
  13417. }
  13418. }
  13419. };
  13420. const props$5 = {
  13421. props: {
  13422. color: {
  13423. type: String,
  13424. default: defprops.line.color
  13425. },
  13426. // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
  13427. length: {
  13428. type: [String, Number],
  13429. default: defprops.line.length
  13430. },
  13431. // 线条方向,col-竖向,row-横向
  13432. direction: {
  13433. type: String,
  13434. default: defprops.line.direction
  13435. },
  13436. // 是否显示细边框
  13437. hairline: {
  13438. type: Boolean,
  13439. default: defprops.line.hairline
  13440. },
  13441. // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
  13442. margin: {
  13443. type: [String, Number],
  13444. default: defprops.line.margin
  13445. },
  13446. // 是否虚线,true-虚线,false-实线
  13447. dashed: {
  13448. type: Boolean,
  13449. default: defprops.line.dashed
  13450. }
  13451. }
  13452. };
  13453. const props$4 = {
  13454. props: {
  13455. // 是否显示组件
  13456. show: {
  13457. type: Boolean,
  13458. default: defprops.loadingIcon.show
  13459. },
  13460. // 颜色
  13461. color: {
  13462. type: String,
  13463. default: defprops.loadingIcon.color
  13464. },
  13465. // 提示文字颜色
  13466. textColor: {
  13467. type: String,
  13468. default: defprops.loadingIcon.textColor
  13469. },
  13470. // 文字和图标是否垂直排列
  13471. vertical: {
  13472. type: Boolean,
  13473. default: defprops.loadingIcon.vertical
  13474. },
  13475. // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
  13476. mode: {
  13477. type: String,
  13478. default: defprops.loadingIcon.mode
  13479. },
  13480. // 图标大小,单位默认px
  13481. size: {
  13482. type: [String, Number],
  13483. default: defprops.loadingIcon.size
  13484. },
  13485. // 文字大小
  13486. textSize: {
  13487. type: [String, Number],
  13488. default: defprops.loadingIcon.textSize
  13489. },
  13490. // 文字内容
  13491. text: {
  13492. type: [String, Number],
  13493. default: defprops.loadingIcon.text
  13494. },
  13495. // 动画模式
  13496. timingFunction: {
  13497. type: String,
  13498. default: defprops.loadingIcon.timingFunction
  13499. },
  13500. // 动画执行周期时间
  13501. duration: {
  13502. type: [String, Number],
  13503. default: defprops.loadingIcon.duration
  13504. },
  13505. // mode=circle时的暗边颜色
  13506. inactiveColor: {
  13507. type: String,
  13508. default: defprops.loadingIcon.inactiveColor
  13509. }
  13510. }
  13511. };
  13512. const props$3 = {
  13513. props: {
  13514. // 是否显示遮罩
  13515. show: {
  13516. type: Boolean,
  13517. default: defprops.overlay.show
  13518. },
  13519. // 层级z-index
  13520. zIndex: {
  13521. type: [String, Number],
  13522. default: defprops.overlay.zIndex
  13523. },
  13524. // 遮罩的过渡时间,单位为ms
  13525. duration: {
  13526. type: [String, Number],
  13527. default: defprops.overlay.duration
  13528. },
  13529. // 不透明度值,当做rgba的第四个参数
  13530. opacity: {
  13531. type: [String, Number],
  13532. default: defprops.overlay.opacity
  13533. }
  13534. }
  13535. };
  13536. const props$2 = {
  13537. props: {
  13538. // 是否展示组件
  13539. show: {
  13540. type: Boolean,
  13541. default: defprops.transition.show
  13542. },
  13543. // 使用的动画模式
  13544. mode: {
  13545. type: String,
  13546. default: defprops.transition.mode
  13547. },
  13548. // 动画的执行时间,单位ms
  13549. duration: {
  13550. type: [String, Number],
  13551. default: defprops.transition.duration
  13552. },
  13553. // 使用的动画过渡函数
  13554. timingFunction: {
  13555. type: String,
  13556. default: defprops.transition.timingFunction
  13557. }
  13558. }
  13559. };
  13560. const getClassNames = (name) => ({
  13561. enter: `u-${name}-enter u-${name}-enter-active`,
  13562. "enter-to": `u-${name}-enter-to u-${name}-enter-active`,
  13563. leave: `u-${name}-leave u-${name}-leave-active`,
  13564. "leave-to": `u-${name}-leave-to u-${name}-leave-active`
  13565. });
  13566. const transition = {
  13567. methods: {
  13568. // 组件被点击发出事件
  13569. clickHandler() {
  13570. this.$emit("click");
  13571. },
  13572. // vue版本的组件进场处理
  13573. vueEnter() {
  13574. const classNames = getClassNames(this.mode);
  13575. this.status = "enter";
  13576. this.$emit("beforeEnter");
  13577. this.inited = true;
  13578. this.display = true;
  13579. this.classes = classNames.enter;
  13580. this.$nextTick(async () => {
  13581. this.$emit("enter");
  13582. this.transitionEnded = false;
  13583. this.$emit("afterEnter");
  13584. this.classes = classNames["enter-to"];
  13585. });
  13586. },
  13587. // 动画离场处理
  13588. vueLeave() {
  13589. if (!this.display)
  13590. return;
  13591. const classNames = getClassNames(this.mode);
  13592. this.status = "leave";
  13593. this.$emit("beforeLeave");
  13594. this.classes = classNames.leave;
  13595. this.$nextTick(() => {
  13596. this.transitionEnded = false;
  13597. this.$emit("leave");
  13598. setTimeout(this.onTransitionEnd, this.duration);
  13599. this.classes = classNames["leave-to"];
  13600. });
  13601. },
  13602. // 完成过渡后触发
  13603. onTransitionEnd() {
  13604. if (this.transitionEnded)
  13605. return;
  13606. this.transitionEnded = true;
  13607. this.$emit(this.status === "leave" ? "afterLeave" : "afterEnter");
  13608. if (!this.show && this.display) {
  13609. this.display = false;
  13610. this.inited = false;
  13611. }
  13612. }
  13613. }
  13614. };
  13615. const formatRegExp = /%[sdj%]/g;
  13616. let warning = function warning2() {
  13617. };
  13618. if (typeof process !== "undefined" && process.env && true && typeof window !== "undefined" && typeof document !== "undefined") {
  13619. warning = function warning3(type2, errors) {
  13620. if (typeof console !== "undefined" && console.warn) {
  13621. if (errors.every((e2) => typeof e2 === "string")) {
  13622. console.warn(type2, errors);
  13623. }
  13624. }
  13625. };
  13626. }
  13627. function convertFieldsError(errors) {
  13628. if (!errors || !errors.length)
  13629. return null;
  13630. const fields = {};
  13631. errors.forEach((error2) => {
  13632. const { field } = error2;
  13633. fields[field] = fields[field] || [];
  13634. fields[field].push(error2);
  13635. });
  13636. return fields;
  13637. }
  13638. function format() {
  13639. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  13640. args[_key] = arguments[_key];
  13641. }
  13642. let i = 1;
  13643. const f2 = args[0];
  13644. const len = args.length;
  13645. if (typeof f2 === "function") {
  13646. return f2.apply(null, args.slice(1));
  13647. }
  13648. if (typeof f2 === "string") {
  13649. let str = String(f2).replace(formatRegExp, (x) => {
  13650. if (x === "%%") {
  13651. return "%";
  13652. }
  13653. if (i >= len) {
  13654. return x;
  13655. }
  13656. switch (x) {
  13657. case "%s":
  13658. return String(args[i++]);
  13659. case "%d":
  13660. return Number(args[i++]);
  13661. case "%j":
  13662. try {
  13663. return JSON.stringify(args[i++]);
  13664. } catch (_) {
  13665. return "[Circular]";
  13666. }
  13667. break;
  13668. default:
  13669. return x;
  13670. }
  13671. });
  13672. for (let arg = args[i]; i < len; arg = args[++i]) {
  13673. str += ` ${arg}`;
  13674. }
  13675. return str;
  13676. }
  13677. return f2;
  13678. }
  13679. function isNativeStringType(type2) {
  13680. return type2 === "string" || type2 === "url" || type2 === "hex" || type2 === "email" || type2 === "pattern";
  13681. }
  13682. function isEmptyValue(value, type2) {
  13683. if (value === void 0 || value === null) {
  13684. return true;
  13685. }
  13686. if (type2 === "array" && Array.isArray(value) && !value.length) {
  13687. return true;
  13688. }
  13689. if (isNativeStringType(type2) && typeof value === "string" && !value) {
  13690. return true;
  13691. }
  13692. return false;
  13693. }
  13694. function asyncParallelArray(arr, func2, callback) {
  13695. const results = [];
  13696. let total = 0;
  13697. const arrLength = arr.length;
  13698. function count(errors) {
  13699. results.push.apply(results, errors);
  13700. total++;
  13701. if (total === arrLength) {
  13702. callback(results);
  13703. }
  13704. }
  13705. arr.forEach((a) => {
  13706. func2(a, count);
  13707. });
  13708. }
  13709. function asyncSerialArray(arr, func2, callback) {
  13710. let index2 = 0;
  13711. const arrLength = arr.length;
  13712. function next(errors) {
  13713. if (errors && errors.length) {
  13714. callback(errors);
  13715. return;
  13716. }
  13717. const original = index2;
  13718. index2 += 1;
  13719. if (original < arrLength) {
  13720. func2(arr[original], next);
  13721. } else {
  13722. callback([]);
  13723. }
  13724. }
  13725. next([]);
  13726. }
  13727. function flattenObjArr(objArr) {
  13728. const ret = [];
  13729. Object.keys(objArr).forEach((k) => {
  13730. ret.push.apply(ret, objArr[k]);
  13731. });
  13732. return ret;
  13733. }
  13734. function asyncMap(objArr, option, func2, callback) {
  13735. if (option.first) {
  13736. const _pending = new Promise((resolve2, reject) => {
  13737. const next = function next2(errors) {
  13738. callback(errors);
  13739. return errors.length ? reject({
  13740. errors,
  13741. fields: convertFieldsError(errors)
  13742. }) : resolve2();
  13743. };
  13744. const flattenArr = flattenObjArr(objArr);
  13745. asyncSerialArray(flattenArr, func2, next);
  13746. });
  13747. _pending.catch((e2) => e2);
  13748. return _pending;
  13749. }
  13750. let firstFields = option.firstFields || [];
  13751. if (firstFields === true) {
  13752. firstFields = Object.keys(objArr);
  13753. }
  13754. const objArrKeys = Object.keys(objArr);
  13755. const objArrLength = objArrKeys.length;
  13756. let total = 0;
  13757. const results = [];
  13758. const pending = new Promise((resolve2, reject) => {
  13759. const next = function next2(errors) {
  13760. results.push.apply(results, errors);
  13761. total++;
  13762. if (total === objArrLength) {
  13763. callback(results);
  13764. return results.length ? reject({
  13765. errors: results,
  13766. fields: convertFieldsError(results)
  13767. }) : resolve2();
  13768. }
  13769. };
  13770. if (!objArrKeys.length) {
  13771. callback(results);
  13772. resolve2();
  13773. }
  13774. objArrKeys.forEach((key) => {
  13775. const arr = objArr[key];
  13776. if (firstFields.indexOf(key) !== -1) {
  13777. asyncSerialArray(arr, func2, next);
  13778. } else {
  13779. asyncParallelArray(arr, func2, next);
  13780. }
  13781. });
  13782. });
  13783. pending.catch((e2) => e2);
  13784. return pending;
  13785. }
  13786. function complementError(rule) {
  13787. return function(oe) {
  13788. if (oe && oe.message) {
  13789. oe.field = oe.field || rule.fullField;
  13790. return oe;
  13791. }
  13792. return {
  13793. message: typeof oe === "function" ? oe() : oe,
  13794. field: oe.field || rule.fullField
  13795. };
  13796. };
  13797. }
  13798. function deepMerge(target, source) {
  13799. if (source) {
  13800. for (const s2 in source) {
  13801. if (source.hasOwnProperty(s2)) {
  13802. const value = source[s2];
  13803. if (typeof value === "object" && typeof target[s2] === "object") {
  13804. target[s2] = { ...target[s2], ...value };
  13805. } else {
  13806. target[s2] = value;
  13807. }
  13808. }
  13809. }
  13810. }
  13811. return target;
  13812. }
  13813. function required(rule, value, source, errors, options, type2) {
  13814. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type2 || rule.type))) {
  13815. errors.push(format(options.messages.required, rule.fullField));
  13816. }
  13817. }
  13818. function whitespace(rule, value, source, errors, options) {
  13819. if (/^\s+$/.test(value) || value === "") {
  13820. errors.push(format(options.messages.whitespace, rule.fullField));
  13821. }
  13822. }
  13823. const pattern = {
  13824. // http://emailregex.com/
  13825. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  13826. url: new RegExp(
  13827. "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
  13828. "i"
  13829. ),
  13830. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  13831. };
  13832. var types = {
  13833. integer: function integer(value) {
  13834. return /^(-)?\d+$/.test(value);
  13835. },
  13836. float: function float(value) {
  13837. return /^(-)?\d+(\.\d+)?$/.test(value);
  13838. },
  13839. array: function array(value) {
  13840. return Array.isArray(value);
  13841. },
  13842. regexp: function regexp(value) {
  13843. if (value instanceof RegExp) {
  13844. return true;
  13845. }
  13846. try {
  13847. return !!new RegExp(value);
  13848. } catch (e2) {
  13849. return false;
  13850. }
  13851. },
  13852. date: function date(value) {
  13853. return typeof value.getTime === "function" && typeof value.getMonth === "function" && typeof value.getYear === "function";
  13854. },
  13855. number: function number(value) {
  13856. if (isNaN(value)) {
  13857. return false;
  13858. }
  13859. return typeof +value === "number";
  13860. },
  13861. object: function object(value) {
  13862. return typeof value === "object" && !types.array(value);
  13863. },
  13864. method: function method(value) {
  13865. return typeof value === "function";
  13866. },
  13867. email: function email2(value) {
  13868. return typeof value === "string" && !!value.match(pattern.email) && value.length < 255;
  13869. },
  13870. url: function url2(value) {
  13871. return typeof value === "string" && !!value.match(pattern.url);
  13872. },
  13873. hex: function hex(value) {
  13874. return typeof value === "string" && !!value.match(pattern.hex);
  13875. }
  13876. };
  13877. function type(rule, value, source, errors, options) {
  13878. if (rule.required && value === void 0) {
  13879. required(rule, value, source, errors, options);
  13880. return;
  13881. }
  13882. const custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"];
  13883. const ruleType = rule.type;
  13884. if (custom.indexOf(ruleType) > -1) {
  13885. if (!types[ruleType](value)) {
  13886. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  13887. }
  13888. } else if (ruleType && typeof value !== rule.type) {
  13889. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  13890. }
  13891. }
  13892. function range(rule, value, source, errors, options) {
  13893. const len = typeof rule.len === "number";
  13894. const min = typeof rule.min === "number";
  13895. const max = typeof rule.max === "number";
  13896. const spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  13897. let val = value;
  13898. let key = null;
  13899. const num = typeof value === "number";
  13900. const str = typeof value === "string";
  13901. const arr = Array.isArray(value);
  13902. if (num) {
  13903. key = "number";
  13904. } else if (str) {
  13905. key = "string";
  13906. } else if (arr) {
  13907. key = "array";
  13908. }
  13909. if (!key) {
  13910. return false;
  13911. }
  13912. if (arr) {
  13913. val = value.length;
  13914. }
  13915. if (str) {
  13916. val = value.replace(spRegexp, "_").length;
  13917. }
  13918. if (len) {
  13919. if (val !== rule.len) {
  13920. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  13921. }
  13922. } else if (min && !max && val < rule.min) {
  13923. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  13924. } else if (max && !min && val > rule.max) {
  13925. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  13926. } else if (min && max && (val < rule.min || val > rule.max)) {
  13927. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  13928. }
  13929. }
  13930. const ENUM = "enum";
  13931. function enumerable(rule, value, source, errors, options) {
  13932. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  13933. if (rule[ENUM].indexOf(value) === -1) {
  13934. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(", ")));
  13935. }
  13936. }
  13937. function pattern$1(rule, value, source, errors, options) {
  13938. if (rule.pattern) {
  13939. if (rule.pattern instanceof RegExp) {
  13940. rule.pattern.lastIndex = 0;
  13941. if (!rule.pattern.test(value)) {
  13942. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  13943. }
  13944. } else if (typeof rule.pattern === "string") {
  13945. const _pattern = new RegExp(rule.pattern);
  13946. if (!_pattern.test(value)) {
  13947. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  13948. }
  13949. }
  13950. }
  13951. }
  13952. const rules = {
  13953. required,
  13954. whitespace,
  13955. type,
  13956. range,
  13957. enum: enumerable,
  13958. pattern: pattern$1
  13959. };
  13960. function string(rule, value, callback, source, options) {
  13961. const errors = [];
  13962. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13963. if (validate2) {
  13964. if (isEmptyValue(value, "string") && !rule.required) {
  13965. return callback();
  13966. }
  13967. rules.required(rule, value, source, errors, options, "string");
  13968. if (!isEmptyValue(value, "string")) {
  13969. rules.type(rule, value, source, errors, options);
  13970. rules.range(rule, value, source, errors, options);
  13971. rules.pattern(rule, value, source, errors, options);
  13972. if (rule.whitespace === true) {
  13973. rules.whitespace(rule, value, source, errors, options);
  13974. }
  13975. }
  13976. }
  13977. callback(errors);
  13978. }
  13979. function method2(rule, value, callback, source, options) {
  13980. const errors = [];
  13981. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13982. if (validate2) {
  13983. if (isEmptyValue(value) && !rule.required) {
  13984. return callback();
  13985. }
  13986. rules.required(rule, value, source, errors, options);
  13987. if (value !== void 0) {
  13988. rules.type(rule, value, source, errors, options);
  13989. }
  13990. }
  13991. callback(errors);
  13992. }
  13993. function number2(rule, value, callback, source, options) {
  13994. const errors = [];
  13995. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  13996. if (validate2) {
  13997. if (value === "") {
  13998. value = void 0;
  13999. }
  14000. if (isEmptyValue(value) && !rule.required) {
  14001. return callback();
  14002. }
  14003. rules.required(rule, value, source, errors, options);
  14004. if (value !== void 0) {
  14005. rules.type(rule, value, source, errors, options);
  14006. rules.range(rule, value, source, errors, options);
  14007. }
  14008. }
  14009. callback(errors);
  14010. }
  14011. function _boolean(rule, value, callback, source, options) {
  14012. const errors = [];
  14013. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14014. if (validate2) {
  14015. if (isEmptyValue(value) && !rule.required) {
  14016. return callback();
  14017. }
  14018. rules.required(rule, value, source, errors, options);
  14019. if (value !== void 0) {
  14020. rules.type(rule, value, source, errors, options);
  14021. }
  14022. }
  14023. callback(errors);
  14024. }
  14025. function regexp2(rule, value, callback, source, options) {
  14026. const errors = [];
  14027. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14028. if (validate2) {
  14029. if (isEmptyValue(value) && !rule.required) {
  14030. return callback();
  14031. }
  14032. rules.required(rule, value, source, errors, options);
  14033. if (!isEmptyValue(value)) {
  14034. rules.type(rule, value, source, errors, options);
  14035. }
  14036. }
  14037. callback(errors);
  14038. }
  14039. function integer2(rule, value, callback, source, options) {
  14040. const errors = [];
  14041. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14042. if (validate2) {
  14043. if (isEmptyValue(value) && !rule.required) {
  14044. return callback();
  14045. }
  14046. rules.required(rule, value, source, errors, options);
  14047. if (value !== void 0) {
  14048. rules.type(rule, value, source, errors, options);
  14049. rules.range(rule, value, source, errors, options);
  14050. }
  14051. }
  14052. callback(errors);
  14053. }
  14054. function floatFn(rule, value, callback, source, options) {
  14055. const errors = [];
  14056. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14057. if (validate2) {
  14058. if (isEmptyValue(value) && !rule.required) {
  14059. return callback();
  14060. }
  14061. rules.required(rule, value, source, errors, options);
  14062. if (value !== void 0) {
  14063. rules.type(rule, value, source, errors, options);
  14064. rules.range(rule, value, source, errors, options);
  14065. }
  14066. }
  14067. callback(errors);
  14068. }
  14069. function array2(rule, value, callback, source, options) {
  14070. const errors = [];
  14071. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14072. if (validate2) {
  14073. if (isEmptyValue(value, "array") && !rule.required) {
  14074. return callback();
  14075. }
  14076. rules.required(rule, value, source, errors, options, "array");
  14077. if (!isEmptyValue(value, "array")) {
  14078. rules.type(rule, value, source, errors, options);
  14079. rules.range(rule, value, source, errors, options);
  14080. }
  14081. }
  14082. callback(errors);
  14083. }
  14084. function object2(rule, value, callback, source, options) {
  14085. const errors = [];
  14086. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14087. if (validate2) {
  14088. if (isEmptyValue(value) && !rule.required) {
  14089. return callback();
  14090. }
  14091. rules.required(rule, value, source, errors, options);
  14092. if (value !== void 0) {
  14093. rules.type(rule, value, source, errors, options);
  14094. }
  14095. }
  14096. callback(errors);
  14097. }
  14098. const ENUM$1 = "enum";
  14099. function enumerable$1(rule, value, callback, source, options) {
  14100. const errors = [];
  14101. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14102. if (validate2) {
  14103. if (isEmptyValue(value) && !rule.required) {
  14104. return callback();
  14105. }
  14106. rules.required(rule, value, source, errors, options);
  14107. if (value !== void 0) {
  14108. rules[ENUM$1](rule, value, source, errors, options);
  14109. }
  14110. }
  14111. callback(errors);
  14112. }
  14113. function pattern$2(rule, value, callback, source, options) {
  14114. const errors = [];
  14115. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14116. if (validate2) {
  14117. if (isEmptyValue(value, "string") && !rule.required) {
  14118. return callback();
  14119. }
  14120. rules.required(rule, value, source, errors, options);
  14121. if (!isEmptyValue(value, "string")) {
  14122. rules.pattern(rule, value, source, errors, options);
  14123. }
  14124. }
  14125. callback(errors);
  14126. }
  14127. function date2(rule, value, callback, source, options) {
  14128. const errors = [];
  14129. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14130. if (validate2) {
  14131. if (isEmptyValue(value) && !rule.required) {
  14132. return callback();
  14133. }
  14134. rules.required(rule, value, source, errors, options);
  14135. if (!isEmptyValue(value)) {
  14136. let dateObject;
  14137. if (typeof value === "number") {
  14138. dateObject = new Date(value);
  14139. } else {
  14140. dateObject = value;
  14141. }
  14142. rules.type(rule, dateObject, source, errors, options);
  14143. if (dateObject) {
  14144. rules.range(rule, dateObject.getTime(), source, errors, options);
  14145. }
  14146. }
  14147. }
  14148. callback(errors);
  14149. }
  14150. function required$1(rule, value, callback, source, options) {
  14151. const errors = [];
  14152. const type2 = Array.isArray(value) ? "array" : typeof value;
  14153. rules.required(rule, value, source, errors, options, type2);
  14154. callback(errors);
  14155. }
  14156. function type$1(rule, value, callback, source, options) {
  14157. const ruleType = rule.type;
  14158. const errors = [];
  14159. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14160. if (validate2) {
  14161. if (isEmptyValue(value, ruleType) && !rule.required) {
  14162. return callback();
  14163. }
  14164. rules.required(rule, value, source, errors, options, ruleType);
  14165. if (!isEmptyValue(value, ruleType)) {
  14166. rules.type(rule, value, source, errors, options);
  14167. }
  14168. }
  14169. callback(errors);
  14170. }
  14171. function any(rule, value, callback, source, options) {
  14172. const errors = [];
  14173. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  14174. if (validate2) {
  14175. if (isEmptyValue(value) && !rule.required) {
  14176. return callback();
  14177. }
  14178. rules.required(rule, value, source, errors, options);
  14179. }
  14180. callback(errors);
  14181. }
  14182. const validators = {
  14183. string,
  14184. method: method2,
  14185. number: number2,
  14186. boolean: _boolean,
  14187. regexp: regexp2,
  14188. integer: integer2,
  14189. float: floatFn,
  14190. array: array2,
  14191. object: object2,
  14192. enum: enumerable$1,
  14193. pattern: pattern$2,
  14194. date: date2,
  14195. url: type$1,
  14196. hex: type$1,
  14197. email: type$1,
  14198. required: required$1,
  14199. any
  14200. };
  14201. function newMessages() {
  14202. return {
  14203. default: "Validation error on field %s",
  14204. required: "%s is required",
  14205. enum: "%s must be one of %s",
  14206. whitespace: "%s cannot be empty",
  14207. date: {
  14208. format: "%s date %s is invalid for format %s",
  14209. parse: "%s date could not be parsed, %s is invalid ",
  14210. invalid: "%s date %s is invalid"
  14211. },
  14212. types: {
  14213. string: "%s is not a %s",
  14214. method: "%s is not a %s (function)",
  14215. array: "%s is not an %s",
  14216. object: "%s is not an %s",
  14217. number: "%s is not a %s",
  14218. date: "%s is not a %s",
  14219. boolean: "%s is not a %s",
  14220. integer: "%s is not an %s",
  14221. float: "%s is not a %s",
  14222. regexp: "%s is not a valid %s",
  14223. email: "%s is not a valid %s",
  14224. url: "%s is not a valid %s",
  14225. hex: "%s is not a valid %s"
  14226. },
  14227. string: {
  14228. len: "%s must be exactly %s characters",
  14229. min: "%s must be at least %s characters",
  14230. max: "%s cannot be longer than %s characters",
  14231. range: "%s must be between %s and %s characters"
  14232. },
  14233. number: {
  14234. len: "%s must equal %s",
  14235. min: "%s cannot be less than %s",
  14236. max: "%s cannot be greater than %s",
  14237. range: "%s must be between %s and %s"
  14238. },
  14239. array: {
  14240. len: "%s must be exactly %s in length",
  14241. min: "%s cannot be less than %s in length",
  14242. max: "%s cannot be greater than %s in length",
  14243. range: "%s must be between %s and %s in length"
  14244. },
  14245. pattern: {
  14246. mismatch: "%s value %s does not match pattern %s"
  14247. },
  14248. clone: function clone2() {
  14249. const cloned = JSON.parse(JSON.stringify(this));
  14250. cloned.clone = this.clone;
  14251. return cloned;
  14252. }
  14253. };
  14254. }
  14255. const messages = newMessages();
  14256. function Schema(descriptor) {
  14257. this.rules = null;
  14258. this._messages = messages;
  14259. this.define(descriptor);
  14260. }
  14261. Schema.prototype = {
  14262. messages: function messages2(_messages) {
  14263. if (_messages) {
  14264. this._messages = deepMerge(newMessages(), _messages);
  14265. }
  14266. return this._messages;
  14267. },
  14268. define: function define(rules2) {
  14269. if (!rules2) {
  14270. throw new Error("Cannot configure a schema with no rules");
  14271. }
  14272. if (typeof rules2 !== "object" || Array.isArray(rules2)) {
  14273. throw new Error("Rules must be an object");
  14274. }
  14275. this.rules = {};
  14276. let z;
  14277. let item;
  14278. for (z in rules2) {
  14279. if (rules2.hasOwnProperty(z)) {
  14280. item = rules2[z];
  14281. this.rules[z] = Array.isArray(item) ? item : [item];
  14282. }
  14283. }
  14284. },
  14285. validate: function validate(source_, o2, oc) {
  14286. const _this = this;
  14287. if (o2 === void 0) {
  14288. o2 = {};
  14289. }
  14290. if (oc === void 0) {
  14291. oc = function oc2() {
  14292. };
  14293. }
  14294. let source = source_;
  14295. let options = o2;
  14296. let callback = oc;
  14297. if (typeof options === "function") {
  14298. callback = options;
  14299. options = {};
  14300. }
  14301. if (!this.rules || Object.keys(this.rules).length === 0) {
  14302. if (callback) {
  14303. callback();
  14304. }
  14305. return Promise.resolve();
  14306. }
  14307. function complete(results) {
  14308. let i;
  14309. let errors = [];
  14310. let fields = {};
  14311. function add2(e2) {
  14312. if (Array.isArray(e2)) {
  14313. let _errors;
  14314. errors = (_errors = errors).concat.apply(_errors, e2);
  14315. } else {
  14316. errors.push(e2);
  14317. }
  14318. }
  14319. for (i = 0; i < results.length; i++) {
  14320. add2(results[i]);
  14321. }
  14322. if (!errors.length) {
  14323. errors = null;
  14324. fields = null;
  14325. } else {
  14326. fields = convertFieldsError(errors);
  14327. }
  14328. callback(errors, fields);
  14329. }
  14330. if (options.messages) {
  14331. let messages$1 = this.messages();
  14332. if (messages$1 === messages) {
  14333. messages$1 = newMessages();
  14334. }
  14335. deepMerge(messages$1, options.messages);
  14336. options.messages = messages$1;
  14337. } else {
  14338. options.messages = this.messages();
  14339. }
  14340. let arr;
  14341. let value;
  14342. const series = {};
  14343. const keys = options.keys || Object.keys(this.rules);
  14344. keys.forEach((z) => {
  14345. arr = _this.rules[z];
  14346. value = source[z];
  14347. arr.forEach((r) => {
  14348. let rule = r;
  14349. if (typeof rule.transform === "function") {
  14350. if (source === source_) {
  14351. source = { ...source };
  14352. }
  14353. value = source[z] = rule.transform(value);
  14354. }
  14355. if (typeof rule === "function") {
  14356. rule = {
  14357. validator: rule
  14358. };
  14359. } else {
  14360. rule = { ...rule };
  14361. }
  14362. rule.validator = _this.getValidationMethod(rule);
  14363. rule.field = z;
  14364. rule.fullField = rule.fullField || z;
  14365. rule.type = _this.getType(rule);
  14366. if (!rule.validator) {
  14367. return;
  14368. }
  14369. series[z] = series[z] || [];
  14370. series[z].push({
  14371. rule,
  14372. value,
  14373. source,
  14374. field: z
  14375. });
  14376. });
  14377. });
  14378. const errorFields = {};
  14379. return asyncMap(series, options, (data, doIt) => {
  14380. const { rule } = data;
  14381. let deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
  14382. deep = deep && (rule.required || !rule.required && data.value);
  14383. rule.field = data.field;
  14384. function addFullfield(key, schema) {
  14385. return { ...schema, fullField: `${rule.fullField}.${key}` };
  14386. }
  14387. function cb(e2) {
  14388. if (e2 === void 0) {
  14389. e2 = [];
  14390. }
  14391. let errors = e2;
  14392. if (!Array.isArray(errors)) {
  14393. errors = [errors];
  14394. }
  14395. if (!options.suppressWarning && errors.length) {
  14396. Schema.warning("async-validator:", errors);
  14397. }
  14398. if (errors.length && rule.message) {
  14399. errors = [].concat(rule.message);
  14400. }
  14401. errors = errors.map(complementError(rule));
  14402. if (options.first && errors.length) {
  14403. errorFields[rule.field] = 1;
  14404. return doIt(errors);
  14405. }
  14406. if (!deep) {
  14407. doIt(errors);
  14408. } else {
  14409. if (rule.required && !data.value) {
  14410. if (rule.message) {
  14411. errors = [].concat(rule.message).map(complementError(rule));
  14412. } else if (options.error) {
  14413. errors = [options.error(rule, format(options.messages.required, rule.field))];
  14414. } else {
  14415. errors = [];
  14416. }
  14417. return doIt(errors);
  14418. }
  14419. let fieldsSchema = {};
  14420. if (rule.defaultField) {
  14421. for (const k in data.value) {
  14422. if (data.value.hasOwnProperty(k)) {
  14423. fieldsSchema[k] = rule.defaultField;
  14424. }
  14425. }
  14426. }
  14427. fieldsSchema = { ...fieldsSchema, ...data.rule.fields };
  14428. for (const f2 in fieldsSchema) {
  14429. if (fieldsSchema.hasOwnProperty(f2)) {
  14430. const fieldSchema = Array.isArray(fieldsSchema[f2]) ? fieldsSchema[f2] : [fieldsSchema[f2]];
  14431. fieldsSchema[f2] = fieldSchema.map(addFullfield.bind(null, f2));
  14432. }
  14433. }
  14434. const schema = new Schema(fieldsSchema);
  14435. schema.messages(options.messages);
  14436. if (data.rule.options) {
  14437. data.rule.options.messages = options.messages;
  14438. data.rule.options.error = options.error;
  14439. }
  14440. schema.validate(data.value, data.rule.options || options, (errs) => {
  14441. const finalErrors = [];
  14442. if (errors && errors.length) {
  14443. finalErrors.push.apply(finalErrors, errors);
  14444. }
  14445. if (errs && errs.length) {
  14446. finalErrors.push.apply(finalErrors, errs);
  14447. }
  14448. doIt(finalErrors.length ? finalErrors : null);
  14449. });
  14450. }
  14451. }
  14452. let res;
  14453. if (rule.asyncValidator) {
  14454. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  14455. } else if (rule.validator) {
  14456. res = rule.validator(rule, data.value, cb, data.source, options);
  14457. if (res === true) {
  14458. cb();
  14459. } else if (res === false) {
  14460. cb(rule.message || `${rule.field} fails`);
  14461. } else if (res instanceof Array) {
  14462. cb(res);
  14463. } else if (res instanceof Error) {
  14464. cb(res.message);
  14465. }
  14466. }
  14467. if (res && res.then) {
  14468. res.then(() => cb(), (e2) => cb(e2));
  14469. }
  14470. }, (results) => {
  14471. complete(results);
  14472. });
  14473. },
  14474. getType: function getType2(rule) {
  14475. if (rule.type === void 0 && rule.pattern instanceof RegExp) {
  14476. rule.type = "pattern";
  14477. }
  14478. if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) {
  14479. throw new Error(format("Unknown rule type %s", rule.type));
  14480. }
  14481. return rule.type || "string";
  14482. },
  14483. getValidationMethod: function getValidationMethod(rule) {
  14484. if (typeof rule.validator === "function") {
  14485. return rule.validator;
  14486. }
  14487. const keys = Object.keys(rule);
  14488. const messageIndex = keys.indexOf("message");
  14489. if (messageIndex !== -1) {
  14490. keys.splice(messageIndex, 1);
  14491. }
  14492. if (keys.length === 1 && keys[0] === "required") {
  14493. return validators.required;
  14494. }
  14495. return validators[this.getType(rule)] || false;
  14496. }
  14497. };
  14498. Schema.register = function register(type2, validator) {
  14499. if (typeof validator !== "function") {
  14500. throw new Error("Cannot register a validator by type, validator is not a function");
  14501. }
  14502. validators[type2] = validator;
  14503. };
  14504. Schema.warning = warning;
  14505. Schema.messages = messages;
  14506. const props$1 = {
  14507. props: {
  14508. // 是否展示工具条
  14509. show: {
  14510. type: Boolean,
  14511. default: defprops.toolbar.show
  14512. },
  14513. // 取消按钮的文字
  14514. cancelText: {
  14515. type: String,
  14516. default: defprops.toolbar.cancelText
  14517. },
  14518. // 确认按钮的文字
  14519. confirmText: {
  14520. type: String,
  14521. default: defprops.toolbar.confirmText
  14522. },
  14523. // 取消按钮的颜色
  14524. cancelColor: {
  14525. type: String,
  14526. default: defprops.toolbar.cancelColor
  14527. },
  14528. // 确认按钮的颜色
  14529. confirmColor: {
  14530. type: String,
  14531. default: defprops.toolbar.confirmColor
  14532. },
  14533. // 标题文字
  14534. title: {
  14535. type: String,
  14536. default: defprops.toolbar.title
  14537. }
  14538. }
  14539. };
  14540. const props = {
  14541. props: {
  14542. // 轮播的长度
  14543. length: {
  14544. type: [String, Number],
  14545. default: defprops.swiperIndicator.length
  14546. },
  14547. // 当前处于活动状态的轮播的索引
  14548. current: {
  14549. type: [String, Number],
  14550. default: defprops.swiperIndicator.current
  14551. },
  14552. // 指示器非激活颜色
  14553. indicatorActiveColor: {
  14554. type: String,
  14555. default: defprops.swiperIndicator.indicatorActiveColor
  14556. },
  14557. // 指示器的激活颜色
  14558. indicatorInactiveColor: {
  14559. type: String,
  14560. default: defprops.swiperIndicator.indicatorInactiveColor
  14561. },
  14562. // 指示器模式,line-线型,dot-点型
  14563. indicatorMode: {
  14564. type: String,
  14565. default: defprops.swiperIndicator.indicatorMode
  14566. }
  14567. }
  14568. };
  14569. exports.Pinia = Pinia;
  14570. exports.Schema = Schema;
  14571. exports._export_sfc = _export_sfc;
  14572. exports.button = button;
  14573. exports.computed = computed;
  14574. exports.createPinia = createPinia;
  14575. exports.createSSRApp = createSSRApp;
  14576. exports.dayjs = dayjs;
  14577. exports.defineStore = defineStore;
  14578. exports.e = e;
  14579. exports.f = f;
  14580. exports.getCurrentInstance = getCurrentInstance;
  14581. exports.icons = icons;
  14582. exports.index = index$1;
  14583. exports.isRef = isRef;
  14584. exports.mixin = mixin;
  14585. exports.mpMixin = mpMixin;
  14586. exports.n = n;
  14587. exports.o = o;
  14588. exports.onLaunch = onLaunch;
  14589. exports.onLoad = onLoad;
  14590. exports.onMounted = onMounted;
  14591. exports.onShow = onShow;
  14592. exports.openType = openType;
  14593. exports.p = p;
  14594. exports.props = props$w;
  14595. exports.props$1 = props$v;
  14596. exports.props$10 = props$m;
  14597. exports.props$11 = props$l;
  14598. exports.props$12 = props$k;
  14599. exports.props$13 = props$j;
  14600. exports.props$14 = props$i;
  14601. exports.props$15 = props$h;
  14602. exports.props$16 = props$g;
  14603. exports.props$17 = props$f;
  14604. exports.props$18 = props$e;
  14605. exports.props$19 = props$d;
  14606. exports.props$2 = props$u;
  14607. exports.props$20 = props$c;
  14608. exports.props$21 = props$b;
  14609. exports.props$22 = props$a;
  14610. exports.props$23 = props$9;
  14611. exports.props$24 = props$8;
  14612. exports.props$25 = props$7;
  14613. exports.props$26 = props$6;
  14614. exports.props$27 = props$5;
  14615. exports.props$28 = props$4;
  14616. exports.props$29 = props$3;
  14617. exports.props$3 = props$t;
  14618. exports.props$30 = props$2;
  14619. exports.props$31 = props$1;
  14620. exports.props$32 = props;
  14621. exports.props$4 = props$s;
  14622. exports.props$5 = props$r;
  14623. exports.props$6 = props$q;
  14624. exports.props$7 = props$p;
  14625. exports.props$8 = props$o;
  14626. exports.props$9 = props$n;
  14627. exports.reactive = reactive;
  14628. exports.ref = ref;
  14629. exports.resolveComponent = resolveComponent;
  14630. exports.s = s;
  14631. exports.sr = sr;
  14632. exports.t = t;
  14633. exports.toRefs = toRefs;
  14634. exports.transition = transition;
  14635. exports.unref = unref;
  14636. exports.uviewPlus = uviewPlus;
  14637. exports.wx$1 = wx$1;