vendor.js 509 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449
  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 i2 = 0; i2 < list.length; i2++) {
  13. map[list[i2]] = true;
  14. }
  15. return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
  16. }
  17. function normalizeStyle(value2) {
  18. if (isArray$1(value2)) {
  19. const res = {};
  20. for (let i2 = 0; i2 < value2.length; i2++) {
  21. const item = value2[i2];
  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(value2)) {
  31. return value2;
  32. } else if (isObject$3(value2)) {
  33. return value2;
  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(value2) {
  50. let res = "";
  51. if (isString(value2)) {
  52. res = value2;
  53. } else if (isArray$1(value2)) {
  54. for (let i2 = 0; i2 < value2.length; i2++) {
  55. const normalized = normalizeClass(value2[i2]);
  56. if (normalized) {
  57. res += normalized + " ";
  58. }
  59. }
  60. } else if (isObject$3(value2)) {
  61. for (const name in value2) {
  62. if (value2[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$3(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$3(val) && !isArray$1(val) && !isPlainObject$1(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 i2 = arr.indexOf(el);
  102. if (i2 > -1) {
  103. arr.splice(i2, 1);
  104. }
  105. };
  106. const hasOwnProperty$2 = Object.prototype.hasOwnProperty;
  107. const hasOwn$1 = (val, key) => hasOwnProperty$2.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$3 = (val) => val !== null && typeof val === "object";
  115. const isPromise$1 = (val) => {
  116. return isObject$3(val) && isFunction(val.then) && isFunction(val.catch);
  117. };
  118. const objectToString = Object.prototype.toString;
  119. const toTypeString = (value2) => objectToString.call(value2);
  120. const toRawType = (value2) => {
  121. return toTypeString(value2).slice(8, -1);
  122. };
  123. const isPlainObject$1 = (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, (_2, c2) => c2 ? c2.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 = (value2, oldValue) => !Object.is(value2, oldValue);
  146. const invokeArrayFns$1 = (fns, arg) => {
  147. for (let i2 = 0; i2 < fns.length; i2++) {
  148. fns[i2](arg);
  149. }
  150. };
  151. const def = (obj, key, value2) => {
  152. Object.defineProperty(obj, key, {
  153. configurable: true,
  154. enumerable: false,
  155. value: value2
  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 i2 = 0; i2 < fns.length; i2++) {
  203. ret = fns[i2](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$1(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$1(val)) {
  249. val = JSON.stringify(val);
  250. }
  251. return encodeStr(key) + "=" + encodeStr(val);
  252. }).filter((x2) => x2.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, value2, checkType = true) {
  315. if (checkType && !isFunction(value2)) {
  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$1 = function() {
  343. };
  344. E$1.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 self = this;
  355. function listener() {
  356. self.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 i2 = 0;
  366. var len = evtArr.length;
  367. for (i2; i2 < len; i2++) {
  368. evtArr[i2].fn.apply(evtArr[i2].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 i2 = 0, len = evts.length; i2 < len; i2++) {
  378. if (evts[i2].fn !== callback && evts[i2].fn._ !== callback)
  379. liveEvents.push(evts[i2]);
  380. }
  381. }
  382. liveEvents.length ? e2[name] = liveEvents : delete e2[name];
  383. return this;
  384. }
  385. };
  386. var E$1$1 = E$1;
  387. const isObject$2 = (val) => val !== null && typeof val === "object";
  388. const defaultDelimiters = ["{", "}"];
  389. class BaseFormatter {
  390. constructor() {
  391. this._caches = /* @__PURE__ */ Object.create(null);
  392. }
  393. interpolate(message, values, delimiters = defaultDelimiters) {
  394. if (!values) {
  395. return [message];
  396. }
  397. let tokens = this._caches[message];
  398. if (!tokens) {
  399. tokens = parse(message, delimiters);
  400. this._caches[message] = tokens;
  401. }
  402. return compile$1(tokens, values);
  403. }
  404. }
  405. const RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  406. const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  407. function parse(format, [startDelimiter, endDelimiter]) {
  408. const tokens = [];
  409. let position = 0;
  410. let text = "";
  411. while (position < format.length) {
  412. let char = format[position++];
  413. if (char === startDelimiter) {
  414. if (text) {
  415. tokens.push({ type: "text", value: text });
  416. }
  417. text = "";
  418. let sub = "";
  419. char = format[position++];
  420. while (char !== void 0 && char !== endDelimiter) {
  421. sub += char;
  422. char = format[position++];
  423. }
  424. const isClosed = char === endDelimiter;
  425. const type = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown";
  426. tokens.push({ value: sub, type });
  427. } else {
  428. text += char;
  429. }
  430. }
  431. text && tokens.push({ type: "text", value: text });
  432. return tokens;
  433. }
  434. function compile$1(tokens, values) {
  435. const compiled = [];
  436. let index2 = 0;
  437. const mode = Array.isArray(values) ? "list" : isObject$2(values) ? "named" : "unknown";
  438. if (mode === "unknown") {
  439. return compiled;
  440. }
  441. while (index2 < tokens.length) {
  442. const token = tokens[index2];
  443. switch (token.type) {
  444. case "text":
  445. compiled.push(token.value);
  446. break;
  447. case "list":
  448. compiled.push(values[parseInt(token.value, 10)]);
  449. break;
  450. case "named":
  451. if (mode === "named") {
  452. compiled.push(values[token.value]);
  453. } else {
  454. {
  455. console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`);
  456. }
  457. }
  458. break;
  459. case "unknown":
  460. {
  461. console.warn(`Detect 'unknown' type of token!`);
  462. }
  463. break;
  464. }
  465. index2++;
  466. }
  467. return compiled;
  468. }
  469. const LOCALE_ZH_HANS = "zh-Hans";
  470. const LOCALE_ZH_HANT = "zh-Hant";
  471. const LOCALE_EN = "en";
  472. const LOCALE_FR = "fr";
  473. const LOCALE_ES = "es";
  474. const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
  475. const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
  476. const defaultFormatter = new BaseFormatter();
  477. function include(str, parts) {
  478. return !!parts.find((part) => str.indexOf(part) !== -1);
  479. }
  480. function startsWith(str, parts) {
  481. return parts.find((part) => str.indexOf(part) === 0);
  482. }
  483. function normalizeLocale(locale, messages) {
  484. if (!locale) {
  485. return;
  486. }
  487. locale = locale.trim().replace(/_/g, "-");
  488. if (messages && messages[locale]) {
  489. return locale;
  490. }
  491. locale = locale.toLowerCase();
  492. if (locale === "chinese") {
  493. return LOCALE_ZH_HANS;
  494. }
  495. if (locale.indexOf("zh") === 0) {
  496. if (locale.indexOf("-hans") > -1) {
  497. return LOCALE_ZH_HANS;
  498. }
  499. if (locale.indexOf("-hant") > -1) {
  500. return LOCALE_ZH_HANT;
  501. }
  502. if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) {
  503. return LOCALE_ZH_HANT;
  504. }
  505. return LOCALE_ZH_HANS;
  506. }
  507. const lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  508. if (lang) {
  509. return lang;
  510. }
  511. }
  512. class I18n {
  513. constructor({ locale, fallbackLocale, messages, watcher, formater }) {
  514. this.locale = LOCALE_EN;
  515. this.fallbackLocale = LOCALE_EN;
  516. this.message = {};
  517. this.messages = {};
  518. this.watchers = [];
  519. if (fallbackLocale) {
  520. this.fallbackLocale = fallbackLocale;
  521. }
  522. this.formater = formater || defaultFormatter;
  523. this.messages = messages || {};
  524. this.setLocale(locale || LOCALE_EN);
  525. if (watcher) {
  526. this.watchLocale(watcher);
  527. }
  528. }
  529. setLocale(locale) {
  530. const oldLocale = this.locale;
  531. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  532. if (!this.messages[this.locale]) {
  533. this.messages[this.locale] = {};
  534. }
  535. this.message = this.messages[this.locale];
  536. if (oldLocale !== this.locale) {
  537. this.watchers.forEach((watcher) => {
  538. watcher(this.locale, oldLocale);
  539. });
  540. }
  541. }
  542. getLocale() {
  543. return this.locale;
  544. }
  545. watchLocale(fn) {
  546. const index2 = this.watchers.push(fn) - 1;
  547. return () => {
  548. this.watchers.splice(index2, 1);
  549. };
  550. }
  551. add(locale, message, override = true) {
  552. const curMessages = this.messages[locale];
  553. if (curMessages) {
  554. if (override) {
  555. Object.assign(curMessages, message);
  556. } else {
  557. Object.keys(message).forEach((key) => {
  558. if (!hasOwn(curMessages, key)) {
  559. curMessages[key] = message[key];
  560. }
  561. });
  562. }
  563. } else {
  564. this.messages[locale] = message;
  565. }
  566. }
  567. f(message, values, delimiters) {
  568. return this.formater.interpolate(message, values, delimiters).join("");
  569. }
  570. t(key, locale, values) {
  571. let message = this.message;
  572. if (typeof locale === "string") {
  573. locale = normalizeLocale(locale, this.messages);
  574. locale && (message = this.messages[locale]);
  575. } else {
  576. values = locale;
  577. }
  578. if (!hasOwn(message, key)) {
  579. console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`);
  580. return key;
  581. }
  582. return this.formater.interpolate(message[key], values).join("");
  583. }
  584. }
  585. function watchAppLocale(appVm, i18n) {
  586. if (appVm.$watchLocale) {
  587. appVm.$watchLocale((newLocale) => {
  588. i18n.setLocale(newLocale);
  589. });
  590. } else {
  591. appVm.$watch(() => appVm.$locale, (newLocale) => {
  592. i18n.setLocale(newLocale);
  593. });
  594. }
  595. }
  596. function getDefaultLocale() {
  597. if (typeof index$1 !== "undefined" && index$1.getLocale) {
  598. return index$1.getLocale();
  599. }
  600. if (typeof global !== "undefined" && global.getLocale) {
  601. return global.getLocale();
  602. }
  603. return LOCALE_EN;
  604. }
  605. function initVueI18n(locale, messages = {}, fallbackLocale, watcher) {
  606. if (typeof locale !== "string") {
  607. [locale, messages] = [
  608. messages,
  609. locale
  610. ];
  611. }
  612. if (typeof locale !== "string") {
  613. locale = getDefaultLocale();
  614. }
  615. if (typeof fallbackLocale !== "string") {
  616. fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN;
  617. }
  618. const i18n = new I18n({
  619. locale,
  620. fallbackLocale,
  621. messages,
  622. watcher
  623. });
  624. let t2 = (key, values) => {
  625. if (typeof getApp !== "function") {
  626. t2 = function(key2, values2) {
  627. return i18n.t(key2, values2);
  628. };
  629. } else {
  630. let isWatchedAppLocale = false;
  631. t2 = function(key2, values2) {
  632. const appVm = getApp().$vm;
  633. if (appVm) {
  634. appVm.$locale;
  635. if (!isWatchedAppLocale) {
  636. isWatchedAppLocale = true;
  637. watchAppLocale(appVm, i18n);
  638. }
  639. }
  640. return i18n.t(key2, values2);
  641. };
  642. }
  643. return t2(key, values);
  644. };
  645. return {
  646. i18n,
  647. f(message, values, delimiters) {
  648. return i18n.f(message, values, delimiters);
  649. },
  650. t(key, values) {
  651. return t2(key, values);
  652. },
  653. add(locale2, message, override = true) {
  654. return i18n.add(locale2, message, override);
  655. },
  656. watch(fn) {
  657. return i18n.watchLocale(fn);
  658. },
  659. getLocale() {
  660. return i18n.getLocale();
  661. },
  662. setLocale(newLocale) {
  663. return i18n.setLocale(newLocale);
  664. }
  665. };
  666. }
  667. function getBaseSystemInfo() {
  668. return wx.getSystemInfoSync();
  669. }
  670. function validateProtocolFail(name, msg) {
  671. console.warn(`${name}: ${msg}`);
  672. }
  673. function validateProtocol(name, data, protocol, onFail) {
  674. if (!onFail) {
  675. onFail = validateProtocolFail;
  676. }
  677. for (const key in protocol) {
  678. const errMsg = validateProp$1(key, data[key], protocol[key], !hasOwn$1(data, key));
  679. if (isString(errMsg)) {
  680. onFail(name, errMsg);
  681. }
  682. }
  683. }
  684. function validateProtocols(name, args, protocol, onFail) {
  685. if (!protocol) {
  686. return;
  687. }
  688. if (!isArray$1(protocol)) {
  689. return validateProtocol(name, args[0] || /* @__PURE__ */ Object.create(null), protocol, onFail);
  690. }
  691. const len = protocol.length;
  692. const argsLen = args.length;
  693. for (let i2 = 0; i2 < len; i2++) {
  694. const opts = protocol[i2];
  695. const data = /* @__PURE__ */ Object.create(null);
  696. if (argsLen > i2) {
  697. data[opts.name] = args[i2];
  698. }
  699. validateProtocol(name, data, { [opts.name]: opts }, onFail);
  700. }
  701. }
  702. function validateProp$1(name, value2, prop, isAbsent) {
  703. if (!isPlainObject$1(prop)) {
  704. prop = { type: prop };
  705. }
  706. const { type, required, validator } = prop;
  707. if (required && isAbsent) {
  708. return 'Missing required args: "' + name + '"';
  709. }
  710. if (value2 == null && !required) {
  711. return;
  712. }
  713. if (type != null) {
  714. let isValid = false;
  715. const types = isArray$1(type) ? type : [type];
  716. const expectedTypes = [];
  717. for (let i2 = 0; i2 < types.length && !isValid; i2++) {
  718. const { valid, expectedType } = assertType$1(value2, types[i2]);
  719. expectedTypes.push(expectedType || "");
  720. isValid = valid;
  721. }
  722. if (!isValid) {
  723. return getInvalidTypeMessage$1(name, value2, expectedTypes);
  724. }
  725. }
  726. if (validator) {
  727. return validator(value2);
  728. }
  729. }
  730. const isSimpleType$1 = /* @__PURE__ */ makeMap("String,Number,Boolean,Function,Symbol");
  731. function assertType$1(value2, type) {
  732. let valid;
  733. const expectedType = getType$1(type);
  734. if (isSimpleType$1(expectedType)) {
  735. const t2 = typeof value2;
  736. valid = t2 === expectedType.toLowerCase();
  737. if (!valid && t2 === "object") {
  738. valid = value2 instanceof type;
  739. }
  740. } else if (expectedType === "Object") {
  741. valid = isObject$3(value2);
  742. } else if (expectedType === "Array") {
  743. valid = isArray$1(value2);
  744. } else {
  745. {
  746. valid = value2 instanceof type;
  747. }
  748. }
  749. return {
  750. valid,
  751. expectedType
  752. };
  753. }
  754. function getInvalidTypeMessage$1(name, value2, expectedTypes) {
  755. let message = `Invalid args: type check failed for args "${name}". Expected ${expectedTypes.map(capitalize).join(", ")}`;
  756. const expectedType = expectedTypes[0];
  757. const receivedType = toRawType(value2);
  758. const expectedValue = styleValue$1(value2, expectedType);
  759. const receivedValue = styleValue$1(value2, receivedType);
  760. if (expectedTypes.length === 1 && isExplicable$1(expectedType) && !isBoolean$1(expectedType, receivedType)) {
  761. message += ` with value ${expectedValue}`;
  762. }
  763. message += `, got ${receivedType} `;
  764. if (isExplicable$1(receivedType)) {
  765. message += `with value ${receivedValue}.`;
  766. }
  767. return message;
  768. }
  769. function getType$1(ctor) {
  770. const match = ctor && ctor.toString().match(/^\s*function (\w+)/);
  771. return match ? match[1] : "";
  772. }
  773. function styleValue$1(value2, type) {
  774. if (type === "String") {
  775. return `"${value2}"`;
  776. } else if (type === "Number") {
  777. return `${Number(value2)}`;
  778. } else {
  779. return `${value2}`;
  780. }
  781. }
  782. function isExplicable$1(type) {
  783. const explicitTypes = ["string", "number", "boolean"];
  784. return explicitTypes.some((elem) => type.toLowerCase() === elem);
  785. }
  786. function isBoolean$1(...args) {
  787. return args.some((elem) => elem.toLowerCase() === "boolean");
  788. }
  789. function tryCatch(fn) {
  790. return function() {
  791. try {
  792. return fn.apply(fn, arguments);
  793. } catch (e2) {
  794. console.error(e2);
  795. }
  796. };
  797. }
  798. let invokeCallbackId = 1;
  799. const invokeCallbacks = {};
  800. function addInvokeCallback(id, name, callback, keepAlive = false) {
  801. invokeCallbacks[id] = {
  802. name,
  803. keepAlive,
  804. callback
  805. };
  806. return id;
  807. }
  808. function invokeCallback(id, res, extras) {
  809. if (typeof id === "number") {
  810. const opts = invokeCallbacks[id];
  811. if (opts) {
  812. if (!opts.keepAlive) {
  813. delete invokeCallbacks[id];
  814. }
  815. return opts.callback(res, extras);
  816. }
  817. }
  818. return res;
  819. }
  820. const API_SUCCESS = "success";
  821. const API_FAIL = "fail";
  822. const API_COMPLETE = "complete";
  823. function getApiCallbacks(args) {
  824. const apiCallbacks = {};
  825. for (const name in args) {
  826. const fn = args[name];
  827. if (isFunction(fn)) {
  828. apiCallbacks[name] = tryCatch(fn);
  829. delete args[name];
  830. }
  831. }
  832. return apiCallbacks;
  833. }
  834. function normalizeErrMsg$1(errMsg, name) {
  835. if (!errMsg || errMsg.indexOf(":fail") === -1) {
  836. return name + ":ok";
  837. }
  838. return name + errMsg.substring(errMsg.indexOf(":fail"));
  839. }
  840. function createAsyncApiCallback(name, args = {}, { beforeAll, beforeSuccess } = {}) {
  841. if (!isPlainObject$1(args)) {
  842. args = {};
  843. }
  844. const { success, fail, complete } = getApiCallbacks(args);
  845. const hasSuccess = isFunction(success);
  846. const hasFail = isFunction(fail);
  847. const hasComplete = isFunction(complete);
  848. const callbackId = invokeCallbackId++;
  849. addInvokeCallback(callbackId, name, (res) => {
  850. res = res || {};
  851. res.errMsg = normalizeErrMsg$1(res.errMsg, name);
  852. isFunction(beforeAll) && beforeAll(res);
  853. if (res.errMsg === name + ":ok") {
  854. isFunction(beforeSuccess) && beforeSuccess(res, args);
  855. hasSuccess && success(res);
  856. } else {
  857. hasFail && fail(res);
  858. }
  859. hasComplete && complete(res);
  860. });
  861. return callbackId;
  862. }
  863. const HOOK_SUCCESS = "success";
  864. const HOOK_FAIL = "fail";
  865. const HOOK_COMPLETE = "complete";
  866. const globalInterceptors = {};
  867. const scopedInterceptors = {};
  868. function wrapperHook(hook, params) {
  869. return function(data) {
  870. return hook(data, params) || data;
  871. };
  872. }
  873. function queue$1(hooks, data, params) {
  874. let promise2 = false;
  875. for (let i2 = 0; i2 < hooks.length; i2++) {
  876. const hook = hooks[i2];
  877. if (promise2) {
  878. promise2 = Promise.resolve(wrapperHook(hook, params));
  879. } else {
  880. const res = hook(data, params);
  881. if (isPromise$1(res)) {
  882. promise2 = Promise.resolve(res);
  883. }
  884. if (res === false) {
  885. return {
  886. then() {
  887. },
  888. catch() {
  889. }
  890. };
  891. }
  892. }
  893. }
  894. return promise2 || {
  895. then(callback) {
  896. return callback(data);
  897. },
  898. catch() {
  899. }
  900. };
  901. }
  902. function wrapperOptions(interceptors2, options = {}) {
  903. [HOOK_SUCCESS, HOOK_FAIL, HOOK_COMPLETE].forEach((name) => {
  904. const hooks = interceptors2[name];
  905. if (!isArray$1(hooks)) {
  906. return;
  907. }
  908. const oldCallback = options[name];
  909. options[name] = function callbackInterceptor(res) {
  910. queue$1(hooks, res, options).then((res2) => {
  911. return isFunction(oldCallback) && oldCallback(res2) || res2;
  912. });
  913. };
  914. });
  915. return options;
  916. }
  917. function wrapperReturnValue(method, returnValue) {
  918. const returnValueHooks = [];
  919. if (isArray$1(globalInterceptors.returnValue)) {
  920. returnValueHooks.push(...globalInterceptors.returnValue);
  921. }
  922. const interceptor = scopedInterceptors[method];
  923. if (interceptor && isArray$1(interceptor.returnValue)) {
  924. returnValueHooks.push(...interceptor.returnValue);
  925. }
  926. returnValueHooks.forEach((hook) => {
  927. returnValue = hook(returnValue) || returnValue;
  928. });
  929. return returnValue;
  930. }
  931. function getApiInterceptorHooks(method) {
  932. const interceptor = /* @__PURE__ */ Object.create(null);
  933. Object.keys(globalInterceptors).forEach((hook) => {
  934. if (hook !== "returnValue") {
  935. interceptor[hook] = globalInterceptors[hook].slice();
  936. }
  937. });
  938. const scopedInterceptor = scopedInterceptors[method];
  939. if (scopedInterceptor) {
  940. Object.keys(scopedInterceptor).forEach((hook) => {
  941. if (hook !== "returnValue") {
  942. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  943. }
  944. });
  945. }
  946. return interceptor;
  947. }
  948. function invokeApi(method, api, options, params) {
  949. const interceptor = getApiInterceptorHooks(method);
  950. if (interceptor && Object.keys(interceptor).length) {
  951. if (isArray$1(interceptor.invoke)) {
  952. const res = queue$1(interceptor.invoke, options);
  953. return res.then((options2) => {
  954. return api(wrapperOptions(getApiInterceptorHooks(method), options2), ...params);
  955. });
  956. } else {
  957. return api(wrapperOptions(interceptor, options), ...params);
  958. }
  959. }
  960. return api(options, ...params);
  961. }
  962. function hasCallback(args) {
  963. if (isPlainObject$1(args) && [API_SUCCESS, API_FAIL, API_COMPLETE].find((cb) => isFunction(args[cb]))) {
  964. return true;
  965. }
  966. return false;
  967. }
  968. function handlePromise(promise2) {
  969. return promise2;
  970. }
  971. function promisify$1(name, fn) {
  972. return (args = {}, ...rest) => {
  973. if (hasCallback(args)) {
  974. return wrapperReturnValue(name, invokeApi(name, fn, args, rest));
  975. }
  976. return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
  977. invokeApi(name, fn, extend(args, { success: resolve2, fail: reject }), rest);
  978. })));
  979. };
  980. }
  981. function formatApiArgs(args, options) {
  982. const params = args[0];
  983. if (!options || !isPlainObject$1(options.formatArgs) && isPlainObject$1(params)) {
  984. return;
  985. }
  986. const formatArgs = options.formatArgs;
  987. const keys = Object.keys(formatArgs);
  988. for (let i2 = 0; i2 < keys.length; i2++) {
  989. const name = keys[i2];
  990. const formatterOrDefaultValue = formatArgs[name];
  991. if (isFunction(formatterOrDefaultValue)) {
  992. const errMsg = formatterOrDefaultValue(args[0][name], params);
  993. if (isString(errMsg)) {
  994. return errMsg;
  995. }
  996. } else {
  997. if (!hasOwn$1(params, name)) {
  998. params[name] = formatterOrDefaultValue;
  999. }
  1000. }
  1001. }
  1002. }
  1003. function invokeSuccess(id, name, res) {
  1004. return invokeCallback(id, extend(res || {}, { errMsg: name + ":ok" }));
  1005. }
  1006. function invokeFail(id, name, errMsg, errRes) {
  1007. return invokeCallback(id, extend({ errMsg: name + ":fail" + (errMsg ? " " + errMsg : "") }, errRes));
  1008. }
  1009. function beforeInvokeApi(name, args, protocol, options) {
  1010. {
  1011. validateProtocols(name, args, protocol);
  1012. }
  1013. if (options && options.beforeInvoke) {
  1014. const errMsg2 = options.beforeInvoke(args);
  1015. if (isString(errMsg2)) {
  1016. return errMsg2;
  1017. }
  1018. }
  1019. const errMsg = formatApiArgs(args, options);
  1020. if (errMsg) {
  1021. return errMsg;
  1022. }
  1023. }
  1024. function normalizeErrMsg(errMsg) {
  1025. if (!errMsg || isString(errMsg)) {
  1026. return errMsg;
  1027. }
  1028. if (errMsg.stack) {
  1029. console.error(errMsg.message + LINEFEED + errMsg.stack);
  1030. return errMsg.message;
  1031. }
  1032. return errMsg;
  1033. }
  1034. function wrapperTaskApi(name, fn, protocol, options) {
  1035. return (args) => {
  1036. const id = createAsyncApiCallback(name, args, options);
  1037. const errMsg = beforeInvokeApi(name, [args], protocol, options);
  1038. if (errMsg) {
  1039. return invokeFail(id, name, errMsg);
  1040. }
  1041. return fn(args, {
  1042. resolve: (res) => invokeSuccess(id, name, res),
  1043. reject: (errMsg2, errRes) => invokeFail(id, name, normalizeErrMsg(errMsg2), errRes)
  1044. });
  1045. };
  1046. }
  1047. function wrapperSyncApi(name, fn, protocol, options) {
  1048. return (...args) => {
  1049. const errMsg = beforeInvokeApi(name, args, protocol, options);
  1050. if (errMsg) {
  1051. throw new Error(errMsg);
  1052. }
  1053. return fn.apply(null, args);
  1054. };
  1055. }
  1056. function wrapperAsyncApi(name, fn, protocol, options) {
  1057. return wrapperTaskApi(name, fn, protocol, options);
  1058. }
  1059. function defineSyncApi(name, fn, protocol, options) {
  1060. return wrapperSyncApi(name, fn, protocol, options);
  1061. }
  1062. function defineAsyncApi(name, fn, protocol, options) {
  1063. return promisify$1(name, wrapperAsyncApi(name, fn, protocol, options));
  1064. }
  1065. const API_UPX2PX = "upx2px";
  1066. const Upx2pxProtocol = [
  1067. {
  1068. name: "upx",
  1069. type: [Number, String],
  1070. required: true
  1071. }
  1072. ];
  1073. const EPS = 1e-4;
  1074. const BASE_DEVICE_WIDTH = 750;
  1075. let isIOS = false;
  1076. let deviceWidth = 0;
  1077. let deviceDPR = 0;
  1078. function checkDeviceWidth() {
  1079. const { platform: platform2, pixelRatio, windowWidth } = getBaseSystemInfo();
  1080. deviceWidth = windowWidth;
  1081. deviceDPR = pixelRatio;
  1082. isIOS = platform2 === "ios";
  1083. }
  1084. const upx2px = defineSyncApi(API_UPX2PX, (number2, newDeviceWidth) => {
  1085. if (deviceWidth === 0) {
  1086. checkDeviceWidth();
  1087. }
  1088. number2 = Number(number2);
  1089. if (number2 === 0) {
  1090. return 0;
  1091. }
  1092. let width = newDeviceWidth || deviceWidth;
  1093. let result = number2 / BASE_DEVICE_WIDTH * width;
  1094. if (result < 0) {
  1095. result = -result;
  1096. }
  1097. result = Math.floor(result + EPS);
  1098. if (result === 0) {
  1099. if (deviceDPR === 1 || !isIOS) {
  1100. result = 1;
  1101. } else {
  1102. result = 0.5;
  1103. }
  1104. }
  1105. return number2 < 0 ? -result : result;
  1106. }, Upx2pxProtocol);
  1107. const API_ADD_INTERCEPTOR = "addInterceptor";
  1108. const API_REMOVE_INTERCEPTOR = "removeInterceptor";
  1109. const AddInterceptorProtocol = [
  1110. {
  1111. name: "method",
  1112. type: [String, Object],
  1113. required: true
  1114. }
  1115. ];
  1116. const RemoveInterceptorProtocol = AddInterceptorProtocol;
  1117. function mergeInterceptorHook(interceptors2, interceptor) {
  1118. Object.keys(interceptor).forEach((hook) => {
  1119. if (isFunction(interceptor[hook])) {
  1120. interceptors2[hook] = mergeHook(interceptors2[hook], interceptor[hook]);
  1121. }
  1122. });
  1123. }
  1124. function removeInterceptorHook(interceptors2, interceptor) {
  1125. if (!interceptors2 || !interceptor) {
  1126. return;
  1127. }
  1128. Object.keys(interceptor).forEach((name) => {
  1129. const hooks = interceptors2[name];
  1130. const hook = interceptor[name];
  1131. if (isArray$1(hooks) && isFunction(hook)) {
  1132. remove(hooks, hook);
  1133. }
  1134. });
  1135. }
  1136. function mergeHook(parentVal, childVal) {
  1137. const res = childVal ? parentVal ? parentVal.concat(childVal) : isArray$1(childVal) ? childVal : [childVal] : parentVal;
  1138. return res ? dedupeHooks(res) : res;
  1139. }
  1140. function dedupeHooks(hooks) {
  1141. const res = [];
  1142. for (let i2 = 0; i2 < hooks.length; i2++) {
  1143. if (res.indexOf(hooks[i2]) === -1) {
  1144. res.push(hooks[i2]);
  1145. }
  1146. }
  1147. return res;
  1148. }
  1149. const addInterceptor = defineSyncApi(API_ADD_INTERCEPTOR, (method, interceptor) => {
  1150. if (isString(method) && isPlainObject$1(interceptor)) {
  1151. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), interceptor);
  1152. } else if (isPlainObject$1(method)) {
  1153. mergeInterceptorHook(globalInterceptors, method);
  1154. }
  1155. }, AddInterceptorProtocol);
  1156. const removeInterceptor = defineSyncApi(API_REMOVE_INTERCEPTOR, (method, interceptor) => {
  1157. if (isString(method)) {
  1158. if (isPlainObject$1(interceptor)) {
  1159. removeInterceptorHook(scopedInterceptors[method], interceptor);
  1160. } else {
  1161. delete scopedInterceptors[method];
  1162. }
  1163. } else if (isPlainObject$1(method)) {
  1164. removeInterceptorHook(globalInterceptors, method);
  1165. }
  1166. }, RemoveInterceptorProtocol);
  1167. const interceptors = {};
  1168. const API_ON = "$on";
  1169. const OnProtocol = [
  1170. {
  1171. name: "event",
  1172. type: String,
  1173. required: true
  1174. },
  1175. {
  1176. name: "callback",
  1177. type: Function,
  1178. required: true
  1179. }
  1180. ];
  1181. const API_ONCE = "$once";
  1182. const OnceProtocol = OnProtocol;
  1183. const API_OFF = "$off";
  1184. const OffProtocol = [
  1185. {
  1186. name: "event",
  1187. type: [String, Array]
  1188. },
  1189. {
  1190. name: "callback",
  1191. type: Function
  1192. }
  1193. ];
  1194. const API_EMIT = "$emit";
  1195. const EmitProtocol = [
  1196. {
  1197. name: "event",
  1198. type: String,
  1199. required: true
  1200. }
  1201. ];
  1202. const emitter = new E$1$1();
  1203. const $on = defineSyncApi(API_ON, (name, callback) => {
  1204. emitter.on(name, callback);
  1205. return () => emitter.off(name, callback);
  1206. }, OnProtocol);
  1207. const $once = defineSyncApi(API_ONCE, (name, callback) => {
  1208. emitter.once(name, callback);
  1209. return () => emitter.off(name, callback);
  1210. }, OnceProtocol);
  1211. const $off = defineSyncApi(API_OFF, (name, callback) => {
  1212. if (!name) {
  1213. emitter.e = {};
  1214. return;
  1215. }
  1216. if (!isArray$1(name))
  1217. name = [name];
  1218. name.forEach((n2) => emitter.off(n2, callback));
  1219. }, OffProtocol);
  1220. const $emit = defineSyncApi(API_EMIT, (name, ...args) => {
  1221. emitter.emit(name, ...args);
  1222. }, EmitProtocol);
  1223. let cid;
  1224. let cidErrMsg;
  1225. let enabled;
  1226. function normalizePushMessage(message) {
  1227. try {
  1228. return JSON.parse(message);
  1229. } catch (e2) {
  1230. }
  1231. return message;
  1232. }
  1233. function invokePushCallback(args) {
  1234. if (args.type === "enabled") {
  1235. enabled = true;
  1236. } else if (args.type === "clientId") {
  1237. cid = args.cid;
  1238. cidErrMsg = args.errMsg;
  1239. invokeGetPushCidCallbacks(cid, args.errMsg);
  1240. } else if (args.type === "pushMsg") {
  1241. const message = {
  1242. type: "receive",
  1243. data: normalizePushMessage(args.message)
  1244. };
  1245. for (let i2 = 0; i2 < onPushMessageCallbacks.length; i2++) {
  1246. const callback = onPushMessageCallbacks[i2];
  1247. callback(message);
  1248. if (message.stopped) {
  1249. break;
  1250. }
  1251. }
  1252. } else if (args.type === "click") {
  1253. onPushMessageCallbacks.forEach((callback) => {
  1254. callback({
  1255. type: "click",
  1256. data: normalizePushMessage(args.message)
  1257. });
  1258. });
  1259. }
  1260. }
  1261. const getPushCidCallbacks = [];
  1262. function invokeGetPushCidCallbacks(cid2, errMsg) {
  1263. getPushCidCallbacks.forEach((callback) => {
  1264. callback(cid2, errMsg);
  1265. });
  1266. getPushCidCallbacks.length = 0;
  1267. }
  1268. const API_GET_PUSH_CLIENT_ID = "getPushClientId";
  1269. const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_2, { resolve: resolve2, reject }) => {
  1270. Promise.resolve().then(() => {
  1271. if (typeof enabled === "undefined") {
  1272. enabled = false;
  1273. cid = "";
  1274. cidErrMsg = "uniPush is not enabled";
  1275. }
  1276. getPushCidCallbacks.push((cid2, errMsg) => {
  1277. if (cid2) {
  1278. resolve2({ cid: cid2 });
  1279. } else {
  1280. reject(errMsg);
  1281. }
  1282. });
  1283. if (typeof cid !== "undefined") {
  1284. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1285. }
  1286. });
  1287. });
  1288. const onPushMessageCallbacks = [];
  1289. const onPushMessage = (fn) => {
  1290. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1291. onPushMessageCallbacks.push(fn);
  1292. }
  1293. };
  1294. const offPushMessage = (fn) => {
  1295. if (!fn) {
  1296. onPushMessageCallbacks.length = 0;
  1297. } else {
  1298. const index2 = onPushMessageCallbacks.indexOf(fn);
  1299. if (index2 > -1) {
  1300. onPushMessageCallbacks.splice(index2, 1);
  1301. }
  1302. }
  1303. };
  1304. 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/;
  1305. const CONTEXT_API_RE = /^create|Manager$/;
  1306. const CONTEXT_API_RE_EXC = ["createBLEConnection"];
  1307. const ASYNC_API = ["createBLEConnection"];
  1308. const CALLBACK_API_RE = /^on|^off/;
  1309. function isContextApi(name) {
  1310. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  1311. }
  1312. function isSyncApi(name) {
  1313. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  1314. }
  1315. function isCallbackApi(name) {
  1316. return CALLBACK_API_RE.test(name) && name !== "onPush";
  1317. }
  1318. function shouldPromise(name) {
  1319. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  1320. return false;
  1321. }
  1322. return true;
  1323. }
  1324. if (!Promise.prototype.finally) {
  1325. Promise.prototype.finally = function(onfinally) {
  1326. const promise2 = this.constructor;
  1327. return this.then((value2) => promise2.resolve(onfinally && onfinally()).then(() => value2), (reason) => promise2.resolve(onfinally && onfinally()).then(() => {
  1328. throw reason;
  1329. }));
  1330. };
  1331. }
  1332. function promisify(name, api) {
  1333. if (!shouldPromise(name)) {
  1334. return api;
  1335. }
  1336. if (!isFunction(api)) {
  1337. return api;
  1338. }
  1339. return function promiseApi(options = {}, ...rest) {
  1340. if (isFunction(options.success) || isFunction(options.fail) || isFunction(options.complete)) {
  1341. return wrapperReturnValue(name, invokeApi(name, api, options, rest));
  1342. }
  1343. return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
  1344. invokeApi(name, api, extend({}, options, {
  1345. success: resolve2,
  1346. fail: reject
  1347. }), rest);
  1348. })));
  1349. };
  1350. }
  1351. const CALLBACKS = ["success", "fail", "cancel", "complete"];
  1352. function initWrapper(protocols2) {
  1353. function processCallback(methodName, method, returnValue) {
  1354. return function(res) {
  1355. return method(processReturnValue(methodName, res, returnValue));
  1356. };
  1357. }
  1358. function processArgs(methodName, fromArgs, argsOption = {}, returnValue = {}, keepFromArgs = false) {
  1359. if (isPlainObject$1(fromArgs)) {
  1360. const toArgs = keepFromArgs === true ? fromArgs : {};
  1361. if (isFunction(argsOption)) {
  1362. argsOption = argsOption(fromArgs, toArgs) || {};
  1363. }
  1364. for (const key in fromArgs) {
  1365. if (hasOwn$1(argsOption, key)) {
  1366. let keyOption = argsOption[key];
  1367. if (isFunction(keyOption)) {
  1368. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  1369. }
  1370. if (!keyOption) {
  1371. console.warn(`微信小程序 ${methodName} 暂不支持 ${key}`);
  1372. } else if (isString(keyOption)) {
  1373. toArgs[keyOption] = fromArgs[key];
  1374. } else if (isPlainObject$1(keyOption)) {
  1375. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  1376. }
  1377. } else if (CALLBACKS.indexOf(key) !== -1) {
  1378. const callback = fromArgs[key];
  1379. if (isFunction(callback)) {
  1380. toArgs[key] = processCallback(methodName, callback, returnValue);
  1381. }
  1382. } else {
  1383. if (!keepFromArgs && !hasOwn$1(toArgs, key)) {
  1384. toArgs[key] = fromArgs[key];
  1385. }
  1386. }
  1387. }
  1388. return toArgs;
  1389. } else if (isFunction(fromArgs)) {
  1390. fromArgs = processCallback(methodName, fromArgs, returnValue);
  1391. }
  1392. return fromArgs;
  1393. }
  1394. function processReturnValue(methodName, res, returnValue, keepReturnValue = false) {
  1395. if (isFunction(protocols2.returnValue)) {
  1396. res = protocols2.returnValue(methodName, res);
  1397. }
  1398. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  1399. }
  1400. return function wrapper(methodName, method) {
  1401. if (!hasOwn$1(protocols2, methodName)) {
  1402. return method;
  1403. }
  1404. const protocol = protocols2[methodName];
  1405. if (!protocol) {
  1406. return function() {
  1407. console.error(`微信小程序 暂不支持${methodName}`);
  1408. };
  1409. }
  1410. return function(arg1, arg2) {
  1411. let options = protocol;
  1412. if (isFunction(protocol)) {
  1413. options = protocol(arg1);
  1414. }
  1415. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  1416. const args = [arg1];
  1417. if (typeof arg2 !== "undefined") {
  1418. args.push(arg2);
  1419. }
  1420. const returnValue = wx[options.name || methodName].apply(wx, args);
  1421. if (isSyncApi(methodName)) {
  1422. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1423. }
  1424. return returnValue;
  1425. };
  1426. };
  1427. }
  1428. const getLocale = () => {
  1429. const app = isFunction(getApp) && getApp({ allowDefault: true });
  1430. if (app && app.$vm) {
  1431. return app.$vm.$locale;
  1432. }
  1433. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  1434. };
  1435. const setLocale = (locale) => {
  1436. const app = isFunction(getApp) && getApp();
  1437. if (!app) {
  1438. return false;
  1439. }
  1440. const oldLocale = app.$vm.$locale;
  1441. if (oldLocale !== locale) {
  1442. app.$vm.$locale = locale;
  1443. onLocaleChangeCallbacks.forEach((fn) => fn({ locale }));
  1444. return true;
  1445. }
  1446. return false;
  1447. };
  1448. const onLocaleChangeCallbacks = [];
  1449. const onLocaleChange = (fn) => {
  1450. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  1451. onLocaleChangeCallbacks.push(fn);
  1452. }
  1453. };
  1454. if (typeof global !== "undefined") {
  1455. global.getLocale = getLocale;
  1456. }
  1457. const UUID_KEY = "__DC_STAT_UUID";
  1458. let deviceId;
  1459. function useDeviceId(global2 = wx) {
  1460. return function addDeviceId(_2, toRes) {
  1461. deviceId = deviceId || global2.getStorageSync(UUID_KEY);
  1462. if (!deviceId) {
  1463. deviceId = Date.now() + "" + Math.floor(Math.random() * 1e7);
  1464. wx.setStorage({
  1465. key: UUID_KEY,
  1466. data: deviceId
  1467. });
  1468. }
  1469. toRes.deviceId = deviceId;
  1470. };
  1471. }
  1472. function addSafeAreaInsets(fromRes, toRes) {
  1473. if (fromRes.safeArea) {
  1474. const safeArea = fromRes.safeArea;
  1475. toRes.safeAreaInsets = {
  1476. top: safeArea.top,
  1477. left: safeArea.left,
  1478. right: fromRes.windowWidth - safeArea.right,
  1479. bottom: fromRes.screenHeight - safeArea.bottom
  1480. };
  1481. }
  1482. }
  1483. function populateParameters(fromRes, toRes) {
  1484. const { brand = "", model = "", system = "", language = "", theme, version: version2, platform: platform2, fontSizeSetting, SDKVersion, pixelRatio, deviceOrientation } = fromRes;
  1485. let osName = "";
  1486. let osVersion = "";
  1487. {
  1488. osName = system.split(" ")[0] || "";
  1489. osVersion = system.split(" ")[1] || "";
  1490. }
  1491. let hostVersion = version2;
  1492. let deviceType = getGetDeviceType(fromRes, model);
  1493. let deviceBrand = getDeviceBrand(brand);
  1494. let _hostName = getHostName(fromRes);
  1495. let _deviceOrientation = deviceOrientation;
  1496. let _devicePixelRatio = pixelRatio;
  1497. let _SDKVersion = SDKVersion;
  1498. const hostLanguage = language.replace(/_/g, "-");
  1499. const parameters = {
  1500. appId: "__UNI__3DD118D",
  1501. appName: "lrr-mini-program",
  1502. appVersion: "1.0.0",
  1503. appVersionCode: "100",
  1504. appLanguage: getAppLanguage(hostLanguage),
  1505. uniCompileVersion: "3.7.11",
  1506. uniRuntimeVersion: "3.7.11",
  1507. uniPlatform: "mp-weixin",
  1508. deviceBrand,
  1509. deviceModel: model,
  1510. deviceType,
  1511. devicePixelRatio: _devicePixelRatio,
  1512. deviceOrientation: _deviceOrientation,
  1513. osName: osName.toLocaleLowerCase(),
  1514. osVersion,
  1515. hostTheme: theme,
  1516. hostVersion,
  1517. hostLanguage,
  1518. hostName: _hostName,
  1519. hostSDKVersion: _SDKVersion,
  1520. hostFontSizeSetting: fontSizeSetting,
  1521. windowTop: 0,
  1522. windowBottom: 0,
  1523. // TODO
  1524. osLanguage: void 0,
  1525. osTheme: void 0,
  1526. ua: void 0,
  1527. hostPackageName: void 0,
  1528. browserName: void 0,
  1529. browserVersion: void 0
  1530. };
  1531. extend(toRes, parameters);
  1532. }
  1533. function getGetDeviceType(fromRes, model) {
  1534. let deviceType = fromRes.deviceType || "phone";
  1535. {
  1536. const deviceTypeMaps = {
  1537. ipad: "pad",
  1538. windows: "pc",
  1539. mac: "pc"
  1540. };
  1541. const deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  1542. const _model = model.toLocaleLowerCase();
  1543. for (let index2 = 0; index2 < deviceTypeMapsKeys.length; index2++) {
  1544. const _m = deviceTypeMapsKeys[index2];
  1545. if (_model.indexOf(_m) !== -1) {
  1546. deviceType = deviceTypeMaps[_m];
  1547. break;
  1548. }
  1549. }
  1550. }
  1551. return deviceType;
  1552. }
  1553. function getDeviceBrand(brand) {
  1554. let deviceBrand = brand;
  1555. if (deviceBrand) {
  1556. deviceBrand = deviceBrand.toLocaleLowerCase();
  1557. }
  1558. return deviceBrand;
  1559. }
  1560. function getAppLanguage(defaultLanguage) {
  1561. return getLocale ? getLocale() : defaultLanguage;
  1562. }
  1563. function getHostName(fromRes) {
  1564. const _platform = "WeChat";
  1565. let _hostName = fromRes.hostName || _platform;
  1566. {
  1567. if (fromRes.environment) {
  1568. _hostName = fromRes.environment;
  1569. } else if (fromRes.host && fromRes.host.env) {
  1570. _hostName = fromRes.host.env;
  1571. }
  1572. }
  1573. return _hostName;
  1574. }
  1575. const getSystemInfo = {
  1576. returnValue: (fromRes, toRes) => {
  1577. addSafeAreaInsets(fromRes, toRes);
  1578. useDeviceId()(fromRes, toRes);
  1579. populateParameters(fromRes, toRes);
  1580. }
  1581. };
  1582. const getSystemInfoSync = getSystemInfo;
  1583. const redirectTo = {};
  1584. const previewImage = {
  1585. args(fromArgs, toArgs) {
  1586. let currentIndex = parseInt(fromArgs.current);
  1587. if (isNaN(currentIndex)) {
  1588. return;
  1589. }
  1590. const urls = fromArgs.urls;
  1591. if (!isArray$1(urls)) {
  1592. return;
  1593. }
  1594. const len = urls.length;
  1595. if (!len) {
  1596. return;
  1597. }
  1598. if (currentIndex < 0) {
  1599. currentIndex = 0;
  1600. } else if (currentIndex >= len) {
  1601. currentIndex = len - 1;
  1602. }
  1603. if (currentIndex > 0) {
  1604. toArgs.current = urls[currentIndex];
  1605. toArgs.urls = urls.filter((item, index2) => index2 < currentIndex ? item !== urls[currentIndex] : true);
  1606. } else {
  1607. toArgs.current = urls[0];
  1608. }
  1609. return {
  1610. indicator: false,
  1611. loop: false
  1612. };
  1613. }
  1614. };
  1615. const showActionSheet = {
  1616. args(fromArgs, toArgs) {
  1617. toArgs.alertText = fromArgs.title;
  1618. }
  1619. };
  1620. const getDeviceInfo = {
  1621. returnValue: (fromRes, toRes) => {
  1622. const { brand, model } = fromRes;
  1623. let deviceType = getGetDeviceType(fromRes, model);
  1624. let deviceBrand = getDeviceBrand(brand);
  1625. useDeviceId()(fromRes, toRes);
  1626. toRes = sortObject(extend(toRes, {
  1627. deviceType,
  1628. deviceBrand,
  1629. deviceModel: model
  1630. }));
  1631. }
  1632. };
  1633. const getAppBaseInfo = {
  1634. returnValue: (fromRes, toRes) => {
  1635. const { version: version2, language, SDKVersion, theme } = fromRes;
  1636. let _hostName = getHostName(fromRes);
  1637. let hostLanguage = language.replace(/_/g, "-");
  1638. toRes = sortObject(extend(toRes, {
  1639. hostVersion: version2,
  1640. hostLanguage,
  1641. hostName: _hostName,
  1642. hostSDKVersion: SDKVersion,
  1643. hostTheme: theme,
  1644. appId: "__UNI__3DD118D",
  1645. appName: "lrr-mini-program",
  1646. appVersion: "1.0.0",
  1647. appVersionCode: "100",
  1648. appLanguage: getAppLanguage(hostLanguage)
  1649. }));
  1650. }
  1651. };
  1652. const getWindowInfo$1 = {
  1653. returnValue: (fromRes, toRes) => {
  1654. addSafeAreaInsets(fromRes, toRes);
  1655. toRes = sortObject(extend(toRes, {
  1656. windowTop: 0,
  1657. windowBottom: 0
  1658. }));
  1659. }
  1660. };
  1661. const getAppAuthorizeSetting = {
  1662. returnValue: function(fromRes, toRes) {
  1663. const { locationReducedAccuracy } = fromRes;
  1664. toRes.locationAccuracy = "unsupported";
  1665. if (locationReducedAccuracy === true) {
  1666. toRes.locationAccuracy = "reduced";
  1667. } else if (locationReducedAccuracy === false) {
  1668. toRes.locationAccuracy = "full";
  1669. }
  1670. }
  1671. };
  1672. const baseApis = {
  1673. $on,
  1674. $off,
  1675. $once,
  1676. $emit,
  1677. upx2px,
  1678. interceptors,
  1679. addInterceptor,
  1680. removeInterceptor,
  1681. onCreateVueApp,
  1682. invokeCreateVueAppHook,
  1683. getLocale,
  1684. setLocale,
  1685. onLocaleChange,
  1686. getPushClientId,
  1687. onPushMessage,
  1688. offPushMessage,
  1689. invokePushCallback
  1690. };
  1691. function initUni(api, protocols2, platform2 = wx) {
  1692. const wrapper = initWrapper(protocols2);
  1693. const UniProxyHandlers = {
  1694. get(target, key) {
  1695. if (hasOwn$1(target, key)) {
  1696. return target[key];
  1697. }
  1698. if (hasOwn$1(api, key)) {
  1699. return promisify(key, api[key]);
  1700. }
  1701. if (hasOwn$1(baseApis, key)) {
  1702. return promisify(key, baseApis[key]);
  1703. }
  1704. return promisify(key, wrapper(key, platform2[key]));
  1705. }
  1706. };
  1707. return new Proxy({}, UniProxyHandlers);
  1708. }
  1709. function initGetProvider(providers) {
  1710. return function getProvider2({ service, success, fail, complete }) {
  1711. let res;
  1712. if (providers[service]) {
  1713. res = {
  1714. errMsg: "getProvider:ok",
  1715. service,
  1716. provider: providers[service]
  1717. };
  1718. isFunction(success) && success(res);
  1719. } else {
  1720. res = {
  1721. errMsg: "getProvider:fail:服务[" + service + "]不存在"
  1722. };
  1723. isFunction(fail) && fail(res);
  1724. }
  1725. isFunction(complete) && complete(res);
  1726. };
  1727. }
  1728. const objectKeys = [
  1729. "qy",
  1730. "env",
  1731. "error",
  1732. "version",
  1733. "lanDebug",
  1734. "cloud",
  1735. "serviceMarket",
  1736. "router",
  1737. "worklet"
  1738. ];
  1739. const singlePageDisableKey = ["lanDebug", "router", "worklet"];
  1740. const launchOption = wx.getLaunchOptionsSync ? wx.getLaunchOptionsSync() : null;
  1741. function isWxKey(key) {
  1742. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  1743. return false;
  1744. }
  1745. return objectKeys.indexOf(key) > -1 || typeof wx[key] === "function";
  1746. }
  1747. function initWx() {
  1748. const newWx = {};
  1749. for (const key in wx) {
  1750. if (isWxKey(key)) {
  1751. newWx[key] = wx[key];
  1752. }
  1753. }
  1754. if (typeof globalThis !== "undefined") {
  1755. globalThis.wx = newWx;
  1756. }
  1757. return newWx;
  1758. }
  1759. const mocks$1 = ["__route__", "__wxExparserNodeId__", "__wxWebviewId__"];
  1760. const getProvider = initGetProvider({
  1761. oauth: ["weixin"],
  1762. share: ["weixin"],
  1763. payment: ["wxpay"],
  1764. push: ["weixin"]
  1765. });
  1766. function initComponentMocks(component) {
  1767. const res = /* @__PURE__ */ Object.create(null);
  1768. mocks$1.forEach((name) => {
  1769. res[name] = component[name];
  1770. });
  1771. return res;
  1772. }
  1773. function createSelectorQuery() {
  1774. const query = wx$2.createSelectorQuery();
  1775. const oldIn = query.in;
  1776. query.in = function newIn(component) {
  1777. return oldIn.call(this, initComponentMocks(component));
  1778. };
  1779. return query;
  1780. }
  1781. const wx$2 = initWx();
  1782. let baseInfo = wx$2.getAppBaseInfo && wx$2.getAppBaseInfo();
  1783. if (!baseInfo) {
  1784. baseInfo = wx$2.getSystemInfoSync();
  1785. }
  1786. const host = baseInfo ? baseInfo.host : null;
  1787. const shareVideoMessage = host && host.env === "SAAASDK" ? wx$2.miniapp.shareVideoMessage : wx$2.shareVideoMessage;
  1788. var shims = /* @__PURE__ */ Object.freeze({
  1789. __proto__: null,
  1790. createSelectorQuery,
  1791. getProvider,
  1792. shareVideoMessage
  1793. });
  1794. const compressImage = {
  1795. args(fromArgs, toArgs) {
  1796. if (fromArgs.compressedHeight && !toArgs.compressHeight) {
  1797. toArgs.compressHeight = fromArgs.compressedHeight;
  1798. }
  1799. if (fromArgs.compressedWidth && !toArgs.compressWidth) {
  1800. toArgs.compressWidth = fromArgs.compressedWidth;
  1801. }
  1802. }
  1803. };
  1804. var protocols = /* @__PURE__ */ Object.freeze({
  1805. __proto__: null,
  1806. compressImage,
  1807. getAppAuthorizeSetting,
  1808. getAppBaseInfo,
  1809. getDeviceInfo,
  1810. getSystemInfo,
  1811. getSystemInfoSync,
  1812. getWindowInfo: getWindowInfo$1,
  1813. previewImage,
  1814. redirectTo,
  1815. showActionSheet
  1816. });
  1817. const wx$1 = initWx();
  1818. var index$1 = initUni(shims, protocols, wx$1);
  1819. function warn$1(msg, ...args) {
  1820. console.warn(`[Vue warn] ${msg}`, ...args);
  1821. }
  1822. let activeEffectScope;
  1823. class EffectScope {
  1824. constructor(detached = false) {
  1825. this.detached = detached;
  1826. this._active = true;
  1827. this.effects = [];
  1828. this.cleanups = [];
  1829. this.parent = activeEffectScope;
  1830. if (!detached && activeEffectScope) {
  1831. this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
  1832. }
  1833. }
  1834. get active() {
  1835. return this._active;
  1836. }
  1837. run(fn) {
  1838. if (this._active) {
  1839. const currentEffectScope = activeEffectScope;
  1840. try {
  1841. activeEffectScope = this;
  1842. return fn();
  1843. } finally {
  1844. activeEffectScope = currentEffectScope;
  1845. }
  1846. } else {
  1847. warn$1(`cannot run an inactive effect scope.`);
  1848. }
  1849. }
  1850. /**
  1851. * This should only be called on non-detached scopes
  1852. * @internal
  1853. */
  1854. on() {
  1855. activeEffectScope = this;
  1856. }
  1857. /**
  1858. * This should only be called on non-detached scopes
  1859. * @internal
  1860. */
  1861. off() {
  1862. activeEffectScope = this.parent;
  1863. }
  1864. stop(fromParent) {
  1865. if (this._active) {
  1866. let i2, l2;
  1867. for (i2 = 0, l2 = this.effects.length; i2 < l2; i2++) {
  1868. this.effects[i2].stop();
  1869. }
  1870. for (i2 = 0, l2 = this.cleanups.length; i2 < l2; i2++) {
  1871. this.cleanups[i2]();
  1872. }
  1873. if (this.scopes) {
  1874. for (i2 = 0, l2 = this.scopes.length; i2 < l2; i2++) {
  1875. this.scopes[i2].stop(true);
  1876. }
  1877. }
  1878. if (!this.detached && this.parent && !fromParent) {
  1879. const last = this.parent.scopes.pop();
  1880. if (last && last !== this) {
  1881. this.parent.scopes[this.index] = last;
  1882. last.index = this.index;
  1883. }
  1884. }
  1885. this.parent = void 0;
  1886. this._active = false;
  1887. }
  1888. }
  1889. }
  1890. function effectScope(detached) {
  1891. return new EffectScope(detached);
  1892. }
  1893. function recordEffectScope(effect, scope = activeEffectScope) {
  1894. if (scope && scope.active) {
  1895. scope.effects.push(effect);
  1896. }
  1897. }
  1898. function getCurrentScope() {
  1899. return activeEffectScope;
  1900. }
  1901. const createDep = (effects) => {
  1902. const dep = new Set(effects);
  1903. dep.w = 0;
  1904. dep.n = 0;
  1905. return dep;
  1906. };
  1907. const wasTracked = (dep) => (dep.w & trackOpBit) > 0;
  1908. const newTracked = (dep) => (dep.n & trackOpBit) > 0;
  1909. const initDepMarkers = ({ deps }) => {
  1910. if (deps.length) {
  1911. for (let i2 = 0; i2 < deps.length; i2++) {
  1912. deps[i2].w |= trackOpBit;
  1913. }
  1914. }
  1915. };
  1916. const finalizeDepMarkers = (effect) => {
  1917. const { deps } = effect;
  1918. if (deps.length) {
  1919. let ptr = 0;
  1920. for (let i2 = 0; i2 < deps.length; i2++) {
  1921. const dep = deps[i2];
  1922. if (wasTracked(dep) && !newTracked(dep)) {
  1923. dep.delete(effect);
  1924. } else {
  1925. deps[ptr++] = dep;
  1926. }
  1927. dep.w &= ~trackOpBit;
  1928. dep.n &= ~trackOpBit;
  1929. }
  1930. deps.length = ptr;
  1931. }
  1932. };
  1933. const targetMap = /* @__PURE__ */ new WeakMap();
  1934. let effectTrackDepth = 0;
  1935. let trackOpBit = 1;
  1936. const maxMarkerBits = 30;
  1937. let activeEffect;
  1938. const ITERATE_KEY = Symbol("iterate");
  1939. const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate");
  1940. class ReactiveEffect {
  1941. constructor(fn, scheduler = null, scope) {
  1942. this.fn = fn;
  1943. this.scheduler = scheduler;
  1944. this.active = true;
  1945. this.deps = [];
  1946. this.parent = void 0;
  1947. recordEffectScope(this, scope);
  1948. }
  1949. run() {
  1950. if (!this.active) {
  1951. return this.fn();
  1952. }
  1953. let parent = activeEffect;
  1954. let lastShouldTrack = shouldTrack;
  1955. while (parent) {
  1956. if (parent === this) {
  1957. return;
  1958. }
  1959. parent = parent.parent;
  1960. }
  1961. try {
  1962. this.parent = activeEffect;
  1963. activeEffect = this;
  1964. shouldTrack = true;
  1965. trackOpBit = 1 << ++effectTrackDepth;
  1966. if (effectTrackDepth <= maxMarkerBits) {
  1967. initDepMarkers(this);
  1968. } else {
  1969. cleanupEffect(this);
  1970. }
  1971. return this.fn();
  1972. } finally {
  1973. if (effectTrackDepth <= maxMarkerBits) {
  1974. finalizeDepMarkers(this);
  1975. }
  1976. trackOpBit = 1 << --effectTrackDepth;
  1977. activeEffect = this.parent;
  1978. shouldTrack = lastShouldTrack;
  1979. this.parent = void 0;
  1980. if (this.deferStop) {
  1981. this.stop();
  1982. }
  1983. }
  1984. }
  1985. stop() {
  1986. if (activeEffect === this) {
  1987. this.deferStop = true;
  1988. } else if (this.active) {
  1989. cleanupEffect(this);
  1990. if (this.onStop) {
  1991. this.onStop();
  1992. }
  1993. this.active = false;
  1994. }
  1995. }
  1996. }
  1997. function cleanupEffect(effect) {
  1998. const { deps } = effect;
  1999. if (deps.length) {
  2000. for (let i2 = 0; i2 < deps.length; i2++) {
  2001. deps[i2].delete(effect);
  2002. }
  2003. deps.length = 0;
  2004. }
  2005. }
  2006. let shouldTrack = true;
  2007. const trackStack = [];
  2008. function pauseTracking() {
  2009. trackStack.push(shouldTrack);
  2010. shouldTrack = false;
  2011. }
  2012. function resetTracking() {
  2013. const last = trackStack.pop();
  2014. shouldTrack = last === void 0 ? true : last;
  2015. }
  2016. function track(target, type, key) {
  2017. if (shouldTrack && activeEffect) {
  2018. let depsMap = targetMap.get(target);
  2019. if (!depsMap) {
  2020. targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
  2021. }
  2022. let dep = depsMap.get(key);
  2023. if (!dep) {
  2024. depsMap.set(key, dep = createDep());
  2025. }
  2026. const eventInfo = { effect: activeEffect, target, type, key };
  2027. trackEffects(dep, eventInfo);
  2028. }
  2029. }
  2030. function trackEffects(dep, debuggerEventExtraInfo) {
  2031. let shouldTrack2 = false;
  2032. if (effectTrackDepth <= maxMarkerBits) {
  2033. if (!newTracked(dep)) {
  2034. dep.n |= trackOpBit;
  2035. shouldTrack2 = !wasTracked(dep);
  2036. }
  2037. } else {
  2038. shouldTrack2 = !dep.has(activeEffect);
  2039. }
  2040. if (shouldTrack2) {
  2041. dep.add(activeEffect);
  2042. activeEffect.deps.push(dep);
  2043. if (activeEffect.onTrack) {
  2044. activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo));
  2045. }
  2046. }
  2047. }
  2048. function trigger(target, type, key, newValue, oldValue, oldTarget) {
  2049. const depsMap = targetMap.get(target);
  2050. if (!depsMap) {
  2051. return;
  2052. }
  2053. let deps = [];
  2054. if (type === "clear") {
  2055. deps = [...depsMap.values()];
  2056. } else if (key === "length" && isArray$1(target)) {
  2057. const newLength = Number(newValue);
  2058. depsMap.forEach((dep, key2) => {
  2059. if (key2 === "length" || key2 >= newLength) {
  2060. deps.push(dep);
  2061. }
  2062. });
  2063. } else {
  2064. if (key !== void 0) {
  2065. deps.push(depsMap.get(key));
  2066. }
  2067. switch (type) {
  2068. case "add":
  2069. if (!isArray$1(target)) {
  2070. deps.push(depsMap.get(ITERATE_KEY));
  2071. if (isMap(target)) {
  2072. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  2073. }
  2074. } else if (isIntegerKey(key)) {
  2075. deps.push(depsMap.get("length"));
  2076. }
  2077. break;
  2078. case "delete":
  2079. if (!isArray$1(target)) {
  2080. deps.push(depsMap.get(ITERATE_KEY));
  2081. if (isMap(target)) {
  2082. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  2083. }
  2084. }
  2085. break;
  2086. case "set":
  2087. if (isMap(target)) {
  2088. deps.push(depsMap.get(ITERATE_KEY));
  2089. }
  2090. break;
  2091. }
  2092. }
  2093. const eventInfo = { target, type, key, newValue, oldValue, oldTarget };
  2094. if (deps.length === 1) {
  2095. if (deps[0]) {
  2096. {
  2097. triggerEffects(deps[0], eventInfo);
  2098. }
  2099. }
  2100. } else {
  2101. const effects = [];
  2102. for (const dep of deps) {
  2103. if (dep) {
  2104. effects.push(...dep);
  2105. }
  2106. }
  2107. {
  2108. triggerEffects(createDep(effects), eventInfo);
  2109. }
  2110. }
  2111. }
  2112. function triggerEffects(dep, debuggerEventExtraInfo) {
  2113. const effects = isArray$1(dep) ? dep : [...dep];
  2114. for (const effect of effects) {
  2115. if (effect.computed) {
  2116. triggerEffect(effect, debuggerEventExtraInfo);
  2117. }
  2118. }
  2119. for (const effect of effects) {
  2120. if (!effect.computed) {
  2121. triggerEffect(effect, debuggerEventExtraInfo);
  2122. }
  2123. }
  2124. }
  2125. function triggerEffect(effect, debuggerEventExtraInfo) {
  2126. if (effect !== activeEffect || effect.allowRecurse) {
  2127. if (effect.onTrigger) {
  2128. effect.onTrigger(extend({ effect }, debuggerEventExtraInfo));
  2129. }
  2130. if (effect.scheduler) {
  2131. effect.scheduler();
  2132. } else {
  2133. effect.run();
  2134. }
  2135. }
  2136. }
  2137. const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
  2138. const builtInSymbols = new Set(
  2139. /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
  2140. );
  2141. const get$1 = /* @__PURE__ */ createGetter();
  2142. const shallowGet = /* @__PURE__ */ createGetter(false, true);
  2143. const readonlyGet = /* @__PURE__ */ createGetter(true);
  2144. const shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);
  2145. const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
  2146. function createArrayInstrumentations() {
  2147. const instrumentations = {};
  2148. ["includes", "indexOf", "lastIndexOf"].forEach((key) => {
  2149. instrumentations[key] = function(...args) {
  2150. const arr = toRaw(this);
  2151. for (let i2 = 0, l2 = this.length; i2 < l2; i2++) {
  2152. track(arr, "get", i2 + "");
  2153. }
  2154. const res = arr[key](...args);
  2155. if (res === -1 || res === false) {
  2156. return arr[key](...args.map(toRaw));
  2157. } else {
  2158. return res;
  2159. }
  2160. };
  2161. });
  2162. ["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
  2163. instrumentations[key] = function(...args) {
  2164. pauseTracking();
  2165. const res = toRaw(this)[key].apply(this, args);
  2166. resetTracking();
  2167. return res;
  2168. };
  2169. });
  2170. return instrumentations;
  2171. }
  2172. function hasOwnProperty(key) {
  2173. const obj = toRaw(this);
  2174. track(obj, "has", key);
  2175. return obj.hasOwnProperty(key);
  2176. }
  2177. function createGetter(isReadonly2 = false, shallow = false) {
  2178. return function get3(target, key, receiver) {
  2179. if (key === "__v_isReactive") {
  2180. return !isReadonly2;
  2181. } else if (key === "__v_isReadonly") {
  2182. return isReadonly2;
  2183. } else if (key === "__v_isShallow") {
  2184. return shallow;
  2185. } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {
  2186. return target;
  2187. }
  2188. const targetIsArray = isArray$1(target);
  2189. if (!isReadonly2) {
  2190. if (targetIsArray && hasOwn$1(arrayInstrumentations, key)) {
  2191. return Reflect.get(arrayInstrumentations, key, receiver);
  2192. }
  2193. if (key === "hasOwnProperty") {
  2194. return hasOwnProperty;
  2195. }
  2196. }
  2197. const res = Reflect.get(target, key, receiver);
  2198. if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
  2199. return res;
  2200. }
  2201. if (!isReadonly2) {
  2202. track(target, "get", key);
  2203. }
  2204. if (shallow) {
  2205. return res;
  2206. }
  2207. if (isRef(res)) {
  2208. return targetIsArray && isIntegerKey(key) ? res : res.value;
  2209. }
  2210. if (isObject$3(res)) {
  2211. return isReadonly2 ? readonly(res) : reactive(res);
  2212. }
  2213. return res;
  2214. };
  2215. }
  2216. const set$1 = /* @__PURE__ */ createSetter();
  2217. const shallowSet = /* @__PURE__ */ createSetter(true);
  2218. function createSetter(shallow = false) {
  2219. return function set2(target, key, value2, receiver) {
  2220. let oldValue = target[key];
  2221. if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value2)) {
  2222. return false;
  2223. }
  2224. if (!shallow) {
  2225. if (!isShallow(value2) && !isReadonly(value2)) {
  2226. oldValue = toRaw(oldValue);
  2227. value2 = toRaw(value2);
  2228. }
  2229. if (!isArray$1(target) && isRef(oldValue) && !isRef(value2)) {
  2230. oldValue.value = value2;
  2231. return true;
  2232. }
  2233. }
  2234. const hadKey = isArray$1(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn$1(target, key);
  2235. const result = Reflect.set(target, key, value2, receiver);
  2236. if (target === toRaw(receiver)) {
  2237. if (!hadKey) {
  2238. trigger(target, "add", key, value2);
  2239. } else if (hasChanged(value2, oldValue)) {
  2240. trigger(target, "set", key, value2, oldValue);
  2241. }
  2242. }
  2243. return result;
  2244. };
  2245. }
  2246. function deleteProperty(target, key) {
  2247. const hadKey = hasOwn$1(target, key);
  2248. const oldValue = target[key];
  2249. const result = Reflect.deleteProperty(target, key);
  2250. if (result && hadKey) {
  2251. trigger(target, "delete", key, void 0, oldValue);
  2252. }
  2253. return result;
  2254. }
  2255. function has$1(target, key) {
  2256. const result = Reflect.has(target, key);
  2257. if (!isSymbol(key) || !builtInSymbols.has(key)) {
  2258. track(target, "has", key);
  2259. }
  2260. return result;
  2261. }
  2262. function ownKeys(target) {
  2263. track(target, "iterate", isArray$1(target) ? "length" : ITERATE_KEY);
  2264. return Reflect.ownKeys(target);
  2265. }
  2266. const mutableHandlers = {
  2267. get: get$1,
  2268. set: set$1,
  2269. deleteProperty,
  2270. has: has$1,
  2271. ownKeys
  2272. };
  2273. const readonlyHandlers = {
  2274. get: readonlyGet,
  2275. set(target, key) {
  2276. {
  2277. warn$1(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
  2278. }
  2279. return true;
  2280. },
  2281. deleteProperty(target, key) {
  2282. {
  2283. warn$1(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
  2284. }
  2285. return true;
  2286. }
  2287. };
  2288. const shallowReactiveHandlers = /* @__PURE__ */ extend({}, mutableHandlers, {
  2289. get: shallowGet,
  2290. set: shallowSet
  2291. });
  2292. const shallowReadonlyHandlers = /* @__PURE__ */ extend({}, readonlyHandlers, {
  2293. get: shallowReadonlyGet
  2294. });
  2295. const toShallow = (value2) => value2;
  2296. const getProto = (v2) => Reflect.getPrototypeOf(v2);
  2297. function get(target, key, isReadonly2 = false, isShallow2 = false) {
  2298. target = target[
  2299. "__v_raw"
  2300. /* ReactiveFlags.RAW */
  2301. ];
  2302. const rawTarget = toRaw(target);
  2303. const rawKey = toRaw(key);
  2304. if (!isReadonly2) {
  2305. if (key !== rawKey) {
  2306. track(rawTarget, "get", key);
  2307. }
  2308. track(rawTarget, "get", rawKey);
  2309. }
  2310. const { has: has2 } = getProto(rawTarget);
  2311. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  2312. if (has2.call(rawTarget, key)) {
  2313. return wrap(target.get(key));
  2314. } else if (has2.call(rawTarget, rawKey)) {
  2315. return wrap(target.get(rawKey));
  2316. } else if (target !== rawTarget) {
  2317. target.get(key);
  2318. }
  2319. }
  2320. function has(key, isReadonly2 = false) {
  2321. const target = this[
  2322. "__v_raw"
  2323. /* ReactiveFlags.RAW */
  2324. ];
  2325. const rawTarget = toRaw(target);
  2326. const rawKey = toRaw(key);
  2327. if (!isReadonly2) {
  2328. if (key !== rawKey) {
  2329. track(rawTarget, "has", key);
  2330. }
  2331. track(rawTarget, "has", rawKey);
  2332. }
  2333. return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
  2334. }
  2335. function size(target, isReadonly2 = false) {
  2336. target = target[
  2337. "__v_raw"
  2338. /* ReactiveFlags.RAW */
  2339. ];
  2340. !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
  2341. return Reflect.get(target, "size", target);
  2342. }
  2343. function add(value2) {
  2344. value2 = toRaw(value2);
  2345. const target = toRaw(this);
  2346. const proto = getProto(target);
  2347. const hadKey = proto.has.call(target, value2);
  2348. if (!hadKey) {
  2349. target.add(value2);
  2350. trigger(target, "add", value2, value2);
  2351. }
  2352. return this;
  2353. }
  2354. function set$2(key, value2) {
  2355. value2 = toRaw(value2);
  2356. const target = toRaw(this);
  2357. const { has: has2, get: get3 } = getProto(target);
  2358. let hadKey = has2.call(target, key);
  2359. if (!hadKey) {
  2360. key = toRaw(key);
  2361. hadKey = has2.call(target, key);
  2362. } else {
  2363. checkIdentityKeys(target, has2, key);
  2364. }
  2365. const oldValue = get3.call(target, key);
  2366. target.set(key, value2);
  2367. if (!hadKey) {
  2368. trigger(target, "add", key, value2);
  2369. } else if (hasChanged(value2, oldValue)) {
  2370. trigger(target, "set", key, value2, oldValue);
  2371. }
  2372. return this;
  2373. }
  2374. function deleteEntry(key) {
  2375. const target = toRaw(this);
  2376. const { has: has2, get: get3 } = getProto(target);
  2377. let hadKey = has2.call(target, key);
  2378. if (!hadKey) {
  2379. key = toRaw(key);
  2380. hadKey = has2.call(target, key);
  2381. } else {
  2382. checkIdentityKeys(target, has2, key);
  2383. }
  2384. const oldValue = get3 ? get3.call(target, key) : void 0;
  2385. const result = target.delete(key);
  2386. if (hadKey) {
  2387. trigger(target, "delete", key, void 0, oldValue);
  2388. }
  2389. return result;
  2390. }
  2391. function clear() {
  2392. const target = toRaw(this);
  2393. const hadItems = target.size !== 0;
  2394. const oldTarget = isMap(target) ? new Map(target) : new Set(target);
  2395. const result = target.clear();
  2396. if (hadItems) {
  2397. trigger(target, "clear", void 0, void 0, oldTarget);
  2398. }
  2399. return result;
  2400. }
  2401. function createForEach(isReadonly2, isShallow2) {
  2402. return function forEach3(callback, thisArg) {
  2403. const observed = this;
  2404. const target = observed[
  2405. "__v_raw"
  2406. /* ReactiveFlags.RAW */
  2407. ];
  2408. const rawTarget = toRaw(target);
  2409. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  2410. !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
  2411. return target.forEach((value2, key) => {
  2412. return callback.call(thisArg, wrap(value2), wrap(key), observed);
  2413. });
  2414. };
  2415. }
  2416. function createIterableMethod(method, isReadonly2, isShallow2) {
  2417. return function(...args) {
  2418. const target = this[
  2419. "__v_raw"
  2420. /* ReactiveFlags.RAW */
  2421. ];
  2422. const rawTarget = toRaw(target);
  2423. const targetIsMap = isMap(rawTarget);
  2424. const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
  2425. const isKeyOnly = method === "keys" && targetIsMap;
  2426. const innerIterator = target[method](...args);
  2427. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  2428. !isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
  2429. return {
  2430. // iterator protocol
  2431. next() {
  2432. const { value: value2, done } = innerIterator.next();
  2433. return done ? { value: value2, done } : {
  2434. value: isPair ? [wrap(value2[0]), wrap(value2[1])] : wrap(value2),
  2435. done
  2436. };
  2437. },
  2438. // iterable protocol
  2439. [Symbol.iterator]() {
  2440. return this;
  2441. }
  2442. };
  2443. };
  2444. }
  2445. function createReadonlyMethod(type) {
  2446. return function(...args) {
  2447. {
  2448. const key = args[0] ? `on key "${args[0]}" ` : ``;
  2449. console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this));
  2450. }
  2451. return type === "delete" ? false : this;
  2452. };
  2453. }
  2454. function createInstrumentations() {
  2455. const mutableInstrumentations2 = {
  2456. get(key) {
  2457. return get(this, key);
  2458. },
  2459. get size() {
  2460. return size(this);
  2461. },
  2462. has,
  2463. add,
  2464. set: set$2,
  2465. delete: deleteEntry,
  2466. clear,
  2467. forEach: createForEach(false, false)
  2468. };
  2469. const shallowInstrumentations2 = {
  2470. get(key) {
  2471. return get(this, key, false, true);
  2472. },
  2473. get size() {
  2474. return size(this);
  2475. },
  2476. has,
  2477. add,
  2478. set: set$2,
  2479. delete: deleteEntry,
  2480. clear,
  2481. forEach: createForEach(false, true)
  2482. };
  2483. const readonlyInstrumentations2 = {
  2484. get(key) {
  2485. return get(this, key, true);
  2486. },
  2487. get size() {
  2488. return size(this, true);
  2489. },
  2490. has(key) {
  2491. return has.call(this, key, true);
  2492. },
  2493. add: createReadonlyMethod(
  2494. "add"
  2495. /* TriggerOpTypes.ADD */
  2496. ),
  2497. set: createReadonlyMethod(
  2498. "set"
  2499. /* TriggerOpTypes.SET */
  2500. ),
  2501. delete: createReadonlyMethod(
  2502. "delete"
  2503. /* TriggerOpTypes.DELETE */
  2504. ),
  2505. clear: createReadonlyMethod(
  2506. "clear"
  2507. /* TriggerOpTypes.CLEAR */
  2508. ),
  2509. forEach: createForEach(true, false)
  2510. };
  2511. const shallowReadonlyInstrumentations2 = {
  2512. get(key) {
  2513. return get(this, key, true, true);
  2514. },
  2515. get size() {
  2516. return size(this, true);
  2517. },
  2518. has(key) {
  2519. return has.call(this, key, true);
  2520. },
  2521. add: createReadonlyMethod(
  2522. "add"
  2523. /* TriggerOpTypes.ADD */
  2524. ),
  2525. set: createReadonlyMethod(
  2526. "set"
  2527. /* TriggerOpTypes.SET */
  2528. ),
  2529. delete: createReadonlyMethod(
  2530. "delete"
  2531. /* TriggerOpTypes.DELETE */
  2532. ),
  2533. clear: createReadonlyMethod(
  2534. "clear"
  2535. /* TriggerOpTypes.CLEAR */
  2536. ),
  2537. forEach: createForEach(true, true)
  2538. };
  2539. const iteratorMethods = ["keys", "values", "entries", Symbol.iterator];
  2540. iteratorMethods.forEach((method) => {
  2541. mutableInstrumentations2[method] = createIterableMethod(method, false, false);
  2542. readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
  2543. shallowInstrumentations2[method] = createIterableMethod(method, false, true);
  2544. shallowReadonlyInstrumentations2[method] = createIterableMethod(method, true, true);
  2545. });
  2546. return [
  2547. mutableInstrumentations2,
  2548. readonlyInstrumentations2,
  2549. shallowInstrumentations2,
  2550. shallowReadonlyInstrumentations2
  2551. ];
  2552. }
  2553. const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* @__PURE__ */ createInstrumentations();
  2554. function createInstrumentationGetter(isReadonly2, shallow) {
  2555. const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
  2556. return (target, key, receiver) => {
  2557. if (key === "__v_isReactive") {
  2558. return !isReadonly2;
  2559. } else if (key === "__v_isReadonly") {
  2560. return isReadonly2;
  2561. } else if (key === "__v_raw") {
  2562. return target;
  2563. }
  2564. return Reflect.get(hasOwn$1(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
  2565. };
  2566. }
  2567. const mutableCollectionHandlers = {
  2568. get: /* @__PURE__ */ createInstrumentationGetter(false, false)
  2569. };
  2570. const shallowCollectionHandlers = {
  2571. get: /* @__PURE__ */ createInstrumentationGetter(false, true)
  2572. };
  2573. const readonlyCollectionHandlers = {
  2574. get: /* @__PURE__ */ createInstrumentationGetter(true, false)
  2575. };
  2576. const shallowReadonlyCollectionHandlers = {
  2577. get: /* @__PURE__ */ createInstrumentationGetter(true, true)
  2578. };
  2579. function checkIdentityKeys(target, has2, key) {
  2580. const rawKey = toRaw(key);
  2581. if (rawKey !== key && has2.call(target, rawKey)) {
  2582. const type = toRawType(target);
  2583. console.warn(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`);
  2584. }
  2585. }
  2586. const reactiveMap = /* @__PURE__ */ new WeakMap();
  2587. const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
  2588. const readonlyMap = /* @__PURE__ */ new WeakMap();
  2589. const shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
  2590. function targetTypeMap(rawType) {
  2591. switch (rawType) {
  2592. case "Object":
  2593. case "Array":
  2594. return 1;
  2595. case "Map":
  2596. case "Set":
  2597. case "WeakMap":
  2598. case "WeakSet":
  2599. return 2;
  2600. default:
  2601. return 0;
  2602. }
  2603. }
  2604. function getTargetType(value2) {
  2605. return value2[
  2606. "__v_skip"
  2607. /* ReactiveFlags.SKIP */
  2608. ] || !Object.isExtensible(value2) ? 0 : targetTypeMap(toRawType(value2));
  2609. }
  2610. function reactive(target) {
  2611. if (isReadonly(target)) {
  2612. return target;
  2613. }
  2614. return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
  2615. }
  2616. function shallowReactive(target) {
  2617. return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
  2618. }
  2619. function readonly(target) {
  2620. return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
  2621. }
  2622. function shallowReadonly(target) {
  2623. return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
  2624. }
  2625. function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
  2626. if (!isObject$3(target)) {
  2627. {
  2628. console.warn(`value cannot be made reactive: ${String(target)}`);
  2629. }
  2630. return target;
  2631. }
  2632. if (target[
  2633. "__v_raw"
  2634. /* ReactiveFlags.RAW */
  2635. ] && !(isReadonly2 && target[
  2636. "__v_isReactive"
  2637. /* ReactiveFlags.IS_REACTIVE */
  2638. ])) {
  2639. return target;
  2640. }
  2641. const existingProxy = proxyMap.get(target);
  2642. if (existingProxy) {
  2643. return existingProxy;
  2644. }
  2645. const targetType = getTargetType(target);
  2646. if (targetType === 0) {
  2647. return target;
  2648. }
  2649. const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
  2650. proxyMap.set(target, proxy);
  2651. return proxy;
  2652. }
  2653. function isReactive(value2) {
  2654. if (isReadonly(value2)) {
  2655. return isReactive(value2[
  2656. "__v_raw"
  2657. /* ReactiveFlags.RAW */
  2658. ]);
  2659. }
  2660. return !!(value2 && value2[
  2661. "__v_isReactive"
  2662. /* ReactiveFlags.IS_REACTIVE */
  2663. ]);
  2664. }
  2665. function isReadonly(value2) {
  2666. return !!(value2 && value2[
  2667. "__v_isReadonly"
  2668. /* ReactiveFlags.IS_READONLY */
  2669. ]);
  2670. }
  2671. function isShallow(value2) {
  2672. return !!(value2 && value2[
  2673. "__v_isShallow"
  2674. /* ReactiveFlags.IS_SHALLOW */
  2675. ]);
  2676. }
  2677. function isProxy(value2) {
  2678. return isReactive(value2) || isReadonly(value2);
  2679. }
  2680. function toRaw(observed) {
  2681. const raw = observed && observed[
  2682. "__v_raw"
  2683. /* ReactiveFlags.RAW */
  2684. ];
  2685. return raw ? toRaw(raw) : observed;
  2686. }
  2687. function markRaw(value2) {
  2688. def(value2, "__v_skip", true);
  2689. return value2;
  2690. }
  2691. const toReactive = (value2) => isObject$3(value2) ? reactive(value2) : value2;
  2692. const toReadonly = (value2) => isObject$3(value2) ? readonly(value2) : value2;
  2693. function trackRefValue(ref2) {
  2694. if (shouldTrack && activeEffect) {
  2695. ref2 = toRaw(ref2);
  2696. {
  2697. trackEffects(ref2.dep || (ref2.dep = createDep()), {
  2698. target: ref2,
  2699. type: "get",
  2700. key: "value"
  2701. });
  2702. }
  2703. }
  2704. }
  2705. function triggerRefValue(ref2, newVal) {
  2706. ref2 = toRaw(ref2);
  2707. const dep = ref2.dep;
  2708. if (dep) {
  2709. {
  2710. triggerEffects(dep, {
  2711. target: ref2,
  2712. type: "set",
  2713. key: "value",
  2714. newValue: newVal
  2715. });
  2716. }
  2717. }
  2718. }
  2719. function isRef(r2) {
  2720. return !!(r2 && r2.__v_isRef === true);
  2721. }
  2722. function ref(value2) {
  2723. return createRef(value2, false);
  2724. }
  2725. function createRef(rawValue, shallow) {
  2726. if (isRef(rawValue)) {
  2727. return rawValue;
  2728. }
  2729. return new RefImpl(rawValue, shallow);
  2730. }
  2731. class RefImpl {
  2732. constructor(value2, __v_isShallow) {
  2733. this.__v_isShallow = __v_isShallow;
  2734. this.dep = void 0;
  2735. this.__v_isRef = true;
  2736. this._rawValue = __v_isShallow ? value2 : toRaw(value2);
  2737. this._value = __v_isShallow ? value2 : toReactive(value2);
  2738. }
  2739. get value() {
  2740. trackRefValue(this);
  2741. return this._value;
  2742. }
  2743. set value(newVal) {
  2744. const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);
  2745. newVal = useDirectValue ? newVal : toRaw(newVal);
  2746. if (hasChanged(newVal, this._rawValue)) {
  2747. this._rawValue = newVal;
  2748. this._value = useDirectValue ? newVal : toReactive(newVal);
  2749. triggerRefValue(this, newVal);
  2750. }
  2751. }
  2752. }
  2753. function unref(ref2) {
  2754. return isRef(ref2) ? ref2.value : ref2;
  2755. }
  2756. const shallowUnwrapHandlers = {
  2757. get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
  2758. set: (target, key, value2, receiver) => {
  2759. const oldValue = target[key];
  2760. if (isRef(oldValue) && !isRef(value2)) {
  2761. oldValue.value = value2;
  2762. return true;
  2763. } else {
  2764. return Reflect.set(target, key, value2, receiver);
  2765. }
  2766. }
  2767. };
  2768. function proxyRefs(objectWithRefs) {
  2769. return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
  2770. }
  2771. var _a;
  2772. class ComputedRefImpl {
  2773. constructor(getter, _setter, isReadonly2, isSSR) {
  2774. this._setter = _setter;
  2775. this.dep = void 0;
  2776. this.__v_isRef = true;
  2777. this[_a] = false;
  2778. this._dirty = true;
  2779. this.effect = new ReactiveEffect(getter, () => {
  2780. if (!this._dirty) {
  2781. this._dirty = true;
  2782. triggerRefValue(this);
  2783. }
  2784. });
  2785. this.effect.computed = this;
  2786. this.effect.active = this._cacheable = !isSSR;
  2787. this[
  2788. "__v_isReadonly"
  2789. /* ReactiveFlags.IS_READONLY */
  2790. ] = isReadonly2;
  2791. }
  2792. get value() {
  2793. const self = toRaw(this);
  2794. trackRefValue(self);
  2795. if (self._dirty || !self._cacheable) {
  2796. self._dirty = false;
  2797. self._value = self.effect.run();
  2798. }
  2799. return self._value;
  2800. }
  2801. set value(newValue) {
  2802. this._setter(newValue);
  2803. }
  2804. }
  2805. _a = "__v_isReadonly";
  2806. function computed$1(getterOrOptions, debugOptions, isSSR = false) {
  2807. let getter;
  2808. let setter;
  2809. const onlyGetter = isFunction(getterOrOptions);
  2810. if (onlyGetter) {
  2811. getter = getterOrOptions;
  2812. setter = () => {
  2813. console.warn("Write operation failed: computed value is readonly");
  2814. };
  2815. } else {
  2816. getter = getterOrOptions.get;
  2817. setter = getterOrOptions.set;
  2818. }
  2819. const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);
  2820. if (debugOptions && !isSSR) {
  2821. cRef.effect.onTrack = debugOptions.onTrack;
  2822. cRef.effect.onTrigger = debugOptions.onTrigger;
  2823. }
  2824. return cRef;
  2825. }
  2826. const stack = [];
  2827. function pushWarningContext(vnode) {
  2828. stack.push(vnode);
  2829. }
  2830. function popWarningContext() {
  2831. stack.pop();
  2832. }
  2833. function warn(msg, ...args) {
  2834. pauseTracking();
  2835. const instance = stack.length ? stack[stack.length - 1].component : null;
  2836. const appWarnHandler = instance && instance.appContext.config.warnHandler;
  2837. const trace = getComponentTrace();
  2838. if (appWarnHandler) {
  2839. callWithErrorHandling(appWarnHandler, instance, 11, [
  2840. msg + args.join(""),
  2841. instance && instance.proxy,
  2842. trace.map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`).join("\n"),
  2843. trace
  2844. ]);
  2845. } else {
  2846. const warnArgs = [`[Vue warn]: ${msg}`, ...args];
  2847. if (trace.length && // avoid spamming console during tests
  2848. true) {
  2849. warnArgs.push(`
  2850. `, ...formatTrace(trace));
  2851. }
  2852. console.warn(...warnArgs);
  2853. }
  2854. resetTracking();
  2855. }
  2856. function getComponentTrace() {
  2857. let currentVNode = stack[stack.length - 1];
  2858. if (!currentVNode) {
  2859. return [];
  2860. }
  2861. const normalizedStack = [];
  2862. while (currentVNode) {
  2863. const last = normalizedStack[0];
  2864. if (last && last.vnode === currentVNode) {
  2865. last.recurseCount++;
  2866. } else {
  2867. normalizedStack.push({
  2868. vnode: currentVNode,
  2869. recurseCount: 0
  2870. });
  2871. }
  2872. const parentInstance = currentVNode.component && currentVNode.component.parent;
  2873. currentVNode = parentInstance && parentInstance.vnode;
  2874. }
  2875. return normalizedStack;
  2876. }
  2877. function formatTrace(trace) {
  2878. const logs = [];
  2879. trace.forEach((entry, i2) => {
  2880. logs.push(...i2 === 0 ? [] : [`
  2881. `], ...formatTraceEntry(entry));
  2882. });
  2883. return logs;
  2884. }
  2885. function formatTraceEntry({ vnode, recurseCount }) {
  2886. const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
  2887. const isRoot = vnode.component ? vnode.component.parent == null : false;
  2888. const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`;
  2889. const close = `>` + postfix;
  2890. return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
  2891. }
  2892. function formatProps(props2) {
  2893. const res = [];
  2894. const keys = Object.keys(props2);
  2895. keys.slice(0, 3).forEach((key) => {
  2896. res.push(...formatProp(key, props2[key]));
  2897. });
  2898. if (keys.length > 3) {
  2899. res.push(` ...`);
  2900. }
  2901. return res;
  2902. }
  2903. function formatProp(key, value2, raw) {
  2904. if (isString(value2)) {
  2905. value2 = JSON.stringify(value2);
  2906. return raw ? value2 : [`${key}=${value2}`];
  2907. } else if (typeof value2 === "number" || typeof value2 === "boolean" || value2 == null) {
  2908. return raw ? value2 : [`${key}=${value2}`];
  2909. } else if (isRef(value2)) {
  2910. value2 = formatProp(key, toRaw(value2.value), true);
  2911. return raw ? value2 : [`${key}=Ref<`, value2, `>`];
  2912. } else if (isFunction(value2)) {
  2913. return [`${key}=fn${value2.name ? `<${value2.name}>` : ``}`];
  2914. } else {
  2915. value2 = toRaw(value2);
  2916. return raw ? value2 : [`${key}=`, value2];
  2917. }
  2918. }
  2919. const ErrorTypeStrings = {
  2920. [
  2921. "sp"
  2922. /* LifecycleHooks.SERVER_PREFETCH */
  2923. ]: "serverPrefetch hook",
  2924. [
  2925. "bc"
  2926. /* LifecycleHooks.BEFORE_CREATE */
  2927. ]: "beforeCreate hook",
  2928. [
  2929. "c"
  2930. /* LifecycleHooks.CREATED */
  2931. ]: "created hook",
  2932. [
  2933. "bm"
  2934. /* LifecycleHooks.BEFORE_MOUNT */
  2935. ]: "beforeMount hook",
  2936. [
  2937. "m"
  2938. /* LifecycleHooks.MOUNTED */
  2939. ]: "mounted hook",
  2940. [
  2941. "bu"
  2942. /* LifecycleHooks.BEFORE_UPDATE */
  2943. ]: "beforeUpdate hook",
  2944. [
  2945. "u"
  2946. /* LifecycleHooks.UPDATED */
  2947. ]: "updated",
  2948. [
  2949. "bum"
  2950. /* LifecycleHooks.BEFORE_UNMOUNT */
  2951. ]: "beforeUnmount hook",
  2952. [
  2953. "um"
  2954. /* LifecycleHooks.UNMOUNTED */
  2955. ]: "unmounted hook",
  2956. [
  2957. "a"
  2958. /* LifecycleHooks.ACTIVATED */
  2959. ]: "activated hook",
  2960. [
  2961. "da"
  2962. /* LifecycleHooks.DEACTIVATED */
  2963. ]: "deactivated hook",
  2964. [
  2965. "ec"
  2966. /* LifecycleHooks.ERROR_CAPTURED */
  2967. ]: "errorCaptured hook",
  2968. [
  2969. "rtc"
  2970. /* LifecycleHooks.RENDER_TRACKED */
  2971. ]: "renderTracked hook",
  2972. [
  2973. "rtg"
  2974. /* LifecycleHooks.RENDER_TRIGGERED */
  2975. ]: "renderTriggered hook",
  2976. [
  2977. 0
  2978. /* ErrorCodes.SETUP_FUNCTION */
  2979. ]: "setup function",
  2980. [
  2981. 1
  2982. /* ErrorCodes.RENDER_FUNCTION */
  2983. ]: "render function",
  2984. [
  2985. 2
  2986. /* ErrorCodes.WATCH_GETTER */
  2987. ]: "watcher getter",
  2988. [
  2989. 3
  2990. /* ErrorCodes.WATCH_CALLBACK */
  2991. ]: "watcher callback",
  2992. [
  2993. 4
  2994. /* ErrorCodes.WATCH_CLEANUP */
  2995. ]: "watcher cleanup function",
  2996. [
  2997. 5
  2998. /* ErrorCodes.NATIVE_EVENT_HANDLER */
  2999. ]: "native event handler",
  3000. [
  3001. 6
  3002. /* ErrorCodes.COMPONENT_EVENT_HANDLER */
  3003. ]: "component event handler",
  3004. [
  3005. 7
  3006. /* ErrorCodes.VNODE_HOOK */
  3007. ]: "vnode hook",
  3008. [
  3009. 8
  3010. /* ErrorCodes.DIRECTIVE_HOOK */
  3011. ]: "directive hook",
  3012. [
  3013. 9
  3014. /* ErrorCodes.TRANSITION_HOOK */
  3015. ]: "transition hook",
  3016. [
  3017. 10
  3018. /* ErrorCodes.APP_ERROR_HANDLER */
  3019. ]: "app errorHandler",
  3020. [
  3021. 11
  3022. /* ErrorCodes.APP_WARN_HANDLER */
  3023. ]: "app warnHandler",
  3024. [
  3025. 12
  3026. /* ErrorCodes.FUNCTION_REF */
  3027. ]: "ref function",
  3028. [
  3029. 13
  3030. /* ErrorCodes.ASYNC_COMPONENT_LOADER */
  3031. ]: "async component loader",
  3032. [
  3033. 14
  3034. /* ErrorCodes.SCHEDULER */
  3035. ]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
  3036. };
  3037. function callWithErrorHandling(fn, instance, type, args) {
  3038. let res;
  3039. try {
  3040. res = args ? fn(...args) : fn();
  3041. } catch (err) {
  3042. handleError(err, instance, type);
  3043. }
  3044. return res;
  3045. }
  3046. function callWithAsyncErrorHandling(fn, instance, type, args) {
  3047. if (isFunction(fn)) {
  3048. const res = callWithErrorHandling(fn, instance, type, args);
  3049. if (res && isPromise$1(res)) {
  3050. res.catch((err) => {
  3051. handleError(err, instance, type);
  3052. });
  3053. }
  3054. return res;
  3055. }
  3056. const values = [];
  3057. for (let i2 = 0; i2 < fn.length; i2++) {
  3058. values.push(callWithAsyncErrorHandling(fn[i2], instance, type, args));
  3059. }
  3060. return values;
  3061. }
  3062. function handleError(err, instance, type, throwInDev = true) {
  3063. const contextVNode = instance ? instance.vnode : null;
  3064. if (instance) {
  3065. let cur = instance.parent;
  3066. const exposedInstance = instance.proxy;
  3067. const errorInfo = ErrorTypeStrings[type] || type;
  3068. while (cur) {
  3069. const errorCapturedHooks = cur.ec;
  3070. if (errorCapturedHooks) {
  3071. for (let i2 = 0; i2 < errorCapturedHooks.length; i2++) {
  3072. if (errorCapturedHooks[i2](err, exposedInstance, errorInfo) === false) {
  3073. return;
  3074. }
  3075. }
  3076. }
  3077. cur = cur.parent;
  3078. }
  3079. const appErrorHandler = instance.appContext.config.errorHandler;
  3080. if (appErrorHandler) {
  3081. callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]);
  3082. return;
  3083. }
  3084. }
  3085. logError(err, type, contextVNode, throwInDev);
  3086. }
  3087. function logError(err, type, contextVNode, throwInDev = true) {
  3088. {
  3089. const info = ErrorTypeStrings[type] || type;
  3090. if (contextVNode) {
  3091. pushWarningContext(contextVNode);
  3092. }
  3093. warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
  3094. if (contextVNode) {
  3095. popWarningContext();
  3096. }
  3097. if (throwInDev) {
  3098. console.error(err);
  3099. } else {
  3100. console.error(err);
  3101. }
  3102. }
  3103. }
  3104. let isFlushing = false;
  3105. let isFlushPending = false;
  3106. const queue = [];
  3107. let flushIndex = 0;
  3108. const pendingPostFlushCbs = [];
  3109. let activePostFlushCbs = null;
  3110. let postFlushIndex = 0;
  3111. const resolvedPromise = /* @__PURE__ */ Promise.resolve();
  3112. let currentFlushPromise = null;
  3113. const RECURSION_LIMIT = 100;
  3114. function nextTick$1(fn) {
  3115. const p2 = currentFlushPromise || resolvedPromise;
  3116. return fn ? p2.then(this ? fn.bind(this) : fn) : p2;
  3117. }
  3118. function findInsertionIndex(id) {
  3119. let start = flushIndex + 1;
  3120. let end = queue.length;
  3121. while (start < end) {
  3122. const middle = start + end >>> 1;
  3123. const middleJobId = getId(queue[middle]);
  3124. middleJobId < id ? start = middle + 1 : end = middle;
  3125. }
  3126. return start;
  3127. }
  3128. function queueJob(job) {
  3129. if (!queue.length || !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) {
  3130. if (job.id == null) {
  3131. queue.push(job);
  3132. } else {
  3133. queue.splice(findInsertionIndex(job.id), 0, job);
  3134. }
  3135. queueFlush();
  3136. }
  3137. }
  3138. function queueFlush() {
  3139. if (!isFlushing && !isFlushPending) {
  3140. isFlushPending = true;
  3141. currentFlushPromise = resolvedPromise.then(flushJobs);
  3142. }
  3143. }
  3144. function hasQueueJob(job) {
  3145. return queue.indexOf(job) > -1;
  3146. }
  3147. function invalidateJob(job) {
  3148. const i2 = queue.indexOf(job);
  3149. if (i2 > flushIndex) {
  3150. queue.splice(i2, 1);
  3151. }
  3152. }
  3153. function queuePostFlushCb(cb) {
  3154. if (!isArray$1(cb)) {
  3155. if (!activePostFlushCbs || !activePostFlushCbs.includes(cb, cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex)) {
  3156. pendingPostFlushCbs.push(cb);
  3157. }
  3158. } else {
  3159. pendingPostFlushCbs.push(...cb);
  3160. }
  3161. queueFlush();
  3162. }
  3163. function flushPreFlushCbs(seen, i2 = isFlushing ? flushIndex + 1 : 0) {
  3164. {
  3165. seen = seen || /* @__PURE__ */ new Map();
  3166. }
  3167. for (; i2 < queue.length; i2++) {
  3168. const cb = queue[i2];
  3169. if (cb && cb.pre) {
  3170. if (checkRecursiveUpdates(seen, cb)) {
  3171. continue;
  3172. }
  3173. queue.splice(i2, 1);
  3174. i2--;
  3175. cb();
  3176. }
  3177. }
  3178. }
  3179. function flushPostFlushCbs(seen) {
  3180. if (pendingPostFlushCbs.length) {
  3181. const deduped = [...new Set(pendingPostFlushCbs)];
  3182. pendingPostFlushCbs.length = 0;
  3183. if (activePostFlushCbs) {
  3184. activePostFlushCbs.push(...deduped);
  3185. return;
  3186. }
  3187. activePostFlushCbs = deduped;
  3188. {
  3189. seen = seen || /* @__PURE__ */ new Map();
  3190. }
  3191. activePostFlushCbs.sort((a2, b2) => getId(a2) - getId(b2));
  3192. for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
  3193. if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
  3194. continue;
  3195. }
  3196. activePostFlushCbs[postFlushIndex]();
  3197. }
  3198. activePostFlushCbs = null;
  3199. postFlushIndex = 0;
  3200. }
  3201. }
  3202. const getId = (job) => job.id == null ? Infinity : job.id;
  3203. const comparator = (a2, b2) => {
  3204. const diff2 = getId(a2) - getId(b2);
  3205. if (diff2 === 0) {
  3206. if (a2.pre && !b2.pre)
  3207. return -1;
  3208. if (b2.pre && !a2.pre)
  3209. return 1;
  3210. }
  3211. return diff2;
  3212. };
  3213. function flushJobs(seen) {
  3214. isFlushPending = false;
  3215. isFlushing = true;
  3216. {
  3217. seen = seen || /* @__PURE__ */ new Map();
  3218. }
  3219. queue.sort(comparator);
  3220. const check = (job) => checkRecursiveUpdates(seen, job);
  3221. try {
  3222. for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
  3223. const job = queue[flushIndex];
  3224. if (job && job.active !== false) {
  3225. if (check(job)) {
  3226. continue;
  3227. }
  3228. callWithErrorHandling(
  3229. job,
  3230. null,
  3231. 14
  3232. /* ErrorCodes.SCHEDULER */
  3233. );
  3234. }
  3235. }
  3236. } finally {
  3237. flushIndex = 0;
  3238. queue.length = 0;
  3239. flushPostFlushCbs(seen);
  3240. isFlushing = false;
  3241. currentFlushPromise = null;
  3242. if (queue.length || pendingPostFlushCbs.length) {
  3243. flushJobs(seen);
  3244. }
  3245. }
  3246. }
  3247. function checkRecursiveUpdates(seen, fn) {
  3248. if (!seen.has(fn)) {
  3249. seen.set(fn, 1);
  3250. } else {
  3251. const count = seen.get(fn);
  3252. if (count > RECURSION_LIMIT) {
  3253. const instance = fn.ownerInstance;
  3254. const componentName = instance && getComponentName(instance.type);
  3255. 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.`);
  3256. return true;
  3257. } else {
  3258. seen.set(fn, count + 1);
  3259. }
  3260. }
  3261. }
  3262. let devtools;
  3263. let buffer = [];
  3264. let devtoolsNotInstalled = false;
  3265. function emit$1(event, ...args) {
  3266. if (devtools) {
  3267. devtools.emit(event, ...args);
  3268. } else if (!devtoolsNotInstalled) {
  3269. buffer.push({ event, args });
  3270. }
  3271. }
  3272. function setDevtoolsHook(hook, target) {
  3273. var _a2, _b;
  3274. devtools = hook;
  3275. if (devtools) {
  3276. devtools.enabled = true;
  3277. buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
  3278. buffer = [];
  3279. } else if (
  3280. // handle late devtools injection - only do this if we are in an actual
  3281. // browser environment to avoid the timer handle stalling test runner exit
  3282. // (#4815)
  3283. typeof window !== "undefined" && // some envs mock window but not fully
  3284. // eslint-disable-next-line no-restricted-globals
  3285. window.HTMLElement && // also exclude jsdom
  3286. // eslint-disable-next-line no-restricted-globals
  3287. !((_b = (_a2 = window.navigator) === null || _a2 === void 0 ? void 0 : _a2.userAgent) === null || _b === void 0 ? void 0 : _b.includes("jsdom"))
  3288. ) {
  3289. const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
  3290. replay.push((newHook) => {
  3291. setDevtoolsHook(newHook, target);
  3292. });
  3293. setTimeout(() => {
  3294. if (!devtools) {
  3295. target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
  3296. devtoolsNotInstalled = true;
  3297. buffer = [];
  3298. }
  3299. }, 3e3);
  3300. } else {
  3301. devtoolsNotInstalled = true;
  3302. buffer = [];
  3303. }
  3304. }
  3305. function devtoolsInitApp(app, version2) {
  3306. emit$1("app:init", app, version2, {
  3307. Fragment,
  3308. Text: Text$1,
  3309. Comment,
  3310. Static
  3311. });
  3312. }
  3313. const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(
  3314. "component:added"
  3315. /* DevtoolsHooks.COMPONENT_ADDED */
  3316. );
  3317. const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(
  3318. "component:updated"
  3319. /* DevtoolsHooks.COMPONENT_UPDATED */
  3320. );
  3321. const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(
  3322. "component:removed"
  3323. /* DevtoolsHooks.COMPONENT_REMOVED */
  3324. );
  3325. const devtoolsComponentRemoved = (component) => {
  3326. if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered
  3327. !devtools.cleanupBuffer(component)) {
  3328. _devtoolsComponentRemoved(component);
  3329. }
  3330. };
  3331. function createDevtoolsComponentHook(hook) {
  3332. return (component) => {
  3333. emit$1(
  3334. hook,
  3335. component.appContext.app,
  3336. component.uid,
  3337. // fixed by xxxxxx
  3338. // 为 0 是 App,无 parent 是 Page 指向 App
  3339. component.uid === 0 ? void 0 : component.parent ? component.parent.uid : 0,
  3340. component
  3341. );
  3342. };
  3343. }
  3344. const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(
  3345. "perf:start"
  3346. /* DevtoolsHooks.PERFORMANCE_START */
  3347. );
  3348. const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(
  3349. "perf:end"
  3350. /* DevtoolsHooks.PERFORMANCE_END */
  3351. );
  3352. function createDevtoolsPerformanceHook(hook) {
  3353. return (component, type, time) => {
  3354. emit$1(hook, component.appContext.app, component.uid, component, type, time);
  3355. };
  3356. }
  3357. function devtoolsComponentEmit(component, event, params) {
  3358. emit$1("component:emit", component.appContext.app, component, event, params);
  3359. }
  3360. function emit(instance, event, ...rawArgs) {
  3361. if (instance.isUnmounted)
  3362. return;
  3363. const props2 = instance.vnode.props || EMPTY_OBJ;
  3364. {
  3365. const { emitsOptions, propsOptions: [propsOptions] } = instance;
  3366. if (emitsOptions) {
  3367. if (!(event in emitsOptions) && true) {
  3368. if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
  3369. warn(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`);
  3370. }
  3371. } else {
  3372. const validator = emitsOptions[event];
  3373. if (isFunction(validator)) {
  3374. const isValid = validator(...rawArgs);
  3375. if (!isValid) {
  3376. warn(`Invalid event arguments: event validation failed for event "${event}".`);
  3377. }
  3378. }
  3379. }
  3380. }
  3381. }
  3382. let args = rawArgs;
  3383. const isModelListener2 = event.startsWith("update:");
  3384. const modelArg = isModelListener2 && event.slice(7);
  3385. if (modelArg && modelArg in props2) {
  3386. const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`;
  3387. const { number: number2, trim: trim2 } = props2[modifiersKey] || EMPTY_OBJ;
  3388. if (trim2) {
  3389. args = rawArgs.map((a2) => isString(a2) ? a2.trim() : a2);
  3390. }
  3391. if (number2) {
  3392. args = rawArgs.map(looseToNumber);
  3393. }
  3394. }
  3395. {
  3396. devtoolsComponentEmit(instance, event, args);
  3397. }
  3398. {
  3399. const lowerCaseEvent = event.toLowerCase();
  3400. if (lowerCaseEvent !== event && props2[toHandlerKey(lowerCaseEvent)]) {
  3401. 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}".`);
  3402. }
  3403. }
  3404. let handlerName;
  3405. let handler = props2[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
  3406. props2[handlerName = toHandlerKey(camelize(event))];
  3407. if (!handler && isModelListener2) {
  3408. handler = props2[handlerName = toHandlerKey(hyphenate(event))];
  3409. }
  3410. if (handler) {
  3411. callWithAsyncErrorHandling(handler, instance, 6, args);
  3412. }
  3413. const onceHandler = props2[handlerName + `Once`];
  3414. if (onceHandler) {
  3415. if (!instance.emitted) {
  3416. instance.emitted = {};
  3417. } else if (instance.emitted[handlerName]) {
  3418. return;
  3419. }
  3420. instance.emitted[handlerName] = true;
  3421. callWithAsyncErrorHandling(onceHandler, instance, 6, args);
  3422. }
  3423. }
  3424. function normalizeEmitsOptions(comp, appContext, asMixin = false) {
  3425. const cache = appContext.emitsCache;
  3426. const cached = cache.get(comp);
  3427. if (cached !== void 0) {
  3428. return cached;
  3429. }
  3430. const raw = comp.emits;
  3431. let normalized = {};
  3432. let hasExtends = false;
  3433. if (!isFunction(comp)) {
  3434. const extendEmits = (raw2) => {
  3435. const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
  3436. if (normalizedFromExtend) {
  3437. hasExtends = true;
  3438. extend(normalized, normalizedFromExtend);
  3439. }
  3440. };
  3441. if (!asMixin && appContext.mixins.length) {
  3442. appContext.mixins.forEach(extendEmits);
  3443. }
  3444. if (comp.extends) {
  3445. extendEmits(comp.extends);
  3446. }
  3447. if (comp.mixins) {
  3448. comp.mixins.forEach(extendEmits);
  3449. }
  3450. }
  3451. if (!raw && !hasExtends) {
  3452. if (isObject$3(comp)) {
  3453. cache.set(comp, null);
  3454. }
  3455. return null;
  3456. }
  3457. if (isArray$1(raw)) {
  3458. raw.forEach((key) => normalized[key] = null);
  3459. } else {
  3460. extend(normalized, raw);
  3461. }
  3462. if (isObject$3(comp)) {
  3463. cache.set(comp, normalized);
  3464. }
  3465. return normalized;
  3466. }
  3467. function isEmitListener(options, key) {
  3468. if (!options || !isOn(key)) {
  3469. return false;
  3470. }
  3471. key = key.slice(2).replace(/Once$/, "");
  3472. return hasOwn$1(options, key[0].toLowerCase() + key.slice(1)) || hasOwn$1(options, hyphenate(key)) || hasOwn$1(options, key);
  3473. }
  3474. let currentRenderingInstance = null;
  3475. function setCurrentRenderingInstance(instance) {
  3476. const prev = currentRenderingInstance;
  3477. currentRenderingInstance = instance;
  3478. instance && instance.type.__scopeId || null;
  3479. return prev;
  3480. }
  3481. function provide(key, value2) {
  3482. if (!currentInstance) {
  3483. {
  3484. warn(`provide() can only be used inside setup().`);
  3485. }
  3486. } else {
  3487. let provides = currentInstance.provides;
  3488. const parentProvides = currentInstance.parent && currentInstance.parent.provides;
  3489. if (parentProvides === provides) {
  3490. provides = currentInstance.provides = Object.create(parentProvides);
  3491. }
  3492. provides[key] = value2;
  3493. if (currentInstance.type.mpType === "app") {
  3494. currentInstance.appContext.app.provide(key, value2);
  3495. }
  3496. }
  3497. }
  3498. function inject(key, defaultValue, treatDefaultAsFactory = false) {
  3499. const instance = currentInstance || currentRenderingInstance;
  3500. if (instance) {
  3501. const provides = instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides;
  3502. if (provides && key in provides) {
  3503. return provides[key];
  3504. } else if (arguments.length > 1) {
  3505. return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance.proxy) : defaultValue;
  3506. } else {
  3507. warn(`injection "${String(key)}" not found.`);
  3508. }
  3509. } else {
  3510. warn(`inject() can only be used inside setup() or functional components.`);
  3511. }
  3512. }
  3513. const INITIAL_WATCHER_VALUE = {};
  3514. function watch(source, cb, options) {
  3515. if (!isFunction(cb)) {
  3516. 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.`);
  3517. }
  3518. return doWatch(source, cb, options);
  3519. }
  3520. function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
  3521. if (!cb) {
  3522. if (immediate !== void 0) {
  3523. warn(`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`);
  3524. }
  3525. if (deep !== void 0) {
  3526. warn(`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`);
  3527. }
  3528. }
  3529. const warnInvalidSource = (s2) => {
  3530. 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.`);
  3531. };
  3532. const instance = getCurrentScope() === (currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope) ? currentInstance : null;
  3533. let getter;
  3534. let forceTrigger = false;
  3535. let isMultiSource = false;
  3536. if (isRef(source)) {
  3537. getter = () => source.value;
  3538. forceTrigger = isShallow(source);
  3539. } else if (isReactive(source)) {
  3540. getter = () => source;
  3541. deep = true;
  3542. } else if (isArray$1(source)) {
  3543. isMultiSource = true;
  3544. forceTrigger = source.some((s2) => isReactive(s2) || isShallow(s2));
  3545. getter = () => source.map((s2) => {
  3546. if (isRef(s2)) {
  3547. return s2.value;
  3548. } else if (isReactive(s2)) {
  3549. return traverse(s2);
  3550. } else if (isFunction(s2)) {
  3551. return callWithErrorHandling(
  3552. s2,
  3553. instance,
  3554. 2
  3555. /* ErrorCodes.WATCH_GETTER */
  3556. );
  3557. } else {
  3558. warnInvalidSource(s2);
  3559. }
  3560. });
  3561. } else if (isFunction(source)) {
  3562. if (cb) {
  3563. getter = () => callWithErrorHandling(
  3564. source,
  3565. instance,
  3566. 2
  3567. /* ErrorCodes.WATCH_GETTER */
  3568. );
  3569. } else {
  3570. getter = () => {
  3571. if (instance && instance.isUnmounted) {
  3572. return;
  3573. }
  3574. if (cleanup) {
  3575. cleanup();
  3576. }
  3577. return callWithAsyncErrorHandling(source, instance, 3, [onCleanup]);
  3578. };
  3579. }
  3580. } else {
  3581. getter = NOOP;
  3582. warnInvalidSource(source);
  3583. }
  3584. if (cb && deep) {
  3585. const baseGetter = getter;
  3586. getter = () => traverse(baseGetter());
  3587. }
  3588. let cleanup;
  3589. let onCleanup = (fn) => {
  3590. cleanup = effect.onStop = () => {
  3591. callWithErrorHandling(
  3592. fn,
  3593. instance,
  3594. 4
  3595. /* ErrorCodes.WATCH_CLEANUP */
  3596. );
  3597. };
  3598. };
  3599. let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
  3600. const job = () => {
  3601. if (!effect.active) {
  3602. return;
  3603. }
  3604. if (cb) {
  3605. const newValue = effect.run();
  3606. if (deep || forceTrigger || (isMultiSource ? newValue.some((v2, i2) => hasChanged(v2, oldValue[i2])) : hasChanged(newValue, oldValue)) || false) {
  3607. if (cleanup) {
  3608. cleanup();
  3609. }
  3610. callWithAsyncErrorHandling(cb, instance, 3, [
  3611. newValue,
  3612. // pass undefined as the old value when it's changed for the first time
  3613. oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
  3614. onCleanup
  3615. ]);
  3616. oldValue = newValue;
  3617. }
  3618. } else {
  3619. effect.run();
  3620. }
  3621. };
  3622. job.allowRecurse = !!cb;
  3623. let scheduler;
  3624. if (flush === "sync") {
  3625. scheduler = job;
  3626. } else if (flush === "post") {
  3627. scheduler = () => queuePostRenderEffect$1(job, instance && instance.suspense);
  3628. } else {
  3629. job.pre = true;
  3630. if (instance)
  3631. job.id = instance.uid;
  3632. scheduler = () => queueJob(job);
  3633. }
  3634. const effect = new ReactiveEffect(getter, scheduler);
  3635. {
  3636. effect.onTrack = onTrack;
  3637. effect.onTrigger = onTrigger;
  3638. }
  3639. if (cb) {
  3640. if (immediate) {
  3641. job();
  3642. } else {
  3643. oldValue = effect.run();
  3644. }
  3645. } else if (flush === "post") {
  3646. queuePostRenderEffect$1(effect.run.bind(effect), instance && instance.suspense);
  3647. } else {
  3648. effect.run();
  3649. }
  3650. const unwatch = () => {
  3651. effect.stop();
  3652. if (instance && instance.scope) {
  3653. remove(instance.scope.effects, effect);
  3654. }
  3655. };
  3656. return unwatch;
  3657. }
  3658. function instanceWatch(source, value2, options) {
  3659. const publicThis = this.proxy;
  3660. const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
  3661. let cb;
  3662. if (isFunction(value2)) {
  3663. cb = value2;
  3664. } else {
  3665. cb = value2.handler;
  3666. options = value2;
  3667. }
  3668. const cur = currentInstance;
  3669. setCurrentInstance(this);
  3670. const res = doWatch(getter, cb.bind(publicThis), options);
  3671. if (cur) {
  3672. setCurrentInstance(cur);
  3673. } else {
  3674. unsetCurrentInstance();
  3675. }
  3676. return res;
  3677. }
  3678. function createPathGetter(ctx, path) {
  3679. const segments = path.split(".");
  3680. return () => {
  3681. let cur = ctx;
  3682. for (let i2 = 0; i2 < segments.length && cur; i2++) {
  3683. cur = cur[segments[i2]];
  3684. }
  3685. return cur;
  3686. };
  3687. }
  3688. function traverse(value2, seen) {
  3689. if (!isObject$3(value2) || value2[
  3690. "__v_skip"
  3691. /* ReactiveFlags.SKIP */
  3692. ]) {
  3693. return value2;
  3694. }
  3695. seen = seen || /* @__PURE__ */ new Set();
  3696. if (seen.has(value2)) {
  3697. return value2;
  3698. }
  3699. seen.add(value2);
  3700. if (isRef(value2)) {
  3701. traverse(value2.value, seen);
  3702. } else if (isArray$1(value2)) {
  3703. for (let i2 = 0; i2 < value2.length; i2++) {
  3704. traverse(value2[i2], seen);
  3705. }
  3706. } else if (isSet(value2) || isMap(value2)) {
  3707. value2.forEach((v2) => {
  3708. traverse(v2, seen);
  3709. });
  3710. } else if (isPlainObject$1(value2)) {
  3711. for (const key in value2) {
  3712. traverse(value2[key], seen);
  3713. }
  3714. }
  3715. return value2;
  3716. }
  3717. function defineComponent(options) {
  3718. return isFunction(options) ? { setup: options, name: options.name } : options;
  3719. }
  3720. const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
  3721. function onActivated(hook, target) {
  3722. registerKeepAliveHook(hook, "a", target);
  3723. }
  3724. function onDeactivated(hook, target) {
  3725. registerKeepAliveHook(hook, "da", target);
  3726. }
  3727. function registerKeepAliveHook(hook, type, target = currentInstance) {
  3728. const wrappedHook = hook.__wdc || (hook.__wdc = () => {
  3729. let current = target;
  3730. while (current) {
  3731. if (current.isDeactivated) {
  3732. return;
  3733. }
  3734. current = current.parent;
  3735. }
  3736. return hook();
  3737. });
  3738. injectHook(type, wrappedHook, target);
  3739. if (target) {
  3740. let current = target.parent;
  3741. while (current && current.parent) {
  3742. if (isKeepAlive(current.parent.vnode)) {
  3743. injectToKeepAliveRoot(wrappedHook, type, target, current);
  3744. }
  3745. current = current.parent;
  3746. }
  3747. }
  3748. }
  3749. function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
  3750. const injected = injectHook(
  3751. type,
  3752. hook,
  3753. keepAliveRoot,
  3754. true
  3755. /* prepend */
  3756. );
  3757. onUnmounted(() => {
  3758. remove(keepAliveRoot[type], injected);
  3759. }, target);
  3760. }
  3761. function injectHook(type, hook, target = currentInstance, prepend = false) {
  3762. if (target) {
  3763. if (isRootHook(type)) {
  3764. target = target.root;
  3765. }
  3766. const hooks = target[type] || (target[type] = []);
  3767. const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
  3768. if (target.isUnmounted) {
  3769. return;
  3770. }
  3771. pauseTracking();
  3772. setCurrentInstance(target);
  3773. const res = callWithAsyncErrorHandling(hook, target, type, args);
  3774. unsetCurrentInstance();
  3775. resetTracking();
  3776. return res;
  3777. });
  3778. if (prepend) {
  3779. hooks.unshift(wrappedHook);
  3780. } else {
  3781. hooks.push(wrappedHook);
  3782. }
  3783. return wrappedHook;
  3784. } else {
  3785. const apiName = toHandlerKey((ErrorTypeStrings[type] || type.replace(/^on/, "")).replace(/ hook$/, ""));
  3786. 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().`);
  3787. }
  3788. }
  3789. const createHook = (lifecycle) => (hook, target = currentInstance) => (
  3790. // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
  3791. (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target)
  3792. );
  3793. const onBeforeMount = createHook(
  3794. "bm"
  3795. /* LifecycleHooks.BEFORE_MOUNT */
  3796. );
  3797. const onMounted = createHook(
  3798. "m"
  3799. /* LifecycleHooks.MOUNTED */
  3800. );
  3801. const onBeforeUpdate = createHook(
  3802. "bu"
  3803. /* LifecycleHooks.BEFORE_UPDATE */
  3804. );
  3805. const onUpdated = createHook(
  3806. "u"
  3807. /* LifecycleHooks.UPDATED */
  3808. );
  3809. const onBeforeUnmount = createHook(
  3810. "bum"
  3811. /* LifecycleHooks.BEFORE_UNMOUNT */
  3812. );
  3813. const onUnmounted = createHook(
  3814. "um"
  3815. /* LifecycleHooks.UNMOUNTED */
  3816. );
  3817. const onServerPrefetch = createHook(
  3818. "sp"
  3819. /* LifecycleHooks.SERVER_PREFETCH */
  3820. );
  3821. const onRenderTriggered = createHook(
  3822. "rtg"
  3823. /* LifecycleHooks.RENDER_TRIGGERED */
  3824. );
  3825. const onRenderTracked = createHook(
  3826. "rtc"
  3827. /* LifecycleHooks.RENDER_TRACKED */
  3828. );
  3829. function onErrorCaptured(hook, target = currentInstance) {
  3830. injectHook("ec", hook, target);
  3831. }
  3832. function validateDirectiveName(name) {
  3833. if (isBuiltInDirective(name)) {
  3834. warn("Do not use built-in directive ids as custom directive id: " + name);
  3835. }
  3836. }
  3837. const COMPONENTS = "components";
  3838. function resolveComponent(name, maybeSelfReference) {
  3839. return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
  3840. }
  3841. function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
  3842. const instance = currentRenderingInstance || currentInstance;
  3843. if (instance) {
  3844. const Component2 = instance.type;
  3845. if (type === COMPONENTS) {
  3846. const selfName = getComponentName(
  3847. Component2,
  3848. false
  3849. /* do not include inferred name to avoid breaking existing code */
  3850. );
  3851. if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
  3852. return Component2;
  3853. }
  3854. }
  3855. const res = (
  3856. // local registration
  3857. // check instance[type] first which is resolved for options API
  3858. resolve(instance[type] || Component2[type], name) || // global registration
  3859. resolve(instance.appContext[type], name)
  3860. );
  3861. if (!res && maybeSelfReference) {
  3862. return Component2;
  3863. }
  3864. if (warnMissing && !res) {
  3865. const extra = type === COMPONENTS ? `
  3866. If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
  3867. warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
  3868. }
  3869. return res;
  3870. } else {
  3871. warn(`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`);
  3872. }
  3873. }
  3874. function resolve(registry, name) {
  3875. return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
  3876. }
  3877. const getPublicInstance = (i2) => {
  3878. if (!i2)
  3879. return null;
  3880. if (isStatefulComponent(i2))
  3881. return getExposeProxy(i2) || i2.proxy;
  3882. return getPublicInstance(i2.parent);
  3883. };
  3884. const publicPropertiesMap = (
  3885. // Move PURE marker to new line to workaround compiler discarding it
  3886. // due to type annotation
  3887. /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
  3888. $: (i2) => i2,
  3889. // fixed by xxxxxx vue-i18n 在 dev 模式,访问了 $el,故模拟一个假的
  3890. // $el: i => i.vnode.el,
  3891. $el: (i2) => i2.__$el || (i2.__$el = {}),
  3892. $data: (i2) => i2.data,
  3893. $props: (i2) => shallowReadonly(i2.props),
  3894. $attrs: (i2) => shallowReadonly(i2.attrs),
  3895. $slots: (i2) => shallowReadonly(i2.slots),
  3896. $refs: (i2) => shallowReadonly(i2.refs),
  3897. $parent: (i2) => getPublicInstance(i2.parent),
  3898. $root: (i2) => getPublicInstance(i2.root),
  3899. $emit: (i2) => i2.emit,
  3900. $options: (i2) => resolveMergedOptions(i2),
  3901. $forceUpdate: (i2) => i2.f || (i2.f = () => queueJob(i2.update)),
  3902. // $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy!)),// fixed by xxxxxx
  3903. $watch: (i2) => instanceWatch.bind(i2)
  3904. })
  3905. );
  3906. const isReservedPrefix = (key) => key === "_" || key === "$";
  3907. const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn$1(state, key);
  3908. const PublicInstanceProxyHandlers = {
  3909. get({ _: instance }, key) {
  3910. const { ctx, setupState, data, props: props2, accessCache, type, appContext } = instance;
  3911. if (key === "__isVue") {
  3912. return true;
  3913. }
  3914. let normalizedProps;
  3915. if (key[0] !== "$") {
  3916. const n2 = accessCache[key];
  3917. if (n2 !== void 0) {
  3918. switch (n2) {
  3919. case 1:
  3920. return setupState[key];
  3921. case 2:
  3922. return data[key];
  3923. case 4:
  3924. return ctx[key];
  3925. case 3:
  3926. return props2[key];
  3927. }
  3928. } else if (hasSetupBinding(setupState, key)) {
  3929. accessCache[key] = 1;
  3930. return setupState[key];
  3931. } else if (data !== EMPTY_OBJ && hasOwn$1(data, key)) {
  3932. accessCache[key] = 2;
  3933. return data[key];
  3934. } else if (
  3935. // only cache other properties when instance has declared (thus stable)
  3936. // props
  3937. (normalizedProps = instance.propsOptions[0]) && hasOwn$1(normalizedProps, key)
  3938. ) {
  3939. accessCache[key] = 3;
  3940. return props2[key];
  3941. } else if (ctx !== EMPTY_OBJ && hasOwn$1(ctx, key)) {
  3942. accessCache[key] = 4;
  3943. return ctx[key];
  3944. } else if (shouldCacheAccess) {
  3945. accessCache[key] = 0;
  3946. }
  3947. }
  3948. const publicGetter = publicPropertiesMap[key];
  3949. let cssModule, globalProperties;
  3950. if (publicGetter) {
  3951. if (key === "$attrs") {
  3952. track(instance, "get", key);
  3953. }
  3954. return publicGetter(instance);
  3955. } else if (
  3956. // css module (injected by vue-loader)
  3957. (cssModule = type.__cssModules) && (cssModule = cssModule[key])
  3958. ) {
  3959. return cssModule;
  3960. } else if (ctx !== EMPTY_OBJ && hasOwn$1(ctx, key)) {
  3961. accessCache[key] = 4;
  3962. return ctx[key];
  3963. } else if (
  3964. // global properties
  3965. globalProperties = appContext.config.globalProperties, hasOwn$1(globalProperties, key)
  3966. ) {
  3967. {
  3968. return globalProperties[key];
  3969. }
  3970. } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading
  3971. // to infinite warning loop
  3972. key.indexOf("__v") !== 0)) {
  3973. if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn$1(data, key)) {
  3974. 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.`);
  3975. } else if (instance === currentRenderingInstance) {
  3976. warn(`Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`);
  3977. }
  3978. }
  3979. },
  3980. set({ _: instance }, key, value2) {
  3981. const { data, setupState, ctx } = instance;
  3982. if (hasSetupBinding(setupState, key)) {
  3983. setupState[key] = value2;
  3984. return true;
  3985. } else if (setupState.__isScriptSetup && hasOwn$1(setupState, key)) {
  3986. warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
  3987. return false;
  3988. } else if (data !== EMPTY_OBJ && hasOwn$1(data, key)) {
  3989. data[key] = value2;
  3990. return true;
  3991. } else if (hasOwn$1(instance.props, key)) {
  3992. warn(`Attempting to mutate prop "${key}". Props are readonly.`);
  3993. return false;
  3994. }
  3995. if (key[0] === "$" && key.slice(1) in instance) {
  3996. warn(`Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`);
  3997. return false;
  3998. } else {
  3999. if (key in instance.appContext.config.globalProperties) {
  4000. Object.defineProperty(ctx, key, {
  4001. enumerable: true,
  4002. configurable: true,
  4003. value: value2
  4004. });
  4005. } else {
  4006. ctx[key] = value2;
  4007. }
  4008. }
  4009. return true;
  4010. },
  4011. has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
  4012. let normalizedProps;
  4013. return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn$1(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn$1(normalizedProps, key) || hasOwn$1(ctx, key) || hasOwn$1(publicPropertiesMap, key) || hasOwn$1(appContext.config.globalProperties, key);
  4014. },
  4015. defineProperty(target, key, descriptor) {
  4016. if (descriptor.get != null) {
  4017. target._.accessCache[key] = 0;
  4018. } else if (hasOwn$1(descriptor, "value")) {
  4019. this.set(target, key, descriptor.value, null);
  4020. }
  4021. return Reflect.defineProperty(target, key, descriptor);
  4022. }
  4023. };
  4024. {
  4025. PublicInstanceProxyHandlers.ownKeys = (target) => {
  4026. 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.`);
  4027. return Reflect.ownKeys(target);
  4028. };
  4029. }
  4030. function createDevRenderContext(instance) {
  4031. const target = {};
  4032. Object.defineProperty(target, `_`, {
  4033. configurable: true,
  4034. enumerable: false,
  4035. get: () => instance
  4036. });
  4037. Object.keys(publicPropertiesMap).forEach((key) => {
  4038. Object.defineProperty(target, key, {
  4039. configurable: true,
  4040. enumerable: false,
  4041. get: () => publicPropertiesMap[key](instance),
  4042. // intercepted by the proxy so no need for implementation,
  4043. // but needed to prevent set errors
  4044. set: NOOP
  4045. });
  4046. });
  4047. return target;
  4048. }
  4049. function exposePropsOnRenderContext(instance) {
  4050. const { ctx, propsOptions: [propsOptions] } = instance;
  4051. if (propsOptions) {
  4052. Object.keys(propsOptions).forEach((key) => {
  4053. Object.defineProperty(ctx, key, {
  4054. enumerable: true,
  4055. configurable: true,
  4056. get: () => instance.props[key],
  4057. set: NOOP
  4058. });
  4059. });
  4060. }
  4061. }
  4062. function exposeSetupStateOnRenderContext(instance) {
  4063. const { ctx, setupState } = instance;
  4064. Object.keys(toRaw(setupState)).forEach((key) => {
  4065. if (!setupState.__isScriptSetup) {
  4066. if (isReservedPrefix(key[0])) {
  4067. warn(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);
  4068. return;
  4069. }
  4070. Object.defineProperty(ctx, key, {
  4071. enumerable: true,
  4072. configurable: true,
  4073. get: () => setupState[key],
  4074. set: NOOP
  4075. });
  4076. }
  4077. });
  4078. }
  4079. function createDuplicateChecker() {
  4080. const cache = /* @__PURE__ */ Object.create(null);
  4081. return (type, key) => {
  4082. if (cache[key]) {
  4083. warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
  4084. } else {
  4085. cache[key] = type;
  4086. }
  4087. };
  4088. }
  4089. let shouldCacheAccess = true;
  4090. function applyOptions$1(instance) {
  4091. const options = resolveMergedOptions(instance);
  4092. const publicThis = instance.proxy;
  4093. const ctx = instance.ctx;
  4094. shouldCacheAccess = false;
  4095. if (options.beforeCreate) {
  4096. callHook$1(
  4097. options.beforeCreate,
  4098. instance,
  4099. "bc"
  4100. /* LifecycleHooks.BEFORE_CREATE */
  4101. );
  4102. }
  4103. const {
  4104. // state
  4105. data: dataOptions,
  4106. computed: computedOptions,
  4107. methods,
  4108. watch: watchOptions,
  4109. provide: provideOptions,
  4110. inject: injectOptions,
  4111. // lifecycle
  4112. created,
  4113. beforeMount,
  4114. mounted,
  4115. beforeUpdate,
  4116. updated,
  4117. activated,
  4118. deactivated,
  4119. beforeDestroy,
  4120. beforeUnmount,
  4121. destroyed,
  4122. unmounted,
  4123. render,
  4124. renderTracked,
  4125. renderTriggered,
  4126. errorCaptured,
  4127. serverPrefetch,
  4128. // public API
  4129. expose,
  4130. inheritAttrs,
  4131. // assets
  4132. components,
  4133. directives,
  4134. filters
  4135. } = options;
  4136. const checkDuplicateProperties = createDuplicateChecker();
  4137. {
  4138. const [propsOptions] = instance.propsOptions;
  4139. if (propsOptions) {
  4140. for (const key in propsOptions) {
  4141. checkDuplicateProperties("Props", key);
  4142. }
  4143. }
  4144. }
  4145. if (injectOptions) {
  4146. resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef);
  4147. }
  4148. if (methods) {
  4149. for (const key in methods) {
  4150. const methodHandler = methods[key];
  4151. if (isFunction(methodHandler)) {
  4152. {
  4153. Object.defineProperty(ctx, key, {
  4154. value: methodHandler.bind(publicThis),
  4155. configurable: true,
  4156. enumerable: true,
  4157. writable: true
  4158. });
  4159. }
  4160. {
  4161. checkDuplicateProperties("Methods", key);
  4162. }
  4163. } else {
  4164. warn(`Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`);
  4165. }
  4166. }
  4167. }
  4168. if (dataOptions) {
  4169. if (!isFunction(dataOptions)) {
  4170. warn(`The data option must be a function. Plain object usage is no longer supported.`);
  4171. }
  4172. const data = dataOptions.call(publicThis, publicThis);
  4173. if (isPromise$1(data)) {
  4174. warn(`data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`);
  4175. }
  4176. if (!isObject$3(data)) {
  4177. warn(`data() should return an object.`);
  4178. } else {
  4179. instance.data = reactive(data);
  4180. {
  4181. for (const key in data) {
  4182. checkDuplicateProperties("Data", key);
  4183. if (!isReservedPrefix(key[0])) {
  4184. Object.defineProperty(ctx, key, {
  4185. configurable: true,
  4186. enumerable: true,
  4187. get: () => data[key],
  4188. set: NOOP
  4189. });
  4190. }
  4191. }
  4192. }
  4193. }
  4194. }
  4195. shouldCacheAccess = true;
  4196. if (computedOptions) {
  4197. for (const key in computedOptions) {
  4198. const opt = computedOptions[key];
  4199. const get3 = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
  4200. if (get3 === NOOP) {
  4201. warn(`Computed property "${key}" has no getter.`);
  4202. }
  4203. const set2 = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
  4204. warn(`Write operation failed: computed property "${key}" is readonly.`);
  4205. };
  4206. const c2 = computed({
  4207. get: get3,
  4208. set: set2
  4209. });
  4210. Object.defineProperty(ctx, key, {
  4211. enumerable: true,
  4212. configurable: true,
  4213. get: () => c2.value,
  4214. set: (v2) => c2.value = v2
  4215. });
  4216. {
  4217. checkDuplicateProperties("Computed", key);
  4218. }
  4219. }
  4220. }
  4221. if (watchOptions) {
  4222. for (const key in watchOptions) {
  4223. createWatcher(watchOptions[key], ctx, publicThis, key);
  4224. }
  4225. }
  4226. {
  4227. if (provideOptions) {
  4228. const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
  4229. Reflect.ownKeys(provides).forEach((key) => {
  4230. provide(key, provides[key]);
  4231. });
  4232. }
  4233. }
  4234. {
  4235. if (created) {
  4236. callHook$1(
  4237. created,
  4238. instance,
  4239. "c"
  4240. /* LifecycleHooks.CREATED */
  4241. );
  4242. }
  4243. }
  4244. function registerLifecycleHook(register2, hook) {
  4245. if (isArray$1(hook)) {
  4246. hook.forEach((_hook) => register2(_hook.bind(publicThis)));
  4247. } else if (hook) {
  4248. register2(hook.bind(publicThis));
  4249. }
  4250. }
  4251. registerLifecycleHook(onBeforeMount, beforeMount);
  4252. registerLifecycleHook(onMounted, mounted);
  4253. registerLifecycleHook(onBeforeUpdate, beforeUpdate);
  4254. registerLifecycleHook(onUpdated, updated);
  4255. registerLifecycleHook(onActivated, activated);
  4256. registerLifecycleHook(onDeactivated, deactivated);
  4257. registerLifecycleHook(onErrorCaptured, errorCaptured);
  4258. registerLifecycleHook(onRenderTracked, renderTracked);
  4259. registerLifecycleHook(onRenderTriggered, renderTriggered);
  4260. registerLifecycleHook(onBeforeUnmount, beforeUnmount);
  4261. registerLifecycleHook(onUnmounted, unmounted);
  4262. registerLifecycleHook(onServerPrefetch, serverPrefetch);
  4263. if (isArray$1(expose)) {
  4264. if (expose.length) {
  4265. const exposed = instance.exposed || (instance.exposed = {});
  4266. expose.forEach((key) => {
  4267. Object.defineProperty(exposed, key, {
  4268. get: () => publicThis[key],
  4269. set: (val) => publicThis[key] = val
  4270. });
  4271. });
  4272. } else if (!instance.exposed) {
  4273. instance.exposed = {};
  4274. }
  4275. }
  4276. if (render && instance.render === NOOP) {
  4277. instance.render = render;
  4278. }
  4279. if (inheritAttrs != null) {
  4280. instance.inheritAttrs = inheritAttrs;
  4281. }
  4282. if (components)
  4283. instance.components = components;
  4284. if (directives)
  4285. instance.directives = directives;
  4286. if (instance.ctx.$onApplyOptions) {
  4287. instance.ctx.$onApplyOptions(options, instance, publicThis);
  4288. }
  4289. }
  4290. function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) {
  4291. if (isArray$1(injectOptions)) {
  4292. injectOptions = normalizeInject(injectOptions);
  4293. }
  4294. for (const key in injectOptions) {
  4295. const opt = injectOptions[key];
  4296. let injected;
  4297. if (isObject$3(opt)) {
  4298. if ("default" in opt) {
  4299. injected = inject(
  4300. opt.from || key,
  4301. opt.default,
  4302. true
  4303. /* treat default function as factory */
  4304. );
  4305. } else {
  4306. injected = inject(opt.from || key);
  4307. }
  4308. } else {
  4309. injected = inject(opt);
  4310. }
  4311. if (isRef(injected)) {
  4312. if (unwrapRef) {
  4313. Object.defineProperty(ctx, key, {
  4314. enumerable: true,
  4315. configurable: true,
  4316. get: () => injected.value,
  4317. set: (v2) => injected.value = v2
  4318. });
  4319. } else {
  4320. {
  4321. 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.)`);
  4322. }
  4323. ctx[key] = injected;
  4324. }
  4325. } else {
  4326. ctx[key] = injected;
  4327. }
  4328. {
  4329. checkDuplicateProperties("Inject", key);
  4330. }
  4331. }
  4332. }
  4333. function callHook$1(hook, instance, type) {
  4334. callWithAsyncErrorHandling(isArray$1(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy), instance, type);
  4335. }
  4336. function createWatcher(raw, ctx, publicThis, key) {
  4337. const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
  4338. if (isString(raw)) {
  4339. const handler = ctx[raw];
  4340. if (isFunction(handler)) {
  4341. watch(getter, handler);
  4342. } else {
  4343. warn(`Invalid watch handler specified by key "${raw}"`, handler);
  4344. }
  4345. } else if (isFunction(raw)) {
  4346. watch(getter, raw.bind(publicThis));
  4347. } else if (isObject$3(raw)) {
  4348. if (isArray$1(raw)) {
  4349. raw.forEach((r2) => createWatcher(r2, ctx, publicThis, key));
  4350. } else {
  4351. const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
  4352. if (isFunction(handler)) {
  4353. watch(getter, handler, raw);
  4354. } else {
  4355. warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
  4356. }
  4357. }
  4358. } else {
  4359. warn(`Invalid watch option: "${key}"`, raw);
  4360. }
  4361. }
  4362. function resolveMergedOptions(instance) {
  4363. const base = instance.type;
  4364. const { mixins, extends: extendsOptions } = base;
  4365. const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext;
  4366. const cached = cache.get(base);
  4367. let resolved;
  4368. if (cached) {
  4369. resolved = cached;
  4370. } else if (!globalMixins.length && !mixins && !extendsOptions) {
  4371. {
  4372. resolved = base;
  4373. }
  4374. } else {
  4375. resolved = {};
  4376. if (globalMixins.length) {
  4377. globalMixins.forEach((m2) => mergeOptions(resolved, m2, optionMergeStrategies, true));
  4378. }
  4379. mergeOptions(resolved, base, optionMergeStrategies);
  4380. }
  4381. if (isObject$3(base)) {
  4382. cache.set(base, resolved);
  4383. }
  4384. return resolved;
  4385. }
  4386. function mergeOptions(to, from, strats, asMixin = false) {
  4387. const { mixins, extends: extendsOptions } = from;
  4388. if (extendsOptions) {
  4389. mergeOptions(to, extendsOptions, strats, true);
  4390. }
  4391. if (mixins) {
  4392. mixins.forEach((m2) => mergeOptions(to, m2, strats, true));
  4393. }
  4394. for (const key in from) {
  4395. if (asMixin && key === "expose") {
  4396. warn(`"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`);
  4397. } else {
  4398. const strat = internalOptionMergeStrats[key] || strats && strats[key];
  4399. to[key] = strat ? strat(to[key], from[key]) : from[key];
  4400. }
  4401. }
  4402. return to;
  4403. }
  4404. const internalOptionMergeStrats = {
  4405. data: mergeDataFn,
  4406. props: mergeObjectOptions,
  4407. emits: mergeObjectOptions,
  4408. // objects
  4409. methods: mergeObjectOptions,
  4410. computed: mergeObjectOptions,
  4411. // lifecycle
  4412. beforeCreate: mergeAsArray$1,
  4413. created: mergeAsArray$1,
  4414. beforeMount: mergeAsArray$1,
  4415. mounted: mergeAsArray$1,
  4416. beforeUpdate: mergeAsArray$1,
  4417. updated: mergeAsArray$1,
  4418. beforeDestroy: mergeAsArray$1,
  4419. beforeUnmount: mergeAsArray$1,
  4420. destroyed: mergeAsArray$1,
  4421. unmounted: mergeAsArray$1,
  4422. activated: mergeAsArray$1,
  4423. deactivated: mergeAsArray$1,
  4424. errorCaptured: mergeAsArray$1,
  4425. serverPrefetch: mergeAsArray$1,
  4426. // assets
  4427. components: mergeObjectOptions,
  4428. directives: mergeObjectOptions,
  4429. // watch
  4430. watch: mergeWatchOptions,
  4431. // provide / inject
  4432. provide: mergeDataFn,
  4433. inject: mergeInject
  4434. };
  4435. function mergeDataFn(to, from) {
  4436. if (!from) {
  4437. return to;
  4438. }
  4439. if (!to) {
  4440. return from;
  4441. }
  4442. return function mergedDataFn() {
  4443. return extend(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
  4444. };
  4445. }
  4446. function mergeInject(to, from) {
  4447. return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
  4448. }
  4449. function normalizeInject(raw) {
  4450. if (isArray$1(raw)) {
  4451. const res = {};
  4452. for (let i2 = 0; i2 < raw.length; i2++) {
  4453. res[raw[i2]] = raw[i2];
  4454. }
  4455. return res;
  4456. }
  4457. return raw;
  4458. }
  4459. function mergeAsArray$1(to, from) {
  4460. return to ? [...new Set([].concat(to, from))] : from;
  4461. }
  4462. function mergeObjectOptions(to, from) {
  4463. return to ? extend(extend(/* @__PURE__ */ Object.create(null), to), from) : from;
  4464. }
  4465. function mergeWatchOptions(to, from) {
  4466. if (!to)
  4467. return from;
  4468. if (!from)
  4469. return to;
  4470. const merged = extend(/* @__PURE__ */ Object.create(null), to);
  4471. for (const key in from) {
  4472. merged[key] = mergeAsArray$1(to[key], from[key]);
  4473. }
  4474. return merged;
  4475. }
  4476. function initProps$1(instance, rawProps, isStateful, isSSR = false) {
  4477. const props2 = {};
  4478. const attrs = {};
  4479. instance.propsDefaults = /* @__PURE__ */ Object.create(null);
  4480. setFullProps(instance, rawProps, props2, attrs);
  4481. for (const key in instance.propsOptions[0]) {
  4482. if (!(key in props2)) {
  4483. props2[key] = void 0;
  4484. }
  4485. }
  4486. {
  4487. validateProps(rawProps || {}, props2, instance);
  4488. }
  4489. if (isStateful) {
  4490. instance.props = isSSR ? props2 : shallowReactive(props2);
  4491. } else {
  4492. if (!instance.type.props) {
  4493. instance.props = attrs;
  4494. } else {
  4495. instance.props = props2;
  4496. }
  4497. }
  4498. instance.attrs = attrs;
  4499. }
  4500. function isInHmrContext(instance) {
  4501. while (instance) {
  4502. if (instance.type.__hmrId)
  4503. return true;
  4504. instance = instance.parent;
  4505. }
  4506. }
  4507. function updateProps(instance, rawProps, rawPrevProps, optimized) {
  4508. const { props: props2, attrs, vnode: { patchFlag } } = instance;
  4509. const rawCurrentProps = toRaw(props2);
  4510. const [options] = instance.propsOptions;
  4511. let hasAttrsChanged = false;
  4512. if (
  4513. // always force full diff in dev
  4514. // - #1942 if hmr is enabled with sfc component
  4515. // - vite#872 non-sfc component used by sfc component
  4516. !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16)
  4517. ) {
  4518. if (patchFlag & 8) {
  4519. const propsToUpdate = instance.vnode.dynamicProps;
  4520. for (let i2 = 0; i2 < propsToUpdate.length; i2++) {
  4521. let key = propsToUpdate[i2];
  4522. if (isEmitListener(instance.emitsOptions, key)) {
  4523. continue;
  4524. }
  4525. const value2 = rawProps[key];
  4526. if (options) {
  4527. if (hasOwn$1(attrs, key)) {
  4528. if (value2 !== attrs[key]) {
  4529. attrs[key] = value2;
  4530. hasAttrsChanged = true;
  4531. }
  4532. } else {
  4533. const camelizedKey = camelize(key);
  4534. props2[camelizedKey] = resolvePropValue(
  4535. options,
  4536. rawCurrentProps,
  4537. camelizedKey,
  4538. value2,
  4539. instance,
  4540. false
  4541. /* isAbsent */
  4542. );
  4543. }
  4544. } else {
  4545. if (value2 !== attrs[key]) {
  4546. attrs[key] = value2;
  4547. hasAttrsChanged = true;
  4548. }
  4549. }
  4550. }
  4551. }
  4552. } else {
  4553. if (setFullProps(instance, rawProps, props2, attrs)) {
  4554. hasAttrsChanged = true;
  4555. }
  4556. let kebabKey;
  4557. for (const key in rawCurrentProps) {
  4558. if (!rawProps || // for camelCase
  4559. !hasOwn$1(rawProps, key) && // it's possible the original props was passed in as kebab-case
  4560. // and converted to camelCase (#955)
  4561. ((kebabKey = hyphenate(key)) === key || !hasOwn$1(rawProps, kebabKey))) {
  4562. if (options) {
  4563. if (rawPrevProps && // for camelCase
  4564. (rawPrevProps[key] !== void 0 || // for kebab-case
  4565. rawPrevProps[kebabKey] !== void 0)) {
  4566. props2[key] = resolvePropValue(
  4567. options,
  4568. rawCurrentProps,
  4569. key,
  4570. void 0,
  4571. instance,
  4572. true
  4573. /* isAbsent */
  4574. );
  4575. }
  4576. } else {
  4577. delete props2[key];
  4578. }
  4579. }
  4580. }
  4581. if (attrs !== rawCurrentProps) {
  4582. for (const key in attrs) {
  4583. if (!rawProps || !hasOwn$1(rawProps, key) && true) {
  4584. delete attrs[key];
  4585. hasAttrsChanged = true;
  4586. }
  4587. }
  4588. }
  4589. }
  4590. if (hasAttrsChanged) {
  4591. trigger(instance, "set", "$attrs");
  4592. }
  4593. {
  4594. validateProps(rawProps || {}, props2, instance);
  4595. }
  4596. }
  4597. function setFullProps(instance, rawProps, props2, attrs) {
  4598. const [options, needCastKeys] = instance.propsOptions;
  4599. let hasAttrsChanged = false;
  4600. let rawCastValues;
  4601. if (rawProps) {
  4602. for (let key in rawProps) {
  4603. if (isReservedProp(key)) {
  4604. continue;
  4605. }
  4606. const value2 = rawProps[key];
  4607. let camelKey;
  4608. if (options && hasOwn$1(options, camelKey = camelize(key))) {
  4609. if (!needCastKeys || !needCastKeys.includes(camelKey)) {
  4610. props2[camelKey] = value2;
  4611. } else {
  4612. (rawCastValues || (rawCastValues = {}))[camelKey] = value2;
  4613. }
  4614. } else if (!isEmitListener(instance.emitsOptions, key)) {
  4615. if (!(key in attrs) || value2 !== attrs[key]) {
  4616. attrs[key] = value2;
  4617. hasAttrsChanged = true;
  4618. }
  4619. }
  4620. }
  4621. }
  4622. if (needCastKeys) {
  4623. const rawCurrentProps = toRaw(props2);
  4624. const castValues = rawCastValues || EMPTY_OBJ;
  4625. for (let i2 = 0; i2 < needCastKeys.length; i2++) {
  4626. const key = needCastKeys[i2];
  4627. props2[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn$1(castValues, key));
  4628. }
  4629. }
  4630. return hasAttrsChanged;
  4631. }
  4632. function resolvePropValue(options, props2, key, value2, instance, isAbsent) {
  4633. const opt = options[key];
  4634. if (opt != null) {
  4635. const hasDefault = hasOwn$1(opt, "default");
  4636. if (hasDefault && value2 === void 0) {
  4637. const defaultValue = opt.default;
  4638. if (opt.type !== Function && isFunction(defaultValue)) {
  4639. const { propsDefaults } = instance;
  4640. if (key in propsDefaults) {
  4641. value2 = propsDefaults[key];
  4642. } else {
  4643. setCurrentInstance(instance);
  4644. value2 = propsDefaults[key] = defaultValue.call(null, props2);
  4645. unsetCurrentInstance();
  4646. }
  4647. } else {
  4648. value2 = defaultValue;
  4649. }
  4650. }
  4651. if (opt[
  4652. 0
  4653. /* BooleanFlags.shouldCast */
  4654. ]) {
  4655. if (isAbsent && !hasDefault) {
  4656. value2 = false;
  4657. } else if (opt[
  4658. 1
  4659. /* BooleanFlags.shouldCastTrue */
  4660. ] && (value2 === "" || value2 === hyphenate(key))) {
  4661. value2 = true;
  4662. }
  4663. }
  4664. }
  4665. return value2;
  4666. }
  4667. function normalizePropsOptions(comp, appContext, asMixin = false) {
  4668. const cache = appContext.propsCache;
  4669. const cached = cache.get(comp);
  4670. if (cached) {
  4671. return cached;
  4672. }
  4673. const raw = comp.props;
  4674. const normalized = {};
  4675. const needCastKeys = [];
  4676. let hasExtends = false;
  4677. if (!isFunction(comp)) {
  4678. const extendProps = (raw2) => {
  4679. hasExtends = true;
  4680. const [props2, keys] = normalizePropsOptions(raw2, appContext, true);
  4681. extend(normalized, props2);
  4682. if (keys)
  4683. needCastKeys.push(...keys);
  4684. };
  4685. if (!asMixin && appContext.mixins.length) {
  4686. appContext.mixins.forEach(extendProps);
  4687. }
  4688. if (comp.extends) {
  4689. extendProps(comp.extends);
  4690. }
  4691. if (comp.mixins) {
  4692. comp.mixins.forEach(extendProps);
  4693. }
  4694. }
  4695. if (!raw && !hasExtends) {
  4696. if (isObject$3(comp)) {
  4697. cache.set(comp, EMPTY_ARR);
  4698. }
  4699. return EMPTY_ARR;
  4700. }
  4701. if (isArray$1(raw)) {
  4702. for (let i2 = 0; i2 < raw.length; i2++) {
  4703. if (!isString(raw[i2])) {
  4704. warn(`props must be strings when using array syntax.`, raw[i2]);
  4705. }
  4706. const normalizedKey = camelize(raw[i2]);
  4707. if (validatePropName(normalizedKey)) {
  4708. normalized[normalizedKey] = EMPTY_OBJ;
  4709. }
  4710. }
  4711. } else if (raw) {
  4712. if (!isObject$3(raw)) {
  4713. warn(`invalid props options`, raw);
  4714. }
  4715. for (const key in raw) {
  4716. const normalizedKey = camelize(key);
  4717. if (validatePropName(normalizedKey)) {
  4718. const opt = raw[key];
  4719. const prop = normalized[normalizedKey] = isArray$1(opt) || isFunction(opt) ? { type: opt } : Object.assign({}, opt);
  4720. if (prop) {
  4721. const booleanIndex = getTypeIndex(Boolean, prop.type);
  4722. const stringIndex = getTypeIndex(String, prop.type);
  4723. prop[
  4724. 0
  4725. /* BooleanFlags.shouldCast */
  4726. ] = booleanIndex > -1;
  4727. prop[
  4728. 1
  4729. /* BooleanFlags.shouldCastTrue */
  4730. ] = stringIndex < 0 || booleanIndex < stringIndex;
  4731. if (booleanIndex > -1 || hasOwn$1(prop, "default")) {
  4732. needCastKeys.push(normalizedKey);
  4733. }
  4734. }
  4735. }
  4736. }
  4737. }
  4738. const res = [normalized, needCastKeys];
  4739. if (isObject$3(comp)) {
  4740. cache.set(comp, res);
  4741. }
  4742. return res;
  4743. }
  4744. function validatePropName(key) {
  4745. if (key[0] !== "$") {
  4746. return true;
  4747. } else {
  4748. warn(`Invalid prop name: "${key}" is a reserved property.`);
  4749. }
  4750. return false;
  4751. }
  4752. function getType(ctor) {
  4753. const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/);
  4754. return match ? match[2] : ctor === null ? "null" : "";
  4755. }
  4756. function isSameType(a2, b2) {
  4757. return getType(a2) === getType(b2);
  4758. }
  4759. function getTypeIndex(type, expectedTypes) {
  4760. if (isArray$1(expectedTypes)) {
  4761. return expectedTypes.findIndex((t2) => isSameType(t2, type));
  4762. } else if (isFunction(expectedTypes)) {
  4763. return isSameType(expectedTypes, type) ? 0 : -1;
  4764. }
  4765. return -1;
  4766. }
  4767. function validateProps(rawProps, props2, instance) {
  4768. const resolvedValues = toRaw(props2);
  4769. const options = instance.propsOptions[0];
  4770. for (const key in options) {
  4771. let opt = options[key];
  4772. if (opt == null)
  4773. continue;
  4774. validateProp(key, resolvedValues[key], opt, !hasOwn$1(rawProps, key) && !hasOwn$1(rawProps, hyphenate(key)));
  4775. }
  4776. }
  4777. function validateProp(name, value2, prop, isAbsent) {
  4778. const { type, required, validator } = prop;
  4779. if (required && isAbsent) {
  4780. warn('Missing required prop: "' + name + '"');
  4781. return;
  4782. }
  4783. if (value2 == null && !prop.required) {
  4784. return;
  4785. }
  4786. if (type != null && type !== true) {
  4787. let isValid = false;
  4788. const types = isArray$1(type) ? type : [type];
  4789. const expectedTypes = [];
  4790. for (let i2 = 0; i2 < types.length && !isValid; i2++) {
  4791. const { valid, expectedType } = assertType(value2, types[i2]);
  4792. expectedTypes.push(expectedType || "");
  4793. isValid = valid;
  4794. }
  4795. if (!isValid) {
  4796. warn(getInvalidTypeMessage(name, value2, expectedTypes));
  4797. return;
  4798. }
  4799. }
  4800. if (validator && !validator(value2)) {
  4801. warn('Invalid prop: custom validator check failed for prop "' + name + '".');
  4802. }
  4803. }
  4804. const isSimpleType = /* @__PURE__ */ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
  4805. function assertType(value2, type) {
  4806. let valid;
  4807. const expectedType = getType(type);
  4808. if (isSimpleType(expectedType)) {
  4809. const t2 = typeof value2;
  4810. valid = t2 === expectedType.toLowerCase();
  4811. if (!valid && t2 === "object") {
  4812. valid = value2 instanceof type;
  4813. }
  4814. } else if (expectedType === "Object") {
  4815. valid = isObject$3(value2);
  4816. } else if (expectedType === "Array") {
  4817. valid = isArray$1(value2);
  4818. } else if (expectedType === "null") {
  4819. valid = value2 === null;
  4820. } else {
  4821. valid = value2 instanceof type;
  4822. }
  4823. return {
  4824. valid,
  4825. expectedType
  4826. };
  4827. }
  4828. function getInvalidTypeMessage(name, value2, expectedTypes) {
  4829. let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
  4830. const expectedType = expectedTypes[0];
  4831. const receivedType = toRawType(value2);
  4832. const expectedValue = styleValue(value2, expectedType);
  4833. const receivedValue = styleValue(value2, receivedType);
  4834. if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
  4835. message += ` with value ${expectedValue}`;
  4836. }
  4837. message += `, got ${receivedType} `;
  4838. if (isExplicable(receivedType)) {
  4839. message += `with value ${receivedValue}.`;
  4840. }
  4841. return message;
  4842. }
  4843. function styleValue(value2, type) {
  4844. if (type === "String") {
  4845. return `"${value2}"`;
  4846. } else if (type === "Number") {
  4847. return `${Number(value2)}`;
  4848. } else {
  4849. return `${value2}`;
  4850. }
  4851. }
  4852. function isExplicable(type) {
  4853. const explicitTypes = ["string", "number", "boolean"];
  4854. return explicitTypes.some((elem) => type.toLowerCase() === elem);
  4855. }
  4856. function isBoolean(...args) {
  4857. return args.some((elem) => elem.toLowerCase() === "boolean");
  4858. }
  4859. function createAppContext() {
  4860. return {
  4861. app: null,
  4862. config: {
  4863. isNativeTag: NO,
  4864. performance: false,
  4865. globalProperties: {},
  4866. optionMergeStrategies: {},
  4867. errorHandler: void 0,
  4868. warnHandler: void 0,
  4869. compilerOptions: {}
  4870. },
  4871. mixins: [],
  4872. components: {},
  4873. directives: {},
  4874. provides: /* @__PURE__ */ Object.create(null),
  4875. optionsCache: /* @__PURE__ */ new WeakMap(),
  4876. propsCache: /* @__PURE__ */ new WeakMap(),
  4877. emitsCache: /* @__PURE__ */ new WeakMap()
  4878. };
  4879. }
  4880. let uid$1 = 0;
  4881. function createAppAPI(render, hydrate) {
  4882. return function createApp2(rootComponent, rootProps = null) {
  4883. if (!isFunction(rootComponent)) {
  4884. rootComponent = Object.assign({}, rootComponent);
  4885. }
  4886. if (rootProps != null && !isObject$3(rootProps)) {
  4887. warn(`root props passed to app.mount() must be an object.`);
  4888. rootProps = null;
  4889. }
  4890. const context = createAppContext();
  4891. const installedPlugins = /* @__PURE__ */ new Set();
  4892. const app = context.app = {
  4893. _uid: uid$1++,
  4894. _component: rootComponent,
  4895. _props: rootProps,
  4896. _container: null,
  4897. _context: context,
  4898. _instance: null,
  4899. version: version$1,
  4900. get config() {
  4901. return context.config;
  4902. },
  4903. set config(v2) {
  4904. {
  4905. warn(`app.config cannot be replaced. Modify individual options instead.`);
  4906. }
  4907. },
  4908. use(plugin2, ...options) {
  4909. if (installedPlugins.has(plugin2)) {
  4910. warn(`Plugin has already been applied to target app.`);
  4911. } else if (plugin2 && isFunction(plugin2.install)) {
  4912. installedPlugins.add(plugin2);
  4913. plugin2.install(app, ...options);
  4914. } else if (isFunction(plugin2)) {
  4915. installedPlugins.add(plugin2);
  4916. plugin2(app, ...options);
  4917. } else {
  4918. warn(`A plugin must either be a function or an object with an "install" function.`);
  4919. }
  4920. return app;
  4921. },
  4922. mixin(mixin2) {
  4923. {
  4924. if (!context.mixins.includes(mixin2)) {
  4925. context.mixins.push(mixin2);
  4926. } else {
  4927. warn("Mixin has already been applied to target app" + (mixin2.name ? `: ${mixin2.name}` : ""));
  4928. }
  4929. }
  4930. return app;
  4931. },
  4932. component(name, component) {
  4933. {
  4934. validateComponentName(name, context.config);
  4935. }
  4936. if (!component) {
  4937. return context.components[name];
  4938. }
  4939. if (context.components[name]) {
  4940. warn(`Component "${name}" has already been registered in target app.`);
  4941. }
  4942. context.components[name] = component;
  4943. return app;
  4944. },
  4945. directive(name, directive) {
  4946. {
  4947. validateDirectiveName(name);
  4948. }
  4949. if (!directive) {
  4950. return context.directives[name];
  4951. }
  4952. if (context.directives[name]) {
  4953. warn(`Directive "${name}" has already been registered in target app.`);
  4954. }
  4955. context.directives[name] = directive;
  4956. return app;
  4957. },
  4958. // fixed by xxxxxx
  4959. mount() {
  4960. },
  4961. // fixed by xxxxxx
  4962. unmount() {
  4963. },
  4964. provide(key, value2) {
  4965. if (key in context.provides) {
  4966. warn(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
  4967. }
  4968. context.provides[key] = value2;
  4969. return app;
  4970. }
  4971. };
  4972. return app;
  4973. };
  4974. }
  4975. let supported;
  4976. let perf;
  4977. function startMeasure(instance, type) {
  4978. if (instance.appContext.config.performance && isSupported()) {
  4979. perf.mark(`vue-${type}-${instance.uid}`);
  4980. }
  4981. {
  4982. devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
  4983. }
  4984. }
  4985. function endMeasure(instance, type) {
  4986. if (instance.appContext.config.performance && isSupported()) {
  4987. const startTag = `vue-${type}-${instance.uid}`;
  4988. const endTag = startTag + `:end`;
  4989. perf.mark(endTag);
  4990. perf.measure(`<${formatComponentName(instance, instance.type)}> ${type}`, startTag, endTag);
  4991. perf.clearMarks(startTag);
  4992. perf.clearMarks(endTag);
  4993. }
  4994. {
  4995. devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
  4996. }
  4997. }
  4998. function isSupported() {
  4999. if (supported !== void 0) {
  5000. return supported;
  5001. }
  5002. if (typeof window !== "undefined" && window.performance) {
  5003. supported = true;
  5004. perf = window.performance;
  5005. } else {
  5006. supported = false;
  5007. }
  5008. return supported;
  5009. }
  5010. const queuePostRenderEffect$1 = queuePostFlushCb;
  5011. const Fragment = Symbol("Fragment");
  5012. const Text$1 = Symbol("Text");
  5013. const Comment = Symbol("Comment");
  5014. const Static = Symbol("Static");
  5015. function isVNode(value2) {
  5016. return value2 ? value2.__v_isVNode === true : false;
  5017. }
  5018. const InternalObjectKey = `__vInternal`;
  5019. function guardReactiveProps(props2) {
  5020. if (!props2)
  5021. return null;
  5022. return isProxy(props2) || InternalObjectKey in props2 ? extend({}, props2) : props2;
  5023. }
  5024. const emptyAppContext = createAppContext();
  5025. let uid = 0;
  5026. function createComponentInstance(vnode, parent, suspense) {
  5027. const type = vnode.type;
  5028. const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
  5029. const instance = {
  5030. uid: uid++,
  5031. vnode,
  5032. type,
  5033. parent,
  5034. appContext,
  5035. root: null,
  5036. next: null,
  5037. subTree: null,
  5038. effect: null,
  5039. update: null,
  5040. scope: new EffectScope(
  5041. true
  5042. /* detached */
  5043. ),
  5044. render: null,
  5045. proxy: null,
  5046. exposed: null,
  5047. exposeProxy: null,
  5048. withProxy: null,
  5049. provides: parent ? parent.provides : Object.create(appContext.provides),
  5050. accessCache: null,
  5051. renderCache: [],
  5052. // local resolved assets
  5053. components: null,
  5054. directives: null,
  5055. // resolved props and emits options
  5056. propsOptions: normalizePropsOptions(type, appContext),
  5057. emitsOptions: normalizeEmitsOptions(type, appContext),
  5058. // emit
  5059. emit: null,
  5060. emitted: null,
  5061. // props default value
  5062. propsDefaults: EMPTY_OBJ,
  5063. // inheritAttrs
  5064. inheritAttrs: type.inheritAttrs,
  5065. // state
  5066. ctx: EMPTY_OBJ,
  5067. data: EMPTY_OBJ,
  5068. props: EMPTY_OBJ,
  5069. attrs: EMPTY_OBJ,
  5070. slots: EMPTY_OBJ,
  5071. refs: EMPTY_OBJ,
  5072. setupState: EMPTY_OBJ,
  5073. setupContext: null,
  5074. // suspense related
  5075. suspense,
  5076. suspenseId: suspense ? suspense.pendingId : 0,
  5077. asyncDep: null,
  5078. asyncResolved: false,
  5079. // lifecycle hooks
  5080. // not using enums here because it results in computed properties
  5081. isMounted: false,
  5082. isUnmounted: false,
  5083. isDeactivated: false,
  5084. bc: null,
  5085. c: null,
  5086. bm: null,
  5087. m: null,
  5088. bu: null,
  5089. u: null,
  5090. um: null,
  5091. bum: null,
  5092. da: null,
  5093. a: null,
  5094. rtg: null,
  5095. rtc: null,
  5096. ec: null,
  5097. sp: null
  5098. };
  5099. {
  5100. instance.ctx = createDevRenderContext(instance);
  5101. }
  5102. instance.root = parent ? parent.root : instance;
  5103. instance.emit = emit.bind(null, instance);
  5104. if (vnode.ce) {
  5105. vnode.ce(instance);
  5106. }
  5107. return instance;
  5108. }
  5109. let currentInstance = null;
  5110. const getCurrentInstance = () => currentInstance || currentRenderingInstance;
  5111. const setCurrentInstance = (instance) => {
  5112. currentInstance = instance;
  5113. instance.scope.on();
  5114. };
  5115. const unsetCurrentInstance = () => {
  5116. currentInstance && currentInstance.scope.off();
  5117. currentInstance = null;
  5118. };
  5119. const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
  5120. function validateComponentName(name, config2) {
  5121. const appIsNativeTag = config2.isNativeTag || NO;
  5122. if (isBuiltInTag(name) || appIsNativeTag(name)) {
  5123. warn("Do not use built-in or reserved HTML elements as component id: " + name);
  5124. }
  5125. }
  5126. function isStatefulComponent(instance) {
  5127. return instance.vnode.shapeFlag & 4;
  5128. }
  5129. let isInSSRComponentSetup = false;
  5130. function setupComponent(instance, isSSR = false) {
  5131. isInSSRComponentSetup = isSSR;
  5132. const {
  5133. props: props2
  5134. /*, children*/
  5135. } = instance.vnode;
  5136. const isStateful = isStatefulComponent(instance);
  5137. initProps$1(instance, props2, isStateful, isSSR);
  5138. const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
  5139. isInSSRComponentSetup = false;
  5140. return setupResult;
  5141. }
  5142. function setupStatefulComponent(instance, isSSR) {
  5143. const Component2 = instance.type;
  5144. {
  5145. if (Component2.name) {
  5146. validateComponentName(Component2.name, instance.appContext.config);
  5147. }
  5148. if (Component2.components) {
  5149. const names = Object.keys(Component2.components);
  5150. for (let i2 = 0; i2 < names.length; i2++) {
  5151. validateComponentName(names[i2], instance.appContext.config);
  5152. }
  5153. }
  5154. if (Component2.directives) {
  5155. const names = Object.keys(Component2.directives);
  5156. for (let i2 = 0; i2 < names.length; i2++) {
  5157. validateDirectiveName(names[i2]);
  5158. }
  5159. }
  5160. if (Component2.compilerOptions && isRuntimeOnly()) {
  5161. 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.`);
  5162. }
  5163. }
  5164. instance.accessCache = /* @__PURE__ */ Object.create(null);
  5165. instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
  5166. {
  5167. exposePropsOnRenderContext(instance);
  5168. }
  5169. const { setup } = Component2;
  5170. if (setup) {
  5171. const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
  5172. setCurrentInstance(instance);
  5173. pauseTracking();
  5174. const setupResult = callWithErrorHandling(setup, instance, 0, [shallowReadonly(instance.props), setupContext]);
  5175. resetTracking();
  5176. unsetCurrentInstance();
  5177. if (isPromise$1(setupResult)) {
  5178. setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
  5179. {
  5180. warn(`setup() returned a Promise, but the version of Vue you are using does not support it yet.`);
  5181. }
  5182. } else {
  5183. handleSetupResult(instance, setupResult, isSSR);
  5184. }
  5185. } else {
  5186. finishComponentSetup(instance, isSSR);
  5187. }
  5188. }
  5189. function handleSetupResult(instance, setupResult, isSSR) {
  5190. if (isFunction(setupResult)) {
  5191. {
  5192. instance.render = setupResult;
  5193. }
  5194. } else if (isObject$3(setupResult)) {
  5195. if (isVNode(setupResult)) {
  5196. warn(`setup() should not return VNodes directly - return a render function instead.`);
  5197. }
  5198. {
  5199. instance.devtoolsRawSetupState = setupResult;
  5200. }
  5201. instance.setupState = proxyRefs(setupResult);
  5202. {
  5203. exposeSetupStateOnRenderContext(instance);
  5204. }
  5205. } else if (setupResult !== void 0) {
  5206. warn(`setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`);
  5207. }
  5208. finishComponentSetup(instance, isSSR);
  5209. }
  5210. let compile;
  5211. const isRuntimeOnly = () => !compile;
  5212. function finishComponentSetup(instance, isSSR, skipOptions) {
  5213. const Component2 = instance.type;
  5214. if (!instance.render) {
  5215. instance.render = Component2.render || NOOP;
  5216. }
  5217. {
  5218. setCurrentInstance(instance);
  5219. pauseTracking();
  5220. applyOptions$1(instance);
  5221. resetTracking();
  5222. unsetCurrentInstance();
  5223. }
  5224. if (!Component2.render && instance.render === NOOP && !isSSR) {
  5225. if (Component2.template) {
  5226. warn(
  5227. `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".`
  5228. /* should not happen */
  5229. );
  5230. } else {
  5231. warn(`Component is missing template or render function.`);
  5232. }
  5233. }
  5234. }
  5235. function createAttrsProxy(instance) {
  5236. return new Proxy(
  5237. instance.attrs,
  5238. {
  5239. get(target, key) {
  5240. track(instance, "get", "$attrs");
  5241. return target[key];
  5242. },
  5243. set() {
  5244. warn(`setupContext.attrs is readonly.`);
  5245. return false;
  5246. },
  5247. deleteProperty() {
  5248. warn(`setupContext.attrs is readonly.`);
  5249. return false;
  5250. }
  5251. }
  5252. );
  5253. }
  5254. function createSetupContext(instance) {
  5255. const expose = (exposed) => {
  5256. {
  5257. if (instance.exposed) {
  5258. warn(`expose() should be called only once per setup().`);
  5259. }
  5260. if (exposed != null) {
  5261. let exposedType = typeof exposed;
  5262. if (exposedType === "object") {
  5263. if (isArray$1(exposed)) {
  5264. exposedType = "array";
  5265. } else if (isRef(exposed)) {
  5266. exposedType = "ref";
  5267. }
  5268. }
  5269. if (exposedType !== "object") {
  5270. warn(`expose() should be passed a plain object, received ${exposedType}.`);
  5271. }
  5272. }
  5273. }
  5274. instance.exposed = exposed || {};
  5275. };
  5276. let attrs;
  5277. {
  5278. return Object.freeze({
  5279. get attrs() {
  5280. return attrs || (attrs = createAttrsProxy(instance));
  5281. },
  5282. get slots() {
  5283. return shallowReadonly(instance.slots);
  5284. },
  5285. get emit() {
  5286. return (event, ...args) => instance.emit(event, ...args);
  5287. },
  5288. expose
  5289. });
  5290. }
  5291. }
  5292. function getExposeProxy(instance) {
  5293. if (instance.exposed) {
  5294. return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
  5295. get(target, key) {
  5296. if (key in target) {
  5297. return target[key];
  5298. }
  5299. return instance.proxy[key];
  5300. },
  5301. has(target, key) {
  5302. return key in target || key in publicPropertiesMap;
  5303. }
  5304. }));
  5305. }
  5306. }
  5307. const classifyRE = /(?:^|[-_])(\w)/g;
  5308. const classify = (str) => str.replace(classifyRE, (c2) => c2.toUpperCase()).replace(/[-_]/g, "");
  5309. function getComponentName(Component2, includeInferred = true) {
  5310. return isFunction(Component2) ? Component2.displayName || Component2.name : Component2.name || includeInferred && Component2.__name;
  5311. }
  5312. function formatComponentName(instance, Component2, isRoot = false) {
  5313. let name = getComponentName(Component2);
  5314. if (!name && Component2.__file) {
  5315. const match = Component2.__file.match(/([^/\\]+)\.\w+$/);
  5316. if (match) {
  5317. name = match[1];
  5318. }
  5319. }
  5320. if (!name && instance && instance.parent) {
  5321. const inferFromRegistry = (registry) => {
  5322. for (const key in registry) {
  5323. if (registry[key] === Component2) {
  5324. return key;
  5325. }
  5326. }
  5327. };
  5328. name = inferFromRegistry(instance.components || instance.parent.type.components) || inferFromRegistry(instance.appContext.components);
  5329. }
  5330. return name ? classify(name) : isRoot ? `App` : `Anonymous`;
  5331. }
  5332. const computed = (getterOrOptions, debugOptions) => {
  5333. return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
  5334. };
  5335. const version$1 = "3.2.47";
  5336. function unwrapper(target) {
  5337. return unref(target);
  5338. }
  5339. const ARRAYTYPE = "[object Array]";
  5340. const OBJECTTYPE = "[object Object]";
  5341. function diff(current, pre) {
  5342. const result = {};
  5343. syncKeys(current, pre);
  5344. _diff(current, pre, "", result);
  5345. return result;
  5346. }
  5347. function syncKeys(current, pre) {
  5348. current = unwrapper(current);
  5349. if (current === pre)
  5350. return;
  5351. const rootCurrentType = toTypeString(current);
  5352. const rootPreType = toTypeString(pre);
  5353. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  5354. for (let key in pre) {
  5355. const currentValue = current[key];
  5356. if (currentValue === void 0) {
  5357. current[key] = null;
  5358. } else {
  5359. syncKeys(currentValue, pre[key]);
  5360. }
  5361. }
  5362. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  5363. if (current.length >= pre.length) {
  5364. pre.forEach((item, index2) => {
  5365. syncKeys(current[index2], item);
  5366. });
  5367. }
  5368. }
  5369. }
  5370. function _diff(current, pre, path, result) {
  5371. current = unwrapper(current);
  5372. if (current === pre)
  5373. return;
  5374. const rootCurrentType = toTypeString(current);
  5375. const rootPreType = toTypeString(pre);
  5376. if (rootCurrentType == OBJECTTYPE) {
  5377. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  5378. setResult(result, path, current);
  5379. } else {
  5380. for (let key in current) {
  5381. const currentValue = unwrapper(current[key]);
  5382. const preValue = pre[key];
  5383. const currentType = toTypeString(currentValue);
  5384. const preType = toTypeString(preValue);
  5385. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  5386. if (currentValue != preValue) {
  5387. setResult(result, (path == "" ? "" : path + ".") + key, currentValue);
  5388. }
  5389. } else if (currentType == ARRAYTYPE) {
  5390. if (preType != ARRAYTYPE) {
  5391. setResult(result, (path == "" ? "" : path + ".") + key, currentValue);
  5392. } else {
  5393. if (currentValue.length < preValue.length) {
  5394. setResult(result, (path == "" ? "" : path + ".") + key, currentValue);
  5395. } else {
  5396. currentValue.forEach((item, index2) => {
  5397. _diff(item, preValue[index2], (path == "" ? "" : path + ".") + key + "[" + index2 + "]", result);
  5398. });
  5399. }
  5400. }
  5401. } else if (currentType == OBJECTTYPE) {
  5402. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  5403. setResult(result, (path == "" ? "" : path + ".") + key, currentValue);
  5404. } else {
  5405. for (let subKey in currentValue) {
  5406. _diff(currentValue[subKey], preValue[subKey], (path == "" ? "" : path + ".") + key + "." + subKey, result);
  5407. }
  5408. }
  5409. }
  5410. }
  5411. }
  5412. } else if (rootCurrentType == ARRAYTYPE) {
  5413. if (rootPreType != ARRAYTYPE) {
  5414. setResult(result, path, current);
  5415. } else {
  5416. if (current.length < pre.length) {
  5417. setResult(result, path, current);
  5418. } else {
  5419. current.forEach((item, index2) => {
  5420. _diff(item, pre[index2], path + "[" + index2 + "]", result);
  5421. });
  5422. }
  5423. }
  5424. } else {
  5425. setResult(result, path, current);
  5426. }
  5427. }
  5428. function setResult(result, k2, v2) {
  5429. result[k2] = v2;
  5430. }
  5431. function hasComponentEffect(instance) {
  5432. return queue.includes(instance.update);
  5433. }
  5434. function flushCallbacks(instance) {
  5435. const ctx = instance.ctx;
  5436. const callbacks = ctx.__next_tick_callbacks;
  5437. if (callbacks && callbacks.length) {
  5438. const copies = callbacks.slice(0);
  5439. callbacks.length = 0;
  5440. for (let i2 = 0; i2 < copies.length; i2++) {
  5441. copies[i2]();
  5442. }
  5443. }
  5444. }
  5445. function nextTick(instance, fn) {
  5446. const ctx = instance.ctx;
  5447. if (!ctx.__next_tick_pending && !hasComponentEffect(instance)) {
  5448. return nextTick$1(fn && fn.bind(instance.proxy));
  5449. }
  5450. let _resolve;
  5451. if (!ctx.__next_tick_callbacks) {
  5452. ctx.__next_tick_callbacks = [];
  5453. }
  5454. ctx.__next_tick_callbacks.push(() => {
  5455. if (fn) {
  5456. callWithErrorHandling(
  5457. fn.bind(instance.proxy),
  5458. instance,
  5459. 14
  5460. /* ErrorCodes.SCHEDULER */
  5461. );
  5462. } else if (_resolve) {
  5463. _resolve(instance.proxy);
  5464. }
  5465. });
  5466. return new Promise((resolve2) => {
  5467. _resolve = resolve2;
  5468. });
  5469. }
  5470. function clone$1(src, seen) {
  5471. src = unwrapper(src);
  5472. const type = typeof src;
  5473. if (type === "object" && src !== null) {
  5474. let copy = seen.get(src);
  5475. if (typeof copy !== "undefined") {
  5476. return copy;
  5477. }
  5478. if (isArray$1(src)) {
  5479. const len = src.length;
  5480. copy = new Array(len);
  5481. seen.set(src, copy);
  5482. for (let i2 = 0; i2 < len; i2++) {
  5483. copy[i2] = clone$1(src[i2], seen);
  5484. }
  5485. } else {
  5486. copy = {};
  5487. seen.set(src, copy);
  5488. for (const name in src) {
  5489. if (hasOwn$1(src, name)) {
  5490. copy[name] = clone$1(src[name], seen);
  5491. }
  5492. }
  5493. }
  5494. return copy;
  5495. }
  5496. if (type !== "symbol") {
  5497. return src;
  5498. }
  5499. }
  5500. function deepCopy(src) {
  5501. return clone$1(src, typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : /* @__PURE__ */ new Map());
  5502. }
  5503. function getMPInstanceData(instance, keys) {
  5504. const data = instance.data;
  5505. const ret = /* @__PURE__ */ Object.create(null);
  5506. keys.forEach((key) => {
  5507. ret[key] = data[key];
  5508. });
  5509. return ret;
  5510. }
  5511. function patch(instance, data, oldData) {
  5512. if (!data) {
  5513. return;
  5514. }
  5515. data = deepCopy(data);
  5516. const ctx = instance.ctx;
  5517. const mpType = ctx.mpType;
  5518. if (mpType === "page" || mpType === "component") {
  5519. data.r0 = 1;
  5520. const mpInstance = ctx.$scope;
  5521. const keys = Object.keys(data);
  5522. const diffData = diff(data, oldData || getMPInstanceData(mpInstance, keys));
  5523. if (Object.keys(diffData).length) {
  5524. ctx.__next_tick_pending = true;
  5525. mpInstance.setData(diffData, () => {
  5526. ctx.__next_tick_pending = false;
  5527. flushCallbacks(instance);
  5528. });
  5529. flushPreFlushCbs();
  5530. } else {
  5531. flushCallbacks(instance);
  5532. }
  5533. }
  5534. }
  5535. function initAppConfig(appConfig) {
  5536. appConfig.globalProperties.$nextTick = function $nextTick(fn) {
  5537. return nextTick(this.$, fn);
  5538. };
  5539. }
  5540. function onApplyOptions(options, instance, publicThis) {
  5541. instance.appContext.config.globalProperties.$applyOptions(options, instance, publicThis);
  5542. const computedOptions = options.computed;
  5543. if (computedOptions) {
  5544. const keys = Object.keys(computedOptions);
  5545. if (keys.length) {
  5546. const ctx = instance.ctx;
  5547. if (!ctx.$computedKeys) {
  5548. ctx.$computedKeys = [];
  5549. }
  5550. ctx.$computedKeys.push(...keys);
  5551. }
  5552. }
  5553. delete instance.ctx.$onApplyOptions;
  5554. }
  5555. function setRef$1(instance, isUnmount = false) {
  5556. const { setupState, $templateRefs, ctx: { $scope, $mpPlatform } } = instance;
  5557. if ($mpPlatform === "mp-alipay") {
  5558. return;
  5559. }
  5560. if (!$templateRefs || !$scope) {
  5561. return;
  5562. }
  5563. if (isUnmount) {
  5564. return $templateRefs.forEach((templateRef) => setTemplateRef(templateRef, null, setupState));
  5565. }
  5566. const check = $mpPlatform === "mp-baidu" || $mpPlatform === "mp-toutiao";
  5567. const doSetByRefs = (refs) => {
  5568. const mpComponents = (
  5569. // 字节小程序 selectAllComponents 可能返回 null
  5570. // https://github.com/dcloudio/uni-app/issues/3954
  5571. ($scope.selectAllComponents(".r") || []).concat($scope.selectAllComponents(".r-i-f") || [])
  5572. );
  5573. return refs.filter((templateRef) => {
  5574. const refValue = findComponentPublicInstance(mpComponents, templateRef.i);
  5575. if (check && refValue === null) {
  5576. return true;
  5577. }
  5578. setTemplateRef(templateRef, refValue, setupState);
  5579. return false;
  5580. });
  5581. };
  5582. const doSet = () => {
  5583. const refs = doSetByRefs($templateRefs);
  5584. if (refs.length && instance.proxy && instance.proxy.$scope) {
  5585. instance.proxy.$scope.setData({ r1: 1 }, () => {
  5586. doSetByRefs(refs);
  5587. });
  5588. }
  5589. };
  5590. if ($scope._$setRef) {
  5591. $scope._$setRef(doSet);
  5592. } else {
  5593. nextTick(instance, doSet);
  5594. }
  5595. }
  5596. function toSkip(value2) {
  5597. if (isObject$3(value2)) {
  5598. markRaw(value2);
  5599. }
  5600. return value2;
  5601. }
  5602. function findComponentPublicInstance(mpComponents, id) {
  5603. const mpInstance = mpComponents.find((com) => com && (com.properties || com.props).uI === id);
  5604. if (mpInstance) {
  5605. const vm = mpInstance.$vm;
  5606. if (vm) {
  5607. return getExposeProxy(vm.$) || vm;
  5608. }
  5609. return toSkip(mpInstance);
  5610. }
  5611. return null;
  5612. }
  5613. function setTemplateRef({ r: r2, f: f2 }, refValue, setupState) {
  5614. if (isFunction(r2)) {
  5615. r2(refValue, {});
  5616. } else {
  5617. const _isString = isString(r2);
  5618. const _isRef = isRef(r2);
  5619. if (_isString || _isRef) {
  5620. if (f2) {
  5621. if (!_isRef) {
  5622. return;
  5623. }
  5624. if (!isArray$1(r2.value)) {
  5625. r2.value = [];
  5626. }
  5627. const existing = r2.value;
  5628. if (existing.indexOf(refValue) === -1) {
  5629. existing.push(refValue);
  5630. if (!refValue) {
  5631. return;
  5632. }
  5633. onBeforeUnmount(() => remove(existing, refValue), refValue.$);
  5634. }
  5635. } else if (_isString) {
  5636. if (hasOwn$1(setupState, r2)) {
  5637. setupState[r2] = refValue;
  5638. }
  5639. } else if (isRef(r2)) {
  5640. r2.value = refValue;
  5641. } else {
  5642. warnRef(r2);
  5643. }
  5644. } else {
  5645. warnRef(r2);
  5646. }
  5647. }
  5648. }
  5649. function warnRef(ref2) {
  5650. warn("Invalid template ref type:", ref2, `(${typeof ref2})`);
  5651. }
  5652. var MPType;
  5653. (function(MPType2) {
  5654. MPType2["APP"] = "app";
  5655. MPType2["PAGE"] = "page";
  5656. MPType2["COMPONENT"] = "component";
  5657. })(MPType || (MPType = {}));
  5658. const queuePostRenderEffect = queuePostFlushCb;
  5659. function mountComponent(initialVNode, options) {
  5660. const instance = initialVNode.component = createComponentInstance(initialVNode, options.parentComponent, null);
  5661. {
  5662. instance.ctx.$onApplyOptions = onApplyOptions;
  5663. instance.ctx.$children = [];
  5664. }
  5665. if (options.mpType === "app") {
  5666. instance.render = NOOP;
  5667. }
  5668. if (options.onBeforeSetup) {
  5669. options.onBeforeSetup(instance, options);
  5670. }
  5671. {
  5672. pushWarningContext(initialVNode);
  5673. startMeasure(instance, `mount`);
  5674. }
  5675. {
  5676. startMeasure(instance, `init`);
  5677. }
  5678. setupComponent(instance);
  5679. {
  5680. endMeasure(instance, `init`);
  5681. }
  5682. {
  5683. if (options.parentComponent && instance.proxy) {
  5684. options.parentComponent.ctx.$children.push(getExposeProxy(instance) || instance.proxy);
  5685. }
  5686. }
  5687. setupRenderEffect(instance);
  5688. {
  5689. popWarningContext();
  5690. endMeasure(instance, `mount`);
  5691. }
  5692. return instance.proxy;
  5693. }
  5694. const getFunctionalFallthrough = (attrs) => {
  5695. let res;
  5696. for (const key in attrs) {
  5697. if (key === "class" || key === "style" || isOn(key)) {
  5698. (res || (res = {}))[key] = attrs[key];
  5699. }
  5700. }
  5701. return res;
  5702. };
  5703. function renderComponentRoot(instance) {
  5704. 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;
  5705. instance.$templateRefs = [];
  5706. instance.$ei = 0;
  5707. pruneComponentPropsCache2(uid2);
  5708. instance.__counter = instance.__counter === 0 ? 1 : 0;
  5709. let result;
  5710. const prev = setCurrentRenderingInstance(instance);
  5711. try {
  5712. if (vnode.shapeFlag & 4) {
  5713. fallthroughAttrs(inheritAttrs, props2, propsOptions, attrs);
  5714. const proxyToUse = withProxy || proxy;
  5715. result = render.call(proxyToUse, proxyToUse, renderCache, props2, setupState, data, ctx);
  5716. } else {
  5717. fallthroughAttrs(inheritAttrs, props2, propsOptions, Component2.props ? attrs : getFunctionalFallthrough(attrs));
  5718. const render2 = Component2;
  5719. result = render2.length > 1 ? render2(props2, { attrs, slots, emit: emit2 }) : render2(
  5720. props2,
  5721. null
  5722. /* we know it doesn't need it */
  5723. );
  5724. }
  5725. } catch (err) {
  5726. handleError(
  5727. err,
  5728. instance,
  5729. 1
  5730. /* ErrorCodes.RENDER_FUNCTION */
  5731. );
  5732. result = false;
  5733. }
  5734. setRef$1(instance);
  5735. setCurrentRenderingInstance(prev);
  5736. return result;
  5737. }
  5738. function fallthroughAttrs(inheritAttrs, props2, propsOptions, fallthroughAttrs2) {
  5739. if (props2 && fallthroughAttrs2 && inheritAttrs !== false) {
  5740. const keys = Object.keys(fallthroughAttrs2).filter((key) => key !== "class" && key !== "style");
  5741. if (!keys.length) {
  5742. return;
  5743. }
  5744. if (propsOptions && keys.some(isModelListener)) {
  5745. keys.forEach((key) => {
  5746. if (!isModelListener(key) || !(key.slice(9) in propsOptions)) {
  5747. props2[key] = fallthroughAttrs2[key];
  5748. }
  5749. });
  5750. } else {
  5751. keys.forEach((key) => props2[key] = fallthroughAttrs2[key]);
  5752. }
  5753. }
  5754. }
  5755. const updateComponentPreRender = (instance) => {
  5756. pauseTracking();
  5757. flushPreFlushCbs();
  5758. resetTracking();
  5759. };
  5760. function componentUpdateScopedSlotsFn() {
  5761. const scopedSlotsData = this.$scopedSlotsData;
  5762. if (!scopedSlotsData || scopedSlotsData.length === 0) {
  5763. return;
  5764. }
  5765. const mpInstance = this.ctx.$scope;
  5766. const oldData = mpInstance.data;
  5767. const diffData = /* @__PURE__ */ Object.create(null);
  5768. scopedSlotsData.forEach(({ path, index: index2, data }) => {
  5769. const oldScopedSlotData = getValueByDataPath(oldData, path);
  5770. const diffPath = isString(index2) ? `${path}.${index2}` : `${path}[${index2}]`;
  5771. if (typeof oldScopedSlotData === "undefined" || typeof oldScopedSlotData[index2] === "undefined") {
  5772. diffData[diffPath] = data;
  5773. } else {
  5774. const diffScopedSlotData = diff(data, oldScopedSlotData[index2]);
  5775. Object.keys(diffScopedSlotData).forEach((name) => {
  5776. diffData[diffPath + "." + name] = diffScopedSlotData[name];
  5777. });
  5778. }
  5779. });
  5780. scopedSlotsData.length = 0;
  5781. if (Object.keys(diffData).length) {
  5782. mpInstance.setData(diffData);
  5783. }
  5784. }
  5785. function toggleRecurse({ effect, update: update3 }, allowed) {
  5786. effect.allowRecurse = update3.allowRecurse = allowed;
  5787. }
  5788. function setupRenderEffect(instance) {
  5789. const updateScopedSlots = componentUpdateScopedSlotsFn.bind(instance);
  5790. instance.$updateScopedSlots = () => nextTick$1(() => queueJob(updateScopedSlots));
  5791. const componentUpdateFn = () => {
  5792. if (!instance.isMounted) {
  5793. onBeforeUnmount(() => {
  5794. setRef$1(instance, true);
  5795. }, instance);
  5796. {
  5797. startMeasure(instance, `patch`);
  5798. }
  5799. patch(instance, renderComponentRoot(instance));
  5800. {
  5801. endMeasure(instance, `patch`);
  5802. }
  5803. {
  5804. devtoolsComponentAdded(instance);
  5805. }
  5806. } else {
  5807. const { next, bu, u: u2 } = instance;
  5808. {
  5809. pushWarningContext(next || instance.vnode);
  5810. }
  5811. toggleRecurse(instance, false);
  5812. updateComponentPreRender();
  5813. if (bu) {
  5814. invokeArrayFns$1(bu);
  5815. }
  5816. toggleRecurse(instance, true);
  5817. {
  5818. startMeasure(instance, `patch`);
  5819. }
  5820. patch(instance, renderComponentRoot(instance));
  5821. {
  5822. endMeasure(instance, `patch`);
  5823. }
  5824. if (u2) {
  5825. queuePostRenderEffect(u2);
  5826. }
  5827. {
  5828. devtoolsComponentUpdated(instance);
  5829. }
  5830. {
  5831. popWarningContext();
  5832. }
  5833. }
  5834. };
  5835. const effect = instance.effect = new ReactiveEffect(
  5836. componentUpdateFn,
  5837. () => queueJob(instance.update),
  5838. instance.scope
  5839. // track it in component's effect scope
  5840. );
  5841. const update3 = instance.update = effect.run.bind(effect);
  5842. update3.id = instance.uid;
  5843. toggleRecurse(instance, true);
  5844. {
  5845. effect.onTrack = instance.rtc ? (e2) => invokeArrayFns$1(instance.rtc, e2) : void 0;
  5846. effect.onTrigger = instance.rtg ? (e2) => invokeArrayFns$1(instance.rtg, e2) : void 0;
  5847. update3.ownerInstance = instance;
  5848. }
  5849. update3();
  5850. }
  5851. function unmountComponent(instance) {
  5852. const { bum, scope, update: update3, um } = instance;
  5853. if (bum) {
  5854. invokeArrayFns$1(bum);
  5855. }
  5856. scope.stop();
  5857. if (update3) {
  5858. update3.active = false;
  5859. }
  5860. if (um) {
  5861. queuePostRenderEffect(um);
  5862. }
  5863. queuePostRenderEffect(() => {
  5864. instance.isUnmounted = true;
  5865. });
  5866. {
  5867. devtoolsComponentRemoved(instance);
  5868. }
  5869. }
  5870. const oldCreateApp = createAppAPI();
  5871. function getTarget() {
  5872. if (typeof window !== "undefined") {
  5873. return window;
  5874. }
  5875. if (typeof globalThis !== "undefined") {
  5876. return globalThis;
  5877. }
  5878. if (typeof global !== "undefined") {
  5879. return global;
  5880. }
  5881. if (typeof my !== "undefined") {
  5882. return my;
  5883. }
  5884. }
  5885. function createVueApp(rootComponent, rootProps = null) {
  5886. const target = getTarget();
  5887. target.__VUE__ = true;
  5888. {
  5889. setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
  5890. }
  5891. const app = oldCreateApp(rootComponent, rootProps);
  5892. const appContext = app._context;
  5893. initAppConfig(appContext.config);
  5894. const createVNode = (initialVNode) => {
  5895. initialVNode.appContext = appContext;
  5896. initialVNode.shapeFlag = 6;
  5897. return initialVNode;
  5898. };
  5899. const createComponent2 = function createComponent3(initialVNode, options) {
  5900. return mountComponent(createVNode(initialVNode), options);
  5901. };
  5902. const destroyComponent = function destroyComponent2(component) {
  5903. return component && unmountComponent(component.$);
  5904. };
  5905. app.mount = function mount() {
  5906. rootComponent.render = NOOP;
  5907. const instance = mountComponent(createVNode({ type: rootComponent }), {
  5908. mpType: MPType.APP,
  5909. mpInstance: null,
  5910. parentComponent: null,
  5911. slots: [],
  5912. props: null
  5913. });
  5914. app._instance = instance.$;
  5915. {
  5916. devtoolsInitApp(app, version$1);
  5917. }
  5918. instance.$app = app;
  5919. instance.$createComponent = createComponent2;
  5920. instance.$destroyComponent = destroyComponent;
  5921. appContext.$appInstance = instance;
  5922. return instance;
  5923. };
  5924. app.unmount = function unmount() {
  5925. warn(`Cannot unmount an app.`);
  5926. };
  5927. return app;
  5928. }
  5929. function useCssVars(getter) {
  5930. const instance = getCurrentInstance();
  5931. if (!instance) {
  5932. warn(`useCssVars is called without current active component instance.`);
  5933. return;
  5934. }
  5935. initCssVarsRender(instance, getter);
  5936. }
  5937. function initCssVarsRender(instance, getter) {
  5938. instance.ctx.__cssVars = () => {
  5939. const vars = getter(instance.proxy);
  5940. const cssVars = {};
  5941. for (const key in vars) {
  5942. cssVars[`--${key}`] = vars[key];
  5943. }
  5944. return cssVars;
  5945. };
  5946. }
  5947. function injectLifecycleHook(name, hook, publicThis, instance) {
  5948. if (isFunction(hook)) {
  5949. injectHook(name, hook.bind(publicThis), instance);
  5950. }
  5951. }
  5952. function initHooks$1(options, instance, publicThis) {
  5953. const mpType = options.mpType || publicThis.$mpType;
  5954. if (!mpType || mpType === "component") {
  5955. return;
  5956. }
  5957. Object.keys(options).forEach((name) => {
  5958. if (isUniLifecycleHook(name, options[name], false)) {
  5959. const hooks = options[name];
  5960. if (isArray$1(hooks)) {
  5961. hooks.forEach((hook) => injectLifecycleHook(name, hook, publicThis, instance));
  5962. } else {
  5963. injectLifecycleHook(name, hooks, publicThis, instance);
  5964. }
  5965. }
  5966. });
  5967. }
  5968. function applyOptions$2(options, instance, publicThis) {
  5969. initHooks$1(options, instance, publicThis);
  5970. }
  5971. function set(target, key, val) {
  5972. return target[key] = val;
  5973. }
  5974. function createErrorHandler(app) {
  5975. return function errorHandler(err, instance, _info) {
  5976. if (!instance) {
  5977. throw err;
  5978. }
  5979. const appInstance = app._instance;
  5980. if (!appInstance || !appInstance.proxy) {
  5981. throw err;
  5982. }
  5983. {
  5984. appInstance.proxy.$callHook(ON_ERROR, err);
  5985. }
  5986. };
  5987. }
  5988. function mergeAsArray(to, from) {
  5989. return to ? [...new Set([].concat(to, from))] : from;
  5990. }
  5991. function initOptionMergeStrategies(optionMergeStrategies) {
  5992. UniLifecycleHooks.forEach((name) => {
  5993. optionMergeStrategies[name] = mergeAsArray;
  5994. });
  5995. }
  5996. let realAtob;
  5997. const b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
  5998. const b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  5999. if (typeof atob !== "function") {
  6000. realAtob = function(str) {
  6001. str = String(str).replace(/[\t\n\f\r ]+/g, "");
  6002. if (!b64re.test(str)) {
  6003. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  6004. }
  6005. str += "==".slice(2 - (str.length & 3));
  6006. var bitmap;
  6007. var result = "";
  6008. var r1;
  6009. var r2;
  6010. var i2 = 0;
  6011. for (; i2 < str.length; ) {
  6012. bitmap = b64.indexOf(str.charAt(i2++)) << 18 | b64.indexOf(str.charAt(i2++)) << 12 | (r1 = b64.indexOf(str.charAt(i2++))) << 6 | (r2 = b64.indexOf(str.charAt(i2++)));
  6013. 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);
  6014. }
  6015. return result;
  6016. };
  6017. } else {
  6018. realAtob = atob;
  6019. }
  6020. function b64DecodeUnicode(str) {
  6021. return decodeURIComponent(realAtob(str).split("").map(function(c2) {
  6022. return "%" + ("00" + c2.charCodeAt(0).toString(16)).slice(-2);
  6023. }).join(""));
  6024. }
  6025. function getCurrentUserInfo() {
  6026. const token = index$1.getStorageSync("uni_id_token") || "";
  6027. const tokenArr = token.split(".");
  6028. if (!token || tokenArr.length !== 3) {
  6029. return {
  6030. uid: null,
  6031. role: [],
  6032. permission: [],
  6033. tokenExpired: 0
  6034. };
  6035. }
  6036. let userInfo;
  6037. try {
  6038. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  6039. } catch (error2) {
  6040. throw new Error("获取当前用户信息出错,详细错误信息为:" + error2.message);
  6041. }
  6042. userInfo.tokenExpired = userInfo.exp * 1e3;
  6043. delete userInfo.exp;
  6044. delete userInfo.iat;
  6045. return userInfo;
  6046. }
  6047. function uniIdMixin(globalProperties) {
  6048. globalProperties.uniIDHasRole = function(roleId) {
  6049. const { role } = getCurrentUserInfo();
  6050. return role.indexOf(roleId) > -1;
  6051. };
  6052. globalProperties.uniIDHasPermission = function(permissionId) {
  6053. const { permission } = getCurrentUserInfo();
  6054. return this.uniIDHasRole("admin") || permission.indexOf(permissionId) > -1;
  6055. };
  6056. globalProperties.uniIDTokenValid = function() {
  6057. const { tokenExpired } = getCurrentUserInfo();
  6058. return tokenExpired > Date.now();
  6059. };
  6060. }
  6061. function initApp(app) {
  6062. const appConfig = app._context.config;
  6063. appConfig.errorHandler = invokeCreateErrorHandler(app, createErrorHandler);
  6064. initOptionMergeStrategies(appConfig.optionMergeStrategies);
  6065. const globalProperties = appConfig.globalProperties;
  6066. {
  6067. uniIdMixin(globalProperties);
  6068. }
  6069. {
  6070. globalProperties.$set = set;
  6071. globalProperties.$applyOptions = applyOptions$2;
  6072. }
  6073. {
  6074. index$1.invokeCreateVueAppHook(app);
  6075. }
  6076. }
  6077. const propsCaches = /* @__PURE__ */ Object.create(null);
  6078. function renderProps(props2) {
  6079. const { uid: uid2, __counter } = getCurrentInstance();
  6080. const propsId = (propsCaches[uid2] || (propsCaches[uid2] = [])).push(guardReactiveProps(props2)) - 1;
  6081. return uid2 + "," + propsId + "," + __counter;
  6082. }
  6083. function pruneComponentPropsCache(uid2) {
  6084. delete propsCaches[uid2];
  6085. }
  6086. function findComponentPropsData(up) {
  6087. if (!up) {
  6088. return;
  6089. }
  6090. const [uid2, propsId] = up.split(",");
  6091. if (!propsCaches[uid2]) {
  6092. return;
  6093. }
  6094. return propsCaches[uid2][parseInt(propsId)];
  6095. }
  6096. var plugin = {
  6097. install(app) {
  6098. initApp(app);
  6099. app.config.globalProperties.pruneComponentPropsCache = pruneComponentPropsCache;
  6100. const oldMount = app.mount;
  6101. app.mount = function mount(rootContainer) {
  6102. const instance = oldMount.call(app, rootContainer);
  6103. const createApp2 = getCreateApp();
  6104. if (createApp2) {
  6105. createApp2(instance);
  6106. } else {
  6107. if (typeof createMiniProgramApp !== "undefined") {
  6108. createMiniProgramApp(instance);
  6109. }
  6110. }
  6111. return instance;
  6112. };
  6113. }
  6114. };
  6115. function getCreateApp() {
  6116. const method = "createApp";
  6117. if (typeof global !== "undefined") {
  6118. return global[method];
  6119. } else if (typeof my !== "undefined") {
  6120. return my[method];
  6121. }
  6122. }
  6123. function vOn(value2, key) {
  6124. const instance = getCurrentInstance();
  6125. const ctx = instance.ctx;
  6126. const extraKey = typeof key !== "undefined" && (ctx.$mpPlatform === "mp-weixin" || ctx.$mpPlatform === "mp-qq") && (isString(key) || typeof key === "number") ? "_" + key : "";
  6127. const name = "e" + instance.$ei++ + extraKey;
  6128. const mpInstance = ctx.$scope;
  6129. if (!value2) {
  6130. delete mpInstance[name];
  6131. return name;
  6132. }
  6133. const existingInvoker = mpInstance[name];
  6134. if (existingInvoker) {
  6135. existingInvoker.value = value2;
  6136. } else {
  6137. mpInstance[name] = createInvoker(value2, instance);
  6138. }
  6139. return name;
  6140. }
  6141. function createInvoker(initialValue, instance) {
  6142. const invoker = (e2) => {
  6143. patchMPEvent(e2);
  6144. let args = [e2];
  6145. if (e2.detail && e2.detail.__args__) {
  6146. args = e2.detail.__args__;
  6147. }
  6148. const eventValue = invoker.value;
  6149. const invoke = () => callWithAsyncErrorHandling(patchStopImmediatePropagation(e2, eventValue), instance, 5, args);
  6150. const eventTarget = e2.target;
  6151. const eventSync = eventTarget ? eventTarget.dataset ? eventTarget.dataset.eventsync === "true" : false : false;
  6152. if (bubbles.includes(e2.type) && !eventSync) {
  6153. setTimeout(invoke);
  6154. } else {
  6155. const res = invoke();
  6156. if (e2.type === "input" && (isArray$1(res) || isPromise$1(res))) {
  6157. return;
  6158. }
  6159. return res;
  6160. }
  6161. };
  6162. invoker.value = initialValue;
  6163. return invoker;
  6164. }
  6165. const bubbles = [
  6166. // touch事件暂不做延迟,否则在 Android 上会影响性能,比如一些拖拽跟手手势等
  6167. // 'touchstart',
  6168. // 'touchmove',
  6169. // 'touchcancel',
  6170. // 'touchend',
  6171. "tap",
  6172. "longpress",
  6173. "longtap",
  6174. "transitionend",
  6175. "animationstart",
  6176. "animationiteration",
  6177. "animationend",
  6178. "touchforcechange"
  6179. ];
  6180. function patchMPEvent(event) {
  6181. if (event.type && event.target) {
  6182. event.preventDefault = NOOP;
  6183. event.stopPropagation = NOOP;
  6184. event.stopImmediatePropagation = NOOP;
  6185. if (!hasOwn$1(event, "detail")) {
  6186. event.detail = {};
  6187. }
  6188. if (hasOwn$1(event, "markerId")) {
  6189. event.detail = typeof event.detail === "object" ? event.detail : {};
  6190. event.detail.markerId = event.markerId;
  6191. }
  6192. if (isPlainObject$1(event.detail) && hasOwn$1(event.detail, "checked") && !hasOwn$1(event.detail, "value")) {
  6193. event.detail.value = event.detail.checked;
  6194. }
  6195. if (isPlainObject$1(event.detail)) {
  6196. event.target = extend({}, event.target, event.detail);
  6197. }
  6198. }
  6199. }
  6200. function patchStopImmediatePropagation(e2, value2) {
  6201. if (isArray$1(value2)) {
  6202. const originalStop = e2.stopImmediatePropagation;
  6203. e2.stopImmediatePropagation = () => {
  6204. originalStop && originalStop.call(e2);
  6205. e2._stopped = true;
  6206. };
  6207. return value2.map((fn) => (e3) => !e3._stopped && fn(e3));
  6208. } else {
  6209. return value2;
  6210. }
  6211. }
  6212. function vFor(source, renderItem) {
  6213. let ret;
  6214. if (isArray$1(source) || isString(source)) {
  6215. ret = new Array(source.length);
  6216. for (let i2 = 0, l2 = source.length; i2 < l2; i2++) {
  6217. ret[i2] = renderItem(source[i2], i2, i2);
  6218. }
  6219. } else if (typeof source === "number") {
  6220. if (!Number.isInteger(source)) {
  6221. warn(`The v-for range expect an integer value but got ${source}.`);
  6222. return [];
  6223. }
  6224. ret = new Array(source);
  6225. for (let i2 = 0; i2 < source; i2++) {
  6226. ret[i2] = renderItem(i2 + 1, i2, i2);
  6227. }
  6228. } else if (isObject$3(source)) {
  6229. if (source[Symbol.iterator]) {
  6230. ret = Array.from(source, (item, i2) => renderItem(item, i2, i2));
  6231. } else {
  6232. const keys = Object.keys(source);
  6233. ret = new Array(keys.length);
  6234. for (let i2 = 0, l2 = keys.length; i2 < l2; i2++) {
  6235. const key = keys[i2];
  6236. ret[i2] = renderItem(source[key], key, i2);
  6237. }
  6238. }
  6239. } else {
  6240. ret = [];
  6241. }
  6242. return ret;
  6243. }
  6244. function renderSlot(name, props2 = {}, key) {
  6245. const instance = getCurrentInstance();
  6246. const { parent, isMounted, ctx: { $scope } } = instance;
  6247. const vueIds = ($scope.properties || $scope.props).uI;
  6248. if (!vueIds) {
  6249. return;
  6250. }
  6251. if (!parent && !isMounted) {
  6252. onMounted(() => {
  6253. renderSlot(name, props2, key);
  6254. }, instance);
  6255. return;
  6256. }
  6257. const invoker = findScopedSlotInvoker(vueIds, instance);
  6258. if (invoker) {
  6259. invoker(name, props2, key);
  6260. }
  6261. }
  6262. function findScopedSlotInvoker(vueId, instance) {
  6263. let parent = instance.parent;
  6264. while (parent) {
  6265. const invokers = parent.$ssi;
  6266. if (invokers && invokers[vueId]) {
  6267. return invokers[vueId];
  6268. }
  6269. parent = parent.parent;
  6270. }
  6271. }
  6272. function stringifyStyle(value2) {
  6273. if (isString(value2)) {
  6274. return value2;
  6275. }
  6276. return stringify(normalizeStyle(value2));
  6277. }
  6278. function stringify(styles) {
  6279. let ret = "";
  6280. if (!styles || isString(styles)) {
  6281. return ret;
  6282. }
  6283. for (const key in styles) {
  6284. ret += `${key.startsWith(`--`) ? key : hyphenate(key)}:${styles[key]};`;
  6285. }
  6286. return ret;
  6287. }
  6288. function setRef(ref2, id, opts = {}) {
  6289. const { $templateRefs } = getCurrentInstance();
  6290. $templateRefs.push({ i: id, r: ref2, k: opts.k, f: opts.f });
  6291. }
  6292. const o$1 = (value2, key) => vOn(value2, key);
  6293. const f$1 = (source, renderItem) => vFor(source, renderItem);
  6294. const r$1 = (name, props2, key) => renderSlot(name, props2, key);
  6295. const s$1 = (value2) => stringifyStyle(value2);
  6296. const e = (target, ...sources) => extend(target, ...sources);
  6297. const n$1 = (value2) => normalizeClass(value2);
  6298. const t$1 = (val) => toDisplayString(val);
  6299. const p$1 = (props2) => renderProps(props2);
  6300. const sr = (ref2, id, opts) => setRef(ref2, id, opts);
  6301. function createApp$1(rootComponent, rootProps = null) {
  6302. rootComponent && (rootComponent.mpType = "app");
  6303. return createVueApp(rootComponent, rootProps).use(plugin);
  6304. }
  6305. const createSSRApp = createApp$1;
  6306. const MP_METHODS = [
  6307. "createSelectorQuery",
  6308. "createIntersectionObserver",
  6309. "selectAllComponents",
  6310. "selectComponent"
  6311. ];
  6312. function createEmitFn(oldEmit, ctx) {
  6313. return function emit2(event, ...args) {
  6314. const scope = ctx.$scope;
  6315. if (scope && event) {
  6316. const detail = { __args__: args };
  6317. {
  6318. scope.triggerEvent(event, detail);
  6319. }
  6320. }
  6321. return oldEmit.apply(this, [event, ...args]);
  6322. };
  6323. }
  6324. function initBaseInstance(instance, options) {
  6325. const ctx = instance.ctx;
  6326. ctx.mpType = options.mpType;
  6327. ctx.$mpType = options.mpType;
  6328. ctx.$mpPlatform = "mp-weixin";
  6329. ctx.$scope = options.mpInstance;
  6330. ctx.$mp = {};
  6331. {
  6332. ctx._self = {};
  6333. }
  6334. instance.slots = {};
  6335. if (isArray$1(options.slots) && options.slots.length) {
  6336. options.slots.forEach((name) => {
  6337. instance.slots[name] = true;
  6338. });
  6339. if (instance.slots[SLOT_DEFAULT_NAME]) {
  6340. instance.slots.default = true;
  6341. }
  6342. }
  6343. ctx.getOpenerEventChannel = function() {
  6344. {
  6345. return options.mpInstance.getOpenerEventChannel();
  6346. }
  6347. };
  6348. ctx.$hasHook = hasHook;
  6349. ctx.$callHook = callHook;
  6350. instance.emit = createEmitFn(instance.emit, ctx);
  6351. }
  6352. function initComponentInstance(instance, options) {
  6353. initBaseInstance(instance, options);
  6354. const ctx = instance.ctx;
  6355. MP_METHODS.forEach((method) => {
  6356. ctx[method] = function(...args) {
  6357. const mpInstance = ctx.$scope;
  6358. if (mpInstance && mpInstance[method]) {
  6359. return mpInstance[method].apply(mpInstance, args);
  6360. }
  6361. };
  6362. });
  6363. }
  6364. function initMocks(instance, mpInstance, mocks2) {
  6365. const ctx = instance.ctx;
  6366. mocks2.forEach((mock) => {
  6367. if (hasOwn$1(mpInstance, mock)) {
  6368. instance[mock] = ctx[mock] = mpInstance[mock];
  6369. }
  6370. });
  6371. }
  6372. function hasHook(name) {
  6373. const hooks = this.$[name];
  6374. if (hooks && hooks.length) {
  6375. return true;
  6376. }
  6377. return false;
  6378. }
  6379. function callHook(name, args) {
  6380. if (name === "mounted") {
  6381. callHook.call(this, "bm");
  6382. this.$.isMounted = true;
  6383. name = "m";
  6384. }
  6385. const hooks = this.$[name];
  6386. return hooks && invokeArrayFns(hooks, args);
  6387. }
  6388. const PAGE_INIT_HOOKS = [
  6389. ON_LOAD,
  6390. ON_SHOW,
  6391. ON_HIDE,
  6392. ON_UNLOAD,
  6393. ON_RESIZE,
  6394. ON_TAB_ITEM_TAP,
  6395. ON_REACH_BOTTOM,
  6396. ON_PULL_DOWN_REFRESH,
  6397. ON_ADD_TO_FAVORITES
  6398. // 'onReady', // lifetimes.ready
  6399. // 'onPageScroll', // 影响性能,开发者手动注册
  6400. // 'onShareTimeline', // 右上角菜单,开发者手动注册
  6401. // 'onShareAppMessage' // 右上角菜单,开发者手动注册
  6402. ];
  6403. function findHooks(vueOptions, hooks = /* @__PURE__ */ new Set()) {
  6404. if (vueOptions) {
  6405. Object.keys(vueOptions).forEach((name) => {
  6406. if (isUniLifecycleHook(name, vueOptions[name])) {
  6407. hooks.add(name);
  6408. }
  6409. });
  6410. {
  6411. const { extends: extendsOptions, mixins } = vueOptions;
  6412. if (mixins) {
  6413. mixins.forEach((mixin2) => findHooks(mixin2, hooks));
  6414. }
  6415. if (extendsOptions) {
  6416. findHooks(extendsOptions, hooks);
  6417. }
  6418. }
  6419. }
  6420. return hooks;
  6421. }
  6422. function initHook(mpOptions, hook, excludes) {
  6423. if (excludes.indexOf(hook) === -1 && !hasOwn$1(mpOptions, hook)) {
  6424. mpOptions[hook] = function(args) {
  6425. return this.$vm && this.$vm.$callHook(hook, args);
  6426. };
  6427. }
  6428. }
  6429. const EXCLUDE_HOOKS = [ON_READY];
  6430. function initHooks(mpOptions, hooks, excludes = EXCLUDE_HOOKS) {
  6431. hooks.forEach((hook) => initHook(mpOptions, hook, excludes));
  6432. }
  6433. function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
  6434. findHooks(vueOptions).forEach((hook) => initHook(mpOptions, hook, excludes));
  6435. }
  6436. function initRuntimeHooks(mpOptions, runtimeHooks) {
  6437. if (!runtimeHooks) {
  6438. return;
  6439. }
  6440. const hooks = Object.keys(MINI_PROGRAM_PAGE_RUNTIME_HOOKS);
  6441. hooks.forEach((hook) => {
  6442. if (runtimeHooks & MINI_PROGRAM_PAGE_RUNTIME_HOOKS[hook]) {
  6443. initHook(mpOptions, hook, []);
  6444. }
  6445. });
  6446. }
  6447. const findMixinRuntimeHooks = /* @__PURE__ */ once(() => {
  6448. const runtimeHooks = [];
  6449. const app = isFunction(getApp) && getApp({ allowDefault: true });
  6450. if (app && app.$vm && app.$vm.$) {
  6451. const mixins = app.$vm.$.appContext.mixins;
  6452. if (isArray$1(mixins)) {
  6453. const hooks = Object.keys(MINI_PROGRAM_PAGE_RUNTIME_HOOKS);
  6454. mixins.forEach((mixin2) => {
  6455. hooks.forEach((hook) => {
  6456. if (hasOwn$1(mixin2, hook) && !runtimeHooks.includes(hook)) {
  6457. runtimeHooks.push(hook);
  6458. }
  6459. });
  6460. });
  6461. }
  6462. }
  6463. return runtimeHooks;
  6464. });
  6465. function initMixinRuntimeHooks(mpOptions) {
  6466. initHooks(mpOptions, findMixinRuntimeHooks());
  6467. }
  6468. const HOOKS = [
  6469. ON_SHOW,
  6470. ON_HIDE,
  6471. ON_ERROR,
  6472. ON_THEME_CHANGE,
  6473. ON_PAGE_NOT_FOUND,
  6474. ON_UNHANDLE_REJECTION
  6475. ];
  6476. function parseApp(instance, parseAppOptions) {
  6477. const internalInstance = instance.$;
  6478. const appOptions = {
  6479. globalData: instance.$options && instance.$options.globalData || {},
  6480. $vm: instance,
  6481. onLaunch(options) {
  6482. this.$vm = instance;
  6483. const ctx = internalInstance.ctx;
  6484. if (this.$vm && ctx.$scope) {
  6485. return;
  6486. }
  6487. initBaseInstance(internalInstance, {
  6488. mpType: "app",
  6489. mpInstance: this,
  6490. slots: []
  6491. });
  6492. ctx.globalData = this.globalData;
  6493. instance.$callHook(ON_LAUNCH, options);
  6494. }
  6495. };
  6496. initLocale(instance);
  6497. const vueOptions = instance.$.type;
  6498. initHooks(appOptions, HOOKS);
  6499. initUnknownHooks(appOptions, vueOptions);
  6500. {
  6501. const methods = vueOptions.methods;
  6502. methods && extend(appOptions, methods);
  6503. }
  6504. if (parseAppOptions) {
  6505. parseAppOptions.parse(appOptions);
  6506. }
  6507. return appOptions;
  6508. }
  6509. function initCreateApp(parseAppOptions) {
  6510. return function createApp2(vm) {
  6511. return App(parseApp(vm, parseAppOptions));
  6512. };
  6513. }
  6514. function initCreateSubpackageApp(parseAppOptions) {
  6515. return function createApp2(vm) {
  6516. const appOptions = parseApp(vm, parseAppOptions);
  6517. const app = isFunction(getApp) && getApp({
  6518. allowDefault: true
  6519. });
  6520. if (!app)
  6521. return;
  6522. vm.$.ctx.$scope = app;
  6523. const globalData = app.globalData;
  6524. if (globalData) {
  6525. Object.keys(appOptions.globalData).forEach((name) => {
  6526. if (!hasOwn$1(globalData, name)) {
  6527. globalData[name] = appOptions.globalData[name];
  6528. }
  6529. });
  6530. }
  6531. Object.keys(appOptions).forEach((name) => {
  6532. if (!hasOwn$1(app, name)) {
  6533. app[name] = appOptions[name];
  6534. }
  6535. });
  6536. initAppLifecycle(appOptions, vm);
  6537. };
  6538. }
  6539. function initAppLifecycle(appOptions, vm) {
  6540. if (isFunction(appOptions.onLaunch)) {
  6541. const args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  6542. appOptions.onLaunch(args);
  6543. }
  6544. if (isFunction(appOptions.onShow) && wx.onAppShow) {
  6545. wx.onAppShow((args) => {
  6546. vm.$callHook("onShow", args);
  6547. });
  6548. }
  6549. if (isFunction(appOptions.onHide) && wx.onAppHide) {
  6550. wx.onAppHide((args) => {
  6551. vm.$callHook("onHide", args);
  6552. });
  6553. }
  6554. }
  6555. function initLocale(appVm) {
  6556. const locale = ref(normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  6557. Object.defineProperty(appVm, "$locale", {
  6558. get() {
  6559. return locale.value;
  6560. },
  6561. set(v2) {
  6562. locale.value = v2;
  6563. }
  6564. });
  6565. }
  6566. function initVueIds(vueIds, mpInstance) {
  6567. if (!vueIds) {
  6568. return;
  6569. }
  6570. const ids = vueIds.split(",");
  6571. const len = ids.length;
  6572. if (len === 1) {
  6573. mpInstance._$vueId = ids[0];
  6574. } else if (len === 2) {
  6575. mpInstance._$vueId = ids[0];
  6576. mpInstance._$vuePid = ids[1];
  6577. }
  6578. }
  6579. const EXTRAS = ["externalClasses"];
  6580. function initExtraOptions(miniProgramComponentOptions, vueOptions) {
  6581. EXTRAS.forEach((name) => {
  6582. if (hasOwn$1(vueOptions, name)) {
  6583. miniProgramComponentOptions[name] = vueOptions[name];
  6584. }
  6585. });
  6586. }
  6587. const WORKLET_RE = /_(.*)_worklet_factory_/;
  6588. function initWorkletMethods(mpMethods, vueMethods) {
  6589. if (vueMethods) {
  6590. Object.keys(vueMethods).forEach((name) => {
  6591. const matches = name.match(WORKLET_RE);
  6592. if (matches) {
  6593. const workletName = matches[1];
  6594. mpMethods[name] = vueMethods[name];
  6595. mpMethods[workletName] = vueMethods[workletName];
  6596. }
  6597. });
  6598. }
  6599. }
  6600. function initWxsCallMethods(methods, wxsCallMethods) {
  6601. if (!isArray$1(wxsCallMethods)) {
  6602. return;
  6603. }
  6604. wxsCallMethods.forEach((callMethod) => {
  6605. methods[callMethod] = function(args) {
  6606. return this.$vm[callMethod](args);
  6607. };
  6608. });
  6609. }
  6610. function selectAllComponents(mpInstance, selector, $refs) {
  6611. const components = mpInstance.selectAllComponents(selector);
  6612. components.forEach((component) => {
  6613. const ref2 = component.properties.uR;
  6614. $refs[ref2] = component.$vm || component;
  6615. });
  6616. }
  6617. function initRefs(instance, mpInstance) {
  6618. Object.defineProperty(instance, "refs", {
  6619. get() {
  6620. const $refs = {};
  6621. selectAllComponents(mpInstance, ".r", $refs);
  6622. const forComponents = mpInstance.selectAllComponents(".r-i-f");
  6623. forComponents.forEach((component) => {
  6624. const ref2 = component.properties.uR;
  6625. if (!ref2) {
  6626. return;
  6627. }
  6628. if (!$refs[ref2]) {
  6629. $refs[ref2] = [];
  6630. }
  6631. $refs[ref2].push(component.$vm || component);
  6632. });
  6633. return $refs;
  6634. }
  6635. });
  6636. }
  6637. function findVmByVueId(instance, vuePid) {
  6638. const $children = instance.$children;
  6639. for (let i2 = $children.length - 1; i2 >= 0; i2--) {
  6640. const childVm = $children[i2];
  6641. if (childVm.$scope._$vueId === vuePid) {
  6642. return childVm;
  6643. }
  6644. }
  6645. let parentVm;
  6646. for (let i2 = $children.length - 1; i2 >= 0; i2--) {
  6647. parentVm = findVmByVueId($children[i2], vuePid);
  6648. if (parentVm) {
  6649. return parentVm;
  6650. }
  6651. }
  6652. }
  6653. const builtInProps = [
  6654. // 百度小程序,快手小程序自定义组件不支持绑定动态事件,动态dataset,故通过props传递事件信息
  6655. // event-opts
  6656. "eO",
  6657. // 组件 ref
  6658. "uR",
  6659. // 组件 ref-in-for
  6660. "uRIF",
  6661. // 组件 id
  6662. "uI",
  6663. // 组件类型 m: 小程序组件
  6664. "uT",
  6665. // 组件 props
  6666. "uP",
  6667. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  6668. "uS"
  6669. ];
  6670. function initDefaultProps(options, isBehavior = false) {
  6671. const properties = {};
  6672. if (!isBehavior) {
  6673. builtInProps.forEach((name) => {
  6674. properties[name] = {
  6675. type: null,
  6676. value: ""
  6677. };
  6678. });
  6679. properties.uS = {
  6680. type: null,
  6681. value: [],
  6682. observer: function(newVal) {
  6683. const $slots = /* @__PURE__ */ Object.create(null);
  6684. newVal && newVal.forEach((slotName) => {
  6685. $slots[slotName] = true;
  6686. });
  6687. this.setData({
  6688. $slots
  6689. });
  6690. }
  6691. };
  6692. }
  6693. if (options.behaviors) {
  6694. if (options.behaviors.includes("wx://form-field")) {
  6695. properties.name = {
  6696. type: null,
  6697. value: ""
  6698. };
  6699. properties.value = {
  6700. type: null,
  6701. value: ""
  6702. };
  6703. }
  6704. }
  6705. return properties;
  6706. }
  6707. function initVirtualHostProps(options) {
  6708. const properties = {};
  6709. {
  6710. if (options && options.virtualHost) {
  6711. properties.virtualHostStyle = {
  6712. type: null,
  6713. value: ""
  6714. };
  6715. properties.virtualHostClass = {
  6716. type: null,
  6717. value: ""
  6718. };
  6719. }
  6720. }
  6721. return properties;
  6722. }
  6723. function initProps(mpComponentOptions) {
  6724. if (!mpComponentOptions.properties) {
  6725. mpComponentOptions.properties = {};
  6726. }
  6727. extend(mpComponentOptions.properties, initDefaultProps(mpComponentOptions), initVirtualHostProps(mpComponentOptions.options));
  6728. }
  6729. const PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  6730. function parsePropType(type, defaultValue) {
  6731. if (isArray$1(type) && type.length === 1) {
  6732. return type[0];
  6733. }
  6734. return type;
  6735. }
  6736. function normalizePropType(type, defaultValue) {
  6737. const res = parsePropType(type);
  6738. return PROP_TYPES.indexOf(res) !== -1 ? res : null;
  6739. }
  6740. function initPageProps({ properties }, rawProps) {
  6741. if (isArray$1(rawProps)) {
  6742. rawProps.forEach((key) => {
  6743. properties[key] = {
  6744. type: String,
  6745. value: ""
  6746. };
  6747. });
  6748. } else if (isPlainObject$1(rawProps)) {
  6749. Object.keys(rawProps).forEach((key) => {
  6750. const opts = rawProps[key];
  6751. if (isPlainObject$1(opts)) {
  6752. let value2 = opts.default;
  6753. if (isFunction(value2)) {
  6754. value2 = value2();
  6755. }
  6756. const type = opts.type;
  6757. opts.type = normalizePropType(type);
  6758. properties[key] = {
  6759. type: opts.type,
  6760. value: value2
  6761. };
  6762. } else {
  6763. properties[key] = {
  6764. type: normalizePropType(opts)
  6765. };
  6766. }
  6767. });
  6768. }
  6769. }
  6770. function findPropsData(properties, isPage2) {
  6771. return (isPage2 ? findPagePropsData(properties) : findComponentPropsData(properties.uP)) || {};
  6772. }
  6773. function findPagePropsData(properties) {
  6774. const propsData = {};
  6775. if (isPlainObject$1(properties)) {
  6776. Object.keys(properties).forEach((name) => {
  6777. if (builtInProps.indexOf(name) === -1) {
  6778. propsData[name] = properties[name];
  6779. }
  6780. });
  6781. }
  6782. return propsData;
  6783. }
  6784. function initFormField(vm) {
  6785. const vueOptions = vm.$options;
  6786. if (isArray$1(vueOptions.behaviors) && vueOptions.behaviors.includes("uni://form-field")) {
  6787. vm.$watch("modelValue", () => {
  6788. vm.$scope && vm.$scope.setData({
  6789. name: vm.name,
  6790. value: vm.modelValue
  6791. });
  6792. }, {
  6793. immediate: true
  6794. });
  6795. }
  6796. }
  6797. function initData(_2) {
  6798. return {};
  6799. }
  6800. function initPropsObserver(componentOptions) {
  6801. const observe = function observe2() {
  6802. const up = this.properties.uP;
  6803. if (!up) {
  6804. return;
  6805. }
  6806. if (this.$vm) {
  6807. updateComponentProps(up, this.$vm.$);
  6808. } else if (this.properties.uT === "m") {
  6809. updateMiniProgramComponentProperties(up, this);
  6810. }
  6811. };
  6812. {
  6813. if (!componentOptions.observers) {
  6814. componentOptions.observers = {};
  6815. }
  6816. componentOptions.observers.uP = observe;
  6817. }
  6818. }
  6819. function updateMiniProgramComponentProperties(up, mpInstance) {
  6820. const prevProps = mpInstance.properties;
  6821. const nextProps = findComponentPropsData(up) || {};
  6822. if (hasPropsChanged(prevProps, nextProps, false)) {
  6823. mpInstance.setData(nextProps);
  6824. }
  6825. }
  6826. function updateComponentProps(up, instance) {
  6827. const prevProps = toRaw(instance.props);
  6828. const nextProps = findComponentPropsData(up) || {};
  6829. if (hasPropsChanged(prevProps, nextProps)) {
  6830. updateProps(instance, nextProps, prevProps, false);
  6831. if (hasQueueJob(instance.update)) {
  6832. invalidateJob(instance.update);
  6833. }
  6834. {
  6835. instance.update();
  6836. }
  6837. }
  6838. }
  6839. function hasPropsChanged(prevProps, nextProps, checkLen = true) {
  6840. const nextKeys = Object.keys(nextProps);
  6841. if (checkLen && nextKeys.length !== Object.keys(prevProps).length) {
  6842. return true;
  6843. }
  6844. for (let i2 = 0; i2 < nextKeys.length; i2++) {
  6845. const key = nextKeys[i2];
  6846. if (nextProps[key] !== prevProps[key]) {
  6847. return true;
  6848. }
  6849. }
  6850. return false;
  6851. }
  6852. function initBehaviors(vueOptions) {
  6853. const vueBehaviors = vueOptions.behaviors;
  6854. let vueProps = vueOptions.props;
  6855. if (!vueProps) {
  6856. vueOptions.props = vueProps = [];
  6857. }
  6858. const behaviors = [];
  6859. if (isArray$1(vueBehaviors)) {
  6860. vueBehaviors.forEach((behavior) => {
  6861. behaviors.push(behavior.replace("uni://", "wx://"));
  6862. if (behavior === "uni://form-field") {
  6863. if (isArray$1(vueProps)) {
  6864. vueProps.push("name");
  6865. vueProps.push("modelValue");
  6866. } else {
  6867. vueProps.name = {
  6868. type: String,
  6869. default: ""
  6870. };
  6871. vueProps.modelValue = {
  6872. type: [String, Number, Boolean, Array, Object, Date],
  6873. default: ""
  6874. };
  6875. }
  6876. }
  6877. });
  6878. }
  6879. return behaviors;
  6880. }
  6881. function applyOptions(componentOptions, vueOptions) {
  6882. componentOptions.data = initData();
  6883. componentOptions.behaviors = initBehaviors(vueOptions);
  6884. }
  6885. function parseComponent(vueOptions, { parse: parse2, mocks: mocks2, isPage: isPage2, initRelation: initRelation2, handleLink: handleLink2, initLifetimes: initLifetimes2 }) {
  6886. vueOptions = vueOptions.default || vueOptions;
  6887. const options = {
  6888. multipleSlots: true,
  6889. addGlobalClass: true,
  6890. pureDataPattern: /^uP$/
  6891. };
  6892. if (isArray$1(vueOptions.mixins)) {
  6893. vueOptions.mixins.forEach((item) => {
  6894. if (isObject$3(item.options)) {
  6895. extend(options, item.options);
  6896. }
  6897. });
  6898. }
  6899. if (vueOptions.options) {
  6900. extend(options, vueOptions.options);
  6901. }
  6902. const mpComponentOptions = {
  6903. options,
  6904. lifetimes: initLifetimes2({ mocks: mocks2, isPage: isPage2, initRelation: initRelation2, vueOptions }),
  6905. pageLifetimes: {
  6906. show() {
  6907. this.$vm && this.$vm.$callHook("onPageShow");
  6908. },
  6909. hide() {
  6910. this.$vm && this.$vm.$callHook("onPageHide");
  6911. },
  6912. resize(size2) {
  6913. this.$vm && this.$vm.$callHook("onPageResize", size2);
  6914. }
  6915. },
  6916. methods: {
  6917. __l: handleLink2
  6918. }
  6919. };
  6920. {
  6921. applyOptions(mpComponentOptions, vueOptions);
  6922. }
  6923. initProps(mpComponentOptions);
  6924. initPropsObserver(mpComponentOptions);
  6925. initExtraOptions(mpComponentOptions, vueOptions);
  6926. initWxsCallMethods(mpComponentOptions.methods, vueOptions.wxsCallMethods);
  6927. {
  6928. initWorkletMethods(mpComponentOptions.methods, vueOptions.methods);
  6929. }
  6930. if (parse2) {
  6931. parse2(mpComponentOptions, { handleLink: handleLink2 });
  6932. }
  6933. return mpComponentOptions;
  6934. }
  6935. function initCreateComponent(parseOptions2) {
  6936. return function createComponent2(vueComponentOptions) {
  6937. return Component(parseComponent(vueComponentOptions, parseOptions2));
  6938. };
  6939. }
  6940. let $createComponentFn;
  6941. let $destroyComponentFn;
  6942. function getAppVm() {
  6943. return getApp().$vm;
  6944. }
  6945. function $createComponent(initialVNode, options) {
  6946. if (!$createComponentFn) {
  6947. $createComponentFn = getAppVm().$createComponent;
  6948. }
  6949. const proxy = $createComponentFn(initialVNode, options);
  6950. return getExposeProxy(proxy.$) || proxy;
  6951. }
  6952. function $destroyComponent(instance) {
  6953. if (!$destroyComponentFn) {
  6954. $destroyComponentFn = getAppVm().$destroyComponent;
  6955. }
  6956. return $destroyComponentFn(instance);
  6957. }
  6958. function parsePage(vueOptions, parseOptions2) {
  6959. const { parse: parse2, mocks: mocks2, isPage: isPage2, initRelation: initRelation2, handleLink: handleLink2, initLifetimes: initLifetimes2 } = parseOptions2;
  6960. const miniProgramPageOptions = parseComponent(vueOptions, {
  6961. mocks: mocks2,
  6962. isPage: isPage2,
  6963. initRelation: initRelation2,
  6964. handleLink: handleLink2,
  6965. initLifetimes: initLifetimes2
  6966. });
  6967. initPageProps(miniProgramPageOptions, (vueOptions.default || vueOptions).props);
  6968. const methods = miniProgramPageOptions.methods;
  6969. methods.onLoad = function(query) {
  6970. this.options = query;
  6971. this.$page = {
  6972. fullPath: addLeadingSlash(this.route + stringifyQuery(query))
  6973. };
  6974. return this.$vm && this.$vm.$callHook(ON_LOAD, query);
  6975. };
  6976. initHooks(methods, PAGE_INIT_HOOKS);
  6977. {
  6978. initUnknownHooks(methods, vueOptions);
  6979. }
  6980. initRuntimeHooks(methods, vueOptions.__runtimeHooks);
  6981. initMixinRuntimeHooks(methods);
  6982. parse2 && parse2(miniProgramPageOptions, { handleLink: handleLink2 });
  6983. return miniProgramPageOptions;
  6984. }
  6985. function initCreatePage(parseOptions2) {
  6986. return function createPage2(vuePageOptions) {
  6987. return Component(parsePage(vuePageOptions, parseOptions2));
  6988. };
  6989. }
  6990. function initCreatePluginApp(parseAppOptions) {
  6991. return function createApp2(vm) {
  6992. initAppLifecycle(parseApp(vm, parseAppOptions), vm);
  6993. };
  6994. }
  6995. const MPPage = Page;
  6996. const MPComponent = Component;
  6997. function initTriggerEvent(mpInstance) {
  6998. const oldTriggerEvent = mpInstance.triggerEvent;
  6999. const newTriggerEvent = function(event, ...args) {
  7000. return oldTriggerEvent.apply(mpInstance, [customizeEvent(event), ...args]);
  7001. };
  7002. try {
  7003. mpInstance.triggerEvent = newTriggerEvent;
  7004. } catch (error2) {
  7005. mpInstance._triggerEvent = newTriggerEvent;
  7006. }
  7007. }
  7008. function initMiniProgramHook(name, options, isComponent) {
  7009. const oldHook = options[name];
  7010. if (!oldHook) {
  7011. options[name] = function() {
  7012. initTriggerEvent(this);
  7013. };
  7014. } else {
  7015. options[name] = function(...args) {
  7016. initTriggerEvent(this);
  7017. return oldHook.apply(this, args);
  7018. };
  7019. }
  7020. }
  7021. Page = function(options) {
  7022. initMiniProgramHook(ON_LOAD, options);
  7023. return MPPage(options);
  7024. };
  7025. Component = function(options) {
  7026. initMiniProgramHook("created", options);
  7027. const isVueComponent = options.properties && options.properties.uP;
  7028. if (!isVueComponent) {
  7029. initProps(options);
  7030. initPropsObserver(options);
  7031. }
  7032. return MPComponent(options);
  7033. };
  7034. function initLifetimes({ mocks: mocks2, isPage: isPage2, initRelation: initRelation2, vueOptions }) {
  7035. return {
  7036. attached() {
  7037. let properties = this.properties;
  7038. initVueIds(properties.uI, this);
  7039. const relationOptions = {
  7040. vuePid: this._$vuePid
  7041. };
  7042. initRelation2(this, relationOptions);
  7043. const mpInstance = this;
  7044. const isMiniProgramPage = isPage2(mpInstance);
  7045. let propsData = properties;
  7046. this.$vm = $createComponent({
  7047. type: vueOptions,
  7048. props: findPropsData(propsData, isMiniProgramPage)
  7049. }, {
  7050. mpType: isMiniProgramPage ? "page" : "component",
  7051. mpInstance,
  7052. slots: properties.uS || {},
  7053. parentComponent: relationOptions.parent && relationOptions.parent.$,
  7054. onBeforeSetup(instance, options) {
  7055. initRefs(instance, mpInstance);
  7056. initMocks(instance, mpInstance, mocks2);
  7057. initComponentInstance(instance, options);
  7058. }
  7059. });
  7060. if (!isMiniProgramPage) {
  7061. initFormField(this.$vm);
  7062. }
  7063. },
  7064. ready() {
  7065. if (this.$vm) {
  7066. {
  7067. this.$vm.$callHook("mounted");
  7068. this.$vm.$callHook(ON_READY);
  7069. }
  7070. }
  7071. },
  7072. detached() {
  7073. if (this.$vm) {
  7074. pruneComponentPropsCache(this.$vm.$.uid);
  7075. $destroyComponent(this.$vm);
  7076. }
  7077. }
  7078. };
  7079. }
  7080. const mocks = ["__route__", "__wxExparserNodeId__", "__wxWebviewId__"];
  7081. function isPage(mpInstance) {
  7082. return !!mpInstance.route;
  7083. }
  7084. function initRelation(mpInstance, detail) {
  7085. mpInstance.triggerEvent("__l", detail);
  7086. }
  7087. function handleLink(event) {
  7088. const detail = event.detail || event.value;
  7089. const vuePid = detail.vuePid;
  7090. let parentVm;
  7091. if (vuePid) {
  7092. parentVm = findVmByVueId(this.$vm, vuePid);
  7093. }
  7094. if (!parentVm) {
  7095. parentVm = this.$vm;
  7096. }
  7097. detail.parent = parentVm;
  7098. }
  7099. var parseOptions = /* @__PURE__ */ Object.freeze({
  7100. __proto__: null,
  7101. handleLink,
  7102. initLifetimes,
  7103. initRelation,
  7104. isPage,
  7105. mocks
  7106. });
  7107. const createApp = initCreateApp();
  7108. const createPage = initCreatePage(parseOptions);
  7109. const createComponent = initCreateComponent(parseOptions);
  7110. const createPluginApp = initCreatePluginApp();
  7111. const createSubpackageApp = initCreateSubpackageApp();
  7112. {
  7113. wx.createApp = global.createApp = createApp;
  7114. wx.createPage = createPage;
  7115. wx.createComponent = createComponent;
  7116. wx.createPluginApp = global.createPluginApp = createPluginApp;
  7117. wx.createSubpackageApp = global.createSubpackageApp = createSubpackageApp;
  7118. }
  7119. /*!
  7120. * vuex v4.1.0
  7121. * (c) 2022 Evan You
  7122. * @license MIT
  7123. */
  7124. var storeKey = "store";
  7125. function forEachValue(obj, fn) {
  7126. Object.keys(obj).forEach(function(key) {
  7127. return fn(obj[key], key);
  7128. });
  7129. }
  7130. function isObject$1(obj) {
  7131. return obj !== null && typeof obj === "object";
  7132. }
  7133. function isPromise(val) {
  7134. return val && typeof val.then === "function";
  7135. }
  7136. function assert(condition, msg) {
  7137. if (!condition) {
  7138. throw new Error("[vuex] " + msg);
  7139. }
  7140. }
  7141. function partial(fn, arg) {
  7142. return function() {
  7143. return fn(arg);
  7144. };
  7145. }
  7146. function genericSubscribe(fn, subs, options) {
  7147. if (subs.indexOf(fn) < 0) {
  7148. options && options.prepend ? subs.unshift(fn) : subs.push(fn);
  7149. }
  7150. return function() {
  7151. var i2 = subs.indexOf(fn);
  7152. if (i2 > -1) {
  7153. subs.splice(i2, 1);
  7154. }
  7155. };
  7156. }
  7157. function resetStore(store, hot) {
  7158. store._actions = /* @__PURE__ */ Object.create(null);
  7159. store._mutations = /* @__PURE__ */ Object.create(null);
  7160. store._wrappedGetters = /* @__PURE__ */ Object.create(null);
  7161. store._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
  7162. var state = store.state;
  7163. installModule(store, state, [], store._modules.root, true);
  7164. resetStoreState(store, state, hot);
  7165. }
  7166. function resetStoreState(store, state, hot) {
  7167. var oldState = store._state;
  7168. var oldScope = store._scope;
  7169. store.getters = {};
  7170. store._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
  7171. var wrappedGetters = store._wrappedGetters;
  7172. var computedObj = {};
  7173. var computedCache = {};
  7174. var scope = effectScope(true);
  7175. scope.run(function() {
  7176. forEachValue(wrappedGetters, function(fn, key) {
  7177. computedObj[key] = partial(fn, store);
  7178. computedCache[key] = computed(function() {
  7179. return computedObj[key]();
  7180. });
  7181. Object.defineProperty(store.getters, key, {
  7182. get: function() {
  7183. return computedCache[key].value;
  7184. },
  7185. enumerable: true
  7186. // for local getters
  7187. });
  7188. });
  7189. });
  7190. store._state = reactive({
  7191. data: state
  7192. });
  7193. store._scope = scope;
  7194. if (store.strict) {
  7195. enableStrictMode(store);
  7196. }
  7197. if (oldState) {
  7198. if (hot) {
  7199. store._withCommit(function() {
  7200. oldState.data = null;
  7201. });
  7202. }
  7203. }
  7204. if (oldScope) {
  7205. oldScope.stop();
  7206. }
  7207. }
  7208. function installModule(store, rootState, path, module2, hot) {
  7209. var isRoot = !path.length;
  7210. var namespace = store._modules.getNamespace(path);
  7211. if (module2.namespaced) {
  7212. if (store._modulesNamespaceMap[namespace] && true) {
  7213. console.error("[vuex] duplicate namespace " + namespace + " for the namespaced module " + path.join("/"));
  7214. }
  7215. store._modulesNamespaceMap[namespace] = module2;
  7216. }
  7217. if (!isRoot && !hot) {
  7218. var parentState = getNestedState(rootState, path.slice(0, -1));
  7219. var moduleName = path[path.length - 1];
  7220. store._withCommit(function() {
  7221. {
  7222. if (moduleName in parentState) {
  7223. console.warn(
  7224. '[vuex] state field "' + moduleName + '" was overridden by a module with the same name at "' + path.join(".") + '"'
  7225. );
  7226. }
  7227. }
  7228. parentState[moduleName] = module2.state;
  7229. });
  7230. }
  7231. var local = module2.context = makeLocalContext(store, namespace, path);
  7232. module2.forEachMutation(function(mutation, key) {
  7233. var namespacedType = namespace + key;
  7234. registerMutation(store, namespacedType, mutation, local);
  7235. });
  7236. module2.forEachAction(function(action, key) {
  7237. var type = action.root ? key : namespace + key;
  7238. var handler = action.handler || action;
  7239. registerAction(store, type, handler, local);
  7240. });
  7241. module2.forEachGetter(function(getter, key) {
  7242. var namespacedType = namespace + key;
  7243. registerGetter(store, namespacedType, getter, local);
  7244. });
  7245. module2.forEachChild(function(child, key) {
  7246. installModule(store, rootState, path.concat(key), child, hot);
  7247. });
  7248. }
  7249. function makeLocalContext(store, namespace, path) {
  7250. var noNamespace = namespace === "";
  7251. var local = {
  7252. dispatch: noNamespace ? store.dispatch : function(_type, _payload, _options) {
  7253. var args = unifyObjectStyle(_type, _payload, _options);
  7254. var payload = args.payload;
  7255. var options = args.options;
  7256. var type = args.type;
  7257. if (!options || !options.root) {
  7258. type = namespace + type;
  7259. if (!store._actions[type]) {
  7260. console.error("[vuex] unknown local action type: " + args.type + ", global type: " + type);
  7261. return;
  7262. }
  7263. }
  7264. return store.dispatch(type, payload);
  7265. },
  7266. commit: noNamespace ? store.commit : function(_type, _payload, _options) {
  7267. var args = unifyObjectStyle(_type, _payload, _options);
  7268. var payload = args.payload;
  7269. var options = args.options;
  7270. var type = args.type;
  7271. if (!options || !options.root) {
  7272. type = namespace + type;
  7273. if (!store._mutations[type]) {
  7274. console.error("[vuex] unknown local mutation type: " + args.type + ", global type: " + type);
  7275. return;
  7276. }
  7277. }
  7278. store.commit(type, payload, options);
  7279. }
  7280. };
  7281. Object.defineProperties(local, {
  7282. getters: {
  7283. get: noNamespace ? function() {
  7284. return store.getters;
  7285. } : function() {
  7286. return makeLocalGetters(store, namespace);
  7287. }
  7288. },
  7289. state: {
  7290. get: function() {
  7291. return getNestedState(store.state, path);
  7292. }
  7293. }
  7294. });
  7295. return local;
  7296. }
  7297. function makeLocalGetters(store, namespace) {
  7298. if (!store._makeLocalGettersCache[namespace]) {
  7299. var gettersProxy = {};
  7300. var splitPos = namespace.length;
  7301. Object.keys(store.getters).forEach(function(type) {
  7302. if (type.slice(0, splitPos) !== namespace) {
  7303. return;
  7304. }
  7305. var localType = type.slice(splitPos);
  7306. Object.defineProperty(gettersProxy, localType, {
  7307. get: function() {
  7308. return store.getters[type];
  7309. },
  7310. enumerable: true
  7311. });
  7312. });
  7313. store._makeLocalGettersCache[namespace] = gettersProxy;
  7314. }
  7315. return store._makeLocalGettersCache[namespace];
  7316. }
  7317. function registerMutation(store, type, handler, local) {
  7318. var entry = store._mutations[type] || (store._mutations[type] = []);
  7319. entry.push(function wrappedMutationHandler(payload) {
  7320. handler.call(store, local.state, payload);
  7321. });
  7322. }
  7323. function registerAction(store, type, handler, local) {
  7324. var entry = store._actions[type] || (store._actions[type] = []);
  7325. entry.push(function wrappedActionHandler(payload) {
  7326. var res = handler.call(store, {
  7327. dispatch: local.dispatch,
  7328. commit: local.commit,
  7329. getters: local.getters,
  7330. state: local.state,
  7331. rootGetters: store.getters,
  7332. rootState: store.state
  7333. }, payload);
  7334. if (!isPromise(res)) {
  7335. res = Promise.resolve(res);
  7336. }
  7337. if (store._devtoolHook) {
  7338. return res.catch(function(err) {
  7339. store._devtoolHook.emit("vuex:error", err);
  7340. throw err;
  7341. });
  7342. } else {
  7343. return res;
  7344. }
  7345. });
  7346. }
  7347. function registerGetter(store, type, rawGetter, local) {
  7348. if (store._wrappedGetters[type]) {
  7349. {
  7350. console.error("[vuex] duplicate getter key: " + type);
  7351. }
  7352. return;
  7353. }
  7354. store._wrappedGetters[type] = function wrappedGetter(store2) {
  7355. return rawGetter(
  7356. local.state,
  7357. // local state
  7358. local.getters,
  7359. // local getters
  7360. store2.state,
  7361. // root state
  7362. store2.getters
  7363. // root getters
  7364. );
  7365. };
  7366. }
  7367. function enableStrictMode(store) {
  7368. watch(function() {
  7369. return store._state.data;
  7370. }, function() {
  7371. {
  7372. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  7373. }
  7374. }, { deep: true, flush: "sync" });
  7375. }
  7376. function getNestedState(state, path) {
  7377. return path.reduce(function(state2, key) {
  7378. return state2[key];
  7379. }, state);
  7380. }
  7381. function unifyObjectStyle(type, payload, options) {
  7382. if (isObject$1(type) && type.type) {
  7383. options = payload;
  7384. payload = type;
  7385. type = type.type;
  7386. }
  7387. {
  7388. assert(typeof type === "string", "expects string as the type, but found " + typeof type + ".");
  7389. }
  7390. return { type, payload, options };
  7391. }
  7392. var Module = function Module2(rawModule, runtime) {
  7393. this.runtime = runtime;
  7394. this._children = /* @__PURE__ */ Object.create(null);
  7395. this._rawModule = rawModule;
  7396. var rawState = rawModule.state;
  7397. this.state = (typeof rawState === "function" ? rawState() : rawState) || {};
  7398. };
  7399. var prototypeAccessors$1 = { namespaced: { configurable: true } };
  7400. prototypeAccessors$1.namespaced.get = function() {
  7401. return !!this._rawModule.namespaced;
  7402. };
  7403. Module.prototype.addChild = function addChild(key, module2) {
  7404. this._children[key] = module2;
  7405. };
  7406. Module.prototype.removeChild = function removeChild(key) {
  7407. delete this._children[key];
  7408. };
  7409. Module.prototype.getChild = function getChild(key) {
  7410. return this._children[key];
  7411. };
  7412. Module.prototype.hasChild = function hasChild(key) {
  7413. return key in this._children;
  7414. };
  7415. Module.prototype.update = function update(rawModule) {
  7416. this._rawModule.namespaced = rawModule.namespaced;
  7417. if (rawModule.actions) {
  7418. this._rawModule.actions = rawModule.actions;
  7419. }
  7420. if (rawModule.mutations) {
  7421. this._rawModule.mutations = rawModule.mutations;
  7422. }
  7423. if (rawModule.getters) {
  7424. this._rawModule.getters = rawModule.getters;
  7425. }
  7426. };
  7427. Module.prototype.forEachChild = function forEachChild(fn) {
  7428. forEachValue(this._children, fn);
  7429. };
  7430. Module.prototype.forEachGetter = function forEachGetter(fn) {
  7431. if (this._rawModule.getters) {
  7432. forEachValue(this._rawModule.getters, fn);
  7433. }
  7434. };
  7435. Module.prototype.forEachAction = function forEachAction(fn) {
  7436. if (this._rawModule.actions) {
  7437. forEachValue(this._rawModule.actions, fn);
  7438. }
  7439. };
  7440. Module.prototype.forEachMutation = function forEachMutation(fn) {
  7441. if (this._rawModule.mutations) {
  7442. forEachValue(this._rawModule.mutations, fn);
  7443. }
  7444. };
  7445. Object.defineProperties(Module.prototype, prototypeAccessors$1);
  7446. var ModuleCollection = function ModuleCollection2(rawRootModule) {
  7447. this.register([], rawRootModule, false);
  7448. };
  7449. ModuleCollection.prototype.get = function get2(path) {
  7450. return path.reduce(function(module2, key) {
  7451. return module2.getChild(key);
  7452. }, this.root);
  7453. };
  7454. ModuleCollection.prototype.getNamespace = function getNamespace(path) {
  7455. var module2 = this.root;
  7456. return path.reduce(function(namespace, key) {
  7457. module2 = module2.getChild(key);
  7458. return namespace + (module2.namespaced ? key + "/" : "");
  7459. }, "");
  7460. };
  7461. ModuleCollection.prototype.update = function update$1(rawRootModule) {
  7462. update2([], this.root, rawRootModule);
  7463. };
  7464. ModuleCollection.prototype.register = function register(path, rawModule, runtime) {
  7465. var this$1$1 = this;
  7466. if (runtime === void 0)
  7467. runtime = true;
  7468. {
  7469. assertRawModule(path, rawModule);
  7470. }
  7471. var newModule = new Module(rawModule, runtime);
  7472. if (path.length === 0) {
  7473. this.root = newModule;
  7474. } else {
  7475. var parent = this.get(path.slice(0, -1));
  7476. parent.addChild(path[path.length - 1], newModule);
  7477. }
  7478. if (rawModule.modules) {
  7479. forEachValue(rawModule.modules, function(rawChildModule, key) {
  7480. this$1$1.register(path.concat(key), rawChildModule, runtime);
  7481. });
  7482. }
  7483. };
  7484. ModuleCollection.prototype.unregister = function unregister(path) {
  7485. var parent = this.get(path.slice(0, -1));
  7486. var key = path[path.length - 1];
  7487. var child = parent.getChild(key);
  7488. if (!child) {
  7489. {
  7490. console.warn(
  7491. "[vuex] trying to unregister module '" + key + "', which is not registered"
  7492. );
  7493. }
  7494. return;
  7495. }
  7496. if (!child.runtime) {
  7497. return;
  7498. }
  7499. parent.removeChild(key);
  7500. };
  7501. ModuleCollection.prototype.isRegistered = function isRegistered(path) {
  7502. var parent = this.get(path.slice(0, -1));
  7503. var key = path[path.length - 1];
  7504. if (parent) {
  7505. return parent.hasChild(key);
  7506. }
  7507. return false;
  7508. };
  7509. function update2(path, targetModule, newModule) {
  7510. {
  7511. assertRawModule(path, newModule);
  7512. }
  7513. targetModule.update(newModule);
  7514. if (newModule.modules) {
  7515. for (var key in newModule.modules) {
  7516. if (!targetModule.getChild(key)) {
  7517. {
  7518. console.warn(
  7519. "[vuex] trying to add a new module '" + key + "' on hot reloading, manual reload is needed"
  7520. );
  7521. }
  7522. return;
  7523. }
  7524. update2(
  7525. path.concat(key),
  7526. targetModule.getChild(key),
  7527. newModule.modules[key]
  7528. );
  7529. }
  7530. }
  7531. }
  7532. var functionAssert = {
  7533. assert: function(value2) {
  7534. return typeof value2 === "function";
  7535. },
  7536. expected: "function"
  7537. };
  7538. var objectAssert = {
  7539. assert: function(value2) {
  7540. return typeof value2 === "function" || typeof value2 === "object" && typeof value2.handler === "function";
  7541. },
  7542. expected: 'function or object with "handler" function'
  7543. };
  7544. var assertTypes = {
  7545. getters: functionAssert,
  7546. mutations: functionAssert,
  7547. actions: objectAssert
  7548. };
  7549. function assertRawModule(path, rawModule) {
  7550. Object.keys(assertTypes).forEach(function(key) {
  7551. if (!rawModule[key]) {
  7552. return;
  7553. }
  7554. var assertOptions = assertTypes[key];
  7555. forEachValue(rawModule[key], function(value2, type) {
  7556. assert(
  7557. assertOptions.assert(value2),
  7558. makeAssertionMessage(path, key, type, value2, assertOptions.expected)
  7559. );
  7560. });
  7561. });
  7562. }
  7563. function makeAssertionMessage(path, key, type, value2, expected) {
  7564. var buf = key + " should be " + expected + ' but "' + key + "." + type + '"';
  7565. if (path.length > 0) {
  7566. buf += ' in module "' + path.join(".") + '"';
  7567. }
  7568. buf += " is " + JSON.stringify(value2) + ".";
  7569. return buf;
  7570. }
  7571. function createStore(options) {
  7572. return new Store(options);
  7573. }
  7574. var Store = function Store2(options) {
  7575. var this$1$1 = this;
  7576. if (options === void 0)
  7577. options = {};
  7578. {
  7579. assert(typeof Promise !== "undefined", "vuex requires a Promise polyfill in this browser.");
  7580. assert(this instanceof Store2, "store must be called with the new operator.");
  7581. }
  7582. var plugins = options.plugins;
  7583. if (plugins === void 0)
  7584. plugins = [];
  7585. var strict = options.strict;
  7586. if (strict === void 0)
  7587. strict = false;
  7588. var devtools2 = options.devtools;
  7589. this._committing = false;
  7590. this._actions = /* @__PURE__ */ Object.create(null);
  7591. this._actionSubscribers = [];
  7592. this._mutations = /* @__PURE__ */ Object.create(null);
  7593. this._wrappedGetters = /* @__PURE__ */ Object.create(null);
  7594. this._modules = new ModuleCollection(options);
  7595. this._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
  7596. this._subscribers = [];
  7597. this._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
  7598. this._scope = null;
  7599. this._devtools = devtools2;
  7600. var store = this;
  7601. var ref2 = this;
  7602. var dispatch2 = ref2.dispatch;
  7603. var commit2 = ref2.commit;
  7604. this.dispatch = function boundDispatch(type, payload) {
  7605. return dispatch2.call(store, type, payload);
  7606. };
  7607. this.commit = function boundCommit(type, payload, options2) {
  7608. return commit2.call(store, type, payload, options2);
  7609. };
  7610. this.strict = strict;
  7611. var state = this._modules.root.state;
  7612. installModule(this, state, [], this._modules.root);
  7613. resetStoreState(this, state);
  7614. plugins.forEach(function(plugin2) {
  7615. return plugin2(this$1$1);
  7616. });
  7617. };
  7618. var prototypeAccessors = { state: { configurable: true } };
  7619. Store.prototype.install = function install(app, injectKey) {
  7620. app.provide(injectKey || storeKey, this);
  7621. app.config.globalProperties.$store = this;
  7622. this._devtools !== void 0 ? this._devtools : true;
  7623. };
  7624. prototypeAccessors.state.get = function() {
  7625. return this._state.data;
  7626. };
  7627. prototypeAccessors.state.set = function(v2) {
  7628. {
  7629. assert(false, "use store.replaceState() to explicit replace store state.");
  7630. }
  7631. };
  7632. Store.prototype.commit = function commit(_type, _payload, _options) {
  7633. var this$1$1 = this;
  7634. var ref2 = unifyObjectStyle(_type, _payload, _options);
  7635. var type = ref2.type;
  7636. var payload = ref2.payload;
  7637. var options = ref2.options;
  7638. var mutation = { type, payload };
  7639. var entry = this._mutations[type];
  7640. if (!entry) {
  7641. {
  7642. console.error("[vuex] unknown mutation type: " + type);
  7643. }
  7644. return;
  7645. }
  7646. this._withCommit(function() {
  7647. entry.forEach(function commitIterator(handler) {
  7648. handler(payload);
  7649. });
  7650. });
  7651. this._subscribers.slice().forEach(function(sub) {
  7652. return sub(mutation, this$1$1.state);
  7653. });
  7654. if (options && options.silent) {
  7655. console.warn(
  7656. "[vuex] mutation type: " + type + ". Silent option has been removed. Use the filter functionality in the vue-devtools"
  7657. );
  7658. }
  7659. };
  7660. Store.prototype.dispatch = function dispatch(_type, _payload) {
  7661. var this$1$1 = this;
  7662. var ref2 = unifyObjectStyle(_type, _payload);
  7663. var type = ref2.type;
  7664. var payload = ref2.payload;
  7665. var action = { type, payload };
  7666. var entry = this._actions[type];
  7667. if (!entry) {
  7668. {
  7669. console.error("[vuex] unknown action type: " + type);
  7670. }
  7671. return;
  7672. }
  7673. try {
  7674. this._actionSubscribers.slice().filter(function(sub) {
  7675. return sub.before;
  7676. }).forEach(function(sub) {
  7677. return sub.before(action, this$1$1.state);
  7678. });
  7679. } catch (e2) {
  7680. {
  7681. console.warn("[vuex] error in before action subscribers: ");
  7682. console.error(e2);
  7683. }
  7684. }
  7685. var result = entry.length > 1 ? Promise.all(entry.map(function(handler) {
  7686. return handler(payload);
  7687. })) : entry[0](payload);
  7688. return new Promise(function(resolve2, reject) {
  7689. result.then(function(res) {
  7690. try {
  7691. this$1$1._actionSubscribers.filter(function(sub) {
  7692. return sub.after;
  7693. }).forEach(function(sub) {
  7694. return sub.after(action, this$1$1.state);
  7695. });
  7696. } catch (e2) {
  7697. {
  7698. console.warn("[vuex] error in after action subscribers: ");
  7699. console.error(e2);
  7700. }
  7701. }
  7702. resolve2(res);
  7703. }, function(error2) {
  7704. try {
  7705. this$1$1._actionSubscribers.filter(function(sub) {
  7706. return sub.error;
  7707. }).forEach(function(sub) {
  7708. return sub.error(action, this$1$1.state, error2);
  7709. });
  7710. } catch (e2) {
  7711. {
  7712. console.warn("[vuex] error in error action subscribers: ");
  7713. console.error(e2);
  7714. }
  7715. }
  7716. reject(error2);
  7717. });
  7718. });
  7719. };
  7720. Store.prototype.subscribe = function subscribe(fn, options) {
  7721. return genericSubscribe(fn, this._subscribers, options);
  7722. };
  7723. Store.prototype.subscribeAction = function subscribeAction(fn, options) {
  7724. var subs = typeof fn === "function" ? { before: fn } : fn;
  7725. return genericSubscribe(subs, this._actionSubscribers, options);
  7726. };
  7727. Store.prototype.watch = function watch$1(getter, cb, options) {
  7728. var this$1$1 = this;
  7729. {
  7730. assert(typeof getter === "function", "store.watch only accepts a function.");
  7731. }
  7732. return watch(function() {
  7733. return getter(this$1$1.state, this$1$1.getters);
  7734. }, cb, Object.assign({}, options));
  7735. };
  7736. Store.prototype.replaceState = function replaceState(state) {
  7737. var this$1$1 = this;
  7738. this._withCommit(function() {
  7739. this$1$1._state.data = state;
  7740. });
  7741. };
  7742. Store.prototype.registerModule = function registerModule(path, rawModule, options) {
  7743. if (options === void 0)
  7744. options = {};
  7745. if (typeof path === "string") {
  7746. path = [path];
  7747. }
  7748. {
  7749. assert(Array.isArray(path), "module path must be a string or an Array.");
  7750. assert(path.length > 0, "cannot register the root module by using registerModule.");
  7751. }
  7752. this._modules.register(path, rawModule);
  7753. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  7754. resetStoreState(this, this.state);
  7755. };
  7756. Store.prototype.unregisterModule = function unregisterModule(path) {
  7757. var this$1$1 = this;
  7758. if (typeof path === "string") {
  7759. path = [path];
  7760. }
  7761. {
  7762. assert(Array.isArray(path), "module path must be a string or an Array.");
  7763. }
  7764. this._modules.unregister(path);
  7765. this._withCommit(function() {
  7766. var parentState = getNestedState(this$1$1.state, path.slice(0, -1));
  7767. delete parentState[path[path.length - 1]];
  7768. });
  7769. resetStore(this);
  7770. };
  7771. Store.prototype.hasModule = function hasModule(path) {
  7772. if (typeof path === "string") {
  7773. path = [path];
  7774. }
  7775. {
  7776. assert(Array.isArray(path), "module path must be a string or an Array.");
  7777. }
  7778. return this._modules.isRegistered(path);
  7779. };
  7780. Store.prototype.hotUpdate = function hotUpdate(newOptions) {
  7781. this._modules.update(newOptions);
  7782. resetStore(this, true);
  7783. };
  7784. Store.prototype._withCommit = function _withCommit(fn) {
  7785. var committing = this._committing;
  7786. this._committing = true;
  7787. fn();
  7788. this._committing = committing;
  7789. };
  7790. Object.defineProperties(Store.prototype, prototypeAccessors);
  7791. const defineMixin = (options) => {
  7792. return options;
  7793. };
  7794. function email(value2) {
  7795. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value2);
  7796. }
  7797. function mobile(value2) {
  7798. return /^1[23456789]\d{9}$/.test(value2);
  7799. }
  7800. function url(value2) {
  7801. 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(value2);
  7802. }
  7803. function date(value2) {
  7804. if (!value2)
  7805. return false;
  7806. if (typeof value2 === "number") {
  7807. if (value2.toString().length !== 10 && value2.toString().length !== 13) {
  7808. return false;
  7809. }
  7810. return !isNaN(new Date(value2).getTime());
  7811. }
  7812. if (typeof value2 === "string") {
  7813. const numV = Number(value2);
  7814. if (!isNaN(numV)) {
  7815. if (numV.toString().length === 10 || numV.toString().length === 13) {
  7816. return !isNaN(new Date(numV).getTime());
  7817. }
  7818. }
  7819. if (value2.length < 10 || value2.length > 19) {
  7820. return false;
  7821. }
  7822. const dateRegex = /^\d{4}[-\/]\d{2}[-\/]\d{2}( \d{1,2}:\d{2}(:\d{2})?)?$/;
  7823. if (!dateRegex.test(value2)) {
  7824. return false;
  7825. }
  7826. const dateValue = new Date(value2);
  7827. return !isNaN(dateValue.getTime());
  7828. }
  7829. return false;
  7830. }
  7831. function dateISO(value2) {
  7832. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value2);
  7833. }
  7834. function number(value2) {
  7835. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2);
  7836. }
  7837. function string(value2) {
  7838. return typeof value2 === "string";
  7839. }
  7840. function digits(value2) {
  7841. return /^\d+$/.test(value2);
  7842. }
  7843. function idCard(value2) {
  7844. 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(
  7845. value2
  7846. );
  7847. }
  7848. function carNo(value2) {
  7849. const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  7850. const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  7851. if (value2.length === 7) {
  7852. return creg.test(value2);
  7853. }
  7854. if (value2.length === 8) {
  7855. return xreg.test(value2);
  7856. }
  7857. return false;
  7858. }
  7859. function amount(value2) {
  7860. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value2);
  7861. }
  7862. function chinese(value2) {
  7863. const reg = /^[\u4e00-\u9fa5]+$/gi;
  7864. return reg.test(value2);
  7865. }
  7866. function letter(value2) {
  7867. return /^[a-zA-Z]*$/.test(value2);
  7868. }
  7869. function enOrNum(value2) {
  7870. const reg = /^[0-9a-zA-Z]*$/g;
  7871. return reg.test(value2);
  7872. }
  7873. function contains(value2, param) {
  7874. return value2.indexOf(param) >= 0;
  7875. }
  7876. function range$1(value2, param) {
  7877. return value2 >= param[0] && value2 <= param[1];
  7878. }
  7879. function rangeLength(value2, param) {
  7880. return value2.length >= param[0] && value2.length <= param[1];
  7881. }
  7882. function landline(value2) {
  7883. const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  7884. return reg.test(value2);
  7885. }
  7886. function empty(value2) {
  7887. switch (typeof value2) {
  7888. case "undefined":
  7889. return true;
  7890. case "string":
  7891. if (value2.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
  7892. return true;
  7893. break;
  7894. case "boolean":
  7895. if (!value2)
  7896. return true;
  7897. break;
  7898. case "number":
  7899. if (value2 === 0 || isNaN(value2))
  7900. return true;
  7901. break;
  7902. case "object":
  7903. if (value2 === null || value2.length === 0)
  7904. return true;
  7905. for (const i2 in value2) {
  7906. return false;
  7907. }
  7908. return true;
  7909. }
  7910. return false;
  7911. }
  7912. function jsonString(value2) {
  7913. if (typeof value2 === "string") {
  7914. try {
  7915. const obj = JSON.parse(value2);
  7916. if (typeof obj === "object" && obj) {
  7917. return true;
  7918. }
  7919. return false;
  7920. } catch (e2) {
  7921. return false;
  7922. }
  7923. }
  7924. return false;
  7925. }
  7926. function array(value2) {
  7927. if (typeof Array.isArray === "function") {
  7928. return Array.isArray(value2);
  7929. }
  7930. return Object.prototype.toString.call(value2) === "[object Array]";
  7931. }
  7932. function object(value2) {
  7933. return Object.prototype.toString.call(value2) === "[object Object]";
  7934. }
  7935. function code(value2, len = 6) {
  7936. return new RegExp(`^\\d{${len}}$`).test(value2);
  7937. }
  7938. function func(value2) {
  7939. return typeof value2 === "function";
  7940. }
  7941. function promise(value2) {
  7942. return object(value2) && func(value2.then) && func(value2.catch);
  7943. }
  7944. function image(value2) {
  7945. const newValue = value2.split("?")[0];
  7946. const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  7947. return IMAGE_REGEXP.test(newValue);
  7948. }
  7949. function video(value2) {
  7950. const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
  7951. return VIDEO_REGEXP.test(value2);
  7952. }
  7953. function regExp(o2) {
  7954. return o2 && Object.prototype.toString.call(o2) === "[object RegExp]";
  7955. }
  7956. const test = {
  7957. email,
  7958. mobile,
  7959. url,
  7960. date,
  7961. dateISO,
  7962. number,
  7963. digits,
  7964. idCard,
  7965. carNo,
  7966. amount,
  7967. chinese,
  7968. letter,
  7969. enOrNum,
  7970. contains,
  7971. range: range$1,
  7972. rangeLength,
  7973. empty,
  7974. isEmpty: empty,
  7975. jsonString,
  7976. landline,
  7977. object,
  7978. array,
  7979. code,
  7980. func,
  7981. promise,
  7982. video,
  7983. image,
  7984. regExp,
  7985. string
  7986. };
  7987. function strip(num, precision = 15) {
  7988. return +parseFloat(Number(num).toPrecision(precision));
  7989. }
  7990. function digitLength(num) {
  7991. const eSplit = num.toString().split(/[eE]/);
  7992. const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
  7993. return len > 0 ? len : 0;
  7994. }
  7995. function float2Fixed(num) {
  7996. if (num.toString().indexOf("e") === -1) {
  7997. return Number(num.toString().replace(".", ""));
  7998. }
  7999. const dLen = digitLength(num);
  8000. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  8001. }
  8002. function checkBoundary(num) {
  8003. {
  8004. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  8005. console.warn(`${num} 超出了精度限制,结果可能不正确`);
  8006. }
  8007. }
  8008. }
  8009. function iteratorOperation(arr, operation) {
  8010. const [num1, num2, ...others] = arr;
  8011. let res = operation(num1, num2);
  8012. others.forEach((num) => {
  8013. res = operation(res, num);
  8014. });
  8015. return res;
  8016. }
  8017. function times(...nums) {
  8018. if (nums.length > 2) {
  8019. return iteratorOperation(nums, times);
  8020. }
  8021. const [num1, num2] = nums;
  8022. const num1Changed = float2Fixed(num1);
  8023. const num2Changed = float2Fixed(num2);
  8024. const baseNum = digitLength(num1) + digitLength(num2);
  8025. const leftValue = num1Changed * num2Changed;
  8026. checkBoundary(leftValue);
  8027. return leftValue / Math.pow(10, baseNum);
  8028. }
  8029. function divide(...nums) {
  8030. if (nums.length > 2) {
  8031. return iteratorOperation(nums, divide);
  8032. }
  8033. const [num1, num2] = nums;
  8034. const num1Changed = float2Fixed(num1);
  8035. const num2Changed = float2Fixed(num2);
  8036. checkBoundary(num1Changed);
  8037. checkBoundary(num2Changed);
  8038. return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
  8039. }
  8040. function round(num, ratio) {
  8041. const base = Math.pow(10, ratio);
  8042. let result = divide(Math.round(Math.abs(times(num, base))), base);
  8043. if (num < 0 && result !== 0) {
  8044. result = times(result, -1);
  8045. }
  8046. return result;
  8047. }
  8048. const version = "3";
  8049. {
  8050. console.log(`
  8051. %c uview-plus V${version} %c https://ijry.github.io/uview-plus/
  8052. `, "color: #ffffff; background: #3c9cff; padding:5px 0;", "color: #3c9cff;background: #ffffff; padding:5px 0;");
  8053. }
  8054. const config = {
  8055. v: version,
  8056. version,
  8057. // 主题名称
  8058. type: [
  8059. "primary",
  8060. "success",
  8061. "info",
  8062. "error",
  8063. "warning"
  8064. ],
  8065. // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持
  8066. color: {
  8067. "u-primary": "#2979ff",
  8068. "u-warning": "#ff9900",
  8069. "u-success": "#19be6b",
  8070. "u-error": "#fa3534",
  8071. "u-info": "#909399",
  8072. "u-main-color": "#303133",
  8073. "u-content-color": "#606266",
  8074. "u-tips-color": "#909399",
  8075. "u-light-color": "#c0c4cc",
  8076. "up-primary": "#2979ff",
  8077. "up-warning": "#ff9900",
  8078. "up-success": "#19be6b",
  8079. "up-error": "#fa3534",
  8080. "up-info": "#909399",
  8081. "up-main-color": "#303133",
  8082. "up-content-color": "#606266",
  8083. "up-tips-color": "#909399",
  8084. "up-light-color": "#c0c4cc"
  8085. },
  8086. // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx
  8087. unit: "px",
  8088. // 拦截器
  8089. interceptor: {
  8090. navbarLeftClick: null
  8091. }
  8092. };
  8093. function range(min = 0, max = 0, value2 = 0) {
  8094. return Math.max(min, Math.min(max, Number(value2)));
  8095. }
  8096. function getPx(value2, unit = false) {
  8097. if (number(value2)) {
  8098. return unit ? `${value2}px` : Number(value2);
  8099. }
  8100. if (/(rpx|upx)$/.test(value2)) {
  8101. return unit ? `${index$1.upx2px(parseInt(value2))}px` : Number(index$1.upx2px(parseInt(value2)));
  8102. }
  8103. return unit ? `${parseInt(value2)}px` : parseInt(value2);
  8104. }
  8105. function sleep(value2 = 30) {
  8106. return new Promise((resolve2) => {
  8107. setTimeout(() => {
  8108. resolve2();
  8109. }, value2);
  8110. });
  8111. }
  8112. function os$1() {
  8113. return index$1.getDeviceInfo().platform.toLowerCase();
  8114. }
  8115. function sys() {
  8116. return index$1.getSystemInfoSync();
  8117. }
  8118. function getWindowInfo() {
  8119. let ret = {};
  8120. ret = index$1.getWindowInfo();
  8121. return ret;
  8122. }
  8123. function random(min, max) {
  8124. if (min >= 0 && max > 0 && max >= min) {
  8125. const gab = max - min + 1;
  8126. return Math.floor(Math.random() * gab + min);
  8127. }
  8128. return 0;
  8129. }
  8130. function guid(len = 32, firstU = true, radix = null) {
  8131. const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  8132. const uuid = [];
  8133. radix = radix || chars.length;
  8134. if (len) {
  8135. for (let i2 = 0; i2 < len; i2++)
  8136. uuid[i2] = chars[0 | Math.random() * radix];
  8137. } else {
  8138. let r2;
  8139. uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
  8140. uuid[14] = "4";
  8141. for (let i2 = 0; i2 < 36; i2++) {
  8142. if (!uuid[i2]) {
  8143. r2 = 0 | Math.random() * 16;
  8144. uuid[i2] = chars[i2 == 19 ? r2 & 3 | 8 : r2];
  8145. }
  8146. }
  8147. }
  8148. if (firstU) {
  8149. uuid.shift();
  8150. return `u${uuid.join("")}`;
  8151. }
  8152. return uuid.join("");
  8153. }
  8154. function $parent(name = void 0) {
  8155. let parent = this.$parent;
  8156. while (parent) {
  8157. name = name.replace(/up-([a-zA-Z0-9-_]+)/g, "u-$1");
  8158. if (parent.$options && parent.$options.name !== name) {
  8159. parent = parent.$parent;
  8160. } else {
  8161. return parent;
  8162. }
  8163. }
  8164. return false;
  8165. }
  8166. function addStyle(customStyle, target = "object") {
  8167. if (empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
  8168. return customStyle;
  8169. }
  8170. if (target === "object") {
  8171. customStyle = trim(customStyle);
  8172. const styleArray = customStyle.split(";");
  8173. const style = {};
  8174. for (let i2 = 0; i2 < styleArray.length; i2++) {
  8175. if (styleArray[i2]) {
  8176. const item = styleArray[i2].split(":");
  8177. style[trim(item[0])] = trim(item[1]);
  8178. }
  8179. }
  8180. return style;
  8181. }
  8182. let string2 = "";
  8183. if (typeof customStyle === "object") {
  8184. customStyle.forEach((val, i2) => {
  8185. const key = i2.replace(/([A-Z])/g, "-$1").toLowerCase();
  8186. string2 += `${key}:${val};`;
  8187. });
  8188. }
  8189. return trim(string2);
  8190. }
  8191. function addUnit(value2 = "auto", unit = "") {
  8192. if (!unit) {
  8193. unit = config.unit || "px";
  8194. }
  8195. if (unit == "rpx" && number(String(value2))) {
  8196. value2 = value2 * 2;
  8197. }
  8198. value2 = String(value2);
  8199. return number(value2) ? `${value2}${unit}` : value2;
  8200. }
  8201. function deepClone(obj) {
  8202. if ([null, void 0, NaN, false].includes(obj))
  8203. return obj;
  8204. if (typeof obj !== "object" && typeof obj !== "function") {
  8205. return obj;
  8206. }
  8207. const o2 = array(obj) ? [] : {};
  8208. for (const i2 in obj) {
  8209. if (obj.hasOwnProperty(i2)) {
  8210. o2[i2] = typeof obj[i2] === "object" ? deepClone(obj[i2]) : obj[i2];
  8211. }
  8212. }
  8213. return o2;
  8214. }
  8215. function deepMerge$1(targetOrigin = {}, source = {}) {
  8216. let target = deepClone(targetOrigin);
  8217. if (typeof target !== "object" || typeof source !== "object")
  8218. return false;
  8219. for (const prop in source) {
  8220. if (!source.hasOwnProperty(prop))
  8221. continue;
  8222. if (prop in target) {
  8223. if (source[prop] == null) {
  8224. target[prop] = source[prop];
  8225. } else if (typeof target[prop] !== "object") {
  8226. target[prop] = source[prop];
  8227. } else if (typeof source[prop] !== "object") {
  8228. target[prop] = source[prop];
  8229. } else if (target[prop].concat && source[prop].concat) {
  8230. target[prop] = target[prop].concat(source[prop]);
  8231. } else {
  8232. target[prop] = deepMerge$1(target[prop], source[prop]);
  8233. }
  8234. } else {
  8235. target[prop] = source[prop];
  8236. }
  8237. }
  8238. return target;
  8239. }
  8240. function shallowMerge(target, source = {}) {
  8241. if (typeof target !== "object" || typeof source !== "object")
  8242. return false;
  8243. for (const prop in source) {
  8244. if (!source.hasOwnProperty(prop))
  8245. continue;
  8246. if (prop in target) {
  8247. if (source[prop] == null) {
  8248. target[prop] = source[prop];
  8249. } else if (typeof target[prop] !== "object") {
  8250. target[prop] = source[prop];
  8251. } else if (typeof source[prop] !== "object") {
  8252. target[prop] = source[prop];
  8253. } else if (target[prop].concat && source[prop].concat) {
  8254. target[prop] = target[prop].concat(source[prop]);
  8255. } else {
  8256. target[prop] = shallowMerge(target[prop], source[prop]);
  8257. }
  8258. } else {
  8259. target[prop] = source[prop];
  8260. }
  8261. }
  8262. return target;
  8263. }
  8264. function error(err) {
  8265. {
  8266. console.error(`uView提示:${err}`);
  8267. }
  8268. }
  8269. function randomArray(array2 = []) {
  8270. return array2.sort(() => Math.random() - 0.5);
  8271. }
  8272. if (!String.prototype.padStart) {
  8273. String.prototype.padStart = function(maxLength, fillString = " ") {
  8274. if (Object.prototype.toString.call(fillString) !== "[object String]") {
  8275. throw new TypeError(
  8276. "fillString must be String"
  8277. );
  8278. }
  8279. const str = this;
  8280. if (str.length >= maxLength)
  8281. return String(str);
  8282. const fillLength = maxLength - str.length;
  8283. let times2 = Math.ceil(fillLength / fillString.length);
  8284. while (times2 >>= 1) {
  8285. fillString += fillString;
  8286. if (times2 === 1) {
  8287. fillString += fillString;
  8288. }
  8289. }
  8290. return fillString.slice(0, fillLength) + str;
  8291. };
  8292. }
  8293. function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
  8294. let date2;
  8295. if (!dateTime) {
  8296. date2 = new Date();
  8297. } else if (/^\d{10}$/.test(dateTime.toString().trim())) {
  8298. date2 = new Date(dateTime * 1e3);
  8299. } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
  8300. date2 = new Date(Number(dateTime));
  8301. } else {
  8302. date2 = new Date(
  8303. typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
  8304. );
  8305. }
  8306. const timeSource = {
  8307. "y": date2.getFullYear().toString(),
  8308. // 年
  8309. "m": (date2.getMonth() + 1).toString().padStart(2, "0"),
  8310. // 月
  8311. "d": date2.getDate().toString().padStart(2, "0"),
  8312. // 日
  8313. "h": date2.getHours().toString().padStart(2, "0"),
  8314. // 时
  8315. "M": date2.getMinutes().toString().padStart(2, "0"),
  8316. // 分
  8317. "s": date2.getSeconds().toString().padStart(2, "0")
  8318. // 秒
  8319. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  8320. };
  8321. for (const key in timeSource) {
  8322. const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
  8323. if (ret) {
  8324. const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
  8325. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  8326. }
  8327. }
  8328. return formatStr;
  8329. }
  8330. function timeFrom(timestamp = null, format = "yyyy-mm-dd") {
  8331. if (timestamp == null)
  8332. timestamp = Number(new Date());
  8333. timestamp = parseInt(timestamp);
  8334. if (timestamp.toString().length == 10)
  8335. timestamp *= 1e3;
  8336. let timer = new Date().getTime() - timestamp;
  8337. timer = parseInt(timer / 1e3);
  8338. let tips = "";
  8339. switch (true) {
  8340. case timer < 300:
  8341. tips = "刚刚";
  8342. break;
  8343. case (timer >= 300 && timer < 3600):
  8344. tips = `${parseInt(timer / 60)}分钟前`;
  8345. break;
  8346. case (timer >= 3600 && timer < 86400):
  8347. tips = `${parseInt(timer / 3600)}小时前`;
  8348. break;
  8349. case (timer >= 86400 && timer < 2592e3):
  8350. tips = `${parseInt(timer / 86400)}天前`;
  8351. break;
  8352. default:
  8353. if (format === false) {
  8354. if (timer >= 2592e3 && timer < 365 * 86400) {
  8355. tips = `${parseInt(timer / (86400 * 30))}个月前`;
  8356. } else {
  8357. tips = `${parseInt(timer / (86400 * 365))}年前`;
  8358. }
  8359. } else {
  8360. tips = timeFormat(timestamp, format);
  8361. }
  8362. }
  8363. return tips;
  8364. }
  8365. function trim(str, pos = "both") {
  8366. str = String(str);
  8367. if (pos == "both") {
  8368. return str.replace(/^\s+|\s+$/g, "");
  8369. }
  8370. if (pos == "left") {
  8371. return str.replace(/^\s*/, "");
  8372. }
  8373. if (pos == "right") {
  8374. return str.replace(/(\s*$)/g, "");
  8375. }
  8376. if (pos == "all") {
  8377. return str.replace(/\s+/g, "");
  8378. }
  8379. return str;
  8380. }
  8381. function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
  8382. const prefix = isPrefix ? "?" : "";
  8383. const _result = [];
  8384. if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
  8385. arrayFormat = "brackets";
  8386. for (const key in data) {
  8387. const value2 = data[key];
  8388. if (["", void 0, null].indexOf(value2) >= 0) {
  8389. continue;
  8390. }
  8391. if (value2.constructor === Array) {
  8392. switch (arrayFormat) {
  8393. case "indices":
  8394. for (let i2 = 0; i2 < value2.length; i2++) {
  8395. _result.push(`${key}[${i2}]=${value2[i2]}`);
  8396. }
  8397. break;
  8398. case "brackets":
  8399. value2.forEach((_value) => {
  8400. _result.push(`${key}[]=${_value}`);
  8401. });
  8402. break;
  8403. case "repeat":
  8404. value2.forEach((_value) => {
  8405. _result.push(`${key}=${_value}`);
  8406. });
  8407. break;
  8408. case "comma":
  8409. let commaStr = "";
  8410. value2.forEach((_value) => {
  8411. commaStr += (commaStr ? "," : "") + _value;
  8412. });
  8413. _result.push(`${key}=${commaStr}`);
  8414. break;
  8415. default:
  8416. value2.forEach((_value) => {
  8417. _result.push(`${key}[]=${_value}`);
  8418. });
  8419. }
  8420. } else {
  8421. _result.push(`${key}=${value2}`);
  8422. }
  8423. }
  8424. return _result.length ? prefix + _result.join("&") : "";
  8425. }
  8426. function toast(title, duration = 2e3) {
  8427. index$1.showToast({
  8428. title: String(title),
  8429. icon: "none",
  8430. duration
  8431. });
  8432. }
  8433. function type2icon(type = "success", fill = false) {
  8434. if (["primary", "info", "error", "warning", "success"].indexOf(type) == -1)
  8435. type = "success";
  8436. let iconName = "";
  8437. switch (type) {
  8438. case "primary":
  8439. iconName = "info-circle";
  8440. break;
  8441. case "info":
  8442. iconName = "info-circle";
  8443. break;
  8444. case "error":
  8445. iconName = "close-circle";
  8446. break;
  8447. case "warning":
  8448. iconName = "error-circle";
  8449. break;
  8450. case "success":
  8451. iconName = "checkmark-circle";
  8452. break;
  8453. default:
  8454. iconName = "checkmark-circle";
  8455. }
  8456. if (fill)
  8457. iconName += "-fill";
  8458. return iconName;
  8459. }
  8460. function priceFormat(number2, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
  8461. number2 = `${number2}`.replace(/[^0-9+-Ee.]/g, "");
  8462. const n2 = !isFinite(+number2) ? 0 : +number2;
  8463. const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  8464. const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
  8465. const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
  8466. let s2 = "";
  8467. s2 = (prec ? round(n2, prec) + "" : `${Math.round(n2)}`).split(".");
  8468. const re2 = /(-?\d+)(\d{3})/;
  8469. while (re2.test(s2[0])) {
  8470. s2[0] = s2[0].replace(re2, `$1${sep}$2`);
  8471. }
  8472. if ((s2[1] || "").length < prec) {
  8473. s2[1] = s2[1] || "";
  8474. s2[1] += new Array(prec - s2[1].length + 1).join("0");
  8475. }
  8476. return s2.join(dec);
  8477. }
  8478. function getDuration(value2, unit = true) {
  8479. const valueNum = parseInt(value2);
  8480. if (unit) {
  8481. if (/s$/.test(value2))
  8482. return value2;
  8483. return value2 > 30 ? `${value2}ms` : `${value2}s`;
  8484. }
  8485. if (/ms$/.test(value2))
  8486. return valueNum;
  8487. if (/s$/.test(value2))
  8488. return valueNum > 30 ? valueNum : valueNum * 1e3;
  8489. return valueNum;
  8490. }
  8491. function padZero(value2) {
  8492. return `00${value2}`.slice(-2);
  8493. }
  8494. function formValidate(instance, event) {
  8495. const formItem = $parent.call(instance, "u-form-item");
  8496. const form = $parent.call(instance, "u-form");
  8497. if (formItem && form) {
  8498. form.validateField(formItem.prop, () => {
  8499. }, event);
  8500. }
  8501. }
  8502. function getProperty(obj, key) {
  8503. if (typeof obj !== "object" || null == obj) {
  8504. return "";
  8505. }
  8506. if (typeof key !== "string" || key === "") {
  8507. return "";
  8508. }
  8509. if (key.indexOf(".") !== -1) {
  8510. const keys = key.split(".");
  8511. let firstObj = obj[keys[0]] || {};
  8512. for (let i2 = 1; i2 < keys.length; i2++) {
  8513. if (firstObj) {
  8514. firstObj = firstObj[keys[i2]];
  8515. }
  8516. }
  8517. return firstObj;
  8518. }
  8519. return obj[key];
  8520. }
  8521. function setProperty(obj, key, value2) {
  8522. if (typeof obj !== "object" || null == obj) {
  8523. return;
  8524. }
  8525. const inFn = function(_obj, keys, v2) {
  8526. if (keys.length === 1) {
  8527. _obj[keys[0]] = v2;
  8528. return;
  8529. }
  8530. while (keys.length > 1) {
  8531. const k2 = keys[0];
  8532. if (!_obj[k2] || typeof _obj[k2] !== "object") {
  8533. _obj[k2] = {};
  8534. }
  8535. keys.shift();
  8536. inFn(_obj[k2], keys, v2);
  8537. }
  8538. };
  8539. if (typeof key !== "string" || key === "")
  8540. ;
  8541. else if (key.indexOf(".") !== -1) {
  8542. const keys = key.split(".");
  8543. inFn(obj, keys, value2);
  8544. } else {
  8545. obj[key] = value2;
  8546. }
  8547. }
  8548. function page() {
  8549. const pages2 = getCurrentPages();
  8550. return `/${pages2[pages2.length - 1].route || ""}`;
  8551. }
  8552. function pages$1() {
  8553. const pages2 = getCurrentPages();
  8554. return pages2;
  8555. }
  8556. function getValueByPath(obj, path) {
  8557. const pathArr = path.split(".");
  8558. return pathArr.reduce((acc, curr) => {
  8559. return acc && acc[curr] !== void 0 ? acc[curr] : void 0;
  8560. }, obj);
  8561. }
  8562. function genLightColor(textColor, lightness = 95) {
  8563. const rgb = parseColorWithoutDOM(textColor);
  8564. const hsl = rgbToHsl(rgb.r, rgb.g, rgb.b);
  8565. const bgHsl = {
  8566. h: hsl.h,
  8567. s: hsl.s,
  8568. l: Math.min(lightness, 95)
  8569. };
  8570. return hslToHex(bgHsl.h, bgHsl.s, bgHsl.l);
  8571. }
  8572. function parseColorWithoutDOM(colorStr) {
  8573. const str = colorStr.toLowerCase().trim();
  8574. if (str.startsWith("#")) {
  8575. const hex = str.replace("#", "");
  8576. const fullHex = hex.length === 3 ? hex.split("").map((c2) => c2 + c2).join("") : hex;
  8577. return {
  8578. r: parseInt(fullHex.substring(0, 2), 16),
  8579. g: parseInt(fullHex.substring(2, 4), 16),
  8580. b: parseInt(fullHex.substring(4, 6), 16)
  8581. };
  8582. }
  8583. const rgbMatch = str.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
  8584. if (rgbMatch) {
  8585. return {
  8586. r: +rgbMatch[1],
  8587. g: +rgbMatch[2],
  8588. b: +rgbMatch[3]
  8589. };
  8590. }
  8591. throw new Error("Invalid color format");
  8592. }
  8593. function rgbToHsl(r2, g2, b2) {
  8594. r2 /= 255, g2 /= 255, b2 /= 255;
  8595. const max = Math.max(r2, g2, b2), min = Math.min(r2, g2, b2);
  8596. let h2, s2, l2 = (max + min) / 2;
  8597. if (max === min) {
  8598. h2 = s2 = 0;
  8599. } else {
  8600. const d2 = max - min;
  8601. s2 = l2 > 0.5 ? d2 / (2 - max - min) : d2 / (max + min);
  8602. switch (max) {
  8603. case r2:
  8604. h2 = (g2 - b2) / d2 + (g2 < b2 ? 6 : 0);
  8605. break;
  8606. case g2:
  8607. h2 = (b2 - r2) / d2 + 2;
  8608. break;
  8609. case b2:
  8610. h2 = (r2 - g2) / d2 + 4;
  8611. break;
  8612. }
  8613. h2 = (h2 * 60).toFixed(1);
  8614. }
  8615. return { h: +h2, s: +(s2 * 100).toFixed(1), l: +(l2 * 100).toFixed(1) };
  8616. }
  8617. function hslToHex(h2, s2, l2) {
  8618. l2 /= 100;
  8619. const a2 = s2 * Math.min(l2, 1 - l2) / 100;
  8620. const f2 = (n2) => {
  8621. const k2 = (n2 + h2 / 30) % 12;
  8622. const color2 = l2 - a2 * Math.max(Math.min(k2 - 3, 9 - k2, 1), -1);
  8623. return Math.round(255 * color2).toString(16).padStart(2, "0");
  8624. };
  8625. return `#${f2(0)}${f2(8)}${f2(4)}`;
  8626. }
  8627. const index = {
  8628. range,
  8629. getPx,
  8630. sleep,
  8631. os: os$1,
  8632. sys,
  8633. getWindowInfo,
  8634. random,
  8635. guid,
  8636. $parent,
  8637. addStyle,
  8638. addUnit,
  8639. deepClone,
  8640. deepMerge: deepMerge$1,
  8641. shallowMerge,
  8642. error,
  8643. randomArray,
  8644. timeFormat,
  8645. timeFrom,
  8646. trim,
  8647. queryParams,
  8648. toast,
  8649. type2icon,
  8650. priceFormat,
  8651. getDuration,
  8652. padZero,
  8653. formValidate,
  8654. getProperty,
  8655. setProperty,
  8656. page,
  8657. pages: pages$1,
  8658. getValueByPath,
  8659. genLightColor
  8660. };
  8661. class Router {
  8662. constructor() {
  8663. this.config = {
  8664. type: "navigateTo",
  8665. url: "",
  8666. delta: 1,
  8667. // navigateBack页面后退时,回退的层数
  8668. params: {},
  8669. // 传递的参数
  8670. animationType: "pop-in",
  8671. // 窗口动画,只在APP有效
  8672. animationDuration: 300,
  8673. // 窗口动画持续时间,单位毫秒,只在APP有效
  8674. intercept: false
  8675. // 是否需要拦截
  8676. };
  8677. this.route = this.route.bind(this);
  8678. }
  8679. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  8680. addRootPath(url2) {
  8681. return url2[0] === "/" ? url2 : `/${url2}`;
  8682. }
  8683. // 整合路由参数
  8684. mixinParam(url2, params) {
  8685. url2 = url2 && this.addRootPath(url2);
  8686. let query = "";
  8687. if (/.*\/.*\?.*=.*/.test(url2)) {
  8688. query = queryParams(params, false);
  8689. return url2 += `&${query}`;
  8690. }
  8691. query = queryParams(params);
  8692. return url2 += query;
  8693. }
  8694. // 对外的方法名称
  8695. async route(options = {}, params = {}) {
  8696. let mergeConfig2 = {};
  8697. if (typeof options === "string") {
  8698. mergeConfig2.url = this.mixinParam(options, params);
  8699. mergeConfig2.type = "navigateTo";
  8700. } else {
  8701. mergeConfig2 = deepMerge$1(this.config, options);
  8702. mergeConfig2.url = this.mixinParam(options.url, options.params);
  8703. }
  8704. if (mergeConfig2.url === page())
  8705. return;
  8706. if (params.intercept) {
  8707. this.config.intercept = params.intercept;
  8708. }
  8709. mergeConfig2.params = params;
  8710. mergeConfig2 = deepMerge$1(this.config, mergeConfig2);
  8711. if (typeof index$1.$u.routeIntercept === "function") {
  8712. const isNext = await new Promise((resolve2, reject) => {
  8713. index$1.$u.routeIntercept(mergeConfig2, resolve2);
  8714. });
  8715. isNext && this.openPage(mergeConfig2);
  8716. } else {
  8717. this.openPage(mergeConfig2);
  8718. }
  8719. }
  8720. // 执行路由跳转
  8721. openPage(config2) {
  8722. const {
  8723. url: url2,
  8724. type,
  8725. delta,
  8726. animationType,
  8727. animationDuration
  8728. } = config2;
  8729. if (config2.type == "navigateTo" || config2.type == "to") {
  8730. index$1.navigateTo({
  8731. url: url2,
  8732. animationType,
  8733. animationDuration
  8734. });
  8735. }
  8736. if (config2.type == "redirectTo" || config2.type == "redirect") {
  8737. index$1.redirectTo({
  8738. url: url2
  8739. });
  8740. }
  8741. if (config2.type == "switchTab" || config2.type == "tab") {
  8742. index$1.switchTab({
  8743. url: url2
  8744. });
  8745. }
  8746. if (config2.type == "reLaunch" || config2.type == "launch") {
  8747. index$1.reLaunch({
  8748. url: url2
  8749. });
  8750. }
  8751. if (config2.type == "navigateBack" || config2.type == "back") {
  8752. index$1.navigateBack({
  8753. delta
  8754. });
  8755. }
  8756. }
  8757. }
  8758. const route = new Router().route;
  8759. const mixin = defineMixin({
  8760. // 定义每个组件都可能需要用到的外部样式以及类名
  8761. props: {
  8762. // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
  8763. customStyle: {
  8764. type: [Object, String],
  8765. default: () => ({})
  8766. },
  8767. customClass: {
  8768. type: String,
  8769. default: ""
  8770. },
  8771. // 跳转的页面路径
  8772. url: {
  8773. type: String,
  8774. default: ""
  8775. },
  8776. // 页面跳转的类型
  8777. linkType: {
  8778. type: String,
  8779. default: "navigateTo"
  8780. }
  8781. },
  8782. data() {
  8783. return {};
  8784. },
  8785. onLoad() {
  8786. this.$u.getRect = this.$uGetRect;
  8787. },
  8788. created() {
  8789. this.$u.getRect = this.$uGetRect;
  8790. },
  8791. computed: {
  8792. // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
  8793. // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
  8794. // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
  8795. $u() {
  8796. return deepMerge$1(index$1.$u, {
  8797. props: void 0,
  8798. http: void 0,
  8799. mixin: void 0
  8800. });
  8801. },
  8802. /**
  8803. * 生成bem规则类名
  8804. * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
  8805. * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
  8806. * @param {String} name 组件名称
  8807. * @param {Array} fixed 一直会存在的类名
  8808. * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
  8809. * @returns {Array|string}
  8810. */
  8811. bem() {
  8812. return function(name, fixed, change) {
  8813. const prefix = `u-${name}--`;
  8814. const classes = {};
  8815. if (fixed) {
  8816. fixed.map((item) => {
  8817. classes[prefix + this[item]] = true;
  8818. });
  8819. }
  8820. if (change) {
  8821. change.map((item) => {
  8822. this[item] ? classes[prefix + item] = this[item] : delete classes[prefix + item];
  8823. });
  8824. }
  8825. return Object.keys(classes);
  8826. };
  8827. }
  8828. },
  8829. methods: {
  8830. // 跳转某一个页面
  8831. openPage(urlKey = "url") {
  8832. const url2 = this[urlKey];
  8833. if (url2) {
  8834. route({ type: this.linkType, url: url2 });
  8835. }
  8836. },
  8837. navTo(url2 = "", linkType = "navigateTo") {
  8838. route({ type: this.linkType, url: url2 });
  8839. },
  8840. // 查询节点信息
  8841. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  8842. // 解决办法为在组件根部再套一个没有任何作用的view元素
  8843. $uGetRect(selector, all) {
  8844. return new Promise((resolve2) => {
  8845. index$1.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
  8846. if (all && Array.isArray(rect) && rect.length) {
  8847. resolve2(rect);
  8848. }
  8849. if (!all && rect) {
  8850. resolve2(rect);
  8851. }
  8852. }).exec();
  8853. });
  8854. },
  8855. getParentData(parentName = "") {
  8856. if (!this.parent)
  8857. this.parent = {};
  8858. this.parent = $parent.call(this, parentName);
  8859. if (this.parent.children) {
  8860. this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
  8861. }
  8862. if (this.parent && this.parentData) {
  8863. Object.keys(this.parentData).map((key) => {
  8864. this.parentData[key] = this.parent[key];
  8865. });
  8866. }
  8867. },
  8868. // 阻止事件冒泡
  8869. preventEvent(e2) {
  8870. e2 && typeof e2.stopPropagation === "function" && e2.stopPropagation();
  8871. },
  8872. // 空操作
  8873. noop(e2) {
  8874. this.preventEvent(e2);
  8875. }
  8876. },
  8877. onReachBottom() {
  8878. index$1.$emit("uOnReachBottom");
  8879. },
  8880. beforeUnmount() {
  8881. if (this.parent && test.array(this.parent.children)) {
  8882. const childrenList = this.parent.children;
  8883. childrenList.map((child, index2) => {
  8884. if (child === this) {
  8885. childrenList.splice(index2, 1);
  8886. }
  8887. });
  8888. }
  8889. }
  8890. });
  8891. const mpMixin = defineMixin({
  8892. // 将自定义节点设置成虚拟的,更加接近Vue组件的表现,能更好的使用flex属性
  8893. options: {
  8894. virtualHost: true
  8895. }
  8896. });
  8897. function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
  8898. const startRGB = hexToRgb(startColor, false);
  8899. const startR = startRGB[0];
  8900. const startG = startRGB[1];
  8901. const startB = startRGB[2];
  8902. const endRGB = hexToRgb(endColor, false);
  8903. const endR = endRGB[0];
  8904. const endG = endRGB[1];
  8905. const endB = endRGB[2];
  8906. const sR = (endR - startR) / step;
  8907. const sG = (endG - startG) / step;
  8908. const sB = (endB - startB) / step;
  8909. const colorArr = [];
  8910. for (let i2 = 0; i2 < step; i2++) {
  8911. let hex = rgbToHex(`rgb(${Math.round(sR * i2 + startR)},${Math.round(sG * i2 + startG)},${Math.round(sB * i2 + startB)})`);
  8912. if (i2 === 0)
  8913. hex = rgbToHex(startColor);
  8914. if (i2 === step - 1)
  8915. hex = rgbToHex(endColor);
  8916. colorArr.push(hex);
  8917. }
  8918. return colorArr;
  8919. }
  8920. function hexToRgb(sColor, str = true) {
  8921. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  8922. sColor = String(sColor).toLowerCase();
  8923. if (sColor && reg.test(sColor)) {
  8924. if (sColor.length === 4) {
  8925. let sColorNew = "#";
  8926. for (let i2 = 1; i2 < 4; i2 += 1) {
  8927. sColorNew += sColor.slice(i2, i2 + 1).concat(sColor.slice(i2, i2 + 1));
  8928. }
  8929. sColor = sColorNew;
  8930. }
  8931. const sColorChange = [];
  8932. for (let i2 = 1; i2 < 7; i2 += 2) {
  8933. sColorChange.push(parseInt(`0x${sColor.slice(i2, i2 + 2)}`));
  8934. }
  8935. if (!str) {
  8936. return sColorChange;
  8937. }
  8938. return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
  8939. }
  8940. if (/^(rgb|RGB)/.test(sColor)) {
  8941. const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  8942. return arr.map((val) => Number(val));
  8943. }
  8944. return sColor;
  8945. }
  8946. function rgbToHex(rgb) {
  8947. const _this = rgb;
  8948. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  8949. if (/^(rgb|RGB)/.test(_this)) {
  8950. const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  8951. let strHex = "#";
  8952. for (let i2 = 0; i2 < aColor.length; i2++) {
  8953. let hex = Number(aColor[i2]).toString(16);
  8954. hex = String(hex).length == 1 ? `${0}${hex}` : hex;
  8955. if (hex === "0") {
  8956. hex += hex;
  8957. }
  8958. strHex += hex;
  8959. }
  8960. if (strHex.length !== 7) {
  8961. strHex = _this;
  8962. }
  8963. return strHex;
  8964. }
  8965. if (reg.test(_this)) {
  8966. const aNum = _this.replace(/#/, "").split("");
  8967. if (aNum.length === 6) {
  8968. return _this;
  8969. }
  8970. if (aNum.length === 3) {
  8971. let numHex = "#";
  8972. for (let i2 = 0; i2 < aNum.length; i2 += 1) {
  8973. numHex += aNum[i2] + aNum[i2];
  8974. }
  8975. return numHex;
  8976. }
  8977. } else {
  8978. return _this;
  8979. }
  8980. }
  8981. function colorToRgba(color2, alpha) {
  8982. color2 = rgbToHex(color2);
  8983. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  8984. let sColor = String(color2).toLowerCase();
  8985. if (sColor && reg.test(sColor)) {
  8986. if (sColor.length === 4) {
  8987. let sColorNew = "#";
  8988. for (let i2 = 1; i2 < 4; i2 += 1) {
  8989. sColorNew += sColor.slice(i2, i2 + 1).concat(sColor.slice(i2, i2 + 1));
  8990. }
  8991. sColor = sColorNew;
  8992. }
  8993. const sColorChange = [];
  8994. for (let i2 = 1; i2 < 7; i2 += 2) {
  8995. sColorChange.push(parseInt(`0x${sColor.slice(i2, i2 + 2)}`));
  8996. }
  8997. return `rgba(${sColorChange.join(",")},${alpha})`;
  8998. }
  8999. return sColor;
  9000. }
  9001. const colorGradient$1 = {
  9002. colorGradient,
  9003. hexToRgb,
  9004. rgbToHex,
  9005. colorToRgba
  9006. };
  9007. let timeout = null;
  9008. function debounce(func2, wait = 500, immediate = false) {
  9009. if (timeout !== null)
  9010. clearTimeout(timeout);
  9011. if (immediate) {
  9012. const callNow = !timeout;
  9013. timeout = setTimeout(() => {
  9014. timeout = null;
  9015. }, wait);
  9016. if (callNow)
  9017. typeof func2 === "function" && func2();
  9018. } else {
  9019. timeout = setTimeout(() => {
  9020. typeof func2 === "function" && func2();
  9021. }, wait);
  9022. }
  9023. }
  9024. let flag;
  9025. function throttle(func2, wait = 500, immediate = true) {
  9026. if (immediate) {
  9027. if (!flag) {
  9028. flag = true;
  9029. typeof func2 === "function" && func2();
  9030. setTimeout(() => {
  9031. flag = false;
  9032. }, wait);
  9033. }
  9034. } else if (!flag) {
  9035. flag = true;
  9036. setTimeout(() => {
  9037. flag = false;
  9038. typeof func2 === "function" && func2();
  9039. }, wait);
  9040. }
  9041. }
  9042. const zIndex = {
  9043. toast: 10090,
  9044. noNetwork: 10080,
  9045. // popup包含popup,actionsheet,keyboard,picker的值
  9046. popup: 10075,
  9047. mask: 10070,
  9048. navbar: 980,
  9049. topTips: 975,
  9050. sticky: 970,
  9051. indexListSticky: 965
  9052. };
  9053. const color$3 = {
  9054. primary: "#3c9cff",
  9055. info: "#909399",
  9056. default: "#909399",
  9057. warning: "#f9ae3d",
  9058. error: "#f56c6c",
  9059. success: "#5ac725",
  9060. mainColor: "#303133",
  9061. contentColor: "#606266",
  9062. tipsColor: "#909399",
  9063. lightColor: "#c0c4cc",
  9064. borderColor: "#e4e7ed"
  9065. };
  9066. const { toString } = Object.prototype;
  9067. function isArray(val) {
  9068. return toString.call(val) === "[object Array]";
  9069. }
  9070. function isObject(val) {
  9071. return val !== null && typeof val === "object";
  9072. }
  9073. function isDate(val) {
  9074. return toString.call(val) === "[object Date]";
  9075. }
  9076. function isURLSearchParams(val) {
  9077. return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
  9078. }
  9079. function forEach(obj, fn) {
  9080. if (obj === null || typeof obj === "undefined") {
  9081. return;
  9082. }
  9083. if (typeof obj !== "object") {
  9084. obj = [obj];
  9085. }
  9086. if (isArray(obj)) {
  9087. for (let i2 = 0, l2 = obj.length; i2 < l2; i2++) {
  9088. fn.call(null, obj[i2], i2, obj);
  9089. }
  9090. } else {
  9091. for (const key in obj) {
  9092. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  9093. fn.call(null, obj[key], key, obj);
  9094. }
  9095. }
  9096. }
  9097. }
  9098. function isPlainObject(obj) {
  9099. return Object.prototype.toString.call(obj) === "[object Object]";
  9100. }
  9101. function deepMerge() {
  9102. const result = {};
  9103. function assignValue(val, key) {
  9104. if (typeof result[key] === "object" && typeof val === "object") {
  9105. result[key] = deepMerge(result[key], val);
  9106. } else if (typeof val === "object") {
  9107. result[key] = deepMerge({}, val);
  9108. } else {
  9109. result[key] = val;
  9110. }
  9111. }
  9112. for (let i2 = 0, l2 = arguments.length; i2 < l2; i2++) {
  9113. forEach(arguments[i2], assignValue);
  9114. }
  9115. return result;
  9116. }
  9117. function isUndefined(val) {
  9118. return typeof val === "undefined";
  9119. }
  9120. function encode(val) {
  9121. return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  9122. }
  9123. function buildURL(url2, params) {
  9124. if (!params) {
  9125. return url2;
  9126. }
  9127. let serializedParams;
  9128. if (isURLSearchParams(params)) {
  9129. serializedParams = params.toString();
  9130. } else {
  9131. const parts = [];
  9132. forEach(params, (val, key) => {
  9133. if (val === null || typeof val === "undefined") {
  9134. return;
  9135. }
  9136. if (isArray(val)) {
  9137. key = `${key}[]`;
  9138. } else {
  9139. val = [val];
  9140. }
  9141. forEach(val, (v2) => {
  9142. if (isDate(v2)) {
  9143. v2 = v2.toISOString();
  9144. } else if (isObject(v2)) {
  9145. v2 = JSON.stringify(v2);
  9146. }
  9147. parts.push(`${encode(key)}=${encode(v2)}`);
  9148. });
  9149. });
  9150. serializedParams = parts.join("&");
  9151. }
  9152. if (serializedParams) {
  9153. const hashmarkIndex = url2.indexOf("#");
  9154. if (hashmarkIndex !== -1) {
  9155. url2 = url2.slice(0, hashmarkIndex);
  9156. }
  9157. url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  9158. }
  9159. return url2;
  9160. }
  9161. function isAbsoluteURL(url2) {
  9162. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
  9163. }
  9164. function combineURLs(baseURL, relativeURL) {
  9165. return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
  9166. }
  9167. function buildFullPath(baseURL, requestedURL) {
  9168. if (baseURL && !isAbsoluteURL(requestedURL)) {
  9169. return combineURLs(baseURL, requestedURL);
  9170. }
  9171. return requestedURL;
  9172. }
  9173. function settle(resolve2, reject, response) {
  9174. const { validateStatus: validateStatus2 } = response.config;
  9175. const status = response.statusCode;
  9176. if (status && (!validateStatus2 || validateStatus2(status))) {
  9177. resolve2(response);
  9178. } else {
  9179. reject(response);
  9180. }
  9181. }
  9182. const mergeKeys$1 = (keys, config2) => {
  9183. const config3 = {};
  9184. keys.forEach((prop) => {
  9185. if (!isUndefined(config2[prop])) {
  9186. config3[prop] = config2[prop];
  9187. }
  9188. });
  9189. return config3;
  9190. };
  9191. const adapter = (config2) => new Promise((resolve2, reject) => {
  9192. const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params);
  9193. const _config = {
  9194. url: fullPath,
  9195. header: config2.header,
  9196. complete: (response) => {
  9197. config2.fullPath = fullPath;
  9198. response.config = config2;
  9199. try {
  9200. if (typeof response.data === "string") {
  9201. response.data = JSON.parse(response.data);
  9202. }
  9203. } catch (e2) {
  9204. }
  9205. settle(resolve2, reject, response);
  9206. }
  9207. };
  9208. let requestTask;
  9209. if (config2.method === "UPLOAD") {
  9210. delete _config.header["content-type"];
  9211. delete _config.header["Content-Type"];
  9212. const otherConfig = {
  9213. filePath: config2.filePath,
  9214. name: config2.name
  9215. };
  9216. const optionalKeys = [
  9217. "formData"
  9218. ];
  9219. requestTask = index$1.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
  9220. } else if (config2.method === "DOWNLOAD") {
  9221. requestTask = index$1.downloadFile(_config);
  9222. } else {
  9223. const optionalKeys = [
  9224. "data",
  9225. "method",
  9226. "timeout",
  9227. "dataType",
  9228. "responseType"
  9229. ];
  9230. requestTask = index$1.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
  9231. }
  9232. if (config2.getTask) {
  9233. config2.getTask(requestTask, config2);
  9234. }
  9235. });
  9236. const dispatchRequest = (config2) => adapter(config2);
  9237. function InterceptorManager() {
  9238. this.handlers = [];
  9239. }
  9240. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  9241. this.handlers.push({
  9242. fulfilled,
  9243. rejected
  9244. });
  9245. return this.handlers.length - 1;
  9246. };
  9247. InterceptorManager.prototype.eject = function eject(id) {
  9248. if (this.handlers[id]) {
  9249. this.handlers[id] = null;
  9250. }
  9251. };
  9252. InterceptorManager.prototype.forEach = function forEach2(fn) {
  9253. this.handlers.forEach((h2) => {
  9254. if (h2 !== null) {
  9255. fn(h2);
  9256. }
  9257. });
  9258. };
  9259. const mergeKeys = (keys, globalsConfig, config2) => {
  9260. const config3 = {};
  9261. keys.forEach((prop) => {
  9262. if (!isUndefined(config2[prop])) {
  9263. config3[prop] = config2[prop];
  9264. } else if (!isUndefined(globalsConfig[prop])) {
  9265. config3[prop] = globalsConfig[prop];
  9266. }
  9267. });
  9268. return config3;
  9269. };
  9270. const mergeConfig = (globalsConfig, config2 = {}) => {
  9271. const method = config2.method || globalsConfig.method || "GET";
  9272. let config3 = {
  9273. baseURL: globalsConfig.baseURL || "",
  9274. method,
  9275. url: config2.url || "",
  9276. params: config2.params || {},
  9277. custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
  9278. header: deepMerge(globalsConfig.header || {}, config2.header || {})
  9279. };
  9280. const defaultToConfig2Keys = ["getTask", "validateStatus"];
  9281. config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
  9282. if (method === "DOWNLOAD")
  9283. ;
  9284. else if (method === "UPLOAD") {
  9285. delete config3.header["content-type"];
  9286. delete config3.header["Content-Type"];
  9287. const uploadKeys = [
  9288. "filePath",
  9289. "name",
  9290. "formData"
  9291. ];
  9292. uploadKeys.forEach((prop) => {
  9293. if (!isUndefined(config2[prop])) {
  9294. config3[prop] = config2[prop];
  9295. }
  9296. });
  9297. } else {
  9298. const defaultsKeys = [
  9299. "data",
  9300. "timeout",
  9301. "dataType",
  9302. "responseType"
  9303. ];
  9304. config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
  9305. }
  9306. return config3;
  9307. };
  9308. const defaults = {
  9309. baseURL: "",
  9310. header: {},
  9311. method: "GET",
  9312. dataType: "json",
  9313. responseType: "text",
  9314. custom: {},
  9315. timeout: 6e4,
  9316. validateStatus: function validateStatus(status) {
  9317. return status >= 200 && status < 300;
  9318. }
  9319. };
  9320. var clone = function() {
  9321. function _instanceof(obj, type) {
  9322. return type != null && obj instanceof type;
  9323. }
  9324. var nativeMap;
  9325. try {
  9326. nativeMap = Map;
  9327. } catch (_2) {
  9328. nativeMap = function() {
  9329. };
  9330. }
  9331. var nativeSet;
  9332. try {
  9333. nativeSet = Set;
  9334. } catch (_2) {
  9335. nativeSet = function() {
  9336. };
  9337. }
  9338. var nativePromise;
  9339. try {
  9340. nativePromise = Promise;
  9341. } catch (_2) {
  9342. nativePromise = function() {
  9343. };
  9344. }
  9345. function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
  9346. if (typeof circular === "object") {
  9347. depth = circular.depth;
  9348. prototype = circular.prototype;
  9349. includeNonEnumerable = circular.includeNonEnumerable;
  9350. circular = circular.circular;
  9351. }
  9352. var allParents = [];
  9353. var allChildren = [];
  9354. var useBuffer = typeof Buffer != "undefined";
  9355. if (typeof circular == "undefined")
  9356. circular = true;
  9357. if (typeof depth == "undefined")
  9358. depth = Infinity;
  9359. function _clone(parent2, depth2) {
  9360. if (parent2 === null)
  9361. return null;
  9362. if (depth2 === 0)
  9363. return parent2;
  9364. var child;
  9365. var proto;
  9366. if (typeof parent2 != "object") {
  9367. return parent2;
  9368. }
  9369. if (_instanceof(parent2, nativeMap)) {
  9370. child = new nativeMap();
  9371. } else if (_instanceof(parent2, nativeSet)) {
  9372. child = new nativeSet();
  9373. } else if (_instanceof(parent2, nativePromise)) {
  9374. child = new nativePromise(function(resolve2, reject) {
  9375. parent2.then(function(value2) {
  9376. resolve2(_clone(value2, depth2 - 1));
  9377. }, function(err) {
  9378. reject(_clone(err, depth2 - 1));
  9379. });
  9380. });
  9381. } else if (clone2.__isArray(parent2)) {
  9382. child = [];
  9383. } else if (clone2.__isRegExp(parent2)) {
  9384. child = new RegExp(parent2.source, __getRegExpFlags(parent2));
  9385. if (parent2.lastIndex)
  9386. child.lastIndex = parent2.lastIndex;
  9387. } else if (clone2.__isDate(parent2)) {
  9388. child = new Date(parent2.getTime());
  9389. } else if (useBuffer && Buffer.isBuffer(parent2)) {
  9390. if (Buffer.from) {
  9391. child = Buffer.from(parent2);
  9392. } else {
  9393. child = new Buffer(parent2.length);
  9394. parent2.copy(child);
  9395. }
  9396. return child;
  9397. } else if (_instanceof(parent2, Error)) {
  9398. child = Object.create(parent2);
  9399. } else {
  9400. if (typeof prototype == "undefined") {
  9401. proto = Object.getPrototypeOf(parent2);
  9402. child = Object.create(proto);
  9403. } else {
  9404. child = Object.create(prototype);
  9405. proto = prototype;
  9406. }
  9407. }
  9408. if (circular) {
  9409. var index2 = allParents.indexOf(parent2);
  9410. if (index2 != -1) {
  9411. return allChildren[index2];
  9412. }
  9413. allParents.push(parent2);
  9414. allChildren.push(child);
  9415. }
  9416. if (_instanceof(parent2, nativeMap)) {
  9417. parent2.forEach(function(value2, key) {
  9418. var keyChild = _clone(key, depth2 - 1);
  9419. var valueChild = _clone(value2, depth2 - 1);
  9420. child.set(keyChild, valueChild);
  9421. });
  9422. }
  9423. if (_instanceof(parent2, nativeSet)) {
  9424. parent2.forEach(function(value2) {
  9425. var entryChild = _clone(value2, depth2 - 1);
  9426. child.add(entryChild);
  9427. });
  9428. }
  9429. for (var i2 in parent2) {
  9430. var attrs = Object.getOwnPropertyDescriptor(parent2, i2);
  9431. if (attrs) {
  9432. child[i2] = _clone(parent2[i2], depth2 - 1);
  9433. }
  9434. try {
  9435. var objProperty = Object.getOwnPropertyDescriptor(parent2, i2);
  9436. if (objProperty.set === "undefined") {
  9437. continue;
  9438. }
  9439. child[i2] = _clone(parent2[i2], depth2 - 1);
  9440. } catch (e2) {
  9441. if (e2 instanceof TypeError) {
  9442. continue;
  9443. } else if (e2 instanceof ReferenceError) {
  9444. continue;
  9445. }
  9446. }
  9447. }
  9448. if (Object.getOwnPropertySymbols) {
  9449. var symbols = Object.getOwnPropertySymbols(parent2);
  9450. for (var i2 = 0; i2 < symbols.length; i2++) {
  9451. var symbol = symbols[i2];
  9452. var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
  9453. if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
  9454. continue;
  9455. }
  9456. child[symbol] = _clone(parent2[symbol], depth2 - 1);
  9457. Object.defineProperty(child, symbol, descriptor);
  9458. }
  9459. }
  9460. if (includeNonEnumerable) {
  9461. var allPropertyNames = Object.getOwnPropertyNames(parent2);
  9462. for (var i2 = 0; i2 < allPropertyNames.length; i2++) {
  9463. var propertyName = allPropertyNames[i2];
  9464. var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
  9465. if (descriptor && descriptor.enumerable) {
  9466. continue;
  9467. }
  9468. child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
  9469. Object.defineProperty(child, propertyName, descriptor);
  9470. }
  9471. }
  9472. return child;
  9473. }
  9474. return _clone(parent, depth);
  9475. }
  9476. clone2.clonePrototype = function clonePrototype(parent) {
  9477. if (parent === null)
  9478. return null;
  9479. var c2 = function() {
  9480. };
  9481. c2.prototype = parent;
  9482. return new c2();
  9483. };
  9484. function __objToStr(o2) {
  9485. return Object.prototype.toString.call(o2);
  9486. }
  9487. clone2.__objToStr = __objToStr;
  9488. function __isDate(o2) {
  9489. return typeof o2 === "object" && __objToStr(o2) === "[object Date]";
  9490. }
  9491. clone2.__isDate = __isDate;
  9492. function __isArray(o2) {
  9493. return typeof o2 === "object" && __objToStr(o2) === "[object Array]";
  9494. }
  9495. clone2.__isArray = __isArray;
  9496. function __isRegExp(o2) {
  9497. return typeof o2 === "object" && __objToStr(o2) === "[object RegExp]";
  9498. }
  9499. clone2.__isRegExp = __isRegExp;
  9500. function __getRegExpFlags(re2) {
  9501. var flags = "";
  9502. if (re2.global)
  9503. flags += "g";
  9504. if (re2.ignoreCase)
  9505. flags += "i";
  9506. if (re2.multiline)
  9507. flags += "m";
  9508. return flags;
  9509. }
  9510. clone2.__getRegExpFlags = __getRegExpFlags;
  9511. return clone2;
  9512. }();
  9513. class Request {
  9514. /**
  9515. * @param {Object} arg - 全局配置
  9516. * @param {String} arg.baseURL - 全局根路径
  9517. * @param {Object} arg.header - 全局header
  9518. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  9519. * @param {String} arg.dataType = [json] - 全局默认的dataType
  9520. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
  9521. * @param {Object} arg.custom - 全局默认的自定义参数
  9522. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
  9523. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  9524. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  9525. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  9526. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  9527. */
  9528. constructor(arg = {}) {
  9529. if (!isPlainObject(arg)) {
  9530. arg = {};
  9531. console.warn("设置全局参数必须接收一个Object");
  9532. }
  9533. this.config = clone({ ...defaults, ...arg });
  9534. this.interceptors = {
  9535. request: new InterceptorManager(),
  9536. response: new InterceptorManager()
  9537. };
  9538. }
  9539. /**
  9540. * @Function
  9541. * @param {Request~setConfigCallback} f - 设置全局默认配置
  9542. */
  9543. setConfig(f2) {
  9544. this.config = f2(this.config);
  9545. }
  9546. middleware(config2) {
  9547. config2 = mergeConfig(this.config, config2);
  9548. const chain = [dispatchRequest, void 0];
  9549. let promise2 = Promise.resolve(config2);
  9550. this.interceptors.request.forEach((interceptor) => {
  9551. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  9552. });
  9553. this.interceptors.response.forEach((interceptor) => {
  9554. chain.push(interceptor.fulfilled, interceptor.rejected);
  9555. });
  9556. while (chain.length) {
  9557. promise2 = promise2.then(chain.shift(), chain.shift());
  9558. }
  9559. return promise2;
  9560. }
  9561. /**
  9562. * @Function
  9563. * @param {Object} config - 请求配置项
  9564. * @prop {String} options.url - 请求路径
  9565. * @prop {Object} options.data - 请求参数
  9566. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  9567. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  9568. * @prop {Object} [options.header = config.header] - 请求header
  9569. * @prop {Object} [options.method = config.method] - 请求方法
  9570. * @returns {Promise<unknown>}
  9571. */
  9572. request(config2 = {}) {
  9573. return this.middleware(config2);
  9574. }
  9575. get(url2, options = {}) {
  9576. return this.middleware({
  9577. url: url2,
  9578. method: "GET",
  9579. ...options
  9580. });
  9581. }
  9582. post(url2, data, options = {}) {
  9583. return this.middleware({
  9584. url: url2,
  9585. data,
  9586. method: "POST",
  9587. ...options
  9588. });
  9589. }
  9590. put(url2, data, options = {}) {
  9591. return this.middleware({
  9592. url: url2,
  9593. data,
  9594. method: "PUT",
  9595. ...options
  9596. });
  9597. }
  9598. delete(url2, data, options = {}) {
  9599. return this.middleware({
  9600. url: url2,
  9601. data,
  9602. method: "DELETE",
  9603. ...options
  9604. });
  9605. }
  9606. connect(url2, data, options = {}) {
  9607. return this.middleware({
  9608. url: url2,
  9609. data,
  9610. method: "CONNECT",
  9611. ...options
  9612. });
  9613. }
  9614. head(url2, data, options = {}) {
  9615. return this.middleware({
  9616. url: url2,
  9617. data,
  9618. method: "HEAD",
  9619. ...options
  9620. });
  9621. }
  9622. options(url2, data, options = {}) {
  9623. return this.middleware({
  9624. url: url2,
  9625. data,
  9626. method: "OPTIONS",
  9627. ...options
  9628. });
  9629. }
  9630. trace(url2, data, options = {}) {
  9631. return this.middleware({
  9632. url: url2,
  9633. data,
  9634. method: "TRACE",
  9635. ...options
  9636. });
  9637. }
  9638. upload(url2, config2 = {}) {
  9639. config2.url = url2;
  9640. config2.method = "UPLOAD";
  9641. return this.middleware(config2);
  9642. }
  9643. download(url2, config2 = {}) {
  9644. config2.url = url2;
  9645. config2.method = "DOWNLOAD";
  9646. return this.middleware(config2);
  9647. }
  9648. }
  9649. const http = new Request();
  9650. const ActionSheet = {
  9651. // action-sheet组件
  9652. actionSheet: {
  9653. show: false,
  9654. title: "",
  9655. description: "",
  9656. actions: [],
  9657. index: "",
  9658. cancelText: "",
  9659. closeOnClickAction: true,
  9660. safeAreaInsetBottom: true,
  9661. openType: "",
  9662. closeOnClickOverlay: true,
  9663. round: 0,
  9664. wrapMaxHeight: "600px"
  9665. }
  9666. };
  9667. const Album = {
  9668. // album 组件
  9669. album: {
  9670. urls: [],
  9671. keyName: "",
  9672. singleSize: 180,
  9673. multipleSize: 70,
  9674. space: 6,
  9675. singleMode: "scaleToFill",
  9676. multipleMode: "aspectFill",
  9677. maxCount: 9,
  9678. previewFullImage: true,
  9679. rowCount: 3,
  9680. showMore: true,
  9681. autoWrap: false,
  9682. unit: "px",
  9683. stop: true
  9684. }
  9685. };
  9686. const Alert = {
  9687. // alert警告组件
  9688. alert: {
  9689. title: "",
  9690. type: "warning",
  9691. description: "",
  9692. closable: false,
  9693. showIcon: false,
  9694. effect: "light",
  9695. center: false,
  9696. fontSize: 14
  9697. }
  9698. };
  9699. const Avatar = {
  9700. // avatar 组件
  9701. avatar: {
  9702. src: "",
  9703. shape: "circle",
  9704. size: 40,
  9705. mode: "scaleToFill",
  9706. text: "",
  9707. bgColor: "#c0c4cc",
  9708. color: "#ffffff",
  9709. fontSize: 18,
  9710. icon: "",
  9711. mpAvatar: false,
  9712. randomBgColor: false,
  9713. defaultUrl: "",
  9714. colorIndex: "",
  9715. name: ""
  9716. }
  9717. };
  9718. const AvatarGroup = {
  9719. // avatarGroup 组件
  9720. avatarGroup: {
  9721. urls: [],
  9722. maxCount: 5,
  9723. shape: "circle",
  9724. mode: "scaleToFill",
  9725. showMore: true,
  9726. size: 40,
  9727. keyName: "",
  9728. gap: 0.5,
  9729. extraValue: 0
  9730. }
  9731. };
  9732. const Backtop = {
  9733. // backtop组件
  9734. backtop: {
  9735. mode: "circle",
  9736. icon: "arrow-upward",
  9737. text: "",
  9738. duration: 100,
  9739. scrollTop: 0,
  9740. top: 400,
  9741. bottom: 100,
  9742. right: 20,
  9743. zIndex: 9,
  9744. iconStyle: {
  9745. color: "#909399",
  9746. fontSize: "19px"
  9747. }
  9748. }
  9749. };
  9750. const Badge = {
  9751. // 徽标数组件
  9752. badge: {
  9753. isDot: false,
  9754. value: "",
  9755. show: true,
  9756. max: 999,
  9757. type: "error",
  9758. showZero: false,
  9759. bgColor: null,
  9760. color: null,
  9761. shape: "circle",
  9762. numberType: "overflow",
  9763. offset: [],
  9764. inverted: false,
  9765. absolute: false
  9766. }
  9767. };
  9768. const Button = {
  9769. // button组件
  9770. button: {
  9771. hairline: false,
  9772. type: "info",
  9773. size: "normal",
  9774. shape: "square",
  9775. plain: false,
  9776. disabled: false,
  9777. loading: false,
  9778. loadingText: "",
  9779. loadingMode: "spinner",
  9780. loadingSize: 15,
  9781. openType: "",
  9782. formType: "",
  9783. appParameter: "",
  9784. hoverStopPropagation: true,
  9785. lang: "en",
  9786. sessionFrom: "",
  9787. sendMessageTitle: "",
  9788. sendMessagePath: "",
  9789. sendMessageImg: "",
  9790. showMessageCard: false,
  9791. dataName: "",
  9792. throttleTime: 0,
  9793. hoverStartTime: 0,
  9794. hoverStayTime: 200,
  9795. text: "",
  9796. icon: "",
  9797. iconColor: "",
  9798. color: "",
  9799. stop: true
  9800. }
  9801. };
  9802. const Calendar = {
  9803. // calendar 组件
  9804. calendar: {
  9805. title: "日期选择",
  9806. showTitle: true,
  9807. showSubtitle: true,
  9808. mode: "single",
  9809. startText: "开始",
  9810. endText: "结束",
  9811. customList: [],
  9812. color: "#3c9cff",
  9813. minDate: 0,
  9814. maxDate: 0,
  9815. defaultDate: null,
  9816. maxCount: Number.MAX_SAFE_INTEGER,
  9817. // Infinity
  9818. rowHeight: 56,
  9819. formatter: null,
  9820. showLunar: false,
  9821. showMark: true,
  9822. confirmText: "确定",
  9823. confirmDisabledText: "确定",
  9824. show: false,
  9825. closeOnClickOverlay: false,
  9826. readonly: false,
  9827. showConfirm: true,
  9828. maxRange: Number.MAX_SAFE_INTEGER,
  9829. // Infinity
  9830. rangePrompt: "",
  9831. showRangePrompt: true,
  9832. allowSameDay: false,
  9833. round: 0,
  9834. monthNum: 3,
  9835. weekText: ["一", "二", "三", "四", "五", "六", "日"],
  9836. forbidDays: [],
  9837. forbidDaysToast: "该日期已禁用"
  9838. }
  9839. };
  9840. const CarKeyboard = {
  9841. // 车牌号键盘
  9842. carKeyboard: {
  9843. random: false
  9844. }
  9845. };
  9846. const Cell = {
  9847. // cell组件的props
  9848. cell: {
  9849. customClass: "",
  9850. title: "",
  9851. label: "",
  9852. value: "",
  9853. icon: "",
  9854. disabled: false,
  9855. border: true,
  9856. center: false,
  9857. url: "",
  9858. linkType: "navigateTo",
  9859. clickable: false,
  9860. isLink: false,
  9861. required: false,
  9862. arrowDirection: "",
  9863. iconStyle: {},
  9864. rightIconStyle: {},
  9865. rightIcon: "arrow-right",
  9866. titleStyle: {},
  9867. size: "",
  9868. stop: true,
  9869. name: ""
  9870. }
  9871. };
  9872. const CellGroup = {
  9873. // cell-group组件的props
  9874. cellGroup: {
  9875. title: "",
  9876. border: true,
  9877. customStyle: {}
  9878. }
  9879. };
  9880. const Checkbox = {
  9881. // checkbox组件
  9882. checkbox: {
  9883. name: "",
  9884. shape: "",
  9885. size: "",
  9886. checkbox: false,
  9887. disabled: "",
  9888. activeColor: "",
  9889. inactiveColor: "",
  9890. iconSize: "",
  9891. iconColor: "",
  9892. label: "",
  9893. labelSize: "",
  9894. labelColor: "",
  9895. labelDisabled: ""
  9896. }
  9897. };
  9898. const CheckboxGroup = {
  9899. // checkbox-group组件
  9900. checkboxGroup: {
  9901. name: "",
  9902. value: [],
  9903. shape: "square",
  9904. disabled: false,
  9905. activeColor: "#2979ff",
  9906. inactiveColor: "#c8c9cc",
  9907. size: 18,
  9908. placement: "row",
  9909. labelSize: 14,
  9910. labelColor: "#303133",
  9911. labelDisabled: false,
  9912. iconColor: "#ffffff",
  9913. iconSize: 12,
  9914. iconPlacement: "left",
  9915. borderBottom: false
  9916. }
  9917. };
  9918. const CircleProgress = {
  9919. // circleProgress 组件
  9920. circleProgress: {
  9921. percentage: 30
  9922. }
  9923. };
  9924. const Code = {
  9925. // code 组件
  9926. code: {
  9927. seconds: 60,
  9928. startText: "获取验证码",
  9929. changeText: "X秒重新获取",
  9930. endText: "重新获取",
  9931. keepRunning: false,
  9932. uniqueKey: ""
  9933. }
  9934. };
  9935. const CodeInput = {
  9936. // codeInput 组件
  9937. codeInput: {
  9938. adjustPosition: true,
  9939. maxlength: 6,
  9940. dot: false,
  9941. mode: "box",
  9942. hairline: false,
  9943. space: 10,
  9944. value: "",
  9945. focus: false,
  9946. bold: false,
  9947. color: "#606266",
  9948. fontSize: 18,
  9949. size: 35,
  9950. disabledKeyboard: false,
  9951. borderColor: "#c9cacc",
  9952. disabledDot: true
  9953. }
  9954. };
  9955. const Col = {
  9956. // col 组件
  9957. col: {
  9958. span: 12,
  9959. offset: 0,
  9960. justify: "start",
  9961. align: "stretch",
  9962. textAlign: "left"
  9963. }
  9964. };
  9965. const Collapse = {
  9966. // collapse 组件
  9967. collapse: {
  9968. value: null,
  9969. accordion: false,
  9970. border: true
  9971. }
  9972. };
  9973. const CollapseItem = {
  9974. // collapseItem 组件
  9975. collapseItem: {
  9976. title: "",
  9977. value: "",
  9978. label: "",
  9979. disabled: false,
  9980. isLink: true,
  9981. clickable: true,
  9982. border: true,
  9983. align: "left",
  9984. name: "",
  9985. icon: "",
  9986. duration: 300,
  9987. showRight: true,
  9988. titleStyle: {},
  9989. iconStyle: {},
  9990. rightIconStyle: {},
  9991. cellCustomStyle: {},
  9992. cellCustomClass: ""
  9993. }
  9994. };
  9995. const ColumnNotice = {
  9996. // columnNotice 组件
  9997. columnNotice: {
  9998. text: "",
  9999. icon: "volume",
  10000. mode: "",
  10001. color: "#f9ae3d",
  10002. bgColor: "#fdf6ec",
  10003. fontSize: 14,
  10004. speed: 80,
  10005. step: false,
  10006. duration: 1500,
  10007. disableTouch: true,
  10008. justifyContent: "flex-start"
  10009. }
  10010. };
  10011. const CountDown = {
  10012. // u-count-down 计时器组件
  10013. countDown: {
  10014. time: 0,
  10015. format: "HH:mm:ss",
  10016. autoStart: true,
  10017. millisecond: false
  10018. }
  10019. };
  10020. const CountTo = {
  10021. // countTo 组件
  10022. countTo: {
  10023. startVal: 0,
  10024. endVal: 0,
  10025. duration: 2e3,
  10026. autoplay: true,
  10027. decimals: 0,
  10028. useEasing: true,
  10029. decimal: ".",
  10030. color: "#606266",
  10031. fontSize: 22,
  10032. bold: false,
  10033. separator: ""
  10034. }
  10035. };
  10036. const DatetimePicker = {
  10037. // datetimePicker 组件
  10038. datetimePicker: {
  10039. show: false,
  10040. popupMode: "bottom",
  10041. showToolbar: true,
  10042. value: "",
  10043. title: "",
  10044. mode: "datetime",
  10045. maxDate: new Date(new Date().getFullYear() + 10, 0, 1).getTime(),
  10046. minDate: new Date(new Date().getFullYear() - 10, 0, 1).getTime(),
  10047. minHour: 0,
  10048. maxHour: 23,
  10049. minMinute: 0,
  10050. maxMinute: 59,
  10051. filter: null,
  10052. formatter: null,
  10053. loading: false,
  10054. itemHeight: 44,
  10055. cancelText: "取消",
  10056. confirmText: "确认",
  10057. cancelColor: "#909193",
  10058. confirmColor: "#3c9cff",
  10059. visibleItemCount: 5,
  10060. closeOnClickOverlay: false,
  10061. defaultIndex: []
  10062. }
  10063. };
  10064. const Divider = {
  10065. // divider组件
  10066. divider: {
  10067. dashed: false,
  10068. hairline: true,
  10069. dot: false,
  10070. textPosition: "center",
  10071. text: "",
  10072. textSize: 14,
  10073. textColor: "#909399",
  10074. lineColor: "#dcdfe6"
  10075. }
  10076. };
  10077. const Empty = {
  10078. // empty组件
  10079. empty: {
  10080. icon: "",
  10081. text: "",
  10082. textColor: "#c0c4cc",
  10083. textSize: 14,
  10084. iconColor: "#c0c4cc",
  10085. iconSize: 90,
  10086. mode: "data",
  10087. width: 160,
  10088. height: 160,
  10089. show: true,
  10090. marginTop: 0
  10091. }
  10092. };
  10093. const Form = {
  10094. // form 组件
  10095. form: {
  10096. model: {},
  10097. rules: {},
  10098. errorType: "message",
  10099. borderBottom: true,
  10100. labelPosition: "left",
  10101. labelWidth: 45,
  10102. labelAlign: "left",
  10103. labelStyle: {}
  10104. }
  10105. };
  10106. const GormItem = {
  10107. // formItem 组件
  10108. formItem: {
  10109. label: "",
  10110. prop: "",
  10111. rules: [],
  10112. borderBottom: "",
  10113. labelPosition: "",
  10114. labelWidth: "",
  10115. rightIcon: "",
  10116. leftIcon: "",
  10117. required: false,
  10118. leftIconStyle: ""
  10119. }
  10120. };
  10121. const Gap = {
  10122. // gap组件
  10123. gap: {
  10124. bgColor: "transparent",
  10125. height: 20,
  10126. marginTop: 0,
  10127. marginBottom: 0,
  10128. customStyle: {}
  10129. }
  10130. };
  10131. const Grid = {
  10132. // grid组件
  10133. grid: {
  10134. col: 3,
  10135. border: false,
  10136. align: "left"
  10137. }
  10138. };
  10139. const GridItem = {
  10140. // grid-item组件
  10141. gridItem: {
  10142. name: null,
  10143. bgColor: "transparent"
  10144. }
  10145. };
  10146. const {
  10147. color: color$2
  10148. } = config;
  10149. const Icon = {
  10150. // icon组件
  10151. icon: {
  10152. name: "",
  10153. color: color$2["u-content-color"],
  10154. size: "16px",
  10155. bold: false,
  10156. index: "",
  10157. hoverClass: "",
  10158. customPrefix: "uicon",
  10159. label: "",
  10160. labelPos: "right",
  10161. labelSize: "15px",
  10162. labelColor: color$2["u-content-color"],
  10163. space: "3px",
  10164. imgMode: "",
  10165. width: "",
  10166. height: "",
  10167. top: 0,
  10168. stop: false
  10169. }
  10170. };
  10171. const Image = {
  10172. // image组件
  10173. image: {
  10174. src: "",
  10175. mode: "aspectFill",
  10176. width: "300",
  10177. height: "225",
  10178. shape: "square",
  10179. radius: 0,
  10180. lazyLoad: true,
  10181. showMenuByLongpress: true,
  10182. loadingIcon: "photo",
  10183. errorIcon: "error-circle",
  10184. showLoading: true,
  10185. showError: true,
  10186. fade: true,
  10187. webp: false,
  10188. duration: 500,
  10189. bgColor: "#f3f4f6"
  10190. }
  10191. };
  10192. const IndexAnchor = {
  10193. // indexAnchor 组件
  10194. indexAnchor: {
  10195. text: "",
  10196. color: "#606266",
  10197. size: 14,
  10198. bgColor: "#dedede",
  10199. height: 32
  10200. }
  10201. };
  10202. const IndexList = {
  10203. // indexList 组件
  10204. indexList: {
  10205. inactiveColor: "#606266",
  10206. activeColor: "#5677fc",
  10207. indexList: [],
  10208. sticky: true,
  10209. customNavHeight: 0,
  10210. safeBottomFix: false
  10211. }
  10212. };
  10213. const Input = {
  10214. // index 组件
  10215. input: {
  10216. value: "",
  10217. type: "text",
  10218. fixed: false,
  10219. disabled: false,
  10220. disabledColor: "#f5f7fa",
  10221. clearable: false,
  10222. password: false,
  10223. maxlength: 140,
  10224. placeholder: null,
  10225. placeholderClass: "input-placeholder",
  10226. placeholderStyle: "color: #c0c4cc",
  10227. showWordLimit: false,
  10228. confirmType: "done",
  10229. confirmHold: false,
  10230. holdKeyboard: false,
  10231. focus: false,
  10232. autoBlur: false,
  10233. disableDefaultPadding: false,
  10234. cursor: -1,
  10235. cursorSpacing: 30,
  10236. selectionStart: -1,
  10237. selectionEnd: -1,
  10238. adjustPosition: true,
  10239. inputAlign: "left",
  10240. fontSize: "15px",
  10241. color: "#303133",
  10242. prefixIcon: "",
  10243. prefixIconStyle: "",
  10244. suffixIcon: "",
  10245. suffixIconStyle: "",
  10246. border: "surround",
  10247. readonly: false,
  10248. shape: "square",
  10249. formatter: null
  10250. }
  10251. };
  10252. const Keyboard = {
  10253. // 键盘组件
  10254. keyboard: {
  10255. mode: "number",
  10256. dotDisabled: false,
  10257. tooltip: true,
  10258. showTips: true,
  10259. tips: "",
  10260. showCancel: true,
  10261. showConfirm: true,
  10262. random: false,
  10263. safeAreaInsetBottom: true,
  10264. closeOnClickOverlay: true,
  10265. show: false,
  10266. overlay: true,
  10267. zIndex: 10075,
  10268. cancelText: "取消",
  10269. confirmText: "确定",
  10270. autoChange: false
  10271. }
  10272. };
  10273. const Line = {
  10274. // line组件
  10275. line: {
  10276. color: "#d6d7d9",
  10277. length: "100%",
  10278. direction: "row",
  10279. hairline: true,
  10280. margin: 0,
  10281. dashed: false
  10282. }
  10283. };
  10284. const LineProgress = {
  10285. // lineProgress 组件
  10286. lineProgress: {
  10287. activeColor: "#19be6b",
  10288. inactiveColor: "#ececec",
  10289. percentage: 0,
  10290. showText: true,
  10291. height: 12
  10292. }
  10293. };
  10294. const {
  10295. color: color$1
  10296. } = config;
  10297. const Link = {
  10298. // link超链接组件props参数
  10299. link: {
  10300. color: color$1["u-primary"],
  10301. fontSize: 15,
  10302. underLine: false,
  10303. href: "",
  10304. mpTips: "链接已复制,请在浏览器打开",
  10305. lineColor: "",
  10306. text: ""
  10307. }
  10308. };
  10309. const List = {
  10310. // list 组件
  10311. list: {
  10312. showScrollbar: false,
  10313. lowerThreshold: 50,
  10314. upperThreshold: 0,
  10315. scrollTop: 0,
  10316. offsetAccuracy: 10,
  10317. enableFlex: false,
  10318. pagingEnabled: false,
  10319. scrollable: true,
  10320. scrollIntoView: "",
  10321. scrollWithAnimation: false,
  10322. enableBackToTop: false,
  10323. height: 0,
  10324. width: 0,
  10325. preLoadScreen: 1
  10326. }
  10327. };
  10328. const ListItem = {
  10329. // listItem 组件
  10330. listItem: {
  10331. anchor: ""
  10332. }
  10333. };
  10334. const {
  10335. color
  10336. } = config;
  10337. const LoadingIcon = {
  10338. // loading-icon加载中图标组件
  10339. loadingIcon: {
  10340. show: true,
  10341. color: color["u-tips-color"],
  10342. textColor: color["u-tips-color"],
  10343. vertical: false,
  10344. mode: "spinner",
  10345. size: 24,
  10346. textSize: 15,
  10347. text: "",
  10348. timingFunction: "ease-in-out",
  10349. duration: 1200,
  10350. inactiveColor: ""
  10351. }
  10352. };
  10353. const LoadingPage = {
  10354. // loading-page组件
  10355. loadingPage: {
  10356. loadingText: "正在加载",
  10357. image: "",
  10358. loadingMode: "circle",
  10359. loading: false,
  10360. bgColor: "#ffffff",
  10361. color: "#C8C8C8",
  10362. fontSize: 19,
  10363. iconSize: 28,
  10364. loadingColor: "#C8C8C8",
  10365. zIndex: 10
  10366. }
  10367. };
  10368. const Loadmore = {
  10369. // loadmore 组件
  10370. loadmore: {
  10371. status: "loadmore",
  10372. bgColor: "transparent",
  10373. icon: true,
  10374. fontSize: 14,
  10375. iconSize: 17,
  10376. color: "#606266",
  10377. loadingIcon: "spinner",
  10378. loadmoreText: "加载更多",
  10379. loadingText: "正在加载...",
  10380. nomoreText: "没有更多了",
  10381. isDot: false,
  10382. iconColor: "#b7b7b7",
  10383. marginTop: 10,
  10384. marginBottom: 10,
  10385. height: "auto",
  10386. line: false,
  10387. lineColor: "#E6E8EB",
  10388. dashed: false
  10389. }
  10390. };
  10391. const Modal = {
  10392. // modal 组件
  10393. modal: {
  10394. show: false,
  10395. title: "",
  10396. content: "",
  10397. confirmText: "确认",
  10398. cancelText: "取消",
  10399. showConfirmButton: true,
  10400. showCancelButton: false,
  10401. confirmColor: "#2979ff",
  10402. cancelColor: "#606266",
  10403. buttonReverse: false,
  10404. zoom: true,
  10405. asyncClose: false,
  10406. closeOnClickOverlay: false,
  10407. negativeTop: 0,
  10408. width: "650rpx",
  10409. confirmButtonShape: "",
  10410. contentTextAlign: "left",
  10411. asyncCloseTip: "操作中...",
  10412. asyncCancelClose: false
  10413. }
  10414. };
  10415. const Navbar = {
  10416. // navbar 组件
  10417. navbar: {
  10418. safeAreaInsetTop: true,
  10419. placeholder: false,
  10420. fixed: true,
  10421. border: false,
  10422. leftIcon: "arrow-left",
  10423. leftText: "",
  10424. rightText: "",
  10425. rightIcon: "",
  10426. title: "",
  10427. titleColor: "",
  10428. bgColor: "#ffffff",
  10429. titleWidth: "400rpx",
  10430. height: "44px",
  10431. leftIconSize: 20,
  10432. leftIconColor: color$3.mainColor,
  10433. autoBack: false,
  10434. titleStyle: ""
  10435. }
  10436. };
  10437. const NoNetwork = {
  10438. // noNetwork
  10439. noNetwork: {
  10440. tips: "哎呀,网络信号丢失",
  10441. zIndex: "",
  10442. image: "data:image/png;base64,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"
  10443. }
  10444. };
  10445. const NoticeBar = {
  10446. // noticeBar
  10447. noticeBar: {
  10448. text: [],
  10449. direction: "row",
  10450. step: false,
  10451. icon: "volume",
  10452. mode: "",
  10453. color: "#f9ae3d",
  10454. bgColor: "#fdf6ec",
  10455. speed: 80,
  10456. fontSize: 14,
  10457. duration: 2e3,
  10458. disableTouch: true,
  10459. url: "",
  10460. linkType: "navigateTo",
  10461. justifyContent: "flex-start"
  10462. }
  10463. };
  10464. const Notify = {
  10465. // notify组件
  10466. notify: {
  10467. top: 0,
  10468. type: "primary",
  10469. color: "#ffffff",
  10470. bgColor: "",
  10471. message: "",
  10472. duration: 3e3,
  10473. fontSize: 15,
  10474. safeAreaInsetTop: false
  10475. }
  10476. };
  10477. const NumberBox = {
  10478. // 步进器组件
  10479. numberBox: {
  10480. name: "",
  10481. value: 0,
  10482. min: 1,
  10483. max: Number.MAX_SAFE_INTEGER,
  10484. step: 1,
  10485. integer: false,
  10486. disabled: false,
  10487. disabledInput: false,
  10488. asyncChange: false,
  10489. inputWidth: 35,
  10490. showMinus: true,
  10491. showPlus: true,
  10492. decimalLength: null,
  10493. longPress: true,
  10494. color: "#323233",
  10495. buttonWidth: 30,
  10496. buttonSize: 30,
  10497. buttonRadius: "0px",
  10498. bgColor: "#EBECEE",
  10499. inputBgColor: "#EBECEE",
  10500. cursorSpacing: 100,
  10501. disableMinus: false,
  10502. disablePlus: false,
  10503. iconStyle: "",
  10504. miniMode: false
  10505. }
  10506. };
  10507. const NumberKeyboard = {
  10508. // 数字键盘
  10509. numberKeyboard: {
  10510. mode: "number",
  10511. dotDisabled: false,
  10512. random: false
  10513. }
  10514. };
  10515. const Overlay = {
  10516. // overlay组件
  10517. overlay: {
  10518. show: false,
  10519. zIndex: 10070,
  10520. duration: 300,
  10521. opacity: 0.5
  10522. }
  10523. };
  10524. const Parse = {
  10525. // parse
  10526. parse: {
  10527. copyLink: true,
  10528. errorImg: "",
  10529. lazyLoad: false,
  10530. loadingImg: "",
  10531. pauseVideo: true,
  10532. previewImg: true,
  10533. setTitle: true,
  10534. showImgMenu: true
  10535. }
  10536. };
  10537. const Picker = {
  10538. // picker
  10539. picker: {
  10540. show: false,
  10541. popupMode: "bottom",
  10542. showToolbar: true,
  10543. title: "",
  10544. columns: [],
  10545. loading: false,
  10546. itemHeight: 44,
  10547. cancelText: "取消",
  10548. confirmText: "确定",
  10549. cancelColor: "#909193",
  10550. confirmColor: "#3c9cff",
  10551. visibleItemCount: 5,
  10552. keyName: "text",
  10553. closeOnClickOverlay: false,
  10554. defaultIndex: [],
  10555. immediateChange: true,
  10556. zIndex: 10076
  10557. }
  10558. };
  10559. const Popup = {
  10560. // popup组件
  10561. popup: {
  10562. show: false,
  10563. overlay: true,
  10564. mode: "bottom",
  10565. duration: 300,
  10566. closeable: false,
  10567. overlayStyle: {},
  10568. closeOnClickOverlay: true,
  10569. zIndex: 10075,
  10570. safeAreaInsetBottom: true,
  10571. safeAreaInsetTop: false,
  10572. closeIconPos: "top-right",
  10573. round: 0,
  10574. zoom: true,
  10575. bgColor: "",
  10576. overlayOpacity: 0.5
  10577. }
  10578. };
  10579. const Radio = {
  10580. // radio组件
  10581. radio: {
  10582. name: "",
  10583. shape: "",
  10584. disabled: "",
  10585. labelDisabled: "",
  10586. activeColor: "",
  10587. inactiveColor: "",
  10588. iconSize: "",
  10589. labelSize: "",
  10590. label: "",
  10591. labelColor: "",
  10592. size: "",
  10593. iconColor: "",
  10594. placement: ""
  10595. }
  10596. };
  10597. const RadioGroup = {
  10598. // radio-group组件
  10599. radioGroup: {
  10600. value: "",
  10601. disabled: false,
  10602. shape: "circle",
  10603. activeColor: "#2979ff",
  10604. inactiveColor: "#c8c9cc",
  10605. name: "",
  10606. size: 18,
  10607. placement: "row",
  10608. label: "",
  10609. labelColor: "#303133",
  10610. labelSize: 14,
  10611. labelDisabled: false,
  10612. iconColor: "#ffffff",
  10613. iconSize: 12,
  10614. borderBottom: false,
  10615. iconPlacement: "left",
  10616. gap: "10px"
  10617. }
  10618. };
  10619. const Rate = {
  10620. // rate组件
  10621. rate: {
  10622. value: 1,
  10623. count: 5,
  10624. disabled: false,
  10625. size: 18,
  10626. inactiveColor: "#b2b2b2",
  10627. activeColor: "#FA3534",
  10628. gutter: 4,
  10629. minCount: 1,
  10630. allowHalf: false,
  10631. activeIcon: "star-fill",
  10632. inactiveIcon: "star",
  10633. touchable: true
  10634. }
  10635. };
  10636. const ReadMore = {
  10637. // readMore
  10638. readMore: {
  10639. showHeight: 400,
  10640. toggle: false,
  10641. closeText: "展开阅读全文",
  10642. openText: "收起",
  10643. color: "#2979ff",
  10644. fontSize: 14,
  10645. textIndent: "2em",
  10646. name: ""
  10647. }
  10648. };
  10649. const Row = {
  10650. // row
  10651. row: {
  10652. gutter: 0,
  10653. justify: "start",
  10654. align: "center"
  10655. }
  10656. };
  10657. const RowNotice = {
  10658. // rowNotice
  10659. rowNotice: {
  10660. text: "",
  10661. icon: "volume",
  10662. mode: "",
  10663. color: "#f9ae3d",
  10664. bgColor: "#fdf6ec",
  10665. fontSize: 14,
  10666. speed: 80
  10667. }
  10668. };
  10669. const ScrollList = {
  10670. // scrollList
  10671. scrollList: {
  10672. indicatorWidth: 50,
  10673. indicatorBarWidth: 20,
  10674. indicator: true,
  10675. indicatorColor: "#f2f2f2",
  10676. indicatorActiveColor: "#3c9cff",
  10677. indicatorStyle: ""
  10678. }
  10679. };
  10680. const Search = {
  10681. // search
  10682. search: {
  10683. shape: "round",
  10684. bgColor: "#f2f2f2",
  10685. placeholder: "请输入关键字",
  10686. clearabled: true,
  10687. focus: false,
  10688. showAction: true,
  10689. actionStyle: {},
  10690. actionText: "搜索",
  10691. inputAlign: "left",
  10692. inputStyle: {},
  10693. disabled: false,
  10694. borderColor: "transparent",
  10695. searchIconColor: "#909399",
  10696. searchIconSize: 22,
  10697. color: "#606266",
  10698. placeholderColor: "#909399",
  10699. searchIcon: "search",
  10700. margin: "0",
  10701. animation: false,
  10702. value: "",
  10703. maxlength: "-1",
  10704. height: 32,
  10705. label: null
  10706. }
  10707. };
  10708. const Section = {
  10709. // u-section组件
  10710. section: {
  10711. title: "",
  10712. subTitle: "更多",
  10713. right: true,
  10714. fontSize: 15,
  10715. bold: true,
  10716. color: "#303133",
  10717. subColor: "#909399",
  10718. showLine: true,
  10719. lineColor: "",
  10720. arrow: true
  10721. }
  10722. };
  10723. const Skeleton = {
  10724. // skeleton
  10725. skeleton: {
  10726. loading: true,
  10727. animate: true,
  10728. rows: 0,
  10729. rowsWidth: "100%",
  10730. rowsHeight: 18,
  10731. title: true,
  10732. titleWidth: "50%",
  10733. titleHeight: 18,
  10734. avatar: false,
  10735. avatarSize: 32,
  10736. avatarShape: "circle"
  10737. }
  10738. };
  10739. const Slider = {
  10740. // slider组件
  10741. slider: {
  10742. value: 0,
  10743. blockSize: 18,
  10744. min: 0,
  10745. max: 100,
  10746. step: 1,
  10747. activeColor: "#2979ff",
  10748. inactiveColor: "#c0c4cc",
  10749. blockColor: "#ffffff",
  10750. showValue: false,
  10751. disabled: false,
  10752. blockStyle: {},
  10753. useNative: false,
  10754. height: "2px"
  10755. }
  10756. };
  10757. const StatusBar = {
  10758. // statusBar
  10759. statusBar: {
  10760. bgColor: "transparent"
  10761. }
  10762. };
  10763. const Steps = {
  10764. // steps组件
  10765. steps: {
  10766. direction: "row",
  10767. current: 0,
  10768. activeColor: "#3c9cff",
  10769. inactiveColor: "#969799",
  10770. activeIcon: "",
  10771. inactiveIcon: "",
  10772. dot: false
  10773. }
  10774. };
  10775. const StepsItem = {
  10776. // steps-item组件
  10777. stepsItem: {
  10778. title: "",
  10779. desc: "",
  10780. iconSize: 17,
  10781. error: false
  10782. }
  10783. };
  10784. const Sticky = {
  10785. // sticky组件
  10786. sticky: {
  10787. offsetTop: 0,
  10788. customNavHeight: 0,
  10789. disabled: false,
  10790. bgColor: "transparent",
  10791. zIndex: "",
  10792. index: ""
  10793. }
  10794. };
  10795. const Subsection = {
  10796. // subsection组件
  10797. subsection: {
  10798. list: [],
  10799. current: 0,
  10800. activeColor: "#3c9cff",
  10801. inactiveColor: "#303133",
  10802. mode: "button",
  10803. fontSize: 12,
  10804. bold: true,
  10805. bgColor: "#eeeeef",
  10806. keyName: "name"
  10807. }
  10808. };
  10809. const SwipeAction = {
  10810. // swipe-action组件
  10811. swipeAction: {
  10812. autoClose: true
  10813. }
  10814. };
  10815. const SwipeActionItem = {
  10816. // swipeActionItem 组件
  10817. swipeActionItem: {
  10818. show: false,
  10819. closeOnClick: true,
  10820. name: "",
  10821. disabled: false,
  10822. threshold: 20,
  10823. autoClose: true,
  10824. options: [],
  10825. duration: 300
  10826. }
  10827. };
  10828. const Swiper = {
  10829. // swiper 组件
  10830. swiper: {
  10831. list: [],
  10832. indicator: false,
  10833. indicatorActiveColor: "#FFFFFF",
  10834. indicatorInactiveColor: "rgba(255, 255, 255, 0.35)",
  10835. indicatorStyle: "",
  10836. indicatorMode: "line",
  10837. autoplay: true,
  10838. current: 0,
  10839. currentItemId: "",
  10840. interval: 3e3,
  10841. duration: 300,
  10842. circular: false,
  10843. previousMargin: 0,
  10844. nextMargin: 0,
  10845. acceleration: false,
  10846. displayMultipleItems: 1,
  10847. easingFunction: "default",
  10848. keyName: "url",
  10849. imgMode: "aspectFill",
  10850. height: 130,
  10851. bgColor: "#f3f4f6",
  10852. radius: 4,
  10853. loading: false,
  10854. showTitle: false
  10855. }
  10856. };
  10857. const SwipterIndicator = {
  10858. // swiperIndicator 组件
  10859. swiperIndicator: {
  10860. length: 0,
  10861. current: 0,
  10862. indicatorActiveColor: "",
  10863. indicatorInactiveColor: "",
  10864. indicatorMode: "line"
  10865. }
  10866. };
  10867. const Switch = {
  10868. // switch
  10869. switch: {
  10870. loading: false,
  10871. disabled: false,
  10872. size: 25,
  10873. activeColor: "#2979ff",
  10874. inactiveColor: "#ffffff",
  10875. value: false,
  10876. activeValue: true,
  10877. inactiveValue: false,
  10878. asyncChange: false,
  10879. space: 0
  10880. }
  10881. };
  10882. const Tabbar = {
  10883. // tabbar
  10884. tabbar: {
  10885. value: null,
  10886. safeAreaInsetBottom: true,
  10887. border: true,
  10888. zIndex: 1,
  10889. activeColor: "#1989fa",
  10890. inactiveColor: "#7d7e80",
  10891. fixed: true,
  10892. placeholder: true
  10893. }
  10894. };
  10895. const TabbarItem = {
  10896. //
  10897. tabbarItem: {
  10898. name: null,
  10899. icon: "",
  10900. badge: null,
  10901. dot: false,
  10902. text: "",
  10903. badgeStyle: "top: 6px;right:2px;"
  10904. }
  10905. };
  10906. const Tabs = {
  10907. //
  10908. tabs: {
  10909. duration: 300,
  10910. list: [],
  10911. lineColor: "#3c9cff",
  10912. activeStyle: {
  10913. color: "#303133"
  10914. },
  10915. inactiveStyle: {
  10916. color: "#606266"
  10917. },
  10918. lineWidth: 20,
  10919. lineHeight: 3,
  10920. lineBgSize: "cover",
  10921. itemStyle: {
  10922. height: "44px"
  10923. },
  10924. scrollable: true,
  10925. current: 0,
  10926. keyName: "name",
  10927. iconStyle: {}
  10928. }
  10929. };
  10930. const Tag = {
  10931. // tag 组件
  10932. tag: {
  10933. type: "primary",
  10934. disabled: false,
  10935. size: "medium",
  10936. shape: "square",
  10937. text: "",
  10938. bgColor: "",
  10939. color: "",
  10940. borderColor: "",
  10941. closeColor: "#C6C7CB",
  10942. name: "",
  10943. plainFill: false,
  10944. plain: false,
  10945. closable: false,
  10946. show: true,
  10947. icon: "",
  10948. iconColor: "",
  10949. textSize: "",
  10950. height: "",
  10951. padding: "",
  10952. borderRadius: "",
  10953. autoBgColor: 0
  10954. }
  10955. };
  10956. const Text = {
  10957. // text 组件
  10958. text: {
  10959. type: "",
  10960. show: true,
  10961. text: "",
  10962. prefixIcon: "",
  10963. suffixIcon: "",
  10964. mode: "",
  10965. href: "",
  10966. format: "",
  10967. call: false,
  10968. openType: "",
  10969. bold: false,
  10970. block: false,
  10971. lines: "",
  10972. color: "#303133",
  10973. size: 15,
  10974. iconStyle: {
  10975. fontSize: "15px"
  10976. },
  10977. decoration: "none",
  10978. margin: 0,
  10979. lineHeight: "",
  10980. align: "left",
  10981. wordWrap: "normal",
  10982. flex1: true
  10983. }
  10984. };
  10985. const Textarea = {
  10986. // textarea 组件
  10987. textarea: {
  10988. value: "",
  10989. placeholder: "",
  10990. placeholderClass: "textarea-placeholder",
  10991. placeholderStyle: "color: #c0c4cc",
  10992. height: 70,
  10993. confirmType: "done",
  10994. disabled: false,
  10995. count: false,
  10996. focus: false,
  10997. autoHeight: false,
  10998. fixed: false,
  10999. cursorSpacing: 0,
  11000. cursor: "",
  11001. showConfirmBar: true,
  11002. selectionStart: -1,
  11003. selectionEnd: -1,
  11004. adjustPosition: true,
  11005. disableDefaultPadding: false,
  11006. holdKeyboard: false,
  11007. maxlength: 140,
  11008. border: "surround",
  11009. formatter: null
  11010. }
  11011. };
  11012. const Toast = {
  11013. // toast组件
  11014. toast: {
  11015. zIndex: 10090,
  11016. loading: false,
  11017. message: "",
  11018. icon: "",
  11019. type: "",
  11020. loadingMode: "",
  11021. show: "",
  11022. overlay: false,
  11023. position: "center",
  11024. params: {},
  11025. duration: 2e3,
  11026. isTab: false,
  11027. url: "",
  11028. callback: null,
  11029. back: false
  11030. }
  11031. };
  11032. const Toolbar = {
  11033. // toolbar 组件
  11034. toolbar: {
  11035. show: true,
  11036. cancelText: "取消",
  11037. confirmText: "确认",
  11038. cancelColor: "#909193",
  11039. confirmColor: "#3c9cff",
  11040. title: ""
  11041. }
  11042. };
  11043. const Tooltip = {
  11044. // tooltip 组件
  11045. tooltip: {
  11046. text: "",
  11047. copyText: "",
  11048. size: 14,
  11049. color: "#606266",
  11050. bgColor: "transparent",
  11051. direction: "top",
  11052. zIndex: 10071,
  11053. showCopy: true,
  11054. buttons: [],
  11055. overlay: true,
  11056. showToast: true
  11057. }
  11058. };
  11059. const Transition = {
  11060. // transition动画组件的props
  11061. transition: {
  11062. show: false,
  11063. mode: "fade",
  11064. duration: "300",
  11065. timingFunction: "ease-out"
  11066. }
  11067. };
  11068. const Upload = {
  11069. // upload组件
  11070. upload: {
  11071. accept: "image",
  11072. extension: [],
  11073. capture: ["album", "camera"],
  11074. compressed: true,
  11075. camera: "back",
  11076. maxDuration: 60,
  11077. uploadIcon: "camera-fill",
  11078. uploadIconColor: "#D3D4D6",
  11079. useBeforeRead: false,
  11080. previewFullImage: true,
  11081. maxCount: 52,
  11082. disabled: false,
  11083. imageMode: "aspectFill",
  11084. name: "",
  11085. sizeType: ["original", "compressed"],
  11086. multiple: false,
  11087. deletable: true,
  11088. maxSize: Number.MAX_VALUE,
  11089. fileList: [],
  11090. uploadText: "",
  11091. width: 80,
  11092. height: 80,
  11093. previewImage: true,
  11094. autoDelete: false,
  11095. autoUpload: false,
  11096. autoUploadApi: "",
  11097. autoUploadAuthUrl: "",
  11098. autoUploadDriver: "",
  11099. autoUploadHeader: {},
  11100. getVideoThumb: false
  11101. }
  11102. };
  11103. const props$v = {
  11104. ...ActionSheet,
  11105. ...Album,
  11106. ...Alert,
  11107. ...Avatar,
  11108. ...AvatarGroup,
  11109. ...Backtop,
  11110. ...Badge,
  11111. ...Button,
  11112. ...Calendar,
  11113. ...CarKeyboard,
  11114. ...Cell,
  11115. ...CellGroup,
  11116. ...Checkbox,
  11117. ...CheckboxGroup,
  11118. ...CircleProgress,
  11119. ...Code,
  11120. ...CodeInput,
  11121. ...Col,
  11122. ...Collapse,
  11123. ...CollapseItem,
  11124. ...ColumnNotice,
  11125. ...CountDown,
  11126. ...CountTo,
  11127. ...DatetimePicker,
  11128. ...Divider,
  11129. ...Empty,
  11130. ...Form,
  11131. ...GormItem,
  11132. ...Gap,
  11133. ...Grid,
  11134. ...GridItem,
  11135. ...Icon,
  11136. ...Image,
  11137. ...IndexAnchor,
  11138. ...IndexList,
  11139. ...Input,
  11140. ...Keyboard,
  11141. ...Line,
  11142. ...LineProgress,
  11143. ...Link,
  11144. ...List,
  11145. ...ListItem,
  11146. ...LoadingIcon,
  11147. ...LoadingPage,
  11148. ...Loadmore,
  11149. ...Modal,
  11150. ...Navbar,
  11151. ...NoNetwork,
  11152. ...NoticeBar,
  11153. ...Notify,
  11154. ...NumberBox,
  11155. ...NumberKeyboard,
  11156. ...Overlay,
  11157. ...Parse,
  11158. ...Picker,
  11159. ...Popup,
  11160. ...Radio,
  11161. ...RadioGroup,
  11162. ...Rate,
  11163. ...ReadMore,
  11164. ...Row,
  11165. ...RowNotice,
  11166. ...ScrollList,
  11167. ...Search,
  11168. ...Section,
  11169. ...Skeleton,
  11170. ...Slider,
  11171. ...StatusBar,
  11172. ...Steps,
  11173. ...StepsItem,
  11174. ...Sticky,
  11175. ...Subsection,
  11176. ...SwipeAction,
  11177. ...SwipeActionItem,
  11178. ...Swiper,
  11179. ...SwipterIndicator,
  11180. ...Switch,
  11181. ...Tabbar,
  11182. ...TabbarItem,
  11183. ...Tabs,
  11184. ...Tag,
  11185. ...Text,
  11186. ...Textarea,
  11187. ...Toast,
  11188. ...Toolbar,
  11189. ...Tooltip,
  11190. ...Transition,
  11191. ...Upload
  11192. };
  11193. function setConfig$1(configs) {
  11194. shallowMerge(config, configs.config || {});
  11195. shallowMerge(props$v, configs.props || {});
  11196. shallowMerge(color$3, configs.color || {});
  11197. shallowMerge(zIndex, configs.zIndex || {});
  11198. }
  11199. if (index$1 && index$1.upuiParams) {
  11200. console.log("setting uview-plus");
  11201. let temp = index$1.upuiParams();
  11202. if (temp.httpIns) {
  11203. temp.httpIns(http);
  11204. }
  11205. if (temp.options) {
  11206. setConfig$1(temp.options);
  11207. }
  11208. }
  11209. let platform = "none";
  11210. platform = "vue3";
  11211. platform = "mp";
  11212. platform = "weixin";
  11213. const platform$1 = platform;
  11214. let themeType = ["primary", "success", "error", "warning", "info"];
  11215. function setConfig(configs) {
  11216. index.shallowMerge(config, configs.config || {});
  11217. index.shallowMerge(props$v, configs.props || {});
  11218. index.shallowMerge(color$3, configs.color || {});
  11219. index.shallowMerge(zIndex, configs.zIndex || {});
  11220. }
  11221. index.setConfig = setConfig;
  11222. const $u = {
  11223. route,
  11224. date: index.timeFormat,
  11225. // 另名date
  11226. colorGradient: colorGradient$1.colorGradient,
  11227. hexToRgb: colorGradient$1.hexToRgb,
  11228. rgbToHex: colorGradient$1.rgbToHex,
  11229. colorToRgba: colorGradient$1.colorToRgba,
  11230. test,
  11231. type: themeType,
  11232. http,
  11233. config,
  11234. // uview-plus配置信息相关,比如版本号
  11235. zIndex,
  11236. debounce,
  11237. throttle,
  11238. mixin,
  11239. mpMixin,
  11240. props: props$v,
  11241. ...index,
  11242. color: color$3,
  11243. platform: platform$1
  11244. };
  11245. const install2 = (Vue, upuiParams = "") => {
  11246. if (upuiParams) {
  11247. index$1.upuiParams = upuiParams;
  11248. let temp = upuiParams();
  11249. if (temp.httpIns) {
  11250. temp.httpIns(http);
  11251. }
  11252. if (temp.options) {
  11253. setConfig(temp.options);
  11254. }
  11255. }
  11256. index$1.$u = $u;
  11257. Vue.config.globalProperties.$u = $u;
  11258. Vue.mixin(mixin);
  11259. };
  11260. const uviewPlus = {
  11261. install: install2
  11262. };
  11263. /*!
  11264. * vue-router v4.1.6
  11265. * (c) 2022 Eduardo San Martin Morote
  11266. * @license MIT
  11267. */
  11268. var NavigationType;
  11269. (function(NavigationType2) {
  11270. NavigationType2["pop"] = "pop";
  11271. NavigationType2["push"] = "push";
  11272. })(NavigationType || (NavigationType = {}));
  11273. var NavigationDirection;
  11274. (function(NavigationDirection2) {
  11275. NavigationDirection2["back"] = "back";
  11276. NavigationDirection2["forward"] = "forward";
  11277. NavigationDirection2["unknown"] = "";
  11278. })(NavigationDirection || (NavigationDirection = {}));
  11279. var NavigationFailureType;
  11280. (function(NavigationFailureType2) {
  11281. NavigationFailureType2[NavigationFailureType2["aborted"] = 4] = "aborted";
  11282. NavigationFailureType2[NavigationFailureType2["cancelled"] = 8] = "cancelled";
  11283. NavigationFailureType2[NavigationFailureType2["duplicated"] = 16] = "duplicated";
  11284. })(NavigationFailureType || (NavigationFailureType = {}));
  11285. const routerKey = Symbol("router");
  11286. function useRouter() {
  11287. return inject(routerKey);
  11288. }
  11289. const props$u = defineMixin({
  11290. props: {
  11291. // 绑定的值
  11292. modelValue: {
  11293. type: [String, Number],
  11294. default: () => props$v.input.value
  11295. },
  11296. // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数
  11297. // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序
  11298. // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序
  11299. // text-文本输入键盘
  11300. type: {
  11301. type: String,
  11302. default: () => props$v.input.type
  11303. },
  11304. // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,
  11305. // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序
  11306. fixed: {
  11307. type: Boolean,
  11308. default: () => props$v.input.fixed
  11309. },
  11310. // 是否禁用输入框
  11311. disabled: {
  11312. type: Boolean,
  11313. default: () => props$v.input.disabled
  11314. },
  11315. // 禁用状态时的背景色
  11316. disabledColor: {
  11317. type: String,
  11318. default: () => props$v.input.disabledColor
  11319. },
  11320. // 是否显示清除控件
  11321. clearable: {
  11322. type: Boolean,
  11323. default: () => props$v.input.clearable
  11324. },
  11325. // 是否密码类型
  11326. password: {
  11327. type: Boolean,
  11328. default: () => props$v.input.password
  11329. },
  11330. // 最大输入长度,设置为 -1 的时候不限制最大长度
  11331. maxlength: {
  11332. type: [String, Number],
  11333. default: () => props$v.input.maxlength
  11334. },
  11335. // 输入框为空时的占位符
  11336. placeholder: {
  11337. type: String,
  11338. default: () => props$v.input.placeholder
  11339. },
  11340. // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
  11341. placeholderClass: {
  11342. type: String,
  11343. default: () => props$v.input.placeholderClass
  11344. },
  11345. // 指定placeholder的样式
  11346. placeholderStyle: {
  11347. type: [String, Object],
  11348. default: () => props$v.input.placeholderStyle
  11349. },
  11350. // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效
  11351. showWordLimit: {
  11352. type: Boolean,
  11353. default: () => props$v.input.showWordLimit
  11354. },
  11355. // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档
  11356. // https://uniapp.dcloud.io/component/input
  11357. // https://uniapp.dcloud.io/component/textarea
  11358. confirmType: {
  11359. type: String,
  11360. default: () => props$v.input.confirmType
  11361. },
  11362. // 点击键盘右下角按钮时是否保持键盘不收起,H5无效
  11363. confirmHold: {
  11364. type: Boolean,
  11365. default: () => props$v.input.confirmHold
  11366. },
  11367. // focus时,点击页面的时候不收起键盘,微信小程序有效
  11368. holdKeyboard: {
  11369. type: Boolean,
  11370. default: () => props$v.input.holdKeyboard
  11371. },
  11372. // 自动获取焦点
  11373. // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
  11374. focus: {
  11375. type: Boolean,
  11376. default: () => props$v.input.focus
  11377. },
  11378. // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
  11379. autoBlur: {
  11380. type: Boolean,
  11381. default: () => props$v.input.autoBlur
  11382. },
  11383. // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效
  11384. disableDefaultPadding: {
  11385. type: Boolean,
  11386. default: () => props$v.input.disableDefaultPadding
  11387. },
  11388. // 指定focus时光标的位置
  11389. cursor: {
  11390. type: [String, Number],
  11391. default: () => props$v.input.cursor
  11392. },
  11393. // 输入框聚焦时底部与键盘的距离
  11394. cursorSpacing: {
  11395. type: [String, Number],
  11396. default: () => props$v.input.cursorSpacing
  11397. },
  11398. // 光标起始位置,自动聚集时有效,需与selection-end搭配使用
  11399. selectionStart: {
  11400. type: [String, Number],
  11401. default: () => props$v.input.selectionStart
  11402. },
  11403. // 光标结束位置,自动聚集时有效,需与selection-start搭配使用
  11404. selectionEnd: {
  11405. type: [String, Number],
  11406. default: () => props$v.input.selectionEnd
  11407. },
  11408. // 键盘弹起时,是否自动上推页面
  11409. adjustPosition: {
  11410. type: Boolean,
  11411. default: () => props$v.input.adjustPosition
  11412. },
  11413. // 输入框内容对齐方式,可选值为:left|center|right
  11414. inputAlign: {
  11415. type: String,
  11416. default: () => props$v.input.inputAlign
  11417. },
  11418. // 输入框字体的大小
  11419. fontSize: {
  11420. type: [String, Number],
  11421. default: () => props$v.input.fontSize
  11422. },
  11423. // 输入框字体颜色
  11424. color: {
  11425. type: String,
  11426. default: () => props$v.input.color
  11427. },
  11428. // 输入框前置图标
  11429. prefixIcon: {
  11430. type: String,
  11431. default: () => props$v.input.prefixIcon
  11432. },
  11433. // 前置图标样式,对象或字符串
  11434. prefixIconStyle: {
  11435. type: [String, Object],
  11436. default: () => props$v.input.prefixIconStyle
  11437. },
  11438. // 输入框后置图标
  11439. suffixIcon: {
  11440. type: String,
  11441. default: () => props$v.input.suffixIcon
  11442. },
  11443. // 后置图标样式,对象或字符串
  11444. suffixIconStyle: {
  11445. type: [String, Object],
  11446. default: () => props$v.input.suffixIconStyle
  11447. },
  11448. // 边框类型,surround-四周边框,bottom-底部边框,none-无边框
  11449. border: {
  11450. type: String,
  11451. default: () => props$v.input.border
  11452. },
  11453. // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
  11454. readonly: {
  11455. type: Boolean,
  11456. default: () => props$v.input.readonly
  11457. },
  11458. // 输入框形状,circle-圆形,square-方形
  11459. shape: {
  11460. type: String,
  11461. default: () => props$v.input.shape
  11462. },
  11463. // 用于处理或者过滤输入框内容的方法
  11464. formatter: {
  11465. type: [Function, null],
  11466. default: () => props$v.input.formatter
  11467. },
  11468. // 是否忽略组件内对文本合成系统事件的处理
  11469. ignoreCompositionEvent: {
  11470. type: Boolean,
  11471. default: true
  11472. }
  11473. }
  11474. });
  11475. const props$t = defineMixin({
  11476. props: {
  11477. // 列表数组,元素可为字符串,如为对象可通过keyName指定目标属性名
  11478. list: {
  11479. type: Array,
  11480. default: () => props$v.swiper.list
  11481. },
  11482. // 是否显示面板指示器
  11483. indicator: {
  11484. type: Boolean,
  11485. default: () => props$v.swiper.indicator
  11486. },
  11487. // 指示器非激活颜色
  11488. indicatorActiveColor: {
  11489. type: String,
  11490. default: () => props$v.swiper.indicatorActiveColor
  11491. },
  11492. // 指示器的激活颜色
  11493. indicatorInactiveColor: {
  11494. type: String,
  11495. default: () => props$v.swiper.indicatorInactiveColor
  11496. },
  11497. // 指示器样式,可通过bottom,left,right进行定位
  11498. indicatorStyle: {
  11499. type: [String, Object],
  11500. default: () => props$v.swiper.indicatorStyle
  11501. },
  11502. // 指示器模式,line-线型,dot-点型
  11503. indicatorMode: {
  11504. type: String,
  11505. default: () => props$v.swiper.indicatorMode
  11506. },
  11507. // 是否自动切换
  11508. autoplay: {
  11509. type: Boolean,
  11510. default: () => props$v.swiper.autoplay
  11511. },
  11512. // 当前所在滑块的 index
  11513. current: {
  11514. type: [String, Number],
  11515. default: () => props$v.swiper.current
  11516. },
  11517. // 当前所在滑块的 item-id ,不能与 current 被同时指定
  11518. currentItemId: {
  11519. type: String,
  11520. default: () => props$v.swiper.currentItemId
  11521. },
  11522. // 滑块自动切换时间间隔
  11523. interval: {
  11524. type: [String, Number],
  11525. default: () => props$v.swiper.interval
  11526. },
  11527. // 滑块切换过程所需时间
  11528. duration: {
  11529. type: [String, Number],
  11530. default: () => props$v.swiper.duration
  11531. },
  11532. // 播放到末尾后是否重新回到开头
  11533. circular: {
  11534. type: Boolean,
  11535. default: () => props$v.swiper.circular
  11536. },
  11537. // 前边距,可用于露出前一项的一小部分,nvue和支付宝不支持
  11538. previousMargin: {
  11539. type: [String, Number],
  11540. default: () => props$v.swiper.previousMargin
  11541. },
  11542. // 后边距,可用于露出后一项的一小部分,nvue和支付宝不支持
  11543. nextMargin: {
  11544. type: [String, Number],
  11545. default: () => props$v.swiper.nextMargin
  11546. },
  11547. // 当开启时,会根据滑动速度,连续滑动多屏,支付宝不支持
  11548. acceleration: {
  11549. type: Boolean,
  11550. default: () => props$v.swiper.acceleration
  11551. },
  11552. // 同时显示的滑块数量,nvue、支付宝小程序不支持
  11553. displayMultipleItems: {
  11554. type: Number,
  11555. default: () => props$v.swiper.displayMultipleItems
  11556. },
  11557. // 指定swiper切换缓动动画类型,有效值:default、linear、easeInCubic、easeOutCubic、easeInOutCubic
  11558. // 只对微信小程序有效
  11559. easingFunction: {
  11560. type: String,
  11561. default: () => props$v.swiper.easingFunction
  11562. },
  11563. // list数组中指定对象的目标属性名
  11564. keyName: {
  11565. type: String,
  11566. default: () => props$v.swiper.keyName
  11567. },
  11568. // 图片的裁剪模式
  11569. imgMode: {
  11570. type: String,
  11571. default: () => props$v.swiper.imgMode
  11572. },
  11573. // 组件高度
  11574. height: {
  11575. type: [String, Number],
  11576. default: () => props$v.swiper.height
  11577. },
  11578. // 背景颜色
  11579. bgColor: {
  11580. type: String,
  11581. default: () => props$v.swiper.bgColor
  11582. },
  11583. // 组件圆角,数值或带单位的字符串
  11584. radius: {
  11585. type: [String, Number],
  11586. default: () => props$v.swiper.radius
  11587. },
  11588. // 是否加载中
  11589. loading: {
  11590. type: Boolean,
  11591. default: () => props$v.swiper.loading
  11592. },
  11593. // 是否显示标题,要求数组对象中有title属性
  11594. showTitle: {
  11595. type: Boolean,
  11596. default: () => props$v.swiper.showTitle
  11597. }
  11598. }
  11599. });
  11600. const props$s = defineMixin({
  11601. props: {
  11602. // 宫格的name
  11603. name: {
  11604. type: [String, Number, null],
  11605. default: () => props$v.gridItem.name
  11606. },
  11607. // 背景颜色
  11608. bgColor: {
  11609. type: String,
  11610. default: () => props$v.gridItem.bgColor
  11611. }
  11612. }
  11613. });
  11614. const props$r = defineMixin({
  11615. props: {
  11616. // 分成几列
  11617. col: {
  11618. type: [String, Number],
  11619. default: () => props$v.grid.col
  11620. },
  11621. // 是否显示边框
  11622. border: {
  11623. type: Boolean,
  11624. default: () => props$v.grid.border
  11625. },
  11626. // 宫格对齐方式,表现为数量少的时候,靠左,居中,还是靠右
  11627. align: {
  11628. type: String,
  11629. default: () => props$v.grid.align
  11630. },
  11631. // 间隔
  11632. gap: {
  11633. type: String,
  11634. default: "0px"
  11635. }
  11636. }
  11637. });
  11638. const buttonMixin = defineMixin({
  11639. props: {
  11640. lang: String,
  11641. sessionFrom: String,
  11642. sendMessageTitle: String,
  11643. sendMessagePath: String,
  11644. sendMessageImg: String,
  11645. showMessageCard: Boolean,
  11646. appParameter: String,
  11647. formType: String,
  11648. openType: String
  11649. }
  11650. });
  11651. const openType = defineMixin({
  11652. props: {
  11653. openType: String
  11654. },
  11655. methods: {
  11656. onGetUserInfo(event) {
  11657. this.$emit("getuserinfo", event.detail);
  11658. },
  11659. onContact(event) {
  11660. this.$emit("contact", event.detail);
  11661. },
  11662. onGetPhoneNumber(event) {
  11663. this.$emit("getphonenumber", event.detail);
  11664. },
  11665. onError(event) {
  11666. this.$emit("error", event.detail);
  11667. },
  11668. onLaunchApp(event) {
  11669. this.$emit("launchapp", event.detail);
  11670. },
  11671. onOpenSetting(event) {
  11672. this.$emit("opensetting", event.detail);
  11673. }
  11674. }
  11675. });
  11676. const props$q = defineMixin({
  11677. props: {
  11678. // 是否细边框
  11679. hairline: {
  11680. type: Boolean,
  11681. default: () => props$v.button.hairline
  11682. },
  11683. // 按钮的预置样式,info,primary,error,warning,success
  11684. type: {
  11685. type: String,
  11686. default: () => props$v.button.type
  11687. },
  11688. // 按钮尺寸,large,normal,small,mini
  11689. size: {
  11690. type: String,
  11691. default: () => props$v.button.size
  11692. },
  11693. // 按钮形状,circle(两边为半圆),square(带圆角)
  11694. shape: {
  11695. type: String,
  11696. default: () => props$v.button.shape
  11697. },
  11698. // 按钮是否镂空
  11699. plain: {
  11700. type: Boolean,
  11701. default: () => props$v.button.plain
  11702. },
  11703. // 是否禁止状态
  11704. disabled: {
  11705. type: Boolean,
  11706. default: () => props$v.button.disabled
  11707. },
  11708. // 是否加载中
  11709. loading: {
  11710. type: Boolean,
  11711. default: () => props$v.button.loading
  11712. },
  11713. // 加载中提示文字
  11714. loadingText: {
  11715. type: [String, Number],
  11716. default: () => props$v.button.loadingText
  11717. },
  11718. // 加载状态图标类型
  11719. loadingMode: {
  11720. type: String,
  11721. default: () => props$v.button.loadingMode
  11722. },
  11723. // 加载图标大小
  11724. loadingSize: {
  11725. type: [String, Number],
  11726. default: () => props$v.button.loadingSize
  11727. },
  11728. // 开放能力,具体请看uniapp稳定关于button组件部分说明
  11729. // https://uniapp.dcloud.io/component/button
  11730. openType: {
  11731. type: String,
  11732. default: () => props$v.button.openType
  11733. },
  11734. // 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
  11735. // 取值为submit(提交表单),reset(重置表单)
  11736. formType: {
  11737. type: String,
  11738. default: () => props$v.button.formType
  11739. },
  11740. // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
  11741. // 只微信小程序、QQ小程序有效
  11742. appParameter: {
  11743. type: String,
  11744. default: () => props$v.button.appParameter
  11745. },
  11746. // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
  11747. hoverStopPropagation: {
  11748. type: Boolean,
  11749. default: () => props$v.button.hoverStopPropagation
  11750. },
  11751. // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
  11752. lang: {
  11753. type: String,
  11754. default: () => props$v.button.lang
  11755. },
  11756. // 会话来源,open-type="contact"时有效。只微信小程序有效
  11757. sessionFrom: {
  11758. type: String,
  11759. default: () => props$v.button.sessionFrom
  11760. },
  11761. // 会话内消息卡片标题,open-type="contact"时有效
  11762. // 默认当前标题,只微信小程序有效
  11763. sendMessageTitle: {
  11764. type: String,
  11765. default: () => props$v.button.sendMessageTitle
  11766. },
  11767. // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
  11768. // 默认当前分享路径,只微信小程序有效
  11769. sendMessagePath: {
  11770. type: String,
  11771. default: () => props$v.button.sendMessagePath
  11772. },
  11773. // 会话内消息卡片图片,open-type="contact"时有效
  11774. // 默认当前页面截图,只微信小程序有效
  11775. sendMessageImg: {
  11776. type: String,
  11777. default: () => props$v.button.sendMessageImg
  11778. },
  11779. // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
  11780. // 用户点击后可以快速发送小程序消息,open-type="contact"时有效
  11781. showMessageCard: {
  11782. type: Boolean,
  11783. default: () => props$v.button.showMessageCard
  11784. },
  11785. // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
  11786. dataName: {
  11787. type: String,
  11788. default: () => props$v.button.dataName
  11789. },
  11790. // 节流,一定时间内只能触发一次
  11791. throttleTime: {
  11792. type: [String, Number],
  11793. default: () => props$v.button.throttleTime
  11794. },
  11795. // 按住后多久出现点击态,单位毫秒
  11796. hoverStartTime: {
  11797. type: [String, Number],
  11798. default: () => props$v.button.hoverStartTime
  11799. },
  11800. // 手指松开后点击态保留时间,单位毫秒
  11801. hoverStayTime: {
  11802. type: [String, Number],
  11803. default: () => props$v.button.hoverStayTime
  11804. },
  11805. // 按钮文字,之所以通过props传入,是因为slot传入的话
  11806. // nvue中无法控制文字的样式
  11807. text: {
  11808. type: [String, Number],
  11809. default: () => props$v.button.text
  11810. },
  11811. // 按钮图标
  11812. icon: {
  11813. type: String,
  11814. default: () => props$v.button.icon
  11815. },
  11816. // 按钮图标
  11817. iconColor: {
  11818. type: String,
  11819. default: () => props$v.button.icon
  11820. },
  11821. // 按钮颜色,支持传入linear-gradient渐变色
  11822. color: {
  11823. type: String,
  11824. default: () => props$v.button.color
  11825. },
  11826. // 停止冒泡
  11827. stop: {
  11828. type: Boolean,
  11829. default: () => props$v.button.stop
  11830. }
  11831. }
  11832. });
  11833. const props$p = defineMixin({
  11834. props: {
  11835. // 头像图片路径(不能为相对路径)
  11836. src: {
  11837. type: String,
  11838. default: () => props$v.avatar.src
  11839. },
  11840. // 头像形状,circle-圆形,square-方形
  11841. shape: {
  11842. type: String,
  11843. default: () => props$v.avatar.shape
  11844. },
  11845. // 头像尺寸
  11846. size: {
  11847. type: [String, Number],
  11848. default: () => props$v.avatar.size
  11849. },
  11850. // 裁剪模式
  11851. mode: {
  11852. type: String,
  11853. default: () => props$v.avatar.mode
  11854. },
  11855. // 显示的文字
  11856. text: {
  11857. type: String,
  11858. default: () => props$v.avatar.text
  11859. },
  11860. // 背景色
  11861. bgColor: {
  11862. type: String,
  11863. default: () => props$v.avatar.bgColor
  11864. },
  11865. // 文字颜色
  11866. color: {
  11867. type: String,
  11868. default: () => props$v.avatar.color
  11869. },
  11870. // 文字大小
  11871. fontSize: {
  11872. type: [String, Number],
  11873. default: () => props$v.avatar.fontSize
  11874. },
  11875. // 显示的图标
  11876. icon: {
  11877. type: String,
  11878. default: () => props$v.avatar.icon
  11879. },
  11880. // 显示小程序头像,只对百度,微信,QQ小程序有效
  11881. mpAvatar: {
  11882. type: Boolean,
  11883. default: () => props$v.avatar.mpAvatar
  11884. },
  11885. // 是否使用随机背景色
  11886. randomBgColor: {
  11887. type: Boolean,
  11888. default: () => props$v.avatar.randomBgColor
  11889. },
  11890. // 加载失败的默认头像(组件有内置默认图片)
  11891. defaultUrl: {
  11892. type: String,
  11893. default: () => props$v.avatar.defaultUrl
  11894. },
  11895. // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
  11896. colorIndex: {
  11897. type: [String, Number],
  11898. // 校验参数规则,索引在0-19之间
  11899. validator(n2) {
  11900. return test.range(n2, [0, 19]) || n2 === "";
  11901. },
  11902. default: () => props$v.avatar.colorIndex
  11903. },
  11904. // 组件标识符
  11905. name: {
  11906. type: String,
  11907. default: () => props$v.avatar.name
  11908. }
  11909. }
  11910. });
  11911. const props$o = defineMixin({
  11912. props: {
  11913. // 是否展示弹窗
  11914. show: {
  11915. type: Boolean,
  11916. default: () => props$v.popup.show
  11917. },
  11918. // 是否显示遮罩
  11919. overlay: {
  11920. type: Boolean,
  11921. default: () => props$v.popup.overlay
  11922. },
  11923. // 弹出的方向,可选值为 top bottom right left center
  11924. mode: {
  11925. type: String,
  11926. default: () => props$v.popup.mode
  11927. },
  11928. // 动画时长,单位ms
  11929. duration: {
  11930. type: [String, Number],
  11931. default: () => props$v.popup.duration
  11932. },
  11933. // 是否显示关闭图标
  11934. closeable: {
  11935. type: Boolean,
  11936. default: () => props$v.popup.closeable
  11937. },
  11938. // 自定义遮罩的样式
  11939. overlayStyle: {
  11940. type: [Object, String],
  11941. default: () => props$v.popup.overlayStyle
  11942. },
  11943. // 点击遮罩是否关闭弹窗
  11944. closeOnClickOverlay: {
  11945. type: Boolean,
  11946. default: () => props$v.popup.closeOnClickOverlay
  11947. },
  11948. // 层级
  11949. zIndex: {
  11950. type: [String, Number],
  11951. default: () => props$v.popup.zIndex
  11952. },
  11953. // 是否为iPhoneX留出底部安全距离
  11954. safeAreaInsetBottom: {
  11955. type: Boolean,
  11956. default: () => props$v.popup.safeAreaInsetBottom
  11957. },
  11958. // 是否留出顶部安全距离(状态栏高度)
  11959. safeAreaInsetTop: {
  11960. type: Boolean,
  11961. default: () => props$v.popup.safeAreaInsetTop
  11962. },
  11963. // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
  11964. closeIconPos: {
  11965. type: String,
  11966. default: () => props$v.popup.closeIconPos
  11967. },
  11968. // 是否显示圆角
  11969. round: {
  11970. type: [Boolean, String, Number],
  11971. default: () => props$v.popup.round
  11972. },
  11973. // mode=center,也即中部弹出时,是否使用缩放模式
  11974. zoom: {
  11975. type: Boolean,
  11976. default: () => props$v.popup.zoom
  11977. },
  11978. // 弹窗背景色,设置为transparent可去除白色背景
  11979. bgColor: {
  11980. type: String,
  11981. default: () => props$v.popup.bgColor
  11982. },
  11983. // 遮罩的透明度,0-1之间
  11984. overlayOpacity: {
  11985. type: [Number, String],
  11986. default: () => props$v.popup.overlayOpacity
  11987. }
  11988. }
  11989. });
  11990. const icons = {
  11991. "uicon-level": "",
  11992. "uicon-column-line": "",
  11993. "uicon-checkbox-mark": "",
  11994. "uicon-folder": "",
  11995. "uicon-movie": "",
  11996. "uicon-star-fill": "",
  11997. "uicon-star": "",
  11998. "uicon-phone-fill": "",
  11999. "uicon-phone": "",
  12000. "uicon-apple-fill": "",
  12001. "uicon-chrome-circle-fill": "",
  12002. "uicon-backspace": "",
  12003. "uicon-attach": "",
  12004. "uicon-cut": "",
  12005. "uicon-empty-car": "",
  12006. "uicon-empty-coupon": "",
  12007. "uicon-empty-address": "",
  12008. "uicon-empty-favor": "",
  12009. "uicon-empty-permission": "",
  12010. "uicon-empty-news": "",
  12011. "uicon-empty-search": "",
  12012. "uicon-github-circle-fill": "",
  12013. "uicon-rmb": "",
  12014. "uicon-person-delete-fill": "",
  12015. "uicon-reload": "",
  12016. "uicon-order": "",
  12017. "uicon-server-man": "",
  12018. "uicon-search": "",
  12019. "uicon-fingerprint": "",
  12020. "uicon-more-dot-fill": "",
  12021. "uicon-scan": "",
  12022. "uicon-share-square": "",
  12023. "uicon-map": "",
  12024. "uicon-map-fill": "",
  12025. "uicon-tags": "",
  12026. "uicon-tags-fill": "",
  12027. "uicon-bookmark-fill": "",
  12028. "uicon-bookmark": "",
  12029. "uicon-eye": "",
  12030. "uicon-eye-fill": "",
  12031. "uicon-mic": "",
  12032. "uicon-mic-off": "",
  12033. "uicon-calendar": "",
  12034. "uicon-calendar-fill": "",
  12035. "uicon-trash": "",
  12036. "uicon-trash-fill": "",
  12037. "uicon-play-left": "",
  12038. "uicon-play-right": "",
  12039. "uicon-minus": "",
  12040. "uicon-plus": "",
  12041. "uicon-info": "",
  12042. "uicon-info-circle": "",
  12043. "uicon-info-circle-fill": "",
  12044. "uicon-question": "",
  12045. "uicon-error": "",
  12046. "uicon-close": "",
  12047. "uicon-checkmark": "",
  12048. "uicon-android-circle-fill": "",
  12049. "uicon-android-fill": "",
  12050. "uicon-ie": "",
  12051. "uicon-IE-circle-fill": "",
  12052. "uicon-google": "",
  12053. "uicon-google-circle-fill": "",
  12054. "uicon-setting-fill": "",
  12055. "uicon-setting": "",
  12056. "uicon-minus-square-fill": "",
  12057. "uicon-plus-square-fill": "",
  12058. "uicon-heart": "",
  12059. "uicon-heart-fill": "",
  12060. "uicon-camera": "",
  12061. "uicon-camera-fill": "",
  12062. "uicon-more-circle": "",
  12063. "uicon-more-circle-fill": "",
  12064. "uicon-chat": "",
  12065. "uicon-chat-fill": "",
  12066. "uicon-bag-fill": "",
  12067. "uicon-bag": "",
  12068. "uicon-error-circle-fill": "",
  12069. "uicon-error-circle": "",
  12070. "uicon-close-circle": "",
  12071. "uicon-close-circle-fill": "",
  12072. "uicon-checkmark-circle": "",
  12073. "uicon-checkmark-circle-fill": "",
  12074. "uicon-question-circle-fill": "",
  12075. "uicon-question-circle": "",
  12076. "uicon-share": "",
  12077. "uicon-share-fill": "",
  12078. "uicon-shopping-cart": "",
  12079. "uicon-shopping-cart-fill": "",
  12080. "uicon-bell": "",
  12081. "uicon-bell-fill": "",
  12082. "uicon-list": "",
  12083. "uicon-list-dot": "",
  12084. "uicon-zhihu": "",
  12085. "uicon-zhihu-circle-fill": "",
  12086. "uicon-zhifubao": "",
  12087. "uicon-zhifubao-circle-fill": "",
  12088. "uicon-weixin-circle-fill": "",
  12089. "uicon-weixin-fill": "",
  12090. "uicon-twitter-circle-fill": "",
  12091. "uicon-twitter": "",
  12092. "uicon-taobao-circle-fill": "",
  12093. "uicon-taobao": "",
  12094. "uicon-weibo-circle-fill": "",
  12095. "uicon-weibo": "",
  12096. "uicon-qq-fill": "",
  12097. "uicon-qq-circle-fill": "",
  12098. "uicon-moments-circel-fill": "",
  12099. "uicon-moments": "",
  12100. "uicon-qzone": "",
  12101. "uicon-qzone-circle-fill": "",
  12102. "uicon-baidu-circle-fill": "",
  12103. "uicon-baidu": "",
  12104. "uicon-facebook-circle-fill": "",
  12105. "uicon-facebook": "",
  12106. "uicon-car": "",
  12107. "uicon-car-fill": "",
  12108. "uicon-warning-fill": "",
  12109. "uicon-warning": "",
  12110. "uicon-clock-fill": "",
  12111. "uicon-clock": "",
  12112. "uicon-edit-pen": "",
  12113. "uicon-edit-pen-fill": "",
  12114. "uicon-email": "",
  12115. "uicon-email-fill": "",
  12116. "uicon-minus-circle": "",
  12117. "uicon-minus-circle-fill": "",
  12118. "uicon-plus-circle": "",
  12119. "uicon-plus-circle-fill": "",
  12120. "uicon-file-text": "",
  12121. "uicon-file-text-fill": "",
  12122. "uicon-pushpin": "",
  12123. "uicon-pushpin-fill": "",
  12124. "uicon-grid": "",
  12125. "uicon-grid-fill": "",
  12126. "uicon-play-circle": "",
  12127. "uicon-play-circle-fill": "",
  12128. "uicon-pause-circle-fill": "",
  12129. "uicon-pause": "",
  12130. "uicon-pause-circle": "",
  12131. "uicon-eye-off": "",
  12132. "uicon-eye-off-outline": "",
  12133. "uicon-gift-fill": "",
  12134. "uicon-gift": "",
  12135. "uicon-rmb-circle-fill": "",
  12136. "uicon-rmb-circle": "",
  12137. "uicon-kefu-ermai": "",
  12138. "uicon-server-fill": "",
  12139. "uicon-coupon-fill": "",
  12140. "uicon-coupon": "",
  12141. "uicon-integral": "",
  12142. "uicon-integral-fill": "",
  12143. "uicon-home-fill": "",
  12144. "uicon-home": "",
  12145. "uicon-hourglass-half-fill": "",
  12146. "uicon-hourglass": "",
  12147. "uicon-account": "",
  12148. "uicon-plus-people-fill": "",
  12149. "uicon-minus-people-fill": "",
  12150. "uicon-account-fill": "",
  12151. "uicon-thumb-down-fill": "",
  12152. "uicon-thumb-down": "",
  12153. "uicon-thumb-up": "",
  12154. "uicon-thumb-up-fill": "",
  12155. "uicon-lock-fill": "",
  12156. "uicon-lock-open": "",
  12157. "uicon-lock-opened-fill": "",
  12158. "uicon-lock": "",
  12159. "uicon-red-packet-fill": "",
  12160. "uicon-photo-fill": "",
  12161. "uicon-photo": "",
  12162. "uicon-volume-off-fill": "",
  12163. "uicon-volume-off": "",
  12164. "uicon-volume-fill": "",
  12165. "uicon-volume": "",
  12166. "uicon-red-packet": "",
  12167. "uicon-download": "",
  12168. "uicon-arrow-up-fill": "",
  12169. "uicon-arrow-down-fill": "",
  12170. "uicon-play-left-fill": "",
  12171. "uicon-play-right-fill": "",
  12172. "uicon-rewind-left-fill": "",
  12173. "uicon-rewind-right-fill": "",
  12174. "uicon-arrow-downward": "",
  12175. "uicon-arrow-leftward": "",
  12176. "uicon-arrow-rightward": "",
  12177. "uicon-arrow-upward": "",
  12178. "uicon-arrow-down": "",
  12179. "uicon-arrow-right": "",
  12180. "uicon-arrow-left": "",
  12181. "uicon-arrow-up": "",
  12182. "uicon-skip-back-left": "",
  12183. "uicon-skip-forward-right": "",
  12184. "uicon-rewind-right": "",
  12185. "uicon-rewind-left": "",
  12186. "uicon-arrow-right-double": "",
  12187. "uicon-arrow-left-double": "",
  12188. "uicon-wifi-off": "",
  12189. "uicon-wifi": "",
  12190. "uicon-empty-data": "",
  12191. "uicon-empty-history": "",
  12192. "uicon-empty-list": "",
  12193. "uicon-empty-page": "",
  12194. "uicon-empty-order": "",
  12195. "uicon-man": "",
  12196. "uicon-woman": "",
  12197. "uicon-man-add": "",
  12198. "uicon-man-add-fill": "",
  12199. "uicon-man-delete": "",
  12200. "uicon-man-delete-fill": "",
  12201. "uicon-zh": "",
  12202. "uicon-en": ""
  12203. };
  12204. const props$n = defineMixin({
  12205. props: {
  12206. // 图标类名
  12207. name: {
  12208. type: String,
  12209. default: () => props$v.icon.name
  12210. },
  12211. // 图标颜色,可接受主题色
  12212. color: {
  12213. type: String,
  12214. default: () => props$v.icon.color
  12215. },
  12216. // 字体大小,单位px
  12217. size: {
  12218. type: [String, Number],
  12219. default: () => props$v.icon.size
  12220. },
  12221. // 是否显示粗体
  12222. bold: {
  12223. type: Boolean,
  12224. default: () => props$v.icon.bold
  12225. },
  12226. // 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
  12227. index: {
  12228. type: [String, Number],
  12229. default: () => props$v.icon.index
  12230. },
  12231. // 触摸图标时的类名
  12232. hoverClass: {
  12233. type: String,
  12234. default: () => props$v.icon.hoverClass
  12235. },
  12236. // 自定义扩展前缀,方便用户扩展自己的图标库
  12237. customPrefix: {
  12238. type: String,
  12239. default: () => props$v.icon.customPrefix
  12240. },
  12241. // 图标右边或者下面的文字
  12242. label: {
  12243. type: [String, Number],
  12244. default: () => props$v.icon.label
  12245. },
  12246. // label的位置,只能右边或者下边
  12247. labelPos: {
  12248. type: String,
  12249. default: () => props$v.icon.labelPos
  12250. },
  12251. // label的大小
  12252. labelSize: {
  12253. type: [String, Number],
  12254. default: () => props$v.icon.labelSize
  12255. },
  12256. // label的颜色
  12257. labelColor: {
  12258. type: String,
  12259. default: () => props$v.icon.labelColor
  12260. },
  12261. // label与图标的距离
  12262. space: {
  12263. type: [String, Number],
  12264. default: () => props$v.icon.space
  12265. },
  12266. // 图片的mode
  12267. imgMode: {
  12268. type: String,
  12269. default: () => props$v.icon.imgMode
  12270. },
  12271. // 用于显示图片小图标时,图片的宽度
  12272. width: {
  12273. type: [String, Number],
  12274. default: () => props$v.icon.width
  12275. },
  12276. // 用于显示图片小图标时,图片的高度
  12277. height: {
  12278. type: [String, Number],
  12279. default: () => props$v.icon.height
  12280. },
  12281. // 用于解决某些情况下,让图标垂直居中的用途
  12282. top: {
  12283. type: [String, Number],
  12284. default: () => props$v.icon.top
  12285. },
  12286. // 是否阻止事件传播
  12287. stop: {
  12288. type: Boolean,
  12289. default: () => props$v.icon.stop
  12290. }
  12291. }
  12292. });
  12293. const easycom = {
  12294. custom: {
  12295. "u-city-select": "@/components/u-city-select/u-city-select.vue",
  12296. "geek-(.*)": "@/components/geek-xd/components/geek-$1/geek-$1.vue",
  12297. "gx-(.*)": "@/components/geek-xd/components/geek-$1/geek-$1.vue",
  12298. "^u--(.*)": "uview-plus/components/u-$1/u-$1.vue",
  12299. "^up-(.*)": "uview-plus/components/u-$1/u-$1.vue",
  12300. "^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue",
  12301. "qiun-(.*)": "@/components/qiun-data-charts/components/qiun-$1/qiun-$1.vue",
  12302. "up-grid": "uview-plus/components/u-grid/u-grid",
  12303. "up-grid-item": "uview-plus/components/u-grid-item/u-grid-item"
  12304. }
  12305. };
  12306. const pages = [
  12307. {
  12308. path: "pages/index",
  12309. style: {
  12310. navigationBarTitleText: "乐融融",
  12311. navigationStyle: "custom"
  12312. }
  12313. },
  12314. {
  12315. path: "pages/login",
  12316. style: {
  12317. navigationBarTitleText: "登录"
  12318. }
  12319. },
  12320. {
  12321. path: "pages/work",
  12322. style: {
  12323. navigationBarTitleText: "工作台"
  12324. }
  12325. },
  12326. {
  12327. path: "pages/classify",
  12328. style: {
  12329. navigationBarTitleText: "分类"
  12330. }
  12331. },
  12332. {
  12333. path: "pages/mine",
  12334. style: {
  12335. navigationBarTitleText: "我的"
  12336. }
  12337. },
  12338. {
  12339. path: "pages/common/webview/index",
  12340. style: {
  12341. navigationBarTitleText: "浏览网页"
  12342. }
  12343. },
  12344. {
  12345. path: "pages/common/textview/index",
  12346. style: {
  12347. navigationBarTitleText: "浏览文本"
  12348. }
  12349. }
  12350. ];
  12351. const subPackages = [
  12352. {
  12353. root: "pages_mine/pages",
  12354. pages: [
  12355. {
  12356. path: "avatar/index",
  12357. style: {
  12358. navigationBarTitleText: "修改头像"
  12359. }
  12360. },
  12361. {
  12362. path: "info/index",
  12363. style: {
  12364. navigationBarTitleText: "个人信息"
  12365. }
  12366. },
  12367. {
  12368. path: "info/edit",
  12369. style: {
  12370. navigationBarTitleText: "编辑资料"
  12371. }
  12372. },
  12373. {
  12374. path: "pwd/index",
  12375. style: {
  12376. navigationBarTitleText: "修改密码"
  12377. }
  12378. },
  12379. {
  12380. path: "setting/index",
  12381. style: {
  12382. navigationBarTitleText: "应用设置"
  12383. }
  12384. },
  12385. {
  12386. path: "help/index",
  12387. style: {
  12388. navigationBarTitleText: "常见问题"
  12389. }
  12390. },
  12391. {
  12392. path: "about/index",
  12393. style: {
  12394. navigationBarTitleText: "关于我们"
  12395. }
  12396. }
  12397. ]
  12398. },
  12399. {
  12400. root: "pages_template/pages",
  12401. pages: [
  12402. {
  12403. path: "wxCenter/index",
  12404. style: {
  12405. navigationBarTitleText: "wxCenter 仿微信个人中心",
  12406. navigationStyle: "custom"
  12407. }
  12408. },
  12409. {
  12410. path: "keyboardPay/index",
  12411. style: {
  12412. navigationBarTitleText: "keyboardPay 自定义键盘支付"
  12413. }
  12414. },
  12415. {
  12416. path: "mallMenu/index2",
  12417. style: {
  12418. navigationBarTitleText: "mallMenu-商城分类"
  12419. }
  12420. },
  12421. {
  12422. path: "mallMenu/index1",
  12423. style: {
  12424. navigationBarTitleText: "mallMenu-商城分类"
  12425. }
  12426. },
  12427. {
  12428. path: "coupon/index",
  12429. style: {
  12430. navigationBarTitleText: "coupon-优惠券"
  12431. }
  12432. },
  12433. {
  12434. path: "login/index1",
  12435. style: {
  12436. navigationBarTitleText: "美团登录"
  12437. }
  12438. },
  12439. {
  12440. path: "login/index2",
  12441. style: {
  12442. navigationBarTitleText: "水滴登录"
  12443. }
  12444. },
  12445. {
  12446. path: "citySelect/index",
  12447. style: {
  12448. navigationBarTitleText: "城市选择"
  12449. }
  12450. },
  12451. {
  12452. path: "submitBar/index",
  12453. style: {
  12454. navigationBarTitleText: "提交订单栏"
  12455. }
  12456. },
  12457. {
  12458. path: "comment/index",
  12459. style: {
  12460. navigationBarTitleText: "评论"
  12461. }
  12462. },
  12463. {
  12464. path: "comment/reply",
  12465. style: {
  12466. navigationBarTitleText: "评论详情"
  12467. }
  12468. },
  12469. {
  12470. path: "order/index",
  12471. style: {
  12472. navigationBarTitleText: "订单"
  12473. }
  12474. },
  12475. {
  12476. path: "login/code",
  12477. style: {
  12478. navigationBarTitleText: "登录获取验证码"
  12479. }
  12480. },
  12481. {
  12482. path: "address/index",
  12483. style: {
  12484. navigationBarTitleText: "用户地址"
  12485. }
  12486. },
  12487. {
  12488. path: "address/addSite",
  12489. style: {
  12490. navigationBarTitleText: "添加用户地址"
  12491. }
  12492. }
  12493. ]
  12494. },
  12495. {
  12496. root: "pages_classify/pages",
  12497. pages: [
  12498. {
  12499. path: "test/index",
  12500. style: {
  12501. navigationBarTitleText: "test",
  12502. navigationStyle: "custom"
  12503. }
  12504. }
  12505. ]
  12506. },
  12507. {
  12508. root: "pages_qiun/pages",
  12509. pages: [
  12510. {
  12511. path: "sport/index",
  12512. style: {
  12513. pageOrientation: "auto"
  12514. }
  12515. },
  12516. {
  12517. path: "school/index",
  12518. style: {
  12519. pageOrientation: "auto"
  12520. }
  12521. },
  12522. {
  12523. path: "finance/index",
  12524. style: {
  12525. pageOrientation: "auto"
  12526. }
  12527. },
  12528. {
  12529. path: "main/index",
  12530. style: {
  12531. pageOrientation: "auto"
  12532. }
  12533. }
  12534. ]
  12535. },
  12536. {
  12537. root: "pages_geek/pages",
  12538. pages: [
  12539. {
  12540. path: "index/index"
  12541. },
  12542. {
  12543. path: "code/index"
  12544. }
  12545. ]
  12546. }
  12547. ];
  12548. const tabBar = {
  12549. color: "#000000",
  12550. selectedColor: "#000000",
  12551. borderStyle: "white",
  12552. backgroundColor: "#ffffff",
  12553. list: [
  12554. {
  12555. pagePath: "pages/index",
  12556. iconPath: "static/images/tabbar/home.png",
  12557. selectedIconPath: "static/images/tabbar/home_.png",
  12558. text: "首页"
  12559. },
  12560. {
  12561. pagePath: "pages/work",
  12562. iconPath: "static/images/tabbar/work.png",
  12563. selectedIconPath: "static/images/tabbar/work_.png",
  12564. text: "工作台"
  12565. },
  12566. {
  12567. pagePath: "pages/classify",
  12568. iconPath: "static/images/tabbar/work.png",
  12569. selectedIconPath: "static/images/tabbar/work_.png",
  12570. text: "分类"
  12571. },
  12572. {
  12573. pagePath: "pages/mine",
  12574. iconPath: "static/images/tabbar/mine.png",
  12575. selectedIconPath: "static/images/tabbar/mine_.png",
  12576. text: "我的"
  12577. }
  12578. ]
  12579. };
  12580. const globalStyle = {
  12581. navigationBarTextStyle: "black",
  12582. navigationBarTitleText: "RuoYi",
  12583. navigationBarBackgroundColor: "#FFFFFF"
  12584. };
  12585. const t = {
  12586. easycom,
  12587. pages,
  12588. subPackages,
  12589. tabBar,
  12590. globalStyle
  12591. };
  12592. function n(e2) {
  12593. return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
  12594. }
  12595. function s(e2, t2, n2) {
  12596. return e2(n2 = { path: t2, exports: {}, require: function(e3, t3) {
  12597. return function() {
  12598. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  12599. }(null == t3 && n2.path);
  12600. } }, n2.exports), n2.exports;
  12601. }
  12602. var r = s(function(e2, t2) {
  12603. var n2;
  12604. e2.exports = (n2 = n2 || function(e3, t3) {
  12605. var n3 = Object.create || function() {
  12606. function e4() {
  12607. }
  12608. return function(t4) {
  12609. var n4;
  12610. return e4.prototype = t4, n4 = new e4(), e4.prototype = null, n4;
  12611. };
  12612. }(), s2 = {}, r2 = s2.lib = {}, i2 = r2.Base = { extend: function(e4) {
  12613. var t4 = n3(this);
  12614. return e4 && t4.mixIn(e4), t4.hasOwnProperty("init") && this.init !== t4.init || (t4.init = function() {
  12615. t4.$super.init.apply(this, arguments);
  12616. }), t4.init.prototype = t4, t4.$super = this, t4;
  12617. }, create: function() {
  12618. var e4 = this.extend();
  12619. return e4.init.apply(e4, arguments), e4;
  12620. }, init: function() {
  12621. }, mixIn: function(e4) {
  12622. for (var t4 in e4)
  12623. e4.hasOwnProperty(t4) && (this[t4] = e4[t4]);
  12624. e4.hasOwnProperty("toString") && (this.toString = e4.toString);
  12625. }, clone: function() {
  12626. return this.init.prototype.extend(this);
  12627. } }, o2 = r2.WordArray = i2.extend({ init: function(e4, n4) {
  12628. e4 = this.words = e4 || [], this.sigBytes = n4 != t3 ? n4 : 4 * e4.length;
  12629. }, toString: function(e4) {
  12630. return (e4 || c2).stringify(this);
  12631. }, concat: function(e4) {
  12632. var t4 = this.words, n4 = e4.words, s3 = this.sigBytes, r3 = e4.sigBytes;
  12633. if (this.clamp(), s3 % 4)
  12634. for (var i3 = 0; i3 < r3; i3++) {
  12635. var o3 = n4[i3 >>> 2] >>> 24 - i3 % 4 * 8 & 255;
  12636. t4[s3 + i3 >>> 2] |= o3 << 24 - (s3 + i3) % 4 * 8;
  12637. }
  12638. else
  12639. for (i3 = 0; i3 < r3; i3 += 4)
  12640. t4[s3 + i3 >>> 2] = n4[i3 >>> 2];
  12641. return this.sigBytes += r3, this;
  12642. }, clamp: function() {
  12643. var t4 = this.words, n4 = this.sigBytes;
  12644. t4[n4 >>> 2] &= 4294967295 << 32 - n4 % 4 * 8, t4.length = e3.ceil(n4 / 4);
  12645. }, clone: function() {
  12646. var e4 = i2.clone.call(this);
  12647. return e4.words = this.words.slice(0), e4;
  12648. }, random: function(t4) {
  12649. for (var n4, s3 = [], r3 = function(t5) {
  12650. t5 = t5;
  12651. var n5 = 987654321, s4 = 4294967295;
  12652. return function() {
  12653. var r4 = ((n5 = 36969 * (65535 & n5) + (n5 >> 16) & s4) << 16) + (t5 = 18e3 * (65535 & t5) + (t5 >> 16) & s4) & s4;
  12654. return r4 /= 4294967296, (r4 += 0.5) * (e3.random() > 0.5 ? 1 : -1);
  12655. };
  12656. }, i3 = 0; i3 < t4; i3 += 4) {
  12657. var a3 = r3(4294967296 * (n4 || e3.random()));
  12658. n4 = 987654071 * a3(), s3.push(4294967296 * a3() | 0);
  12659. }
  12660. return new o2.init(s3, t4);
  12661. } }), a2 = s2.enc = {}, c2 = a2.Hex = { stringify: function(e4) {
  12662. for (var t4 = e4.words, n4 = e4.sigBytes, s3 = [], r3 = 0; r3 < n4; r3++) {
  12663. var i3 = t4[r3 >>> 2] >>> 24 - r3 % 4 * 8 & 255;
  12664. s3.push((i3 >>> 4).toString(16)), s3.push((15 & i3).toString(16));
  12665. }
  12666. return s3.join("");
  12667. }, parse: function(e4) {
  12668. for (var t4 = e4.length, n4 = [], s3 = 0; s3 < t4; s3 += 2)
  12669. n4[s3 >>> 3] |= parseInt(e4.substr(s3, 2), 16) << 24 - s3 % 8 * 4;
  12670. return new o2.init(n4, t4 / 2);
  12671. } }, u2 = a2.Latin1 = { stringify: function(e4) {
  12672. for (var t4 = e4.words, n4 = e4.sigBytes, s3 = [], r3 = 0; r3 < n4; r3++) {
  12673. var i3 = t4[r3 >>> 2] >>> 24 - r3 % 4 * 8 & 255;
  12674. s3.push(String.fromCharCode(i3));
  12675. }
  12676. return s3.join("");
  12677. }, parse: function(e4) {
  12678. for (var t4 = e4.length, n4 = [], s3 = 0; s3 < t4; s3++)
  12679. n4[s3 >>> 2] |= (255 & e4.charCodeAt(s3)) << 24 - s3 % 4 * 8;
  12680. return new o2.init(n4, t4);
  12681. } }, h2 = a2.Utf8 = { stringify: function(e4) {
  12682. try {
  12683. return decodeURIComponent(escape(u2.stringify(e4)));
  12684. } catch (e5) {
  12685. throw new Error("Malformed UTF-8 data");
  12686. }
  12687. }, parse: function(e4) {
  12688. return u2.parse(unescape(encodeURIComponent(e4)));
  12689. } }, l2 = r2.BufferedBlockAlgorithm = i2.extend({ reset: function() {
  12690. this._data = new o2.init(), this._nDataBytes = 0;
  12691. }, _append: function(e4) {
  12692. "string" == typeof e4 && (e4 = h2.parse(e4)), this._data.concat(e4), this._nDataBytes += e4.sigBytes;
  12693. }, _process: function(t4) {
  12694. var n4 = this._data, s3 = n4.words, r3 = n4.sigBytes, i3 = this.blockSize, a3 = r3 / (4 * i3), c3 = (a3 = t4 ? e3.ceil(a3) : e3.max((0 | a3) - this._minBufferSize, 0)) * i3, u3 = e3.min(4 * c3, r3);
  12695. if (c3) {
  12696. for (var h3 = 0; h3 < c3; h3 += i3)
  12697. this._doProcessBlock(s3, h3);
  12698. var l3 = s3.splice(0, c3);
  12699. n4.sigBytes -= u3;
  12700. }
  12701. return new o2.init(l3, u3);
  12702. }, clone: function() {
  12703. var e4 = i2.clone.call(this);
  12704. return e4._data = this._data.clone(), e4;
  12705. }, _minBufferSize: 0 });
  12706. r2.Hasher = l2.extend({ cfg: i2.extend(), init: function(e4) {
  12707. this.cfg = this.cfg.extend(e4), this.reset();
  12708. }, reset: function() {
  12709. l2.reset.call(this), this._doReset();
  12710. }, update: function(e4) {
  12711. return this._append(e4), this._process(), this;
  12712. }, finalize: function(e4) {
  12713. return e4 && this._append(e4), this._doFinalize();
  12714. }, blockSize: 16, _createHelper: function(e4) {
  12715. return function(t4, n4) {
  12716. return new e4.init(n4).finalize(t4);
  12717. };
  12718. }, _createHmacHelper: function(e4) {
  12719. return function(t4, n4) {
  12720. return new d2.HMAC.init(e4, n4).finalize(t4);
  12721. };
  12722. } });
  12723. var d2 = s2.algo = {};
  12724. return s2;
  12725. }(Math), n2);
  12726. }), i = r, o = (s(function(e2, t2) {
  12727. var n2;
  12728. e2.exports = (n2 = i, function(e3) {
  12729. var t3 = n2, s2 = t3.lib, r2 = s2.WordArray, i2 = s2.Hasher, o2 = t3.algo, a2 = [];
  12730. !function() {
  12731. for (var t4 = 0; t4 < 64; t4++)
  12732. a2[t4] = 4294967296 * e3.abs(e3.sin(t4 + 1)) | 0;
  12733. }();
  12734. var c2 = o2.MD5 = i2.extend({ _doReset: function() {
  12735. this._hash = new r2.init([1732584193, 4023233417, 2562383102, 271733878]);
  12736. }, _doProcessBlock: function(e4, t4) {
  12737. for (var n3 = 0; n3 < 16; n3++) {
  12738. var s3 = t4 + n3, r3 = e4[s3];
  12739. e4[s3] = 16711935 & (r3 << 8 | r3 >>> 24) | 4278255360 & (r3 << 24 | r3 >>> 8);
  12740. }
  12741. var i3 = this._hash.words, o3 = e4[t4 + 0], c3 = e4[t4 + 1], p2 = e4[t4 + 2], f2 = e4[t4 + 3], g2 = e4[t4 + 4], m2 = e4[t4 + 5], y2 = e4[t4 + 6], _2 = e4[t4 + 7], w2 = e4[t4 + 8], v2 = e4[t4 + 9], I2 = e4[t4 + 10], S2 = e4[t4 + 11], b2 = e4[t4 + 12], k2 = e4[t4 + 13], C = e4[t4 + 14], T2 = e4[t4 + 15], P2 = i3[0], A2 = i3[1], E2 = i3[2], O = i3[3];
  12742. P2 = u2(P2, A2, E2, O, o3, 7, a2[0]), O = u2(O, P2, A2, E2, c3, 12, a2[1]), E2 = u2(E2, O, P2, A2, p2, 17, a2[2]), A2 = u2(A2, E2, O, P2, f2, 22, a2[3]), P2 = u2(P2, A2, E2, O, g2, 7, a2[4]), O = u2(O, P2, A2, E2, m2, 12, a2[5]), E2 = u2(E2, O, P2, A2, y2, 17, a2[6]), A2 = u2(A2, E2, O, P2, _2, 22, a2[7]), P2 = u2(P2, A2, E2, O, w2, 7, a2[8]), O = u2(O, P2, A2, E2, v2, 12, a2[9]), E2 = u2(E2, O, P2, A2, I2, 17, a2[10]), A2 = u2(A2, E2, O, P2, S2, 22, a2[11]), P2 = u2(P2, A2, E2, O, b2, 7, a2[12]), O = u2(O, P2, A2, E2, k2, 12, a2[13]), E2 = u2(E2, O, P2, A2, C, 17, a2[14]), P2 = h2(P2, A2 = u2(A2, E2, O, P2, T2, 22, a2[15]), E2, O, c3, 5, a2[16]), O = h2(O, P2, A2, E2, y2, 9, a2[17]), E2 = h2(E2, O, P2, A2, S2, 14, a2[18]), A2 = h2(A2, E2, O, P2, o3, 20, a2[19]), P2 = h2(P2, A2, E2, O, m2, 5, a2[20]), O = h2(O, P2, A2, E2, I2, 9, a2[21]), E2 = h2(E2, O, P2, A2, T2, 14, a2[22]), A2 = h2(A2, E2, O, P2, g2, 20, a2[23]), P2 = h2(P2, A2, E2, O, v2, 5, a2[24]), O = h2(O, P2, A2, E2, C, 9, a2[25]), E2 = h2(E2, O, P2, A2, f2, 14, a2[26]), A2 = h2(A2, E2, O, P2, w2, 20, a2[27]), P2 = h2(P2, A2, E2, O, k2, 5, a2[28]), O = h2(O, P2, A2, E2, p2, 9, a2[29]), E2 = h2(E2, O, P2, A2, _2, 14, a2[30]), P2 = l2(P2, A2 = h2(A2, E2, O, P2, b2, 20, a2[31]), E2, O, m2, 4, a2[32]), O = l2(O, P2, A2, E2, w2, 11, a2[33]), E2 = l2(E2, O, P2, A2, S2, 16, a2[34]), A2 = l2(A2, E2, O, P2, C, 23, a2[35]), P2 = l2(P2, A2, E2, O, c3, 4, a2[36]), O = l2(O, P2, A2, E2, g2, 11, a2[37]), E2 = l2(E2, O, P2, A2, _2, 16, a2[38]), A2 = l2(A2, E2, O, P2, I2, 23, a2[39]), P2 = l2(P2, A2, E2, O, k2, 4, a2[40]), O = l2(O, P2, A2, E2, o3, 11, a2[41]), E2 = l2(E2, O, P2, A2, f2, 16, a2[42]), A2 = l2(A2, E2, O, P2, y2, 23, a2[43]), P2 = l2(P2, A2, E2, O, v2, 4, a2[44]), O = l2(O, P2, A2, E2, b2, 11, a2[45]), E2 = l2(E2, O, P2, A2, T2, 16, a2[46]), P2 = d2(P2, A2 = l2(A2, E2, O, P2, p2, 23, a2[47]), E2, O, o3, 6, a2[48]), O = d2(O, P2, A2, E2, _2, 10, a2[49]), E2 = d2(E2, O, P2, A2, C, 15, a2[50]), A2 = d2(A2, E2, O, P2, m2, 21, a2[51]), P2 = d2(P2, A2, E2, O, b2, 6, a2[52]), O = d2(O, P2, A2, E2, f2, 10, a2[53]), E2 = d2(E2, O, P2, A2, I2, 15, a2[54]), A2 = d2(A2, E2, O, P2, c3, 21, a2[55]), P2 = d2(P2, A2, E2, O, w2, 6, a2[56]), O = d2(O, P2, A2, E2, T2, 10, a2[57]), E2 = d2(E2, O, P2, A2, y2, 15, a2[58]), A2 = d2(A2, E2, O, P2, k2, 21, a2[59]), P2 = d2(P2, A2, E2, O, g2, 6, a2[60]), O = d2(O, P2, A2, E2, S2, 10, a2[61]), E2 = d2(E2, O, P2, A2, p2, 15, a2[62]), A2 = d2(A2, E2, O, P2, v2, 21, a2[63]), i3[0] = i3[0] + P2 | 0, i3[1] = i3[1] + A2 | 0, i3[2] = i3[2] + E2 | 0, i3[3] = i3[3] + O | 0;
  12743. }, _doFinalize: function() {
  12744. var t4 = this._data, n3 = t4.words, s3 = 8 * this._nDataBytes, r3 = 8 * t4.sigBytes;
  12745. n3[r3 >>> 5] |= 128 << 24 - r3 % 32;
  12746. var i3 = e3.floor(s3 / 4294967296), o3 = s3;
  12747. n3[15 + (r3 + 64 >>> 9 << 4)] = 16711935 & (i3 << 8 | i3 >>> 24) | 4278255360 & (i3 << 24 | i3 >>> 8), n3[14 + (r3 + 64 >>> 9 << 4)] = 16711935 & (o3 << 8 | o3 >>> 24) | 4278255360 & (o3 << 24 | o3 >>> 8), t4.sigBytes = 4 * (n3.length + 1), this._process();
  12748. for (var a3 = this._hash, c3 = a3.words, u3 = 0; u3 < 4; u3++) {
  12749. var h3 = c3[u3];
  12750. c3[u3] = 16711935 & (h3 << 8 | h3 >>> 24) | 4278255360 & (h3 << 24 | h3 >>> 8);
  12751. }
  12752. return a3;
  12753. }, clone: function() {
  12754. var e4 = i2.clone.call(this);
  12755. return e4._hash = this._hash.clone(), e4;
  12756. } });
  12757. function u2(e4, t4, n3, s3, r3, i3, o3) {
  12758. var a3 = e4 + (t4 & n3 | ~t4 & s3) + r3 + o3;
  12759. return (a3 << i3 | a3 >>> 32 - i3) + t4;
  12760. }
  12761. function h2(e4, t4, n3, s3, r3, i3, o3) {
  12762. var a3 = e4 + (t4 & s3 | n3 & ~s3) + r3 + o3;
  12763. return (a3 << i3 | a3 >>> 32 - i3) + t4;
  12764. }
  12765. function l2(e4, t4, n3, s3, r3, i3, o3) {
  12766. var a3 = e4 + (t4 ^ n3 ^ s3) + r3 + o3;
  12767. return (a3 << i3 | a3 >>> 32 - i3) + t4;
  12768. }
  12769. function d2(e4, t4, n3, s3, r3, i3, o3) {
  12770. var a3 = e4 + (n3 ^ (t4 | ~s3)) + r3 + o3;
  12771. return (a3 << i3 | a3 >>> 32 - i3) + t4;
  12772. }
  12773. t3.MD5 = i2._createHelper(c2), t3.HmacMD5 = i2._createHmacHelper(c2);
  12774. }(Math), n2.MD5);
  12775. }), s(function(e2, t2) {
  12776. var n2;
  12777. e2.exports = (n2 = i, void function() {
  12778. var e3 = n2, t3 = e3.lib.Base, s2 = e3.enc.Utf8;
  12779. e3.algo.HMAC = t3.extend({ init: function(e4, t4) {
  12780. e4 = this._hasher = new e4.init(), "string" == typeof t4 && (t4 = s2.parse(t4));
  12781. var n3 = e4.blockSize, r2 = 4 * n3;
  12782. t4.sigBytes > r2 && (t4 = e4.finalize(t4)), t4.clamp();
  12783. for (var i2 = this._oKey = t4.clone(), o2 = this._iKey = t4.clone(), a2 = i2.words, c2 = o2.words, u2 = 0; u2 < n3; u2++)
  12784. a2[u2] ^= 1549556828, c2[u2] ^= 909522486;
  12785. i2.sigBytes = o2.sigBytes = r2, this.reset();
  12786. }, reset: function() {
  12787. var e4 = this._hasher;
  12788. e4.reset(), e4.update(this._iKey);
  12789. }, update: function(e4) {
  12790. return this._hasher.update(e4), this;
  12791. }, finalize: function(e4) {
  12792. var t4 = this._hasher, n3 = t4.finalize(e4);
  12793. return t4.reset(), t4.finalize(this._oKey.clone().concat(n3));
  12794. } });
  12795. }());
  12796. }), s(function(e2, t2) {
  12797. e2.exports = i.HmacMD5;
  12798. })), a = s(function(e2, t2) {
  12799. e2.exports = i.enc.Utf8;
  12800. }), c = s(function(e2, t2) {
  12801. var n2;
  12802. e2.exports = (n2 = i, function() {
  12803. var e3 = n2, t3 = e3.lib.WordArray;
  12804. function s2(e4, n3, s3) {
  12805. for (var r2 = [], i2 = 0, o2 = 0; o2 < n3; o2++)
  12806. if (o2 % 4) {
  12807. var a2 = s3[e4.charCodeAt(o2 - 1)] << o2 % 4 * 2, c2 = s3[e4.charCodeAt(o2)] >>> 6 - o2 % 4 * 2;
  12808. r2[i2 >>> 2] |= (a2 | c2) << 24 - i2 % 4 * 8, i2++;
  12809. }
  12810. return t3.create(r2, i2);
  12811. }
  12812. e3.enc.Base64 = { stringify: function(e4) {
  12813. var t4 = e4.words, n3 = e4.sigBytes, s3 = this._map;
  12814. e4.clamp();
  12815. for (var r2 = [], i2 = 0; i2 < n3; i2 += 3)
  12816. for (var o2 = (t4[i2 >>> 2] >>> 24 - i2 % 4 * 8 & 255) << 16 | (t4[i2 + 1 >>> 2] >>> 24 - (i2 + 1) % 4 * 8 & 255) << 8 | t4[i2 + 2 >>> 2] >>> 24 - (i2 + 2) % 4 * 8 & 255, a2 = 0; a2 < 4 && i2 + 0.75 * a2 < n3; a2++)
  12817. r2.push(s3.charAt(o2 >>> 6 * (3 - a2) & 63));
  12818. var c2 = s3.charAt(64);
  12819. if (c2)
  12820. for (; r2.length % 4; )
  12821. r2.push(c2);
  12822. return r2.join("");
  12823. }, parse: function(e4) {
  12824. var t4 = e4.length, n3 = this._map, r2 = this._reverseMap;
  12825. if (!r2) {
  12826. r2 = this._reverseMap = [];
  12827. for (var i2 = 0; i2 < n3.length; i2++)
  12828. r2[n3.charCodeAt(i2)] = i2;
  12829. }
  12830. var o2 = n3.charAt(64);
  12831. if (o2) {
  12832. var a2 = e4.indexOf(o2);
  12833. -1 !== a2 && (t4 = a2);
  12834. }
  12835. return s2(e4, t4, r2);
  12836. }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" };
  12837. }(), n2.enc.Base64);
  12838. });
  12839. const u = "FUNCTION", h = "OBJECT", l = "CLIENT_DB", d = "pending", p = "fullfilled", f = "rejected";
  12840. function g(e2) {
  12841. return Object.prototype.toString.call(e2).slice(8, -1).toLowerCase();
  12842. }
  12843. function m(e2) {
  12844. return "object" === g(e2);
  12845. }
  12846. function y(e2) {
  12847. return "function" == typeof e2;
  12848. }
  12849. function _(e2) {
  12850. return function() {
  12851. try {
  12852. return e2.apply(e2, arguments);
  12853. } catch (e3) {
  12854. console.error(e3);
  12855. }
  12856. };
  12857. }
  12858. const w = "REJECTED", v = "NOT_PENDING";
  12859. class I {
  12860. constructor({ createPromise: e2, retryRule: t2 = w } = {}) {
  12861. this.createPromise = e2, this.status = null, this.promise = null, this.retryRule = t2;
  12862. }
  12863. get needRetry() {
  12864. if (!this.status)
  12865. return true;
  12866. switch (this.retryRule) {
  12867. case w:
  12868. return this.status === f;
  12869. case v:
  12870. return this.status !== d;
  12871. }
  12872. }
  12873. exec() {
  12874. return this.needRetry ? (this.status = d, this.promise = this.createPromise().then((e2) => (this.status = p, Promise.resolve(e2)), (e2) => (this.status = f, Promise.reject(e2))), this.promise) : this.promise;
  12875. }
  12876. }
  12877. function S(e2) {
  12878. return e2 && "string" == typeof e2 ? JSON.parse(e2) : e2;
  12879. }
  12880. const b = true, k = "mp-weixin", T = S([]), P = k, A = S(""), E = S("[]") || [];
  12881. let x = "";
  12882. try {
  12883. x = "__UNI__3DD118D";
  12884. } catch (e2) {
  12885. }
  12886. let R = {};
  12887. function U(e2, t2 = {}) {
  12888. var n2, s2;
  12889. return n2 = R, s2 = e2, Object.prototype.hasOwnProperty.call(n2, s2) || (R[e2] = t2), R[e2];
  12890. }
  12891. const L = ["invoke", "success", "fail", "complete"], N = U("_globalUniCloudInterceptor");
  12892. function D(e2, t2) {
  12893. N[e2] || (N[e2] = {}), m(t2) && Object.keys(t2).forEach((n2) => {
  12894. L.indexOf(n2) > -1 && function(e3, t3, n3) {
  12895. let s2 = N[e3][t3];
  12896. s2 || (s2 = N[e3][t3] = []), -1 === s2.indexOf(n3) && y(n3) && s2.push(n3);
  12897. }(e2, n2, t2[n2]);
  12898. });
  12899. }
  12900. function F(e2, t2) {
  12901. N[e2] || (N[e2] = {}), m(t2) ? Object.keys(t2).forEach((n2) => {
  12902. L.indexOf(n2) > -1 && function(e3, t3, n3) {
  12903. const s2 = N[e3][t3];
  12904. if (!s2)
  12905. return;
  12906. const r2 = s2.indexOf(n3);
  12907. r2 > -1 && s2.splice(r2, 1);
  12908. }(e2, n2, t2[n2]);
  12909. }) : delete N[e2];
  12910. }
  12911. function q(e2, t2) {
  12912. return e2 && 0 !== e2.length ? e2.reduce((e3, n2) => e3.then(() => n2(t2)), Promise.resolve()) : Promise.resolve();
  12913. }
  12914. function M(e2, t2) {
  12915. return N[e2] && N[e2][t2] || [];
  12916. }
  12917. function K(e2) {
  12918. D("callObject", e2);
  12919. }
  12920. const j = U("_globalUniCloudListener"), B = "response", $ = "needLogin", W = "refreshToken", z = "clientdb", J = "cloudfunction", H = "cloudobject";
  12921. function G(e2) {
  12922. return j[e2] || (j[e2] = []), j[e2];
  12923. }
  12924. function V(e2, t2) {
  12925. const n2 = G(e2);
  12926. n2.includes(t2) || n2.push(t2);
  12927. }
  12928. function Q(e2, t2) {
  12929. const n2 = G(e2), s2 = n2.indexOf(t2);
  12930. -1 !== s2 && n2.splice(s2, 1);
  12931. }
  12932. function Y(e2, t2) {
  12933. const n2 = G(e2);
  12934. for (let e3 = 0; e3 < n2.length; e3++) {
  12935. (0, n2[e3])(t2);
  12936. }
  12937. }
  12938. let X, Z = false;
  12939. function ee() {
  12940. return X || (X = new Promise((e2) => {
  12941. Z && e2(), function t2() {
  12942. if ("function" == typeof getCurrentPages) {
  12943. const t3 = getCurrentPages();
  12944. t3 && t3[0] && (Z = true, e2());
  12945. }
  12946. Z || setTimeout(() => {
  12947. t2();
  12948. }, 30);
  12949. }();
  12950. }), X);
  12951. }
  12952. function te(e2) {
  12953. const t2 = {};
  12954. for (const n2 in e2) {
  12955. const s2 = e2[n2];
  12956. y(s2) && (t2[n2] = _(s2));
  12957. }
  12958. return t2;
  12959. }
  12960. class ne extends Error {
  12961. constructor(e2) {
  12962. super(e2.message), this.errMsg = e2.message || e2.errMsg || "unknown system error", this.code = this.errCode = e2.code || e2.errCode || "SYSTEM_ERROR", this.errSubject = this.subject = e2.subject || e2.errSubject, this.cause = e2.cause, this.requestId = e2.requestId;
  12963. }
  12964. toJson(e2 = 0) {
  12965. if (!(e2 >= 10))
  12966. return e2++, { errCode: this.errCode, errMsg: this.errMsg, errSubject: this.errSubject, cause: this.cause && this.cause.toJson ? this.cause.toJson(e2) : this.cause };
  12967. }
  12968. }
  12969. var se = { request: (e2) => index$1.request(e2), uploadFile: (e2) => index$1.uploadFile(e2), setStorageSync: (e2, t2) => index$1.setStorageSync(e2, t2), getStorageSync: (e2) => index$1.getStorageSync(e2), removeStorageSync: (e2) => index$1.removeStorageSync(e2), clearStorageSync: () => index$1.clearStorageSync() };
  12970. function re(e2) {
  12971. return e2 && re(e2.__v_raw) || e2;
  12972. }
  12973. function ie() {
  12974. return { token: se.getStorageSync("uni_id_token") || se.getStorageSync("uniIdToken"), tokenExpired: se.getStorageSync("uni_id_token_expired") };
  12975. }
  12976. function oe({ token: e2, tokenExpired: t2 } = {}) {
  12977. e2 && se.setStorageSync("uni_id_token", e2), t2 && se.setStorageSync("uni_id_token_expired", t2);
  12978. }
  12979. let ae, ce;
  12980. function ue() {
  12981. return ae || (ae = index$1.getSystemInfoSync()), ae;
  12982. }
  12983. function he() {
  12984. let e2, t2;
  12985. try {
  12986. if (index$1.getLaunchOptionsSync) {
  12987. if (index$1.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1)
  12988. return;
  12989. const { scene: n2, channel: s2 } = index$1.getLaunchOptionsSync();
  12990. e2 = s2, t2 = n2;
  12991. }
  12992. } catch (e3) {
  12993. }
  12994. return { channel: e2, scene: t2 };
  12995. }
  12996. function le() {
  12997. const e2 = index$1.getLocale && index$1.getLocale() || "en";
  12998. if (ce)
  12999. return { ...ce, locale: e2, LOCALE: e2 };
  13000. const t2 = ue(), { deviceId: n2, osName: s2, uniPlatform: r2, appId: i2 } = t2, o2 = ["pixelRatio", "brand", "model", "system", "language", "version", "platform", "host", "SDKVersion", "swanNativeVersion", "app", "AppPlatform", "fontSizeSetting"];
  13001. for (let e3 = 0; e3 < o2.length; e3++) {
  13002. delete t2[o2[e3]];
  13003. }
  13004. return ce = { PLATFORM: r2, OS: s2, APPID: i2, DEVICEID: n2, ...he(), ...t2 }, { ...ce, locale: e2, LOCALE: e2 };
  13005. }
  13006. var de = { sign: function(e2, t2) {
  13007. let n2 = "";
  13008. return Object.keys(e2).sort().forEach(function(t3) {
  13009. e2[t3] && (n2 = n2 + "&" + t3 + "=" + e2[t3]);
  13010. }), n2 = n2.slice(1), o(n2, t2).toString();
  13011. }, wrappedRequest: function(e2, t2) {
  13012. return new Promise((n2, s2) => {
  13013. t2(Object.assign(e2, { complete(e3) {
  13014. e3 || (e3 = {});
  13015. const t3 = e3.data && e3.data.header && e3.data.header["x-serverless-request-id"] || e3.header && e3.header["request-id"];
  13016. if (!e3.statusCode || e3.statusCode >= 400)
  13017. return s2(new ne({ code: "SYS_ERR", message: e3.errMsg || "request:fail", requestId: t3 }));
  13018. const r2 = e3.data;
  13019. if (r2.error)
  13020. return s2(new ne({ code: r2.error.code, message: r2.error.message, requestId: t3 }));
  13021. r2.result = r2.data, r2.requestId = t3, delete r2.data, n2(r2);
  13022. } }));
  13023. });
  13024. }, toBase64: function(e2) {
  13025. return c.stringify(a.parse(e2));
  13026. } }, pe = { "uniCloud.init.paramRequired": "{param} required", "uniCloud.uploadFile.fileError": "filePath should be instance of File" };
  13027. const { t: fe } = initVueI18n({ "zh-Hans": { "uniCloud.init.paramRequired": "缺少参数:{param}", "uniCloud.uploadFile.fileError": "filePath应为File对象" }, "zh-Hant": { "uniCloud.init.paramRequired": "缺少参数:{param}", "uniCloud.uploadFile.fileError": "filePath应为File对象" }, en: pe, fr: { "uniCloud.init.paramRequired": "{param} required", "uniCloud.uploadFile.fileError": "filePath should be instance of File" }, es: { "uniCloud.init.paramRequired": "{param} required", "uniCloud.uploadFile.fileError": "filePath should be instance of File" }, ja: pe }, "zh-Hans");
  13028. var ge = class {
  13029. constructor(e2) {
  13030. ["spaceId", "clientSecret"].forEach((t2) => {
  13031. if (!Object.prototype.hasOwnProperty.call(e2, t2))
  13032. throw new Error(fe("uniCloud.init.paramRequired", { param: t2 }));
  13033. }), this.config = Object.assign({}, { endpoint: 0 === e2.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com" }, e2), this.config.provider = "aliyun", this.config.requestUrl = this.config.endpoint + "/client", this.config.envType = this.config.envType || "public", this.config.accessTokenKey = "access_token_" + this.config.spaceId, this.adapter = se, this._getAccessTokenPromiseHub = new I({ createPromise: () => this.requestAuth(this.setupRequest({ method: "serverless.auth.user.anonymousAuthorize", params: "{}" }, "auth")).then((e3) => {
  13034. if (!e3.result || !e3.result.accessToken)
  13035. throw new ne({ code: "AUTH_FAILED", message: "获取accessToken失败" });
  13036. this.setAccessToken(e3.result.accessToken);
  13037. }), retryRule: v });
  13038. }
  13039. get hasAccessToken() {
  13040. return !!this.accessToken;
  13041. }
  13042. setAccessToken(e2) {
  13043. this.accessToken = e2;
  13044. }
  13045. requestWrapped(e2) {
  13046. return de.wrappedRequest(e2, this.adapter.request);
  13047. }
  13048. requestAuth(e2) {
  13049. return this.requestWrapped(e2);
  13050. }
  13051. request(e2, t2) {
  13052. return Promise.resolve().then(() => this.hasAccessToken ? t2 ? this.requestWrapped(e2) : this.requestWrapped(e2).catch((t3) => new Promise((e3, n2) => {
  13053. !t3 || "GATEWAY_INVALID_TOKEN" !== t3.code && "InvalidParameter.InvalidToken" !== t3.code ? n2(t3) : e3();
  13054. }).then(() => this.getAccessToken()).then(() => {
  13055. const t4 = this.rebuildRequest(e2);
  13056. return this.request(t4, true);
  13057. })) : this.getAccessToken().then(() => {
  13058. const t3 = this.rebuildRequest(e2);
  13059. return this.request(t3, true);
  13060. }));
  13061. }
  13062. rebuildRequest(e2) {
  13063. const t2 = Object.assign({}, e2);
  13064. return t2.data.token = this.accessToken, t2.header["x-basement-token"] = this.accessToken, t2.header["x-serverless-sign"] = de.sign(t2.data, this.config.clientSecret), t2;
  13065. }
  13066. setupRequest(e2, t2) {
  13067. const n2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now() }), s2 = { "Content-Type": "application/json" };
  13068. return "auth" !== t2 && (n2.token = this.accessToken, s2["x-basement-token"] = this.accessToken), s2["x-serverless-sign"] = de.sign(n2, this.config.clientSecret), { url: this.config.requestUrl, method: "POST", data: n2, dataType: "json", header: s2 };
  13069. }
  13070. getAccessToken() {
  13071. return this._getAccessTokenPromiseHub.exec();
  13072. }
  13073. async authorize() {
  13074. await this.getAccessToken();
  13075. }
  13076. callFunction(e2) {
  13077. const t2 = { method: "serverless.function.runtime.invoke", params: JSON.stringify({ functionTarget: e2.name, functionArgs: e2.data || {} }) };
  13078. return this.request(this.setupRequest(t2));
  13079. }
  13080. getOSSUploadOptionsFromPath(e2) {
  13081. const t2 = { method: "serverless.file.resource.generateProximalSign", params: JSON.stringify(e2) };
  13082. return this.request(this.setupRequest(t2));
  13083. }
  13084. uploadFileToOSS({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, onUploadProgress: i2 }) {
  13085. return new Promise((o2, a2) => {
  13086. const c2 = this.adapter.uploadFile({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, header: { "X-OSS-server-side-encrpytion": "AES256" }, success(e3) {
  13087. e3 && e3.statusCode < 400 ? o2(e3) : a2(new ne({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
  13088. }, fail(e3) {
  13089. a2(new ne({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" }));
  13090. } });
  13091. "function" == typeof i2 && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((e3) => {
  13092. i2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend });
  13093. });
  13094. });
  13095. }
  13096. reportOSSUpload(e2) {
  13097. const t2 = { method: "serverless.file.resource.report", params: JSON.stringify(e2) };
  13098. return this.request(this.setupRequest(t2));
  13099. }
  13100. async uploadFile({ filePath: e2, cloudPath: t2, fileType: n2 = "image", onUploadProgress: s2, config: r2 }) {
  13101. if ("string" !== g(t2))
  13102. throw new ne({ code: "INVALID_PARAM", message: "cloudPath必须为字符串类型" });
  13103. if (!(t2 = t2.trim()))
  13104. throw new ne({ code: "CLOUDPATH_REQUIRED", message: "cloudPath不可为空" });
  13105. if (/:\/\//.test(t2))
  13106. throw new ne({ code: "INVALID_PARAM", message: "cloudPath不合法" });
  13107. const i2 = r2 && r2.envType || this.config.envType, o2 = (await this.getOSSUploadOptionsFromPath({ env: i2, filename: t2 })).result, a2 = "https://" + o2.cdnDomain + "/" + o2.ossPath, { securityToken: c2, accessKeyId: u2, signature: h2, host: l2, ossPath: d2, id: p2, policy: f2, ossCallbackUrl: m2 } = o2, y2 = { "Cache-Control": "max-age=2592000", "Content-Disposition": "attachment", OSSAccessKeyId: u2, Signature: h2, host: l2, id: p2, key: d2, policy: f2, success_action_status: 200 };
  13108. if (c2 && (y2["x-oss-security-token"] = c2), m2) {
  13109. const e3 = JSON.stringify({ callbackUrl: m2, callbackBody: JSON.stringify({ fileId: p2, spaceId: this.config.spaceId }), callbackBodyType: "application/json" });
  13110. y2.callback = de.toBase64(e3);
  13111. }
  13112. const _2 = { url: "https://" + o2.host, formData: y2, fileName: "file", name: "file", filePath: e2, fileType: n2 };
  13113. if (await this.uploadFileToOSS(Object.assign({}, _2, { onUploadProgress: s2 })), m2)
  13114. return { success: true, filePath: e2, fileID: a2 };
  13115. if ((await this.reportOSSUpload({ id: p2 })).success)
  13116. return { success: true, filePath: e2, fileID: a2 };
  13117. throw new ne({ code: "UPLOAD_FAILED", message: "文件上传失败" });
  13118. }
  13119. getTempFileURL({ fileList: e2 } = {}) {
  13120. return new Promise((t2, n2) => {
  13121. Array.isArray(e2) && 0 !== e2.length || n2(new ne({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" })), t2({ fileList: e2.map((e3) => ({ fileID: e3, tempFileURL: e3 })) });
  13122. });
  13123. }
  13124. async getFileInfo({ fileList: e2 } = {}) {
  13125. if (!Array.isArray(e2) || 0 === e2.length)
  13126. throw new ne({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" });
  13127. const t2 = { method: "serverless.file.resource.info", params: JSON.stringify({ id: e2.map((e3) => e3.split("?")[0]).join(",") }) };
  13128. return { fileList: (await this.request(this.setupRequest(t2))).result };
  13129. }
  13130. };
  13131. var me = { init(e2) {
  13132. const t2 = new ge(e2), n2 = { signInAnonymously: function() {
  13133. return t2.authorize();
  13134. }, getLoginState: function() {
  13135. return Promise.resolve(false);
  13136. } };
  13137. return t2.auth = function() {
  13138. return n2;
  13139. }, t2.customAuth = t2.auth, t2;
  13140. } };
  13141. const ye = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  13142. var _e;
  13143. !function(e2) {
  13144. e2.local = "local", e2.none = "none", e2.session = "session";
  13145. }(_e || (_e = {}));
  13146. var we = function() {
  13147. };
  13148. const ve = () => {
  13149. let e2;
  13150. if (!Promise) {
  13151. e2 = () => {
  13152. }, e2.promise = {};
  13153. const t3 = () => {
  13154. throw new ne({ message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.' });
  13155. };
  13156. return Object.defineProperty(e2.promise, "then", { get: t3 }), Object.defineProperty(e2.promise, "catch", { get: t3 }), e2;
  13157. }
  13158. const t2 = new Promise((t3, n2) => {
  13159. e2 = (e3, s2) => e3 ? n2(e3) : t3(s2);
  13160. });
  13161. return e2.promise = t2, e2;
  13162. };
  13163. function Ie(e2) {
  13164. return void 0 === e2;
  13165. }
  13166. function Se(e2) {
  13167. return "[object Null]" === Object.prototype.toString.call(e2);
  13168. }
  13169. var be;
  13170. function ke(e2) {
  13171. const t2 = (n2 = e2, "[object Array]" === Object.prototype.toString.call(n2) ? e2 : [e2]);
  13172. var n2;
  13173. for (const e3 of t2) {
  13174. const { isMatch: t3, genAdapter: n3, runtime: s2 } = e3;
  13175. if (t3())
  13176. return { adapter: n3(), runtime: s2 };
  13177. }
  13178. }
  13179. !function(e2) {
  13180. e2.WEB = "web", e2.WX_MP = "wx_mp";
  13181. }(be || (be = {}));
  13182. const Ce = { adapter: null, runtime: void 0 }, Te = ["anonymousUuidKey"];
  13183. class Pe extends we {
  13184. constructor() {
  13185. super(), Ce.adapter.root.tcbObject || (Ce.adapter.root.tcbObject = {});
  13186. }
  13187. setItem(e2, t2) {
  13188. Ce.adapter.root.tcbObject[e2] = t2;
  13189. }
  13190. getItem(e2) {
  13191. return Ce.adapter.root.tcbObject[e2];
  13192. }
  13193. removeItem(e2) {
  13194. delete Ce.adapter.root.tcbObject[e2];
  13195. }
  13196. clear() {
  13197. delete Ce.adapter.root.tcbObject;
  13198. }
  13199. }
  13200. function Ae(e2, t2) {
  13201. switch (e2) {
  13202. case "local":
  13203. return t2.localStorage || new Pe();
  13204. case "none":
  13205. return new Pe();
  13206. default:
  13207. return t2.sessionStorage || new Pe();
  13208. }
  13209. }
  13210. class Ee {
  13211. constructor(e2) {
  13212. if (!this._storage) {
  13213. this._persistence = Ce.adapter.primaryStorage || e2.persistence, this._storage = Ae(this._persistence, Ce.adapter);
  13214. const t2 = `access_token_${e2.env}`, n2 = `access_token_expire_${e2.env}`, s2 = `refresh_token_${e2.env}`, r2 = `anonymous_uuid_${e2.env}`, i2 = `login_type_${e2.env}`, o2 = `user_info_${e2.env}`;
  13215. this.keys = { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2, anonymousUuidKey: r2, loginTypeKey: i2, userInfoKey: o2 };
  13216. }
  13217. }
  13218. updatePersistence(e2) {
  13219. if (e2 === this._persistence)
  13220. return;
  13221. const t2 = "local" === this._persistence;
  13222. this._persistence = e2;
  13223. const n2 = Ae(e2, Ce.adapter);
  13224. for (const e3 in this.keys) {
  13225. const s2 = this.keys[e3];
  13226. if (t2 && Te.includes(e3))
  13227. continue;
  13228. const r2 = this._storage.getItem(s2);
  13229. Ie(r2) || Se(r2) || (n2.setItem(s2, r2), this._storage.removeItem(s2));
  13230. }
  13231. this._storage = n2;
  13232. }
  13233. setStore(e2, t2, n2) {
  13234. if (!this._storage)
  13235. return;
  13236. const s2 = { version: n2 || "localCachev1", content: t2 }, r2 = JSON.stringify(s2);
  13237. try {
  13238. this._storage.setItem(e2, r2);
  13239. } catch (e3) {
  13240. throw e3;
  13241. }
  13242. }
  13243. getStore(e2, t2) {
  13244. try {
  13245. if (!this._storage)
  13246. return;
  13247. } catch (e3) {
  13248. return "";
  13249. }
  13250. t2 = t2 || "localCachev1";
  13251. const n2 = this._storage.getItem(e2);
  13252. if (!n2)
  13253. return "";
  13254. if (n2.indexOf(t2) >= 0) {
  13255. return JSON.parse(n2).content;
  13256. }
  13257. return "";
  13258. }
  13259. removeStore(e2) {
  13260. this._storage.removeItem(e2);
  13261. }
  13262. }
  13263. const Oe = {}, xe = {};
  13264. function Re(e2) {
  13265. return Oe[e2];
  13266. }
  13267. class Ue {
  13268. constructor(e2, t2) {
  13269. this.data = t2 || null, this.name = e2;
  13270. }
  13271. }
  13272. class Le extends Ue {
  13273. constructor(e2, t2) {
  13274. super("error", { error: e2, data: t2 }), this.error = e2;
  13275. }
  13276. }
  13277. const Ne = new class {
  13278. constructor() {
  13279. this._listeners = {};
  13280. }
  13281. on(e2, t2) {
  13282. return function(e3, t3, n2) {
  13283. n2[e3] = n2[e3] || [], n2[e3].push(t3);
  13284. }(e2, t2, this._listeners), this;
  13285. }
  13286. off(e2, t2) {
  13287. return function(e3, t3, n2) {
  13288. if (n2 && n2[e3]) {
  13289. const s2 = n2[e3].indexOf(t3);
  13290. -1 !== s2 && n2[e3].splice(s2, 1);
  13291. }
  13292. }(e2, t2, this._listeners), this;
  13293. }
  13294. fire(e2, t2) {
  13295. if (e2 instanceof Le)
  13296. return console.error(e2.error), this;
  13297. const n2 = "string" == typeof e2 ? new Ue(e2, t2 || {}) : e2;
  13298. const s2 = n2.name;
  13299. if (this._listens(s2)) {
  13300. n2.target = this;
  13301. const e3 = this._listeners[s2] ? [...this._listeners[s2]] : [];
  13302. for (const t3 of e3)
  13303. t3.call(this, n2);
  13304. }
  13305. return this;
  13306. }
  13307. _listens(e2) {
  13308. return this._listeners[e2] && this._listeners[e2].length > 0;
  13309. }
  13310. }();
  13311. function De(e2, t2) {
  13312. Ne.on(e2, t2);
  13313. }
  13314. function Fe(e2, t2 = {}) {
  13315. Ne.fire(e2, t2);
  13316. }
  13317. function qe(e2, t2) {
  13318. Ne.off(e2, t2);
  13319. }
  13320. const Me = "loginStateChanged", Ke = "loginStateExpire", je = "loginTypeChanged", Be = "anonymousConverted", $e = "refreshAccessToken";
  13321. var We;
  13322. !function(e2) {
  13323. e2.ANONYMOUS = "ANONYMOUS", e2.WECHAT = "WECHAT", e2.WECHAT_PUBLIC = "WECHAT-PUBLIC", e2.WECHAT_OPEN = "WECHAT-OPEN", e2.CUSTOM = "CUSTOM", e2.EMAIL = "EMAIL", e2.USERNAME = "USERNAME", e2.NULL = "NULL";
  13324. }(We || (We = {}));
  13325. const ze = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"], Je = { "X-SDK-Version": "1.3.5" };
  13326. function He(e2, t2, n2) {
  13327. const s2 = e2[t2];
  13328. e2[t2] = function(t3) {
  13329. const r2 = {}, i2 = {};
  13330. n2.forEach((n3) => {
  13331. const { data: s3, headers: o3 } = n3.call(e2, t3);
  13332. Object.assign(r2, s3), Object.assign(i2, o3);
  13333. });
  13334. const o2 = t3.data;
  13335. return o2 && (() => {
  13336. var e3;
  13337. if (e3 = o2, "[object FormData]" !== Object.prototype.toString.call(e3))
  13338. t3.data = { ...o2, ...r2 };
  13339. else
  13340. for (const e4 in r2)
  13341. o2.append(e4, r2[e4]);
  13342. })(), t3.headers = { ...t3.headers || {}, ...i2 }, s2.call(e2, t3);
  13343. };
  13344. }
  13345. function Ge() {
  13346. const e2 = Math.random().toString(16).slice(2);
  13347. return { data: { seqId: e2 }, headers: { ...Je, "x-seqid": e2 } };
  13348. }
  13349. class Ve {
  13350. constructor(e2 = {}) {
  13351. var t2;
  13352. this.config = e2, this._reqClass = new Ce.adapter.reqClass({ timeout: this.config.timeout, timeoutMsg: `请求在${this.config.timeout / 1e3}s内未完成,已中断`, restrictedMethods: ["post"] }), this._cache = Re(this.config.env), this._localCache = (t2 = this.config.env, xe[t2]), He(this._reqClass, "post", [Ge]), He(this._reqClass, "upload", [Ge]), He(this._reqClass, "download", [Ge]);
  13353. }
  13354. async post(e2) {
  13355. return await this._reqClass.post(e2);
  13356. }
  13357. async upload(e2) {
  13358. return await this._reqClass.upload(e2);
  13359. }
  13360. async download(e2) {
  13361. return await this._reqClass.download(e2);
  13362. }
  13363. async refreshAccessToken() {
  13364. let e2, t2;
  13365. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  13366. try {
  13367. e2 = await this._refreshAccessTokenPromise;
  13368. } catch (e3) {
  13369. t2 = e3;
  13370. }
  13371. if (this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t2)
  13372. throw t2;
  13373. return e2;
  13374. }
  13375. async _refreshAccessToken() {
  13376. const { accessTokenKey: e2, accessTokenExpireKey: t2, refreshTokenKey: n2, loginTypeKey: s2, anonymousUuidKey: r2 } = this._cache.keys;
  13377. this._cache.removeStore(e2), this._cache.removeStore(t2);
  13378. let i2 = this._cache.getStore(n2);
  13379. if (!i2)
  13380. throw new ne({ message: "未登录CloudBase" });
  13381. const o2 = { refresh_token: i2 }, a2 = await this.request("auth.fetchAccessTokenWithRefreshToken", o2);
  13382. if (a2.data.code) {
  13383. const { code: e3 } = a2.data;
  13384. if ("SIGN_PARAM_INVALID" === e3 || "REFRESH_TOKEN_EXPIRED" === e3 || "INVALID_REFRESH_TOKEN" === e3) {
  13385. if (this._cache.getStore(s2) === We.ANONYMOUS && "INVALID_REFRESH_TOKEN" === e3) {
  13386. const e4 = this._cache.getStore(r2), t3 = this._cache.getStore(n2), s3 = await this.send("auth.signInAnonymously", { anonymous_uuid: e4, refresh_token: t3 });
  13387. return this.setRefreshToken(s3.refresh_token), this._refreshAccessToken();
  13388. }
  13389. Fe(Ke), this._cache.removeStore(n2);
  13390. }
  13391. throw new ne({ code: a2.data.code, message: `刷新access token失败:${a2.data.code}` });
  13392. }
  13393. if (a2.data.access_token)
  13394. return Fe($e), this._cache.setStore(e2, a2.data.access_token), this._cache.setStore(t2, a2.data.access_token_expire + Date.now()), { accessToken: a2.data.access_token, accessTokenExpire: a2.data.access_token_expire };
  13395. a2.data.refresh_token && (this._cache.removeStore(n2), this._cache.setStore(n2, a2.data.refresh_token), this._refreshAccessToken());
  13396. }
  13397. async getAccessToken() {
  13398. const { accessTokenKey: e2, accessTokenExpireKey: t2, refreshTokenKey: n2 } = this._cache.keys;
  13399. if (!this._cache.getStore(n2))
  13400. throw new ne({ message: "refresh token不存在,登录状态异常" });
  13401. let s2 = this._cache.getStore(e2), r2 = this._cache.getStore(t2), i2 = true;
  13402. return this._shouldRefreshAccessTokenHook && !await this._shouldRefreshAccessTokenHook(s2, r2) && (i2 = false), (!s2 || !r2 || r2 < Date.now()) && i2 ? this.refreshAccessToken() : { accessToken: s2, accessTokenExpire: r2 };
  13403. }
  13404. async request(e2, t2, n2) {
  13405. const s2 = `x-tcb-trace_${this.config.env}`;
  13406. let r2 = "application/x-www-form-urlencoded";
  13407. const i2 = { action: e2, env: this.config.env, dataVersion: "2019-08-16", ...t2 };
  13408. if (-1 === ze.indexOf(e2)) {
  13409. const { refreshTokenKey: e3 } = this._cache.keys;
  13410. this._cache.getStore(e3) && (i2.access_token = (await this.getAccessToken()).accessToken);
  13411. }
  13412. let o2;
  13413. if ("storage.uploadFile" === e2) {
  13414. o2 = new FormData();
  13415. for (let e3 in o2)
  13416. o2.hasOwnProperty(e3) && void 0 !== o2[e3] && o2.append(e3, i2[e3]);
  13417. r2 = "multipart/form-data";
  13418. } else {
  13419. r2 = "application/json", o2 = {};
  13420. for (let e3 in i2)
  13421. void 0 !== i2[e3] && (o2[e3] = i2[e3]);
  13422. }
  13423. let a2 = { headers: { "content-type": r2 } };
  13424. n2 && n2.onUploadProgress && (a2.onUploadProgress = n2.onUploadProgress);
  13425. const c2 = this._localCache.getStore(s2);
  13426. c2 && (a2.headers["X-TCB-Trace"] = c2);
  13427. const { parse: u2, inQuery: h2, search: l2 } = t2;
  13428. let d2 = { env: this.config.env };
  13429. u2 && (d2.parse = true), h2 && (d2 = { ...h2, ...d2 });
  13430. let p2 = function(e3, t3, n3 = {}) {
  13431. const s3 = /\?/.test(t3);
  13432. let r3 = "";
  13433. for (let e4 in n3)
  13434. "" === r3 ? !s3 && (t3 += "?") : r3 += "&", r3 += `${e4}=${encodeURIComponent(n3[e4])}`;
  13435. return /^http(s)?\:\/\//.test(t3 += r3) ? t3 : `${e3}${t3}`;
  13436. }(ye, "//tcb-api.tencentcloudapi.com/web", d2);
  13437. l2 && (p2 += l2);
  13438. const f2 = await this.post({ url: p2, data: o2, ...a2 }), g2 = f2.header && f2.header["x-tcb-trace"];
  13439. if (g2 && this._localCache.setStore(s2, g2), 200 !== Number(f2.status) && 200 !== Number(f2.statusCode) || !f2.data)
  13440. throw new ne({ code: "NETWORK_ERROR", message: "network request error" });
  13441. return f2;
  13442. }
  13443. async send(e2, t2 = {}) {
  13444. const n2 = await this.request(e2, t2, { onUploadProgress: t2.onUploadProgress });
  13445. if ("ACCESS_TOKEN_EXPIRED" === n2.data.code && -1 === ze.indexOf(e2)) {
  13446. await this.refreshAccessToken();
  13447. const n3 = await this.request(e2, t2, { onUploadProgress: t2.onUploadProgress });
  13448. if (n3.data.code)
  13449. throw new ne({ code: n3.data.code, message: n3.data.message });
  13450. return n3.data;
  13451. }
  13452. if (n2.data.code)
  13453. throw new ne({ code: n2.data.code, message: n2.data.message });
  13454. return n2.data;
  13455. }
  13456. setRefreshToken(e2) {
  13457. const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys;
  13458. this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e2);
  13459. }
  13460. }
  13461. const Qe = {};
  13462. function Ye(e2) {
  13463. return Qe[e2];
  13464. }
  13465. class Xe {
  13466. constructor(e2) {
  13467. this.config = e2, this._cache = Re(e2.env), this._request = Ye(e2.env);
  13468. }
  13469. setRefreshToken(e2) {
  13470. const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys;
  13471. this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e2);
  13472. }
  13473. setAccessToken(e2, t2) {
  13474. const { accessTokenKey: n2, accessTokenExpireKey: s2 } = this._cache.keys;
  13475. this._cache.setStore(n2, e2), this._cache.setStore(s2, t2);
  13476. }
  13477. async refreshUserInfo() {
  13478. const { data: e2 } = await this._request.send("auth.getUserInfo", {});
  13479. return this.setLocalUserInfo(e2), e2;
  13480. }
  13481. setLocalUserInfo(e2) {
  13482. const { userInfoKey: t2 } = this._cache.keys;
  13483. this._cache.setStore(t2, e2);
  13484. }
  13485. }
  13486. class Ze {
  13487. constructor(e2) {
  13488. if (!e2)
  13489. throw new ne({ code: "PARAM_ERROR", message: "envId is not defined" });
  13490. this._envId = e2, this._cache = Re(this._envId), this._request = Ye(this._envId), this.setUserInfo();
  13491. }
  13492. linkWithTicket(e2) {
  13493. if ("string" != typeof e2)
  13494. throw new ne({ code: "PARAM_ERROR", message: "ticket must be string" });
  13495. return this._request.send("auth.linkWithTicket", { ticket: e2 });
  13496. }
  13497. linkWithRedirect(e2) {
  13498. e2.signInWithRedirect();
  13499. }
  13500. updatePassword(e2, t2) {
  13501. return this._request.send("auth.updatePassword", { oldPassword: t2, newPassword: e2 });
  13502. }
  13503. updateEmail(e2) {
  13504. return this._request.send("auth.updateEmail", { newEmail: e2 });
  13505. }
  13506. updateUsername(e2) {
  13507. if ("string" != typeof e2)
  13508. throw new ne({ code: "PARAM_ERROR", message: "username must be a string" });
  13509. return this._request.send("auth.updateUsername", { username: e2 });
  13510. }
  13511. async getLinkedUidList() {
  13512. const { data: e2 } = await this._request.send("auth.getLinkedUidList", {});
  13513. let t2 = false;
  13514. const { users: n2 } = e2;
  13515. return n2.forEach((e3) => {
  13516. e3.wxOpenId && e3.wxPublicId && (t2 = true);
  13517. }), { users: n2, hasPrimaryUid: t2 };
  13518. }
  13519. setPrimaryUid(e2) {
  13520. return this._request.send("auth.setPrimaryUid", { uid: e2 });
  13521. }
  13522. unlink(e2) {
  13523. return this._request.send("auth.unlink", { platform: e2 });
  13524. }
  13525. async update(e2) {
  13526. const { nickName: t2, gender: n2, avatarUrl: s2, province: r2, country: i2, city: o2 } = e2, { data: a2 } = await this._request.send("auth.updateUserInfo", { nickName: t2, gender: n2, avatarUrl: s2, province: r2, country: i2, city: o2 });
  13527. this.setLocalUserInfo(a2);
  13528. }
  13529. async refresh() {
  13530. const { data: e2 } = await this._request.send("auth.getUserInfo", {});
  13531. return this.setLocalUserInfo(e2), e2;
  13532. }
  13533. setUserInfo() {
  13534. const { userInfoKey: e2 } = this._cache.keys, t2 = this._cache.getStore(e2);
  13535. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach((e3) => {
  13536. this[e3] = t2[e3];
  13537. }), this.location = { country: t2.country, province: t2.province, city: t2.city };
  13538. }
  13539. setLocalUserInfo(e2) {
  13540. const { userInfoKey: t2 } = this._cache.keys;
  13541. this._cache.setStore(t2, e2), this.setUserInfo();
  13542. }
  13543. }
  13544. class et {
  13545. constructor(e2) {
  13546. if (!e2)
  13547. throw new ne({ code: "PARAM_ERROR", message: "envId is not defined" });
  13548. this._cache = Re(e2);
  13549. const { refreshTokenKey: t2, accessTokenKey: n2, accessTokenExpireKey: s2 } = this._cache.keys, r2 = this._cache.getStore(t2), i2 = this._cache.getStore(n2), o2 = this._cache.getStore(s2);
  13550. this.credential = { refreshToken: r2, accessToken: i2, accessTokenExpire: o2 }, this.user = new Ze(e2);
  13551. }
  13552. get isAnonymousAuth() {
  13553. return this.loginType === We.ANONYMOUS;
  13554. }
  13555. get isCustomAuth() {
  13556. return this.loginType === We.CUSTOM;
  13557. }
  13558. get isWeixinAuth() {
  13559. return this.loginType === We.WECHAT || this.loginType === We.WECHAT_OPEN || this.loginType === We.WECHAT_PUBLIC;
  13560. }
  13561. get loginType() {
  13562. return this._cache.getStore(this._cache.keys.loginTypeKey);
  13563. }
  13564. }
  13565. class tt extends Xe {
  13566. async signIn() {
  13567. this._cache.updatePersistence("local");
  13568. const { anonymousUuidKey: e2, refreshTokenKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2) || void 0, s2 = this._cache.getStore(t2) || void 0, r2 = await this._request.send("auth.signInAnonymously", { anonymous_uuid: n2, refresh_token: s2 });
  13569. if (r2.uuid && r2.refresh_token) {
  13570. this._setAnonymousUUID(r2.uuid), this.setRefreshToken(r2.refresh_token), await this._request.refreshAccessToken(), Fe(Me), Fe(je, { env: this.config.env, loginType: We.ANONYMOUS, persistence: "local" });
  13571. const e3 = new et(this.config.env);
  13572. return await e3.user.refresh(), e3;
  13573. }
  13574. throw new ne({ message: "匿名登录失败" });
  13575. }
  13576. async linkAndRetrieveDataWithTicket(e2) {
  13577. const { anonymousUuidKey: t2, refreshTokenKey: n2 } = this._cache.keys, s2 = this._cache.getStore(t2), r2 = this._cache.getStore(n2), i2 = await this._request.send("auth.linkAndRetrieveDataWithTicket", { anonymous_uuid: s2, refresh_token: r2, ticket: e2 });
  13578. if (i2.refresh_token)
  13579. return this._clearAnonymousUUID(), this.setRefreshToken(i2.refresh_token), await this._request.refreshAccessToken(), Fe(Be, { env: this.config.env }), Fe(je, { loginType: We.CUSTOM, persistence: "local" }), { credential: { refreshToken: i2.refresh_token } };
  13580. throw new ne({ message: "匿名转化失败" });
  13581. }
  13582. _setAnonymousUUID(e2) {
  13583. const { anonymousUuidKey: t2, loginTypeKey: n2 } = this._cache.keys;
  13584. this._cache.removeStore(t2), this._cache.setStore(t2, e2), this._cache.setStore(n2, We.ANONYMOUS);
  13585. }
  13586. _clearAnonymousUUID() {
  13587. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  13588. }
  13589. }
  13590. class nt extends Xe {
  13591. async signIn(e2) {
  13592. if ("string" != typeof e2)
  13593. throw new ne({ code: "PARAM_ERROR", message: "ticket must be a string" });
  13594. const { refreshTokenKey: t2 } = this._cache.keys, n2 = await this._request.send("auth.signInWithTicket", { ticket: e2, refresh_token: this._cache.getStore(t2) || "" });
  13595. if (n2.refresh_token)
  13596. return this.setRefreshToken(n2.refresh_token), await this._request.refreshAccessToken(), Fe(Me), Fe(je, { env: this.config.env, loginType: We.CUSTOM, persistence: this.config.persistence }), await this.refreshUserInfo(), new et(this.config.env);
  13597. throw new ne({ message: "自定义登录失败" });
  13598. }
  13599. }
  13600. class st extends Xe {
  13601. async signIn(e2, t2) {
  13602. if ("string" != typeof e2)
  13603. throw new ne({ code: "PARAM_ERROR", message: "email must be a string" });
  13604. const { refreshTokenKey: n2 } = this._cache.keys, s2 = await this._request.send("auth.signIn", { loginType: "EMAIL", email: e2, password: t2, refresh_token: this._cache.getStore(n2) || "" }), { refresh_token: r2, access_token: i2, access_token_expire: o2 } = s2;
  13605. if (r2)
  13606. return this.setRefreshToken(r2), i2 && o2 ? this.setAccessToken(i2, o2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), Fe(Me), Fe(je, { env: this.config.env, loginType: We.EMAIL, persistence: this.config.persistence }), new et(this.config.env);
  13607. throw s2.code ? new ne({ code: s2.code, message: `邮箱登录失败: ${s2.message}` }) : new ne({ message: "邮箱登录失败" });
  13608. }
  13609. async activate(e2) {
  13610. return this._request.send("auth.activateEndUserMail", { token: e2 });
  13611. }
  13612. async resetPasswordWithToken(e2, t2) {
  13613. return this._request.send("auth.resetPasswordWithToken", { token: e2, newPassword: t2 });
  13614. }
  13615. }
  13616. class rt extends Xe {
  13617. async signIn(e2, t2) {
  13618. if ("string" != typeof e2)
  13619. throw new ne({ code: "PARAM_ERROR", message: "username must be a string" });
  13620. "string" != typeof t2 && (t2 = "", console.warn("password is empty"));
  13621. const { refreshTokenKey: n2 } = this._cache.keys, s2 = await this._request.send("auth.signIn", { loginType: We.USERNAME, username: e2, password: t2, refresh_token: this._cache.getStore(n2) || "" }), { refresh_token: r2, access_token_expire: i2, access_token: o2 } = s2;
  13622. if (r2)
  13623. return this.setRefreshToken(r2), o2 && i2 ? this.setAccessToken(o2, i2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), Fe(Me), Fe(je, { env: this.config.env, loginType: We.USERNAME, persistence: this.config.persistence }), new et(this.config.env);
  13624. throw s2.code ? new ne({ code: s2.code, message: `用户名密码登录失败: ${s2.message}` }) : new ne({ message: "用户名密码登录失败" });
  13625. }
  13626. }
  13627. class it {
  13628. constructor(e2) {
  13629. this.config = e2, this._cache = Re(e2.env), this._request = Ye(e2.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), De(je, this._onLoginTypeChanged);
  13630. }
  13631. get currentUser() {
  13632. const e2 = this.hasLoginState();
  13633. return e2 && e2.user || null;
  13634. }
  13635. get loginType() {
  13636. return this._cache.getStore(this._cache.keys.loginTypeKey);
  13637. }
  13638. anonymousAuthProvider() {
  13639. return new tt(this.config);
  13640. }
  13641. customAuthProvider() {
  13642. return new nt(this.config);
  13643. }
  13644. emailAuthProvider() {
  13645. return new st(this.config);
  13646. }
  13647. usernameAuthProvider() {
  13648. return new rt(this.config);
  13649. }
  13650. async signInAnonymously() {
  13651. return new tt(this.config).signIn();
  13652. }
  13653. async signInWithEmailAndPassword(e2, t2) {
  13654. return new st(this.config).signIn(e2, t2);
  13655. }
  13656. signInWithUsernameAndPassword(e2, t2) {
  13657. return new rt(this.config).signIn(e2, t2);
  13658. }
  13659. async linkAndRetrieveDataWithTicket(e2) {
  13660. this._anonymousAuthProvider || (this._anonymousAuthProvider = new tt(this.config)), De(Be, this._onAnonymousConverted);
  13661. return await this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e2);
  13662. }
  13663. async signOut() {
  13664. if (this.loginType === We.ANONYMOUS)
  13665. throw new ne({ message: "匿名用户不支持登出操作" });
  13666. const { refreshTokenKey: e2, accessTokenKey: t2, accessTokenExpireKey: n2 } = this._cache.keys, s2 = this._cache.getStore(e2);
  13667. if (!s2)
  13668. return;
  13669. const r2 = await this._request.send("auth.logout", { refresh_token: s2 });
  13670. return this._cache.removeStore(e2), this._cache.removeStore(t2), this._cache.removeStore(n2), Fe(Me), Fe(je, { env: this.config.env, loginType: We.NULL, persistence: this.config.persistence }), r2;
  13671. }
  13672. async signUpWithEmailAndPassword(e2, t2) {
  13673. return this._request.send("auth.signUpWithEmailAndPassword", { email: e2, password: t2 });
  13674. }
  13675. async sendPasswordResetEmail(e2) {
  13676. return this._request.send("auth.sendPasswordResetEmail", { email: e2 });
  13677. }
  13678. onLoginStateChanged(e2) {
  13679. De(Me, () => {
  13680. const t3 = this.hasLoginState();
  13681. e2.call(this, t3);
  13682. });
  13683. const t2 = this.hasLoginState();
  13684. e2.call(this, t2);
  13685. }
  13686. onLoginStateExpired(e2) {
  13687. De(Ke, e2.bind(this));
  13688. }
  13689. onAccessTokenRefreshed(e2) {
  13690. De($e, e2.bind(this));
  13691. }
  13692. onAnonymousConverted(e2) {
  13693. De(Be, e2.bind(this));
  13694. }
  13695. onLoginTypeChanged(e2) {
  13696. De(je, () => {
  13697. const t2 = this.hasLoginState();
  13698. e2.call(this, t2);
  13699. });
  13700. }
  13701. async getAccessToken() {
  13702. return { accessToken: (await this._request.getAccessToken()).accessToken, env: this.config.env };
  13703. }
  13704. hasLoginState() {
  13705. const { refreshTokenKey: e2 } = this._cache.keys;
  13706. return this._cache.getStore(e2) ? new et(this.config.env) : null;
  13707. }
  13708. async isUsernameRegistered(e2) {
  13709. if ("string" != typeof e2)
  13710. throw new ne({ code: "PARAM_ERROR", message: "username must be a string" });
  13711. const { data: t2 } = await this._request.send("auth.isUsernameRegistered", { username: e2 });
  13712. return t2 && t2.isRegistered;
  13713. }
  13714. getLoginState() {
  13715. return Promise.resolve(this.hasLoginState());
  13716. }
  13717. async signInWithTicket(e2) {
  13718. return new nt(this.config).signIn(e2);
  13719. }
  13720. shouldRefreshAccessToken(e2) {
  13721. this._request._shouldRefreshAccessTokenHook = e2.bind(this);
  13722. }
  13723. getUserInfo() {
  13724. return this._request.send("auth.getUserInfo", {}).then((e2) => e2.code ? e2 : { ...e2.data, requestId: e2.seqId });
  13725. }
  13726. getAuthHeader() {
  13727. const { refreshTokenKey: e2, accessTokenKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e2);
  13728. return { "x-cloudbase-credentials": this._cache.getStore(t2) + "/@@/" + n2 };
  13729. }
  13730. _onAnonymousConverted(e2) {
  13731. const { env: t2 } = e2.data;
  13732. t2 === this.config.env && this._cache.updatePersistence(this.config.persistence);
  13733. }
  13734. _onLoginTypeChanged(e2) {
  13735. const { loginType: t2, persistence: n2, env: s2 } = e2.data;
  13736. s2 === this.config.env && (this._cache.updatePersistence(n2), this._cache.setStore(this._cache.keys.loginTypeKey, t2));
  13737. }
  13738. }
  13739. const ot = function(e2, t2) {
  13740. t2 = t2 || ve();
  13741. const n2 = Ye(this.config.env), { cloudPath: s2, filePath: r2, onUploadProgress: i2, fileType: o2 = "image" } = e2;
  13742. return n2.send("storage.getUploadMetadata", { path: s2 }).then((e3) => {
  13743. const { data: { url: a2, authorization: c2, token: u2, fileId: h2, cosFileId: l2 }, requestId: d2 } = e3, p2 = { key: s2, signature: c2, "x-cos-meta-fileid": l2, success_action_status: "201", "x-cos-security-token": u2 };
  13744. n2.upload({ url: a2, data: p2, file: r2, name: s2, fileType: o2, onUploadProgress: i2 }).then((e4) => {
  13745. 201 === e4.statusCode ? t2(null, { fileID: h2, requestId: d2 }) : t2(new ne({ code: "STORAGE_REQUEST_FAIL", message: `STORAGE_REQUEST_FAIL: ${e4.data}` }));
  13746. }).catch((e4) => {
  13747. t2(e4);
  13748. });
  13749. }).catch((e3) => {
  13750. t2(e3);
  13751. }), t2.promise;
  13752. }, at = function(e2, t2) {
  13753. t2 = t2 || ve();
  13754. const n2 = Ye(this.config.env), { cloudPath: s2 } = e2;
  13755. return n2.send("storage.getUploadMetadata", { path: s2 }).then((e3) => {
  13756. t2(null, e3);
  13757. }).catch((e3) => {
  13758. t2(e3);
  13759. }), t2.promise;
  13760. }, ct = function({ fileList: e2 }, t2) {
  13761. if (t2 = t2 || ve(), !e2 || !Array.isArray(e2))
  13762. return { code: "INVALID_PARAM", message: "fileList必须是非空的数组" };
  13763. for (let t3 of e2)
  13764. if (!t3 || "string" != typeof t3)
  13765. return { code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" };
  13766. const n2 = { fileid_list: e2 };
  13767. return Ye(this.config.env).send("storage.batchDeleteFile", n2).then((e3) => {
  13768. e3.code ? t2(null, e3) : t2(null, { fileList: e3.data.delete_list, requestId: e3.requestId });
  13769. }).catch((e3) => {
  13770. t2(e3);
  13771. }), t2.promise;
  13772. }, ut = function({ fileList: e2 }, t2) {
  13773. t2 = t2 || ve(), e2 && Array.isArray(e2) || t2(null, { code: "INVALID_PARAM", message: "fileList必须是非空的数组" });
  13774. let n2 = [];
  13775. for (let s3 of e2)
  13776. "object" == typeof s3 ? (s3.hasOwnProperty("fileID") && s3.hasOwnProperty("maxAge") || t2(null, { code: "INVALID_PARAM", message: "fileList的元素必须是包含fileID和maxAge的对象" }), n2.push({ fileid: s3.fileID, max_age: s3.maxAge })) : "string" == typeof s3 ? n2.push({ fileid: s3 }) : t2(null, { code: "INVALID_PARAM", message: "fileList的元素必须是字符串" });
  13777. const s2 = { file_list: n2 };
  13778. return Ye(this.config.env).send("storage.batchGetDownloadUrl", s2).then((e3) => {
  13779. e3.code ? t2(null, e3) : t2(null, { fileList: e3.data.download_list, requestId: e3.requestId });
  13780. }).catch((e3) => {
  13781. t2(e3);
  13782. }), t2.promise;
  13783. }, ht = async function({ fileID: e2 }, t2) {
  13784. const n2 = (await ut.call(this, { fileList: [{ fileID: e2, maxAge: 600 }] })).fileList[0];
  13785. if ("SUCCESS" !== n2.code)
  13786. return t2 ? t2(n2) : new Promise((e3) => {
  13787. e3(n2);
  13788. });
  13789. const s2 = Ye(this.config.env);
  13790. let r2 = n2.download_url;
  13791. if (r2 = encodeURI(r2), !t2)
  13792. return s2.download({ url: r2 });
  13793. t2(await s2.download({ url: r2 }));
  13794. }, lt = function({ name: e2, data: t2, query: n2, parse: s2, search: r2 }, i2) {
  13795. const o2 = i2 || ve();
  13796. let a2;
  13797. try {
  13798. a2 = t2 ? JSON.stringify(t2) : "";
  13799. } catch (e3) {
  13800. return Promise.reject(e3);
  13801. }
  13802. if (!e2)
  13803. return Promise.reject(new ne({ code: "PARAM_ERROR", message: "函数名不能为空" }));
  13804. const c2 = { inQuery: n2, parse: s2, search: r2, function_name: e2, request_data: a2 };
  13805. return Ye(this.config.env).send("functions.invokeFunction", c2).then((e3) => {
  13806. if (e3.code)
  13807. o2(null, e3);
  13808. else {
  13809. let t3 = e3.data.response_data;
  13810. if (s2)
  13811. o2(null, { result: t3, requestId: e3.requestId });
  13812. else
  13813. try {
  13814. t3 = JSON.parse(e3.data.response_data), o2(null, { result: t3, requestId: e3.requestId });
  13815. } catch (e4) {
  13816. o2(new ne({ message: "response data must be json" }));
  13817. }
  13818. }
  13819. return o2.promise;
  13820. }).catch((e3) => {
  13821. o2(e3);
  13822. }), o2.promise;
  13823. }, dt = { timeout: 15e3, persistence: "session" }, pt = {};
  13824. class ft {
  13825. constructor(e2) {
  13826. this.config = e2 || this.config, this.authObj = void 0;
  13827. }
  13828. init(e2) {
  13829. switch (Ce.adapter || (this.requestClient = new Ce.adapter.reqClass({ timeout: e2.timeout || 5e3, timeoutMsg: `请求在${(e2.timeout || 5e3) / 1e3}s内未完成,已中断` })), this.config = { ...dt, ...e2 }, true) {
  13830. case this.config.timeout > 6e5:
  13831. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  13832. break;
  13833. case this.config.timeout < 100:
  13834. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  13835. }
  13836. return new ft(this.config);
  13837. }
  13838. auth({ persistence: e2 } = {}) {
  13839. if (this.authObj)
  13840. return this.authObj;
  13841. const t2 = e2 || Ce.adapter.primaryStorage || dt.persistence;
  13842. var n2;
  13843. return t2 !== this.config.persistence && (this.config.persistence = t2), function(e3) {
  13844. const { env: t3 } = e3;
  13845. Oe[t3] = new Ee(e3), xe[t3] = new Ee({ ...e3, persistence: "local" });
  13846. }(this.config), n2 = this.config, Qe[n2.env] = new Ve(n2), this.authObj = new it(this.config), this.authObj;
  13847. }
  13848. on(e2, t2) {
  13849. return De.apply(this, [e2, t2]);
  13850. }
  13851. off(e2, t2) {
  13852. return qe.apply(this, [e2, t2]);
  13853. }
  13854. callFunction(e2, t2) {
  13855. return lt.apply(this, [e2, t2]);
  13856. }
  13857. deleteFile(e2, t2) {
  13858. return ct.apply(this, [e2, t2]);
  13859. }
  13860. getTempFileURL(e2, t2) {
  13861. return ut.apply(this, [e2, t2]);
  13862. }
  13863. downloadFile(e2, t2) {
  13864. return ht.apply(this, [e2, t2]);
  13865. }
  13866. uploadFile(e2, t2) {
  13867. return ot.apply(this, [e2, t2]);
  13868. }
  13869. getUploadMetadata(e2, t2) {
  13870. return at.apply(this, [e2, t2]);
  13871. }
  13872. registerExtension(e2) {
  13873. pt[e2.name] = e2;
  13874. }
  13875. async invokeExtension(e2, t2) {
  13876. const n2 = pt[e2];
  13877. if (!n2)
  13878. throw new ne({ message: `扩展${e2} 必须先注册` });
  13879. return await n2.invoke(t2, this);
  13880. }
  13881. useAdapters(e2) {
  13882. const { adapter: t2, runtime: n2 } = ke(e2) || {};
  13883. t2 && (Ce.adapter = t2), n2 && (Ce.runtime = n2);
  13884. }
  13885. }
  13886. var gt = new ft();
  13887. function mt(e2, t2, n2) {
  13888. void 0 === n2 && (n2 = {});
  13889. var s2 = /\?/.test(t2), r2 = "";
  13890. for (var i2 in n2)
  13891. "" === r2 ? !s2 && (t2 += "?") : r2 += "&", r2 += i2 + "=" + encodeURIComponent(n2[i2]);
  13892. return /^http(s)?:\/\//.test(t2 += r2) ? t2 : "" + e2 + t2;
  13893. }
  13894. class yt {
  13895. post(e2) {
  13896. const { url: t2, data: n2, headers: s2 } = e2;
  13897. return new Promise((e3, r2) => {
  13898. se.request({ url: mt("https:", t2), data: n2, method: "POST", header: s2, success(t3) {
  13899. e3(t3);
  13900. }, fail(e4) {
  13901. r2(e4);
  13902. } });
  13903. });
  13904. }
  13905. upload(e2) {
  13906. return new Promise((t2, n2) => {
  13907. const { url: s2, file: r2, data: i2, headers: o2, fileType: a2 } = e2, c2 = se.uploadFile({ url: mt("https:", s2), name: "file", formData: Object.assign({}, i2), filePath: r2, fileType: a2, header: o2, success(e3) {
  13908. const n3 = { statusCode: e3.statusCode, data: e3.data || {} };
  13909. 200 === e3.statusCode && i2.success_action_status && (n3.statusCode = parseInt(i2.success_action_status, 10)), t2(n3);
  13910. }, fail(e3) {
  13911. n2(new Error(e3.errMsg || "uploadFile:fail"));
  13912. } });
  13913. "function" == typeof e2.onUploadProgress && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((t3) => {
  13914. e2.onUploadProgress({ loaded: t3.totalBytesSent, total: t3.totalBytesExpectedToSend });
  13915. });
  13916. });
  13917. }
  13918. }
  13919. const _t = { setItem(e2, t2) {
  13920. se.setStorageSync(e2, t2);
  13921. }, getItem: (e2) => se.getStorageSync(e2), removeItem(e2) {
  13922. se.removeStorageSync(e2);
  13923. }, clear() {
  13924. se.clearStorageSync();
  13925. } };
  13926. var wt = { genAdapter: function() {
  13927. return { root: {}, reqClass: yt, localStorage: _t, primaryStorage: "local" };
  13928. }, isMatch: function() {
  13929. return true;
  13930. }, runtime: "uni_app" };
  13931. gt.useAdapters(wt);
  13932. const vt = gt, It = vt.init;
  13933. vt.init = function(e2) {
  13934. e2.env = e2.spaceId;
  13935. const t2 = It.call(this, e2);
  13936. t2.config.provider = "tencent", t2.config.spaceId = e2.spaceId;
  13937. const n2 = t2.auth;
  13938. return t2.auth = function(e3) {
  13939. const t3 = n2.call(this, e3);
  13940. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach((e4) => {
  13941. var n3;
  13942. t3[e4] = (n3 = t3[e4], function(e5) {
  13943. e5 = e5 || {};
  13944. const { success: t4, fail: s2, complete: r2 } = te(e5);
  13945. if (!(t4 || s2 || r2))
  13946. return n3.call(this, e5);
  13947. n3.call(this, e5).then((e6) => {
  13948. t4 && t4(e6), r2 && r2(e6);
  13949. }, (e6) => {
  13950. s2 && s2(e6), r2 && r2(e6);
  13951. });
  13952. }).bind(t3);
  13953. }), t3;
  13954. }, t2.customAuth = t2.auth, t2;
  13955. };
  13956. var St = vt;
  13957. var bt = class extends ge {
  13958. getAccessToken() {
  13959. return new Promise((e2, t2) => {
  13960. const n2 = "Anonymous_Access_token";
  13961. this.setAccessToken(n2), e2(n2);
  13962. });
  13963. }
  13964. setupRequest(e2, t2) {
  13965. const n2 = Object.assign({}, e2, { spaceId: this.config.spaceId, timestamp: Date.now() }), s2 = { "Content-Type": "application/json" };
  13966. "auth" !== t2 && (n2.token = this.accessToken, s2["x-basement-token"] = this.accessToken), s2["x-serverless-sign"] = de.sign(n2, this.config.clientSecret);
  13967. const r2 = le();
  13968. s2["x-client-info"] = encodeURIComponent(JSON.stringify(r2));
  13969. const { token: i2 } = ie();
  13970. return s2["x-client-token"] = i2, { url: this.config.requestUrl, method: "POST", data: n2, dataType: "json", header: JSON.parse(JSON.stringify(s2)) };
  13971. }
  13972. uploadFileToOSS({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, onUploadProgress: i2 }) {
  13973. return new Promise((o2, a2) => {
  13974. const c2 = this.adapter.uploadFile({ url: e2, formData: t2, name: n2, filePath: s2, fileType: r2, success(e3) {
  13975. e3 && e3.statusCode < 400 ? o2(e3) : a2(new ne({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
  13976. }, fail(e3) {
  13977. a2(new ne({ code: e3.code || "UPLOAD_FAILED", message: e3.message || e3.errMsg || "文件上传失败" }));
  13978. } });
  13979. "function" == typeof i2 && c2 && "function" == typeof c2.onProgressUpdate && c2.onProgressUpdate((e3) => {
  13980. i2({ loaded: e3.totalBytesSent, total: e3.totalBytesExpectedToSend });
  13981. });
  13982. });
  13983. }
  13984. uploadFile({ filePath: e2, cloudPath: t2, fileType: n2 = "image", onUploadProgress: s2 }) {
  13985. if (!t2)
  13986. throw new ne({ code: "CLOUDPATH_REQUIRED", message: "cloudPath不可为空" });
  13987. let r2;
  13988. return this.getOSSUploadOptionsFromPath({ cloudPath: t2 }).then((t3) => {
  13989. const { url: i2, formData: o2, name: a2 } = t3.result;
  13990. r2 = t3.result.fileUrl;
  13991. const c2 = { url: i2, formData: o2, name: a2, filePath: e2, fileType: n2 };
  13992. return this.uploadFileToOSS(Object.assign({}, c2, { onUploadProgress: s2 }));
  13993. }).then(() => this.reportOSSUpload({ cloudPath: t2 })).then((t3) => new Promise((n3, s3) => {
  13994. t3.success ? n3({ success: true, filePath: e2, fileID: r2 }) : s3(new ne({ code: "UPLOAD_FAILED", message: "文件上传失败" }));
  13995. }));
  13996. }
  13997. deleteFile({ fileList: e2 }) {
  13998. const t2 = { method: "serverless.file.resource.delete", params: JSON.stringify({ fileList: e2 }) };
  13999. return this.request(this.setupRequest(t2)).then((e3) => {
  14000. if (e3.success)
  14001. return e3.result;
  14002. throw new ne({ code: "DELETE_FILE_FAILED", message: "删除文件失败" });
  14003. });
  14004. }
  14005. getTempFileURL({ fileList: e2 } = {}) {
  14006. if (!Array.isArray(e2) || 0 === e2.length)
  14007. throw new ne({ code: "INVALID_PARAM", message: "fileList的元素必须是非空的字符串" });
  14008. const t2 = { method: "serverless.file.resource.getTempFileURL", params: JSON.stringify({ fileList: e2 }) };
  14009. return this.request(this.setupRequest(t2)).then((e3) => {
  14010. if (e3.success)
  14011. return { fileList: e3.result.fileList.map((e4) => ({ fileID: e4.fileID, tempFileURL: e4.tempFileURL })) };
  14012. throw new ne({ code: "GET_TEMP_FILE_URL_FAILED", message: "获取临时文件链接失败" });
  14013. });
  14014. }
  14015. };
  14016. var kt = { init(e2) {
  14017. const t2 = new bt(e2), n2 = { signInAnonymously: function() {
  14018. return t2.authorize();
  14019. }, getLoginState: function() {
  14020. return Promise.resolve(false);
  14021. } };
  14022. return t2.auth = function() {
  14023. return n2;
  14024. }, t2.customAuth = t2.auth, t2;
  14025. } };
  14026. function Ct({ data: e2 }) {
  14027. let t2;
  14028. t2 = le();
  14029. const n2 = JSON.parse(JSON.stringify(e2 || {}));
  14030. if (Object.assign(n2, { clientInfo: t2 }), !n2.uniIdToken) {
  14031. const { token: e3 } = ie();
  14032. e3 && (n2.uniIdToken = e3);
  14033. }
  14034. return n2;
  14035. }
  14036. async function Tt({ name: e2, data: t2 } = {}) {
  14037. await this.__dev__.initLocalNetwork();
  14038. const { localAddress: n2, localPort: s2 } = this.__dev__, r2 = { aliyun: "aliyun", tencent: "tcb" }[this.config.provider], i2 = this.config.spaceId, o2 = `http://${n2}:${s2}/system/check-function`, a2 = `http://${n2}:${s2}/cloudfunctions/${e2}`;
  14039. return new Promise((t3, n3) => {
  14040. se.request({ method: "POST", url: o2, data: { name: e2, platform: P, provider: r2, spaceId: i2 }, timeout: 3e3, success(e3) {
  14041. t3(e3);
  14042. }, fail() {
  14043. t3({ data: { code: "NETWORK_ERROR", message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。" } });
  14044. } });
  14045. }).then(({ data: e3 } = {}) => {
  14046. const { code: t3, message: n3 } = e3 || {};
  14047. return { code: 0 === t3 ? 0 : t3 || "SYS_ERR", message: n3 || "SYS_ERR" };
  14048. }).then(({ code: n3, message: s3 }) => {
  14049. if (0 !== n3) {
  14050. switch (n3) {
  14051. case "MODULE_ENCRYPTED":
  14052. console.error(`此云函数(${e2})依赖加密公共模块不可本地调试,自动切换为云端已部署的云函数`);
  14053. break;
  14054. case "FUNCTION_ENCRYPTED":
  14055. console.error(`此云函数(${e2})已加密不可本地调试,自动切换为云端已部署的云函数`);
  14056. break;
  14057. case "ACTION_ENCRYPTED":
  14058. console.error(s3 || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  14059. break;
  14060. case "NETWORK_ERROR": {
  14061. const e3 = "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";
  14062. throw console.error(e3), new Error(e3);
  14063. }
  14064. case "SWITCH_TO_CLOUD":
  14065. break;
  14066. default: {
  14067. const e3 = `检测本地调试服务出现错误:${s3},请检查网络环境或重启客户端再试`;
  14068. throw console.error(e3), new Error(e3);
  14069. }
  14070. }
  14071. return this._callCloudFunction({ name: e2, data: t2 });
  14072. }
  14073. return new Promise((e3, n4) => {
  14074. const s4 = Ct.call(this, { data: t2 });
  14075. se.request({ method: "POST", url: a2, data: { provider: r2, platform: P, param: s4 }, success: ({ statusCode: t3, data: s5 } = {}) => !t3 || t3 >= 400 ? n4(new ne({ code: s5.code || "SYS_ERR", message: s5.message || "request:fail" })) : e3({ result: s5 }), fail(e4) {
  14076. n4(new ne({ code: e4.code || e4.errCode || "SYS_ERR", message: e4.message || e4.errMsg || "request:fail" }));
  14077. } });
  14078. });
  14079. });
  14080. }
  14081. const Pt = [{ rule: /fc_function_not_found|FUNCTION_NOT_FOUND/, content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间", mode: "append" }];
  14082. var At = /[\\^$.*+?()[\]{}|]/g, Et = RegExp(At.source);
  14083. function Ot(e2, t2, n2) {
  14084. return e2.replace(new RegExp((s2 = t2) && Et.test(s2) ? s2.replace(At, "\\$&") : s2, "g"), n2);
  14085. var s2;
  14086. }
  14087. const Rt = "request", Ut = "response", Lt = "both";
  14088. const yn = { code: 2e4, message: "System error" }, _n = { code: 20101, message: "Invalid client" };
  14089. function In(e2) {
  14090. const { errSubject: t2, subject: n2, errCode: s2, errMsg: r2, code: i2, message: o2, cause: a2 } = e2 || {};
  14091. return new ne({ subject: t2 || n2 || "uni-secure-network", code: s2 || i2 || yn.code, message: r2 || o2, cause: a2 });
  14092. }
  14093. let bn;
  14094. function An({ secretType: e2 } = {}) {
  14095. return e2 === Rt || e2 === Ut || e2 === Lt;
  14096. }
  14097. function En({ name: e2, data: t2 = {} } = {}) {
  14098. return "app" === P;
  14099. }
  14100. function On({ provider: e2, spaceId: t2, functionName: n2 } = {}) {
  14101. const { appId: s2, uniPlatform: r2, osName: i2 } = ue();
  14102. let o2 = r2;
  14103. "app" === r2 && (o2 = i2);
  14104. const a2 = function({ provider: e3, spaceId: t3 } = {}) {
  14105. const n3 = T;
  14106. if (!n3)
  14107. return {};
  14108. e3 = function(e4) {
  14109. return "tencent" === e4 ? "tcb" : e4;
  14110. }(e3);
  14111. const s3 = n3.find((n4) => n4.provider === e3 && n4.spaceId === t3);
  14112. return s3 && s3.config;
  14113. }({ provider: e2, spaceId: t2 });
  14114. if (!a2 || !a2.accessControl || !a2.accessControl.enable)
  14115. return false;
  14116. const c2 = a2.accessControl.function || {}, u2 = Object.keys(c2);
  14117. if (0 === u2.length)
  14118. return true;
  14119. const h2 = function(e3, t3) {
  14120. let n3, s3, r3;
  14121. for (let i3 = 0; i3 < e3.length; i3++) {
  14122. const o3 = e3[i3];
  14123. o3 !== t3 ? "*" !== o3 ? o3.split(",").map((e4) => e4.trim()).indexOf(t3) > -1 && (s3 = o3) : r3 = o3 : n3 = o3;
  14124. }
  14125. return n3 || s3 || r3;
  14126. }(u2, n2);
  14127. if (!h2)
  14128. return false;
  14129. if ((c2[h2] || []).find((e3 = {}) => e3.appId === s2 && (e3.platform || "").toLowerCase() === o2.toLowerCase()))
  14130. return true;
  14131. throw console.error(`此应用[appId: ${s2}, platform: ${o2}]不在云端配置的允许访问的应用列表内,参考:https://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client`), In(_n);
  14132. }
  14133. function xn({ functionName: e2, result: t2, logPvd: n2 }) {
  14134. if (this.__dev__.debugLog && t2 && t2.requestId) {
  14135. const s2 = JSON.stringify({ spaceId: this.config.spaceId, functionName: e2, requestId: t2.requestId });
  14136. console.log(`[${n2}-request]${s2}[/${n2}-request]`);
  14137. }
  14138. }
  14139. function Rn(e2) {
  14140. const t2 = e2.callFunction, n2 = function(n3) {
  14141. const s2 = n3.name;
  14142. n3.data = Ct.call(e2, { data: n3.data });
  14143. const r2 = { aliyun: "aliyun", tencent: "tcb", tcb: "tcb" }[this.config.provider], i2 = An(n3), o2 = En(n3), a2 = i2 || o2;
  14144. return t2.call(this, n3).then((e3) => (e3.errCode = 0, !a2 && xn.call(this, { functionName: s2, result: e3, logPvd: r2 }), Promise.resolve(e3)), (e3) => (!a2 && xn.call(this, { functionName: s2, result: e3, logPvd: r2 }), e3 && e3.message && (e3.message = function({ message: e4 = "", extraInfo: t3 = {}, formatter: n4 = [] } = {}) {
  14145. for (let s3 = 0; s3 < n4.length; s3++) {
  14146. const { rule: r3, content: i3, mode: o3 } = n4[s3], a3 = e4.match(r3);
  14147. if (!a3)
  14148. continue;
  14149. let c2 = i3;
  14150. for (let e5 = 1; e5 < a3.length; e5++)
  14151. c2 = Ot(c2, `{$${e5}}`, a3[e5]);
  14152. for (const e5 in t3)
  14153. c2 = Ot(c2, `{${e5}}`, t3[e5]);
  14154. return "replace" === o3 ? c2 : e4 + c2;
  14155. }
  14156. return e4;
  14157. }({ message: `[${n3.name}]: ${e3.message}`, formatter: Pt, extraInfo: { functionName: s2 } })), Promise.reject(e3)));
  14158. };
  14159. e2.callFunction = function(t3) {
  14160. const { provider: s2, spaceId: r2 } = e2.config, i2 = t3.name;
  14161. let o2, a2;
  14162. if (t3.data = t3.data || {}, e2.__dev__.debugInfo && !e2.__dev__.debugInfo.forceRemote && E ? (e2._callCloudFunction || (e2._callCloudFunction = n2, e2._callLocalFunction = Tt), o2 = Tt) : o2 = n2, o2 = o2.bind(e2), En(t3))
  14163. ;
  14164. else if (function({ name: e3, data: t4 = {} }) {
  14165. return "uni-id-co" === e3 && "secureNetworkHandshakeByWeixin" === t4.method;
  14166. }(t3))
  14167. a2 = o2.call(e2, t3);
  14168. else if (An(t3)) {
  14169. a2 = new bn({ secretType: t3.secretType, uniCloudIns: e2 }).wrapEncryptDataCallFunction(n2.bind(e2))(t3);
  14170. } else if (On({ provider: s2, spaceId: r2, functionName: i2 })) {
  14171. a2 = new bn({ secretType: t3.secretType, uniCloudIns: e2 }).wrapVerifyClientCallFunction(n2.bind(e2))(t3);
  14172. } else
  14173. a2 = o2(t3);
  14174. return Object.defineProperty(a2, "result", { get: () => (console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {}) }), a2;
  14175. };
  14176. }
  14177. bn = class {
  14178. constructor() {
  14179. throw In({ message: `Platform ${P} is not enabled, please check whether secure network module is enabled in your manifest.json` });
  14180. }
  14181. };
  14182. const Un = Symbol("CLIENT_DB_INTERNAL");
  14183. function Ln(e2, t2) {
  14184. return e2.then = "DoNotReturnProxyWithAFunctionNamedThen", e2._internalType = Un, e2.inspect = null, e2.__v_raw = void 0, new Proxy(e2, { get(e3, n2, s2) {
  14185. if ("_uniClient" === n2)
  14186. return null;
  14187. if ("symbol" == typeof n2)
  14188. return e3[n2];
  14189. if (n2 in e3 || "string" != typeof n2) {
  14190. const t3 = e3[n2];
  14191. return "function" == typeof t3 ? t3.bind(e3) : t3;
  14192. }
  14193. return t2.get(e3, n2, s2);
  14194. } });
  14195. }
  14196. function Nn(e2) {
  14197. return { on: (t2, n2) => {
  14198. e2[t2] = e2[t2] || [], e2[t2].indexOf(n2) > -1 || e2[t2].push(n2);
  14199. }, off: (t2, n2) => {
  14200. e2[t2] = e2[t2] || [];
  14201. const s2 = e2[t2].indexOf(n2);
  14202. -1 !== s2 && e2[t2].splice(s2, 1);
  14203. } };
  14204. }
  14205. const Dn = ["db.Geo", "db.command", "command.aggregate"];
  14206. function Fn(e2, t2) {
  14207. return Dn.indexOf(`${e2}.${t2}`) > -1;
  14208. }
  14209. function qn(e2) {
  14210. switch (g(e2 = re(e2))) {
  14211. case "array":
  14212. return e2.map((e3) => qn(e3));
  14213. case "object":
  14214. return e2._internalType === Un || Object.keys(e2).forEach((t2) => {
  14215. e2[t2] = qn(e2[t2]);
  14216. }), e2;
  14217. case "regexp":
  14218. return { $regexp: { source: e2.source, flags: e2.flags } };
  14219. case "date":
  14220. return { $date: e2.toISOString() };
  14221. default:
  14222. return e2;
  14223. }
  14224. }
  14225. function Mn(e2) {
  14226. return e2 && e2.content && e2.content.$method;
  14227. }
  14228. class Kn {
  14229. constructor(e2, t2, n2) {
  14230. this.content = e2, this.prevStage = t2 || null, this.udb = null, this._database = n2;
  14231. }
  14232. toJSON() {
  14233. let e2 = this;
  14234. const t2 = [e2.content];
  14235. for (; e2.prevStage; )
  14236. e2 = e2.prevStage, t2.push(e2.content);
  14237. return { $db: t2.reverse().map((e3) => ({ $method: e3.$method, $param: qn(e3.$param) })) };
  14238. }
  14239. toString() {
  14240. return JSON.stringify(this.toJSON());
  14241. }
  14242. getAction() {
  14243. const e2 = this.toJSON().$db.find((e3) => "action" === e3.$method);
  14244. return e2 && e2.$param && e2.$param[0];
  14245. }
  14246. getCommand() {
  14247. return { $db: this.toJSON().$db.filter((e2) => "action" !== e2.$method) };
  14248. }
  14249. get isAggregate() {
  14250. let e2 = this;
  14251. for (; e2; ) {
  14252. const t2 = Mn(e2), n2 = Mn(e2.prevStage);
  14253. if ("aggregate" === t2 && "collection" === n2 || "pipeline" === t2)
  14254. return true;
  14255. e2 = e2.prevStage;
  14256. }
  14257. return false;
  14258. }
  14259. get isCommand() {
  14260. let e2 = this;
  14261. for (; e2; ) {
  14262. if ("command" === Mn(e2))
  14263. return true;
  14264. e2 = e2.prevStage;
  14265. }
  14266. return false;
  14267. }
  14268. get isAggregateCommand() {
  14269. let e2 = this;
  14270. for (; e2; ) {
  14271. const t2 = Mn(e2), n2 = Mn(e2.prevStage);
  14272. if ("aggregate" === t2 && "command" === n2)
  14273. return true;
  14274. e2 = e2.prevStage;
  14275. }
  14276. return false;
  14277. }
  14278. getNextStageFn(e2) {
  14279. const t2 = this;
  14280. return function() {
  14281. return jn({ $method: e2, $param: qn(Array.from(arguments)) }, t2, t2._database);
  14282. };
  14283. }
  14284. get count() {
  14285. return this.isAggregate ? this.getNextStageFn("count") : function() {
  14286. return this._send("count", Array.from(arguments));
  14287. };
  14288. }
  14289. get remove() {
  14290. return this.isCommand ? this.getNextStageFn("remove") : function() {
  14291. return this._send("remove", Array.from(arguments));
  14292. };
  14293. }
  14294. get() {
  14295. return this._send("get", Array.from(arguments));
  14296. }
  14297. get add() {
  14298. return this.isCommand ? this.getNextStageFn("add") : function() {
  14299. return this._send("add", Array.from(arguments));
  14300. };
  14301. }
  14302. update() {
  14303. return this._send("update", Array.from(arguments));
  14304. }
  14305. end() {
  14306. return this._send("end", Array.from(arguments));
  14307. }
  14308. get set() {
  14309. return this.isCommand ? this.getNextStageFn("set") : function() {
  14310. throw new Error("JQL禁止使用set方法");
  14311. };
  14312. }
  14313. _send(e2, t2) {
  14314. const n2 = this.getAction(), s2 = this.getCommand();
  14315. if (s2.$db.push({ $method: e2, $param: qn(t2) }), b) {
  14316. const e3 = s2.$db.find((e4) => "collection" === e4.$method), t3 = e3 && e3.$param;
  14317. t3 && 1 === t3.length && "string" == typeof e3.$param[0] && e3.$param[0].indexOf(",") > -1 && console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  14318. }
  14319. return this._database._callCloudFunction({ action: n2, command: s2 });
  14320. }
  14321. }
  14322. function jn(e2, t2, n2) {
  14323. return Ln(new Kn(e2, t2, n2), { get(e3, t3) {
  14324. let s2 = "db";
  14325. return e3 && e3.content && (s2 = e3.content.$method), Fn(s2, t3) ? jn({ $method: t3 }, e3, n2) : function() {
  14326. return jn({ $method: t3, $param: qn(Array.from(arguments)) }, e3, n2);
  14327. };
  14328. } });
  14329. }
  14330. function Bn({ path: e2, method: t2 }) {
  14331. return class {
  14332. constructor() {
  14333. this.param = Array.from(arguments);
  14334. }
  14335. toJSON() {
  14336. return { $newDb: [...e2.map((e3) => ({ $method: e3 })), { $method: t2, $param: this.param }] };
  14337. }
  14338. toString() {
  14339. return JSON.stringify(this.toJSON());
  14340. }
  14341. };
  14342. }
  14343. function $n(e2, t2 = {}) {
  14344. return Ln(new e2(t2), { get: (e3, t3) => Fn("db", t3) ? jn({ $method: t3 }, null, e3) : function() {
  14345. return jn({ $method: t3, $param: qn(Array.from(arguments)) }, null, e3);
  14346. } });
  14347. }
  14348. class Wn extends class {
  14349. constructor({ uniClient: e2 = {}, isJQL: t2 = false } = {}) {
  14350. this._uniClient = e2, this._authCallBacks = {}, this._dbCallBacks = {}, e2._isDefault && (this._dbCallBacks = U("_globalUniCloudDatabaseCallback")), t2 || (this.auth = Nn(this._authCallBacks)), this._isJQL = t2, Object.assign(this, Nn(this._dbCallBacks)), this.env = Ln({}, { get: (e3, t3) => ({ $env: t3 }) }), this.Geo = Ln({}, { get: (e3, t3) => Bn({ path: ["Geo"], method: t3 }) }), this.serverDate = Bn({ path: [], method: "serverDate" }), this.RegExp = Bn({ path: [], method: "RegExp" });
  14351. }
  14352. getCloudEnv(e2) {
  14353. if ("string" != typeof e2 || !e2.trim())
  14354. throw new Error("getCloudEnv参数错误");
  14355. return { $env: e2.replace("$cloudEnv_", "") };
  14356. }
  14357. _callback(e2, t2) {
  14358. const n2 = this._dbCallBacks;
  14359. n2[e2] && n2[e2].forEach((e3) => {
  14360. e3(...t2);
  14361. });
  14362. }
  14363. _callbackAuth(e2, t2) {
  14364. const n2 = this._authCallBacks;
  14365. n2[e2] && n2[e2].forEach((e3) => {
  14366. e3(...t2);
  14367. });
  14368. }
  14369. multiSend() {
  14370. const e2 = Array.from(arguments), t2 = e2.map((e3) => {
  14371. const t3 = e3.getAction(), n2 = e3.getCommand();
  14372. if ("getTemp" !== n2.$db[n2.$db.length - 1].$method)
  14373. throw new Error("multiSend只支持子命令内使用getTemp");
  14374. return { action: t3, command: n2 };
  14375. });
  14376. return this._callCloudFunction({ multiCommand: t2, queryList: e2 });
  14377. }
  14378. } {
  14379. _parseResult(e2) {
  14380. return this._isJQL ? e2.result : e2;
  14381. }
  14382. _callCloudFunction({ action: e2, command: t2, multiCommand: n2, queryList: s2 }) {
  14383. function r2(e3, t3) {
  14384. if (n2 && s2)
  14385. for (let n3 = 0; n3 < s2.length; n3++) {
  14386. const r3 = s2[n3];
  14387. r3.udb && "function" == typeof r3.udb.setResult && (t3 ? r3.udb.setResult(t3) : r3.udb.setResult(e3.result.dataList[n3]));
  14388. }
  14389. }
  14390. const i2 = this, o2 = this._isJQL ? "databaseForJQL" : "database";
  14391. function a2(e3) {
  14392. return i2._callback("error", [e3]), q(M(o2, "fail"), e3).then(() => q(M(o2, "complete"), e3)).then(() => (r2(null, e3), Y(B, { type: z, content: e3 }), Promise.reject(e3)));
  14393. }
  14394. const c2 = q(M(o2, "invoke")), u2 = this._uniClient;
  14395. return c2.then(() => u2.callFunction({ name: "DCloud-clientDB", type: l, data: { action: e2, command: t2, multiCommand: n2 } })).then((e3) => {
  14396. const { code: t3, message: n3, token: s3, tokenExpired: c3, systemInfo: u3 = [] } = e3.result;
  14397. if (u3)
  14398. for (let e4 = 0; e4 < u3.length; e4++) {
  14399. const { level: t4, message: n4, detail: s4 } = u3[e4], r3 = console[t4] || console.log;
  14400. let i3 = "[System Info]" + n4;
  14401. s4 && (i3 = `${i3}
  14402. 详细信息:${s4}`), r3(i3);
  14403. }
  14404. if (t3) {
  14405. return a2(new ne({ code: t3, message: n3, requestId: e3.requestId }));
  14406. }
  14407. e3.result.errCode = e3.result.errCode || e3.result.code, e3.result.errMsg = e3.result.errMsg || e3.result.message, s3 && c3 && (oe({ token: s3, tokenExpired: c3 }), this._callbackAuth("refreshToken", [{ token: s3, tokenExpired: c3 }]), this._callback("refreshToken", [{ token: s3, tokenExpired: c3 }]), Y(W, { token: s3, tokenExpired: c3 }));
  14408. const h2 = [{ prop: "affectedDocs", tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代" }, { prop: "code", tips: "code不再推荐使用,请使用errCode替代" }, { prop: "message", tips: "message不再推荐使用,请使用errMsg替代" }];
  14409. for (let t4 = 0; t4 < h2.length; t4++) {
  14410. const { prop: n4, tips: s4 } = h2[t4];
  14411. if (n4 in e3.result) {
  14412. const t5 = e3.result[n4];
  14413. Object.defineProperty(e3.result, n4, { get: () => (console.warn(s4), t5) });
  14414. }
  14415. }
  14416. return function(e4) {
  14417. return q(M(o2, "success"), e4).then(() => q(M(o2, "complete"), e4)).then(() => {
  14418. r2(e4, null);
  14419. const t4 = i2._parseResult(e4);
  14420. return Y(B, { type: z, content: t4 }), Promise.resolve(t4);
  14421. });
  14422. }(e3);
  14423. }, (e3) => {
  14424. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e3.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  14425. return a2(new ne({ code: e3.code || "SYSTEM_ERROR", message: e3.message, requestId: e3.requestId }));
  14426. });
  14427. }
  14428. }
  14429. const zn = "token无效,跳转登录页面", Jn = "token过期,跳转登录页面", Hn = { TOKEN_INVALID_TOKEN_EXPIRED: Jn, TOKEN_INVALID_INVALID_CLIENTID: zn, TOKEN_INVALID: zn, TOKEN_INVALID_WRONG_TOKEN: zn, TOKEN_INVALID_ANONYMOUS_USER: zn }, Gn = { "uni-id-token-expired": Jn, "uni-id-check-token-failed": zn, "uni-id-token-not-exist": zn, "uni-id-check-device-feature-failed": zn };
  14430. function Vn(e2, t2) {
  14431. let n2 = "";
  14432. return n2 = e2 ? `${e2}/${t2}` : t2, n2.replace(/^\//, "");
  14433. }
  14434. function Qn(e2 = [], t2 = "") {
  14435. const n2 = [], s2 = [];
  14436. return e2.forEach((e3) => {
  14437. true === e3.needLogin ? n2.push(Vn(t2, e3.path)) : false === e3.needLogin && s2.push(Vn(t2, e3.path));
  14438. }), { needLoginPage: n2, notNeedLoginPage: s2 };
  14439. }
  14440. function Yn(e2) {
  14441. return e2.split("?")[0].replace(/^\//, "");
  14442. }
  14443. function Xn() {
  14444. return function(e2) {
  14445. let t2 = e2 && e2.$page && e2.$page.fullPath || "";
  14446. return t2 ? ("/" !== t2.charAt(0) && (t2 = "/" + t2), t2) : t2;
  14447. }(function() {
  14448. const e2 = getCurrentPages();
  14449. return e2[e2.length - 1];
  14450. }());
  14451. }
  14452. function Zn() {
  14453. return Yn(Xn());
  14454. }
  14455. function es(e2 = "", t2 = {}) {
  14456. if (!e2)
  14457. return false;
  14458. if (!(t2 && t2.list && t2.list.length))
  14459. return false;
  14460. const n2 = t2.list, s2 = Yn(e2);
  14461. return n2.some((e3) => e3.pagePath === s2);
  14462. }
  14463. const ts = !!t.uniIdRouter;
  14464. const { loginPage: ns, routerNeedLogin: ss, resToLogin: rs, needLoginPage: is, notNeedLoginPage: os, loginPageInTabBar: as } = function({ pages: e2 = [], subPackages: n2 = [], uniIdRouter: s2 = {}, tabBar: r2 = {} } = t) {
  14465. const { loginPage: i2, needLogin: o2 = [], resToLogin: a2 = true } = s2, { needLoginPage: c2, notNeedLoginPage: u2 } = Qn(e2), { needLoginPage: h2, notNeedLoginPage: l2 } = function(e3 = []) {
  14466. const t2 = [], n3 = [];
  14467. return e3.forEach((e4) => {
  14468. const { root: s3, pages: r3 = [] } = e4, { needLoginPage: i3, notNeedLoginPage: o3 } = Qn(r3, s3);
  14469. t2.push(...i3), n3.push(...o3);
  14470. }), { needLoginPage: t2, notNeedLoginPage: n3 };
  14471. }(n2);
  14472. return { loginPage: i2, routerNeedLogin: o2, resToLogin: a2, needLoginPage: [...c2, ...h2], notNeedLoginPage: [...u2, ...l2], loginPageInTabBar: es(i2, r2) };
  14473. }();
  14474. if (is.indexOf(ns) > -1)
  14475. throw new Error(`Login page [${ns}] should not be "needLogin", please check your pages.json`);
  14476. function cs(e2) {
  14477. const t2 = Zn();
  14478. if ("/" === e2.charAt(0))
  14479. return e2;
  14480. const [n2, s2] = e2.split("?"), r2 = n2.replace(/^\//, "").split("/"), i2 = t2.split("/");
  14481. i2.pop();
  14482. for (let e3 = 0; e3 < r2.length; e3++) {
  14483. const t3 = r2[e3];
  14484. ".." === t3 ? i2.pop() : "." !== t3 && i2.push(t3);
  14485. }
  14486. return "" === i2[0] && i2.shift(), "/" + i2.join("/") + (s2 ? "?" + s2 : "");
  14487. }
  14488. function us(e2) {
  14489. const t2 = Yn(cs(e2));
  14490. return !(os.indexOf(t2) > -1) && (is.indexOf(t2) > -1 || ss.some((t3) => function(e3, t4) {
  14491. return new RegExp(t4).test(e3);
  14492. }(e2, t3)));
  14493. }
  14494. function hs({ redirect: e2 }) {
  14495. const t2 = Yn(e2), n2 = Yn(ns);
  14496. return Zn() !== n2 && t2 !== n2;
  14497. }
  14498. function ls({ api: e2, redirect: t2 } = {}) {
  14499. if (!t2 || !hs({ redirect: t2 }))
  14500. return;
  14501. const n2 = function(e3, t3) {
  14502. return "/" !== e3.charAt(0) && (e3 = "/" + e3), t3 ? e3.indexOf("?") > -1 ? e3 + `&uniIdRedirectUrl=${encodeURIComponent(t3)}` : e3 + `?uniIdRedirectUrl=${encodeURIComponent(t3)}` : e3;
  14503. }(ns, t2);
  14504. as ? "navigateTo" !== e2 && "redirectTo" !== e2 || (e2 = "switchTab") : "switchTab" === e2 && (e2 = "navigateTo");
  14505. const s2 = { navigateTo: index$1.navigateTo, redirectTo: index$1.redirectTo, switchTab: index$1.switchTab, reLaunch: index$1.reLaunch };
  14506. setTimeout(() => {
  14507. s2[e2]({ url: n2 });
  14508. });
  14509. }
  14510. function ds({ url: e2 } = {}) {
  14511. const t2 = { abortLoginPageJump: false, autoToLoginPage: false }, n2 = function() {
  14512. const { token: e3, tokenExpired: t3 } = ie();
  14513. let n3;
  14514. if (e3) {
  14515. if (t3 < Date.now()) {
  14516. const e4 = "uni-id-token-expired";
  14517. n3 = { errCode: e4, errMsg: Gn[e4] };
  14518. }
  14519. } else {
  14520. const e4 = "uni-id-check-token-failed";
  14521. n3 = { errCode: e4, errMsg: Gn[e4] };
  14522. }
  14523. return n3;
  14524. }();
  14525. if (us(e2) && n2) {
  14526. n2.uniIdRedirectUrl = e2;
  14527. if (G($).length > 0)
  14528. return setTimeout(() => {
  14529. Y($, n2);
  14530. }, 0), t2.abortLoginPageJump = true, t2;
  14531. t2.autoToLoginPage = true;
  14532. }
  14533. return t2;
  14534. }
  14535. function ps() {
  14536. !function() {
  14537. const e3 = Xn(), { abortLoginPageJump: t2, autoToLoginPage: n2 } = ds({ url: e3 });
  14538. t2 || n2 && ls({ api: "redirectTo", redirect: e3 });
  14539. }();
  14540. const e2 = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  14541. for (let t2 = 0; t2 < e2.length; t2++) {
  14542. const n2 = e2[t2];
  14543. index$1.addInterceptor(n2, { invoke(e3) {
  14544. const { abortLoginPageJump: t3, autoToLoginPage: s2 } = ds({ url: e3.url });
  14545. return t3 ? e3 : s2 ? (ls({ api: n2, redirect: cs(e3.url) }), false) : e3;
  14546. } });
  14547. }
  14548. }
  14549. function fs() {
  14550. this.onResponse((e2) => {
  14551. const { type: t2, content: n2 } = e2;
  14552. let s2 = false;
  14553. switch (t2) {
  14554. case "cloudobject":
  14555. s2 = function(e3) {
  14556. if ("object" != typeof e3)
  14557. return false;
  14558. const { errCode: t3 } = e3 || {};
  14559. return t3 in Gn;
  14560. }(n2);
  14561. break;
  14562. case "clientdb":
  14563. s2 = function(e3) {
  14564. if ("object" != typeof e3)
  14565. return false;
  14566. const { errCode: t3 } = e3 || {};
  14567. return t3 in Hn;
  14568. }(n2);
  14569. }
  14570. s2 && function(e3 = {}) {
  14571. const t3 = G($);
  14572. ee().then(() => {
  14573. const n3 = Xn();
  14574. if (n3 && hs({ redirect: n3 }))
  14575. return t3.length > 0 ? Y($, Object.assign({ uniIdRedirectUrl: n3 }, e3)) : void (ns && ls({ api: "navigateTo", redirect: n3 }));
  14576. });
  14577. }(n2);
  14578. });
  14579. }
  14580. function gs(e2) {
  14581. !function(e3) {
  14582. e3.onResponse = function(e4) {
  14583. V(B, e4);
  14584. }, e3.offResponse = function(e4) {
  14585. Q(B, e4);
  14586. };
  14587. }(e2), function(e3) {
  14588. e3.onNeedLogin = function(e4) {
  14589. V($, e4);
  14590. }, e3.offNeedLogin = function(e4) {
  14591. Q($, e4);
  14592. }, ts && (U("_globalUniCloudStatus").needLoginInit || (U("_globalUniCloudStatus").needLoginInit = true, ee().then(() => {
  14593. ps.call(e3);
  14594. }), rs && fs.call(e3)));
  14595. }(e2), function(e3) {
  14596. e3.onRefreshToken = function(e4) {
  14597. V(W, e4);
  14598. }, e3.offRefreshToken = function(e4) {
  14599. Q(W, e4);
  14600. };
  14601. }(e2);
  14602. }
  14603. let ms;
  14604. const ys = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", _s = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  14605. function ws() {
  14606. const e2 = ie().token || "", t2 = e2.split(".");
  14607. if (!e2 || 3 !== t2.length)
  14608. return { uid: null, role: [], permission: [], tokenExpired: 0 };
  14609. let n2;
  14610. try {
  14611. n2 = JSON.parse((s2 = t2[1], decodeURIComponent(ms(s2).split("").map(function(e3) {
  14612. return "%" + ("00" + e3.charCodeAt(0).toString(16)).slice(-2);
  14613. }).join(""))));
  14614. } catch (e3) {
  14615. throw new Error("获取当前用户信息出错,详细错误信息为:" + e3.message);
  14616. }
  14617. var s2;
  14618. return n2.tokenExpired = 1e3 * n2.exp, delete n2.exp, delete n2.iat, n2;
  14619. }
  14620. ms = "function" != typeof atob ? function(e2) {
  14621. if (e2 = String(e2).replace(/[\t\n\f\r ]+/g, ""), !_s.test(e2))
  14622. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  14623. var t2;
  14624. e2 += "==".slice(2 - (3 & e2.length));
  14625. for (var n2, s2, r2 = "", i2 = 0; i2 < e2.length; )
  14626. t2 = ys.indexOf(e2.charAt(i2++)) << 18 | ys.indexOf(e2.charAt(i2++)) << 12 | (n2 = ys.indexOf(e2.charAt(i2++))) << 6 | (s2 = ys.indexOf(e2.charAt(i2++))), r2 += 64 === n2 ? String.fromCharCode(t2 >> 16 & 255) : 64 === s2 ? String.fromCharCode(t2 >> 16 & 255, t2 >> 8 & 255) : String.fromCharCode(t2 >> 16 & 255, t2 >> 8 & 255, 255 & t2);
  14627. return r2;
  14628. } : atob;
  14629. var vs = s(function(e2, t2) {
  14630. Object.defineProperty(t2, "__esModule", { value: true });
  14631. const n2 = "chooseAndUploadFile:ok", s2 = "chooseAndUploadFile:fail";
  14632. function r2(e3, t3) {
  14633. return e3.tempFiles.forEach((e4, n3) => {
  14634. e4.name || (e4.name = e4.path.substring(e4.path.lastIndexOf("/") + 1)), t3 && (e4.fileType = t3), e4.cloudPath = Date.now() + "_" + n3 + e4.name.substring(e4.name.lastIndexOf("."));
  14635. }), e3.tempFilePaths || (e3.tempFilePaths = e3.tempFiles.map((e4) => e4.path)), e3;
  14636. }
  14637. function i2(e3, t3, { onChooseFile: s3, onUploadProgress: r3 }) {
  14638. return t3.then((e4) => {
  14639. if (s3) {
  14640. const t4 = s3(e4);
  14641. if (void 0 !== t4)
  14642. return Promise.resolve(t4).then((t5) => void 0 === t5 ? e4 : t5);
  14643. }
  14644. return e4;
  14645. }).then((t4) => false === t4 ? { errMsg: n2, tempFilePaths: [], tempFiles: [] } : function(e4, t5, s4 = 5, r4) {
  14646. (t5 = Object.assign({}, t5)).errMsg = n2;
  14647. const i3 = t5.tempFiles, o2 = i3.length;
  14648. let a2 = 0;
  14649. return new Promise((n3) => {
  14650. for (; a2 < s4; )
  14651. c2();
  14652. function c2() {
  14653. const s5 = a2++;
  14654. if (s5 >= o2)
  14655. return void (!i3.find((e5) => !e5.url && !e5.errMsg) && n3(t5));
  14656. const u2 = i3[s5];
  14657. e4.uploadFile({ filePath: u2.path, cloudPath: u2.cloudPath, fileType: u2.fileType, onUploadProgress(e5) {
  14658. e5.index = s5, e5.tempFile = u2, e5.tempFilePath = u2.path, r4 && r4(e5);
  14659. } }).then((e5) => {
  14660. u2.url = e5.fileID, s5 < o2 && c2();
  14661. }).catch((e5) => {
  14662. u2.errMsg = e5.errMsg || e5.message, s5 < o2 && c2();
  14663. });
  14664. }
  14665. });
  14666. }(e3, t4, 5, r3));
  14667. }
  14668. t2.initChooseAndUploadFile = function(e3) {
  14669. return function(t3 = { type: "all" }) {
  14670. return "image" === t3.type ? i2(e3, function(e4) {
  14671. const { count: t4, sizeType: n3, sourceType: i3 = ["album", "camera"], extension: o2 } = e4;
  14672. return new Promise((e5, a2) => {
  14673. index$1.chooseImage({ count: t4, sizeType: n3, sourceType: i3, extension: o2, success(t5) {
  14674. e5(r2(t5, "image"));
  14675. }, fail(e6) {
  14676. a2({ errMsg: e6.errMsg.replace("chooseImage:fail", s2) });
  14677. } });
  14678. });
  14679. }(t3), t3) : "video" === t3.type ? i2(e3, function(e4) {
  14680. const { camera: t4, compressed: n3, maxDuration: i3, sourceType: o2 = ["album", "camera"], extension: a2 } = e4;
  14681. return new Promise((e5, c2) => {
  14682. index$1.chooseVideo({ camera: t4, compressed: n3, maxDuration: i3, sourceType: o2, extension: a2, success(t5) {
  14683. const { tempFilePath: n4, duration: s3, size: i4, height: o3, width: a3 } = t5;
  14684. e5(r2({ errMsg: "chooseVideo:ok", tempFilePaths: [n4], tempFiles: [{ name: t5.tempFile && t5.tempFile.name || "", path: n4, size: i4, type: t5.tempFile && t5.tempFile.type || "", width: a3, height: o3, duration: s3, fileType: "video", cloudPath: "" }] }, "video"));
  14685. }, fail(e6) {
  14686. c2({ errMsg: e6.errMsg.replace("chooseVideo:fail", s2) });
  14687. } });
  14688. });
  14689. }(t3), t3) : i2(e3, function(e4) {
  14690. const { count: t4, extension: n3 } = e4;
  14691. return new Promise((e5, i3) => {
  14692. let o2 = index$1.chooseFile;
  14693. if ("undefined" != typeof wx$1 && "function" == typeof wx$1.chooseMessageFile && (o2 = wx$1.chooseMessageFile), "function" != typeof o2)
  14694. return i3({ errMsg: s2 + " 请指定 type 类型,该平台仅支持选择 image 或 video。" });
  14695. o2({ type: "all", count: t4, extension: n3, success(t5) {
  14696. e5(r2(t5));
  14697. }, fail(e6) {
  14698. i3({ errMsg: e6.errMsg.replace("chooseFile:fail", s2) });
  14699. } });
  14700. });
  14701. }(t3), t3);
  14702. };
  14703. };
  14704. }), Is = n(vs);
  14705. const Ss = "manual";
  14706. function bs(e2) {
  14707. return { props: { localdata: { type: Array, default: () => [] }, options: { type: [Object, Array], default: () => ({}) }, spaceInfo: { type: Object, default: () => ({}) }, collection: { type: [String, Array], default: "" }, action: { type: String, default: "" }, field: { type: String, default: "" }, orderby: { type: String, default: "" }, where: { type: [String, Object], default: "" }, pageData: { type: String, default: "add" }, pageCurrent: { type: Number, default: 1 }, pageSize: { type: Number, default: 20 }, getcount: { type: [Boolean, String], default: false }, gettree: { type: [Boolean, String], default: false }, gettreepath: { type: [Boolean, String], default: false }, startwith: { type: String, default: "" }, limitlevel: { type: Number, default: 10 }, groupby: { type: String, default: "" }, groupField: { type: String, default: "" }, distinct: { type: [Boolean, String], default: false }, foreignKey: { type: String, default: "" }, loadtime: { type: String, default: "auto" }, manual: { type: Boolean, default: false } }, data: () => ({ mixinDatacomLoading: false, mixinDatacomHasMore: false, mixinDatacomResData: [], mixinDatacomErrorMessage: "", mixinDatacomPage: {} }), created() {
  14708. this.mixinDatacomPage = { current: this.pageCurrent, size: this.pageSize, count: 0 }, this.$watch(() => {
  14709. var e3 = [];
  14710. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach((t2) => {
  14711. e3.push(this[t2]);
  14712. }), e3;
  14713. }, (e3, t2) => {
  14714. if (this.loadtime === Ss)
  14715. return;
  14716. let n2 = false;
  14717. const s2 = [];
  14718. for (let r2 = 2; r2 < e3.length; r2++)
  14719. e3[r2] !== t2[r2] && (s2.push(e3[r2]), n2 = true);
  14720. e3[0] !== t2[0] && (this.mixinDatacomPage.current = this.pageCurrent), this.mixinDatacomPage.size = this.pageSize, this.onMixinDatacomPropsChange(n2, s2);
  14721. });
  14722. }, methods: { onMixinDatacomPropsChange(e3, t2) {
  14723. }, mixinDatacomEasyGet({ getone: e3 = false, success: t2, fail: n2 } = {}) {
  14724. this.mixinDatacomLoading || (this.mixinDatacomLoading = true, this.mixinDatacomErrorMessage = "", this.mixinDatacomGet().then((n3) => {
  14725. this.mixinDatacomLoading = false;
  14726. const { data: s2, count: r2 } = n3.result;
  14727. this.getcount && (this.mixinDatacomPage.count = r2), this.mixinDatacomHasMore = s2.length < this.pageSize;
  14728. const i2 = e3 ? s2.length ? s2[0] : void 0 : s2;
  14729. this.mixinDatacomResData = i2, t2 && t2(i2);
  14730. }).catch((e4) => {
  14731. this.mixinDatacomLoading = false, this.mixinDatacomErrorMessage = e4, n2 && n2(e4);
  14732. }));
  14733. }, mixinDatacomGet(t2 = {}) {
  14734. let n2 = e2.database(this.spaceInfo);
  14735. const s2 = t2.action || this.action;
  14736. s2 && (n2 = n2.action(s2));
  14737. const r2 = t2.collection || this.collection;
  14738. n2 = Array.isArray(r2) ? n2.collection(...r2) : n2.collection(r2);
  14739. const i2 = t2.where || this.where;
  14740. i2 && Object.keys(i2).length && (n2 = n2.where(i2));
  14741. const o2 = t2.field || this.field;
  14742. o2 && (n2 = n2.field(o2));
  14743. const a2 = t2.foreignKey || this.foreignKey;
  14744. a2 && (n2 = n2.foreignKey(a2));
  14745. const c2 = t2.groupby || this.groupby;
  14746. c2 && (n2 = n2.groupBy(c2));
  14747. const u2 = t2.groupField || this.groupField;
  14748. u2 && (n2 = n2.groupField(u2));
  14749. true === (void 0 !== t2.distinct ? t2.distinct : this.distinct) && (n2 = n2.distinct());
  14750. const h2 = t2.orderby || this.orderby;
  14751. h2 && (n2 = n2.orderBy(h2));
  14752. const l2 = void 0 !== t2.pageCurrent ? t2.pageCurrent : this.mixinDatacomPage.current, d2 = void 0 !== t2.pageSize ? t2.pageSize : this.mixinDatacomPage.size, p2 = void 0 !== t2.getcount ? t2.getcount : this.getcount, f2 = void 0 !== t2.gettree ? t2.gettree : this.gettree, g2 = void 0 !== t2.gettreepath ? t2.gettreepath : this.gettreepath, m2 = { getCount: p2 }, y2 = { limitLevel: void 0 !== t2.limitlevel ? t2.limitlevel : this.limitlevel, startWith: void 0 !== t2.startwith ? t2.startwith : this.startwith };
  14753. return f2 && (m2.getTree = y2), g2 && (m2.getTreePath = y2), n2 = n2.skip(d2 * (l2 - 1)).limit(d2).get(m2), n2;
  14754. } } };
  14755. }
  14756. function ks(e2) {
  14757. return function(t2, n2 = {}) {
  14758. n2 = function(e3, t3 = {}) {
  14759. return e3.customUI = t3.customUI || e3.customUI, e3.parseSystemError = t3.parseSystemError || e3.parseSystemError, Object.assign(e3.loadingOptions, t3.loadingOptions), Object.assign(e3.errorOptions, t3.errorOptions), "object" == typeof t3.secretMethods && (e3.secretMethods = t3.secretMethods), e3;
  14760. }({ customUI: false, loadingOptions: { title: "加载中...", mask: true }, errorOptions: { type: "modal", retry: false } }, n2);
  14761. const { customUI: s2, loadingOptions: r2, errorOptions: i2, parseSystemError: o2 } = n2, a2 = !s2;
  14762. return new Proxy({}, { get: (s3, c2) => function({ fn: e3, interceptorName: t3, getCallbackArgs: n3 } = {}) {
  14763. return async function(...s4) {
  14764. const r3 = n3 ? n3({ params: s4 }) : {};
  14765. let i3, o3;
  14766. try {
  14767. return await q(M(t3, "invoke"), { ...r3 }), i3 = await e3(...s4), await q(M(t3, "success"), { ...r3, result: i3 }), i3;
  14768. } catch (e4) {
  14769. throw o3 = e4, await q(M(t3, "fail"), { ...r3, error: o3 }), o3;
  14770. } finally {
  14771. await q(M(t3, "complete"), o3 ? { ...r3, error: o3 } : { ...r3, result: i3 });
  14772. }
  14773. };
  14774. }({ fn: async function s4(...u2) {
  14775. let l2;
  14776. a2 && index$1.showLoading({ title: r2.title, mask: r2.mask });
  14777. const d2 = { name: t2, type: h, data: { method: c2, params: u2 } };
  14778. "object" == typeof n2.secretMethods && function(e3, t3) {
  14779. const n3 = t3.data.method, s5 = e3.secretMethods || {}, r3 = s5[n3] || s5["*"];
  14780. r3 && (t3.secretType = r3);
  14781. }(n2, d2);
  14782. let p2 = false;
  14783. try {
  14784. l2 = await e2.callFunction(d2);
  14785. } catch (e3) {
  14786. p2 = true, l2 = { result: new ne(e3) };
  14787. }
  14788. const { errSubject: f2, errCode: g2, errMsg: m2, newToken: y2 } = l2.result || {};
  14789. if (a2 && index$1.hideLoading(), y2 && y2.token && y2.tokenExpired && (oe(y2), Y(W, { ...y2 })), g2) {
  14790. let e3 = m2;
  14791. if (p2 && o2) {
  14792. e3 = (await o2({ objectName: t2, methodName: c2, params: u2, errSubject: f2, errCode: g2, errMsg: m2 })).errMsg || m2;
  14793. }
  14794. if (a2)
  14795. if ("toast" === i2.type)
  14796. index$1.showToast({ title: e3, icon: "none" });
  14797. else {
  14798. if ("modal" !== i2.type)
  14799. throw new Error(`Invalid errorOptions.type: ${i2.type}`);
  14800. {
  14801. const { confirm: t3 } = await async function({ title: e4, content: t4, showCancel: n4, cancelText: s5, confirmText: r3 } = {}) {
  14802. return new Promise((i3, o3) => {
  14803. index$1.showModal({ title: e4, content: t4, showCancel: n4, cancelText: s5, confirmText: r3, success(e5) {
  14804. i3(e5);
  14805. }, fail() {
  14806. i3({ confirm: false, cancel: true });
  14807. } });
  14808. });
  14809. }({ title: "提示", content: e3, showCancel: i2.retry, cancelText: "取消", confirmText: i2.retry ? "重试" : "确定" });
  14810. if (i2.retry && t3)
  14811. return s4(...u2);
  14812. }
  14813. }
  14814. const n3 = new ne({ subject: f2, code: g2, message: m2, requestId: l2.requestId });
  14815. throw n3.detail = l2.result, Y(B, { type: H, content: n3 }), n3;
  14816. }
  14817. return Y(B, { type: H, content: l2.result }), l2.result;
  14818. }, interceptorName: "callObject", getCallbackArgs: function({ params: e3 } = {}) {
  14819. return { objectName: t2, methodName: c2, params: e3 };
  14820. } }) });
  14821. };
  14822. }
  14823. function Cs(e2) {
  14824. return U("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e2.config.spaceId));
  14825. }
  14826. async function Ts({ openid: e2, callLoginByWeixin: t2 = false } = {}) {
  14827. const n2 = Cs(this);
  14828. if (e2 && t2)
  14829. throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");
  14830. if (e2)
  14831. return n2.mpWeixinOpenid = e2, {};
  14832. const s2 = await new Promise((e3, t3) => {
  14833. index$1.login({ success(t4) {
  14834. e3(t4.code);
  14835. }, fail(e4) {
  14836. t3(new Error(e4.errMsg));
  14837. } });
  14838. }), r2 = this.importObject("uni-id-co", { customUI: true });
  14839. return await r2.secureNetworkHandshakeByWeixin({ code: s2, callLoginByWeixin: t2 }), n2.mpWeixinCode = s2, { code: s2 };
  14840. }
  14841. async function Ps(e2) {
  14842. const t2 = Cs(this);
  14843. return t2.initPromise || (t2.initPromise = Ts.call(this, e2)), t2.initPromise;
  14844. }
  14845. function As(e2) {
  14846. return function({ openid: t2, callLoginByWeixin: n2 = false } = {}) {
  14847. return Ps.call(e2, { openid: t2, callLoginByWeixin: n2 });
  14848. };
  14849. }
  14850. function Es(e2) {
  14851. const t2 = { getSystemInfo: index$1.getSystemInfo, getPushClientId: index$1.getPushClientId };
  14852. return function(n2) {
  14853. return new Promise((s2, r2) => {
  14854. t2[e2]({ ...n2, success(e3) {
  14855. s2(e3);
  14856. }, fail(e3) {
  14857. r2(e3);
  14858. } });
  14859. });
  14860. };
  14861. }
  14862. class Os extends class {
  14863. constructor() {
  14864. this._callback = {};
  14865. }
  14866. addListener(e2, t2) {
  14867. this._callback[e2] || (this._callback[e2] = []), this._callback[e2].push(t2);
  14868. }
  14869. on(e2, t2) {
  14870. return this.addListener(e2, t2);
  14871. }
  14872. removeListener(e2, t2) {
  14873. if (!t2)
  14874. throw new Error('The "listener" argument must be of type function. Received undefined');
  14875. const n2 = this._callback[e2];
  14876. if (!n2)
  14877. return;
  14878. const s2 = function(e3, t3) {
  14879. for (let n3 = e3.length - 1; n3 >= 0; n3--)
  14880. if (e3[n3] === t3)
  14881. return n3;
  14882. return -1;
  14883. }(n2, t2);
  14884. n2.splice(s2, 1);
  14885. }
  14886. off(e2, t2) {
  14887. return this.removeListener(e2, t2);
  14888. }
  14889. removeAllListener(e2) {
  14890. delete this._callback[e2];
  14891. }
  14892. emit(e2, ...t2) {
  14893. const n2 = this._callback[e2];
  14894. if (n2)
  14895. for (let e3 = 0; e3 < n2.length; e3++)
  14896. n2[e3](...t2);
  14897. }
  14898. } {
  14899. constructor() {
  14900. super(), this._uniPushMessageCallback = this._receivePushMessage.bind(this), this._currentMessageId = -1, this._payloadQueue = [];
  14901. }
  14902. init() {
  14903. return Promise.all([Es("getSystemInfo")(), Es("getPushClientId")()]).then(([{ appId: e2 } = {}, { cid: t2 } = {}] = []) => {
  14904. if (!e2)
  14905. throw new Error("Invalid appId, please check the manifest.json file");
  14906. if (!t2)
  14907. throw new Error("Invalid push client id");
  14908. this._appId = e2, this._pushClientId = t2, this._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), this.emit("open"), this._initMessageListener();
  14909. }, (e2) => {
  14910. throw this.emit("error", e2), this.close(), e2;
  14911. });
  14912. }
  14913. async open() {
  14914. return this.init();
  14915. }
  14916. _isUniCloudSSE(e2) {
  14917. if ("receive" !== e2.type)
  14918. return false;
  14919. const t2 = e2 && e2.data && e2.data.payload;
  14920. return !(!t2 || "UNI_CLOUD_SSE" !== t2.channel || t2.seqId !== this._seqId);
  14921. }
  14922. _receivePushMessage(e2) {
  14923. if (!this._isUniCloudSSE(e2))
  14924. return;
  14925. const t2 = e2 && e2.data && e2.data.payload, { action: n2, messageId: s2, message: r2 } = t2;
  14926. this._payloadQueue.push({ action: n2, messageId: s2, message: r2 }), this._consumMessage();
  14927. }
  14928. _consumMessage() {
  14929. for (; ; ) {
  14930. const e2 = this._payloadQueue.find((e3) => e3.messageId === this._currentMessageId + 1);
  14931. if (!e2)
  14932. break;
  14933. this._currentMessageId++, this._parseMessagePayload(e2);
  14934. }
  14935. }
  14936. _parseMessagePayload(e2) {
  14937. const { action: t2, messageId: n2, message: s2 } = e2;
  14938. "end" === t2 ? this._end({ messageId: n2, message: s2 }) : "message" === t2 && this._appendMessage({ messageId: n2, message: s2 });
  14939. }
  14940. _appendMessage({ messageId: e2, message: t2 } = {}) {
  14941. this.emit("message", t2);
  14942. }
  14943. _end({ messageId: e2, message: t2 } = {}) {
  14944. this.emit("end", t2), this.close();
  14945. }
  14946. _initMessageListener() {
  14947. index$1.onPushMessage(this._uniPushMessageCallback);
  14948. }
  14949. _destroy() {
  14950. index$1.offPushMessage(this._uniPushMessageCallback);
  14951. }
  14952. toJSON() {
  14953. return { appId: this._appId, pushClientId: this._pushClientId, seqId: this._seqId };
  14954. }
  14955. close() {
  14956. this._destroy(), this.emit("close");
  14957. }
  14958. }
  14959. async function xs(e2, t2) {
  14960. const n2 = `http://${e2}:${t2}/system/ping`;
  14961. try {
  14962. const e3 = await (s2 = { url: n2, timeout: 500 }, new Promise((e4, t3) => {
  14963. se.request({ ...s2, success(t4) {
  14964. e4(t4);
  14965. }, fail(e5) {
  14966. t3(e5);
  14967. } });
  14968. }));
  14969. return !(!e3.data || 0 !== e3.data.code);
  14970. } catch (e3) {
  14971. return false;
  14972. }
  14973. var s2;
  14974. }
  14975. async function Rs(e2) {
  14976. const t2 = e2.__dev__;
  14977. if (!t2.debugInfo)
  14978. return;
  14979. const { address: n2, servePort: s2 } = t2.debugInfo, { address: r2 } = await async function(e3, t3) {
  14980. let n3;
  14981. for (let s3 = 0; s3 < e3.length; s3++) {
  14982. const r3 = e3[s3];
  14983. if (await xs(r3, t3)) {
  14984. n3 = r3;
  14985. break;
  14986. }
  14987. }
  14988. return { address: n3, port: t3 };
  14989. }(n2, s2);
  14990. if (r2)
  14991. return t2.localAddress = r2, void (t2.localPort = s2);
  14992. const i2 = console["warn"];
  14993. let o2 = "";
  14994. if ("remote" === t2.debugInfo.initialLaunchType ? (t2.debugInfo.forceRemote = true, o2 = "当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。") : o2 = "无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。", o2 += "\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs\n- 检查是否错误的使用拦截器修改uni.request方法的参数", 0 === P.indexOf("mp-") && (o2 += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t2.debugInfo.forceRemote)
  14995. throw new Error(o2);
  14996. i2(o2);
  14997. }
  14998. function Us(e2) {
  14999. e2._initPromiseHub || (e2._initPromiseHub = new I({ createPromise: function() {
  15000. let t2 = Promise.resolve();
  15001. var n2;
  15002. n2 = 1, t2 = new Promise((e3) => {
  15003. setTimeout(() => {
  15004. e3();
  15005. }, n2);
  15006. });
  15007. const s2 = e2.auth();
  15008. return t2.then(() => s2.getLoginState()).then((e3) => e3 ? Promise.resolve() : s2.signInAnonymously());
  15009. } }));
  15010. }
  15011. const Ls = { tcb: St, tencent: St, aliyun: me, private: kt };
  15012. let Ns = new class {
  15013. init(e2) {
  15014. let t2 = {};
  15015. const n2 = Ls[e2.provider];
  15016. if (!n2)
  15017. throw new Error("未提供正确的provider参数");
  15018. t2 = n2.init(e2), function(e3) {
  15019. const t3 = {};
  15020. e3.__dev__ = t3, t3.debugLog = "app" === P;
  15021. const n3 = A;
  15022. n3 && !n3.code && (t3.debugInfo = n3);
  15023. const s2 = new I({ createPromise: function() {
  15024. return Rs(e3);
  15025. } });
  15026. t3.initLocalNetwork = function() {
  15027. return s2.exec();
  15028. };
  15029. }(t2), Us(t2), Rn(t2), function(e3) {
  15030. const t3 = e3.uploadFile;
  15031. e3.uploadFile = function(e4) {
  15032. return t3.call(this, e4);
  15033. };
  15034. }(t2), function(e3) {
  15035. e3.database = function(t3) {
  15036. if (t3 && Object.keys(t3).length > 0)
  15037. return e3.init(t3).database();
  15038. if (this._database)
  15039. return this._database;
  15040. const n3 = $n(Wn, { uniClient: e3 });
  15041. return this._database = n3, n3;
  15042. }, e3.databaseForJQL = function(t3) {
  15043. if (t3 && Object.keys(t3).length > 0)
  15044. return e3.init(t3).databaseForJQL();
  15045. if (this._databaseForJQL)
  15046. return this._databaseForJQL;
  15047. const n3 = $n(Wn, { uniClient: e3, isJQL: true });
  15048. return this._databaseForJQL = n3, n3;
  15049. };
  15050. }(t2), function(e3) {
  15051. e3.getCurrentUserInfo = ws, e3.chooseAndUploadFile = Is.initChooseAndUploadFile(e3), Object.assign(e3, { get mixinDatacom() {
  15052. return bs(e3);
  15053. } }), e3.SSEChannel = Os, e3.initSecureNetworkByWeixin = As(e3), e3.importObject = ks(e3);
  15054. }(t2);
  15055. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach((e3) => {
  15056. if (!t2[e3])
  15057. return;
  15058. const n3 = t2[e3];
  15059. t2[e3] = function() {
  15060. return n3.apply(t2, Array.from(arguments));
  15061. }, t2[e3] = function(e4, t3) {
  15062. return function(n4) {
  15063. let s2 = false;
  15064. if ("callFunction" === t3) {
  15065. const e5 = n4 && n4.type || u;
  15066. s2 = e5 !== u;
  15067. }
  15068. const r2 = "callFunction" === t3 && !s2, i2 = this._initPromiseHub.exec();
  15069. n4 = n4 || {};
  15070. const { success: o2, fail: a2, complete: c2 } = te(n4), h2 = i2.then(() => s2 ? Promise.resolve() : q(M(t3, "invoke"), n4)).then(() => e4.call(this, n4)).then((e5) => s2 ? Promise.resolve(e5) : q(M(t3, "success"), e5).then(() => q(M(t3, "complete"), e5)).then(() => (r2 && Y(B, { type: J, content: e5 }), Promise.resolve(e5))), (e5) => s2 ? Promise.reject(e5) : q(M(t3, "fail"), e5).then(() => q(M(t3, "complete"), e5)).then(() => (Y(B, { type: J, content: e5 }), Promise.reject(e5))));
  15071. if (!(o2 || a2 || c2))
  15072. return h2;
  15073. h2.then((e5) => {
  15074. o2 && o2(e5), c2 && c2(e5), r2 && Y(B, { type: J, content: e5 });
  15075. }, (e5) => {
  15076. a2 && a2(e5), c2 && c2(e5), r2 && Y(B, { type: J, content: e5 });
  15077. });
  15078. };
  15079. }(t2[e3], e3).bind(t2);
  15080. }), t2.init = this.init, t2;
  15081. }
  15082. }();
  15083. (() => {
  15084. const e2 = E;
  15085. let t2 = {};
  15086. if (e2 && 1 === e2.length)
  15087. t2 = e2[0], Ns = Ns.init(t2), Ns._isDefault = true;
  15088. else {
  15089. const t3 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  15090. let n2;
  15091. n2 = e2 && e2.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : "应用未关联服务空间,请在uniCloud目录右键关联服务空间", t3.forEach((e3) => {
  15092. Ns[e3] = function() {
  15093. return console.error(n2), Promise.reject(new ne({ code: "SYS_ERR", message: n2 }));
  15094. };
  15095. });
  15096. }
  15097. Object.assign(Ns, { get mixinDatacom() {
  15098. return bs(Ns);
  15099. } }), gs(Ns), Ns.addInterceptor = D, Ns.removeInterceptor = F, Ns.interceptObject = K;
  15100. })();
  15101. var Ds = Ns;
  15102. const props$m = defineMixin({
  15103. props: {
  15104. // 是否开启顶部安全区适配
  15105. safeAreaInsetTop: {
  15106. type: Boolean,
  15107. default: () => props$v.navbar.safeAreaInsetTop
  15108. },
  15109. // 固定在顶部时,是否生成一个等高元素,以防止塌陷
  15110. placeholder: {
  15111. type: Boolean,
  15112. default: () => props$v.navbar.placeholder
  15113. },
  15114. // 是否固定在顶部
  15115. fixed: {
  15116. type: Boolean,
  15117. default: () => props$v.navbar.fixed
  15118. },
  15119. // 是否显示下边框
  15120. border: {
  15121. type: Boolean,
  15122. default: () => props$v.navbar.border
  15123. },
  15124. // 左边的图标
  15125. leftIcon: {
  15126. type: String,
  15127. default: () => props$v.navbar.leftIcon
  15128. },
  15129. // 左边的提示文字
  15130. leftText: {
  15131. type: String,
  15132. default: () => props$v.navbar.leftText
  15133. },
  15134. // 左右的提示文字
  15135. rightText: {
  15136. type: String,
  15137. default: () => props$v.navbar.rightText
  15138. },
  15139. // 右边的图标
  15140. rightIcon: {
  15141. type: String,
  15142. default: () => props$v.navbar.rightIcon
  15143. },
  15144. // 标题
  15145. title: {
  15146. type: [String, Number],
  15147. default: () => props$v.navbar.title
  15148. },
  15149. // 标题颜色
  15150. titleColor: {
  15151. type: String,
  15152. default: () => props$v.navbar.titleColor
  15153. },
  15154. // 背景颜色
  15155. bgColor: {
  15156. type: String,
  15157. default: () => props$v.navbar.bgColor
  15158. },
  15159. // 标题的宽度
  15160. titleWidth: {
  15161. type: [String, Number],
  15162. default: () => props$v.navbar.titleWidth
  15163. },
  15164. // 导航栏高度
  15165. height: {
  15166. type: [String, Number],
  15167. default: () => props$v.navbar.height
  15168. },
  15169. // 左侧返回图标的大小
  15170. leftIconSize: {
  15171. type: [String, Number],
  15172. default: () => props$v.navbar.leftIconSize
  15173. },
  15174. // 左侧返回图标的颜色
  15175. leftIconColor: {
  15176. type: String,
  15177. default: () => props$v.navbar.leftIconColor
  15178. },
  15179. // 点击左侧区域(返回图标),是否自动返回上一页
  15180. autoBack: {
  15181. type: Boolean,
  15182. default: () => props$v.navbar.autoBack
  15183. },
  15184. // 标题的样式,对象或字符串
  15185. titleStyle: {
  15186. type: [String, Object],
  15187. default: () => props$v.navbar.titleStyle
  15188. }
  15189. }
  15190. });
  15191. const props$l = defineMixin({
  15192. props: {
  15193. // 标题
  15194. title: {
  15195. type: [String, Number],
  15196. default: () => props$v.cell.title
  15197. },
  15198. // 标题下方的描述信息
  15199. label: {
  15200. type: [String, Number],
  15201. default: () => props$v.cell.label
  15202. },
  15203. // 右侧的内容
  15204. value: {
  15205. type: [String, Number],
  15206. default: () => props$v.cell.value
  15207. },
  15208. // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
  15209. icon: {
  15210. type: String,
  15211. default: () => props$v.cell.icon
  15212. },
  15213. // 是否禁用cell
  15214. disabled: {
  15215. type: Boolean,
  15216. default: () => props$v.cell.disabled
  15217. },
  15218. // 是否显示下边框
  15219. border: {
  15220. type: Boolean,
  15221. default: () => props$v.cell.border
  15222. },
  15223. // 内容是否垂直居中(主要是针对右侧的value部分)
  15224. center: {
  15225. type: Boolean,
  15226. default: () => props$v.cell.center
  15227. },
  15228. // 点击后跳转的URL地址
  15229. url: {
  15230. type: String,
  15231. default: () => props$v.cell.url
  15232. },
  15233. // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作
  15234. linkType: {
  15235. type: String,
  15236. default: () => props$v.cell.linkType
  15237. },
  15238. // 是否开启点击反馈(表现为点击时加上灰色背景)
  15239. clickable: {
  15240. type: Boolean,
  15241. default: () => props$v.cell.clickable
  15242. },
  15243. // 是否展示右侧箭头并开启点击反馈
  15244. isLink: {
  15245. type: Boolean,
  15246. default: () => props$v.cell.isLink
  15247. },
  15248. // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件)
  15249. required: {
  15250. type: Boolean,
  15251. default: () => props$v.cell.required
  15252. },
  15253. // 右侧的图标箭头
  15254. rightIcon: {
  15255. type: String,
  15256. default: () => props$v.cell.rightIcon
  15257. },
  15258. // 右侧箭头的方向,可选值为:left,up,down
  15259. arrowDirection: {
  15260. type: String,
  15261. default: () => props$v.cell.arrowDirection
  15262. },
  15263. // 左侧图标样式
  15264. iconStyle: {
  15265. type: [Object, String],
  15266. default: () => {
  15267. return props$v.cell.iconStyle;
  15268. }
  15269. },
  15270. // 右侧箭头图标的样式
  15271. rightIconStyle: {
  15272. type: [Object, String],
  15273. default: () => {
  15274. return props$v.cell.rightIconStyle;
  15275. }
  15276. },
  15277. // 标题的样式
  15278. titleStyle: {
  15279. type: [Object, String],
  15280. default: () => {
  15281. return props$v.cell.titleStyle;
  15282. }
  15283. },
  15284. // 单位元的大小,可选值为large
  15285. size: {
  15286. type: String,
  15287. default: () => props$v.cell.size
  15288. },
  15289. // 点击cell是否阻止事件传播
  15290. stop: {
  15291. type: Boolean,
  15292. default: () => props$v.cell.stop
  15293. },
  15294. // 标识符,cell被点击时返回
  15295. name: {
  15296. type: [Number, String],
  15297. default: () => props$v.cell.name
  15298. }
  15299. }
  15300. });
  15301. const props$k = defineMixin({
  15302. props: {
  15303. // 分组标题
  15304. title: {
  15305. type: String,
  15306. default: () => props$v.cellGroup.title
  15307. },
  15308. // 是否显示外边框
  15309. border: {
  15310. type: Boolean,
  15311. default: () => props$v.cellGroup.border
  15312. }
  15313. }
  15314. });
  15315. const props$j = defineMixin({
  15316. props: {
  15317. // 键盘的类型,number-数字键盘,card-身份证键盘,car-车牌号键盘
  15318. mode: {
  15319. type: String,
  15320. default: () => props$v.keyboard.mode
  15321. },
  15322. // 是否显示键盘的"."符号
  15323. dotDisabled: {
  15324. type: Boolean,
  15325. default: () => props$v.keyboard.dotDisabled
  15326. },
  15327. // 是否显示顶部工具条
  15328. tooltip: {
  15329. type: Boolean,
  15330. default: () => props$v.keyboard.tooltip
  15331. },
  15332. // 是否显示工具条中间的提示
  15333. showTips: {
  15334. type: Boolean,
  15335. default: () => props$v.keyboard.showTips
  15336. },
  15337. // 工具条中间的提示文字
  15338. tips: {
  15339. type: String,
  15340. default: () => props$v.keyboard.tips
  15341. },
  15342. // 是否显示工具条左边的"取消"按钮
  15343. showCancel: {
  15344. type: Boolean,
  15345. default: () => props$v.keyboard.showCancel
  15346. },
  15347. // 是否显示工具条右边的"完成"按钮
  15348. showConfirm: {
  15349. type: Boolean,
  15350. default: () => props$v.keyboard.showConfirm
  15351. },
  15352. // 是否打乱键盘按键的顺序
  15353. random: {
  15354. type: Boolean,
  15355. default: () => props$v.keyboard.random
  15356. },
  15357. // 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距
  15358. safeAreaInsetBottom: {
  15359. type: Boolean,
  15360. default: () => props$v.keyboard.safeAreaInsetBottom
  15361. },
  15362. // 是否允许通过点击遮罩关闭键盘
  15363. closeOnClickOverlay: {
  15364. type: Boolean,
  15365. default: () => props$v.keyboard.closeOnClickOverlay
  15366. },
  15367. // 控制键盘的弹出与收起
  15368. show: {
  15369. type: Boolean,
  15370. default: () => props$v.keyboard.show
  15371. },
  15372. // 是否显示遮罩,某些时候数字键盘时,用户希望看到自己的数值,所以可能不想要遮罩
  15373. overlay: {
  15374. type: Boolean,
  15375. default: () => props$v.keyboard.overlay
  15376. },
  15377. // z-index值
  15378. zIndex: {
  15379. type: [String, Number],
  15380. default: () => props$v.keyboard.zIndex
  15381. },
  15382. // 取消按钮的文字
  15383. cancelText: {
  15384. type: String,
  15385. default: () => props$v.keyboard.cancelText
  15386. },
  15387. // 确认按钮的文字
  15388. confirmText: {
  15389. type: String,
  15390. default: () => props$v.keyboard.confirmText
  15391. },
  15392. // 输入一个中文后,是否自动切换到英文
  15393. autoChange: {
  15394. type: Boolean,
  15395. default: () => props$v.keyboard.autoChange
  15396. }
  15397. }
  15398. });
  15399. const props$i = defineMixin({
  15400. props: {
  15401. // 是否显示圆点
  15402. isDot: {
  15403. type: Boolean,
  15404. default: () => props$v.badge.isDot
  15405. },
  15406. // 显示的内容
  15407. value: {
  15408. type: [Number, String],
  15409. default: () => props$v.badge.value
  15410. },
  15411. // 显示的内容
  15412. modelValue: {
  15413. type: [Number, String],
  15414. default: () => props$v.badge.modelValue
  15415. },
  15416. // 是否显示
  15417. show: {
  15418. type: Boolean,
  15419. default: () => props$v.badge.show
  15420. },
  15421. // 最大值,超过最大值会显示 '{max}+'
  15422. max: {
  15423. type: [Number, String],
  15424. default: () => props$v.badge.max
  15425. },
  15426. // 主题类型,error|warning|success|primary
  15427. type: {
  15428. type: String,
  15429. default: () => props$v.badge.type
  15430. },
  15431. // 当数值为 0 时,是否展示 Badge
  15432. showZero: {
  15433. type: Boolean,
  15434. default: () => props$v.badge.showZero
  15435. },
  15436. // 背景颜色,优先级比type高,如设置,type参数会失效
  15437. bgColor: {
  15438. type: [String, null],
  15439. default: () => props$v.badge.bgColor
  15440. },
  15441. // 字体颜色
  15442. color: {
  15443. type: [String, null],
  15444. default: () => props$v.badge.color
  15445. },
  15446. // 徽标形状,circle-四角均为圆角,horn-左下角为直角
  15447. shape: {
  15448. type: String,
  15449. default: () => props$v.badge.shape
  15450. },
  15451. // 设置数字的显示方式,overflow|ellipsis|limit
  15452. // overflow会根据max字段判断,超出显示`${max}+`
  15453. // ellipsis会根据max判断,超出显示`${max}...`
  15454. // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
  15455. numberType: {
  15456. type: String,
  15457. default: () => props$v.badge.numberType
  15458. },
  15459. // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
  15460. offset: {
  15461. type: Array,
  15462. default: () => props$v.badge.offset
  15463. },
  15464. // 是否反转背景和字体颜色
  15465. inverted: {
  15466. type: Boolean,
  15467. default: () => props$v.badge.inverted
  15468. },
  15469. // 是否绝对定位
  15470. absolute: {
  15471. type: Boolean,
  15472. default: () => props$v.badge.absolute
  15473. }
  15474. }
  15475. });
  15476. const props$h = defineMixin({
  15477. props: {
  15478. // 滑块的移动过渡时间,单位ms
  15479. duration: {
  15480. type: Number,
  15481. default: () => props$v.tabs.duration
  15482. },
  15483. // tabs标签数组
  15484. list: {
  15485. type: Array,
  15486. default: () => props$v.tabs.list
  15487. },
  15488. // 滑块颜色
  15489. lineColor: {
  15490. type: String,
  15491. default: () => props$v.tabs.lineColor
  15492. },
  15493. // 菜单选择中时的样式
  15494. activeStyle: {
  15495. type: [String, Object],
  15496. default: () => props$v.tabs.activeStyle
  15497. },
  15498. // 菜单非选中时的样式
  15499. inactiveStyle: {
  15500. type: [String, Object],
  15501. default: () => props$v.tabs.inactiveStyle
  15502. },
  15503. // 滑块长度
  15504. lineWidth: {
  15505. type: [String, Number],
  15506. default: () => props$v.tabs.lineWidth
  15507. },
  15508. // 滑块高度
  15509. lineHeight: {
  15510. type: [String, Number],
  15511. default: () => props$v.tabs.lineHeight
  15512. },
  15513. // 滑块背景显示大小,当滑块背景设置为图片时使用
  15514. lineBgSize: {
  15515. type: String,
  15516. default: () => props$v.tabs.lineBgSize
  15517. },
  15518. // 菜单item的样式
  15519. itemStyle: {
  15520. type: [String, Object],
  15521. default: () => props$v.tabs.itemStyle
  15522. },
  15523. // 菜单是否可滚动
  15524. scrollable: {
  15525. type: Boolean,
  15526. default: () => props$v.tabs.scrollable
  15527. },
  15528. // 当前选中标签的索引
  15529. current: {
  15530. type: [Number, String],
  15531. default: () => props$v.tabs.current
  15532. },
  15533. // 默认读取的键名
  15534. keyName: {
  15535. type: String,
  15536. default: () => props$v.tabs.keyName
  15537. },
  15538. // 左侧图标样式
  15539. iconStyle: {
  15540. type: [String, Object],
  15541. default: () => props$v.tabs.iconStyle
  15542. }
  15543. }
  15544. });
  15545. const props$g = defineMixin({
  15546. props: {
  15547. // 组件状态,loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
  15548. status: {
  15549. type: String,
  15550. default: () => props$v.loadmore.status
  15551. },
  15552. // 组件背景色
  15553. bgColor: {
  15554. type: String,
  15555. default: () => props$v.loadmore.bgColor
  15556. },
  15557. // 是否显示加载中的图标
  15558. icon: {
  15559. type: Boolean,
  15560. default: () => props$v.loadmore.icon
  15561. },
  15562. // 字体大小
  15563. fontSize: {
  15564. type: [String, Number],
  15565. default: () => props$v.loadmore.fontSize
  15566. },
  15567. // 图标大小
  15568. iconSize: {
  15569. type: [String, Number],
  15570. default: () => props$v.loadmore.iconSize
  15571. },
  15572. // 字体颜色
  15573. color: {
  15574. type: String,
  15575. default: () => props$v.loadmore.color
  15576. },
  15577. // 加载中状态的图标,spinner-花朵状图标,circle-圆圈状,semicircle-半圆
  15578. loadingIcon: {
  15579. type: String,
  15580. default: () => props$v.loadmore.loadingIcon
  15581. },
  15582. // 加载前的提示语
  15583. loadmoreText: {
  15584. type: String,
  15585. default: () => props$v.loadmore.loadmoreText
  15586. },
  15587. // 加载中提示语
  15588. loadingText: {
  15589. type: String,
  15590. default: () => props$v.loadmore.loadingText
  15591. },
  15592. // 没有更多的提示语
  15593. nomoreText: {
  15594. type: String,
  15595. default: () => props$v.loadmore.nomoreText
  15596. },
  15597. // 在“没有更多”状态下,是否显示粗点
  15598. isDot: {
  15599. type: Boolean,
  15600. default: () => props$v.loadmore.isDot
  15601. },
  15602. // 加载中图标的颜色
  15603. iconColor: {
  15604. type: String,
  15605. default: () => props$v.loadmore.iconColor
  15606. },
  15607. // 上边距
  15608. marginTop: {
  15609. type: [String, Number],
  15610. default: () => props$v.loadmore.marginTop
  15611. },
  15612. // 下边距
  15613. marginBottom: {
  15614. type: [String, Number],
  15615. default: () => props$v.loadmore.marginBottom
  15616. },
  15617. // 高度,单位px
  15618. height: {
  15619. type: [String, Number],
  15620. default: () => props$v.loadmore.height
  15621. },
  15622. // 是否显示左边分割线
  15623. line: {
  15624. type: Boolean,
  15625. default: () => props$v.loadmore.line
  15626. },
  15627. // 线条颜色
  15628. lineColor: {
  15629. type: String,
  15630. default: () => props$v.loadmore.lineColor
  15631. },
  15632. // 是否虚线,true-虚线,false-实线
  15633. dashed: {
  15634. type: Boolean,
  15635. default: () => props$v.loadmore.dashed
  15636. }
  15637. }
  15638. });
  15639. const props$f = defineMixin({
  15640. props: {
  15641. modelValue: {
  15642. type: Array,
  15643. default: () => []
  15644. },
  15645. //是否禁用
  15646. disabled: {
  15647. type: Boolean,
  15648. default: false
  15649. },
  15650. disabledColor: {
  15651. type: String,
  15652. default: () => props$v.input.disabledColor
  15653. },
  15654. hasInput: {
  15655. type: Boolean,
  15656. default: false
  15657. },
  15658. placeholder: {
  15659. type: String,
  15660. default: () => "请选择"
  15661. },
  15662. // 是否展示picker弹窗
  15663. show: {
  15664. type: Boolean,
  15665. default: () => props$v.picker.show
  15666. },
  15667. // 弹出的方向,可选值为 top bottom right left center
  15668. popupMode: {
  15669. type: String,
  15670. default: () => props$v.picker.popupMode
  15671. },
  15672. // 是否展示顶部的操作栏
  15673. showToolbar: {
  15674. type: Boolean,
  15675. default: () => props$v.picker.showToolbar
  15676. },
  15677. // 顶部标题
  15678. title: {
  15679. type: String,
  15680. default: () => props$v.picker.title
  15681. },
  15682. // 对象数组,设置每一列的数据
  15683. columns: {
  15684. type: Array,
  15685. default: () => props$v.picker.columns
  15686. },
  15687. // 是否显示加载中状态
  15688. loading: {
  15689. type: Boolean,
  15690. default: () => props$v.picker.loading
  15691. },
  15692. // 各列中,单个选项的高度
  15693. itemHeight: {
  15694. type: [String, Number],
  15695. default: () => props$v.picker.itemHeight
  15696. },
  15697. // 取消按钮的文字
  15698. cancelText: {
  15699. type: String,
  15700. default: () => props$v.picker.cancelText
  15701. },
  15702. // 确认按钮的文字
  15703. confirmText: {
  15704. type: String,
  15705. default: () => props$v.picker.confirmText
  15706. },
  15707. // 取消按钮的颜色
  15708. cancelColor: {
  15709. type: String,
  15710. default: () => props$v.picker.cancelColor
  15711. },
  15712. // 确认按钮的颜色
  15713. confirmColor: {
  15714. type: String,
  15715. default: () => props$v.picker.confirmColor
  15716. },
  15717. // 每列中可见选项的数量
  15718. visibleItemCount: {
  15719. type: [String, Number],
  15720. default: () => props$v.picker.visibleItemCount
  15721. },
  15722. // 选项对象中,需要展示的属性键名
  15723. keyName: {
  15724. type: String,
  15725. default: () => props$v.picker.keyName
  15726. },
  15727. // 是否允许点击遮罩关闭选择器
  15728. closeOnClickOverlay: {
  15729. type: Boolean,
  15730. default: () => props$v.picker.closeOnClickOverlay
  15731. },
  15732. // 各列的默认索引
  15733. defaultIndex: {
  15734. type: Array,
  15735. default: () => props$v.picker.defaultIndex
  15736. },
  15737. // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
  15738. immediateChange: {
  15739. type: Boolean,
  15740. default: () => props$v.picker.immediateChange
  15741. },
  15742. // 工具栏右侧插槽是否开启
  15743. toolbarRightSlot: {
  15744. type: Boolean,
  15745. default: false
  15746. },
  15747. // 层级
  15748. zIndex: {
  15749. type: [String, Number],
  15750. default: () => props$v.picker.zIndex
  15751. }
  15752. }
  15753. });
  15754. const props$e = defineMixin({
  15755. props: {
  15756. // 占父容器宽度的多少等分,总分为12份
  15757. span: {
  15758. type: [String, Number],
  15759. default: () => props$v.col.span
  15760. },
  15761. // 指定栅格左侧的间隔数(总12栏)
  15762. offset: {
  15763. type: [String, Number],
  15764. default: () => props$v.col.offset
  15765. },
  15766. // 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`)
  15767. justify: {
  15768. type: String,
  15769. default: () => props$v.col.justify
  15770. },
  15771. // 垂直对齐方式,可选值为top、center、bottom、stretch
  15772. align: {
  15773. type: String,
  15774. default: () => props$v.col.align
  15775. },
  15776. // 文字对齐方式
  15777. textAlign: {
  15778. type: String,
  15779. default: () => props$v.col.textAlign
  15780. }
  15781. }
  15782. });
  15783. const props$d = defineMixin({
  15784. props: {
  15785. // 给col添加间距,左右边距各占一半
  15786. gutter: {
  15787. type: [String, Number],
  15788. default: () => props$v.row.gutter
  15789. },
  15790. // 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`)
  15791. justify: {
  15792. type: String,
  15793. default: () => props$v.row.justify
  15794. },
  15795. // 垂直对齐方式,可选值为top、center、bottom
  15796. align: {
  15797. type: String,
  15798. default: () => props$v.row.align
  15799. }
  15800. }
  15801. });
  15802. const props$c = defineMixin({
  15803. props: {
  15804. // 是否显示组件
  15805. show: {
  15806. type: Boolean,
  15807. default: () => props$v.loadingIcon.show
  15808. },
  15809. // 颜色
  15810. color: {
  15811. type: String,
  15812. default: () => props$v.loadingIcon.color
  15813. },
  15814. // 提示文字颜色
  15815. textColor: {
  15816. type: String,
  15817. default: () => props$v.loadingIcon.textColor
  15818. },
  15819. // 文字和图标是否垂直排列
  15820. vertical: {
  15821. type: Boolean,
  15822. default: () => props$v.loadingIcon.vertical
  15823. },
  15824. // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
  15825. mode: {
  15826. type: String,
  15827. default: () => props$v.loadingIcon.mode
  15828. },
  15829. // 图标大小,单位默认px
  15830. size: {
  15831. type: [String, Number],
  15832. default: () => props$v.loadingIcon.size
  15833. },
  15834. // 文字大小
  15835. textSize: {
  15836. type: [String, Number],
  15837. default: () => props$v.loadingIcon.textSize
  15838. },
  15839. // 文字内容
  15840. text: {
  15841. type: [String, Number],
  15842. default: () => props$v.loadingIcon.text
  15843. },
  15844. // 动画模式
  15845. timingFunction: {
  15846. type: String,
  15847. default: () => props$v.loadingIcon.timingFunction
  15848. },
  15849. // 动画执行周期时间
  15850. duration: {
  15851. type: [String, Number],
  15852. default: () => props$v.loadingIcon.duration
  15853. },
  15854. // mode=circle时的暗边颜色
  15855. inactiveColor: {
  15856. type: String,
  15857. default: () => props$v.loadingIcon.inactiveColor
  15858. }
  15859. }
  15860. });
  15861. const props$b = defineMixin({
  15862. props: {
  15863. // 轮播的长度
  15864. length: {
  15865. type: [String, Number],
  15866. default: () => props$v.swiperIndicator.length
  15867. },
  15868. // 当前处于活动状态的轮播的索引
  15869. current: {
  15870. type: [String, Number],
  15871. default: () => props$v.swiperIndicator.current
  15872. },
  15873. // 指示器非激活颜色
  15874. indicatorActiveColor: {
  15875. type: String,
  15876. default: () => props$v.swiperIndicator.indicatorActiveColor
  15877. },
  15878. // 指示器的激活颜色
  15879. indicatorInactiveColor: {
  15880. type: String,
  15881. default: () => props$v.swiperIndicator.indicatorInactiveColor
  15882. },
  15883. // 指示器模式,line-线型,dot-点型
  15884. indicatorMode: {
  15885. type: String,
  15886. default: () => props$v.swiperIndicator.indicatorMode
  15887. }
  15888. }
  15889. });
  15890. const props$a = defineMixin({
  15891. props: {
  15892. // 背景颜色(默认transparent)
  15893. bgColor: {
  15894. type: String,
  15895. default: () => props$v.gap.bgColor
  15896. },
  15897. // 分割槽高度,单位px(默认30)
  15898. height: {
  15899. type: [String, Number],
  15900. default: () => props$v.gap.height
  15901. },
  15902. // 与上一个组件的距离
  15903. marginTop: {
  15904. type: [String, Number],
  15905. default: () => props$v.gap.marginTop
  15906. },
  15907. // 与下一个组件的距离
  15908. marginBottom: {
  15909. type: [String, Number],
  15910. default: () => props$v.gap.marginBottom
  15911. }
  15912. }
  15913. });
  15914. const props$9 = defineMixin({
  15915. props: {
  15916. // 是否显示遮罩
  15917. show: {
  15918. type: Boolean,
  15919. default: () => props$v.overlay.show
  15920. },
  15921. // 层级z-index
  15922. zIndex: {
  15923. type: [String, Number],
  15924. default: () => props$v.overlay.zIndex
  15925. },
  15926. // 遮罩的过渡时间,单位为ms
  15927. duration: {
  15928. type: [String, Number],
  15929. default: () => props$v.overlay.duration
  15930. },
  15931. // 不透明度值,当做rgba的第四个参数
  15932. opacity: {
  15933. type: [String, Number],
  15934. default: () => props$v.overlay.opacity
  15935. }
  15936. }
  15937. });
  15938. const props$8 = defineMixin({
  15939. props: {
  15940. // 主题颜色
  15941. type: {
  15942. type: String,
  15943. default: () => props$v.text.type
  15944. },
  15945. // 是否显示
  15946. show: {
  15947. type: Boolean,
  15948. default: () => props$v.text.show
  15949. },
  15950. // 显示的值
  15951. text: {
  15952. type: [String, Number],
  15953. default: () => props$v.text.text
  15954. },
  15955. // 前置图标
  15956. prefixIcon: {
  15957. type: String,
  15958. default: () => props$v.text.prefixIcon
  15959. },
  15960. // 后置图标
  15961. suffixIcon: {
  15962. type: String,
  15963. default: () => props$v.text.suffixIcon
  15964. },
  15965. // 文本处理的匹配模式
  15966. // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
  15967. mode: {
  15968. type: String,
  15969. default: () => props$v.text.mode
  15970. },
  15971. // mode=link下,配置的链接
  15972. href: {
  15973. type: String,
  15974. default: () => props$v.text.href
  15975. },
  15976. // 格式化规则
  15977. format: {
  15978. type: [String, Function],
  15979. default: () => props$v.text.format
  15980. },
  15981. // mode=phone时,点击文本是否拨打电话
  15982. call: {
  15983. type: Boolean,
  15984. default: () => props$v.text.call
  15985. },
  15986. // 小程序的打开方式
  15987. openType: {
  15988. type: String,
  15989. default: () => props$v.text.openType
  15990. },
  15991. // 是否粗体,默认normal
  15992. bold: {
  15993. type: Boolean,
  15994. default: () => props$v.text.bold
  15995. },
  15996. // 是否块状
  15997. block: {
  15998. type: Boolean,
  15999. default: () => props$v.text.block
  16000. },
  16001. // 文本显示的行数,如果设置,超出此行数,将会显示省略号
  16002. lines: {
  16003. type: [String, Number],
  16004. default: () => props$v.text.lines
  16005. },
  16006. // 文本颜色
  16007. color: {
  16008. type: String,
  16009. default: () => props$v.text.color
  16010. },
  16011. // 字体大小
  16012. size: {
  16013. type: [String, Number],
  16014. default: () => props$v.text.size
  16015. },
  16016. // 图标的样式
  16017. iconStyle: {
  16018. type: [Object, String],
  16019. default: () => props$v.text.iconStyle
  16020. },
  16021. // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
  16022. decoration: {
  16023. tepe: String,
  16024. default: () => props$v.text.decoration
  16025. },
  16026. // 外边距,对象、字符串,数值形式均可
  16027. margin: {
  16028. type: [Object, String, Number],
  16029. default: () => props$v.text.margin
  16030. },
  16031. // 文本行高
  16032. lineHeight: {
  16033. type: [String, Number],
  16034. default: () => props$v.text.lineHeight
  16035. },
  16036. // 文本对齐方式,可选值left|center|right
  16037. align: {
  16038. type: String,
  16039. default: () => props$v.text.align
  16040. },
  16041. // 文字换行,可选值break-word|normal|anywhere
  16042. wordWrap: {
  16043. type: String,
  16044. default: () => props$v.text.wordWrap
  16045. },
  16046. // 占满剩余空间
  16047. flex1: {
  16048. type: Boolean,
  16049. default: () => props$v.text.flex1
  16050. }
  16051. }
  16052. });
  16053. const value = {
  16054. computed: {
  16055. // 经处理后需要显示的值
  16056. value() {
  16057. const {
  16058. text,
  16059. mode,
  16060. format,
  16061. href
  16062. } = this;
  16063. if (mode === "price") {
  16064. if (!/^\d+(\.\d+)?$/.test(text)) {
  16065. error("金额模式下,text参数需要为金额格式");
  16066. }
  16067. if (test.func(format)) {
  16068. return format(text);
  16069. }
  16070. return priceFormat(text, 2);
  16071. }
  16072. if (mode === "date") {
  16073. !test.date(text) && error("日期模式下,text参数需要为日期或时间戳格式");
  16074. if (test.func(format)) {
  16075. return format(text);
  16076. }
  16077. if (format) {
  16078. return timeFormat(text, format);
  16079. }
  16080. return timeFormat(text, "yyyy-mm-dd");
  16081. }
  16082. if (mode === "phone") {
  16083. if (test.func(format)) {
  16084. return format(text);
  16085. }
  16086. if (format === "encrypt") {
  16087. return `${text.substr(0, 3)}****${text.substr(7)}`;
  16088. }
  16089. return text;
  16090. }
  16091. if (mode === "name") {
  16092. !(typeof text === "string") && error("姓名模式下,text参数需要为字符串格式");
  16093. if (test.func(format)) {
  16094. return format(text);
  16095. }
  16096. if (format === "encrypt") {
  16097. return this.formatName(text);
  16098. }
  16099. return text;
  16100. }
  16101. if (mode === "link") {
  16102. !test.url(href) && error("超链接模式下,href参数需要为URL格式");
  16103. return text;
  16104. }
  16105. return text;
  16106. }
  16107. },
  16108. methods: {
  16109. // 默认的姓名脱敏规则
  16110. formatName(name) {
  16111. let value2 = "";
  16112. if (name.length === 2) {
  16113. value2 = name.substr(0, 1) + "*";
  16114. } else if (name.length > 2) {
  16115. let char = "";
  16116. for (let i2 = 0, len = name.length - 2; i2 < len; i2++) {
  16117. char += "*";
  16118. }
  16119. value2 = name.substr(0, 1) + char + name.substr(-1, 1);
  16120. } else {
  16121. value2 = name;
  16122. }
  16123. return value2;
  16124. }
  16125. }
  16126. };
  16127. const props$7 = defineMixin({
  16128. props: {
  16129. bgColor: {
  16130. type: String,
  16131. default: () => props$v.statusBar.bgColor
  16132. }
  16133. }
  16134. });
  16135. const props$6 = defineMixin({
  16136. props: {}
  16137. });
  16138. const props$5 = defineMixin({
  16139. props: {
  16140. // 是否展示组件
  16141. show: {
  16142. type: Boolean,
  16143. default: () => props$v.transition.show
  16144. },
  16145. // 使用的动画模式
  16146. mode: {
  16147. type: String,
  16148. default: () => props$v.transition.mode
  16149. },
  16150. // 动画的执行时间,单位ms
  16151. duration: {
  16152. type: [String, Number],
  16153. default: () => props$v.transition.duration
  16154. },
  16155. // 使用的动画过渡函数
  16156. timingFunction: {
  16157. type: String,
  16158. default: () => props$v.transition.timingFunction
  16159. }
  16160. }
  16161. });
  16162. const getClassNames = (name) => ({
  16163. enter: `u-${name}-enter u-${name}-enter-active`,
  16164. "enter-to": `u-${name}-enter-to u-${name}-enter-active`,
  16165. leave: `u-${name}-leave u-${name}-leave-active`,
  16166. "leave-to": `u-${name}-leave-to u-${name}-leave-active`
  16167. });
  16168. const transitionMixin = {
  16169. methods: {
  16170. // 组件被点击发出事件
  16171. clickHandler() {
  16172. this.$emit("click");
  16173. },
  16174. // vue版本的组件进场处理
  16175. async vueEnter() {
  16176. const classNames = getClassNames(this.mode);
  16177. this.status = "enter";
  16178. this.$emit("beforeEnter");
  16179. this.inited = true;
  16180. this.display = true;
  16181. this.classes = classNames.enter;
  16182. await nextTick$1();
  16183. {
  16184. await sleep(20);
  16185. this.$emit("enter");
  16186. this.transitionEnded = false;
  16187. this.$emit("afterEnter");
  16188. this.classes = classNames["enter-to"];
  16189. }
  16190. },
  16191. // 动画离场处理
  16192. async vueLeave() {
  16193. if (!this.display)
  16194. return;
  16195. const classNames = getClassNames(this.mode);
  16196. this.status = "leave";
  16197. this.$emit("beforeLeave");
  16198. this.classes = classNames.leave;
  16199. await nextTick$1();
  16200. {
  16201. this.transitionEnded = false;
  16202. this.$emit("leave");
  16203. setTimeout(this.onTransitionEnd, this.duration);
  16204. this.classes = classNames["leave-to"];
  16205. }
  16206. },
  16207. // 完成过渡后触发
  16208. onTransitionEnd() {
  16209. if (this.transitionEnded)
  16210. return;
  16211. this.transitionEnded = true;
  16212. this.$emit(this.status === "leave" ? "afterLeave" : "afterEnter");
  16213. if (!this.show && this.display) {
  16214. this.display = false;
  16215. this.inited = false;
  16216. }
  16217. }
  16218. }
  16219. };
  16220. const props$4 = defineMixin({
  16221. props: {
  16222. color: {
  16223. type: String,
  16224. default: () => props$v.line.color
  16225. },
  16226. // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
  16227. length: {
  16228. type: [String, Number],
  16229. default: () => props$v.line.length
  16230. },
  16231. // 线条方向,col-竖向,row-横向
  16232. direction: {
  16233. type: String,
  16234. default: () => props$v.line.direction
  16235. },
  16236. // 是否显示细边框
  16237. hairline: {
  16238. type: Boolean,
  16239. default: () => props$v.line.hairline
  16240. },
  16241. // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
  16242. margin: {
  16243. type: [String, Number],
  16244. default: () => props$v.line.margin
  16245. },
  16246. // 是否虚线,true-虚线,false-实线
  16247. dashed: {
  16248. type: Boolean,
  16249. default: () => props$v.line.dashed
  16250. }
  16251. }
  16252. });
  16253. const props$3 = defineMixin({
  16254. props: {
  16255. // 键盘的类型,number-数字键盘,card-身份证键盘
  16256. mode: {
  16257. type: String,
  16258. default: () => props$v.numberKeyboard.value
  16259. },
  16260. // 是否显示键盘的"."符号
  16261. dotDisabled: {
  16262. type: Boolean,
  16263. default: () => props$v.numberKeyboard.dotDisabled
  16264. },
  16265. // 是否打乱键盘按键的顺序
  16266. random: {
  16267. type: Boolean,
  16268. default: () => props$v.numberKeyboard.random
  16269. }
  16270. }
  16271. });
  16272. const props$2 = defineMixin({
  16273. props: {
  16274. // 是否打乱键盘按键的顺序
  16275. random: {
  16276. type: Boolean,
  16277. default: false
  16278. },
  16279. // 输入一个中文后,是否自动切换到英文
  16280. autoChange: {
  16281. type: Boolean,
  16282. default: false
  16283. }
  16284. }
  16285. });
  16286. const props$1 = defineMixin({
  16287. props: {
  16288. // 是否展示工具条
  16289. show: {
  16290. type: Boolean,
  16291. default: () => props$v.toolbar.show
  16292. },
  16293. // 取消按钮的文字
  16294. cancelText: {
  16295. type: String,
  16296. default: () => props$v.toolbar.cancelText
  16297. },
  16298. // 确认按钮的文字
  16299. confirmText: {
  16300. type: String,
  16301. default: () => props$v.toolbar.confirmText
  16302. },
  16303. // 取消按钮的颜色
  16304. cancelColor: {
  16305. type: String,
  16306. default: () => props$v.toolbar.cancelColor
  16307. },
  16308. // 确认按钮的颜色
  16309. confirmColor: {
  16310. type: String,
  16311. default: () => props$v.toolbar.confirmColor
  16312. },
  16313. // 标题文字
  16314. title: {
  16315. type: String,
  16316. default: () => props$v.toolbar.title
  16317. },
  16318. // 开启右侧插槽
  16319. rightSlot: {
  16320. type: Boolean,
  16321. default: false
  16322. }
  16323. }
  16324. });
  16325. const props = defineMixin({
  16326. props: {
  16327. // 文字颜色
  16328. color: {
  16329. type: String,
  16330. default: () => props$v.link.color
  16331. },
  16332. // 字体大小,单位px
  16333. fontSize: {
  16334. type: [String, Number],
  16335. default: () => props$v.link.fontSize
  16336. },
  16337. // 是否显示下划线
  16338. underLine: {
  16339. type: Boolean,
  16340. default: () => props$v.link.underLine
  16341. },
  16342. // 要跳转的链接
  16343. href: {
  16344. type: String,
  16345. default: () => props$v.link.href
  16346. },
  16347. // 小程序中复制到粘贴板的提示语
  16348. mpTips: {
  16349. type: String,
  16350. default: () => props$v.link.mpTips
  16351. },
  16352. // 下划线颜色
  16353. lineColor: {
  16354. type: String,
  16355. default: () => props$v.link.lineColor
  16356. },
  16357. // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
  16358. text: {
  16359. type: String,
  16360. default: () => props$v.link.text
  16361. }
  16362. }
  16363. });
  16364. exports.Ds = Ds;
  16365. exports._export_sfc = _export_sfc;
  16366. exports.addStyle = addStyle;
  16367. exports.addUnit = addUnit;
  16368. exports.buttonMixin = buttonMixin;
  16369. exports.color = color$3;
  16370. exports.colorGradient = colorGradient;
  16371. exports.computed = computed;
  16372. exports.config = config;
  16373. exports.createSSRApp = createSSRApp;
  16374. exports.createStore = createStore;
  16375. exports.deepClone = deepClone;
  16376. exports.deepMerge = deepMerge$1;
  16377. exports.defineComponent = defineComponent;
  16378. exports.e = e;
  16379. exports.error = error;
  16380. exports.f = f$1;
  16381. exports.formValidate = formValidate;
  16382. exports.getPx = getPx;
  16383. exports.getWindowInfo = getWindowInfo;
  16384. exports.hexToRgb = hexToRgb;
  16385. exports.icons = icons;
  16386. exports.index = index$1;
  16387. exports.initVueI18n = initVueI18n;
  16388. exports.mixin = mixin;
  16389. exports.mpMixin = mpMixin;
  16390. exports.n = n$1;
  16391. exports.o = o$1;
  16392. exports.onMounted = onMounted;
  16393. exports.openType = openType;
  16394. exports.p = p$1;
  16395. exports.props = props$u;
  16396. exports.props$1 = props$t;
  16397. exports.props$10 = props$k;
  16398. exports.props$11 = props$j;
  16399. exports.props$12 = props$i;
  16400. exports.props$13 = props$h;
  16401. exports.props$14 = props$v;
  16402. exports.props$15 = props$g;
  16403. exports.props$16 = props$f;
  16404. exports.props$17 = props$e;
  16405. exports.props$18 = props$d;
  16406. exports.props$19 = props$c;
  16407. exports.props$2 = props$s;
  16408. exports.props$20 = props$b;
  16409. exports.props$21 = props$a;
  16410. exports.props$22 = props$9;
  16411. exports.props$23 = props$8;
  16412. exports.props$24 = props$7;
  16413. exports.props$25 = props$6;
  16414. exports.props$26 = props$5;
  16415. exports.props$27 = props$4;
  16416. exports.props$28 = props$3;
  16417. exports.props$29 = props$2;
  16418. exports.props$3 = props$r;
  16419. exports.props$30 = props$1;
  16420. exports.props$31 = props;
  16421. exports.props$4 = props$q;
  16422. exports.props$5 = props$p;
  16423. exports.props$6 = props$o;
  16424. exports.props$7 = props$n;
  16425. exports.props$8 = props$m;
  16426. exports.props$9 = props$l;
  16427. exports.r = r$1;
  16428. exports.random = random;
  16429. exports.randomArray = randomArray;
  16430. exports.reactive = reactive;
  16431. exports.ref = ref;
  16432. exports.resolveComponent = resolveComponent;
  16433. exports.s = s$1;
  16434. exports.sleep = sleep;
  16435. exports.sr = sr;
  16436. exports.t = t$1;
  16437. exports.test = test;
  16438. exports.throttle = throttle;
  16439. exports.toast = toast;
  16440. exports.transitionMixin = transitionMixin;
  16441. exports.type2icon = type2icon;
  16442. exports.unref = unref;
  16443. exports.useCssVars = useCssVars;
  16444. exports.useRouter = useRouter;
  16445. exports.uviewPlus = uviewPlus;
  16446. exports.value = value;
  16447. exports.wx$1 = wx$1;