vendor.js 293 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!*********************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  5. \*********************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", {
  10. value: true
  11. });
  12. exports.default = void 0;
  13. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  14. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  15. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  16. return this;
  17. }();
  18. var key = ['w', 'x'].join('');
  19. var oldWx = target[key];
  20. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  21. function isWxKey(key) {
  22. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  23. return false;
  24. }
  25. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  26. }
  27. function initWx() {
  28. var newWx = {};
  29. for (var _key in oldWx) {
  30. if (isWxKey(_key)) {
  31. // TODO wrapper function
  32. newWx[_key] = oldWx[_key];
  33. }
  34. }
  35. return newWx;
  36. }
  37. target[key] = initWx();
  38. var _default = target[key];
  39. exports.default = _default;
  40. /***/ }),
  41. /***/ 10:
  42. /*!****************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  44. \****************************************************************/
  45. /*! no static exports found */
  46. /***/ (function(module, exports) {
  47. function _nonIterableRest() {
  48. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  49. }
  50. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  51. /***/ }),
  52. /***/ 11:
  53. /*!***************************************************************!*\
  54. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  55. \***************************************************************/
  56. /*! no static exports found */
  57. /***/ (function(module, exports, __webpack_require__) {
  58. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  59. function _defineProperty(obj, key, value) {
  60. key = toPropertyKey(key);
  61. if (key in obj) {
  62. Object.defineProperty(obj, key, {
  63. value: value,
  64. enumerable: true,
  65. configurable: true,
  66. writable: true
  67. });
  68. } else {
  69. obj[key] = value;
  70. }
  71. return obj;
  72. }
  73. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  74. /***/ }),
  75. /***/ 12:
  76. /*!**************************************************************!*\
  77. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  78. \**************************************************************/
  79. /*! no static exports found */
  80. /***/ (function(module, exports, __webpack_require__) {
  81. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  82. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  83. function _toPropertyKey(arg) {
  84. var key = toPrimitive(arg, "string");
  85. return _typeof(key) === "symbol" ? key : String(key);
  86. }
  87. module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  88. /***/ }),
  89. /***/ 13:
  90. /*!*******************************************************!*\
  91. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  92. \*******************************************************/
  93. /*! no static exports found */
  94. /***/ (function(module, exports) {
  95. function _typeof(obj) {
  96. "@babel/helpers - typeof";
  97. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  98. return typeof obj;
  99. } : function (obj) {
  100. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  101. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
  102. }
  103. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  104. /***/ }),
  105. /***/ 14:
  106. /*!************************************************************!*\
  107. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  108. \************************************************************/
  109. /*! no static exports found */
  110. /***/ (function(module, exports, __webpack_require__) {
  111. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  112. function _toPrimitive(input, hint) {
  113. if (_typeof(input) !== "object" || input === null) return input;
  114. var prim = input[Symbol.toPrimitive];
  115. if (prim !== undefined) {
  116. var res = prim.call(input, hint || "default");
  117. if (_typeof(res) !== "object") return res;
  118. throw new TypeError("@@toPrimitive must return a primitive value.");
  119. }
  120. return (hint === "string" ? String : Number)(input);
  121. }
  122. module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  123. /***/ }),
  124. /***/ 146:
  125. /*!************************************************************************************************************************!*\
  126. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/node_modules/@dcloudio/uni-ui/lib/uni-search-bar/i18n/index.js ***!
  127. \************************************************************************************************************************/
  128. /*! no static exports found */
  129. /***/ (function(module, exports, __webpack_require__) {
  130. "use strict";
  131. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  132. Object.defineProperty(exports, "__esModule", {
  133. value: true
  134. });
  135. exports.default = void 0;
  136. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 147));
  137. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 148));
  138. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 149));
  139. var _default = {
  140. en: _en.default,
  141. 'zh-Hans': _zhHans.default,
  142. 'zh-Hant': _zhHant.default
  143. };
  144. exports.default = _default;
  145. /***/ }),
  146. /***/ 147:
  147. /*!***********************************************************************************************************************!*\
  148. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/node_modules/@dcloudio/uni-ui/lib/uni-search-bar/i18n/en.json ***!
  149. \***********************************************************************************************************************/
  150. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  151. /***/ (function(module) {
  152. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"cancel\",\"uni-search-bar.placeholder\":\"Search enter content\"}");
  153. /***/ }),
  154. /***/ 148:
  155. /*!****************************************************************************************************************************!*\
  156. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/node_modules/@dcloudio/uni-ui/lib/uni-search-bar/i18n/zh-Hans.json ***!
  157. \****************************************************************************************************************************/
  158. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  159. /***/ (function(module) {
  160. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"取消\",\"uni-search-bar.placeholder\":\"请输入搜索内容\"}");
  161. /***/ }),
  162. /***/ 149:
  163. /*!****************************************************************************************************************************!*\
  164. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/node_modules/@dcloudio/uni-ui/lib/uni-search-bar/i18n/zh-Hant.json ***!
  165. \****************************************************************************************************************************/
  166. /*! exports provided: uni-search-bar.cancel, uni-search-bar.placeholder, default */
  167. /***/ (function(module) {
  168. module.exports = JSON.parse("{\"uni-search-bar.cancel\":\"取消\",\"uni-search-bar.placeholder\":\"請輸入搜索內容\"}");
  169. /***/ }),
  170. /***/ 15:
  171. /*!**********************************************************!*\
  172. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  173. \**********************************************************/
  174. /*! no static exports found */
  175. /***/ (function(module, exports, __webpack_require__) {
  176. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  177. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  178. function _construct(Parent, args, Class) {
  179. if (isNativeReflectConstruct()) {
  180. module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
  181. } else {
  182. module.exports = _construct = function _construct(Parent, args, Class) {
  183. var a = [null];
  184. a.push.apply(a, args);
  185. var Constructor = Function.bind.apply(Parent, a);
  186. var instance = new Constructor();
  187. if (Class) setPrototypeOf(instance, Class.prototype);
  188. return instance;
  189. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  190. }
  191. return _construct.apply(null, arguments);
  192. }
  193. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  194. /***/ }),
  195. /***/ 16:
  196. /*!***************************************************************!*\
  197. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  198. \***************************************************************/
  199. /*! no static exports found */
  200. /***/ (function(module, exports) {
  201. function _setPrototypeOf(o, p) {
  202. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  203. o.__proto__ = p;
  204. return o;
  205. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  206. return _setPrototypeOf(o, p);
  207. }
  208. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  209. /***/ }),
  210. /***/ 17:
  211. /*!*************************************************************************!*\
  212. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  213. \*************************************************************************/
  214. /*! no static exports found */
  215. /***/ (function(module, exports) {
  216. function _isNativeReflectConstruct() {
  217. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  218. if (Reflect.construct.sham) return false;
  219. if (typeof Proxy === "function") return true;
  220. try {
  221. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  222. return true;
  223. } catch (e) {
  224. return false;
  225. }
  226. }
  227. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  228. /***/ }),
  229. /***/ 18:
  230. /*!******************************************************************!*\
  231. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  232. \******************************************************************/
  233. /*! no static exports found */
  234. /***/ (function(module, exports, __webpack_require__) {
  235. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  236. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  237. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  238. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  239. function _toConsumableArray(arr) {
  240. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  241. }
  242. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  243. /***/ }),
  244. /***/ 185:
  245. /*!**************************************************************************************************************!*\
  246. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/node_modules/@dcloudio/uni-ui/lib/uni-icons/icons.js ***!
  247. \**************************************************************************************************************/
  248. /*! no static exports found */
  249. /***/ (function(module, exports, __webpack_require__) {
  250. "use strict";
  251. Object.defineProperty(exports, "__esModule", {
  252. value: true
  253. });
  254. exports.default = void 0;
  255. var _default = {
  256. "id": "2852637",
  257. "name": "uniui图标库",
  258. "font_family": "uniicons",
  259. "css_prefix_text": "uniui-",
  260. "description": "",
  261. "glyphs": [{
  262. "icon_id": "25027049",
  263. "name": "yanse",
  264. "font_class": "color",
  265. "unicode": "e6cf",
  266. "unicode_decimal": 59087
  267. }, {
  268. "icon_id": "25027048",
  269. "name": "wallet",
  270. "font_class": "wallet",
  271. "unicode": "e6b1",
  272. "unicode_decimal": 59057
  273. }, {
  274. "icon_id": "25015720",
  275. "name": "settings-filled",
  276. "font_class": "settings-filled",
  277. "unicode": "e6ce",
  278. "unicode_decimal": 59086
  279. }, {
  280. "icon_id": "25015434",
  281. "name": "shimingrenzheng-filled",
  282. "font_class": "auth-filled",
  283. "unicode": "e6cc",
  284. "unicode_decimal": 59084
  285. }, {
  286. "icon_id": "24934246",
  287. "name": "shop-filled",
  288. "font_class": "shop-filled",
  289. "unicode": "e6cd",
  290. "unicode_decimal": 59085
  291. }, {
  292. "icon_id": "24934159",
  293. "name": "staff-filled-01",
  294. "font_class": "staff-filled",
  295. "unicode": "e6cb",
  296. "unicode_decimal": 59083
  297. }, {
  298. "icon_id": "24932461",
  299. "name": "VIP-filled",
  300. "font_class": "vip-filled",
  301. "unicode": "e6c6",
  302. "unicode_decimal": 59078
  303. }, {
  304. "icon_id": "24932462",
  305. "name": "plus_circle_fill",
  306. "font_class": "plus-filled",
  307. "unicode": "e6c7",
  308. "unicode_decimal": 59079
  309. }, {
  310. "icon_id": "24932463",
  311. "name": "folder_add-filled",
  312. "font_class": "folder-add-filled",
  313. "unicode": "e6c8",
  314. "unicode_decimal": 59080
  315. }, {
  316. "icon_id": "24932464",
  317. "name": "yanse-filled",
  318. "font_class": "color-filled",
  319. "unicode": "e6c9",
  320. "unicode_decimal": 59081
  321. }, {
  322. "icon_id": "24932465",
  323. "name": "tune-filled",
  324. "font_class": "tune-filled",
  325. "unicode": "e6ca",
  326. "unicode_decimal": 59082
  327. }, {
  328. "icon_id": "24932455",
  329. "name": "a-rilidaka-filled",
  330. "font_class": "calendar-filled",
  331. "unicode": "e6c0",
  332. "unicode_decimal": 59072
  333. }, {
  334. "icon_id": "24932456",
  335. "name": "notification-filled",
  336. "font_class": "notification-filled",
  337. "unicode": "e6c1",
  338. "unicode_decimal": 59073
  339. }, {
  340. "icon_id": "24932457",
  341. "name": "wallet-filled",
  342. "font_class": "wallet-filled",
  343. "unicode": "e6c2",
  344. "unicode_decimal": 59074
  345. }, {
  346. "icon_id": "24932458",
  347. "name": "paihangbang-filled",
  348. "font_class": "medal-filled",
  349. "unicode": "e6c3",
  350. "unicode_decimal": 59075
  351. }, {
  352. "icon_id": "24932459",
  353. "name": "gift-filled",
  354. "font_class": "gift-filled",
  355. "unicode": "e6c4",
  356. "unicode_decimal": 59076
  357. }, {
  358. "icon_id": "24932460",
  359. "name": "fire-filled",
  360. "font_class": "fire-filled",
  361. "unicode": "e6c5",
  362. "unicode_decimal": 59077
  363. }, {
  364. "icon_id": "24928001",
  365. "name": "refreshempty",
  366. "font_class": "refreshempty",
  367. "unicode": "e6bf",
  368. "unicode_decimal": 59071
  369. }, {
  370. "icon_id": "24926853",
  371. "name": "location-ellipse",
  372. "font_class": "location-filled",
  373. "unicode": "e6af",
  374. "unicode_decimal": 59055
  375. }, {
  376. "icon_id": "24926735",
  377. "name": "person-filled",
  378. "font_class": "person-filled",
  379. "unicode": "e69d",
  380. "unicode_decimal": 59037
  381. }, {
  382. "icon_id": "24926703",
  383. "name": "personadd-filled",
  384. "font_class": "personadd-filled",
  385. "unicode": "e698",
  386. "unicode_decimal": 59032
  387. }, {
  388. "icon_id": "24923351",
  389. "name": "back",
  390. "font_class": "back",
  391. "unicode": "e6b9",
  392. "unicode_decimal": 59065
  393. }, {
  394. "icon_id": "24923352",
  395. "name": "forward",
  396. "font_class": "forward",
  397. "unicode": "e6ba",
  398. "unicode_decimal": 59066
  399. }, {
  400. "icon_id": "24923353",
  401. "name": "arrowthinright",
  402. "font_class": "arrow-right",
  403. "unicode": "e6bb",
  404. "unicode_decimal": 59067
  405. }, {
  406. "icon_id": "24923353",
  407. "name": "arrowthinright",
  408. "font_class": "arrowthinright",
  409. "unicode": "e6bb",
  410. "unicode_decimal": 59067
  411. }, {
  412. "icon_id": "24923354",
  413. "name": "arrowthinleft",
  414. "font_class": "arrow-left",
  415. "unicode": "e6bc",
  416. "unicode_decimal": 59068
  417. }, {
  418. "icon_id": "24923354",
  419. "name": "arrowthinleft",
  420. "font_class": "arrowthinleft",
  421. "unicode": "e6bc",
  422. "unicode_decimal": 59068
  423. }, {
  424. "icon_id": "24923355",
  425. "name": "arrowthinup",
  426. "font_class": "arrow-up",
  427. "unicode": "e6bd",
  428. "unicode_decimal": 59069
  429. }, {
  430. "icon_id": "24923355",
  431. "name": "arrowthinup",
  432. "font_class": "arrowthinup",
  433. "unicode": "e6bd",
  434. "unicode_decimal": 59069
  435. }, {
  436. "icon_id": "24923356",
  437. "name": "arrowthindown",
  438. "font_class": "arrow-down",
  439. "unicode": "e6be",
  440. "unicode_decimal": 59070
  441. }, {
  442. "icon_id": "24923356",
  443. "name": "arrowthindown",
  444. "font_class": "arrowthindown",
  445. "unicode": "e6be",
  446. "unicode_decimal": 59070
  447. }, {
  448. "icon_id": "24923349",
  449. "name": "arrowdown",
  450. "font_class": "bottom",
  451. "unicode": "e6b8",
  452. "unicode_decimal": 59064
  453. }, {
  454. "icon_id": "24923349",
  455. "name": "arrowdown",
  456. "font_class": "arrowdown",
  457. "unicode": "e6b8",
  458. "unicode_decimal": 59064
  459. }, {
  460. "icon_id": "24923346",
  461. "name": "arrowright",
  462. "font_class": "right",
  463. "unicode": "e6b5",
  464. "unicode_decimal": 59061
  465. }, {
  466. "icon_id": "24923346",
  467. "name": "arrowright",
  468. "font_class": "arrowright",
  469. "unicode": "e6b5",
  470. "unicode_decimal": 59061
  471. }, {
  472. "icon_id": "24923347",
  473. "name": "arrowup",
  474. "font_class": "top",
  475. "unicode": "e6b6",
  476. "unicode_decimal": 59062
  477. }, {
  478. "icon_id": "24923347",
  479. "name": "arrowup",
  480. "font_class": "arrowup",
  481. "unicode": "e6b6",
  482. "unicode_decimal": 59062
  483. }, {
  484. "icon_id": "24923348",
  485. "name": "arrowleft",
  486. "font_class": "left",
  487. "unicode": "e6b7",
  488. "unicode_decimal": 59063
  489. }, {
  490. "icon_id": "24923348",
  491. "name": "arrowleft",
  492. "font_class": "arrowleft",
  493. "unicode": "e6b7",
  494. "unicode_decimal": 59063
  495. }, {
  496. "icon_id": "24923334",
  497. "name": "eye",
  498. "font_class": "eye",
  499. "unicode": "e651",
  500. "unicode_decimal": 58961
  501. }, {
  502. "icon_id": "24923335",
  503. "name": "eye-filled",
  504. "font_class": "eye-filled",
  505. "unicode": "e66a",
  506. "unicode_decimal": 58986
  507. }, {
  508. "icon_id": "24923336",
  509. "name": "eye-slash",
  510. "font_class": "eye-slash",
  511. "unicode": "e6b3",
  512. "unicode_decimal": 59059
  513. }, {
  514. "icon_id": "24923337",
  515. "name": "eye-slash-filled",
  516. "font_class": "eye-slash-filled",
  517. "unicode": "e6b4",
  518. "unicode_decimal": 59060
  519. }, {
  520. "icon_id": "24923305",
  521. "name": "info-filled",
  522. "font_class": "info-filled",
  523. "unicode": "e649",
  524. "unicode_decimal": 58953
  525. }, {
  526. "icon_id": "24923299",
  527. "name": "reload-01",
  528. "font_class": "reload",
  529. "unicode": "e6b2",
  530. "unicode_decimal": 59058
  531. }, {
  532. "icon_id": "24923195",
  533. "name": "mic_slash_fill",
  534. "font_class": "micoff-filled",
  535. "unicode": "e6b0",
  536. "unicode_decimal": 59056
  537. }, {
  538. "icon_id": "24923165",
  539. "name": "map-pin-ellipse",
  540. "font_class": "map-pin-ellipse",
  541. "unicode": "e6ac",
  542. "unicode_decimal": 59052
  543. }, {
  544. "icon_id": "24923166",
  545. "name": "map-pin",
  546. "font_class": "map-pin",
  547. "unicode": "e6ad",
  548. "unicode_decimal": 59053
  549. }, {
  550. "icon_id": "24923167",
  551. "name": "location",
  552. "font_class": "location",
  553. "unicode": "e6ae",
  554. "unicode_decimal": 59054
  555. }, {
  556. "icon_id": "24923064",
  557. "name": "starhalf",
  558. "font_class": "starhalf",
  559. "unicode": "e683",
  560. "unicode_decimal": 59011
  561. }, {
  562. "icon_id": "24923065",
  563. "name": "star",
  564. "font_class": "star",
  565. "unicode": "e688",
  566. "unicode_decimal": 59016
  567. }, {
  568. "icon_id": "24923066",
  569. "name": "star-filled",
  570. "font_class": "star-filled",
  571. "unicode": "e68f",
  572. "unicode_decimal": 59023
  573. }, {
  574. "icon_id": "24899646",
  575. "name": "a-rilidaka",
  576. "font_class": "calendar",
  577. "unicode": "e6a0",
  578. "unicode_decimal": 59040
  579. }, {
  580. "icon_id": "24899647",
  581. "name": "fire",
  582. "font_class": "fire",
  583. "unicode": "e6a1",
  584. "unicode_decimal": 59041
  585. }, {
  586. "icon_id": "24899648",
  587. "name": "paihangbang",
  588. "font_class": "medal",
  589. "unicode": "e6a2",
  590. "unicode_decimal": 59042
  591. }, {
  592. "icon_id": "24899649",
  593. "name": "font",
  594. "font_class": "font",
  595. "unicode": "e6a3",
  596. "unicode_decimal": 59043
  597. }, {
  598. "icon_id": "24899650",
  599. "name": "gift",
  600. "font_class": "gift",
  601. "unicode": "e6a4",
  602. "unicode_decimal": 59044
  603. }, {
  604. "icon_id": "24899651",
  605. "name": "link",
  606. "font_class": "link",
  607. "unicode": "e6a5",
  608. "unicode_decimal": 59045
  609. }, {
  610. "icon_id": "24899652",
  611. "name": "notification",
  612. "font_class": "notification",
  613. "unicode": "e6a6",
  614. "unicode_decimal": 59046
  615. }, {
  616. "icon_id": "24899653",
  617. "name": "staff",
  618. "font_class": "staff",
  619. "unicode": "e6a7",
  620. "unicode_decimal": 59047
  621. }, {
  622. "icon_id": "24899654",
  623. "name": "VIP",
  624. "font_class": "vip",
  625. "unicode": "e6a8",
  626. "unicode_decimal": 59048
  627. }, {
  628. "icon_id": "24899655",
  629. "name": "folder_add",
  630. "font_class": "folder-add",
  631. "unicode": "e6a9",
  632. "unicode_decimal": 59049
  633. }, {
  634. "icon_id": "24899656",
  635. "name": "tune",
  636. "font_class": "tune",
  637. "unicode": "e6aa",
  638. "unicode_decimal": 59050
  639. }, {
  640. "icon_id": "24899657",
  641. "name": "shimingrenzheng",
  642. "font_class": "auth",
  643. "unicode": "e6ab",
  644. "unicode_decimal": 59051
  645. }, {
  646. "icon_id": "24899565",
  647. "name": "person",
  648. "font_class": "person",
  649. "unicode": "e699",
  650. "unicode_decimal": 59033
  651. }, {
  652. "icon_id": "24899566",
  653. "name": "email-filled",
  654. "font_class": "email-filled",
  655. "unicode": "e69a",
  656. "unicode_decimal": 59034
  657. }, {
  658. "icon_id": "24899567",
  659. "name": "phone-filled",
  660. "font_class": "phone-filled",
  661. "unicode": "e69b",
  662. "unicode_decimal": 59035
  663. }, {
  664. "icon_id": "24899568",
  665. "name": "phone",
  666. "font_class": "phone",
  667. "unicode": "e69c",
  668. "unicode_decimal": 59036
  669. }, {
  670. "icon_id": "24899570",
  671. "name": "email",
  672. "font_class": "email",
  673. "unicode": "e69e",
  674. "unicode_decimal": 59038
  675. }, {
  676. "icon_id": "24899571",
  677. "name": "personadd",
  678. "font_class": "personadd",
  679. "unicode": "e69f",
  680. "unicode_decimal": 59039
  681. }, {
  682. "icon_id": "24899558",
  683. "name": "chatboxes-filled",
  684. "font_class": "chatboxes-filled",
  685. "unicode": "e692",
  686. "unicode_decimal": 59026
  687. }, {
  688. "icon_id": "24899559",
  689. "name": "contact",
  690. "font_class": "contact",
  691. "unicode": "e693",
  692. "unicode_decimal": 59027
  693. }, {
  694. "icon_id": "24899560",
  695. "name": "chatbubble-filled",
  696. "font_class": "chatbubble-filled",
  697. "unicode": "e694",
  698. "unicode_decimal": 59028
  699. }, {
  700. "icon_id": "24899561",
  701. "name": "contact-filled",
  702. "font_class": "contact-filled",
  703. "unicode": "e695",
  704. "unicode_decimal": 59029
  705. }, {
  706. "icon_id": "24899562",
  707. "name": "chatboxes",
  708. "font_class": "chatboxes",
  709. "unicode": "e696",
  710. "unicode_decimal": 59030
  711. }, {
  712. "icon_id": "24899563",
  713. "name": "chatbubble",
  714. "font_class": "chatbubble",
  715. "unicode": "e697",
  716. "unicode_decimal": 59031
  717. }, {
  718. "icon_id": "24881290",
  719. "name": "upload-filled",
  720. "font_class": "upload-filled",
  721. "unicode": "e68e",
  722. "unicode_decimal": 59022
  723. }, {
  724. "icon_id": "24881292",
  725. "name": "upload",
  726. "font_class": "upload",
  727. "unicode": "e690",
  728. "unicode_decimal": 59024
  729. }, {
  730. "icon_id": "24881293",
  731. "name": "weixin",
  732. "font_class": "weixin",
  733. "unicode": "e691",
  734. "unicode_decimal": 59025
  735. }, {
  736. "icon_id": "24881274",
  737. "name": "compose",
  738. "font_class": "compose",
  739. "unicode": "e67f",
  740. "unicode_decimal": 59007
  741. }, {
  742. "icon_id": "24881275",
  743. "name": "qq",
  744. "font_class": "qq",
  745. "unicode": "e680",
  746. "unicode_decimal": 59008
  747. }, {
  748. "icon_id": "24881276",
  749. "name": "download-filled",
  750. "font_class": "download-filled",
  751. "unicode": "e681",
  752. "unicode_decimal": 59009
  753. }, {
  754. "icon_id": "24881277",
  755. "name": "pengyouquan",
  756. "font_class": "pyq",
  757. "unicode": "e682",
  758. "unicode_decimal": 59010
  759. }, {
  760. "icon_id": "24881279",
  761. "name": "sound",
  762. "font_class": "sound",
  763. "unicode": "e684",
  764. "unicode_decimal": 59012
  765. }, {
  766. "icon_id": "24881280",
  767. "name": "trash-filled",
  768. "font_class": "trash-filled",
  769. "unicode": "e685",
  770. "unicode_decimal": 59013
  771. }, {
  772. "icon_id": "24881281",
  773. "name": "sound-filled",
  774. "font_class": "sound-filled",
  775. "unicode": "e686",
  776. "unicode_decimal": 59014
  777. }, {
  778. "icon_id": "24881282",
  779. "name": "trash",
  780. "font_class": "trash",
  781. "unicode": "e687",
  782. "unicode_decimal": 59015
  783. }, {
  784. "icon_id": "24881284",
  785. "name": "videocam-filled",
  786. "font_class": "videocam-filled",
  787. "unicode": "e689",
  788. "unicode_decimal": 59017
  789. }, {
  790. "icon_id": "24881285",
  791. "name": "spinner-cycle",
  792. "font_class": "spinner-cycle",
  793. "unicode": "e68a",
  794. "unicode_decimal": 59018
  795. }, {
  796. "icon_id": "24881286",
  797. "name": "weibo",
  798. "font_class": "weibo",
  799. "unicode": "e68b",
  800. "unicode_decimal": 59019
  801. }, {
  802. "icon_id": "24881288",
  803. "name": "videocam",
  804. "font_class": "videocam",
  805. "unicode": "e68c",
  806. "unicode_decimal": 59020
  807. }, {
  808. "icon_id": "24881289",
  809. "name": "download",
  810. "font_class": "download",
  811. "unicode": "e68d",
  812. "unicode_decimal": 59021
  813. }, {
  814. "icon_id": "24879601",
  815. "name": "help",
  816. "font_class": "help",
  817. "unicode": "e679",
  818. "unicode_decimal": 59001
  819. }, {
  820. "icon_id": "24879602",
  821. "name": "navigate-filled",
  822. "font_class": "navigate-filled",
  823. "unicode": "e67a",
  824. "unicode_decimal": 59002
  825. }, {
  826. "icon_id": "24879603",
  827. "name": "plusempty",
  828. "font_class": "plusempty",
  829. "unicode": "e67b",
  830. "unicode_decimal": 59003
  831. }, {
  832. "icon_id": "24879604",
  833. "name": "smallcircle",
  834. "font_class": "smallcircle",
  835. "unicode": "e67c",
  836. "unicode_decimal": 59004
  837. }, {
  838. "icon_id": "24879605",
  839. "name": "minus-filled",
  840. "font_class": "minus-filled",
  841. "unicode": "e67d",
  842. "unicode_decimal": 59005
  843. }, {
  844. "icon_id": "24879606",
  845. "name": "micoff",
  846. "font_class": "micoff",
  847. "unicode": "e67e",
  848. "unicode_decimal": 59006
  849. }, {
  850. "icon_id": "24879588",
  851. "name": "closeempty",
  852. "font_class": "closeempty",
  853. "unicode": "e66c",
  854. "unicode_decimal": 58988
  855. }, {
  856. "icon_id": "24879589",
  857. "name": "clear",
  858. "font_class": "clear",
  859. "unicode": "e66d",
  860. "unicode_decimal": 58989
  861. }, {
  862. "icon_id": "24879590",
  863. "name": "navigate",
  864. "font_class": "navigate",
  865. "unicode": "e66e",
  866. "unicode_decimal": 58990
  867. }, {
  868. "icon_id": "24879591",
  869. "name": "minus",
  870. "font_class": "minus",
  871. "unicode": "e66f",
  872. "unicode_decimal": 58991
  873. }, {
  874. "icon_id": "24879592",
  875. "name": "image",
  876. "font_class": "image",
  877. "unicode": "e670",
  878. "unicode_decimal": 58992
  879. }, {
  880. "icon_id": "24879593",
  881. "name": "mic",
  882. "font_class": "mic",
  883. "unicode": "e671",
  884. "unicode_decimal": 58993
  885. }, {
  886. "icon_id": "24879594",
  887. "name": "paperplane",
  888. "font_class": "paperplane",
  889. "unicode": "e672",
  890. "unicode_decimal": 58994
  891. }, {
  892. "icon_id": "24879595",
  893. "name": "close",
  894. "font_class": "close",
  895. "unicode": "e673",
  896. "unicode_decimal": 58995
  897. }, {
  898. "icon_id": "24879596",
  899. "name": "help-filled",
  900. "font_class": "help-filled",
  901. "unicode": "e674",
  902. "unicode_decimal": 58996
  903. }, {
  904. "icon_id": "24879597",
  905. "name": "plus-filled",
  906. "font_class": "paperplane-filled",
  907. "unicode": "e675",
  908. "unicode_decimal": 58997
  909. }, {
  910. "icon_id": "24879598",
  911. "name": "plus",
  912. "font_class": "plus",
  913. "unicode": "e676",
  914. "unicode_decimal": 58998
  915. }, {
  916. "icon_id": "24879599",
  917. "name": "mic-filled",
  918. "font_class": "mic-filled",
  919. "unicode": "e677",
  920. "unicode_decimal": 58999
  921. }, {
  922. "icon_id": "24879600",
  923. "name": "image-filled",
  924. "font_class": "image-filled",
  925. "unicode": "e678",
  926. "unicode_decimal": 59000
  927. }, {
  928. "icon_id": "24855900",
  929. "name": "locked-filled",
  930. "font_class": "locked-filled",
  931. "unicode": "e668",
  932. "unicode_decimal": 58984
  933. }, {
  934. "icon_id": "24855901",
  935. "name": "info",
  936. "font_class": "info",
  937. "unicode": "e669",
  938. "unicode_decimal": 58985
  939. }, {
  940. "icon_id": "24855903",
  941. "name": "locked",
  942. "font_class": "locked",
  943. "unicode": "e66b",
  944. "unicode_decimal": 58987
  945. }, {
  946. "icon_id": "24855884",
  947. "name": "camera-filled",
  948. "font_class": "camera-filled",
  949. "unicode": "e658",
  950. "unicode_decimal": 58968
  951. }, {
  952. "icon_id": "24855885",
  953. "name": "chat-filled",
  954. "font_class": "chat-filled",
  955. "unicode": "e659",
  956. "unicode_decimal": 58969
  957. }, {
  958. "icon_id": "24855886",
  959. "name": "camera",
  960. "font_class": "camera",
  961. "unicode": "e65a",
  962. "unicode_decimal": 58970
  963. }, {
  964. "icon_id": "24855887",
  965. "name": "circle",
  966. "font_class": "circle",
  967. "unicode": "e65b",
  968. "unicode_decimal": 58971
  969. }, {
  970. "icon_id": "24855888",
  971. "name": "checkmarkempty",
  972. "font_class": "checkmarkempty",
  973. "unicode": "e65c",
  974. "unicode_decimal": 58972
  975. }, {
  976. "icon_id": "24855889",
  977. "name": "chat",
  978. "font_class": "chat",
  979. "unicode": "e65d",
  980. "unicode_decimal": 58973
  981. }, {
  982. "icon_id": "24855890",
  983. "name": "circle-filled",
  984. "font_class": "circle-filled",
  985. "unicode": "e65e",
  986. "unicode_decimal": 58974
  987. }, {
  988. "icon_id": "24855891",
  989. "name": "flag",
  990. "font_class": "flag",
  991. "unicode": "e65f",
  992. "unicode_decimal": 58975
  993. }, {
  994. "icon_id": "24855892",
  995. "name": "flag-filled",
  996. "font_class": "flag-filled",
  997. "unicode": "e660",
  998. "unicode_decimal": 58976
  999. }, {
  1000. "icon_id": "24855893",
  1001. "name": "gear-filled",
  1002. "font_class": "gear-filled",
  1003. "unicode": "e661",
  1004. "unicode_decimal": 58977
  1005. }, {
  1006. "icon_id": "24855894",
  1007. "name": "home",
  1008. "font_class": "home",
  1009. "unicode": "e662",
  1010. "unicode_decimal": 58978
  1011. }, {
  1012. "icon_id": "24855895",
  1013. "name": "home-filled",
  1014. "font_class": "home-filled",
  1015. "unicode": "e663",
  1016. "unicode_decimal": 58979
  1017. }, {
  1018. "icon_id": "24855896",
  1019. "name": "gear",
  1020. "font_class": "gear",
  1021. "unicode": "e664",
  1022. "unicode_decimal": 58980
  1023. }, {
  1024. "icon_id": "24855897",
  1025. "name": "smallcircle-filled",
  1026. "font_class": "smallcircle-filled",
  1027. "unicode": "e665",
  1028. "unicode_decimal": 58981
  1029. }, {
  1030. "icon_id": "24855898",
  1031. "name": "map-filled",
  1032. "font_class": "map-filled",
  1033. "unicode": "e666",
  1034. "unicode_decimal": 58982
  1035. }, {
  1036. "icon_id": "24855899",
  1037. "name": "map",
  1038. "font_class": "map",
  1039. "unicode": "e667",
  1040. "unicode_decimal": 58983
  1041. }, {
  1042. "icon_id": "24855825",
  1043. "name": "refresh-filled",
  1044. "font_class": "refresh-filled",
  1045. "unicode": "e656",
  1046. "unicode_decimal": 58966
  1047. }, {
  1048. "icon_id": "24855826",
  1049. "name": "refresh",
  1050. "font_class": "refresh",
  1051. "unicode": "e657",
  1052. "unicode_decimal": 58967
  1053. }, {
  1054. "icon_id": "24855808",
  1055. "name": "cloud-upload",
  1056. "font_class": "cloud-upload",
  1057. "unicode": "e645",
  1058. "unicode_decimal": 58949
  1059. }, {
  1060. "icon_id": "24855809",
  1061. "name": "cloud-download-filled",
  1062. "font_class": "cloud-download-filled",
  1063. "unicode": "e646",
  1064. "unicode_decimal": 58950
  1065. }, {
  1066. "icon_id": "24855810",
  1067. "name": "cloud-download",
  1068. "font_class": "cloud-download",
  1069. "unicode": "e647",
  1070. "unicode_decimal": 58951
  1071. }, {
  1072. "icon_id": "24855811",
  1073. "name": "cloud-upload-filled",
  1074. "font_class": "cloud-upload-filled",
  1075. "unicode": "e648",
  1076. "unicode_decimal": 58952
  1077. }, {
  1078. "icon_id": "24855813",
  1079. "name": "redo",
  1080. "font_class": "redo",
  1081. "unicode": "e64a",
  1082. "unicode_decimal": 58954
  1083. }, {
  1084. "icon_id": "24855814",
  1085. "name": "images-filled",
  1086. "font_class": "images-filled",
  1087. "unicode": "e64b",
  1088. "unicode_decimal": 58955
  1089. }, {
  1090. "icon_id": "24855815",
  1091. "name": "undo-filled",
  1092. "font_class": "undo-filled",
  1093. "unicode": "e64c",
  1094. "unicode_decimal": 58956
  1095. }, {
  1096. "icon_id": "24855816",
  1097. "name": "more",
  1098. "font_class": "more",
  1099. "unicode": "e64d",
  1100. "unicode_decimal": 58957
  1101. }, {
  1102. "icon_id": "24855817",
  1103. "name": "more-filled",
  1104. "font_class": "more-filled",
  1105. "unicode": "e64e",
  1106. "unicode_decimal": 58958
  1107. }, {
  1108. "icon_id": "24855818",
  1109. "name": "undo",
  1110. "font_class": "undo",
  1111. "unicode": "e64f",
  1112. "unicode_decimal": 58959
  1113. }, {
  1114. "icon_id": "24855819",
  1115. "name": "images",
  1116. "font_class": "images",
  1117. "unicode": "e650",
  1118. "unicode_decimal": 58960
  1119. }, {
  1120. "icon_id": "24855821",
  1121. "name": "paperclip",
  1122. "font_class": "paperclip",
  1123. "unicode": "e652",
  1124. "unicode_decimal": 58962
  1125. }, {
  1126. "icon_id": "24855822",
  1127. "name": "settings",
  1128. "font_class": "settings",
  1129. "unicode": "e653",
  1130. "unicode_decimal": 58963
  1131. }, {
  1132. "icon_id": "24855823",
  1133. "name": "search",
  1134. "font_class": "search",
  1135. "unicode": "e654",
  1136. "unicode_decimal": 58964
  1137. }, {
  1138. "icon_id": "24855824",
  1139. "name": "redo-filled",
  1140. "font_class": "redo-filled",
  1141. "unicode": "e655",
  1142. "unicode_decimal": 58965
  1143. }, {
  1144. "icon_id": "24841702",
  1145. "name": "list",
  1146. "font_class": "list",
  1147. "unicode": "e644",
  1148. "unicode_decimal": 58948
  1149. }, {
  1150. "icon_id": "24841489",
  1151. "name": "mail-open-filled",
  1152. "font_class": "mail-open-filled",
  1153. "unicode": "e63a",
  1154. "unicode_decimal": 58938
  1155. }, {
  1156. "icon_id": "24841491",
  1157. "name": "hand-thumbsdown-filled",
  1158. "font_class": "hand-down-filled",
  1159. "unicode": "e63c",
  1160. "unicode_decimal": 58940
  1161. }, {
  1162. "icon_id": "24841492",
  1163. "name": "hand-thumbsdown",
  1164. "font_class": "hand-down",
  1165. "unicode": "e63d",
  1166. "unicode_decimal": 58941
  1167. }, {
  1168. "icon_id": "24841493",
  1169. "name": "hand-thumbsup-filled",
  1170. "font_class": "hand-up-filled",
  1171. "unicode": "e63e",
  1172. "unicode_decimal": 58942
  1173. }, {
  1174. "icon_id": "24841494",
  1175. "name": "hand-thumbsup",
  1176. "font_class": "hand-up",
  1177. "unicode": "e63f",
  1178. "unicode_decimal": 58943
  1179. }, {
  1180. "icon_id": "24841496",
  1181. "name": "heart-filled",
  1182. "font_class": "heart-filled",
  1183. "unicode": "e641",
  1184. "unicode_decimal": 58945
  1185. }, {
  1186. "icon_id": "24841498",
  1187. "name": "mail-open",
  1188. "font_class": "mail-open",
  1189. "unicode": "e643",
  1190. "unicode_decimal": 58947
  1191. }, {
  1192. "icon_id": "24841488",
  1193. "name": "heart",
  1194. "font_class": "heart",
  1195. "unicode": "e639",
  1196. "unicode_decimal": 58937
  1197. }, {
  1198. "icon_id": "24839963",
  1199. "name": "loop",
  1200. "font_class": "loop",
  1201. "unicode": "e633",
  1202. "unicode_decimal": 58931
  1203. }, {
  1204. "icon_id": "24839866",
  1205. "name": "pulldown",
  1206. "font_class": "pulldown",
  1207. "unicode": "e632",
  1208. "unicode_decimal": 58930
  1209. }, {
  1210. "icon_id": "24813798",
  1211. "name": "scan",
  1212. "font_class": "scan",
  1213. "unicode": "e62a",
  1214. "unicode_decimal": 58922
  1215. }, {
  1216. "icon_id": "24813786",
  1217. "name": "bars",
  1218. "font_class": "bars",
  1219. "unicode": "e627",
  1220. "unicode_decimal": 58919
  1221. }, {
  1222. "icon_id": "24813788",
  1223. "name": "cart-filled",
  1224. "font_class": "cart-filled",
  1225. "unicode": "e629",
  1226. "unicode_decimal": 58921
  1227. }, {
  1228. "icon_id": "24813790",
  1229. "name": "checkbox",
  1230. "font_class": "checkbox",
  1231. "unicode": "e62b",
  1232. "unicode_decimal": 58923
  1233. }, {
  1234. "icon_id": "24813791",
  1235. "name": "checkbox-filled",
  1236. "font_class": "checkbox-filled",
  1237. "unicode": "e62c",
  1238. "unicode_decimal": 58924
  1239. }, {
  1240. "icon_id": "24813794",
  1241. "name": "shop",
  1242. "font_class": "shop",
  1243. "unicode": "e62f",
  1244. "unicode_decimal": 58927
  1245. }, {
  1246. "icon_id": "24813795",
  1247. "name": "headphones",
  1248. "font_class": "headphones",
  1249. "unicode": "e630",
  1250. "unicode_decimal": 58928
  1251. }, {
  1252. "icon_id": "24813796",
  1253. "name": "cart",
  1254. "font_class": "cart",
  1255. "unicode": "e631",
  1256. "unicode_decimal": 58929
  1257. }]
  1258. };
  1259. exports.default = _default;
  1260. /***/ }),
  1261. /***/ 19:
  1262. /*!******************************************************************!*\
  1263. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  1264. \******************************************************************/
  1265. /*! no static exports found */
  1266. /***/ (function(module, exports, __webpack_require__) {
  1267. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  1268. function _arrayWithoutHoles(arr) {
  1269. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  1270. }
  1271. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1272. /***/ }),
  1273. /***/ 2:
  1274. /*!************************************************************!*\
  1275. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  1276. \************************************************************/
  1277. /*! no static exports found */
  1278. /***/ (function(module, exports, __webpack_require__) {
  1279. "use strict";
  1280. /* WEBPACK VAR INJECTION */(function(wx, global) {
  1281. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  1282. Object.defineProperty(exports, "__esModule", {
  1283. value: true
  1284. });
  1285. exports.createApp = createApp;
  1286. exports.createComponent = createComponent;
  1287. exports.createPage = createPage;
  1288. exports.createPlugin = createPlugin;
  1289. exports.createSubpackageApp = createSubpackageApp;
  1290. exports.default = void 0;
  1291. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  1292. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  1293. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  1294. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  1295. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  1296. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  1297. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  1298. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  1299. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  1300. var realAtob;
  1301. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  1302. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  1303. if (typeof atob !== 'function') {
  1304. realAtob = function realAtob(str) {
  1305. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  1306. if (!b64re.test(str)) {
  1307. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  1308. }
  1309. // Adding the padding if missing, for semplicity
  1310. str += '=='.slice(2 - (str.length & 3));
  1311. var bitmap;
  1312. var result = '';
  1313. var r1;
  1314. var r2;
  1315. var i = 0;
  1316. for (; i < str.length;) {
  1317. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  1318. 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);
  1319. }
  1320. return result;
  1321. };
  1322. } else {
  1323. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  1324. realAtob = atob;
  1325. }
  1326. function b64DecodeUnicode(str) {
  1327. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  1328. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  1329. }).join(''));
  1330. }
  1331. function getCurrentUserInfo() {
  1332. var token = wx.getStorageSync('uni_id_token') || '';
  1333. var tokenArr = token.split('.');
  1334. if (!token || tokenArr.length !== 3) {
  1335. return {
  1336. uid: null,
  1337. role: [],
  1338. permission: [],
  1339. tokenExpired: 0
  1340. };
  1341. }
  1342. var userInfo;
  1343. try {
  1344. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  1345. } catch (error) {
  1346. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  1347. }
  1348. userInfo.tokenExpired = userInfo.exp * 1000;
  1349. delete userInfo.exp;
  1350. delete userInfo.iat;
  1351. return userInfo;
  1352. }
  1353. function uniIdMixin(Vue) {
  1354. Vue.prototype.uniIDHasRole = function (roleId) {
  1355. var _getCurrentUserInfo = getCurrentUserInfo(),
  1356. role = _getCurrentUserInfo.role;
  1357. return role.indexOf(roleId) > -1;
  1358. };
  1359. Vue.prototype.uniIDHasPermission = function (permissionId) {
  1360. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  1361. permission = _getCurrentUserInfo2.permission;
  1362. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  1363. };
  1364. Vue.prototype.uniIDTokenValid = function () {
  1365. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  1366. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  1367. return tokenExpired > Date.now();
  1368. };
  1369. }
  1370. var _toString = Object.prototype.toString;
  1371. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1372. function isFn(fn) {
  1373. return typeof fn === 'function';
  1374. }
  1375. function isStr(str) {
  1376. return typeof str === 'string';
  1377. }
  1378. function isObject(obj) {
  1379. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  1380. }
  1381. function isPlainObject(obj) {
  1382. return _toString.call(obj) === '[object Object]';
  1383. }
  1384. function hasOwn(obj, key) {
  1385. return hasOwnProperty.call(obj, key);
  1386. }
  1387. function noop() {}
  1388. /**
  1389. * Create a cached version of a pure function.
  1390. */
  1391. function cached(fn) {
  1392. var cache = Object.create(null);
  1393. return function cachedFn(str) {
  1394. var hit = cache[str];
  1395. return hit || (cache[str] = fn(str));
  1396. };
  1397. }
  1398. /**
  1399. * Camelize a hyphen-delimited string.
  1400. */
  1401. var camelizeRE = /-(\w)/g;
  1402. var camelize = cached(function (str) {
  1403. return str.replace(camelizeRE, function (_, c) {
  1404. return c ? c.toUpperCase() : '';
  1405. });
  1406. });
  1407. function sortObject(obj) {
  1408. var sortObj = {};
  1409. if (isPlainObject(obj)) {
  1410. Object.keys(obj).sort().forEach(function (key) {
  1411. sortObj[key] = obj[key];
  1412. });
  1413. }
  1414. return !Object.keys(sortObj) ? obj : sortObj;
  1415. }
  1416. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  1417. var globalInterceptors = {};
  1418. var scopedInterceptors = {};
  1419. function mergeHook(parentVal, childVal) {
  1420. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  1421. return res ? dedupeHooks(res) : res;
  1422. }
  1423. function dedupeHooks(hooks) {
  1424. var res = [];
  1425. for (var i = 0; i < hooks.length; i++) {
  1426. if (res.indexOf(hooks[i]) === -1) {
  1427. res.push(hooks[i]);
  1428. }
  1429. }
  1430. return res;
  1431. }
  1432. function removeHook(hooks, hook) {
  1433. var index = hooks.indexOf(hook);
  1434. if (index !== -1) {
  1435. hooks.splice(index, 1);
  1436. }
  1437. }
  1438. function mergeInterceptorHook(interceptor, option) {
  1439. Object.keys(option).forEach(function (hook) {
  1440. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  1441. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  1442. }
  1443. });
  1444. }
  1445. function removeInterceptorHook(interceptor, option) {
  1446. if (!interceptor || !option) {
  1447. return;
  1448. }
  1449. Object.keys(option).forEach(function (hook) {
  1450. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  1451. removeHook(interceptor[hook], option[hook]);
  1452. }
  1453. });
  1454. }
  1455. function addInterceptor(method, option) {
  1456. if (typeof method === 'string' && isPlainObject(option)) {
  1457. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  1458. } else if (isPlainObject(method)) {
  1459. mergeInterceptorHook(globalInterceptors, method);
  1460. }
  1461. }
  1462. function removeInterceptor(method, option) {
  1463. if (typeof method === 'string') {
  1464. if (isPlainObject(option)) {
  1465. removeInterceptorHook(scopedInterceptors[method], option);
  1466. } else {
  1467. delete scopedInterceptors[method];
  1468. }
  1469. } else if (isPlainObject(method)) {
  1470. removeInterceptorHook(globalInterceptors, method);
  1471. }
  1472. }
  1473. function wrapperHook(hook, params) {
  1474. return function (data) {
  1475. return hook(data, params) || data;
  1476. };
  1477. }
  1478. function isPromise(obj) {
  1479. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  1480. }
  1481. function queue(hooks, data, params) {
  1482. var promise = false;
  1483. for (var i = 0; i < hooks.length; i++) {
  1484. var hook = hooks[i];
  1485. if (promise) {
  1486. promise = Promise.resolve(wrapperHook(hook, params));
  1487. } else {
  1488. var res = hook(data, params);
  1489. if (isPromise(res)) {
  1490. promise = Promise.resolve(res);
  1491. }
  1492. if (res === false) {
  1493. return {
  1494. then: function then() {}
  1495. };
  1496. }
  1497. }
  1498. }
  1499. return promise || {
  1500. then: function then(callback) {
  1501. return callback(data);
  1502. }
  1503. };
  1504. }
  1505. function wrapperOptions(interceptor) {
  1506. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  1507. ['success', 'fail', 'complete'].forEach(function (name) {
  1508. if (Array.isArray(interceptor[name])) {
  1509. var oldCallback = options[name];
  1510. options[name] = function callbackInterceptor(res) {
  1511. queue(interceptor[name], res, options).then(function (res) {
  1512. /* eslint-disable no-mixed-operators */
  1513. return isFn(oldCallback) && oldCallback(res) || res;
  1514. });
  1515. };
  1516. }
  1517. });
  1518. return options;
  1519. }
  1520. function wrapperReturnValue(method, returnValue) {
  1521. var returnValueHooks = [];
  1522. if (Array.isArray(globalInterceptors.returnValue)) {
  1523. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  1524. }
  1525. var interceptor = scopedInterceptors[method];
  1526. if (interceptor && Array.isArray(interceptor.returnValue)) {
  1527. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  1528. }
  1529. returnValueHooks.forEach(function (hook) {
  1530. returnValue = hook(returnValue) || returnValue;
  1531. });
  1532. return returnValue;
  1533. }
  1534. function getApiInterceptorHooks(method) {
  1535. var interceptor = Object.create(null);
  1536. Object.keys(globalInterceptors).forEach(function (hook) {
  1537. if (hook !== 'returnValue') {
  1538. interceptor[hook] = globalInterceptors[hook].slice();
  1539. }
  1540. });
  1541. var scopedInterceptor = scopedInterceptors[method];
  1542. if (scopedInterceptor) {
  1543. Object.keys(scopedInterceptor).forEach(function (hook) {
  1544. if (hook !== 'returnValue') {
  1545. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  1546. }
  1547. });
  1548. }
  1549. return interceptor;
  1550. }
  1551. function invokeApi(method, api, options) {
  1552. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  1553. params[_key - 3] = arguments[_key];
  1554. }
  1555. var interceptor = getApiInterceptorHooks(method);
  1556. if (interceptor && Object.keys(interceptor).length) {
  1557. if (Array.isArray(interceptor.invoke)) {
  1558. var res = queue(interceptor.invoke, options);
  1559. return res.then(function (options) {
  1560. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  1561. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  1562. });
  1563. } else {
  1564. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  1565. }
  1566. }
  1567. return api.apply(void 0, [options].concat(params));
  1568. }
  1569. var promiseInterceptor = {
  1570. returnValue: function returnValue(res) {
  1571. if (!isPromise(res)) {
  1572. return res;
  1573. }
  1574. return new Promise(function (resolve, reject) {
  1575. res.then(function (res) {
  1576. if (res[0]) {
  1577. reject(res[0]);
  1578. } else {
  1579. resolve(res[1]);
  1580. }
  1581. });
  1582. });
  1583. }
  1584. };
  1585. var SYNC_API_RE = /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo|getSystemSetting|getAppAuthorizeSetting|initUTS|requireUTS|registerUTS/;
  1586. var CONTEXT_API_RE = /^create|Manager$/;
  1587. // Context例外情况
  1588. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  1589. // 同步例外情况
  1590. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  1591. var CALLBACK_API_RE = /^on|^off/;
  1592. function isContextApi(name) {
  1593. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  1594. }
  1595. function isSyncApi(name) {
  1596. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  1597. }
  1598. function isCallbackApi(name) {
  1599. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  1600. }
  1601. function handlePromise(promise) {
  1602. return promise.then(function (data) {
  1603. return [null, data];
  1604. }).catch(function (err) {
  1605. return [err];
  1606. });
  1607. }
  1608. function shouldPromise(name) {
  1609. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  1610. return false;
  1611. }
  1612. return true;
  1613. }
  1614. /* eslint-disable no-extend-native */
  1615. if (!Promise.prototype.finally) {
  1616. Promise.prototype.finally = function (callback) {
  1617. var promise = this.constructor;
  1618. return this.then(function (value) {
  1619. return promise.resolve(callback()).then(function () {
  1620. return value;
  1621. });
  1622. }, function (reason) {
  1623. return promise.resolve(callback()).then(function () {
  1624. throw reason;
  1625. });
  1626. });
  1627. };
  1628. }
  1629. function promisify(name, api) {
  1630. if (!shouldPromise(name) || !isFn(api)) {
  1631. return api;
  1632. }
  1633. return function promiseApi() {
  1634. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1635. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  1636. params[_key2 - 1] = arguments[_key2];
  1637. }
  1638. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  1639. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  1640. }
  1641. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  1642. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  1643. success: resolve,
  1644. fail: reject
  1645. })].concat(params));
  1646. })));
  1647. };
  1648. }
  1649. var EPS = 1e-4;
  1650. var BASE_DEVICE_WIDTH = 750;
  1651. var isIOS = false;
  1652. var deviceWidth = 0;
  1653. var deviceDPR = 0;
  1654. function checkDeviceWidth() {
  1655. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  1656. platform = _wx$getSystemInfoSync.platform,
  1657. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  1658. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  1659. deviceWidth = windowWidth;
  1660. deviceDPR = pixelRatio;
  1661. isIOS = platform === 'ios';
  1662. }
  1663. function upx2px(number, newDeviceWidth) {
  1664. if (deviceWidth === 0) {
  1665. checkDeviceWidth();
  1666. }
  1667. number = Number(number);
  1668. if (number === 0) {
  1669. return 0;
  1670. }
  1671. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  1672. if (result < 0) {
  1673. result = -result;
  1674. }
  1675. result = Math.floor(result + EPS);
  1676. if (result === 0) {
  1677. if (deviceDPR === 1 || !isIOS) {
  1678. result = 1;
  1679. } else {
  1680. result = 0.5;
  1681. }
  1682. }
  1683. return number < 0 ? -result : result;
  1684. }
  1685. var LOCALE_ZH_HANS = 'zh-Hans';
  1686. var LOCALE_ZH_HANT = 'zh-Hant';
  1687. var LOCALE_EN = 'en';
  1688. var LOCALE_FR = 'fr';
  1689. var LOCALE_ES = 'es';
  1690. var messages = {};
  1691. var locale;
  1692. {
  1693. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  1694. }
  1695. function initI18nMessages() {
  1696. if (!isEnableLocale()) {
  1697. return;
  1698. }
  1699. var localeKeys = Object.keys(__uniConfig.locales);
  1700. if (localeKeys.length) {
  1701. localeKeys.forEach(function (locale) {
  1702. var curMessages = messages[locale];
  1703. var userMessages = __uniConfig.locales[locale];
  1704. if (curMessages) {
  1705. Object.assign(curMessages, userMessages);
  1706. } else {
  1707. messages[locale] = userMessages;
  1708. }
  1709. });
  1710. }
  1711. }
  1712. initI18nMessages();
  1713. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  1714. var t = i18n.t;
  1715. var i18nMixin = i18n.mixin = {
  1716. beforeCreate: function beforeCreate() {
  1717. var _this = this;
  1718. var unwatch = i18n.i18n.watchLocale(function () {
  1719. _this.$forceUpdate();
  1720. });
  1721. this.$once('hook:beforeDestroy', function () {
  1722. unwatch();
  1723. });
  1724. },
  1725. methods: {
  1726. $$t: function $$t(key, values) {
  1727. return t(key, values);
  1728. }
  1729. }
  1730. };
  1731. var setLocale = i18n.setLocale;
  1732. var getLocale = i18n.getLocale;
  1733. function initAppLocale(Vue, appVm, locale) {
  1734. var state = Vue.observable({
  1735. locale: locale || i18n.getLocale()
  1736. });
  1737. var localeWatchers = [];
  1738. appVm.$watchLocale = function (fn) {
  1739. localeWatchers.push(fn);
  1740. };
  1741. Object.defineProperty(appVm, '$locale', {
  1742. get: function get() {
  1743. return state.locale;
  1744. },
  1745. set: function set(v) {
  1746. state.locale = v;
  1747. localeWatchers.forEach(function (watch) {
  1748. return watch(v);
  1749. });
  1750. }
  1751. });
  1752. }
  1753. function isEnableLocale() {
  1754. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  1755. }
  1756. function include(str, parts) {
  1757. return !!parts.find(function (part) {
  1758. return str.indexOf(part) !== -1;
  1759. });
  1760. }
  1761. function startsWith(str, parts) {
  1762. return parts.find(function (part) {
  1763. return str.indexOf(part) === 0;
  1764. });
  1765. }
  1766. function normalizeLocale(locale, messages) {
  1767. if (!locale) {
  1768. return;
  1769. }
  1770. locale = locale.trim().replace(/_/g, '-');
  1771. if (messages && messages[locale]) {
  1772. return locale;
  1773. }
  1774. locale = locale.toLowerCase();
  1775. if (locale === 'chinese') {
  1776. // 支付宝
  1777. return LOCALE_ZH_HANS;
  1778. }
  1779. if (locale.indexOf('zh') === 0) {
  1780. if (locale.indexOf('-hans') > -1) {
  1781. return LOCALE_ZH_HANS;
  1782. }
  1783. if (locale.indexOf('-hant') > -1) {
  1784. return LOCALE_ZH_HANT;
  1785. }
  1786. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  1787. return LOCALE_ZH_HANT;
  1788. }
  1789. return LOCALE_ZH_HANS;
  1790. }
  1791. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  1792. if (lang) {
  1793. return lang;
  1794. }
  1795. }
  1796. // export function initI18n() {
  1797. // const localeKeys = Object.keys(__uniConfig.locales || {})
  1798. // if (localeKeys.length) {
  1799. // localeKeys.forEach((locale) =>
  1800. // i18n.add(locale, __uniConfig.locales[locale])
  1801. // )
  1802. // }
  1803. // }
  1804. function getLocale$1() {
  1805. // 优先使用 $locale
  1806. if (isFn(getApp)) {
  1807. var app = getApp({
  1808. allowDefault: true
  1809. });
  1810. if (app && app.$vm) {
  1811. return app.$vm.$locale;
  1812. }
  1813. }
  1814. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  1815. }
  1816. function setLocale$1(locale) {
  1817. var app = isFn(getApp) ? getApp() : false;
  1818. if (!app) {
  1819. return false;
  1820. }
  1821. var oldLocale = app.$vm.$locale;
  1822. if (oldLocale !== locale) {
  1823. app.$vm.$locale = locale;
  1824. onLocaleChangeCallbacks.forEach(function (fn) {
  1825. return fn({
  1826. locale: locale
  1827. });
  1828. });
  1829. return true;
  1830. }
  1831. return false;
  1832. }
  1833. var onLocaleChangeCallbacks = [];
  1834. function onLocaleChange(fn) {
  1835. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  1836. onLocaleChangeCallbacks.push(fn);
  1837. }
  1838. }
  1839. if (typeof global !== 'undefined') {
  1840. global.getLocale = getLocale$1;
  1841. }
  1842. var interceptors = {
  1843. promiseInterceptor: promiseInterceptor
  1844. };
  1845. var baseApi = /*#__PURE__*/Object.freeze({
  1846. __proto__: null,
  1847. upx2px: upx2px,
  1848. getLocale: getLocale$1,
  1849. setLocale: setLocale$1,
  1850. onLocaleChange: onLocaleChange,
  1851. addInterceptor: addInterceptor,
  1852. removeInterceptor: removeInterceptor,
  1853. interceptors: interceptors
  1854. });
  1855. function findExistsPageIndex(url) {
  1856. var pages = getCurrentPages();
  1857. var len = pages.length;
  1858. while (len--) {
  1859. var page = pages[len];
  1860. if (page.$page && page.$page.fullPath === url) {
  1861. return len;
  1862. }
  1863. }
  1864. return -1;
  1865. }
  1866. var redirectTo = {
  1867. name: function name(fromArgs) {
  1868. if (fromArgs.exists === 'back' && fromArgs.delta) {
  1869. return 'navigateBack';
  1870. }
  1871. return 'redirectTo';
  1872. },
  1873. args: function args(fromArgs) {
  1874. if (fromArgs.exists === 'back' && fromArgs.url) {
  1875. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  1876. if (existsPageIndex !== -1) {
  1877. var delta = getCurrentPages().length - 1 - existsPageIndex;
  1878. if (delta > 0) {
  1879. fromArgs.delta = delta;
  1880. }
  1881. }
  1882. }
  1883. }
  1884. };
  1885. var previewImage = {
  1886. args: function args(fromArgs) {
  1887. var currentIndex = parseInt(fromArgs.current);
  1888. if (isNaN(currentIndex)) {
  1889. return;
  1890. }
  1891. var urls = fromArgs.urls;
  1892. if (!Array.isArray(urls)) {
  1893. return;
  1894. }
  1895. var len = urls.length;
  1896. if (!len) {
  1897. return;
  1898. }
  1899. if (currentIndex < 0) {
  1900. currentIndex = 0;
  1901. } else if (currentIndex >= len) {
  1902. currentIndex = len - 1;
  1903. }
  1904. if (currentIndex > 0) {
  1905. fromArgs.current = urls[currentIndex];
  1906. fromArgs.urls = urls.filter(function (item, index) {
  1907. return index < currentIndex ? item !== urls[currentIndex] : true;
  1908. });
  1909. } else {
  1910. fromArgs.current = urls[0];
  1911. }
  1912. return {
  1913. indicator: false,
  1914. loop: false
  1915. };
  1916. }
  1917. };
  1918. var UUID_KEY = '__DC_STAT_UUID';
  1919. var deviceId;
  1920. function useDeviceId(result) {
  1921. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  1922. if (!deviceId) {
  1923. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  1924. wx.setStorage({
  1925. key: UUID_KEY,
  1926. data: deviceId
  1927. });
  1928. }
  1929. result.deviceId = deviceId;
  1930. }
  1931. function addSafeAreaInsets(result) {
  1932. if (result.safeArea) {
  1933. var safeArea = result.safeArea;
  1934. result.safeAreaInsets = {
  1935. top: safeArea.top,
  1936. left: safeArea.left,
  1937. right: result.windowWidth - safeArea.right,
  1938. bottom: result.screenHeight - safeArea.bottom
  1939. };
  1940. }
  1941. }
  1942. function populateParameters(result) {
  1943. var _result$brand = result.brand,
  1944. brand = _result$brand === void 0 ? '' : _result$brand,
  1945. _result$model = result.model,
  1946. model = _result$model === void 0 ? '' : _result$model,
  1947. _result$system = result.system,
  1948. system = _result$system === void 0 ? '' : _result$system,
  1949. _result$language = result.language,
  1950. language = _result$language === void 0 ? '' : _result$language,
  1951. theme = result.theme,
  1952. version = result.version,
  1953. platform = result.platform,
  1954. fontSizeSetting = result.fontSizeSetting,
  1955. SDKVersion = result.SDKVersion,
  1956. pixelRatio = result.pixelRatio,
  1957. deviceOrientation = result.deviceOrientation;
  1958. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  1959. var extraParam = {};
  1960. // osName osVersion
  1961. var osName = '';
  1962. var osVersion = '';
  1963. {
  1964. osName = system.split(' ')[0] || '';
  1965. osVersion = system.split(' ')[1] || '';
  1966. }
  1967. var hostVersion = version;
  1968. // deviceType
  1969. var deviceType = getGetDeviceType(result, model);
  1970. // deviceModel
  1971. var deviceBrand = getDeviceBrand(brand);
  1972. // hostName
  1973. var _hostName = getHostName(result);
  1974. // deviceOrientation
  1975. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  1976. // devicePixelRatio
  1977. var _devicePixelRatio = pixelRatio;
  1978. // SDKVersion
  1979. var _SDKVersion = SDKVersion;
  1980. // hostLanguage
  1981. var hostLanguage = language.replace(/_/g, '-');
  1982. // wx.getAccountInfoSync
  1983. var parameters = {
  1984. appId: "__UNI__B46B675",
  1985. appName: "kklbWe",
  1986. appVersion: "1.0.0",
  1987. appVersionCode: "100",
  1988. appLanguage: getAppLanguage(hostLanguage),
  1989. uniCompileVersion: "3.8.12",
  1990. uniRuntimeVersion: "3.8.12",
  1991. uniPlatform: undefined || "mp-weixin",
  1992. deviceBrand: deviceBrand,
  1993. deviceModel: model,
  1994. deviceType: deviceType,
  1995. devicePixelRatio: _devicePixelRatio,
  1996. deviceOrientation: _deviceOrientation,
  1997. osName: osName.toLocaleLowerCase(),
  1998. osVersion: osVersion,
  1999. hostTheme: theme,
  2000. hostVersion: hostVersion,
  2001. hostLanguage: hostLanguage,
  2002. hostName: _hostName,
  2003. hostSDKVersion: _SDKVersion,
  2004. hostFontSizeSetting: fontSizeSetting,
  2005. windowTop: 0,
  2006. windowBottom: 0,
  2007. // TODO
  2008. osLanguage: undefined,
  2009. osTheme: undefined,
  2010. ua: undefined,
  2011. hostPackageName: undefined,
  2012. browserName: undefined,
  2013. browserVersion: undefined
  2014. };
  2015. Object.assign(result, parameters, extraParam);
  2016. }
  2017. function getGetDeviceType(result, model) {
  2018. var deviceType = result.deviceType || 'phone';
  2019. {
  2020. var deviceTypeMaps = {
  2021. ipad: 'pad',
  2022. windows: 'pc',
  2023. mac: 'pc'
  2024. };
  2025. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  2026. var _model = model.toLocaleLowerCase();
  2027. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  2028. var _m = deviceTypeMapsKeys[index];
  2029. if (_model.indexOf(_m) !== -1) {
  2030. deviceType = deviceTypeMaps[_m];
  2031. break;
  2032. }
  2033. }
  2034. }
  2035. return deviceType;
  2036. }
  2037. function getDeviceBrand(brand) {
  2038. var deviceBrand = brand;
  2039. if (deviceBrand) {
  2040. deviceBrand = brand.toLocaleLowerCase();
  2041. }
  2042. return deviceBrand;
  2043. }
  2044. function getAppLanguage(defaultLanguage) {
  2045. return getLocale$1 ? getLocale$1() : defaultLanguage;
  2046. }
  2047. function getHostName(result) {
  2048. var _platform = 'WeChat';
  2049. var _hostName = result.hostName || _platform; // mp-jd
  2050. {
  2051. if (result.environment) {
  2052. _hostName = result.environment;
  2053. } else if (result.host && result.host.env) {
  2054. _hostName = result.host.env;
  2055. }
  2056. }
  2057. return _hostName;
  2058. }
  2059. var getSystemInfo = {
  2060. returnValue: function returnValue(result) {
  2061. useDeviceId(result);
  2062. addSafeAreaInsets(result);
  2063. populateParameters(result);
  2064. }
  2065. };
  2066. var showActionSheet = {
  2067. args: function args(fromArgs) {
  2068. if ((0, _typeof2.default)(fromArgs) === 'object') {
  2069. fromArgs.alertText = fromArgs.title;
  2070. }
  2071. }
  2072. };
  2073. var getAppBaseInfo = {
  2074. returnValue: function returnValue(result) {
  2075. var _result = result,
  2076. version = _result.version,
  2077. language = _result.language,
  2078. SDKVersion = _result.SDKVersion,
  2079. theme = _result.theme;
  2080. var _hostName = getHostName(result);
  2081. var hostLanguage = language.replace('_', '-');
  2082. result = sortObject(Object.assign(result, {
  2083. appId: "__UNI__B46B675",
  2084. appName: "kklbWe",
  2085. appVersion: "1.0.0",
  2086. appVersionCode: "100",
  2087. appLanguage: getAppLanguage(hostLanguage),
  2088. hostVersion: version,
  2089. hostLanguage: hostLanguage,
  2090. hostName: _hostName,
  2091. hostSDKVersion: SDKVersion,
  2092. hostTheme: theme
  2093. }));
  2094. }
  2095. };
  2096. var getDeviceInfo = {
  2097. returnValue: function returnValue(result) {
  2098. var _result2 = result,
  2099. brand = _result2.brand,
  2100. model = _result2.model;
  2101. var deviceType = getGetDeviceType(result, model);
  2102. var deviceBrand = getDeviceBrand(brand);
  2103. useDeviceId(result);
  2104. result = sortObject(Object.assign(result, {
  2105. deviceType: deviceType,
  2106. deviceBrand: deviceBrand,
  2107. deviceModel: model
  2108. }));
  2109. }
  2110. };
  2111. var getWindowInfo = {
  2112. returnValue: function returnValue(result) {
  2113. addSafeAreaInsets(result);
  2114. result = sortObject(Object.assign(result, {
  2115. windowTop: 0,
  2116. windowBottom: 0
  2117. }));
  2118. }
  2119. };
  2120. var getAppAuthorizeSetting = {
  2121. returnValue: function returnValue(result) {
  2122. var locationReducedAccuracy = result.locationReducedAccuracy;
  2123. result.locationAccuracy = 'unsupported';
  2124. if (locationReducedAccuracy === true) {
  2125. result.locationAccuracy = 'reduced';
  2126. } else if (locationReducedAccuracy === false) {
  2127. result.locationAccuracy = 'full';
  2128. }
  2129. }
  2130. };
  2131. // import navigateTo from 'uni-helpers/navigate-to'
  2132. var compressImage = {
  2133. args: function args(fromArgs) {
  2134. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  2135. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  2136. fromArgs.compressHeight = fromArgs.compressedHeight;
  2137. }
  2138. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  2139. fromArgs.compressWidth = fromArgs.compressedWidth;
  2140. }
  2141. }
  2142. };
  2143. var protocols = {
  2144. redirectTo: redirectTo,
  2145. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  2146. previewImage: previewImage,
  2147. getSystemInfo: getSystemInfo,
  2148. getSystemInfoSync: getSystemInfo,
  2149. showActionSheet: showActionSheet,
  2150. getAppBaseInfo: getAppBaseInfo,
  2151. getDeviceInfo: getDeviceInfo,
  2152. getWindowInfo: getWindowInfo,
  2153. getAppAuthorizeSetting: getAppAuthorizeSetting,
  2154. compressImage: compressImage
  2155. };
  2156. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  2157. var canIUses = [];
  2158. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  2159. function processCallback(methodName, method, returnValue) {
  2160. return function (res) {
  2161. return method(processReturnValue(methodName, res, returnValue));
  2162. };
  2163. }
  2164. function processArgs(methodName, fromArgs) {
  2165. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2166. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  2167. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  2168. if (isPlainObject(fromArgs)) {
  2169. // 一般 api 的参数解析
  2170. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  2171. if (isFn(argsOption)) {
  2172. argsOption = argsOption(fromArgs, toArgs) || {};
  2173. }
  2174. for (var key in fromArgs) {
  2175. if (hasOwn(argsOption, key)) {
  2176. var keyOption = argsOption[key];
  2177. if (isFn(keyOption)) {
  2178. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  2179. }
  2180. if (!keyOption) {
  2181. // 不支持的参数
  2182. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  2183. } else if (isStr(keyOption)) {
  2184. // 重写参数 key
  2185. toArgs[keyOption] = fromArgs[key];
  2186. } else if (isPlainObject(keyOption)) {
  2187. // {name:newName,value:value}可重新指定参数 key:value
  2188. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  2189. }
  2190. } else if (CALLBACKS.indexOf(key) !== -1) {
  2191. if (isFn(fromArgs[key])) {
  2192. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  2193. }
  2194. } else {
  2195. if (!keepFromArgs) {
  2196. toArgs[key] = fromArgs[key];
  2197. }
  2198. }
  2199. }
  2200. return toArgs;
  2201. } else if (isFn(fromArgs)) {
  2202. fromArgs = processCallback(methodName, fromArgs, returnValue);
  2203. }
  2204. return fromArgs;
  2205. }
  2206. function processReturnValue(methodName, res, returnValue) {
  2207. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  2208. if (isFn(protocols.returnValue)) {
  2209. // 处理通用 returnValue
  2210. res = protocols.returnValue(methodName, res);
  2211. }
  2212. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  2213. }
  2214. function wrapper(methodName, method) {
  2215. if (hasOwn(protocols, methodName)) {
  2216. var protocol = protocols[methodName];
  2217. if (!protocol) {
  2218. // 暂不支持的 api
  2219. return function () {
  2220. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  2221. };
  2222. }
  2223. return function (arg1, arg2) {
  2224. // 目前 api 最多两个参数
  2225. var options = protocol;
  2226. if (isFn(protocol)) {
  2227. options = protocol(arg1);
  2228. }
  2229. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  2230. var args = [arg1];
  2231. if (typeof arg2 !== 'undefined') {
  2232. args.push(arg2);
  2233. }
  2234. if (isFn(options.name)) {
  2235. methodName = options.name(arg1);
  2236. } else if (isStr(options.name)) {
  2237. methodName = options.name;
  2238. }
  2239. var returnValue = wx[methodName].apply(wx, args);
  2240. if (isSyncApi(methodName)) {
  2241. // 同步 api
  2242. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  2243. }
  2244. return returnValue;
  2245. };
  2246. }
  2247. return method;
  2248. }
  2249. var todoApis = Object.create(null);
  2250. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  2251. function createTodoApi(name) {
  2252. return function todoApi(_ref) {
  2253. var fail = _ref.fail,
  2254. complete = _ref.complete;
  2255. var res = {
  2256. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  2257. };
  2258. isFn(fail) && fail(res);
  2259. isFn(complete) && complete(res);
  2260. };
  2261. }
  2262. TODOS.forEach(function (name) {
  2263. todoApis[name] = createTodoApi(name);
  2264. });
  2265. var providers = {
  2266. oauth: ['weixin'],
  2267. share: ['weixin'],
  2268. payment: ['wxpay'],
  2269. push: ['weixin']
  2270. };
  2271. function getProvider(_ref2) {
  2272. var service = _ref2.service,
  2273. success = _ref2.success,
  2274. fail = _ref2.fail,
  2275. complete = _ref2.complete;
  2276. var res = false;
  2277. if (providers[service]) {
  2278. res = {
  2279. errMsg: 'getProvider:ok',
  2280. service: service,
  2281. provider: providers[service]
  2282. };
  2283. isFn(success) && success(res);
  2284. } else {
  2285. res = {
  2286. errMsg: 'getProvider:fail service not found'
  2287. };
  2288. isFn(fail) && fail(res);
  2289. }
  2290. isFn(complete) && complete(res);
  2291. }
  2292. var extraApi = /*#__PURE__*/Object.freeze({
  2293. __proto__: null,
  2294. getProvider: getProvider
  2295. });
  2296. var getEmitter = function () {
  2297. var Emitter;
  2298. return function getUniEmitter() {
  2299. if (!Emitter) {
  2300. Emitter = new _vue.default();
  2301. }
  2302. return Emitter;
  2303. };
  2304. }();
  2305. function apply(ctx, method, args) {
  2306. return ctx[method].apply(ctx, args);
  2307. }
  2308. function $on() {
  2309. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  2310. }
  2311. function $off() {
  2312. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  2313. }
  2314. function $once() {
  2315. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  2316. }
  2317. function $emit() {
  2318. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  2319. }
  2320. var eventApi = /*#__PURE__*/Object.freeze({
  2321. __proto__: null,
  2322. $on: $on,
  2323. $off: $off,
  2324. $once: $once,
  2325. $emit: $emit
  2326. });
  2327. /**
  2328. * 框架内 try-catch
  2329. */
  2330. /**
  2331. * 开发者 try-catch
  2332. */
  2333. function tryCatch(fn) {
  2334. return function () {
  2335. try {
  2336. return fn.apply(fn, arguments);
  2337. } catch (e) {
  2338. // TODO
  2339. console.error(e);
  2340. }
  2341. };
  2342. }
  2343. function getApiCallbacks(params) {
  2344. var apiCallbacks = {};
  2345. for (var name in params) {
  2346. var param = params[name];
  2347. if (isFn(param)) {
  2348. apiCallbacks[name] = tryCatch(param);
  2349. delete params[name];
  2350. }
  2351. }
  2352. return apiCallbacks;
  2353. }
  2354. var cid;
  2355. var cidErrMsg;
  2356. var enabled;
  2357. function normalizePushMessage(message) {
  2358. try {
  2359. return JSON.parse(message);
  2360. } catch (e) {}
  2361. return message;
  2362. }
  2363. function invokePushCallback(args) {
  2364. if (args.type === 'enabled') {
  2365. enabled = true;
  2366. } else if (args.type === 'clientId') {
  2367. cid = args.cid;
  2368. cidErrMsg = args.errMsg;
  2369. invokeGetPushCidCallbacks(cid, args.errMsg);
  2370. } else if (args.type === 'pushMsg') {
  2371. var message = {
  2372. type: 'receive',
  2373. data: normalizePushMessage(args.message)
  2374. };
  2375. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  2376. var callback = onPushMessageCallbacks[i];
  2377. callback(message);
  2378. // 该消息已被阻止
  2379. if (message.stopped) {
  2380. break;
  2381. }
  2382. }
  2383. } else if (args.type === 'click') {
  2384. onPushMessageCallbacks.forEach(function (callback) {
  2385. callback({
  2386. type: 'click',
  2387. data: normalizePushMessage(args.message)
  2388. });
  2389. });
  2390. }
  2391. }
  2392. var getPushCidCallbacks = [];
  2393. function invokeGetPushCidCallbacks(cid, errMsg) {
  2394. getPushCidCallbacks.forEach(function (callback) {
  2395. callback(cid, errMsg);
  2396. });
  2397. getPushCidCallbacks.length = 0;
  2398. }
  2399. function getPushClientId(args) {
  2400. if (!isPlainObject(args)) {
  2401. args = {};
  2402. }
  2403. var _getApiCallbacks = getApiCallbacks(args),
  2404. success = _getApiCallbacks.success,
  2405. fail = _getApiCallbacks.fail,
  2406. complete = _getApiCallbacks.complete;
  2407. var hasSuccess = isFn(success);
  2408. var hasFail = isFn(fail);
  2409. var hasComplete = isFn(complete);
  2410. Promise.resolve().then(function () {
  2411. if (typeof enabled === 'undefined') {
  2412. enabled = false;
  2413. cid = '';
  2414. cidErrMsg = 'uniPush is not enabled';
  2415. }
  2416. getPushCidCallbacks.push(function (cid, errMsg) {
  2417. var res;
  2418. if (cid) {
  2419. res = {
  2420. errMsg: 'getPushClientId:ok',
  2421. cid: cid
  2422. };
  2423. hasSuccess && success(res);
  2424. } else {
  2425. res = {
  2426. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  2427. };
  2428. hasFail && fail(res);
  2429. }
  2430. hasComplete && complete(res);
  2431. });
  2432. if (typeof cid !== 'undefined') {
  2433. invokeGetPushCidCallbacks(cid, cidErrMsg);
  2434. }
  2435. });
  2436. }
  2437. var onPushMessageCallbacks = [];
  2438. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  2439. var onPushMessage = function onPushMessage(fn) {
  2440. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  2441. onPushMessageCallbacks.push(fn);
  2442. }
  2443. };
  2444. var offPushMessage = function offPushMessage(fn) {
  2445. if (!fn) {
  2446. onPushMessageCallbacks.length = 0;
  2447. } else {
  2448. var index = onPushMessageCallbacks.indexOf(fn);
  2449. if (index > -1) {
  2450. onPushMessageCallbacks.splice(index, 1);
  2451. }
  2452. }
  2453. };
  2454. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  2455. if (!baseInfo) {
  2456. baseInfo = wx.getSystemInfoSync();
  2457. }
  2458. var host = baseInfo ? baseInfo.host : null;
  2459. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  2460. var api = /*#__PURE__*/Object.freeze({
  2461. __proto__: null,
  2462. shareVideoMessage: shareVideoMessage,
  2463. getPushClientId: getPushClientId,
  2464. onPushMessage: onPushMessage,
  2465. offPushMessage: offPushMessage,
  2466. invokePushCallback: invokePushCallback
  2467. });
  2468. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  2469. function findVmByVueId(vm, vuePid) {
  2470. var $children = vm.$children;
  2471. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  2472. for (var i = $children.length - 1; i >= 0; i--) {
  2473. var childVm = $children[i];
  2474. if (childVm.$scope._$vueId === vuePid) {
  2475. return childVm;
  2476. }
  2477. }
  2478. // 反向递归查找
  2479. var parentVm;
  2480. for (var _i = $children.length - 1; _i >= 0; _i--) {
  2481. parentVm = findVmByVueId($children[_i], vuePid);
  2482. if (parentVm) {
  2483. return parentVm;
  2484. }
  2485. }
  2486. }
  2487. function initBehavior(options) {
  2488. return Behavior(options);
  2489. }
  2490. function isPage() {
  2491. return !!this.route;
  2492. }
  2493. function initRelation(detail) {
  2494. this.triggerEvent('__l', detail);
  2495. }
  2496. function selectAllComponents(mpInstance, selector, $refs) {
  2497. var components = mpInstance.selectAllComponents(selector) || [];
  2498. components.forEach(function (component) {
  2499. var ref = component.dataset.ref;
  2500. $refs[ref] = component.$vm || toSkip(component);
  2501. {
  2502. if (component.dataset.vueGeneric === 'scoped') {
  2503. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  2504. selectAllComponents(scopedComponent, selector, $refs);
  2505. });
  2506. }
  2507. }
  2508. });
  2509. }
  2510. function syncRefs(refs, newRefs) {
  2511. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  2512. var newKeys = Object.keys(newRefs);
  2513. newKeys.forEach(function (key) {
  2514. var oldValue = refs[key];
  2515. var newValue = newRefs[key];
  2516. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  2517. return oldValue.includes(value);
  2518. })) {
  2519. return;
  2520. }
  2521. refs[key] = newValue;
  2522. oldKeys.delete(key);
  2523. });
  2524. oldKeys.forEach(function (key) {
  2525. delete refs[key];
  2526. });
  2527. return refs;
  2528. }
  2529. function initRefs(vm) {
  2530. var mpInstance = vm.$scope;
  2531. var refs = {};
  2532. Object.defineProperty(vm, '$refs', {
  2533. get: function get() {
  2534. var $refs = {};
  2535. selectAllComponents(mpInstance, '.vue-ref', $refs);
  2536. // TODO 暂不考虑 for 中的 scoped
  2537. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  2538. forComponents.forEach(function (component) {
  2539. var ref = component.dataset.ref;
  2540. if (!$refs[ref]) {
  2541. $refs[ref] = [];
  2542. }
  2543. $refs[ref].push(component.$vm || toSkip(component));
  2544. });
  2545. return syncRefs(refs, $refs);
  2546. }
  2547. });
  2548. }
  2549. function handleLink(event) {
  2550. var _ref3 = event.detail || event.value,
  2551. vuePid = _ref3.vuePid,
  2552. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  2553. var parentVm;
  2554. if (vuePid) {
  2555. parentVm = findVmByVueId(this.$vm, vuePid);
  2556. }
  2557. if (!parentVm) {
  2558. parentVm = this.$vm;
  2559. }
  2560. vueOptions.parent = parentVm;
  2561. }
  2562. function markMPComponent(component) {
  2563. // 在 Vue 中标记为小程序组件
  2564. var IS_MP = '__v_isMPComponent';
  2565. Object.defineProperty(component, IS_MP, {
  2566. configurable: true,
  2567. enumerable: false,
  2568. value: true
  2569. });
  2570. return component;
  2571. }
  2572. function toSkip(obj) {
  2573. var OB = '__ob__';
  2574. var SKIP = '__v_skip';
  2575. if (isObject(obj) && Object.isExtensible(obj)) {
  2576. // 避免被 @vue/composition-api 观测
  2577. Object.defineProperty(obj, OB, {
  2578. configurable: true,
  2579. enumerable: false,
  2580. value: (0, _defineProperty2.default)({}, SKIP, true)
  2581. });
  2582. }
  2583. return obj;
  2584. }
  2585. var WORKLET_RE = /_(.*)_worklet_factory_/;
  2586. function initWorkletMethods(mpMethods, vueMethods) {
  2587. if (vueMethods) {
  2588. Object.keys(vueMethods).forEach(function (name) {
  2589. var matches = name.match(WORKLET_RE);
  2590. if (matches) {
  2591. var workletName = matches[1];
  2592. mpMethods[name] = vueMethods[name];
  2593. mpMethods[workletName] = vueMethods[workletName];
  2594. }
  2595. });
  2596. }
  2597. }
  2598. var MPPage = Page;
  2599. var MPComponent = Component;
  2600. var customizeRE = /:/g;
  2601. var customize = cached(function (str) {
  2602. return camelize(str.replace(customizeRE, '-'));
  2603. });
  2604. function initTriggerEvent(mpInstance) {
  2605. var oldTriggerEvent = mpInstance.triggerEvent;
  2606. var newTriggerEvent = function newTriggerEvent(event) {
  2607. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  2608. args[_key3 - 1] = arguments[_key3];
  2609. }
  2610. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  2611. if (this.$vm || this.dataset && this.dataset.comType) {
  2612. event = customize(event);
  2613. } else {
  2614. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  2615. var newEvent = customize(event);
  2616. if (newEvent !== event) {
  2617. oldTriggerEvent.apply(this, [newEvent].concat(args));
  2618. }
  2619. }
  2620. return oldTriggerEvent.apply(this, [event].concat(args));
  2621. };
  2622. try {
  2623. // 京东小程序 triggerEvent 为只读
  2624. mpInstance.triggerEvent = newTriggerEvent;
  2625. } catch (error) {
  2626. mpInstance._triggerEvent = newTriggerEvent;
  2627. }
  2628. }
  2629. function initHook(name, options, isComponent) {
  2630. var oldHook = options[name];
  2631. options[name] = function () {
  2632. markMPComponent(this);
  2633. initTriggerEvent(this);
  2634. if (oldHook) {
  2635. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  2636. args[_key4] = arguments[_key4];
  2637. }
  2638. return oldHook.apply(this, args);
  2639. }
  2640. };
  2641. }
  2642. if (!MPPage.__$wrappered) {
  2643. MPPage.__$wrappered = true;
  2644. Page = function Page() {
  2645. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  2646. initHook('onLoad', options);
  2647. return MPPage(options);
  2648. };
  2649. Page.after = MPPage.after;
  2650. Component = function Component() {
  2651. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  2652. initHook('created', options);
  2653. return MPComponent(options);
  2654. };
  2655. }
  2656. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  2657. function initMocks(vm, mocks) {
  2658. var mpInstance = vm.$mp[vm.mpType];
  2659. mocks.forEach(function (mock) {
  2660. if (hasOwn(mpInstance, mock)) {
  2661. vm[mock] = mpInstance[mock];
  2662. }
  2663. });
  2664. }
  2665. function hasHook(hook, vueOptions) {
  2666. if (!vueOptions) {
  2667. return true;
  2668. }
  2669. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  2670. return true;
  2671. }
  2672. vueOptions = vueOptions.default || vueOptions;
  2673. if (isFn(vueOptions)) {
  2674. if (isFn(vueOptions.extendOptions[hook])) {
  2675. return true;
  2676. }
  2677. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  2678. return true;
  2679. }
  2680. return false;
  2681. }
  2682. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  2683. return true;
  2684. }
  2685. var mixins = vueOptions.mixins;
  2686. if (Array.isArray(mixins)) {
  2687. return !!mixins.find(function (mixin) {
  2688. return hasHook(hook, mixin);
  2689. });
  2690. }
  2691. }
  2692. function initHooks(mpOptions, hooks, vueOptions) {
  2693. hooks.forEach(function (hook) {
  2694. if (hasHook(hook, vueOptions)) {
  2695. mpOptions[hook] = function (args) {
  2696. return this.$vm && this.$vm.__call_hook(hook, args);
  2697. };
  2698. }
  2699. });
  2700. }
  2701. function initUnknownHooks(mpOptions, vueOptions) {
  2702. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  2703. findHooks(vueOptions).forEach(function (hook) {
  2704. return initHook$1(mpOptions, hook, excludes);
  2705. });
  2706. }
  2707. function findHooks(vueOptions) {
  2708. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  2709. if (vueOptions) {
  2710. Object.keys(vueOptions).forEach(function (name) {
  2711. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  2712. hooks.push(name);
  2713. }
  2714. });
  2715. }
  2716. return hooks;
  2717. }
  2718. function initHook$1(mpOptions, hook, excludes) {
  2719. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  2720. mpOptions[hook] = function (args) {
  2721. return this.$vm && this.$vm.__call_hook(hook, args);
  2722. };
  2723. }
  2724. }
  2725. function initVueComponent(Vue, vueOptions) {
  2726. vueOptions = vueOptions.default || vueOptions;
  2727. var VueComponent;
  2728. if (isFn(vueOptions)) {
  2729. VueComponent = vueOptions;
  2730. } else {
  2731. VueComponent = Vue.extend(vueOptions);
  2732. }
  2733. vueOptions = VueComponent.options;
  2734. return [VueComponent, vueOptions];
  2735. }
  2736. function initSlots(vm, vueSlots) {
  2737. if (Array.isArray(vueSlots) && vueSlots.length) {
  2738. var $slots = Object.create(null);
  2739. vueSlots.forEach(function (slotName) {
  2740. $slots[slotName] = true;
  2741. });
  2742. vm.$scopedSlots = vm.$slots = $slots;
  2743. }
  2744. }
  2745. function initVueIds(vueIds, mpInstance) {
  2746. vueIds = (vueIds || '').split(',');
  2747. var len = vueIds.length;
  2748. if (len === 1) {
  2749. mpInstance._$vueId = vueIds[0];
  2750. } else if (len === 2) {
  2751. mpInstance._$vueId = vueIds[0];
  2752. mpInstance._$vuePid = vueIds[1];
  2753. }
  2754. }
  2755. function initData(vueOptions, context) {
  2756. var data = vueOptions.data || {};
  2757. var methods = vueOptions.methods || {};
  2758. if (typeof data === 'function') {
  2759. try {
  2760. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  2761. } catch (e) {
  2762. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kklbWe","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  2763. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  2764. }
  2765. }
  2766. } else {
  2767. try {
  2768. // 对 data 格式化
  2769. data = JSON.parse(JSON.stringify(data));
  2770. } catch (e) {}
  2771. }
  2772. if (!isPlainObject(data)) {
  2773. data = {};
  2774. }
  2775. Object.keys(methods).forEach(function (methodName) {
  2776. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  2777. data[methodName] = methods[methodName];
  2778. }
  2779. });
  2780. return data;
  2781. }
  2782. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  2783. function createObserver(name) {
  2784. return function observer(newVal, oldVal) {
  2785. if (this.$vm) {
  2786. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  2787. }
  2788. };
  2789. }
  2790. function initBehaviors(vueOptions, initBehavior) {
  2791. var vueBehaviors = vueOptions.behaviors;
  2792. var vueExtends = vueOptions.extends;
  2793. var vueMixins = vueOptions.mixins;
  2794. var vueProps = vueOptions.props;
  2795. if (!vueProps) {
  2796. vueOptions.props = vueProps = [];
  2797. }
  2798. var behaviors = [];
  2799. if (Array.isArray(vueBehaviors)) {
  2800. vueBehaviors.forEach(function (behavior) {
  2801. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  2802. if (behavior === 'uni://form-field') {
  2803. if (Array.isArray(vueProps)) {
  2804. vueProps.push('name');
  2805. vueProps.push('value');
  2806. } else {
  2807. vueProps.name = {
  2808. type: String,
  2809. default: ''
  2810. };
  2811. vueProps.value = {
  2812. type: [String, Number, Boolean, Array, Object, Date],
  2813. default: ''
  2814. };
  2815. }
  2816. }
  2817. });
  2818. }
  2819. if (isPlainObject(vueExtends) && vueExtends.props) {
  2820. behaviors.push(initBehavior({
  2821. properties: initProperties(vueExtends.props, true)
  2822. }));
  2823. }
  2824. if (Array.isArray(vueMixins)) {
  2825. vueMixins.forEach(function (vueMixin) {
  2826. if (isPlainObject(vueMixin) && vueMixin.props) {
  2827. behaviors.push(initBehavior({
  2828. properties: initProperties(vueMixin.props, true)
  2829. }));
  2830. }
  2831. });
  2832. }
  2833. return behaviors;
  2834. }
  2835. function parsePropType(key, type, defaultValue, file) {
  2836. // [String]=>String
  2837. if (Array.isArray(type) && type.length === 1) {
  2838. return type[0];
  2839. }
  2840. return type;
  2841. }
  2842. function initProperties(props) {
  2843. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  2844. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  2845. var options = arguments.length > 3 ? arguments[3] : undefined;
  2846. var properties = {};
  2847. if (!isBehavior) {
  2848. properties.vueId = {
  2849. type: String,
  2850. value: ''
  2851. };
  2852. {
  2853. if (options.virtualHost) {
  2854. properties.virtualHostStyle = {
  2855. type: null,
  2856. value: ''
  2857. };
  2858. properties.virtualHostClass = {
  2859. type: null,
  2860. value: ''
  2861. };
  2862. }
  2863. }
  2864. // scopedSlotsCompiler auto
  2865. properties.scopedSlotsCompiler = {
  2866. type: String,
  2867. value: ''
  2868. };
  2869. properties.vueSlots = {
  2870. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  2871. type: null,
  2872. value: [],
  2873. observer: function observer(newVal, oldVal) {
  2874. var $slots = Object.create(null);
  2875. newVal.forEach(function (slotName) {
  2876. $slots[slotName] = true;
  2877. });
  2878. this.setData({
  2879. $slots: $slots
  2880. });
  2881. }
  2882. };
  2883. }
  2884. if (Array.isArray(props)) {
  2885. // ['title']
  2886. props.forEach(function (key) {
  2887. properties[key] = {
  2888. type: null,
  2889. observer: createObserver(key)
  2890. };
  2891. });
  2892. } else if (isPlainObject(props)) {
  2893. // {title:{type:String,default:''},content:String}
  2894. Object.keys(props).forEach(function (key) {
  2895. var opts = props[key];
  2896. if (isPlainObject(opts)) {
  2897. // title:{type:String,default:''}
  2898. var value = opts.default;
  2899. if (isFn(value)) {
  2900. value = value();
  2901. }
  2902. opts.type = parsePropType(key, opts.type);
  2903. properties[key] = {
  2904. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  2905. value: value,
  2906. observer: createObserver(key)
  2907. };
  2908. } else {
  2909. // content:String
  2910. var type = parsePropType(key, opts);
  2911. properties[key] = {
  2912. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  2913. observer: createObserver(key)
  2914. };
  2915. }
  2916. });
  2917. }
  2918. return properties;
  2919. }
  2920. function wrapper$1(event) {
  2921. // TODO 又得兼容 mpvue 的 mp 对象
  2922. try {
  2923. event.mp = JSON.parse(JSON.stringify(event));
  2924. } catch (e) {}
  2925. event.stopPropagation = noop;
  2926. event.preventDefault = noop;
  2927. event.target = event.target || {};
  2928. if (!hasOwn(event, 'detail')) {
  2929. event.detail = {};
  2930. }
  2931. if (hasOwn(event, 'markerId')) {
  2932. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  2933. event.detail.markerId = event.markerId;
  2934. }
  2935. if (isPlainObject(event.detail)) {
  2936. event.target = Object.assign({}, event.target, event.detail);
  2937. }
  2938. return event;
  2939. }
  2940. function getExtraValue(vm, dataPathsArray) {
  2941. var context = vm;
  2942. dataPathsArray.forEach(function (dataPathArray) {
  2943. var dataPath = dataPathArray[0];
  2944. var value = dataPathArray[2];
  2945. if (dataPath || typeof value !== 'undefined') {
  2946. // ['','',index,'disable']
  2947. var propPath = dataPathArray[1];
  2948. var valuePath = dataPathArray[3];
  2949. var vFor;
  2950. if (Number.isInteger(dataPath)) {
  2951. vFor = dataPath;
  2952. } else if (!dataPath) {
  2953. vFor = context;
  2954. } else if (typeof dataPath === 'string' && dataPath) {
  2955. if (dataPath.indexOf('#s#') === 0) {
  2956. vFor = dataPath.substr(3);
  2957. } else {
  2958. vFor = vm.__get_value(dataPath, context);
  2959. }
  2960. }
  2961. if (Number.isInteger(vFor)) {
  2962. context = value;
  2963. } else if (!propPath) {
  2964. context = vFor[value];
  2965. } else {
  2966. if (Array.isArray(vFor)) {
  2967. context = vFor.find(function (vForItem) {
  2968. return vm.__get_value(propPath, vForItem) === value;
  2969. });
  2970. } else if (isPlainObject(vFor)) {
  2971. context = Object.keys(vFor).find(function (vForKey) {
  2972. return vm.__get_value(propPath, vFor[vForKey]) === value;
  2973. });
  2974. } else {
  2975. console.error('v-for 暂不支持循环数据:', vFor);
  2976. }
  2977. }
  2978. if (valuePath) {
  2979. context = vm.__get_value(valuePath, context);
  2980. }
  2981. }
  2982. });
  2983. return context;
  2984. }
  2985. function processEventExtra(vm, extra, event, __args__) {
  2986. var extraObj = {};
  2987. if (Array.isArray(extra) && extra.length) {
  2988. /**
  2989. *[
  2990. * ['data.items', 'data.id', item.data.id],
  2991. * ['metas', 'id', meta.id]
  2992. *],
  2993. *[
  2994. * ['data.items', 'data.id', item.data.id],
  2995. * ['metas', 'id', meta.id]
  2996. *],
  2997. *'test'
  2998. */
  2999. extra.forEach(function (dataPath, index) {
  3000. if (typeof dataPath === 'string') {
  3001. if (!dataPath) {
  3002. // model,prop.sync
  3003. extraObj['$' + index] = vm;
  3004. } else {
  3005. if (dataPath === '$event') {
  3006. // $event
  3007. extraObj['$' + index] = event;
  3008. } else if (dataPath === 'arguments') {
  3009. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  3010. } else if (dataPath.indexOf('$event.') === 0) {
  3011. // $event.target.value
  3012. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  3013. } else {
  3014. extraObj['$' + index] = vm.__get_value(dataPath);
  3015. }
  3016. }
  3017. } else {
  3018. extraObj['$' + index] = getExtraValue(vm, dataPath);
  3019. }
  3020. });
  3021. }
  3022. return extraObj;
  3023. }
  3024. function getObjByArray(arr) {
  3025. var obj = {};
  3026. for (var i = 1; i < arr.length; i++) {
  3027. var element = arr[i];
  3028. obj[element[0]] = element[1];
  3029. }
  3030. return obj;
  3031. }
  3032. function processEventArgs(vm, event) {
  3033. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  3034. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  3035. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  3036. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  3037. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  3038. // fixed 用户直接触发 mpInstance.triggerEvent
  3039. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  3040. if (isCustom) {
  3041. // 自定义事件
  3042. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  3043. if (!args.length) {
  3044. // 无参数,直接传入 event 或 detail 数组
  3045. if (isCustomMPEvent) {
  3046. return [event];
  3047. }
  3048. return __args__;
  3049. }
  3050. }
  3051. var extraObj = processEventExtra(vm, extra, event, __args__);
  3052. var ret = [];
  3053. args.forEach(function (arg) {
  3054. if (arg === '$event') {
  3055. if (methodName === '__set_model' && !isCustom) {
  3056. // input v-model value
  3057. ret.push(event.target.value);
  3058. } else {
  3059. if (isCustom && !isCustomMPEvent) {
  3060. ret.push(__args__[0]);
  3061. } else {
  3062. // wxcomponent 组件或内置组件
  3063. ret.push(event);
  3064. }
  3065. }
  3066. } else {
  3067. if (Array.isArray(arg) && arg[0] === 'o') {
  3068. ret.push(getObjByArray(arg));
  3069. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  3070. ret.push(extraObj[arg]);
  3071. } else {
  3072. ret.push(arg);
  3073. }
  3074. }
  3075. });
  3076. return ret;
  3077. }
  3078. var ONCE = '~';
  3079. var CUSTOM = '^';
  3080. function isMatchEventType(eventType, optType) {
  3081. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  3082. }
  3083. function getContextVm(vm) {
  3084. var $parent = vm.$parent;
  3085. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  3086. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  3087. $parent = $parent.$parent;
  3088. }
  3089. return $parent && $parent.$parent;
  3090. }
  3091. function handleEvent(event) {
  3092. var _this2 = this;
  3093. event = wrapper$1(event);
  3094. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  3095. var dataset = (event.currentTarget || event.target).dataset;
  3096. if (!dataset) {
  3097. return console.warn('事件信息不存在');
  3098. }
  3099. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  3100. if (!eventOpts) {
  3101. return console.warn('事件信息不存在');
  3102. }
  3103. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  3104. var eventType = event.type;
  3105. var ret = [];
  3106. eventOpts.forEach(function (eventOpt) {
  3107. var type = eventOpt[0];
  3108. var eventsArray = eventOpt[1];
  3109. var isCustom = type.charAt(0) === CUSTOM;
  3110. type = isCustom ? type.slice(1) : type;
  3111. var isOnce = type.charAt(0) === ONCE;
  3112. type = isOnce ? type.slice(1) : type;
  3113. if (eventsArray && isMatchEventType(eventType, type)) {
  3114. eventsArray.forEach(function (eventArray) {
  3115. var methodName = eventArray[0];
  3116. if (methodName) {
  3117. var handlerCtx = _this2.$vm;
  3118. if (handlerCtx.$options.generic) {
  3119. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  3120. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  3121. }
  3122. if (methodName === '$emit') {
  3123. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  3124. return;
  3125. }
  3126. var handler = handlerCtx[methodName];
  3127. if (!isFn(handler)) {
  3128. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  3129. var path = _this2.route || _this2.is;
  3130. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  3131. }
  3132. if (isOnce) {
  3133. if (handler.once) {
  3134. return;
  3135. }
  3136. handler.once = true;
  3137. }
  3138. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  3139. params = Array.isArray(params) ? params : [];
  3140. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  3141. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  3142. // eslint-disable-next-line no-sparse-arrays
  3143. params = params.concat([,,,,,,,,,, event]);
  3144. }
  3145. ret.push(handler.apply(handlerCtx, params));
  3146. }
  3147. });
  3148. }
  3149. });
  3150. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  3151. return ret[0];
  3152. }
  3153. }
  3154. var eventChannels = {};
  3155. function getEventChannel(id) {
  3156. var eventChannel = eventChannels[id];
  3157. delete eventChannels[id];
  3158. return eventChannel;
  3159. }
  3160. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  3161. function initEventChannel() {
  3162. _vue.default.prototype.getOpenerEventChannel = function () {
  3163. // 微信小程序使用自身getOpenerEventChannel
  3164. {
  3165. return this.$scope.getOpenerEventChannel();
  3166. }
  3167. };
  3168. var callHook = _vue.default.prototype.__call_hook;
  3169. _vue.default.prototype.__call_hook = function (hook, args) {
  3170. if (hook === 'onLoad' && args && args.__id__) {
  3171. this.__eventChannel__ = getEventChannel(args.__id__);
  3172. delete args.__id__;
  3173. }
  3174. return callHook.call(this, hook, args);
  3175. };
  3176. }
  3177. function initScopedSlotsParams() {
  3178. var center = {};
  3179. var parents = {};
  3180. function currentId(fn) {
  3181. var vueIds = this.$options.propsData.vueId;
  3182. if (vueIds) {
  3183. var vueId = vueIds.split(',')[0];
  3184. fn(vueId);
  3185. }
  3186. }
  3187. _vue.default.prototype.$hasSSP = function (vueId) {
  3188. var slot = center[vueId];
  3189. if (!slot) {
  3190. parents[vueId] = this;
  3191. this.$on('hook:destroyed', function () {
  3192. delete parents[vueId];
  3193. });
  3194. }
  3195. return slot;
  3196. };
  3197. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  3198. var slot = center[vueId];
  3199. if (slot) {
  3200. var params = slot[name] || [];
  3201. if (needAll) {
  3202. return params;
  3203. }
  3204. return params[0];
  3205. }
  3206. };
  3207. _vue.default.prototype.$setSSP = function (name, value) {
  3208. var index = 0;
  3209. currentId.call(this, function (vueId) {
  3210. var slot = center[vueId];
  3211. var params = slot[name] = slot[name] || [];
  3212. params.push(value);
  3213. index = params.length - 1;
  3214. });
  3215. return index;
  3216. };
  3217. _vue.default.prototype.$initSSP = function () {
  3218. currentId.call(this, function (vueId) {
  3219. center[vueId] = {};
  3220. });
  3221. };
  3222. _vue.default.prototype.$callSSP = function () {
  3223. currentId.call(this, function (vueId) {
  3224. if (parents[vueId]) {
  3225. parents[vueId].$forceUpdate();
  3226. }
  3227. });
  3228. };
  3229. _vue.default.mixin({
  3230. destroyed: function destroyed() {
  3231. var propsData = this.$options.propsData;
  3232. var vueId = propsData && propsData.vueId;
  3233. if (vueId) {
  3234. delete center[vueId];
  3235. delete parents[vueId];
  3236. }
  3237. }
  3238. });
  3239. }
  3240. function parseBaseApp(vm, _ref4) {
  3241. var mocks = _ref4.mocks,
  3242. initRefs = _ref4.initRefs;
  3243. initEventChannel();
  3244. {
  3245. initScopedSlotsParams();
  3246. }
  3247. if (vm.$options.store) {
  3248. _vue.default.prototype.$store = vm.$options.store;
  3249. }
  3250. uniIdMixin(_vue.default);
  3251. _vue.default.prototype.mpHost = "mp-weixin";
  3252. _vue.default.mixin({
  3253. beforeCreate: function beforeCreate() {
  3254. if (!this.$options.mpType) {
  3255. return;
  3256. }
  3257. this.mpType = this.$options.mpType;
  3258. this.$mp = (0, _defineProperty2.default)({
  3259. data: {}
  3260. }, this.mpType, this.$options.mpInstance);
  3261. this.$scope = this.$options.mpInstance;
  3262. delete this.$options.mpType;
  3263. delete this.$options.mpInstance;
  3264. if (this.mpType === 'page' && typeof getApp === 'function') {
  3265. // hack vue-i18n
  3266. var app = getApp();
  3267. if (app.$vm && app.$vm.$i18n) {
  3268. this._i18n = app.$vm.$i18n;
  3269. }
  3270. }
  3271. if (this.mpType !== 'app') {
  3272. initRefs(this);
  3273. initMocks(this, mocks);
  3274. }
  3275. }
  3276. });
  3277. var appOptions = {
  3278. onLaunch: function onLaunch(args) {
  3279. if (this.$vm) {
  3280. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  3281. return;
  3282. }
  3283. {
  3284. if (wx.canIUse && !wx.canIUse('nextTick')) {
  3285. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  3286. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  3287. }
  3288. }
  3289. this.$vm = vm;
  3290. this.$vm.$mp = {
  3291. app: this
  3292. };
  3293. this.$vm.$scope = this;
  3294. // vm 上也挂载 globalData
  3295. this.$vm.globalData = this.globalData;
  3296. this.$vm._isMounted = true;
  3297. this.$vm.__call_hook('mounted', args);
  3298. this.$vm.__call_hook('onLaunch', args);
  3299. }
  3300. };
  3301. // 兼容旧版本 globalData
  3302. appOptions.globalData = vm.$options.globalData || {};
  3303. // 将 methods 中的方法挂在 getApp() 中
  3304. var methods = vm.$options.methods;
  3305. if (methods) {
  3306. Object.keys(methods).forEach(function (name) {
  3307. appOptions[name] = methods[name];
  3308. });
  3309. }
  3310. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  3311. initHooks(appOptions, hooks);
  3312. initUnknownHooks(appOptions, vm.$options);
  3313. return appOptions;
  3314. }
  3315. function parseApp(vm) {
  3316. return parseBaseApp(vm, {
  3317. mocks: mocks,
  3318. initRefs: initRefs
  3319. });
  3320. }
  3321. function createApp(vm) {
  3322. App(parseApp(vm));
  3323. return vm;
  3324. }
  3325. var encodeReserveRE = /[!'()*]/g;
  3326. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  3327. return '%' + c.charCodeAt(0).toString(16);
  3328. };
  3329. var commaRE = /%2C/g;
  3330. // fixed encodeURIComponent which is more conformant to RFC3986:
  3331. // - escapes [!'()*]
  3332. // - preserve commas
  3333. var encode = function encode(str) {
  3334. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  3335. };
  3336. function stringifyQuery(obj) {
  3337. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  3338. var res = obj ? Object.keys(obj).map(function (key) {
  3339. var val = obj[key];
  3340. if (val === undefined) {
  3341. return '';
  3342. }
  3343. if (val === null) {
  3344. return encodeStr(key);
  3345. }
  3346. if (Array.isArray(val)) {
  3347. var result = [];
  3348. val.forEach(function (val2) {
  3349. if (val2 === undefined) {
  3350. return;
  3351. }
  3352. if (val2 === null) {
  3353. result.push(encodeStr(key));
  3354. } else {
  3355. result.push(encodeStr(key) + '=' + encodeStr(val2));
  3356. }
  3357. });
  3358. return result.join('&');
  3359. }
  3360. return encodeStr(key) + '=' + encodeStr(val);
  3361. }).filter(function (x) {
  3362. return x.length > 0;
  3363. }).join('&') : null;
  3364. return res ? "?".concat(res) : '';
  3365. }
  3366. function parseBaseComponent(vueComponentOptions) {
  3367. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  3368. isPage = _ref5.isPage,
  3369. initRelation = _ref5.initRelation;
  3370. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  3371. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  3372. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  3373. VueComponent = _initVueComponent2[0],
  3374. vueOptions = _initVueComponent2[1];
  3375. var options = _objectSpread({
  3376. multipleSlots: true,
  3377. // styleIsolation: 'apply-shared',
  3378. addGlobalClass: true
  3379. }, vueOptions.options || {});
  3380. {
  3381. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  3382. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  3383. Object.assign(options, vueOptions['mp-weixin'].options);
  3384. }
  3385. }
  3386. var componentOptions = {
  3387. options: options,
  3388. data: initData(vueOptions, _vue.default.prototype),
  3389. behaviors: initBehaviors(vueOptions, initBehavior),
  3390. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  3391. lifetimes: {
  3392. attached: function attached() {
  3393. var properties = this.properties;
  3394. var options = {
  3395. mpType: isPage.call(this) ? 'page' : 'component',
  3396. mpInstance: this,
  3397. propsData: properties
  3398. };
  3399. initVueIds(properties.vueId, this);
  3400. // 处理父子关系
  3401. initRelation.call(this, {
  3402. vuePid: this._$vuePid,
  3403. vueOptions: options
  3404. });
  3405. // 初始化 vue 实例
  3406. this.$vm = new VueComponent(options);
  3407. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  3408. initSlots(this.$vm, properties.vueSlots);
  3409. // 触发首次 setData
  3410. this.$vm.$mount();
  3411. },
  3412. ready: function ready() {
  3413. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  3414. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  3415. if (this.$vm) {
  3416. this.$vm._isMounted = true;
  3417. this.$vm.__call_hook('mounted');
  3418. this.$vm.__call_hook('onReady');
  3419. }
  3420. },
  3421. detached: function detached() {
  3422. this.$vm && this.$vm.$destroy();
  3423. }
  3424. },
  3425. pageLifetimes: {
  3426. show: function show(args) {
  3427. this.$vm && this.$vm.__call_hook('onPageShow', args);
  3428. },
  3429. hide: function hide() {
  3430. this.$vm && this.$vm.__call_hook('onPageHide');
  3431. },
  3432. resize: function resize(size) {
  3433. this.$vm && this.$vm.__call_hook('onPageResize', size);
  3434. }
  3435. },
  3436. methods: {
  3437. __l: handleLink,
  3438. __e: handleEvent
  3439. }
  3440. };
  3441. // externalClasses
  3442. if (vueOptions.externalClasses) {
  3443. componentOptions.externalClasses = vueOptions.externalClasses;
  3444. }
  3445. if (Array.isArray(vueOptions.wxsCallMethods)) {
  3446. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  3447. componentOptions.methods[callMethod] = function (args) {
  3448. return this.$vm[callMethod](args);
  3449. };
  3450. });
  3451. }
  3452. if (needVueOptions) {
  3453. return [componentOptions, vueOptions, VueComponent];
  3454. }
  3455. if (isPage) {
  3456. return componentOptions;
  3457. }
  3458. return [componentOptions, VueComponent];
  3459. }
  3460. function parseComponent(vueComponentOptions, needVueOptions) {
  3461. return parseBaseComponent(vueComponentOptions, {
  3462. isPage: isPage,
  3463. initRelation: initRelation
  3464. }, needVueOptions);
  3465. }
  3466. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  3467. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  3468. function parseBasePage(vuePageOptions) {
  3469. var _parseComponent = parseComponent(vuePageOptions, true),
  3470. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  3471. pageOptions = _parseComponent2[0],
  3472. vueOptions = _parseComponent2[1];
  3473. initHooks(pageOptions.methods, hooks$1, vueOptions);
  3474. pageOptions.methods.onLoad = function (query) {
  3475. this.options = query;
  3476. var copyQuery = Object.assign({}, query);
  3477. delete copyQuery.__id__;
  3478. this.$page = {
  3479. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  3480. };
  3481. this.$vm.$mp.query = query; // 兼容 mpvue
  3482. this.$vm.__call_hook('onLoad', query);
  3483. };
  3484. {
  3485. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  3486. }
  3487. {
  3488. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  3489. }
  3490. return pageOptions;
  3491. }
  3492. function parsePage(vuePageOptions) {
  3493. return parseBasePage(vuePageOptions);
  3494. }
  3495. function createPage(vuePageOptions) {
  3496. {
  3497. return Component(parsePage(vuePageOptions));
  3498. }
  3499. }
  3500. function createComponent(vueOptions) {
  3501. {
  3502. return Component(parseComponent(vueOptions));
  3503. }
  3504. }
  3505. function createSubpackageApp(vm) {
  3506. var appOptions = parseApp(vm);
  3507. var app = getApp({
  3508. allowDefault: true
  3509. });
  3510. vm.$scope = app;
  3511. var globalData = app.globalData;
  3512. if (globalData) {
  3513. Object.keys(appOptions.globalData).forEach(function (name) {
  3514. if (!hasOwn(globalData, name)) {
  3515. globalData[name] = appOptions.globalData[name];
  3516. }
  3517. });
  3518. }
  3519. Object.keys(appOptions).forEach(function (name) {
  3520. if (!hasOwn(app, name)) {
  3521. app[name] = appOptions[name];
  3522. }
  3523. });
  3524. if (isFn(appOptions.onShow) && wx.onAppShow) {
  3525. wx.onAppShow(function () {
  3526. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  3527. args[_key5] = arguments[_key5];
  3528. }
  3529. vm.__call_hook('onShow', args);
  3530. });
  3531. }
  3532. if (isFn(appOptions.onHide) && wx.onAppHide) {
  3533. wx.onAppHide(function () {
  3534. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  3535. args[_key6] = arguments[_key6];
  3536. }
  3537. vm.__call_hook('onHide', args);
  3538. });
  3539. }
  3540. if (isFn(appOptions.onLaunch)) {
  3541. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  3542. vm.__call_hook('onLaunch', args);
  3543. }
  3544. return vm;
  3545. }
  3546. function createPlugin(vm) {
  3547. var appOptions = parseApp(vm);
  3548. if (isFn(appOptions.onShow) && wx.onAppShow) {
  3549. wx.onAppShow(function () {
  3550. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  3551. args[_key7] = arguments[_key7];
  3552. }
  3553. vm.__call_hook('onShow', args);
  3554. });
  3555. }
  3556. if (isFn(appOptions.onHide) && wx.onAppHide) {
  3557. wx.onAppHide(function () {
  3558. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  3559. args[_key8] = arguments[_key8];
  3560. }
  3561. vm.__call_hook('onHide', args);
  3562. });
  3563. }
  3564. if (isFn(appOptions.onLaunch)) {
  3565. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  3566. vm.__call_hook('onLaunch', args);
  3567. }
  3568. return vm;
  3569. }
  3570. todos.forEach(function (todoApi) {
  3571. protocols[todoApi] = false;
  3572. });
  3573. canIUses.forEach(function (canIUseApi) {
  3574. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  3575. if (!wx.canIUse(apiName)) {
  3576. protocols[canIUseApi] = false;
  3577. }
  3578. });
  3579. var uni = {};
  3580. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  3581. uni = new Proxy({}, {
  3582. get: function get(target, name) {
  3583. if (hasOwn(target, name)) {
  3584. return target[name];
  3585. }
  3586. if (baseApi[name]) {
  3587. return baseApi[name];
  3588. }
  3589. if (api[name]) {
  3590. return promisify(name, api[name]);
  3591. }
  3592. {
  3593. if (extraApi[name]) {
  3594. return promisify(name, extraApi[name]);
  3595. }
  3596. if (todoApis[name]) {
  3597. return promisify(name, todoApis[name]);
  3598. }
  3599. }
  3600. if (eventApi[name]) {
  3601. return eventApi[name];
  3602. }
  3603. return promisify(name, wrapper(name, wx[name]));
  3604. },
  3605. set: function set(target, name, value) {
  3606. target[name] = value;
  3607. return true;
  3608. }
  3609. });
  3610. } else {
  3611. Object.keys(baseApi).forEach(function (name) {
  3612. uni[name] = baseApi[name];
  3613. });
  3614. {
  3615. Object.keys(todoApis).forEach(function (name) {
  3616. uni[name] = promisify(name, todoApis[name]);
  3617. });
  3618. Object.keys(extraApi).forEach(function (name) {
  3619. uni[name] = promisify(name, extraApi[name]);
  3620. });
  3621. }
  3622. Object.keys(eventApi).forEach(function (name) {
  3623. uni[name] = eventApi[name];
  3624. });
  3625. Object.keys(api).forEach(function (name) {
  3626. uni[name] = promisify(name, api[name]);
  3627. });
  3628. Object.keys(wx).forEach(function (name) {
  3629. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  3630. uni[name] = promisify(name, wrapper(name, wx[name]));
  3631. }
  3632. });
  3633. }
  3634. wx.createApp = createApp;
  3635. wx.createPage = createPage;
  3636. wx.createComponent = createComponent;
  3637. wx.createSubpackageApp = createSubpackageApp;
  3638. wx.createPlugin = createPlugin;
  3639. var uni$1 = uni;
  3640. var _default = uni$1;
  3641. exports.default = _default;
  3642. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  3643. /***/ }),
  3644. /***/ 20:
  3645. /*!****************************************************************!*\
  3646. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  3647. \****************************************************************/
  3648. /*! no static exports found */
  3649. /***/ (function(module, exports) {
  3650. function _iterableToArray(iter) {
  3651. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  3652. }
  3653. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3654. /***/ }),
  3655. /***/ 21:
  3656. /*!******************************************************************!*\
  3657. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  3658. \******************************************************************/
  3659. /*! no static exports found */
  3660. /***/ (function(module, exports) {
  3661. function _nonIterableSpread() {
  3662. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  3663. }
  3664. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3665. /***/ }),
  3666. /***/ 22:
  3667. /*!*************************************************************!*\
  3668. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  3669. \*************************************************************/
  3670. /*! no static exports found */
  3671. /***/ (function(module, exports, __webpack_require__) {
  3672. "use strict";
  3673. /* WEBPACK VAR INJECTION */(function(uni, global) {
  3674. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  3675. Object.defineProperty(exports, "__esModule", {
  3676. value: true
  3677. });
  3678. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  3679. exports.compileI18nJsonStr = compileI18nJsonStr;
  3680. exports.hasI18nJson = hasI18nJson;
  3681. exports.initVueI18n = initVueI18n;
  3682. exports.isI18nStr = isI18nStr;
  3683. exports.isString = void 0;
  3684. exports.normalizeLocale = normalizeLocale;
  3685. exports.parseI18nJson = parseI18nJson;
  3686. exports.resolveLocale = resolveLocale;
  3687. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  3688. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  3689. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  3690. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  3691. var isObject = function isObject(val) {
  3692. return val !== null && (0, _typeof2.default)(val) === 'object';
  3693. };
  3694. var defaultDelimiters = ['{', '}'];
  3695. var BaseFormatter = /*#__PURE__*/function () {
  3696. function BaseFormatter() {
  3697. (0, _classCallCheck2.default)(this, BaseFormatter);
  3698. this._caches = Object.create(null);
  3699. }
  3700. (0, _createClass2.default)(BaseFormatter, [{
  3701. key: "interpolate",
  3702. value: function interpolate(message, values) {
  3703. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  3704. if (!values) {
  3705. return [message];
  3706. }
  3707. var tokens = this._caches[message];
  3708. if (!tokens) {
  3709. tokens = parse(message, delimiters);
  3710. this._caches[message] = tokens;
  3711. }
  3712. return compile(tokens, values);
  3713. }
  3714. }]);
  3715. return BaseFormatter;
  3716. }();
  3717. exports.Formatter = BaseFormatter;
  3718. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  3719. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  3720. function parse(format, _ref) {
  3721. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  3722. startDelimiter = _ref2[0],
  3723. endDelimiter = _ref2[1];
  3724. var tokens = [];
  3725. var position = 0;
  3726. var text = '';
  3727. while (position < format.length) {
  3728. var char = format[position++];
  3729. if (char === startDelimiter) {
  3730. if (text) {
  3731. tokens.push({
  3732. type: 'text',
  3733. value: text
  3734. });
  3735. }
  3736. text = '';
  3737. var sub = '';
  3738. char = format[position++];
  3739. while (char !== undefined && char !== endDelimiter) {
  3740. sub += char;
  3741. char = format[position++];
  3742. }
  3743. var isClosed = char === endDelimiter;
  3744. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  3745. tokens.push({
  3746. value: sub,
  3747. type: type
  3748. });
  3749. }
  3750. // else if (char === '%') {
  3751. // // when found rails i18n syntax, skip text capture
  3752. // if (format[position] !== '{') {
  3753. // text += char
  3754. // }
  3755. // }
  3756. else {
  3757. text += char;
  3758. }
  3759. }
  3760. text && tokens.push({
  3761. type: 'text',
  3762. value: text
  3763. });
  3764. return tokens;
  3765. }
  3766. function compile(tokens, values) {
  3767. var compiled = [];
  3768. var index = 0;
  3769. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  3770. if (mode === 'unknown') {
  3771. return compiled;
  3772. }
  3773. while (index < tokens.length) {
  3774. var token = tokens[index];
  3775. switch (token.type) {
  3776. case 'text':
  3777. compiled.push(token.value);
  3778. break;
  3779. case 'list':
  3780. compiled.push(values[parseInt(token.value, 10)]);
  3781. break;
  3782. case 'named':
  3783. if (mode === 'named') {
  3784. compiled.push(values[token.value]);
  3785. } else {
  3786. if (true) {
  3787. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  3788. }
  3789. }
  3790. break;
  3791. case 'unknown':
  3792. if (true) {
  3793. console.warn("Detect 'unknown' type of token!");
  3794. }
  3795. break;
  3796. }
  3797. index++;
  3798. }
  3799. return compiled;
  3800. }
  3801. var LOCALE_ZH_HANS = 'zh-Hans';
  3802. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  3803. var LOCALE_ZH_HANT = 'zh-Hant';
  3804. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  3805. var LOCALE_EN = 'en';
  3806. exports.LOCALE_EN = LOCALE_EN;
  3807. var LOCALE_FR = 'fr';
  3808. exports.LOCALE_FR = LOCALE_FR;
  3809. var LOCALE_ES = 'es';
  3810. exports.LOCALE_ES = LOCALE_ES;
  3811. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3812. var hasOwn = function hasOwn(val, key) {
  3813. return hasOwnProperty.call(val, key);
  3814. };
  3815. var defaultFormatter = new BaseFormatter();
  3816. function include(str, parts) {
  3817. return !!parts.find(function (part) {
  3818. return str.indexOf(part) !== -1;
  3819. });
  3820. }
  3821. function startsWith(str, parts) {
  3822. return parts.find(function (part) {
  3823. return str.indexOf(part) === 0;
  3824. });
  3825. }
  3826. function normalizeLocale(locale, messages) {
  3827. if (!locale) {
  3828. return;
  3829. }
  3830. locale = locale.trim().replace(/_/g, '-');
  3831. if (messages && messages[locale]) {
  3832. return locale;
  3833. }
  3834. locale = locale.toLowerCase();
  3835. if (locale === 'chinese') {
  3836. // 支付宝
  3837. return LOCALE_ZH_HANS;
  3838. }
  3839. if (locale.indexOf('zh') === 0) {
  3840. if (locale.indexOf('-hans') > -1) {
  3841. return LOCALE_ZH_HANS;
  3842. }
  3843. if (locale.indexOf('-hant') > -1) {
  3844. return LOCALE_ZH_HANT;
  3845. }
  3846. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  3847. return LOCALE_ZH_HANT;
  3848. }
  3849. return LOCALE_ZH_HANS;
  3850. }
  3851. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  3852. if (messages && Object.keys(messages).length > 0) {
  3853. locales = Object.keys(messages);
  3854. }
  3855. var lang = startsWith(locale, locales);
  3856. if (lang) {
  3857. return lang;
  3858. }
  3859. }
  3860. var I18n = /*#__PURE__*/function () {
  3861. function I18n(_ref3) {
  3862. var locale = _ref3.locale,
  3863. fallbackLocale = _ref3.fallbackLocale,
  3864. messages = _ref3.messages,
  3865. watcher = _ref3.watcher,
  3866. formater = _ref3.formater;
  3867. (0, _classCallCheck2.default)(this, I18n);
  3868. this.locale = LOCALE_EN;
  3869. this.fallbackLocale = LOCALE_EN;
  3870. this.message = {};
  3871. this.messages = {};
  3872. this.watchers = [];
  3873. if (fallbackLocale) {
  3874. this.fallbackLocale = fallbackLocale;
  3875. }
  3876. this.formater = formater || defaultFormatter;
  3877. this.messages = messages || {};
  3878. this.setLocale(locale || LOCALE_EN);
  3879. if (watcher) {
  3880. this.watchLocale(watcher);
  3881. }
  3882. }
  3883. (0, _createClass2.default)(I18n, [{
  3884. key: "setLocale",
  3885. value: function setLocale(locale) {
  3886. var _this = this;
  3887. var oldLocale = this.locale;
  3888. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  3889. if (!this.messages[this.locale]) {
  3890. // 可能初始化时不存在
  3891. this.messages[this.locale] = {};
  3892. }
  3893. this.message = this.messages[this.locale];
  3894. // 仅发生变化时,通知
  3895. if (oldLocale !== this.locale) {
  3896. this.watchers.forEach(function (watcher) {
  3897. watcher(_this.locale, oldLocale);
  3898. });
  3899. }
  3900. }
  3901. }, {
  3902. key: "getLocale",
  3903. value: function getLocale() {
  3904. return this.locale;
  3905. }
  3906. }, {
  3907. key: "watchLocale",
  3908. value: function watchLocale(fn) {
  3909. var _this2 = this;
  3910. var index = this.watchers.push(fn) - 1;
  3911. return function () {
  3912. _this2.watchers.splice(index, 1);
  3913. };
  3914. }
  3915. }, {
  3916. key: "add",
  3917. value: function add(locale, message) {
  3918. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  3919. var curMessages = this.messages[locale];
  3920. if (curMessages) {
  3921. if (override) {
  3922. Object.assign(curMessages, message);
  3923. } else {
  3924. Object.keys(message).forEach(function (key) {
  3925. if (!hasOwn(curMessages, key)) {
  3926. curMessages[key] = message[key];
  3927. }
  3928. });
  3929. }
  3930. } else {
  3931. this.messages[locale] = message;
  3932. }
  3933. }
  3934. }, {
  3935. key: "f",
  3936. value: function f(message, values, delimiters) {
  3937. return this.formater.interpolate(message, values, delimiters).join('');
  3938. }
  3939. }, {
  3940. key: "t",
  3941. value: function t(key, locale, values) {
  3942. var message = this.message;
  3943. if (typeof locale === 'string') {
  3944. locale = normalizeLocale(locale, this.messages);
  3945. locale && (message = this.messages[locale]);
  3946. } else {
  3947. values = locale;
  3948. }
  3949. if (!hasOwn(message, key)) {
  3950. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  3951. return key;
  3952. }
  3953. return this.formater.interpolate(message[key], values).join('');
  3954. }
  3955. }]);
  3956. return I18n;
  3957. }();
  3958. exports.I18n = I18n;
  3959. function watchAppLocale(appVm, i18n) {
  3960. // 需要保证 watch 的触发在组件渲染之前
  3961. if (appVm.$watchLocale) {
  3962. // vue2
  3963. appVm.$watchLocale(function (newLocale) {
  3964. i18n.setLocale(newLocale);
  3965. });
  3966. } else {
  3967. appVm.$watch(function () {
  3968. return appVm.$locale;
  3969. }, function (newLocale) {
  3970. i18n.setLocale(newLocale);
  3971. });
  3972. }
  3973. }
  3974. function getDefaultLocale() {
  3975. if (typeof uni !== 'undefined' && uni.getLocale) {
  3976. return uni.getLocale();
  3977. }
  3978. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  3979. if (typeof global !== 'undefined' && global.getLocale) {
  3980. return global.getLocale();
  3981. }
  3982. return LOCALE_EN;
  3983. }
  3984. function initVueI18n(locale) {
  3985. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3986. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  3987. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  3988. // 兼容旧版本入参
  3989. if (typeof locale !== 'string') {
  3990. var _ref4 = [messages, locale];
  3991. locale = _ref4[0];
  3992. messages = _ref4[1];
  3993. }
  3994. if (typeof locale !== 'string') {
  3995. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  3996. locale = getDefaultLocale();
  3997. }
  3998. if (typeof fallbackLocale !== 'string') {
  3999. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  4000. }
  4001. var i18n = new I18n({
  4002. locale: locale,
  4003. fallbackLocale: fallbackLocale,
  4004. messages: messages,
  4005. watcher: watcher
  4006. });
  4007. var _t = function t(key, values) {
  4008. if (typeof getApp !== 'function') {
  4009. // app view
  4010. /* eslint-disable no-func-assign */
  4011. _t = function t(key, values) {
  4012. return i18n.t(key, values);
  4013. };
  4014. } else {
  4015. var isWatchedAppLocale = false;
  4016. _t = function t(key, values) {
  4017. var appVm = getApp().$vm;
  4018. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  4019. // options: {
  4020. // type: Array,
  4021. // default () {
  4022. // return [{
  4023. // icon: 'shop',
  4024. // text: t("uni-goods-nav.options.shop"),
  4025. // }, {
  4026. // icon: 'cart',
  4027. // text: t("uni-goods-nav.options.cart")
  4028. // }]
  4029. // }
  4030. // },
  4031. if (appVm) {
  4032. // 触发响应式
  4033. appVm.$locale;
  4034. if (!isWatchedAppLocale) {
  4035. isWatchedAppLocale = true;
  4036. watchAppLocale(appVm, i18n);
  4037. }
  4038. }
  4039. return i18n.t(key, values);
  4040. };
  4041. }
  4042. return _t(key, values);
  4043. };
  4044. return {
  4045. i18n: i18n,
  4046. f: function f(message, values, delimiters) {
  4047. return i18n.f(message, values, delimiters);
  4048. },
  4049. t: function t(key, values) {
  4050. return _t(key, values);
  4051. },
  4052. add: function add(locale, message) {
  4053. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  4054. return i18n.add(locale, message, override);
  4055. },
  4056. watch: function watch(fn) {
  4057. return i18n.watchLocale(fn);
  4058. },
  4059. getLocale: function getLocale() {
  4060. return i18n.getLocale();
  4061. },
  4062. setLocale: function setLocale(newLocale) {
  4063. return i18n.setLocale(newLocale);
  4064. }
  4065. };
  4066. }
  4067. var isString = function isString(val) {
  4068. return typeof val === 'string';
  4069. };
  4070. exports.isString = isString;
  4071. var formater;
  4072. function hasI18nJson(jsonObj, delimiters) {
  4073. if (!formater) {
  4074. formater = new BaseFormatter();
  4075. }
  4076. return walkJsonObj(jsonObj, function (jsonObj, key) {
  4077. var value = jsonObj[key];
  4078. if (isString(value)) {
  4079. if (isI18nStr(value, delimiters)) {
  4080. return true;
  4081. }
  4082. } else {
  4083. return hasI18nJson(value, delimiters);
  4084. }
  4085. });
  4086. }
  4087. function parseI18nJson(jsonObj, values, delimiters) {
  4088. if (!formater) {
  4089. formater = new BaseFormatter();
  4090. }
  4091. walkJsonObj(jsonObj, function (jsonObj, key) {
  4092. var value = jsonObj[key];
  4093. if (isString(value)) {
  4094. if (isI18nStr(value, delimiters)) {
  4095. jsonObj[key] = compileStr(value, values, delimiters);
  4096. }
  4097. } else {
  4098. parseI18nJson(value, values, delimiters);
  4099. }
  4100. });
  4101. return jsonObj;
  4102. }
  4103. function compileI18nJsonStr(jsonStr, _ref5) {
  4104. var locale = _ref5.locale,
  4105. locales = _ref5.locales,
  4106. delimiters = _ref5.delimiters;
  4107. if (!isI18nStr(jsonStr, delimiters)) {
  4108. return jsonStr;
  4109. }
  4110. if (!formater) {
  4111. formater = new BaseFormatter();
  4112. }
  4113. var localeValues = [];
  4114. Object.keys(locales).forEach(function (name) {
  4115. if (name !== locale) {
  4116. localeValues.push({
  4117. locale: name,
  4118. values: locales[name]
  4119. });
  4120. }
  4121. });
  4122. localeValues.unshift({
  4123. locale: locale,
  4124. values: locales[locale]
  4125. });
  4126. try {
  4127. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  4128. } catch (e) {}
  4129. return jsonStr;
  4130. }
  4131. function isI18nStr(value, delimiters) {
  4132. return value.indexOf(delimiters[0]) > -1;
  4133. }
  4134. function compileStr(value, values, delimiters) {
  4135. return formater.interpolate(value, values, delimiters).join('');
  4136. }
  4137. function compileValue(jsonObj, key, localeValues, delimiters) {
  4138. var value = jsonObj[key];
  4139. if (isString(value)) {
  4140. // 存在国际化
  4141. if (isI18nStr(value, delimiters)) {
  4142. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  4143. if (localeValues.length > 1) {
  4144. // 格式化国际化语言
  4145. var valueLocales = jsonObj[key + 'Locales'] = {};
  4146. localeValues.forEach(function (localValue) {
  4147. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  4148. });
  4149. }
  4150. }
  4151. } else {
  4152. compileJsonObj(value, localeValues, delimiters);
  4153. }
  4154. }
  4155. function compileJsonObj(jsonObj, localeValues, delimiters) {
  4156. walkJsonObj(jsonObj, function (jsonObj, key) {
  4157. compileValue(jsonObj, key, localeValues, delimiters);
  4158. });
  4159. return jsonObj;
  4160. }
  4161. function walkJsonObj(jsonObj, walk) {
  4162. if (Array.isArray(jsonObj)) {
  4163. for (var i = 0; i < jsonObj.length; i++) {
  4164. if (walk(jsonObj, i)) {
  4165. return true;
  4166. }
  4167. }
  4168. } else if (isObject(jsonObj)) {
  4169. for (var key in jsonObj) {
  4170. if (walk(jsonObj, key)) {
  4171. return true;
  4172. }
  4173. }
  4174. }
  4175. return false;
  4176. }
  4177. function resolveLocale(locales) {
  4178. return function (locale) {
  4179. if (!locale) {
  4180. return locale;
  4181. }
  4182. locale = normalizeLocale(locale) || locale;
  4183. return resolveLocaleChain(locale).find(function (locale) {
  4184. return locales.indexOf(locale) > -1;
  4185. });
  4186. };
  4187. }
  4188. function resolveLocaleChain(locale) {
  4189. var chain = [];
  4190. var tokens = locale.split('-');
  4191. while (tokens.length) {
  4192. chain.push(tokens.join('-'));
  4193. tokens.pop();
  4194. }
  4195. return chain;
  4196. }
  4197. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  4198. /***/ }),
  4199. /***/ 23:
  4200. /*!***************************************************************!*\
  4201. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  4202. \***************************************************************/
  4203. /*! no static exports found */
  4204. /***/ (function(module, exports) {
  4205. function _classCallCheck(instance, Constructor) {
  4206. if (!(instance instanceof Constructor)) {
  4207. throw new TypeError("Cannot call a class as a function");
  4208. }
  4209. }
  4210. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4211. /***/ }),
  4212. /***/ 24:
  4213. /*!************************************************************!*\
  4214. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  4215. \************************************************************/
  4216. /*! no static exports found */
  4217. /***/ (function(module, exports, __webpack_require__) {
  4218. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  4219. function _defineProperties(target, props) {
  4220. for (var i = 0; i < props.length; i++) {
  4221. var descriptor = props[i];
  4222. descriptor.enumerable = descriptor.enumerable || false;
  4223. descriptor.configurable = true;
  4224. if ("value" in descriptor) descriptor.writable = true;
  4225. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  4226. }
  4227. }
  4228. function _createClass(Constructor, protoProps, staticProps) {
  4229. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  4230. if (staticProps) _defineProperties(Constructor, staticProps);
  4231. Object.defineProperty(Constructor, "prototype", {
  4232. writable: false
  4233. });
  4234. return Constructor;
  4235. }
  4236. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4237. /***/ }),
  4238. /***/ 25:
  4239. /*!******************************************************************************************!*\
  4240. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  4241. \******************************************************************************************/
  4242. /*! exports provided: default */
  4243. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4244. "use strict";
  4245. __webpack_require__.r(__webpack_exports__);
  4246. /* WEBPACK VAR INJECTION */(function(global) {/*!
  4247. * Vue.js v2.6.11
  4248. * (c) 2014-2023 Evan You
  4249. * Released under the MIT License.
  4250. */
  4251. /* */
  4252. var emptyObject = Object.freeze({});
  4253. // These helpers produce better VM code in JS engines due to their
  4254. // explicitness and function inlining.
  4255. function isUndef (v) {
  4256. return v === undefined || v === null
  4257. }
  4258. function isDef (v) {
  4259. return v !== undefined && v !== null
  4260. }
  4261. function isTrue (v) {
  4262. return v === true
  4263. }
  4264. function isFalse (v) {
  4265. return v === false
  4266. }
  4267. /**
  4268. * Check if value is primitive.
  4269. */
  4270. function isPrimitive (value) {
  4271. return (
  4272. typeof value === 'string' ||
  4273. typeof value === 'number' ||
  4274. // $flow-disable-line
  4275. typeof value === 'symbol' ||
  4276. typeof value === 'boolean'
  4277. )
  4278. }
  4279. /**
  4280. * Quick object check - this is primarily used to tell
  4281. * Objects from primitive values when we know the value
  4282. * is a JSON-compliant type.
  4283. */
  4284. function isObject (obj) {
  4285. return obj !== null && typeof obj === 'object'
  4286. }
  4287. /**
  4288. * Get the raw type string of a value, e.g., [object Object].
  4289. */
  4290. var _toString = Object.prototype.toString;
  4291. function toRawType (value) {
  4292. return _toString.call(value).slice(8, -1)
  4293. }
  4294. /**
  4295. * Strict object type check. Only returns true
  4296. * for plain JavaScript objects.
  4297. */
  4298. function isPlainObject (obj) {
  4299. return _toString.call(obj) === '[object Object]'
  4300. }
  4301. function isRegExp (v) {
  4302. return _toString.call(v) === '[object RegExp]'
  4303. }
  4304. /**
  4305. * Check if val is a valid array index.
  4306. */
  4307. function isValidArrayIndex (val) {
  4308. var n = parseFloat(String(val));
  4309. return n >= 0 && Math.floor(n) === n && isFinite(val)
  4310. }
  4311. function isPromise (val) {
  4312. return (
  4313. isDef(val) &&
  4314. typeof val.then === 'function' &&
  4315. typeof val.catch === 'function'
  4316. )
  4317. }
  4318. /**
  4319. * Convert a value to a string that is actually rendered.
  4320. */
  4321. function toString (val) {
  4322. return val == null
  4323. ? ''
  4324. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  4325. ? JSON.stringify(val, null, 2)
  4326. : String(val)
  4327. }
  4328. /**
  4329. * Convert an input value to a number for persistence.
  4330. * If the conversion fails, return original string.
  4331. */
  4332. function toNumber (val) {
  4333. var n = parseFloat(val);
  4334. return isNaN(n) ? val : n
  4335. }
  4336. /**
  4337. * Make a map and return a function for checking if a key
  4338. * is in that map.
  4339. */
  4340. function makeMap (
  4341. str,
  4342. expectsLowerCase
  4343. ) {
  4344. var map = Object.create(null);
  4345. var list = str.split(',');
  4346. for (var i = 0; i < list.length; i++) {
  4347. map[list[i]] = true;
  4348. }
  4349. return expectsLowerCase
  4350. ? function (val) { return map[val.toLowerCase()]; }
  4351. : function (val) { return map[val]; }
  4352. }
  4353. /**
  4354. * Check if a tag is a built-in tag.
  4355. */
  4356. var isBuiltInTag = makeMap('slot,component', true);
  4357. /**
  4358. * Check if an attribute is a reserved attribute.
  4359. */
  4360. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  4361. /**
  4362. * Remove an item from an array.
  4363. */
  4364. function remove (arr, item) {
  4365. if (arr.length) {
  4366. var index = arr.indexOf(item);
  4367. if (index > -1) {
  4368. return arr.splice(index, 1)
  4369. }
  4370. }
  4371. }
  4372. /**
  4373. * Check whether an object has the property.
  4374. */
  4375. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4376. function hasOwn (obj, key) {
  4377. return hasOwnProperty.call(obj, key)
  4378. }
  4379. /**
  4380. * Create a cached version of a pure function.
  4381. */
  4382. function cached (fn) {
  4383. var cache = Object.create(null);
  4384. return (function cachedFn (str) {
  4385. var hit = cache[str];
  4386. return hit || (cache[str] = fn(str))
  4387. })
  4388. }
  4389. /**
  4390. * Camelize a hyphen-delimited string.
  4391. */
  4392. var camelizeRE = /-(\w)/g;
  4393. var camelize = cached(function (str) {
  4394. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  4395. });
  4396. /**
  4397. * Capitalize a string.
  4398. */
  4399. var capitalize = cached(function (str) {
  4400. return str.charAt(0).toUpperCase() + str.slice(1)
  4401. });
  4402. /**
  4403. * Hyphenate a camelCase string.
  4404. */
  4405. var hyphenateRE = /\B([A-Z])/g;
  4406. var hyphenate = cached(function (str) {
  4407. return str.replace(hyphenateRE, '-$1').toLowerCase()
  4408. });
  4409. /**
  4410. * Simple bind polyfill for environments that do not support it,
  4411. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  4412. * since native bind is now performant enough in most browsers.
  4413. * But removing it would mean breaking code that was able to run in
  4414. * PhantomJS 1.x, so this must be kept for backward compatibility.
  4415. */
  4416. /* istanbul ignore next */
  4417. function polyfillBind (fn, ctx) {
  4418. function boundFn (a) {
  4419. var l = arguments.length;
  4420. return l
  4421. ? l > 1
  4422. ? fn.apply(ctx, arguments)
  4423. : fn.call(ctx, a)
  4424. : fn.call(ctx)
  4425. }
  4426. boundFn._length = fn.length;
  4427. return boundFn
  4428. }
  4429. function nativeBind (fn, ctx) {
  4430. return fn.bind(ctx)
  4431. }
  4432. var bind = Function.prototype.bind
  4433. ? nativeBind
  4434. : polyfillBind;
  4435. /**
  4436. * Convert an Array-like object to a real Array.
  4437. */
  4438. function toArray (list, start) {
  4439. start = start || 0;
  4440. var i = list.length - start;
  4441. var ret = new Array(i);
  4442. while (i--) {
  4443. ret[i] = list[i + start];
  4444. }
  4445. return ret
  4446. }
  4447. /**
  4448. * Mix properties into target object.
  4449. */
  4450. function extend (to, _from) {
  4451. for (var key in _from) {
  4452. to[key] = _from[key];
  4453. }
  4454. return to
  4455. }
  4456. /**
  4457. * Merge an Array of Objects into a single Object.
  4458. */
  4459. function toObject (arr) {
  4460. var res = {};
  4461. for (var i = 0; i < arr.length; i++) {
  4462. if (arr[i]) {
  4463. extend(res, arr[i]);
  4464. }
  4465. }
  4466. return res
  4467. }
  4468. /* eslint-disable no-unused-vars */
  4469. /**
  4470. * Perform no operation.
  4471. * Stubbing args to make Flow happy without leaving useless transpiled code
  4472. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  4473. */
  4474. function noop (a, b, c) {}
  4475. /**
  4476. * Always return false.
  4477. */
  4478. var no = function (a, b, c) { return false; };
  4479. /* eslint-enable no-unused-vars */
  4480. /**
  4481. * Return the same value.
  4482. */
  4483. var identity = function (_) { return _; };
  4484. /**
  4485. * Check if two values are loosely equal - that is,
  4486. * if they are plain objects, do they have the same shape?
  4487. */
  4488. function looseEqual (a, b) {
  4489. if (a === b) { return true }
  4490. var isObjectA = isObject(a);
  4491. var isObjectB = isObject(b);
  4492. if (isObjectA && isObjectB) {
  4493. try {
  4494. var isArrayA = Array.isArray(a);
  4495. var isArrayB = Array.isArray(b);
  4496. if (isArrayA && isArrayB) {
  4497. return a.length === b.length && a.every(function (e, i) {
  4498. return looseEqual(e, b[i])
  4499. })
  4500. } else if (a instanceof Date && b instanceof Date) {
  4501. return a.getTime() === b.getTime()
  4502. } else if (!isArrayA && !isArrayB) {
  4503. var keysA = Object.keys(a);
  4504. var keysB = Object.keys(b);
  4505. return keysA.length === keysB.length && keysA.every(function (key) {
  4506. return looseEqual(a[key], b[key])
  4507. })
  4508. } else {
  4509. /* istanbul ignore next */
  4510. return false
  4511. }
  4512. } catch (e) {
  4513. /* istanbul ignore next */
  4514. return false
  4515. }
  4516. } else if (!isObjectA && !isObjectB) {
  4517. return String(a) === String(b)
  4518. } else {
  4519. return false
  4520. }
  4521. }
  4522. /**
  4523. * Return the first index at which a loosely equal value can be
  4524. * found in the array (if value is a plain object, the array must
  4525. * contain an object of the same shape), or -1 if it is not present.
  4526. */
  4527. function looseIndexOf (arr, val) {
  4528. for (var i = 0; i < arr.length; i++) {
  4529. if (looseEqual(arr[i], val)) { return i }
  4530. }
  4531. return -1
  4532. }
  4533. /**
  4534. * Ensure a function is called only once.
  4535. */
  4536. function once (fn) {
  4537. var called = false;
  4538. return function () {
  4539. if (!called) {
  4540. called = true;
  4541. fn.apply(this, arguments);
  4542. }
  4543. }
  4544. }
  4545. var ASSET_TYPES = [
  4546. 'component',
  4547. 'directive',
  4548. 'filter'
  4549. ];
  4550. var LIFECYCLE_HOOKS = [
  4551. 'beforeCreate',
  4552. 'created',
  4553. 'beforeMount',
  4554. 'mounted',
  4555. 'beforeUpdate',
  4556. 'updated',
  4557. 'beforeDestroy',
  4558. 'destroyed',
  4559. 'activated',
  4560. 'deactivated',
  4561. 'errorCaptured',
  4562. 'serverPrefetch'
  4563. ];
  4564. /* */
  4565. var config = ({
  4566. /**
  4567. * Option merge strategies (used in core/util/options)
  4568. */
  4569. // $flow-disable-line
  4570. optionMergeStrategies: Object.create(null),
  4571. /**
  4572. * Whether to suppress warnings.
  4573. */
  4574. silent: false,
  4575. /**
  4576. * Show production mode tip message on boot?
  4577. */
  4578. productionTip: "development" !== 'production',
  4579. /**
  4580. * Whether to enable devtools
  4581. */
  4582. devtools: "development" !== 'production',
  4583. /**
  4584. * Whether to record perf
  4585. */
  4586. performance: false,
  4587. /**
  4588. * Error handler for watcher errors
  4589. */
  4590. errorHandler: null,
  4591. /**
  4592. * Warn handler for watcher warns
  4593. */
  4594. warnHandler: null,
  4595. /**
  4596. * Ignore certain custom elements
  4597. */
  4598. ignoredElements: [],
  4599. /**
  4600. * Custom user key aliases for v-on
  4601. */
  4602. // $flow-disable-line
  4603. keyCodes: Object.create(null),
  4604. /**
  4605. * Check if a tag is reserved so that it cannot be registered as a
  4606. * component. This is platform-dependent and may be overwritten.
  4607. */
  4608. isReservedTag: no,
  4609. /**
  4610. * Check if an attribute is reserved so that it cannot be used as a component
  4611. * prop. This is platform-dependent and may be overwritten.
  4612. */
  4613. isReservedAttr: no,
  4614. /**
  4615. * Check if a tag is an unknown element.
  4616. * Platform-dependent.
  4617. */
  4618. isUnknownElement: no,
  4619. /**
  4620. * Get the namespace of an element
  4621. */
  4622. getTagNamespace: noop,
  4623. /**
  4624. * Parse the real tag name for the specific platform.
  4625. */
  4626. parsePlatformTagName: identity,
  4627. /**
  4628. * Check if an attribute must be bound using property, e.g. value
  4629. * Platform-dependent.
  4630. */
  4631. mustUseProp: no,
  4632. /**
  4633. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  4634. * This will significantly reduce performance if set to false.
  4635. */
  4636. async: true,
  4637. /**
  4638. * Exposed for legacy reasons
  4639. */
  4640. _lifecycleHooks: LIFECYCLE_HOOKS
  4641. });
  4642. /* */
  4643. /**
  4644. * unicode letters used for parsing html tags, component names and property paths.
  4645. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  4646. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  4647. */
  4648. var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
  4649. /**
  4650. * Check if a string starts with $ or _
  4651. */
  4652. function isReserved (str) {
  4653. var c = (str + '').charCodeAt(0);
  4654. return c === 0x24 || c === 0x5F
  4655. }
  4656. /**
  4657. * Define a property.
  4658. */
  4659. function def (obj, key, val, enumerable) {
  4660. Object.defineProperty(obj, key, {
  4661. value: val,
  4662. enumerable: !!enumerable,
  4663. writable: true,
  4664. configurable: true
  4665. });
  4666. }
  4667. /**
  4668. * Parse simple path.
  4669. */
  4670. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  4671. function parsePath (path) {
  4672. if (bailRE.test(path)) {
  4673. return
  4674. }
  4675. var segments = path.split('.');
  4676. return function (obj) {
  4677. for (var i = 0; i < segments.length; i++) {
  4678. if (!obj) { return }
  4679. obj = obj[segments[i]];
  4680. }
  4681. return obj
  4682. }
  4683. }
  4684. /* */
  4685. // can we use __proto__?
  4686. var hasProto = '__proto__' in {};
  4687. // Browser environment sniffing
  4688. var inBrowser = typeof window !== 'undefined';
  4689. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  4690. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  4691. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  4692. var isIE = UA && /msie|trident/.test(UA);
  4693. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  4694. var isEdge = UA && UA.indexOf('edge/') > 0;
  4695. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  4696. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  4697. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  4698. var isPhantomJS = UA && /phantomjs/.test(UA);
  4699. var isFF = UA && UA.match(/firefox\/(\d+)/);
  4700. // Firefox has a "watch" function on Object.prototype...
  4701. var nativeWatch = ({}).watch;
  4702. if (inBrowser) {
  4703. try {
  4704. var opts = {};
  4705. Object.defineProperty(opts, 'passive', ({
  4706. get: function get () {
  4707. }
  4708. })); // https://github.com/facebook/flow/issues/285
  4709. window.addEventListener('test-passive', null, opts);
  4710. } catch (e) {}
  4711. }
  4712. // this needs to be lazy-evaled because vue may be required before
  4713. // vue-server-renderer can set VUE_ENV
  4714. var _isServer;
  4715. var isServerRendering = function () {
  4716. if (_isServer === undefined) {
  4717. /* istanbul ignore if */
  4718. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  4719. // detect presence of vue-server-renderer and avoid
  4720. // Webpack shimming the process
  4721. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  4722. } else {
  4723. _isServer = false;
  4724. }
  4725. }
  4726. return _isServer
  4727. };
  4728. // detect devtools
  4729. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  4730. /* istanbul ignore next */
  4731. function isNative (Ctor) {
  4732. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  4733. }
  4734. var hasSymbol =
  4735. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  4736. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  4737. var _Set;
  4738. /* istanbul ignore if */ // $flow-disable-line
  4739. if (typeof Set !== 'undefined' && isNative(Set)) {
  4740. // use native Set when available.
  4741. _Set = Set;
  4742. } else {
  4743. // a non-standard Set polyfill that only works with primitive keys.
  4744. _Set = /*@__PURE__*/(function () {
  4745. function Set () {
  4746. this.set = Object.create(null);
  4747. }
  4748. Set.prototype.has = function has (key) {
  4749. return this.set[key] === true
  4750. };
  4751. Set.prototype.add = function add (key) {
  4752. this.set[key] = true;
  4753. };
  4754. Set.prototype.clear = function clear () {
  4755. this.set = Object.create(null);
  4756. };
  4757. return Set;
  4758. }());
  4759. }
  4760. /* */
  4761. var warn = noop;
  4762. var tip = noop;
  4763. var generateComponentTrace = (noop); // work around flow check
  4764. var formatComponentName = (noop);
  4765. if (true) {
  4766. var hasConsole = typeof console !== 'undefined';
  4767. var classifyRE = /(?:^|[-_])(\w)/g;
  4768. var classify = function (str) { return str
  4769. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  4770. .replace(/[-_]/g, ''); };
  4771. warn = function (msg, vm) {
  4772. var trace = vm ? generateComponentTrace(vm) : '';
  4773. if (config.warnHandler) {
  4774. config.warnHandler.call(null, msg, vm, trace);
  4775. } else if (hasConsole && (!config.silent)) {
  4776. console.error(("[Vue warn]: " + msg + trace));
  4777. }
  4778. };
  4779. tip = function (msg, vm) {
  4780. if (hasConsole && (!config.silent)) {
  4781. console.warn("[Vue tip]: " + msg + (
  4782. vm ? generateComponentTrace(vm) : ''
  4783. ));
  4784. }
  4785. };
  4786. formatComponentName = function (vm, includeFile) {
  4787. if (vm.$root === vm) {
  4788. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  4789. return ('') + vm.$options.__file
  4790. }
  4791. return '<Root>'
  4792. }
  4793. var options = typeof vm === 'function' && vm.cid != null
  4794. ? vm.options
  4795. : vm._isVue
  4796. ? vm.$options || vm.constructor.options
  4797. : vm;
  4798. var name = options.name || options._componentTag;
  4799. var file = options.__file;
  4800. if (!name && file) {
  4801. var match = file.match(/([^/\\]+)\.vue$/);
  4802. name = match && match[1];
  4803. }
  4804. return (
  4805. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  4806. (file && includeFile !== false ? (" at " + file) : '')
  4807. )
  4808. };
  4809. var repeat = function (str, n) {
  4810. var res = '';
  4811. while (n) {
  4812. if (n % 2 === 1) { res += str; }
  4813. if (n > 1) { str += str; }
  4814. n >>= 1;
  4815. }
  4816. return res
  4817. };
  4818. generateComponentTrace = function (vm) {
  4819. if (vm._isVue && vm.$parent) {
  4820. var tree = [];
  4821. var currentRecursiveSequence = 0;
  4822. while (vm && vm.$options.name !== 'PageBody') {
  4823. if (tree.length > 0) {
  4824. var last = tree[tree.length - 1];
  4825. if (last.constructor === vm.constructor) {
  4826. currentRecursiveSequence++;
  4827. vm = vm.$parent;
  4828. continue
  4829. } else if (currentRecursiveSequence > 0) {
  4830. tree[tree.length - 1] = [last, currentRecursiveSequence];
  4831. currentRecursiveSequence = 0;
  4832. }
  4833. }
  4834. !vm.$options.isReserved && tree.push(vm);
  4835. vm = vm.$parent;
  4836. }
  4837. return '\n\nfound in\n\n' + tree
  4838. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  4839. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  4840. : formatComponentName(vm))); })
  4841. .join('\n')
  4842. } else {
  4843. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  4844. }
  4845. };
  4846. }
  4847. /* */
  4848. var uid = 0;
  4849. /**
  4850. * A dep is an observable that can have multiple
  4851. * directives subscribing to it.
  4852. */
  4853. var Dep = function Dep () {
  4854. this.id = uid++;
  4855. this.subs = [];
  4856. };
  4857. Dep.prototype.addSub = function addSub (sub) {
  4858. this.subs.push(sub);
  4859. };
  4860. Dep.prototype.removeSub = function removeSub (sub) {
  4861. remove(this.subs, sub);
  4862. };
  4863. Dep.prototype.depend = function depend () {
  4864. if (Dep.SharedObject.target) {
  4865. Dep.SharedObject.target.addDep(this);
  4866. }
  4867. };
  4868. Dep.prototype.notify = function notify () {
  4869. // stabilize the subscriber list first
  4870. var subs = this.subs.slice();
  4871. if ( true && !config.async) {
  4872. // subs aren't sorted in scheduler if not running async
  4873. // we need to sort them now to make sure they fire in correct
  4874. // order
  4875. subs.sort(function (a, b) { return a.id - b.id; });
  4876. }
  4877. for (var i = 0, l = subs.length; i < l; i++) {
  4878. subs[i].update();
  4879. }
  4880. };
  4881. // The current target watcher being evaluated.
  4882. // This is globally unique because only one watcher
  4883. // can be evaluated at a time.
  4884. // fixed by xxxxxx (nvue shared vuex)
  4885. /* eslint-disable no-undef */
  4886. Dep.SharedObject = {};
  4887. Dep.SharedObject.target = null;
  4888. Dep.SharedObject.targetStack = [];
  4889. function pushTarget (target) {
  4890. Dep.SharedObject.targetStack.push(target);
  4891. Dep.SharedObject.target = target;
  4892. Dep.target = target;
  4893. }
  4894. function popTarget () {
  4895. Dep.SharedObject.targetStack.pop();
  4896. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  4897. Dep.target = Dep.SharedObject.target;
  4898. }
  4899. /* */
  4900. var VNode = function VNode (
  4901. tag,
  4902. data,
  4903. children,
  4904. text,
  4905. elm,
  4906. context,
  4907. componentOptions,
  4908. asyncFactory
  4909. ) {
  4910. this.tag = tag;
  4911. this.data = data;
  4912. this.children = children;
  4913. this.text = text;
  4914. this.elm = elm;
  4915. this.ns = undefined;
  4916. this.context = context;
  4917. this.fnContext = undefined;
  4918. this.fnOptions = undefined;
  4919. this.fnScopeId = undefined;
  4920. this.key = data && data.key;
  4921. this.componentOptions = componentOptions;
  4922. this.componentInstance = undefined;
  4923. this.parent = undefined;
  4924. this.raw = false;
  4925. this.isStatic = false;
  4926. this.isRootInsert = true;
  4927. this.isComment = false;
  4928. this.isCloned = false;
  4929. this.isOnce = false;
  4930. this.asyncFactory = asyncFactory;
  4931. this.asyncMeta = undefined;
  4932. this.isAsyncPlaceholder = false;
  4933. };
  4934. var prototypeAccessors = { child: { configurable: true } };
  4935. // DEPRECATED: alias for componentInstance for backwards compat.
  4936. /* istanbul ignore next */
  4937. prototypeAccessors.child.get = function () {
  4938. return this.componentInstance
  4939. };
  4940. Object.defineProperties( VNode.prototype, prototypeAccessors );
  4941. var createEmptyVNode = function (text) {
  4942. if ( text === void 0 ) text = '';
  4943. var node = new VNode();
  4944. node.text = text;
  4945. node.isComment = true;
  4946. return node
  4947. };
  4948. function createTextVNode (val) {
  4949. return new VNode(undefined, undefined, undefined, String(val))
  4950. }
  4951. // optimized shallow clone
  4952. // used for static nodes and slot nodes because they may be reused across
  4953. // multiple renders, cloning them avoids errors when DOM manipulations rely
  4954. // on their elm reference.
  4955. function cloneVNode (vnode) {
  4956. var cloned = new VNode(
  4957. vnode.tag,
  4958. vnode.data,
  4959. // #7975
  4960. // clone children array to avoid mutating original in case of cloning
  4961. // a child.
  4962. vnode.children && vnode.children.slice(),
  4963. vnode.text,
  4964. vnode.elm,
  4965. vnode.context,
  4966. vnode.componentOptions,
  4967. vnode.asyncFactory
  4968. );
  4969. cloned.ns = vnode.ns;
  4970. cloned.isStatic = vnode.isStatic;
  4971. cloned.key = vnode.key;
  4972. cloned.isComment = vnode.isComment;
  4973. cloned.fnContext = vnode.fnContext;
  4974. cloned.fnOptions = vnode.fnOptions;
  4975. cloned.fnScopeId = vnode.fnScopeId;
  4976. cloned.asyncMeta = vnode.asyncMeta;
  4977. cloned.isCloned = true;
  4978. return cloned
  4979. }
  4980. /*
  4981. * not type checking this file because flow doesn't play well with
  4982. * dynamically accessing methods on Array prototype
  4983. */
  4984. var arrayProto = Array.prototype;
  4985. var arrayMethods = Object.create(arrayProto);
  4986. var methodsToPatch = [
  4987. 'push',
  4988. 'pop',
  4989. 'shift',
  4990. 'unshift',
  4991. 'splice',
  4992. 'sort',
  4993. 'reverse'
  4994. ];
  4995. /**
  4996. * Intercept mutating methods and emit events
  4997. */
  4998. methodsToPatch.forEach(function (method) {
  4999. // cache original method
  5000. var original = arrayProto[method];
  5001. def(arrayMethods, method, function mutator () {
  5002. var args = [], len = arguments.length;
  5003. while ( len-- ) args[ len ] = arguments[ len ];
  5004. var result = original.apply(this, args);
  5005. var ob = this.__ob__;
  5006. var inserted;
  5007. switch (method) {
  5008. case 'push':
  5009. case 'unshift':
  5010. inserted = args;
  5011. break
  5012. case 'splice':
  5013. inserted = args.slice(2);
  5014. break
  5015. }
  5016. if (inserted) { ob.observeArray(inserted); }
  5017. // notify change
  5018. ob.dep.notify();
  5019. return result
  5020. });
  5021. });
  5022. /* */
  5023. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  5024. /**
  5025. * In some cases we may want to disable observation inside a component's
  5026. * update computation.
  5027. */
  5028. var shouldObserve = true;
  5029. function toggleObserving (value) {
  5030. shouldObserve = value;
  5031. }
  5032. /**
  5033. * Observer class that is attached to each observed
  5034. * object. Once attached, the observer converts the target
  5035. * object's property keys into getter/setters that
  5036. * collect dependencies and dispatch updates.
  5037. */
  5038. var Observer = function Observer (value) {
  5039. this.value = value;
  5040. this.dep = new Dep();
  5041. this.vmCount = 0;
  5042. def(value, '__ob__', this);
  5043. if (Array.isArray(value)) {
  5044. if (hasProto) {
  5045. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  5046. if(value.push !== value.__proto__.push){
  5047. copyAugment(value, arrayMethods, arrayKeys);
  5048. } else {
  5049. protoAugment(value, arrayMethods);
  5050. }
  5051. }
  5052. } else {
  5053. copyAugment(value, arrayMethods, arrayKeys);
  5054. }
  5055. this.observeArray(value);
  5056. } else {
  5057. this.walk(value);
  5058. }
  5059. };
  5060. /**
  5061. * Walk through all properties and convert them into
  5062. * getter/setters. This method should only be called when
  5063. * value type is Object.
  5064. */
  5065. Observer.prototype.walk = function walk (obj) {
  5066. var keys = Object.keys(obj);
  5067. for (var i = 0; i < keys.length; i++) {
  5068. defineReactive$$1(obj, keys[i]);
  5069. }
  5070. };
  5071. /**
  5072. * Observe a list of Array items.
  5073. */
  5074. Observer.prototype.observeArray = function observeArray (items) {
  5075. for (var i = 0, l = items.length; i < l; i++) {
  5076. observe(items[i]);
  5077. }
  5078. };
  5079. // helpers
  5080. /**
  5081. * Augment a target Object or Array by intercepting
  5082. * the prototype chain using __proto__
  5083. */
  5084. function protoAugment (target, src) {
  5085. /* eslint-disable no-proto */
  5086. target.__proto__ = src;
  5087. /* eslint-enable no-proto */
  5088. }
  5089. /**
  5090. * Augment a target Object or Array by defining
  5091. * hidden properties.
  5092. */
  5093. /* istanbul ignore next */
  5094. function copyAugment (target, src, keys) {
  5095. for (var i = 0, l = keys.length; i < l; i++) {
  5096. var key = keys[i];
  5097. def(target, key, src[key]);
  5098. }
  5099. }
  5100. /**
  5101. * Attempt to create an observer instance for a value,
  5102. * returns the new observer if successfully observed,
  5103. * or the existing observer if the value already has one.
  5104. */
  5105. function observe (value, asRootData) {
  5106. if (!isObject(value) || value instanceof VNode) {
  5107. return
  5108. }
  5109. var ob;
  5110. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  5111. ob = value.__ob__;
  5112. } else if (
  5113. shouldObserve &&
  5114. !isServerRendering() &&
  5115. (Array.isArray(value) || isPlainObject(value)) &&
  5116. Object.isExtensible(value) &&
  5117. !value._isVue &&
  5118. !value.__v_isMPComponent
  5119. ) {
  5120. ob = new Observer(value);
  5121. }
  5122. if (asRootData && ob) {
  5123. ob.vmCount++;
  5124. }
  5125. return ob
  5126. }
  5127. /**
  5128. * Define a reactive property on an Object.
  5129. */
  5130. function defineReactive$$1 (
  5131. obj,
  5132. key,
  5133. val,
  5134. customSetter,
  5135. shallow
  5136. ) {
  5137. var dep = new Dep();
  5138. var property = Object.getOwnPropertyDescriptor(obj, key);
  5139. if (property && property.configurable === false) {
  5140. return
  5141. }
  5142. // cater for pre-defined getter/setters
  5143. var getter = property && property.get;
  5144. var setter = property && property.set;
  5145. if ((!getter || setter) && arguments.length === 2) {
  5146. val = obj[key];
  5147. }
  5148. var childOb = !shallow && observe(val);
  5149. Object.defineProperty(obj, key, {
  5150. enumerable: true,
  5151. configurable: true,
  5152. get: function reactiveGetter () {
  5153. var value = getter ? getter.call(obj) : val;
  5154. if (Dep.SharedObject.target) { // fixed by xxxxxx
  5155. dep.depend();
  5156. if (childOb) {
  5157. childOb.dep.depend();
  5158. if (Array.isArray(value)) {
  5159. dependArray(value);
  5160. }
  5161. }
  5162. }
  5163. return value
  5164. },
  5165. set: function reactiveSetter (newVal) {
  5166. var value = getter ? getter.call(obj) : val;
  5167. /* eslint-disable no-self-compare */
  5168. if (newVal === value || (newVal !== newVal && value !== value)) {
  5169. return
  5170. }
  5171. /* eslint-enable no-self-compare */
  5172. if ( true && customSetter) {
  5173. customSetter();
  5174. }
  5175. // #7981: for accessor properties without setter
  5176. if (getter && !setter) { return }
  5177. if (setter) {
  5178. setter.call(obj, newVal);
  5179. } else {
  5180. val = newVal;
  5181. }
  5182. childOb = !shallow && observe(newVal);
  5183. dep.notify();
  5184. }
  5185. });
  5186. }
  5187. /**
  5188. * Set a property on an object. Adds the new property and
  5189. * triggers change notification if the property doesn't
  5190. * already exist.
  5191. */
  5192. function set (target, key, val) {
  5193. if ( true &&
  5194. (isUndef(target) || isPrimitive(target))
  5195. ) {
  5196. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  5197. }
  5198. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5199. target.length = Math.max(target.length, key);
  5200. target.splice(key, 1, val);
  5201. return val
  5202. }
  5203. if (key in target && !(key in Object.prototype)) {
  5204. target[key] = val;
  5205. return val
  5206. }
  5207. var ob = (target).__ob__;
  5208. if (target._isVue || (ob && ob.vmCount)) {
  5209. true && warn(
  5210. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  5211. 'at runtime - declare it upfront in the data option.'
  5212. );
  5213. return val
  5214. }
  5215. if (!ob) {
  5216. target[key] = val;
  5217. return val
  5218. }
  5219. defineReactive$$1(ob.value, key, val);
  5220. ob.dep.notify();
  5221. return val
  5222. }
  5223. /**
  5224. * Delete a property and trigger change if necessary.
  5225. */
  5226. function del (target, key) {
  5227. if ( true &&
  5228. (isUndef(target) || isPrimitive(target))
  5229. ) {
  5230. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  5231. }
  5232. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5233. target.splice(key, 1);
  5234. return
  5235. }
  5236. var ob = (target).__ob__;
  5237. if (target._isVue || (ob && ob.vmCount)) {
  5238. true && warn(
  5239. 'Avoid deleting properties on a Vue instance or its root $data ' +
  5240. '- just set it to null.'
  5241. );
  5242. return
  5243. }
  5244. if (!hasOwn(target, key)) {
  5245. return
  5246. }
  5247. delete target[key];
  5248. if (!ob) {
  5249. return
  5250. }
  5251. ob.dep.notify();
  5252. }
  5253. /**
  5254. * Collect dependencies on array elements when the array is touched, since
  5255. * we cannot intercept array element access like property getters.
  5256. */
  5257. function dependArray (value) {
  5258. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  5259. e = value[i];
  5260. e && e.__ob__ && e.__ob__.dep.depend();
  5261. if (Array.isArray(e)) {
  5262. dependArray(e);
  5263. }
  5264. }
  5265. }
  5266. /* */
  5267. /**
  5268. * Option overwriting strategies are functions that handle
  5269. * how to merge a parent option value and a child option
  5270. * value into the final value.
  5271. */
  5272. var strats = config.optionMergeStrategies;
  5273. /**
  5274. * Options with restrictions
  5275. */
  5276. if (true) {
  5277. strats.el = strats.propsData = function (parent, child, vm, key) {
  5278. if (!vm) {
  5279. warn(
  5280. "option \"" + key + "\" can only be used during instance " +
  5281. 'creation with the `new` keyword.'
  5282. );
  5283. }
  5284. return defaultStrat(parent, child)
  5285. };
  5286. }
  5287. /**
  5288. * Helper that recursively merges two data objects together.
  5289. */
  5290. function mergeData (to, from) {
  5291. if (!from) { return to }
  5292. var key, toVal, fromVal;
  5293. var keys = hasSymbol
  5294. ? Reflect.ownKeys(from)
  5295. : Object.keys(from);
  5296. for (var i = 0; i < keys.length; i++) {
  5297. key = keys[i];
  5298. // in case the object is already observed...
  5299. if (key === '__ob__') { continue }
  5300. toVal = to[key];
  5301. fromVal = from[key];
  5302. if (!hasOwn(to, key)) {
  5303. set(to, key, fromVal);
  5304. } else if (
  5305. toVal !== fromVal &&
  5306. isPlainObject(toVal) &&
  5307. isPlainObject(fromVal)
  5308. ) {
  5309. mergeData(toVal, fromVal);
  5310. }
  5311. }
  5312. return to
  5313. }
  5314. /**
  5315. * Data
  5316. */
  5317. function mergeDataOrFn (
  5318. parentVal,
  5319. childVal,
  5320. vm
  5321. ) {
  5322. if (!vm) {
  5323. // in a Vue.extend merge, both should be functions
  5324. if (!childVal) {
  5325. return parentVal
  5326. }
  5327. if (!parentVal) {
  5328. return childVal
  5329. }
  5330. // when parentVal & childVal are both present,
  5331. // we need to return a function that returns the
  5332. // merged result of both functions... no need to
  5333. // check if parentVal is a function here because
  5334. // it has to be a function to pass previous merges.
  5335. return function mergedDataFn () {
  5336. return mergeData(
  5337. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  5338. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  5339. )
  5340. }
  5341. } else {
  5342. return function mergedInstanceDataFn () {
  5343. // instance merge
  5344. var instanceData = typeof childVal === 'function'
  5345. ? childVal.call(vm, vm)
  5346. : childVal;
  5347. var defaultData = typeof parentVal === 'function'
  5348. ? parentVal.call(vm, vm)
  5349. : parentVal;
  5350. if (instanceData) {
  5351. return mergeData(instanceData, defaultData)
  5352. } else {
  5353. return defaultData
  5354. }
  5355. }
  5356. }
  5357. }
  5358. strats.data = function (
  5359. parentVal,
  5360. childVal,
  5361. vm
  5362. ) {
  5363. if (!vm) {
  5364. if (childVal && typeof childVal !== 'function') {
  5365. true && warn(
  5366. 'The "data" option should be a function ' +
  5367. 'that returns a per-instance value in component ' +
  5368. 'definitions.',
  5369. vm
  5370. );
  5371. return parentVal
  5372. }
  5373. return mergeDataOrFn(parentVal, childVal)
  5374. }
  5375. return mergeDataOrFn(parentVal, childVal, vm)
  5376. };
  5377. /**
  5378. * Hooks and props are merged as arrays.
  5379. */
  5380. function mergeHook (
  5381. parentVal,
  5382. childVal
  5383. ) {
  5384. var res = childVal
  5385. ? parentVal
  5386. ? parentVal.concat(childVal)
  5387. : Array.isArray(childVal)
  5388. ? childVal
  5389. : [childVal]
  5390. : parentVal;
  5391. return res
  5392. ? dedupeHooks(res)
  5393. : res
  5394. }
  5395. function dedupeHooks (hooks) {
  5396. var res = [];
  5397. for (var i = 0; i < hooks.length; i++) {
  5398. if (res.indexOf(hooks[i]) === -1) {
  5399. res.push(hooks[i]);
  5400. }
  5401. }
  5402. return res
  5403. }
  5404. LIFECYCLE_HOOKS.forEach(function (hook) {
  5405. strats[hook] = mergeHook;
  5406. });
  5407. /**
  5408. * Assets
  5409. *
  5410. * When a vm is present (instance creation), we need to do
  5411. * a three-way merge between constructor options, instance
  5412. * options and parent options.
  5413. */
  5414. function mergeAssets (
  5415. parentVal,
  5416. childVal,
  5417. vm,
  5418. key
  5419. ) {
  5420. var res = Object.create(parentVal || null);
  5421. if (childVal) {
  5422. true && assertObjectType(key, childVal, vm);
  5423. return extend(res, childVal)
  5424. } else {
  5425. return res
  5426. }
  5427. }
  5428. ASSET_TYPES.forEach(function (type) {
  5429. strats[type + 's'] = mergeAssets;
  5430. });
  5431. /**
  5432. * Watchers.
  5433. *
  5434. * Watchers hashes should not overwrite one
  5435. * another, so we merge them as arrays.
  5436. */
  5437. strats.watch = function (
  5438. parentVal,
  5439. childVal,
  5440. vm,
  5441. key
  5442. ) {
  5443. // work around Firefox's Object.prototype.watch...
  5444. if (parentVal === nativeWatch) { parentVal = undefined; }
  5445. if (childVal === nativeWatch) { childVal = undefined; }
  5446. /* istanbul ignore if */
  5447. if (!childVal) { return Object.create(parentVal || null) }
  5448. if (true) {
  5449. assertObjectType(key, childVal, vm);
  5450. }
  5451. if (!parentVal) { return childVal }
  5452. var ret = {};
  5453. extend(ret, parentVal);
  5454. for (var key$1 in childVal) {
  5455. var parent = ret[key$1];
  5456. var child = childVal[key$1];
  5457. if (parent && !Array.isArray(parent)) {
  5458. parent = [parent];
  5459. }
  5460. ret[key$1] = parent
  5461. ? parent.concat(child)
  5462. : Array.isArray(child) ? child : [child];
  5463. }
  5464. return ret
  5465. };
  5466. /**
  5467. * Other object hashes.
  5468. */
  5469. strats.props =
  5470. strats.methods =
  5471. strats.inject =
  5472. strats.computed = function (
  5473. parentVal,
  5474. childVal,
  5475. vm,
  5476. key
  5477. ) {
  5478. if (childVal && "development" !== 'production') {
  5479. assertObjectType(key, childVal, vm);
  5480. }
  5481. if (!parentVal) { return childVal }
  5482. var ret = Object.create(null);
  5483. extend(ret, parentVal);
  5484. if (childVal) { extend(ret, childVal); }
  5485. return ret
  5486. };
  5487. strats.provide = mergeDataOrFn;
  5488. /**
  5489. * Default strategy.
  5490. */
  5491. var defaultStrat = function (parentVal, childVal) {
  5492. return childVal === undefined
  5493. ? parentVal
  5494. : childVal
  5495. };
  5496. /**
  5497. * Validate component names
  5498. */
  5499. function checkComponents (options) {
  5500. for (var key in options.components) {
  5501. validateComponentName(key);
  5502. }
  5503. }
  5504. function validateComponentName (name) {
  5505. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  5506. warn(
  5507. 'Invalid component name: "' + name + '". Component names ' +
  5508. 'should conform to valid custom element name in html5 specification.'
  5509. );
  5510. }
  5511. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  5512. warn(
  5513. 'Do not use built-in or reserved HTML elements as component ' +
  5514. 'id: ' + name
  5515. );
  5516. }
  5517. }
  5518. /**
  5519. * Ensure all props option syntax are normalized into the
  5520. * Object-based format.
  5521. */
  5522. function normalizeProps (options, vm) {
  5523. var props = options.props;
  5524. if (!props) { return }
  5525. var res = {};
  5526. var i, val, name;
  5527. if (Array.isArray(props)) {
  5528. i = props.length;
  5529. while (i--) {
  5530. val = props[i];
  5531. if (typeof val === 'string') {
  5532. name = camelize(val);
  5533. res[name] = { type: null };
  5534. } else if (true) {
  5535. warn('props must be strings when using array syntax.');
  5536. }
  5537. }
  5538. } else if (isPlainObject(props)) {
  5539. for (var key in props) {
  5540. val = props[key];
  5541. name = camelize(key);
  5542. res[name] = isPlainObject(val)
  5543. ? val
  5544. : { type: val };
  5545. }
  5546. } else if (true) {
  5547. warn(
  5548. "Invalid value for option \"props\": expected an Array or an Object, " +
  5549. "but got " + (toRawType(props)) + ".",
  5550. vm
  5551. );
  5552. }
  5553. options.props = res;
  5554. }
  5555. /**
  5556. * Normalize all injections into Object-based format
  5557. */
  5558. function normalizeInject (options, vm) {
  5559. var inject = options.inject;
  5560. if (!inject) { return }
  5561. var normalized = options.inject = {};
  5562. if (Array.isArray(inject)) {
  5563. for (var i = 0; i < inject.length; i++) {
  5564. normalized[inject[i]] = { from: inject[i] };
  5565. }
  5566. } else if (isPlainObject(inject)) {
  5567. for (var key in inject) {
  5568. var val = inject[key];
  5569. normalized[key] = isPlainObject(val)
  5570. ? extend({ from: key }, val)
  5571. : { from: val };
  5572. }
  5573. } else if (true) {
  5574. warn(
  5575. "Invalid value for option \"inject\": expected an Array or an Object, " +
  5576. "but got " + (toRawType(inject)) + ".",
  5577. vm
  5578. );
  5579. }
  5580. }
  5581. /**
  5582. * Normalize raw function directives into object format.
  5583. */
  5584. function normalizeDirectives (options) {
  5585. var dirs = options.directives;
  5586. if (dirs) {
  5587. for (var key in dirs) {
  5588. var def$$1 = dirs[key];
  5589. if (typeof def$$1 === 'function') {
  5590. dirs[key] = { bind: def$$1, update: def$$1 };
  5591. }
  5592. }
  5593. }
  5594. }
  5595. function assertObjectType (name, value, vm) {
  5596. if (!isPlainObject(value)) {
  5597. warn(
  5598. "Invalid value for option \"" + name + "\": expected an Object, " +
  5599. "but got " + (toRawType(value)) + ".",
  5600. vm
  5601. );
  5602. }
  5603. }
  5604. /**
  5605. * Merge two option objects into a new one.
  5606. * Core utility used in both instantiation and inheritance.
  5607. */
  5608. function mergeOptions (
  5609. parent,
  5610. child,
  5611. vm
  5612. ) {
  5613. if (true) {
  5614. checkComponents(child);
  5615. }
  5616. if (typeof child === 'function') {
  5617. child = child.options;
  5618. }
  5619. normalizeProps(child, vm);
  5620. normalizeInject(child, vm);
  5621. normalizeDirectives(child);
  5622. // Apply extends and mixins on the child options,
  5623. // but only if it is a raw options object that isn't
  5624. // the result of another mergeOptions call.
  5625. // Only merged options has the _base property.
  5626. if (!child._base) {
  5627. if (child.extends) {
  5628. parent = mergeOptions(parent, child.extends, vm);
  5629. }
  5630. if (child.mixins) {
  5631. for (var i = 0, l = child.mixins.length; i < l; i++) {
  5632. parent = mergeOptions(parent, child.mixins[i], vm);
  5633. }
  5634. }
  5635. }
  5636. var options = {};
  5637. var key;
  5638. for (key in parent) {
  5639. mergeField(key);
  5640. }
  5641. for (key in child) {
  5642. if (!hasOwn(parent, key)) {
  5643. mergeField(key);
  5644. }
  5645. }
  5646. function mergeField (key) {
  5647. var strat = strats[key] || defaultStrat;
  5648. options[key] = strat(parent[key], child[key], vm, key);
  5649. }
  5650. return options
  5651. }
  5652. /**
  5653. * Resolve an asset.
  5654. * This function is used because child instances need access
  5655. * to assets defined in its ancestor chain.
  5656. */
  5657. function resolveAsset (
  5658. options,
  5659. type,
  5660. id,
  5661. warnMissing
  5662. ) {
  5663. /* istanbul ignore if */
  5664. if (typeof id !== 'string') {
  5665. return
  5666. }
  5667. var assets = options[type];
  5668. // check local registration variations first
  5669. if (hasOwn(assets, id)) { return assets[id] }
  5670. var camelizedId = camelize(id);
  5671. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  5672. var PascalCaseId = capitalize(camelizedId);
  5673. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  5674. // fallback to prototype chain
  5675. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  5676. if ( true && warnMissing && !res) {
  5677. warn(
  5678. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  5679. options
  5680. );
  5681. }
  5682. return res
  5683. }
  5684. /* */
  5685. function validateProp (
  5686. key,
  5687. propOptions,
  5688. propsData,
  5689. vm
  5690. ) {
  5691. var prop = propOptions[key];
  5692. var absent = !hasOwn(propsData, key);
  5693. var value = propsData[key];
  5694. // boolean casting
  5695. var booleanIndex = getTypeIndex(Boolean, prop.type);
  5696. if (booleanIndex > -1) {
  5697. if (absent && !hasOwn(prop, 'default')) {
  5698. value = false;
  5699. } else if (value === '' || value === hyphenate(key)) {
  5700. // only cast empty string / same name to boolean if
  5701. // boolean has higher priority
  5702. var stringIndex = getTypeIndex(String, prop.type);
  5703. if (stringIndex < 0 || booleanIndex < stringIndex) {
  5704. value = true;
  5705. }
  5706. }
  5707. }
  5708. // check default value
  5709. if (value === undefined) {
  5710. value = getPropDefaultValue(vm, prop, key);
  5711. // since the default value is a fresh copy,
  5712. // make sure to observe it.
  5713. var prevShouldObserve = shouldObserve;
  5714. toggleObserving(true);
  5715. observe(value);
  5716. toggleObserving(prevShouldObserve);
  5717. }
  5718. if (
  5719. true
  5720. ) {
  5721. assertProp(prop, key, value, vm, absent);
  5722. }
  5723. return value
  5724. }
  5725. /**
  5726. * Get the default value of a prop.
  5727. */
  5728. function getPropDefaultValue (vm, prop, key) {
  5729. // no default, return undefined
  5730. if (!hasOwn(prop, 'default')) {
  5731. return undefined
  5732. }
  5733. var def = prop.default;
  5734. // warn against non-factory defaults for Object & Array
  5735. if ( true && isObject(def)) {
  5736. warn(
  5737. 'Invalid default value for prop "' + key + '": ' +
  5738. 'Props with type Object/Array must use a factory function ' +
  5739. 'to return the default value.',
  5740. vm
  5741. );
  5742. }
  5743. // the raw prop value was also undefined from previous render,
  5744. // return previous default value to avoid unnecessary watcher trigger
  5745. if (vm && vm.$options.propsData &&
  5746. vm.$options.propsData[key] === undefined &&
  5747. vm._props[key] !== undefined
  5748. ) {
  5749. return vm._props[key]
  5750. }
  5751. // call factory function for non-Function types
  5752. // a value is Function if its prototype is function even across different execution context
  5753. return typeof def === 'function' && getType(prop.type) !== 'Function'
  5754. ? def.call(vm)
  5755. : def
  5756. }
  5757. /**
  5758. * Assert whether a prop is valid.
  5759. */
  5760. function assertProp (
  5761. prop,
  5762. name,
  5763. value,
  5764. vm,
  5765. absent
  5766. ) {
  5767. if (prop.required && absent) {
  5768. warn(
  5769. 'Missing required prop: "' + name + '"',
  5770. vm
  5771. );
  5772. return
  5773. }
  5774. if (value == null && !prop.required) {
  5775. return
  5776. }
  5777. var type = prop.type;
  5778. var valid = !type || type === true;
  5779. var expectedTypes = [];
  5780. if (type) {
  5781. if (!Array.isArray(type)) {
  5782. type = [type];
  5783. }
  5784. for (var i = 0; i < type.length && !valid; i++) {
  5785. var assertedType = assertType(value, type[i]);
  5786. expectedTypes.push(assertedType.expectedType || '');
  5787. valid = assertedType.valid;
  5788. }
  5789. }
  5790. if (!valid) {
  5791. warn(
  5792. getInvalidTypeMessage(name, value, expectedTypes),
  5793. vm
  5794. );
  5795. return
  5796. }
  5797. var validator = prop.validator;
  5798. if (validator) {
  5799. if (!validator(value)) {
  5800. warn(
  5801. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  5802. vm
  5803. );
  5804. }
  5805. }
  5806. }
  5807. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  5808. function assertType (value, type) {
  5809. var valid;
  5810. var expectedType = getType(type);
  5811. if (simpleCheckRE.test(expectedType)) {
  5812. var t = typeof value;
  5813. valid = t === expectedType.toLowerCase();
  5814. // for primitive wrapper objects
  5815. if (!valid && t === 'object') {
  5816. valid = value instanceof type;
  5817. }
  5818. } else if (expectedType === 'Object') {
  5819. valid = isPlainObject(value);
  5820. } else if (expectedType === 'Array') {
  5821. valid = Array.isArray(value);
  5822. } else {
  5823. valid = value instanceof type;
  5824. }
  5825. return {
  5826. valid: valid,
  5827. expectedType: expectedType
  5828. }
  5829. }
  5830. /**
  5831. * Use function string name to check built-in types,
  5832. * because a simple equality check will fail when running
  5833. * across different vms / iframes.
  5834. */
  5835. function getType (fn) {
  5836. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  5837. return match ? match[1] : ''
  5838. }
  5839. function isSameType (a, b) {
  5840. return getType(a) === getType(b)
  5841. }
  5842. function getTypeIndex (type, expectedTypes) {
  5843. if (!Array.isArray(expectedTypes)) {
  5844. return isSameType(expectedTypes, type) ? 0 : -1
  5845. }
  5846. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  5847. if (isSameType(expectedTypes[i], type)) {
  5848. return i
  5849. }
  5850. }
  5851. return -1
  5852. }
  5853. function getInvalidTypeMessage (name, value, expectedTypes) {
  5854. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  5855. " Expected " + (expectedTypes.map(capitalize).join(', '));
  5856. var expectedType = expectedTypes[0];
  5857. var receivedType = toRawType(value);
  5858. var expectedValue = styleValue(value, expectedType);
  5859. var receivedValue = styleValue(value, receivedType);
  5860. // check if we need to specify expected value
  5861. if (expectedTypes.length === 1 &&
  5862. isExplicable(expectedType) &&
  5863. !isBoolean(expectedType, receivedType)) {
  5864. message += " with value " + expectedValue;
  5865. }
  5866. message += ", got " + receivedType + " ";
  5867. // check if we need to specify received value
  5868. if (isExplicable(receivedType)) {
  5869. message += "with value " + receivedValue + ".";
  5870. }
  5871. return message
  5872. }
  5873. function styleValue (value, type) {
  5874. if (type === 'String') {
  5875. return ("\"" + value + "\"")
  5876. } else if (type === 'Number') {
  5877. return ("" + (Number(value)))
  5878. } else {
  5879. return ("" + value)
  5880. }
  5881. }
  5882. function isExplicable (value) {
  5883. var explicitTypes = ['string', 'number', 'boolean'];
  5884. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  5885. }
  5886. function isBoolean () {
  5887. var args = [], len = arguments.length;
  5888. while ( len-- ) args[ len ] = arguments[ len ];
  5889. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  5890. }
  5891. /* */
  5892. function handleError (err, vm, info) {
  5893. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  5894. // See: https://github.com/vuejs/vuex/issues/1505
  5895. pushTarget();
  5896. try {
  5897. if (vm) {
  5898. var cur = vm;
  5899. while ((cur = cur.$parent)) {
  5900. var hooks = cur.$options.errorCaptured;
  5901. if (hooks) {
  5902. for (var i = 0; i < hooks.length; i++) {
  5903. try {
  5904. var capture = hooks[i].call(cur, err, vm, info) === false;
  5905. if (capture) { return }
  5906. } catch (e) {
  5907. globalHandleError(e, cur, 'errorCaptured hook');
  5908. }
  5909. }
  5910. }
  5911. }
  5912. }
  5913. globalHandleError(err, vm, info);
  5914. } finally {
  5915. popTarget();
  5916. }
  5917. }
  5918. function invokeWithErrorHandling (
  5919. handler,
  5920. context,
  5921. args,
  5922. vm,
  5923. info
  5924. ) {
  5925. var res;
  5926. try {
  5927. res = args ? handler.apply(context, args) : handler.call(context);
  5928. if (res && !res._isVue && isPromise(res) && !res._handled) {
  5929. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  5930. // issue #9511
  5931. // avoid catch triggering multiple times when nested calls
  5932. res._handled = true;
  5933. }
  5934. } catch (e) {
  5935. handleError(e, vm, info);
  5936. }
  5937. return res
  5938. }
  5939. function globalHandleError (err, vm, info) {
  5940. if (config.errorHandler) {
  5941. try {
  5942. return config.errorHandler.call(null, err, vm, info)
  5943. } catch (e) {
  5944. // if the user intentionally throws the original error in the handler,
  5945. // do not log it twice
  5946. if (e !== err) {
  5947. logError(e, null, 'config.errorHandler');
  5948. }
  5949. }
  5950. }
  5951. logError(err, vm, info);
  5952. }
  5953. function logError (err, vm, info) {
  5954. if (true) {
  5955. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  5956. }
  5957. /* istanbul ignore else */
  5958. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  5959. console.error(err);
  5960. } else {
  5961. throw err
  5962. }
  5963. }
  5964. /* */
  5965. var callbacks = [];
  5966. var pending = false;
  5967. function flushCallbacks () {
  5968. pending = false;
  5969. var copies = callbacks.slice(0);
  5970. callbacks.length = 0;
  5971. for (var i = 0; i < copies.length; i++) {
  5972. copies[i]();
  5973. }
  5974. }
  5975. // Here we have async deferring wrappers using microtasks.
  5976. // In 2.5 we used (macro) tasks (in combination with microtasks).
  5977. // However, it has subtle problems when state is changed right before repaint
  5978. // (e.g. #6813, out-in transitions).
  5979. // Also, using (macro) tasks in event handler would cause some weird behaviors
  5980. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  5981. // So we now use microtasks everywhere, again.
  5982. // A major drawback of this tradeoff is that there are some scenarios
  5983. // where microtasks have too high a priority and fire in between supposedly
  5984. // sequential events (e.g. #4521, #6690, which have workarounds)
  5985. // or even between bubbling of the same event (#6566).
  5986. var timerFunc;
  5987. // The nextTick behavior leverages the microtask queue, which can be accessed
  5988. // via either native Promise.then or MutationObserver.
  5989. // MutationObserver has wider support, however it is seriously bugged in
  5990. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  5991. // completely stops working after triggering a few times... so, if native
  5992. // Promise is available, we will use it:
  5993. /* istanbul ignore next, $flow-disable-line */
  5994. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  5995. var p = Promise.resolve();
  5996. timerFunc = function () {
  5997. p.then(flushCallbacks);
  5998. // In problematic UIWebViews, Promise.then doesn't completely break, but
  5999. // it can get stuck in a weird state where callbacks are pushed into the
  6000. // microtask queue but the queue isn't being flushed, until the browser
  6001. // needs to do some other work, e.g. handle a timer. Therefore we can
  6002. // "force" the microtask queue to be flushed by adding an empty timer.
  6003. if (isIOS) { setTimeout(noop); }
  6004. };
  6005. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  6006. isNative(MutationObserver) ||
  6007. // PhantomJS and iOS 7.x
  6008. MutationObserver.toString() === '[object MutationObserverConstructor]'
  6009. )) {
  6010. // Use MutationObserver where native Promise is not available,
  6011. // e.g. PhantomJS, iOS7, Android 4.4
  6012. // (#6466 MutationObserver is unreliable in IE11)
  6013. var counter = 1;
  6014. var observer = new MutationObserver(flushCallbacks);
  6015. var textNode = document.createTextNode(String(counter));
  6016. observer.observe(textNode, {
  6017. characterData: true
  6018. });
  6019. timerFunc = function () {
  6020. counter = (counter + 1) % 2;
  6021. textNode.data = String(counter);
  6022. };
  6023. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  6024. // Fallback to setImmediate.
  6025. // Technically it leverages the (macro) task queue,
  6026. // but it is still a better choice than setTimeout.
  6027. timerFunc = function () {
  6028. setImmediate(flushCallbacks);
  6029. };
  6030. } else {
  6031. // Fallback to setTimeout.
  6032. timerFunc = function () {
  6033. setTimeout(flushCallbacks, 0);
  6034. };
  6035. }
  6036. function nextTick (cb, ctx) {
  6037. var _resolve;
  6038. callbacks.push(function () {
  6039. if (cb) {
  6040. try {
  6041. cb.call(ctx);
  6042. } catch (e) {
  6043. handleError(e, ctx, 'nextTick');
  6044. }
  6045. } else if (_resolve) {
  6046. _resolve(ctx);
  6047. }
  6048. });
  6049. if (!pending) {
  6050. pending = true;
  6051. timerFunc();
  6052. }
  6053. // $flow-disable-line
  6054. if (!cb && typeof Promise !== 'undefined') {
  6055. return new Promise(function (resolve) {
  6056. _resolve = resolve;
  6057. })
  6058. }
  6059. }
  6060. /* */
  6061. /* not type checking this file because flow doesn't play well with Proxy */
  6062. var initProxy;
  6063. if (true) {
  6064. var allowedGlobals = makeMap(
  6065. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  6066. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  6067. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  6068. 'require' // for Webpack/Browserify
  6069. );
  6070. var warnNonPresent = function (target, key) {
  6071. warn(
  6072. "Property or method \"" + key + "\" is not defined on the instance but " +
  6073. 'referenced during render. Make sure that this property is reactive, ' +
  6074. 'either in the data option, or for class-based components, by ' +
  6075. 'initializing the property. ' +
  6076. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  6077. target
  6078. );
  6079. };
  6080. var warnReservedPrefix = function (target, key) {
  6081. warn(
  6082. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  6083. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  6084. 'prevent conflicts with Vue internals. ' +
  6085. 'See: https://vuejs.org/v2/api/#data',
  6086. target
  6087. );
  6088. };
  6089. var hasProxy =
  6090. typeof Proxy !== 'undefined' && isNative(Proxy);
  6091. if (hasProxy) {
  6092. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  6093. config.keyCodes = new Proxy(config.keyCodes, {
  6094. set: function set (target, key, value) {
  6095. if (isBuiltInModifier(key)) {
  6096. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  6097. return false
  6098. } else {
  6099. target[key] = value;
  6100. return true
  6101. }
  6102. }
  6103. });
  6104. }
  6105. var hasHandler = {
  6106. has: function has (target, key) {
  6107. var has = key in target;
  6108. var isAllowed = allowedGlobals(key) ||
  6109. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  6110. if (!has && !isAllowed) {
  6111. if (key in target.$data) { warnReservedPrefix(target, key); }
  6112. else { warnNonPresent(target, key); }
  6113. }
  6114. return has || !isAllowed
  6115. }
  6116. };
  6117. var getHandler = {
  6118. get: function get (target, key) {
  6119. if (typeof key === 'string' && !(key in target)) {
  6120. if (key in target.$data) { warnReservedPrefix(target, key); }
  6121. else { warnNonPresent(target, key); }
  6122. }
  6123. return target[key]
  6124. }
  6125. };
  6126. initProxy = function initProxy (vm) {
  6127. if (hasProxy) {
  6128. // determine which proxy handler to use
  6129. var options = vm.$options;
  6130. var handlers = options.render && options.render._withStripped
  6131. ? getHandler
  6132. : hasHandler;
  6133. vm._renderProxy = new Proxy(vm, handlers);
  6134. } else {
  6135. vm._renderProxy = vm;
  6136. }
  6137. };
  6138. }
  6139. /* */
  6140. var seenObjects = new _Set();
  6141. /**
  6142. * Recursively traverse an object to evoke all converted
  6143. * getters, so that every nested property inside the object
  6144. * is collected as a "deep" dependency.
  6145. */
  6146. function traverse (val) {
  6147. _traverse(val, seenObjects);
  6148. seenObjects.clear();
  6149. }
  6150. function _traverse (val, seen) {
  6151. var i, keys;
  6152. var isA = Array.isArray(val);
  6153. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  6154. return
  6155. }
  6156. if (val.__ob__) {
  6157. var depId = val.__ob__.dep.id;
  6158. if (seen.has(depId)) {
  6159. return
  6160. }
  6161. seen.add(depId);
  6162. }
  6163. if (isA) {
  6164. i = val.length;
  6165. while (i--) { _traverse(val[i], seen); }
  6166. } else {
  6167. keys = Object.keys(val);
  6168. i = keys.length;
  6169. while (i--) { _traverse(val[keys[i]], seen); }
  6170. }
  6171. }
  6172. var mark;
  6173. var measure;
  6174. if (true) {
  6175. var perf = inBrowser && window.performance;
  6176. /* istanbul ignore if */
  6177. if (
  6178. perf &&
  6179. perf.mark &&
  6180. perf.measure &&
  6181. perf.clearMarks &&
  6182. perf.clearMeasures
  6183. ) {
  6184. mark = function (tag) { return perf.mark(tag); };
  6185. measure = function (name, startTag, endTag) {
  6186. perf.measure(name, startTag, endTag);
  6187. perf.clearMarks(startTag);
  6188. perf.clearMarks(endTag);
  6189. // perf.clearMeasures(name)
  6190. };
  6191. }
  6192. }
  6193. /* */
  6194. var normalizeEvent = cached(function (name) {
  6195. var passive = name.charAt(0) === '&';
  6196. name = passive ? name.slice(1) : name;
  6197. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  6198. name = once$$1 ? name.slice(1) : name;
  6199. var capture = name.charAt(0) === '!';
  6200. name = capture ? name.slice(1) : name;
  6201. return {
  6202. name: name,
  6203. once: once$$1,
  6204. capture: capture,
  6205. passive: passive
  6206. }
  6207. });
  6208. function createFnInvoker (fns, vm) {
  6209. function invoker () {
  6210. var arguments$1 = arguments;
  6211. var fns = invoker.fns;
  6212. if (Array.isArray(fns)) {
  6213. var cloned = fns.slice();
  6214. for (var i = 0; i < cloned.length; i++) {
  6215. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  6216. }
  6217. } else {
  6218. // return handler return value for single handlers
  6219. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  6220. }
  6221. }
  6222. invoker.fns = fns;
  6223. return invoker
  6224. }
  6225. function updateListeners (
  6226. on,
  6227. oldOn,
  6228. add,
  6229. remove$$1,
  6230. createOnceHandler,
  6231. vm
  6232. ) {
  6233. var name, def$$1, cur, old, event;
  6234. for (name in on) {
  6235. def$$1 = cur = on[name];
  6236. old = oldOn[name];
  6237. event = normalizeEvent(name);
  6238. if (isUndef(cur)) {
  6239. true && warn(
  6240. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  6241. vm
  6242. );
  6243. } else if (isUndef(old)) {
  6244. if (isUndef(cur.fns)) {
  6245. cur = on[name] = createFnInvoker(cur, vm);
  6246. }
  6247. if (isTrue(event.once)) {
  6248. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  6249. }
  6250. add(event.name, cur, event.capture, event.passive, event.params);
  6251. } else if (cur !== old) {
  6252. old.fns = cur;
  6253. on[name] = old;
  6254. }
  6255. }
  6256. for (name in oldOn) {
  6257. if (isUndef(on[name])) {
  6258. event = normalizeEvent(name);
  6259. remove$$1(event.name, oldOn[name], event.capture);
  6260. }
  6261. }
  6262. }
  6263. /* */
  6264. /* */
  6265. // fixed by xxxxxx (mp properties)
  6266. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  6267. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  6268. if (isUndef(propOptions)) {
  6269. return res
  6270. }
  6271. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  6272. var attrs = data.attrs;
  6273. var props = data.props;
  6274. if (isDef(attrs) || isDef(props)) {
  6275. for (var key in propOptions) {
  6276. var altKey = hyphenate(key);
  6277. var result = checkProp(res, props, key, altKey, true) ||
  6278. checkProp(res, attrs, key, altKey, false);
  6279. // externalClass
  6280. if (
  6281. result &&
  6282. res[key] &&
  6283. externalClasses.indexOf(altKey) !== -1 &&
  6284. context[camelize(res[key])]
  6285. ) {
  6286. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  6287. res[key] = context[camelize(res[key])];
  6288. }
  6289. }
  6290. }
  6291. return res
  6292. }
  6293. function extractPropsFromVNodeData (
  6294. data,
  6295. Ctor,
  6296. tag,
  6297. context// fixed by xxxxxx
  6298. ) {
  6299. // we are only extracting raw values here.
  6300. // validation and default values are handled in the child
  6301. // component itself.
  6302. var propOptions = Ctor.options.props;
  6303. if (isUndef(propOptions)) {
  6304. // fixed by xxxxxx
  6305. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  6306. }
  6307. var res = {};
  6308. var attrs = data.attrs;
  6309. var props = data.props;
  6310. if (isDef(attrs) || isDef(props)) {
  6311. for (var key in propOptions) {
  6312. var altKey = hyphenate(key);
  6313. if (true) {
  6314. var keyInLowerCase = key.toLowerCase();
  6315. if (
  6316. key !== keyInLowerCase &&
  6317. attrs && hasOwn(attrs, keyInLowerCase)
  6318. ) {
  6319. tip(
  6320. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  6321. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  6322. " \"" + key + "\". " +
  6323. "Note that HTML attributes are case-insensitive and camelCased " +
  6324. "props need to use their kebab-case equivalents when using in-DOM " +
  6325. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  6326. );
  6327. }
  6328. }
  6329. checkProp(res, props, key, altKey, true) ||
  6330. checkProp(res, attrs, key, altKey, false);
  6331. }
  6332. }
  6333. // fixed by xxxxxx
  6334. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  6335. }
  6336. function checkProp (
  6337. res,
  6338. hash,
  6339. key,
  6340. altKey,
  6341. preserve
  6342. ) {
  6343. if (isDef(hash)) {
  6344. if (hasOwn(hash, key)) {
  6345. res[key] = hash[key];
  6346. if (!preserve) {
  6347. delete hash[key];
  6348. }
  6349. return true
  6350. } else if (hasOwn(hash, altKey)) {
  6351. res[key] = hash[altKey];
  6352. if (!preserve) {
  6353. delete hash[altKey];
  6354. }
  6355. return true
  6356. }
  6357. }
  6358. return false
  6359. }
  6360. /* */
  6361. // The template compiler attempts to minimize the need for normalization by
  6362. // statically analyzing the template at compile time.
  6363. //
  6364. // For plain HTML markup, normalization can be completely skipped because the
  6365. // generated render function is guaranteed to return Array<VNode>. There are
  6366. // two cases where extra normalization is needed:
  6367. // 1. When the children contains components - because a functional component
  6368. // may return an Array instead of a single root. In this case, just a simple
  6369. // normalization is needed - if any child is an Array, we flatten the whole
  6370. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  6371. // because functional components already normalize their own children.
  6372. function simpleNormalizeChildren (children) {
  6373. for (var i = 0; i < children.length; i++) {
  6374. if (Array.isArray(children[i])) {
  6375. return Array.prototype.concat.apply([], children)
  6376. }
  6377. }
  6378. return children
  6379. }
  6380. // 2. When the children contains constructs that always generated nested Arrays,
  6381. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  6382. // with hand-written render functions / JSX. In such cases a full normalization
  6383. // is needed to cater to all possible types of children values.
  6384. function normalizeChildren (children) {
  6385. return isPrimitive(children)
  6386. ? [createTextVNode(children)]
  6387. : Array.isArray(children)
  6388. ? normalizeArrayChildren(children)
  6389. : undefined
  6390. }
  6391. function isTextNode (node) {
  6392. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  6393. }
  6394. function normalizeArrayChildren (children, nestedIndex) {
  6395. var res = [];
  6396. var i, c, lastIndex, last;
  6397. for (i = 0; i < children.length; i++) {
  6398. c = children[i];
  6399. if (isUndef(c) || typeof c === 'boolean') { continue }
  6400. lastIndex = res.length - 1;
  6401. last = res[lastIndex];
  6402. // nested
  6403. if (Array.isArray(c)) {
  6404. if (c.length > 0) {
  6405. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  6406. // merge adjacent text nodes
  6407. if (isTextNode(c[0]) && isTextNode(last)) {
  6408. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  6409. c.shift();
  6410. }
  6411. res.push.apply(res, c);
  6412. }
  6413. } else if (isPrimitive(c)) {
  6414. if (isTextNode(last)) {
  6415. // merge adjacent text nodes
  6416. // this is necessary for SSR hydration because text nodes are
  6417. // essentially merged when rendered to HTML strings
  6418. res[lastIndex] = createTextVNode(last.text + c);
  6419. } else if (c !== '') {
  6420. // convert primitive to vnode
  6421. res.push(createTextVNode(c));
  6422. }
  6423. } else {
  6424. if (isTextNode(c) && isTextNode(last)) {
  6425. // merge adjacent text nodes
  6426. res[lastIndex] = createTextVNode(last.text + c.text);
  6427. } else {
  6428. // default key for nested array children (likely generated by v-for)
  6429. if (isTrue(children._isVList) &&
  6430. isDef(c.tag) &&
  6431. isUndef(c.key) &&
  6432. isDef(nestedIndex)) {
  6433. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  6434. }
  6435. res.push(c);
  6436. }
  6437. }
  6438. }
  6439. return res
  6440. }
  6441. /* */
  6442. function initProvide (vm) {
  6443. var provide = vm.$options.provide;
  6444. if (provide) {
  6445. vm._provided = typeof provide === 'function'
  6446. ? provide.call(vm)
  6447. : provide;
  6448. }
  6449. }
  6450. function initInjections (vm) {
  6451. var result = resolveInject(vm.$options.inject, vm);
  6452. if (result) {
  6453. toggleObserving(false);
  6454. Object.keys(result).forEach(function (key) {
  6455. /* istanbul ignore else */
  6456. if (true) {
  6457. defineReactive$$1(vm, key, result[key], function () {
  6458. warn(
  6459. "Avoid mutating an injected value directly since the changes will be " +
  6460. "overwritten whenever the provided component re-renders. " +
  6461. "injection being mutated: \"" + key + "\"",
  6462. vm
  6463. );
  6464. });
  6465. } else {}
  6466. });
  6467. toggleObserving(true);
  6468. }
  6469. }
  6470. function resolveInject (inject, vm) {
  6471. if (inject) {
  6472. // inject is :any because flow is not smart enough to figure out cached
  6473. var result = Object.create(null);
  6474. var keys = hasSymbol
  6475. ? Reflect.ownKeys(inject)
  6476. : Object.keys(inject);
  6477. for (var i = 0; i < keys.length; i++) {
  6478. var key = keys[i];
  6479. // #6574 in case the inject object is observed...
  6480. if (key === '__ob__') { continue }
  6481. var provideKey = inject[key].from;
  6482. var source = vm;
  6483. while (source) {
  6484. if (source._provided && hasOwn(source._provided, provideKey)) {
  6485. result[key] = source._provided[provideKey];
  6486. break
  6487. }
  6488. source = source.$parent;
  6489. }
  6490. if (!source) {
  6491. if ('default' in inject[key]) {
  6492. var provideDefault = inject[key].default;
  6493. result[key] = typeof provideDefault === 'function'
  6494. ? provideDefault.call(vm)
  6495. : provideDefault;
  6496. } else if (true) {
  6497. warn(("Injection \"" + key + "\" not found"), vm);
  6498. }
  6499. }
  6500. }
  6501. return result
  6502. }
  6503. }
  6504. /* */
  6505. /**
  6506. * Runtime helper for resolving raw children VNodes into a slot object.
  6507. */
  6508. function resolveSlots (
  6509. children,
  6510. context
  6511. ) {
  6512. if (!children || !children.length) {
  6513. return {}
  6514. }
  6515. var slots = {};
  6516. for (var i = 0, l = children.length; i < l; i++) {
  6517. var child = children[i];
  6518. var data = child.data;
  6519. // remove slot attribute if the node is resolved as a Vue slot node
  6520. if (data && data.attrs && data.attrs.slot) {
  6521. delete data.attrs.slot;
  6522. }
  6523. // named slots should only be respected if the vnode was rendered in the
  6524. // same context.
  6525. if ((child.context === context || child.fnContext === context) &&
  6526. data && data.slot != null
  6527. ) {
  6528. var name = data.slot;
  6529. var slot = (slots[name] || (slots[name] = []));
  6530. if (child.tag === 'template') {
  6531. slot.push.apply(slot, child.children || []);
  6532. } else {
  6533. slot.push(child);
  6534. }
  6535. } else {
  6536. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  6537. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  6538. (slots['page'] || (slots['page'] = [])).push(child);
  6539. }else{
  6540. (slots.default || (slots.default = [])).push(child);
  6541. }
  6542. }
  6543. }
  6544. // ignore slots that contains only whitespace
  6545. for (var name$1 in slots) {
  6546. if (slots[name$1].every(isWhitespace)) {
  6547. delete slots[name$1];
  6548. }
  6549. }
  6550. return slots
  6551. }
  6552. function isWhitespace (node) {
  6553. return (node.isComment && !node.asyncFactory) || node.text === ' '
  6554. }
  6555. /* */
  6556. function normalizeScopedSlots (
  6557. slots,
  6558. normalSlots,
  6559. prevSlots
  6560. ) {
  6561. var res;
  6562. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  6563. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  6564. var key = slots && slots.$key;
  6565. if (!slots) {
  6566. res = {};
  6567. } else if (slots._normalized) {
  6568. // fast path 1: child component re-render only, parent did not change
  6569. return slots._normalized
  6570. } else if (
  6571. isStable &&
  6572. prevSlots &&
  6573. prevSlots !== emptyObject &&
  6574. key === prevSlots.$key &&
  6575. !hasNormalSlots &&
  6576. !prevSlots.$hasNormal
  6577. ) {
  6578. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  6579. // only need to normalize once
  6580. return prevSlots
  6581. } else {
  6582. res = {};
  6583. for (var key$1 in slots) {
  6584. if (slots[key$1] && key$1[0] !== '$') {
  6585. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  6586. }
  6587. }
  6588. }
  6589. // expose normal slots on scopedSlots
  6590. for (var key$2 in normalSlots) {
  6591. if (!(key$2 in res)) {
  6592. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  6593. }
  6594. }
  6595. // avoriaz seems to mock a non-extensible $scopedSlots object
  6596. // and when that is passed down this would cause an error
  6597. if (slots && Object.isExtensible(slots)) {
  6598. (slots)._normalized = res;
  6599. }
  6600. def(res, '$stable', isStable);
  6601. def(res, '$key', key);
  6602. def(res, '$hasNormal', hasNormalSlots);
  6603. return res
  6604. }
  6605. function normalizeScopedSlot(normalSlots, key, fn) {
  6606. var normalized = function () {
  6607. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  6608. res = res && typeof res === 'object' && !Array.isArray(res)
  6609. ? [res] // single vnode
  6610. : normalizeChildren(res);
  6611. return res && (
  6612. res.length === 0 ||
  6613. (res.length === 1 && res[0].isComment) // #9658
  6614. ) ? undefined
  6615. : res
  6616. };
  6617. // this is a slot using the new v-slot syntax without scope. although it is
  6618. // compiled as a scoped slot, render fn users would expect it to be present
  6619. // on this.$slots because the usage is semantically a normal slot.
  6620. if (fn.proxy) {
  6621. Object.defineProperty(normalSlots, key, {
  6622. get: normalized,
  6623. enumerable: true,
  6624. configurable: true
  6625. });
  6626. }
  6627. return normalized
  6628. }
  6629. function proxyNormalSlot(slots, key) {
  6630. return function () { return slots[key]; }
  6631. }
  6632. /* */
  6633. /**
  6634. * Runtime helper for rendering v-for lists.
  6635. */
  6636. function renderList (
  6637. val,
  6638. render
  6639. ) {
  6640. var ret, i, l, keys, key;
  6641. if (Array.isArray(val) || typeof val === 'string') {
  6642. ret = new Array(val.length);
  6643. for (i = 0, l = val.length; i < l; i++) {
  6644. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  6645. }
  6646. } else if (typeof val === 'number') {
  6647. ret = new Array(val);
  6648. for (i = 0; i < val; i++) {
  6649. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  6650. }
  6651. } else if (isObject(val)) {
  6652. if (hasSymbol && val[Symbol.iterator]) {
  6653. ret = [];
  6654. var iterator = val[Symbol.iterator]();
  6655. var result = iterator.next();
  6656. while (!result.done) {
  6657. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  6658. result = iterator.next();
  6659. }
  6660. } else {
  6661. keys = Object.keys(val);
  6662. ret = new Array(keys.length);
  6663. for (i = 0, l = keys.length; i < l; i++) {
  6664. key = keys[i];
  6665. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  6666. }
  6667. }
  6668. }
  6669. if (!isDef(ret)) {
  6670. ret = [];
  6671. }
  6672. (ret)._isVList = true;
  6673. return ret
  6674. }
  6675. /* */
  6676. /**
  6677. * Runtime helper for rendering <slot>
  6678. */
  6679. function renderSlot (
  6680. name,
  6681. fallback,
  6682. props,
  6683. bindObject
  6684. ) {
  6685. var scopedSlotFn = this.$scopedSlots[name];
  6686. var nodes;
  6687. if (scopedSlotFn) { // scoped slot
  6688. props = props || {};
  6689. if (bindObject) {
  6690. if ( true && !isObject(bindObject)) {
  6691. warn(
  6692. 'slot v-bind without argument expects an Object',
  6693. this
  6694. );
  6695. }
  6696. props = extend(extend({}, bindObject), props);
  6697. }
  6698. // fixed by xxxxxx app-plus scopedSlot
  6699. nodes = scopedSlotFn(props, this, props._i) || fallback;
  6700. } else {
  6701. nodes = this.$slots[name] || fallback;
  6702. }
  6703. var target = props && props.slot;
  6704. if (target) {
  6705. return this.$createElement('template', { slot: target }, nodes)
  6706. } else {
  6707. return nodes
  6708. }
  6709. }
  6710. /* */
  6711. /**
  6712. * Runtime helper for resolving filters
  6713. */
  6714. function resolveFilter (id) {
  6715. return resolveAsset(this.$options, 'filters', id, true) || identity
  6716. }
  6717. /* */
  6718. function isKeyNotMatch (expect, actual) {
  6719. if (Array.isArray(expect)) {
  6720. return expect.indexOf(actual) === -1
  6721. } else {
  6722. return expect !== actual
  6723. }
  6724. }
  6725. /**
  6726. * Runtime helper for checking keyCodes from config.
  6727. * exposed as Vue.prototype._k
  6728. * passing in eventKeyName as last argument separately for backwards compat
  6729. */
  6730. function checkKeyCodes (
  6731. eventKeyCode,
  6732. key,
  6733. builtInKeyCode,
  6734. eventKeyName,
  6735. builtInKeyName
  6736. ) {
  6737. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  6738. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  6739. return isKeyNotMatch(builtInKeyName, eventKeyName)
  6740. } else if (mappedKeyCode) {
  6741. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  6742. } else if (eventKeyName) {
  6743. return hyphenate(eventKeyName) !== key
  6744. }
  6745. }
  6746. /* */
  6747. /**
  6748. * Runtime helper for merging v-bind="object" into a VNode's data.
  6749. */
  6750. function bindObjectProps (
  6751. data,
  6752. tag,
  6753. value,
  6754. asProp,
  6755. isSync
  6756. ) {
  6757. if (value) {
  6758. if (!isObject(value)) {
  6759. true && warn(
  6760. 'v-bind without argument expects an Object or Array value',
  6761. this
  6762. );
  6763. } else {
  6764. if (Array.isArray(value)) {
  6765. value = toObject(value);
  6766. }
  6767. var hash;
  6768. var loop = function ( key ) {
  6769. if (
  6770. key === 'class' ||
  6771. key === 'style' ||
  6772. isReservedAttribute(key)
  6773. ) {
  6774. hash = data;
  6775. } else {
  6776. var type = data.attrs && data.attrs.type;
  6777. hash = asProp || config.mustUseProp(tag, type, key)
  6778. ? data.domProps || (data.domProps = {})
  6779. : data.attrs || (data.attrs = {});
  6780. }
  6781. var camelizedKey = camelize(key);
  6782. var hyphenatedKey = hyphenate(key);
  6783. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  6784. hash[key] = value[key];
  6785. if (isSync) {
  6786. var on = data.on || (data.on = {});
  6787. on[("update:" + key)] = function ($event) {
  6788. value[key] = $event;
  6789. };
  6790. }
  6791. }
  6792. };
  6793. for (var key in value) loop( key );
  6794. }
  6795. }
  6796. return data
  6797. }
  6798. /* */
  6799. /**
  6800. * Runtime helper for rendering static trees.
  6801. */
  6802. function renderStatic (
  6803. index,
  6804. isInFor
  6805. ) {
  6806. var cached = this._staticTrees || (this._staticTrees = []);
  6807. var tree = cached[index];
  6808. // if has already-rendered static tree and not inside v-for,
  6809. // we can reuse the same tree.
  6810. if (tree && !isInFor) {
  6811. return tree
  6812. }
  6813. // otherwise, render a fresh tree.
  6814. tree = cached[index] = this.$options.staticRenderFns[index].call(
  6815. this._renderProxy,
  6816. null,
  6817. this // for render fns generated for functional component templates
  6818. );
  6819. markStatic(tree, ("__static__" + index), false);
  6820. return tree
  6821. }
  6822. /**
  6823. * Runtime helper for v-once.
  6824. * Effectively it means marking the node as static with a unique key.
  6825. */
  6826. function markOnce (
  6827. tree,
  6828. index,
  6829. key
  6830. ) {
  6831. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  6832. return tree
  6833. }
  6834. function markStatic (
  6835. tree,
  6836. key,
  6837. isOnce
  6838. ) {
  6839. if (Array.isArray(tree)) {
  6840. for (var i = 0; i < tree.length; i++) {
  6841. if (tree[i] && typeof tree[i] !== 'string') {
  6842. markStaticNode(tree[i], (key + "_" + i), isOnce);
  6843. }
  6844. }
  6845. } else {
  6846. markStaticNode(tree, key, isOnce);
  6847. }
  6848. }
  6849. function markStaticNode (node, key, isOnce) {
  6850. node.isStatic = true;
  6851. node.key = key;
  6852. node.isOnce = isOnce;
  6853. }
  6854. /* */
  6855. function bindObjectListeners (data, value) {
  6856. if (value) {
  6857. if (!isPlainObject(value)) {
  6858. true && warn(
  6859. 'v-on without argument expects an Object value',
  6860. this
  6861. );
  6862. } else {
  6863. var on = data.on = data.on ? extend({}, data.on) : {};
  6864. for (var key in value) {
  6865. var existing = on[key];
  6866. var ours = value[key];
  6867. on[key] = existing ? [].concat(existing, ours) : ours;
  6868. }
  6869. }
  6870. }
  6871. return data
  6872. }
  6873. /* */
  6874. function resolveScopedSlots (
  6875. fns, // see flow/vnode
  6876. res,
  6877. // the following are added in 2.6
  6878. hasDynamicKeys,
  6879. contentHashKey
  6880. ) {
  6881. res = res || { $stable: !hasDynamicKeys };
  6882. for (var i = 0; i < fns.length; i++) {
  6883. var slot = fns[i];
  6884. if (Array.isArray(slot)) {
  6885. resolveScopedSlots(slot, res, hasDynamicKeys);
  6886. } else if (slot) {
  6887. // marker for reverse proxying v-slot without scope on this.$slots
  6888. if (slot.proxy) {
  6889. slot.fn.proxy = true;
  6890. }
  6891. res[slot.key] = slot.fn;
  6892. }
  6893. }
  6894. if (contentHashKey) {
  6895. (res).$key = contentHashKey;
  6896. }
  6897. return res
  6898. }
  6899. /* */
  6900. function bindDynamicKeys (baseObj, values) {
  6901. for (var i = 0; i < values.length; i += 2) {
  6902. var key = values[i];
  6903. if (typeof key === 'string' && key) {
  6904. baseObj[values[i]] = values[i + 1];
  6905. } else if ( true && key !== '' && key !== null) {
  6906. // null is a special value for explicitly removing a binding
  6907. warn(
  6908. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  6909. this
  6910. );
  6911. }
  6912. }
  6913. return baseObj
  6914. }
  6915. // helper to dynamically append modifier runtime markers to event names.
  6916. // ensure only append when value is already string, otherwise it will be cast
  6917. // to string and cause the type check to miss.
  6918. function prependModifier (value, symbol) {
  6919. return typeof value === 'string' ? symbol + value : value
  6920. }
  6921. /* */
  6922. function installRenderHelpers (target) {
  6923. target._o = markOnce;
  6924. target._n = toNumber;
  6925. target._s = toString;
  6926. target._l = renderList;
  6927. target._t = renderSlot;
  6928. target._q = looseEqual;
  6929. target._i = looseIndexOf;
  6930. target._m = renderStatic;
  6931. target._f = resolveFilter;
  6932. target._k = checkKeyCodes;
  6933. target._b = bindObjectProps;
  6934. target._v = createTextVNode;
  6935. target._e = createEmptyVNode;
  6936. target._u = resolveScopedSlots;
  6937. target._g = bindObjectListeners;
  6938. target._d = bindDynamicKeys;
  6939. target._p = prependModifier;
  6940. }
  6941. /* */
  6942. function FunctionalRenderContext (
  6943. data,
  6944. props,
  6945. children,
  6946. parent,
  6947. Ctor
  6948. ) {
  6949. var this$1 = this;
  6950. var options = Ctor.options;
  6951. // ensure the createElement function in functional components
  6952. // gets a unique context - this is necessary for correct named slot check
  6953. var contextVm;
  6954. if (hasOwn(parent, '_uid')) {
  6955. contextVm = Object.create(parent);
  6956. // $flow-disable-line
  6957. contextVm._original = parent;
  6958. } else {
  6959. // the context vm passed in is a functional context as well.
  6960. // in this case we want to make sure we are able to get a hold to the
  6961. // real context instance.
  6962. contextVm = parent;
  6963. // $flow-disable-line
  6964. parent = parent._original;
  6965. }
  6966. var isCompiled = isTrue(options._compiled);
  6967. var needNormalization = !isCompiled;
  6968. this.data = data;
  6969. this.props = props;
  6970. this.children = children;
  6971. this.parent = parent;
  6972. this.listeners = data.on || emptyObject;
  6973. this.injections = resolveInject(options.inject, parent);
  6974. this.slots = function () {
  6975. if (!this$1.$slots) {
  6976. normalizeScopedSlots(
  6977. data.scopedSlots,
  6978. this$1.$slots = resolveSlots(children, parent)
  6979. );
  6980. }
  6981. return this$1.$slots
  6982. };
  6983. Object.defineProperty(this, 'scopedSlots', ({
  6984. enumerable: true,
  6985. get: function get () {
  6986. return normalizeScopedSlots(data.scopedSlots, this.slots())
  6987. }
  6988. }));
  6989. // support for compiled functional template
  6990. if (isCompiled) {
  6991. // exposing $options for renderStatic()
  6992. this.$options = options;
  6993. // pre-resolve slots for renderSlot()
  6994. this.$slots = this.slots();
  6995. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  6996. }
  6997. if (options._scopeId) {
  6998. this._c = function (a, b, c, d) {
  6999. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  7000. if (vnode && !Array.isArray(vnode)) {
  7001. vnode.fnScopeId = options._scopeId;
  7002. vnode.fnContext = parent;
  7003. }
  7004. return vnode
  7005. };
  7006. } else {
  7007. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  7008. }
  7009. }
  7010. installRenderHelpers(FunctionalRenderContext.prototype);
  7011. function createFunctionalComponent (
  7012. Ctor,
  7013. propsData,
  7014. data,
  7015. contextVm,
  7016. children
  7017. ) {
  7018. var options = Ctor.options;
  7019. var props = {};
  7020. var propOptions = options.props;
  7021. if (isDef(propOptions)) {
  7022. for (var key in propOptions) {
  7023. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  7024. }
  7025. } else {
  7026. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  7027. if (isDef(data.props)) { mergeProps(props, data.props); }
  7028. }
  7029. var renderContext = new FunctionalRenderContext(
  7030. data,
  7031. props,
  7032. children,
  7033. contextVm,
  7034. Ctor
  7035. );
  7036. var vnode = options.render.call(null, renderContext._c, renderContext);
  7037. if (vnode instanceof VNode) {
  7038. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  7039. } else if (Array.isArray(vnode)) {
  7040. var vnodes = normalizeChildren(vnode) || [];
  7041. var res = new Array(vnodes.length);
  7042. for (var i = 0; i < vnodes.length; i++) {
  7043. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  7044. }
  7045. return res
  7046. }
  7047. }
  7048. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  7049. // #7817 clone node before setting fnContext, otherwise if the node is reused
  7050. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  7051. // that should not be matched to match.
  7052. var clone = cloneVNode(vnode);
  7053. clone.fnContext = contextVm;
  7054. clone.fnOptions = options;
  7055. if (true) {
  7056. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  7057. }
  7058. if (data.slot) {
  7059. (clone.data || (clone.data = {})).slot = data.slot;
  7060. }
  7061. return clone
  7062. }
  7063. function mergeProps (to, from) {
  7064. for (var key in from) {
  7065. to[camelize(key)] = from[key];
  7066. }
  7067. }
  7068. /* */
  7069. /* */
  7070. /* */
  7071. /* */
  7072. // inline hooks to be invoked on component VNodes during patch
  7073. var componentVNodeHooks = {
  7074. init: function init (vnode, hydrating) {
  7075. if (
  7076. vnode.componentInstance &&
  7077. !vnode.componentInstance._isDestroyed &&
  7078. vnode.data.keepAlive
  7079. ) {
  7080. // kept-alive components, treat as a patch
  7081. var mountedNode = vnode; // work around flow
  7082. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  7083. } else {
  7084. var child = vnode.componentInstance = createComponentInstanceForVnode(
  7085. vnode,
  7086. activeInstance
  7087. );
  7088. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  7089. }
  7090. },
  7091. prepatch: function prepatch (oldVnode, vnode) {
  7092. var options = vnode.componentOptions;
  7093. var child = vnode.componentInstance = oldVnode.componentInstance;
  7094. updateChildComponent(
  7095. child,
  7096. options.propsData, // updated props
  7097. options.listeners, // updated listeners
  7098. vnode, // new parent vnode
  7099. options.children // new children
  7100. );
  7101. },
  7102. insert: function insert (vnode) {
  7103. var context = vnode.context;
  7104. var componentInstance = vnode.componentInstance;
  7105. if (!componentInstance._isMounted) {
  7106. callHook(componentInstance, 'onServiceCreated');
  7107. callHook(componentInstance, 'onServiceAttached');
  7108. componentInstance._isMounted = true;
  7109. callHook(componentInstance, 'mounted');
  7110. }
  7111. if (vnode.data.keepAlive) {
  7112. if (context._isMounted) {
  7113. // vue-router#1212
  7114. // During updates, a kept-alive component's child components may
  7115. // change, so directly walking the tree here may call activated hooks
  7116. // on incorrect children. Instead we push them into a queue which will
  7117. // be processed after the whole patch process ended.
  7118. queueActivatedComponent(componentInstance);
  7119. } else {
  7120. activateChildComponent(componentInstance, true /* direct */);
  7121. }
  7122. }
  7123. },
  7124. destroy: function destroy (vnode) {
  7125. var componentInstance = vnode.componentInstance;
  7126. if (!componentInstance._isDestroyed) {
  7127. if (!vnode.data.keepAlive) {
  7128. componentInstance.$destroy();
  7129. } else {
  7130. deactivateChildComponent(componentInstance, true /* direct */);
  7131. }
  7132. }
  7133. }
  7134. };
  7135. var hooksToMerge = Object.keys(componentVNodeHooks);
  7136. function createComponent (
  7137. Ctor,
  7138. data,
  7139. context,
  7140. children,
  7141. tag
  7142. ) {
  7143. if (isUndef(Ctor)) {
  7144. return
  7145. }
  7146. var baseCtor = context.$options._base;
  7147. // plain options object: turn it into a constructor
  7148. if (isObject(Ctor)) {
  7149. Ctor = baseCtor.extend(Ctor);
  7150. }
  7151. // if at this stage it's not a constructor or an async component factory,
  7152. // reject.
  7153. if (typeof Ctor !== 'function') {
  7154. if (true) {
  7155. warn(("Invalid Component definition: " + (String(Ctor))), context);
  7156. }
  7157. return
  7158. }
  7159. // async component
  7160. var asyncFactory;
  7161. if (isUndef(Ctor.cid)) {
  7162. asyncFactory = Ctor;
  7163. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  7164. if (Ctor === undefined) {
  7165. // return a placeholder node for async component, which is rendered
  7166. // as a comment node but preserves all the raw information for the node.
  7167. // the information will be used for async server-rendering and hydration.
  7168. return createAsyncPlaceholder(
  7169. asyncFactory,
  7170. data,
  7171. context,
  7172. children,
  7173. tag
  7174. )
  7175. }
  7176. }
  7177. data = data || {};
  7178. // resolve constructor options in case global mixins are applied after
  7179. // component constructor creation
  7180. resolveConstructorOptions(Ctor);
  7181. // transform component v-model data into props & events
  7182. if (isDef(data.model)) {
  7183. transformModel(Ctor.options, data);
  7184. }
  7185. // extract props
  7186. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  7187. // functional component
  7188. if (isTrue(Ctor.options.functional)) {
  7189. return createFunctionalComponent(Ctor, propsData, data, context, children)
  7190. }
  7191. // extract listeners, since these needs to be treated as
  7192. // child component listeners instead of DOM listeners
  7193. var listeners = data.on;
  7194. // replace with listeners with .native modifier
  7195. // so it gets processed during parent component patch.
  7196. data.on = data.nativeOn;
  7197. if (isTrue(Ctor.options.abstract)) {
  7198. // abstract components do not keep anything
  7199. // other than props & listeners & slot
  7200. // work around flow
  7201. var slot = data.slot;
  7202. data = {};
  7203. if (slot) {
  7204. data.slot = slot;
  7205. }
  7206. }
  7207. // install component management hooks onto the placeholder node
  7208. installComponentHooks(data);
  7209. // return a placeholder vnode
  7210. var name = Ctor.options.name || tag;
  7211. var vnode = new VNode(
  7212. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  7213. data, undefined, undefined, undefined, context,
  7214. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  7215. asyncFactory
  7216. );
  7217. return vnode
  7218. }
  7219. function createComponentInstanceForVnode (
  7220. vnode, // we know it's MountedComponentVNode but flow doesn't
  7221. parent // activeInstance in lifecycle state
  7222. ) {
  7223. var options = {
  7224. _isComponent: true,
  7225. _parentVnode: vnode,
  7226. parent: parent
  7227. };
  7228. // check inline-template render functions
  7229. var inlineTemplate = vnode.data.inlineTemplate;
  7230. if (isDef(inlineTemplate)) {
  7231. options.render = inlineTemplate.render;
  7232. options.staticRenderFns = inlineTemplate.staticRenderFns;
  7233. }
  7234. return new vnode.componentOptions.Ctor(options)
  7235. }
  7236. function installComponentHooks (data) {
  7237. var hooks = data.hook || (data.hook = {});
  7238. for (var i = 0; i < hooksToMerge.length; i++) {
  7239. var key = hooksToMerge[i];
  7240. var existing = hooks[key];
  7241. var toMerge = componentVNodeHooks[key];
  7242. if (existing !== toMerge && !(existing && existing._merged)) {
  7243. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  7244. }
  7245. }
  7246. }
  7247. function mergeHook$1 (f1, f2) {
  7248. var merged = function (a, b) {
  7249. // flow complains about extra args which is why we use any
  7250. f1(a, b);
  7251. f2(a, b);
  7252. };
  7253. merged._merged = true;
  7254. return merged
  7255. }
  7256. // transform component v-model info (value and callback) into
  7257. // prop and event handler respectively.
  7258. function transformModel (options, data) {
  7259. var prop = (options.model && options.model.prop) || 'value';
  7260. var event = (options.model && options.model.event) || 'input'
  7261. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  7262. var on = data.on || (data.on = {});
  7263. var existing = on[event];
  7264. var callback = data.model.callback;
  7265. if (isDef(existing)) {
  7266. if (
  7267. Array.isArray(existing)
  7268. ? existing.indexOf(callback) === -1
  7269. : existing !== callback
  7270. ) {
  7271. on[event] = [callback].concat(existing);
  7272. }
  7273. } else {
  7274. on[event] = callback;
  7275. }
  7276. }
  7277. /* */
  7278. var SIMPLE_NORMALIZE = 1;
  7279. var ALWAYS_NORMALIZE = 2;
  7280. // wrapper function for providing a more flexible interface
  7281. // without getting yelled at by flow
  7282. function createElement (
  7283. context,
  7284. tag,
  7285. data,
  7286. children,
  7287. normalizationType,
  7288. alwaysNormalize
  7289. ) {
  7290. if (Array.isArray(data) || isPrimitive(data)) {
  7291. normalizationType = children;
  7292. children = data;
  7293. data = undefined;
  7294. }
  7295. if (isTrue(alwaysNormalize)) {
  7296. normalizationType = ALWAYS_NORMALIZE;
  7297. }
  7298. return _createElement(context, tag, data, children, normalizationType)
  7299. }
  7300. function _createElement (
  7301. context,
  7302. tag,
  7303. data,
  7304. children,
  7305. normalizationType
  7306. ) {
  7307. if (isDef(data) && isDef((data).__ob__)) {
  7308. true && warn(
  7309. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  7310. 'Always create fresh vnode data objects in each render!',
  7311. context
  7312. );
  7313. return createEmptyVNode()
  7314. }
  7315. // object syntax in v-bind
  7316. if (isDef(data) && isDef(data.is)) {
  7317. tag = data.is;
  7318. }
  7319. if (!tag) {
  7320. // in case of component :is set to falsy value
  7321. return createEmptyVNode()
  7322. }
  7323. // warn against non-primitive key
  7324. if ( true &&
  7325. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  7326. ) {
  7327. {
  7328. warn(
  7329. 'Avoid using non-primitive value as key, ' +
  7330. 'use string/number value instead.',
  7331. context
  7332. );
  7333. }
  7334. }
  7335. // support single function children as default scoped slot
  7336. if (Array.isArray(children) &&
  7337. typeof children[0] === 'function'
  7338. ) {
  7339. data = data || {};
  7340. data.scopedSlots = { default: children[0] };
  7341. children.length = 0;
  7342. }
  7343. if (normalizationType === ALWAYS_NORMALIZE) {
  7344. children = normalizeChildren(children);
  7345. } else if (normalizationType === SIMPLE_NORMALIZE) {
  7346. children = simpleNormalizeChildren(children);
  7347. }
  7348. var vnode, ns;
  7349. if (typeof tag === 'string') {
  7350. var Ctor;
  7351. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  7352. if (config.isReservedTag(tag)) {
  7353. // platform built-in elements
  7354. if ( true && isDef(data) && isDef(data.nativeOn)) {
  7355. warn(
  7356. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  7357. context
  7358. );
  7359. }
  7360. vnode = new VNode(
  7361. config.parsePlatformTagName(tag), data, children,
  7362. undefined, undefined, context
  7363. );
  7364. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  7365. // component
  7366. vnode = createComponent(Ctor, data, context, children, tag);
  7367. } else {
  7368. // unknown or unlisted namespaced elements
  7369. // check at runtime because it may get assigned a namespace when its
  7370. // parent normalizes children
  7371. vnode = new VNode(
  7372. tag, data, children,
  7373. undefined, undefined, context
  7374. );
  7375. }
  7376. } else {
  7377. // direct component options / constructor
  7378. vnode = createComponent(tag, data, context, children);
  7379. }
  7380. if (Array.isArray(vnode)) {
  7381. return vnode
  7382. } else if (isDef(vnode)) {
  7383. if (isDef(ns)) { applyNS(vnode, ns); }
  7384. if (isDef(data)) { registerDeepBindings(data); }
  7385. return vnode
  7386. } else {
  7387. return createEmptyVNode()
  7388. }
  7389. }
  7390. function applyNS (vnode, ns, force) {
  7391. vnode.ns = ns;
  7392. if (vnode.tag === 'foreignObject') {
  7393. // use default namespace inside foreignObject
  7394. ns = undefined;
  7395. force = true;
  7396. }
  7397. if (isDef(vnode.children)) {
  7398. for (var i = 0, l = vnode.children.length; i < l; i++) {
  7399. var child = vnode.children[i];
  7400. if (isDef(child.tag) && (
  7401. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  7402. applyNS(child, ns, force);
  7403. }
  7404. }
  7405. }
  7406. }
  7407. // ref #5318
  7408. // necessary to ensure parent re-render when deep bindings like :style and
  7409. // :class are used on slot nodes
  7410. function registerDeepBindings (data) {
  7411. if (isObject(data.style)) {
  7412. traverse(data.style);
  7413. }
  7414. if (isObject(data.class)) {
  7415. traverse(data.class);
  7416. }
  7417. }
  7418. /* */
  7419. function initRender (vm) {
  7420. vm._vnode = null; // the root of the child tree
  7421. vm._staticTrees = null; // v-once cached trees
  7422. var options = vm.$options;
  7423. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  7424. var renderContext = parentVnode && parentVnode.context;
  7425. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  7426. vm.$scopedSlots = emptyObject;
  7427. // bind the createElement fn to this instance
  7428. // so that we get proper render context inside it.
  7429. // args order: tag, data, children, normalizationType, alwaysNormalize
  7430. // internal version is used by render functions compiled from templates
  7431. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  7432. // normalization is always applied for the public version, used in
  7433. // user-written render functions.
  7434. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  7435. // $attrs & $listeners are exposed for easier HOC creation.
  7436. // they need to be reactive so that HOCs using them are always updated
  7437. var parentData = parentVnode && parentVnode.data;
  7438. /* istanbul ignore else */
  7439. if (true) {
  7440. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  7441. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  7442. }, true);
  7443. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  7444. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  7445. }, true);
  7446. } else {}
  7447. }
  7448. var currentRenderingInstance = null;
  7449. function renderMixin (Vue) {
  7450. // install runtime convenience helpers
  7451. installRenderHelpers(Vue.prototype);
  7452. Vue.prototype.$nextTick = function (fn) {
  7453. return nextTick(fn, this)
  7454. };
  7455. Vue.prototype._render = function () {
  7456. var vm = this;
  7457. var ref = vm.$options;
  7458. var render = ref.render;
  7459. var _parentVnode = ref._parentVnode;
  7460. if (_parentVnode) {
  7461. vm.$scopedSlots = normalizeScopedSlots(
  7462. _parentVnode.data.scopedSlots,
  7463. vm.$slots,
  7464. vm.$scopedSlots
  7465. );
  7466. }
  7467. // set parent vnode. this allows render functions to have access
  7468. // to the data on the placeholder node.
  7469. vm.$vnode = _parentVnode;
  7470. // render self
  7471. var vnode;
  7472. try {
  7473. // There's no need to maintain a stack because all render fns are called
  7474. // separately from one another. Nested component's render fns are called
  7475. // when parent component is patched.
  7476. currentRenderingInstance = vm;
  7477. vnode = render.call(vm._renderProxy, vm.$createElement);
  7478. } catch (e) {
  7479. handleError(e, vm, "render");
  7480. // return error render result,
  7481. // or previous vnode to prevent render error causing blank component
  7482. /* istanbul ignore else */
  7483. if ( true && vm.$options.renderError) {
  7484. try {
  7485. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  7486. } catch (e) {
  7487. handleError(e, vm, "renderError");
  7488. vnode = vm._vnode;
  7489. }
  7490. } else {
  7491. vnode = vm._vnode;
  7492. }
  7493. } finally {
  7494. currentRenderingInstance = null;
  7495. }
  7496. // if the returned array contains only a single node, allow it
  7497. if (Array.isArray(vnode) && vnode.length === 1) {
  7498. vnode = vnode[0];
  7499. }
  7500. // return empty vnode in case the render function errored out
  7501. if (!(vnode instanceof VNode)) {
  7502. if ( true && Array.isArray(vnode)) {
  7503. warn(
  7504. 'Multiple root nodes returned from render function. Render function ' +
  7505. 'should return a single root node.',
  7506. vm
  7507. );
  7508. }
  7509. vnode = createEmptyVNode();
  7510. }
  7511. // set parent
  7512. vnode.parent = _parentVnode;
  7513. return vnode
  7514. };
  7515. }
  7516. /* */
  7517. function ensureCtor (comp, base) {
  7518. if (
  7519. comp.__esModule ||
  7520. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  7521. ) {
  7522. comp = comp.default;
  7523. }
  7524. return isObject(comp)
  7525. ? base.extend(comp)
  7526. : comp
  7527. }
  7528. function createAsyncPlaceholder (
  7529. factory,
  7530. data,
  7531. context,
  7532. children,
  7533. tag
  7534. ) {
  7535. var node = createEmptyVNode();
  7536. node.asyncFactory = factory;
  7537. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  7538. return node
  7539. }
  7540. function resolveAsyncComponent (
  7541. factory,
  7542. baseCtor
  7543. ) {
  7544. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  7545. return factory.errorComp
  7546. }
  7547. if (isDef(factory.resolved)) {
  7548. return factory.resolved
  7549. }
  7550. var owner = currentRenderingInstance;
  7551. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  7552. // already pending
  7553. factory.owners.push(owner);
  7554. }
  7555. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  7556. return factory.loadingComp
  7557. }
  7558. if (owner && !isDef(factory.owners)) {
  7559. var owners = factory.owners = [owner];
  7560. var sync = true;
  7561. var timerLoading = null;
  7562. var timerTimeout = null
  7563. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  7564. var forceRender = function (renderCompleted) {
  7565. for (var i = 0, l = owners.length; i < l; i++) {
  7566. (owners[i]).$forceUpdate();
  7567. }
  7568. if (renderCompleted) {
  7569. owners.length = 0;
  7570. if (timerLoading !== null) {
  7571. clearTimeout(timerLoading);
  7572. timerLoading = null;
  7573. }
  7574. if (timerTimeout !== null) {
  7575. clearTimeout(timerTimeout);
  7576. timerTimeout = null;
  7577. }
  7578. }
  7579. };
  7580. var resolve = once(function (res) {
  7581. // cache resolved
  7582. factory.resolved = ensureCtor(res, baseCtor);
  7583. // invoke callbacks only if this is not a synchronous resolve
  7584. // (async resolves are shimmed as synchronous during SSR)
  7585. if (!sync) {
  7586. forceRender(true);
  7587. } else {
  7588. owners.length = 0;
  7589. }
  7590. });
  7591. var reject = once(function (reason) {
  7592. true && warn(
  7593. "Failed to resolve async component: " + (String(factory)) +
  7594. (reason ? ("\nReason: " + reason) : '')
  7595. );
  7596. if (isDef(factory.errorComp)) {
  7597. factory.error = true;
  7598. forceRender(true);
  7599. }
  7600. });
  7601. var res = factory(resolve, reject);
  7602. if (isObject(res)) {
  7603. if (isPromise(res)) {
  7604. // () => Promise
  7605. if (isUndef(factory.resolved)) {
  7606. res.then(resolve, reject);
  7607. }
  7608. } else if (isPromise(res.component)) {
  7609. res.component.then(resolve, reject);
  7610. if (isDef(res.error)) {
  7611. factory.errorComp = ensureCtor(res.error, baseCtor);
  7612. }
  7613. if (isDef(res.loading)) {
  7614. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  7615. if (res.delay === 0) {
  7616. factory.loading = true;
  7617. } else {
  7618. timerLoading = setTimeout(function () {
  7619. timerLoading = null;
  7620. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  7621. factory.loading = true;
  7622. forceRender(false);
  7623. }
  7624. }, res.delay || 200);
  7625. }
  7626. }
  7627. if (isDef(res.timeout)) {
  7628. timerTimeout = setTimeout(function () {
  7629. timerTimeout = null;
  7630. if (isUndef(factory.resolved)) {
  7631. reject(
  7632. true
  7633. ? ("timeout (" + (res.timeout) + "ms)")
  7634. : undefined
  7635. );
  7636. }
  7637. }, res.timeout);
  7638. }
  7639. }
  7640. }
  7641. sync = false;
  7642. // return in case resolved synchronously
  7643. return factory.loading
  7644. ? factory.loadingComp
  7645. : factory.resolved
  7646. }
  7647. }
  7648. /* */
  7649. function isAsyncPlaceholder (node) {
  7650. return node.isComment && node.asyncFactory
  7651. }
  7652. /* */
  7653. function getFirstComponentChild (children) {
  7654. if (Array.isArray(children)) {
  7655. for (var i = 0; i < children.length; i++) {
  7656. var c = children[i];
  7657. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  7658. return c
  7659. }
  7660. }
  7661. }
  7662. }
  7663. /* */
  7664. /* */
  7665. function initEvents (vm) {
  7666. vm._events = Object.create(null);
  7667. vm._hasHookEvent = false;
  7668. // init parent attached events
  7669. var listeners = vm.$options._parentListeners;
  7670. if (listeners) {
  7671. updateComponentListeners(vm, listeners);
  7672. }
  7673. }
  7674. var target;
  7675. function add (event, fn) {
  7676. target.$on(event, fn);
  7677. }
  7678. function remove$1 (event, fn) {
  7679. target.$off(event, fn);
  7680. }
  7681. function createOnceHandler (event, fn) {
  7682. var _target = target;
  7683. return function onceHandler () {
  7684. var res = fn.apply(null, arguments);
  7685. if (res !== null) {
  7686. _target.$off(event, onceHandler);
  7687. }
  7688. }
  7689. }
  7690. function updateComponentListeners (
  7691. vm,
  7692. listeners,
  7693. oldListeners
  7694. ) {
  7695. target = vm;
  7696. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  7697. target = undefined;
  7698. }
  7699. function eventsMixin (Vue) {
  7700. var hookRE = /^hook:/;
  7701. Vue.prototype.$on = function (event, fn) {
  7702. var vm = this;
  7703. if (Array.isArray(event)) {
  7704. for (var i = 0, l = event.length; i < l; i++) {
  7705. vm.$on(event[i], fn);
  7706. }
  7707. } else {
  7708. (vm._events[event] || (vm._events[event] = [])).push(fn);
  7709. // optimize hook:event cost by using a boolean flag marked at registration
  7710. // instead of a hash lookup
  7711. if (hookRE.test(event)) {
  7712. vm._hasHookEvent = true;
  7713. }
  7714. }
  7715. return vm
  7716. };
  7717. Vue.prototype.$once = function (event, fn) {
  7718. var vm = this;
  7719. function on () {
  7720. vm.$off(event, on);
  7721. fn.apply(vm, arguments);
  7722. }
  7723. on.fn = fn;
  7724. vm.$on(event, on);
  7725. return vm
  7726. };
  7727. Vue.prototype.$off = function (event, fn) {
  7728. var vm = this;
  7729. // all
  7730. if (!arguments.length) {
  7731. vm._events = Object.create(null);
  7732. return vm
  7733. }
  7734. // array of events
  7735. if (Array.isArray(event)) {
  7736. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  7737. vm.$off(event[i$1], fn);
  7738. }
  7739. return vm
  7740. }
  7741. // specific event
  7742. var cbs = vm._events[event];
  7743. if (!cbs) {
  7744. return vm
  7745. }
  7746. if (!fn) {
  7747. vm._events[event] = null;
  7748. return vm
  7749. }
  7750. // specific handler
  7751. var cb;
  7752. var i = cbs.length;
  7753. while (i--) {
  7754. cb = cbs[i];
  7755. if (cb === fn || cb.fn === fn) {
  7756. cbs.splice(i, 1);
  7757. break
  7758. }
  7759. }
  7760. return vm
  7761. };
  7762. Vue.prototype.$emit = function (event) {
  7763. var vm = this;
  7764. if (true) {
  7765. var lowerCaseEvent = event.toLowerCase();
  7766. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  7767. tip(
  7768. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  7769. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  7770. "Note that HTML attributes are case-insensitive and you cannot use " +
  7771. "v-on to listen to camelCase events when using in-DOM templates. " +
  7772. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  7773. );
  7774. }
  7775. }
  7776. var cbs = vm._events[event];
  7777. if (cbs) {
  7778. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  7779. var args = toArray(arguments, 1);
  7780. var info = "event handler for \"" + event + "\"";
  7781. for (var i = 0, l = cbs.length; i < l; i++) {
  7782. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  7783. }
  7784. }
  7785. return vm
  7786. };
  7787. }
  7788. /* */
  7789. var activeInstance = null;
  7790. var isUpdatingChildComponent = false;
  7791. function setActiveInstance(vm) {
  7792. var prevActiveInstance = activeInstance;
  7793. activeInstance = vm;
  7794. return function () {
  7795. activeInstance = prevActiveInstance;
  7796. }
  7797. }
  7798. function initLifecycle (vm) {
  7799. var options = vm.$options;
  7800. // locate first non-abstract parent
  7801. var parent = options.parent;
  7802. if (parent && !options.abstract) {
  7803. while (parent.$options.abstract && parent.$parent) {
  7804. parent = parent.$parent;
  7805. }
  7806. parent.$children.push(vm);
  7807. }
  7808. vm.$parent = parent;
  7809. vm.$root = parent ? parent.$root : vm;
  7810. vm.$children = [];
  7811. vm.$refs = {};
  7812. vm._watcher = null;
  7813. vm._inactive = null;
  7814. vm._directInactive = false;
  7815. vm._isMounted = false;
  7816. vm._isDestroyed = false;
  7817. vm._isBeingDestroyed = false;
  7818. }
  7819. function lifecycleMixin (Vue) {
  7820. Vue.prototype._update = function (vnode, hydrating) {
  7821. var vm = this;
  7822. var prevEl = vm.$el;
  7823. var prevVnode = vm._vnode;
  7824. var restoreActiveInstance = setActiveInstance(vm);
  7825. vm._vnode = vnode;
  7826. // Vue.prototype.__patch__ is injected in entry points
  7827. // based on the rendering backend used.
  7828. if (!prevVnode) {
  7829. // initial render
  7830. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  7831. } else {
  7832. // updates
  7833. vm.$el = vm.__patch__(prevVnode, vnode);
  7834. }
  7835. restoreActiveInstance();
  7836. // update __vue__ reference
  7837. if (prevEl) {
  7838. prevEl.__vue__ = null;
  7839. }
  7840. if (vm.$el) {
  7841. vm.$el.__vue__ = vm;
  7842. }
  7843. // if parent is an HOC, update its $el as well
  7844. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  7845. vm.$parent.$el = vm.$el;
  7846. }
  7847. // updated hook is called by the scheduler to ensure that children are
  7848. // updated in a parent's updated hook.
  7849. };
  7850. Vue.prototype.$forceUpdate = function () {
  7851. var vm = this;
  7852. if (vm._watcher) {
  7853. vm._watcher.update();
  7854. }
  7855. };
  7856. Vue.prototype.$destroy = function () {
  7857. var vm = this;
  7858. if (vm._isBeingDestroyed) {
  7859. return
  7860. }
  7861. callHook(vm, 'beforeDestroy');
  7862. vm._isBeingDestroyed = true;
  7863. // remove self from parent
  7864. var parent = vm.$parent;
  7865. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  7866. remove(parent.$children, vm);
  7867. }
  7868. // teardown watchers
  7869. if (vm._watcher) {
  7870. vm._watcher.teardown();
  7871. }
  7872. var i = vm._watchers.length;
  7873. while (i--) {
  7874. vm._watchers[i].teardown();
  7875. }
  7876. // remove reference from data ob
  7877. // frozen object may not have observer.
  7878. if (vm._data.__ob__) {
  7879. vm._data.__ob__.vmCount--;
  7880. }
  7881. // call the last hook...
  7882. vm._isDestroyed = true;
  7883. // invoke destroy hooks on current rendered tree
  7884. vm.__patch__(vm._vnode, null);
  7885. // fire destroyed hook
  7886. callHook(vm, 'destroyed');
  7887. // turn off all instance listeners.
  7888. vm.$off();
  7889. // remove __vue__ reference
  7890. if (vm.$el) {
  7891. vm.$el.__vue__ = null;
  7892. }
  7893. // release circular reference (#6759)
  7894. if (vm.$vnode) {
  7895. vm.$vnode.parent = null;
  7896. }
  7897. };
  7898. }
  7899. function updateChildComponent (
  7900. vm,
  7901. propsData,
  7902. listeners,
  7903. parentVnode,
  7904. renderChildren
  7905. ) {
  7906. if (true) {
  7907. isUpdatingChildComponent = true;
  7908. }
  7909. // determine whether component has slot children
  7910. // we need to do this before overwriting $options._renderChildren.
  7911. // check if there are dynamic scopedSlots (hand-written or compiled but with
  7912. // dynamic slot names). Static scoped slots compiled from template has the
  7913. // "$stable" marker.
  7914. var newScopedSlots = parentVnode.data.scopedSlots;
  7915. var oldScopedSlots = vm.$scopedSlots;
  7916. var hasDynamicScopedSlot = !!(
  7917. (newScopedSlots && !newScopedSlots.$stable) ||
  7918. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  7919. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  7920. );
  7921. // Any static slot children from the parent may have changed during parent's
  7922. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  7923. // update is necessary to ensure correctness.
  7924. var needsForceUpdate = !!(
  7925. renderChildren || // has new static slots
  7926. vm.$options._renderChildren || // has old static slots
  7927. hasDynamicScopedSlot
  7928. );
  7929. vm.$options._parentVnode = parentVnode;
  7930. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  7931. if (vm._vnode) { // update child tree's parent
  7932. vm._vnode.parent = parentVnode;
  7933. }
  7934. vm.$options._renderChildren = renderChildren;
  7935. // update $attrs and $listeners hash
  7936. // these are also reactive so they may trigger child update if the child
  7937. // used them during render
  7938. vm.$attrs = parentVnode.data.attrs || emptyObject;
  7939. vm.$listeners = listeners || emptyObject;
  7940. // update props
  7941. if (propsData && vm.$options.props) {
  7942. toggleObserving(false);
  7943. var props = vm._props;
  7944. var propKeys = vm.$options._propKeys || [];
  7945. for (var i = 0; i < propKeys.length; i++) {
  7946. var key = propKeys[i];
  7947. var propOptions = vm.$options.props; // wtf flow?
  7948. props[key] = validateProp(key, propOptions, propsData, vm);
  7949. }
  7950. toggleObserving(true);
  7951. // keep a copy of raw propsData
  7952. vm.$options.propsData = propsData;
  7953. }
  7954. // fixed by xxxxxx update properties(mp runtime)
  7955. vm._$updateProperties && vm._$updateProperties(vm);
  7956. // update listeners
  7957. listeners = listeners || emptyObject;
  7958. var oldListeners = vm.$options._parentListeners;
  7959. vm.$options._parentListeners = listeners;
  7960. updateComponentListeners(vm, listeners, oldListeners);
  7961. // resolve slots + force update if has children
  7962. if (needsForceUpdate) {
  7963. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  7964. vm.$forceUpdate();
  7965. }
  7966. if (true) {
  7967. isUpdatingChildComponent = false;
  7968. }
  7969. }
  7970. function isInInactiveTree (vm) {
  7971. while (vm && (vm = vm.$parent)) {
  7972. if (vm._inactive) { return true }
  7973. }
  7974. return false
  7975. }
  7976. function activateChildComponent (vm, direct) {
  7977. if (direct) {
  7978. vm._directInactive = false;
  7979. if (isInInactiveTree(vm)) {
  7980. return
  7981. }
  7982. } else if (vm._directInactive) {
  7983. return
  7984. }
  7985. if (vm._inactive || vm._inactive === null) {
  7986. vm._inactive = false;
  7987. for (var i = 0; i < vm.$children.length; i++) {
  7988. activateChildComponent(vm.$children[i]);
  7989. }
  7990. callHook(vm, 'activated');
  7991. }
  7992. }
  7993. function deactivateChildComponent (vm, direct) {
  7994. if (direct) {
  7995. vm._directInactive = true;
  7996. if (isInInactiveTree(vm)) {
  7997. return
  7998. }
  7999. }
  8000. if (!vm._inactive) {
  8001. vm._inactive = true;
  8002. for (var i = 0; i < vm.$children.length; i++) {
  8003. deactivateChildComponent(vm.$children[i]);
  8004. }
  8005. callHook(vm, 'deactivated');
  8006. }
  8007. }
  8008. function callHook (vm, hook) {
  8009. // #7573 disable dep collection when invoking lifecycle hooks
  8010. pushTarget();
  8011. var handlers = vm.$options[hook];
  8012. var info = hook + " hook";
  8013. if (handlers) {
  8014. for (var i = 0, j = handlers.length; i < j; i++) {
  8015. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  8016. }
  8017. }
  8018. if (vm._hasHookEvent) {
  8019. vm.$emit('hook:' + hook);
  8020. }
  8021. popTarget();
  8022. }
  8023. /* */
  8024. var MAX_UPDATE_COUNT = 100;
  8025. var queue = [];
  8026. var activatedChildren = [];
  8027. var has = {};
  8028. var circular = {};
  8029. var waiting = false;
  8030. var flushing = false;
  8031. var index = 0;
  8032. /**
  8033. * Reset the scheduler's state.
  8034. */
  8035. function resetSchedulerState () {
  8036. index = queue.length = activatedChildren.length = 0;
  8037. has = {};
  8038. if (true) {
  8039. circular = {};
  8040. }
  8041. waiting = flushing = false;
  8042. }
  8043. // Async edge case #6566 requires saving the timestamp when event listeners are
  8044. // attached. However, calling performance.now() has a perf overhead especially
  8045. // if the page has thousands of event listeners. Instead, we take a timestamp
  8046. // every time the scheduler flushes and use that for all event listeners
  8047. // attached during that flush.
  8048. var currentFlushTimestamp = 0;
  8049. // Async edge case fix requires storing an event listener's attach timestamp.
  8050. var getNow = Date.now;
  8051. // Determine what event timestamp the browser is using. Annoyingly, the
  8052. // timestamp can either be hi-res (relative to page load) or low-res
  8053. // (relative to UNIX epoch), so in order to compare time we have to use the
  8054. // same timestamp type when saving the flush timestamp.
  8055. // All IE versions use low-res event timestamps, and have problematic clock
  8056. // implementations (#9632)
  8057. if (inBrowser && !isIE) {
  8058. var performance = window.performance;
  8059. if (
  8060. performance &&
  8061. typeof performance.now === 'function' &&
  8062. getNow() > document.createEvent('Event').timeStamp
  8063. ) {
  8064. // if the event timestamp, although evaluated AFTER the Date.now(), is
  8065. // smaller than it, it means the event is using a hi-res timestamp,
  8066. // and we need to use the hi-res version for event listener timestamps as
  8067. // well.
  8068. getNow = function () { return performance.now(); };
  8069. }
  8070. }
  8071. /**
  8072. * Flush both queues and run the watchers.
  8073. */
  8074. function flushSchedulerQueue () {
  8075. currentFlushTimestamp = getNow();
  8076. flushing = true;
  8077. var watcher, id;
  8078. // Sort queue before flush.
  8079. // This ensures that:
  8080. // 1. Components are updated from parent to child. (because parent is always
  8081. // created before the child)
  8082. // 2. A component's user watchers are run before its render watcher (because
  8083. // user watchers are created before the render watcher)
  8084. // 3. If a component is destroyed during a parent component's watcher run,
  8085. // its watchers can be skipped.
  8086. queue.sort(function (a, b) { return a.id - b.id; });
  8087. // do not cache length because more watchers might be pushed
  8088. // as we run existing watchers
  8089. for (index = 0; index < queue.length; index++) {
  8090. watcher = queue[index];
  8091. if (watcher.before) {
  8092. watcher.before();
  8093. }
  8094. id = watcher.id;
  8095. has[id] = null;
  8096. watcher.run();
  8097. // in dev build, check and stop circular updates.
  8098. if ( true && has[id] != null) {
  8099. circular[id] = (circular[id] || 0) + 1;
  8100. if (circular[id] > MAX_UPDATE_COUNT) {
  8101. warn(
  8102. 'You may have an infinite update loop ' + (
  8103. watcher.user
  8104. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  8105. : "in a component render function."
  8106. ),
  8107. watcher.vm
  8108. );
  8109. break
  8110. }
  8111. }
  8112. }
  8113. // keep copies of post queues before resetting state
  8114. var activatedQueue = activatedChildren.slice();
  8115. var updatedQueue = queue.slice();
  8116. resetSchedulerState();
  8117. // call component updated and activated hooks
  8118. callActivatedHooks(activatedQueue);
  8119. callUpdatedHooks(updatedQueue);
  8120. // devtool hook
  8121. /* istanbul ignore if */
  8122. if (devtools && config.devtools) {
  8123. devtools.emit('flush');
  8124. }
  8125. }
  8126. function callUpdatedHooks (queue) {
  8127. var i = queue.length;
  8128. while (i--) {
  8129. var watcher = queue[i];
  8130. var vm = watcher.vm;
  8131. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  8132. callHook(vm, 'updated');
  8133. }
  8134. }
  8135. }
  8136. /**
  8137. * Queue a kept-alive component that was activated during patch.
  8138. * The queue will be processed after the entire tree has been patched.
  8139. */
  8140. function queueActivatedComponent (vm) {
  8141. // setting _inactive to false here so that a render function can
  8142. // rely on checking whether it's in an inactive tree (e.g. router-view)
  8143. vm._inactive = false;
  8144. activatedChildren.push(vm);
  8145. }
  8146. function callActivatedHooks (queue) {
  8147. for (var i = 0; i < queue.length; i++) {
  8148. queue[i]._inactive = true;
  8149. activateChildComponent(queue[i], true /* true */);
  8150. }
  8151. }
  8152. /**
  8153. * Push a watcher into the watcher queue.
  8154. * Jobs with duplicate IDs will be skipped unless it's
  8155. * pushed when the queue is being flushed.
  8156. */
  8157. function queueWatcher (watcher) {
  8158. var id = watcher.id;
  8159. if (has[id] == null) {
  8160. has[id] = true;
  8161. if (!flushing) {
  8162. queue.push(watcher);
  8163. } else {
  8164. // if already flushing, splice the watcher based on its id
  8165. // if already past its id, it will be run next immediately.
  8166. var i = queue.length - 1;
  8167. while (i > index && queue[i].id > watcher.id) {
  8168. i--;
  8169. }
  8170. queue.splice(i + 1, 0, watcher);
  8171. }
  8172. // queue the flush
  8173. if (!waiting) {
  8174. waiting = true;
  8175. if ( true && !config.async) {
  8176. flushSchedulerQueue();
  8177. return
  8178. }
  8179. nextTick(flushSchedulerQueue);
  8180. }
  8181. }
  8182. }
  8183. /* */
  8184. var uid$2 = 0;
  8185. /**
  8186. * A watcher parses an expression, collects dependencies,
  8187. * and fires callback when the expression value changes.
  8188. * This is used for both the $watch() api and directives.
  8189. */
  8190. var Watcher = function Watcher (
  8191. vm,
  8192. expOrFn,
  8193. cb,
  8194. options,
  8195. isRenderWatcher
  8196. ) {
  8197. this.vm = vm;
  8198. if (isRenderWatcher) {
  8199. vm._watcher = this;
  8200. }
  8201. vm._watchers.push(this);
  8202. // options
  8203. if (options) {
  8204. this.deep = !!options.deep;
  8205. this.user = !!options.user;
  8206. this.lazy = !!options.lazy;
  8207. this.sync = !!options.sync;
  8208. this.before = options.before;
  8209. } else {
  8210. this.deep = this.user = this.lazy = this.sync = false;
  8211. }
  8212. this.cb = cb;
  8213. this.id = ++uid$2; // uid for batching
  8214. this.active = true;
  8215. this.dirty = this.lazy; // for lazy watchers
  8216. this.deps = [];
  8217. this.newDeps = [];
  8218. this.depIds = new _Set();
  8219. this.newDepIds = new _Set();
  8220. this.expression = true
  8221. ? expOrFn.toString()
  8222. : undefined;
  8223. // parse expression for getter
  8224. if (typeof expOrFn === 'function') {
  8225. this.getter = expOrFn;
  8226. } else {
  8227. this.getter = parsePath(expOrFn);
  8228. if (!this.getter) {
  8229. this.getter = noop;
  8230. true && warn(
  8231. "Failed watching path: \"" + expOrFn + "\" " +
  8232. 'Watcher only accepts simple dot-delimited paths. ' +
  8233. 'For full control, use a function instead.',
  8234. vm
  8235. );
  8236. }
  8237. }
  8238. this.value = this.lazy
  8239. ? undefined
  8240. : this.get();
  8241. };
  8242. /**
  8243. * Evaluate the getter, and re-collect dependencies.
  8244. */
  8245. Watcher.prototype.get = function get () {
  8246. pushTarget(this);
  8247. var value;
  8248. var vm = this.vm;
  8249. try {
  8250. value = this.getter.call(vm, vm);
  8251. } catch (e) {
  8252. if (this.user) {
  8253. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  8254. } else {
  8255. throw e
  8256. }
  8257. } finally {
  8258. // "touch" every property so they are all tracked as
  8259. // dependencies for deep watching
  8260. if (this.deep) {
  8261. traverse(value);
  8262. }
  8263. popTarget();
  8264. this.cleanupDeps();
  8265. }
  8266. return value
  8267. };
  8268. /**
  8269. * Add a dependency to this directive.
  8270. */
  8271. Watcher.prototype.addDep = function addDep (dep) {
  8272. var id = dep.id;
  8273. if (!this.newDepIds.has(id)) {
  8274. this.newDepIds.add(id);
  8275. this.newDeps.push(dep);
  8276. if (!this.depIds.has(id)) {
  8277. dep.addSub(this);
  8278. }
  8279. }
  8280. };
  8281. /**
  8282. * Clean up for dependency collection.
  8283. */
  8284. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  8285. var i = this.deps.length;
  8286. while (i--) {
  8287. var dep = this.deps[i];
  8288. if (!this.newDepIds.has(dep.id)) {
  8289. dep.removeSub(this);
  8290. }
  8291. }
  8292. var tmp = this.depIds;
  8293. this.depIds = this.newDepIds;
  8294. this.newDepIds = tmp;
  8295. this.newDepIds.clear();
  8296. tmp = this.deps;
  8297. this.deps = this.newDeps;
  8298. this.newDeps = tmp;
  8299. this.newDeps.length = 0;
  8300. };
  8301. /**
  8302. * Subscriber interface.
  8303. * Will be called when a dependency changes.
  8304. */
  8305. Watcher.prototype.update = function update () {
  8306. /* istanbul ignore else */
  8307. if (this.lazy) {
  8308. this.dirty = true;
  8309. } else if (this.sync) {
  8310. this.run();
  8311. } else {
  8312. queueWatcher(this);
  8313. }
  8314. };
  8315. /**
  8316. * Scheduler job interface.
  8317. * Will be called by the scheduler.
  8318. */
  8319. Watcher.prototype.run = function run () {
  8320. if (this.active) {
  8321. var value = this.get();
  8322. if (
  8323. value !== this.value ||
  8324. // Deep watchers and watchers on Object/Arrays should fire even
  8325. // when the value is the same, because the value may
  8326. // have mutated.
  8327. isObject(value) ||
  8328. this.deep
  8329. ) {
  8330. // set new value
  8331. var oldValue = this.value;
  8332. this.value = value;
  8333. if (this.user) {
  8334. try {
  8335. this.cb.call(this.vm, value, oldValue);
  8336. } catch (e) {
  8337. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  8338. }
  8339. } else {
  8340. this.cb.call(this.vm, value, oldValue);
  8341. }
  8342. }
  8343. }
  8344. };
  8345. /**
  8346. * Evaluate the value of the watcher.
  8347. * This only gets called for lazy watchers.
  8348. */
  8349. Watcher.prototype.evaluate = function evaluate () {
  8350. this.value = this.get();
  8351. this.dirty = false;
  8352. };
  8353. /**
  8354. * Depend on all deps collected by this watcher.
  8355. */
  8356. Watcher.prototype.depend = function depend () {
  8357. var i = this.deps.length;
  8358. while (i--) {
  8359. this.deps[i].depend();
  8360. }
  8361. };
  8362. /**
  8363. * Remove self from all dependencies' subscriber list.
  8364. */
  8365. Watcher.prototype.teardown = function teardown () {
  8366. if (this.active) {
  8367. // remove self from vm's watcher list
  8368. // this is a somewhat expensive operation so we skip it
  8369. // if the vm is being destroyed.
  8370. if (!this.vm._isBeingDestroyed) {
  8371. remove(this.vm._watchers, this);
  8372. }
  8373. var i = this.deps.length;
  8374. while (i--) {
  8375. this.deps[i].removeSub(this);
  8376. }
  8377. this.active = false;
  8378. }
  8379. };
  8380. /* */
  8381. var sharedPropertyDefinition = {
  8382. enumerable: true,
  8383. configurable: true,
  8384. get: noop,
  8385. set: noop
  8386. };
  8387. function proxy (target, sourceKey, key) {
  8388. sharedPropertyDefinition.get = function proxyGetter () {
  8389. return this[sourceKey][key]
  8390. };
  8391. sharedPropertyDefinition.set = function proxySetter (val) {
  8392. this[sourceKey][key] = val;
  8393. };
  8394. Object.defineProperty(target, key, sharedPropertyDefinition);
  8395. }
  8396. function initState (vm) {
  8397. vm._watchers = [];
  8398. var opts = vm.$options;
  8399. if (opts.props) { initProps(vm, opts.props); }
  8400. if (opts.methods) { initMethods(vm, opts.methods); }
  8401. if (opts.data) {
  8402. initData(vm);
  8403. } else {
  8404. observe(vm._data = {}, true /* asRootData */);
  8405. }
  8406. if (opts.computed) { initComputed(vm, opts.computed); }
  8407. if (opts.watch && opts.watch !== nativeWatch) {
  8408. initWatch(vm, opts.watch);
  8409. }
  8410. }
  8411. function initProps (vm, propsOptions) {
  8412. var propsData = vm.$options.propsData || {};
  8413. var props = vm._props = {};
  8414. // cache prop keys so that future props updates can iterate using Array
  8415. // instead of dynamic object key enumeration.
  8416. var keys = vm.$options._propKeys = [];
  8417. var isRoot = !vm.$parent;
  8418. // root instance props should be converted
  8419. if (!isRoot) {
  8420. toggleObserving(false);
  8421. }
  8422. var loop = function ( key ) {
  8423. keys.push(key);
  8424. var value = validateProp(key, propsOptions, propsData, vm);
  8425. /* istanbul ignore else */
  8426. if (true) {
  8427. var hyphenatedKey = hyphenate(key);
  8428. if (isReservedAttribute(hyphenatedKey) ||
  8429. config.isReservedAttr(hyphenatedKey)) {
  8430. warn(
  8431. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  8432. vm
  8433. );
  8434. }
  8435. defineReactive$$1(props, key, value, function () {
  8436. if (!isRoot && !isUpdatingChildComponent) {
  8437. {
  8438. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  8439. return
  8440. }
  8441. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  8442. if(
  8443. key === 'value' &&
  8444. Array.isArray(vm.$options.behaviors) &&
  8445. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8446. ){
  8447. return
  8448. }
  8449. if(vm._getFormData){
  8450. return
  8451. }
  8452. var $parent = vm.$parent;
  8453. while($parent){
  8454. if($parent.__next_tick_pending){
  8455. return
  8456. }
  8457. $parent = $parent.$parent;
  8458. }
  8459. }
  8460. warn(
  8461. "Avoid mutating a prop directly since the value will be " +
  8462. "overwritten whenever the parent component re-renders. " +
  8463. "Instead, use a data or computed property based on the prop's " +
  8464. "value. Prop being mutated: \"" + key + "\"",
  8465. vm
  8466. );
  8467. }
  8468. });
  8469. } else {}
  8470. // static props are already proxied on the component's prototype
  8471. // during Vue.extend(). We only need to proxy props defined at
  8472. // instantiation here.
  8473. if (!(key in vm)) {
  8474. proxy(vm, "_props", key);
  8475. }
  8476. };
  8477. for (var key in propsOptions) loop( key );
  8478. toggleObserving(true);
  8479. }
  8480. function initData (vm) {
  8481. var data = vm.$options.data;
  8482. data = vm._data = typeof data === 'function'
  8483. ? getData(data, vm)
  8484. : data || {};
  8485. if (!isPlainObject(data)) {
  8486. data = {};
  8487. true && warn(
  8488. 'data functions should return an object:\n' +
  8489. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  8490. vm
  8491. );
  8492. }
  8493. // proxy data on instance
  8494. var keys = Object.keys(data);
  8495. var props = vm.$options.props;
  8496. var methods = vm.$options.methods;
  8497. var i = keys.length;
  8498. while (i--) {
  8499. var key = keys[i];
  8500. if (true) {
  8501. if (methods && hasOwn(methods, key)) {
  8502. warn(
  8503. ("Method \"" + key + "\" has already been defined as a data property."),
  8504. vm
  8505. );
  8506. }
  8507. }
  8508. if (props && hasOwn(props, key)) {
  8509. true && warn(
  8510. "The data property \"" + key + "\" is already declared as a prop. " +
  8511. "Use prop default value instead.",
  8512. vm
  8513. );
  8514. } else if (!isReserved(key)) {
  8515. proxy(vm, "_data", key);
  8516. }
  8517. }
  8518. // observe data
  8519. observe(data, true /* asRootData */);
  8520. }
  8521. function getData (data, vm) {
  8522. // #7573 disable dep collection when invoking data getters
  8523. pushTarget();
  8524. try {
  8525. return data.call(vm, vm)
  8526. } catch (e) {
  8527. handleError(e, vm, "data()");
  8528. return {}
  8529. } finally {
  8530. popTarget();
  8531. }
  8532. }
  8533. var computedWatcherOptions = { lazy: true };
  8534. function initComputed (vm, computed) {
  8535. // $flow-disable-line
  8536. var watchers = vm._computedWatchers = Object.create(null);
  8537. // computed properties are just getters during SSR
  8538. var isSSR = isServerRendering();
  8539. for (var key in computed) {
  8540. var userDef = computed[key];
  8541. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  8542. if ( true && getter == null) {
  8543. warn(
  8544. ("Getter is missing for computed property \"" + key + "\"."),
  8545. vm
  8546. );
  8547. }
  8548. if (!isSSR) {
  8549. // create internal watcher for the computed property.
  8550. watchers[key] = new Watcher(
  8551. vm,
  8552. getter || noop,
  8553. noop,
  8554. computedWatcherOptions
  8555. );
  8556. }
  8557. // component-defined computed properties are already defined on the
  8558. // component prototype. We only need to define computed properties defined
  8559. // at instantiation here.
  8560. if (!(key in vm)) {
  8561. defineComputed(vm, key, userDef);
  8562. } else if (true) {
  8563. if (key in vm.$data) {
  8564. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  8565. } else if (vm.$options.props && key in vm.$options.props) {
  8566. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  8567. }
  8568. }
  8569. }
  8570. }
  8571. function defineComputed (
  8572. target,
  8573. key,
  8574. userDef
  8575. ) {
  8576. var shouldCache = !isServerRendering();
  8577. if (typeof userDef === 'function') {
  8578. sharedPropertyDefinition.get = shouldCache
  8579. ? createComputedGetter(key)
  8580. : createGetterInvoker(userDef);
  8581. sharedPropertyDefinition.set = noop;
  8582. } else {
  8583. sharedPropertyDefinition.get = userDef.get
  8584. ? shouldCache && userDef.cache !== false
  8585. ? createComputedGetter(key)
  8586. : createGetterInvoker(userDef.get)
  8587. : noop;
  8588. sharedPropertyDefinition.set = userDef.set || noop;
  8589. }
  8590. if ( true &&
  8591. sharedPropertyDefinition.set === noop) {
  8592. sharedPropertyDefinition.set = function () {
  8593. warn(
  8594. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  8595. this
  8596. );
  8597. };
  8598. }
  8599. Object.defineProperty(target, key, sharedPropertyDefinition);
  8600. }
  8601. function createComputedGetter (key) {
  8602. return function computedGetter () {
  8603. var watcher = this._computedWatchers && this._computedWatchers[key];
  8604. if (watcher) {
  8605. if (watcher.dirty) {
  8606. watcher.evaluate();
  8607. }
  8608. if (Dep.SharedObject.target) {// fixed by xxxxxx
  8609. watcher.depend();
  8610. }
  8611. return watcher.value
  8612. }
  8613. }
  8614. }
  8615. function createGetterInvoker(fn) {
  8616. return function computedGetter () {
  8617. return fn.call(this, this)
  8618. }
  8619. }
  8620. function initMethods (vm, methods) {
  8621. var props = vm.$options.props;
  8622. for (var key in methods) {
  8623. if (true) {
  8624. if (typeof methods[key] !== 'function') {
  8625. warn(
  8626. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  8627. "Did you reference the function correctly?",
  8628. vm
  8629. );
  8630. }
  8631. if (props && hasOwn(props, key)) {
  8632. warn(
  8633. ("Method \"" + key + "\" has already been defined as a prop."),
  8634. vm
  8635. );
  8636. }
  8637. if ((key in vm) && isReserved(key)) {
  8638. warn(
  8639. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  8640. "Avoid defining component methods that start with _ or $."
  8641. );
  8642. }
  8643. }
  8644. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  8645. }
  8646. }
  8647. function initWatch (vm, watch) {
  8648. for (var key in watch) {
  8649. var handler = watch[key];
  8650. if (Array.isArray(handler)) {
  8651. for (var i = 0; i < handler.length; i++) {
  8652. createWatcher(vm, key, handler[i]);
  8653. }
  8654. } else {
  8655. createWatcher(vm, key, handler);
  8656. }
  8657. }
  8658. }
  8659. function createWatcher (
  8660. vm,
  8661. expOrFn,
  8662. handler,
  8663. options
  8664. ) {
  8665. if (isPlainObject(handler)) {
  8666. options = handler;
  8667. handler = handler.handler;
  8668. }
  8669. if (typeof handler === 'string') {
  8670. handler = vm[handler];
  8671. }
  8672. return vm.$watch(expOrFn, handler, options)
  8673. }
  8674. function stateMixin (Vue) {
  8675. // flow somehow has problems with directly declared definition object
  8676. // when using Object.defineProperty, so we have to procedurally build up
  8677. // the object here.
  8678. var dataDef = {};
  8679. dataDef.get = function () { return this._data };
  8680. var propsDef = {};
  8681. propsDef.get = function () { return this._props };
  8682. if (true) {
  8683. dataDef.set = function () {
  8684. warn(
  8685. 'Avoid replacing instance root $data. ' +
  8686. 'Use nested data properties instead.',
  8687. this
  8688. );
  8689. };
  8690. propsDef.set = function () {
  8691. warn("$props is readonly.", this);
  8692. };
  8693. }
  8694. Object.defineProperty(Vue.prototype, '$data', dataDef);
  8695. Object.defineProperty(Vue.prototype, '$props', propsDef);
  8696. Vue.prototype.$set = set;
  8697. Vue.prototype.$delete = del;
  8698. Vue.prototype.$watch = function (
  8699. expOrFn,
  8700. cb,
  8701. options
  8702. ) {
  8703. var vm = this;
  8704. if (isPlainObject(cb)) {
  8705. return createWatcher(vm, expOrFn, cb, options)
  8706. }
  8707. options = options || {};
  8708. options.user = true;
  8709. var watcher = new Watcher(vm, expOrFn, cb, options);
  8710. if (options.immediate) {
  8711. try {
  8712. cb.call(vm, watcher.value);
  8713. } catch (error) {
  8714. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  8715. }
  8716. }
  8717. return function unwatchFn () {
  8718. watcher.teardown();
  8719. }
  8720. };
  8721. }
  8722. /* */
  8723. var uid$3 = 0;
  8724. function initMixin (Vue) {
  8725. Vue.prototype._init = function (options) {
  8726. var vm = this;
  8727. // a uid
  8728. vm._uid = uid$3++;
  8729. var startTag, endTag;
  8730. /* istanbul ignore if */
  8731. if ( true && config.performance && mark) {
  8732. startTag = "vue-perf-start:" + (vm._uid);
  8733. endTag = "vue-perf-end:" + (vm._uid);
  8734. mark(startTag);
  8735. }
  8736. // a flag to avoid this being observed
  8737. vm._isVue = true;
  8738. // merge options
  8739. if (options && options._isComponent) {
  8740. // optimize internal component instantiation
  8741. // since dynamic options merging is pretty slow, and none of the
  8742. // internal component options needs special treatment.
  8743. initInternalComponent(vm, options);
  8744. } else {
  8745. vm.$options = mergeOptions(
  8746. resolveConstructorOptions(vm.constructor),
  8747. options || {},
  8748. vm
  8749. );
  8750. }
  8751. /* istanbul ignore else */
  8752. if (true) {
  8753. initProxy(vm);
  8754. } else {}
  8755. // expose real self
  8756. vm._self = vm;
  8757. initLifecycle(vm);
  8758. initEvents(vm);
  8759. initRender(vm);
  8760. callHook(vm, 'beforeCreate');
  8761. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  8762. initState(vm);
  8763. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  8764. !vm._$fallback && callHook(vm, 'created');
  8765. /* istanbul ignore if */
  8766. if ( true && config.performance && mark) {
  8767. vm._name = formatComponentName(vm, false);
  8768. mark(endTag);
  8769. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  8770. }
  8771. if (vm.$options.el) {
  8772. vm.$mount(vm.$options.el);
  8773. }
  8774. };
  8775. }
  8776. function initInternalComponent (vm, options) {
  8777. var opts = vm.$options = Object.create(vm.constructor.options);
  8778. // doing this because it's faster than dynamic enumeration.
  8779. var parentVnode = options._parentVnode;
  8780. opts.parent = options.parent;
  8781. opts._parentVnode = parentVnode;
  8782. var vnodeComponentOptions = parentVnode.componentOptions;
  8783. opts.propsData = vnodeComponentOptions.propsData;
  8784. opts._parentListeners = vnodeComponentOptions.listeners;
  8785. opts._renderChildren = vnodeComponentOptions.children;
  8786. opts._componentTag = vnodeComponentOptions.tag;
  8787. if (options.render) {
  8788. opts.render = options.render;
  8789. opts.staticRenderFns = options.staticRenderFns;
  8790. }
  8791. }
  8792. function resolveConstructorOptions (Ctor) {
  8793. var options = Ctor.options;
  8794. if (Ctor.super) {
  8795. var superOptions = resolveConstructorOptions(Ctor.super);
  8796. var cachedSuperOptions = Ctor.superOptions;
  8797. if (superOptions !== cachedSuperOptions) {
  8798. // super option changed,
  8799. // need to resolve new options.
  8800. Ctor.superOptions = superOptions;
  8801. // check if there are any late-modified/attached options (#4976)
  8802. var modifiedOptions = resolveModifiedOptions(Ctor);
  8803. // update base extend options
  8804. if (modifiedOptions) {
  8805. extend(Ctor.extendOptions, modifiedOptions);
  8806. }
  8807. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  8808. if (options.name) {
  8809. options.components[options.name] = Ctor;
  8810. }
  8811. }
  8812. }
  8813. return options
  8814. }
  8815. function resolveModifiedOptions (Ctor) {
  8816. var modified;
  8817. var latest = Ctor.options;
  8818. var sealed = Ctor.sealedOptions;
  8819. for (var key in latest) {
  8820. if (latest[key] !== sealed[key]) {
  8821. if (!modified) { modified = {}; }
  8822. modified[key] = latest[key];
  8823. }
  8824. }
  8825. return modified
  8826. }
  8827. function Vue (options) {
  8828. if ( true &&
  8829. !(this instanceof Vue)
  8830. ) {
  8831. warn('Vue is a constructor and should be called with the `new` keyword');
  8832. }
  8833. this._init(options);
  8834. }
  8835. initMixin(Vue);
  8836. stateMixin(Vue);
  8837. eventsMixin(Vue);
  8838. lifecycleMixin(Vue);
  8839. renderMixin(Vue);
  8840. /* */
  8841. function initUse (Vue) {
  8842. Vue.use = function (plugin) {
  8843. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  8844. if (installedPlugins.indexOf(plugin) > -1) {
  8845. return this
  8846. }
  8847. // additional parameters
  8848. var args = toArray(arguments, 1);
  8849. args.unshift(this);
  8850. if (typeof plugin.install === 'function') {
  8851. plugin.install.apply(plugin, args);
  8852. } else if (typeof plugin === 'function') {
  8853. plugin.apply(null, args);
  8854. }
  8855. installedPlugins.push(plugin);
  8856. return this
  8857. };
  8858. }
  8859. /* */
  8860. function initMixin$1 (Vue) {
  8861. Vue.mixin = function (mixin) {
  8862. this.options = mergeOptions(this.options, mixin);
  8863. return this
  8864. };
  8865. }
  8866. /* */
  8867. function initExtend (Vue) {
  8868. /**
  8869. * Each instance constructor, including Vue, has a unique
  8870. * cid. This enables us to create wrapped "child
  8871. * constructors" for prototypal inheritance and cache them.
  8872. */
  8873. Vue.cid = 0;
  8874. var cid = 1;
  8875. /**
  8876. * Class inheritance
  8877. */
  8878. Vue.extend = function (extendOptions) {
  8879. extendOptions = extendOptions || {};
  8880. var Super = this;
  8881. var SuperId = Super.cid;
  8882. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  8883. if (cachedCtors[SuperId]) {
  8884. return cachedCtors[SuperId]
  8885. }
  8886. var name = extendOptions.name || Super.options.name;
  8887. if ( true && name) {
  8888. validateComponentName(name);
  8889. }
  8890. var Sub = function VueComponent (options) {
  8891. this._init(options);
  8892. };
  8893. Sub.prototype = Object.create(Super.prototype);
  8894. Sub.prototype.constructor = Sub;
  8895. Sub.cid = cid++;
  8896. Sub.options = mergeOptions(
  8897. Super.options,
  8898. extendOptions
  8899. );
  8900. Sub['super'] = Super;
  8901. // For props and computed properties, we define the proxy getters on
  8902. // the Vue instances at extension time, on the extended prototype. This
  8903. // avoids Object.defineProperty calls for each instance created.
  8904. if (Sub.options.props) {
  8905. initProps$1(Sub);
  8906. }
  8907. if (Sub.options.computed) {
  8908. initComputed$1(Sub);
  8909. }
  8910. // allow further extension/mixin/plugin usage
  8911. Sub.extend = Super.extend;
  8912. Sub.mixin = Super.mixin;
  8913. Sub.use = Super.use;
  8914. // create asset registers, so extended classes
  8915. // can have their private assets too.
  8916. ASSET_TYPES.forEach(function (type) {
  8917. Sub[type] = Super[type];
  8918. });
  8919. // enable recursive self-lookup
  8920. if (name) {
  8921. Sub.options.components[name] = Sub;
  8922. }
  8923. // keep a reference to the super options at extension time.
  8924. // later at instantiation we can check if Super's options have
  8925. // been updated.
  8926. Sub.superOptions = Super.options;
  8927. Sub.extendOptions = extendOptions;
  8928. Sub.sealedOptions = extend({}, Sub.options);
  8929. // cache constructor
  8930. cachedCtors[SuperId] = Sub;
  8931. return Sub
  8932. };
  8933. }
  8934. function initProps$1 (Comp) {
  8935. var props = Comp.options.props;
  8936. for (var key in props) {
  8937. proxy(Comp.prototype, "_props", key);
  8938. }
  8939. }
  8940. function initComputed$1 (Comp) {
  8941. var computed = Comp.options.computed;
  8942. for (var key in computed) {
  8943. defineComputed(Comp.prototype, key, computed[key]);
  8944. }
  8945. }
  8946. /* */
  8947. function initAssetRegisters (Vue) {
  8948. /**
  8949. * Create asset registration methods.
  8950. */
  8951. ASSET_TYPES.forEach(function (type) {
  8952. Vue[type] = function (
  8953. id,
  8954. definition
  8955. ) {
  8956. if (!definition) {
  8957. return this.options[type + 's'][id]
  8958. } else {
  8959. /* istanbul ignore if */
  8960. if ( true && type === 'component') {
  8961. validateComponentName(id);
  8962. }
  8963. if (type === 'component' && isPlainObject(definition)) {
  8964. definition.name = definition.name || id;
  8965. definition = this.options._base.extend(definition);
  8966. }
  8967. if (type === 'directive' && typeof definition === 'function') {
  8968. definition = { bind: definition, update: definition };
  8969. }
  8970. this.options[type + 's'][id] = definition;
  8971. return definition
  8972. }
  8973. };
  8974. });
  8975. }
  8976. /* */
  8977. function getComponentName (opts) {
  8978. return opts && (opts.Ctor.options.name || opts.tag)
  8979. }
  8980. function matches (pattern, name) {
  8981. if (Array.isArray(pattern)) {
  8982. return pattern.indexOf(name) > -1
  8983. } else if (typeof pattern === 'string') {
  8984. return pattern.split(',').indexOf(name) > -1
  8985. } else if (isRegExp(pattern)) {
  8986. return pattern.test(name)
  8987. }
  8988. /* istanbul ignore next */
  8989. return false
  8990. }
  8991. function pruneCache (keepAliveInstance, filter) {
  8992. var cache = keepAliveInstance.cache;
  8993. var keys = keepAliveInstance.keys;
  8994. var _vnode = keepAliveInstance._vnode;
  8995. for (var key in cache) {
  8996. var cachedNode = cache[key];
  8997. if (cachedNode) {
  8998. var name = getComponentName(cachedNode.componentOptions);
  8999. if (name && !filter(name)) {
  9000. pruneCacheEntry(cache, key, keys, _vnode);
  9001. }
  9002. }
  9003. }
  9004. }
  9005. function pruneCacheEntry (
  9006. cache,
  9007. key,
  9008. keys,
  9009. current
  9010. ) {
  9011. var cached$$1 = cache[key];
  9012. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  9013. cached$$1.componentInstance.$destroy();
  9014. }
  9015. cache[key] = null;
  9016. remove(keys, key);
  9017. }
  9018. var patternTypes = [String, RegExp, Array];
  9019. var KeepAlive = {
  9020. name: 'keep-alive',
  9021. abstract: true,
  9022. props: {
  9023. include: patternTypes,
  9024. exclude: patternTypes,
  9025. max: [String, Number]
  9026. },
  9027. created: function created () {
  9028. this.cache = Object.create(null);
  9029. this.keys = [];
  9030. },
  9031. destroyed: function destroyed () {
  9032. for (var key in this.cache) {
  9033. pruneCacheEntry(this.cache, key, this.keys);
  9034. }
  9035. },
  9036. mounted: function mounted () {
  9037. var this$1 = this;
  9038. this.$watch('include', function (val) {
  9039. pruneCache(this$1, function (name) { return matches(val, name); });
  9040. });
  9041. this.$watch('exclude', function (val) {
  9042. pruneCache(this$1, function (name) { return !matches(val, name); });
  9043. });
  9044. },
  9045. render: function render () {
  9046. var slot = this.$slots.default;
  9047. var vnode = getFirstComponentChild(slot);
  9048. var componentOptions = vnode && vnode.componentOptions;
  9049. if (componentOptions) {
  9050. // check pattern
  9051. var name = getComponentName(componentOptions);
  9052. var ref = this;
  9053. var include = ref.include;
  9054. var exclude = ref.exclude;
  9055. if (
  9056. // not included
  9057. (include && (!name || !matches(include, name))) ||
  9058. // excluded
  9059. (exclude && name && matches(exclude, name))
  9060. ) {
  9061. return vnode
  9062. }
  9063. var ref$1 = this;
  9064. var cache = ref$1.cache;
  9065. var keys = ref$1.keys;
  9066. var key = vnode.key == null
  9067. // same constructor may get registered as different local components
  9068. // so cid alone is not enough (#3269)
  9069. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  9070. : vnode.key;
  9071. if (cache[key]) {
  9072. vnode.componentInstance = cache[key].componentInstance;
  9073. // make current key freshest
  9074. remove(keys, key);
  9075. keys.push(key);
  9076. } else {
  9077. cache[key] = vnode;
  9078. keys.push(key);
  9079. // prune oldest entry
  9080. if (this.max && keys.length > parseInt(this.max)) {
  9081. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  9082. }
  9083. }
  9084. vnode.data.keepAlive = true;
  9085. }
  9086. return vnode || (slot && slot[0])
  9087. }
  9088. };
  9089. var builtInComponents = {
  9090. KeepAlive: KeepAlive
  9091. };
  9092. /* */
  9093. function initGlobalAPI (Vue) {
  9094. // config
  9095. var configDef = {};
  9096. configDef.get = function () { return config; };
  9097. if (true) {
  9098. configDef.set = function () {
  9099. warn(
  9100. 'Do not replace the Vue.config object, set individual fields instead.'
  9101. );
  9102. };
  9103. }
  9104. Object.defineProperty(Vue, 'config', configDef);
  9105. // exposed util methods.
  9106. // NOTE: these are not considered part of the public API - avoid relying on
  9107. // them unless you are aware of the risk.
  9108. Vue.util = {
  9109. warn: warn,
  9110. extend: extend,
  9111. mergeOptions: mergeOptions,
  9112. defineReactive: defineReactive$$1
  9113. };
  9114. Vue.set = set;
  9115. Vue.delete = del;
  9116. Vue.nextTick = nextTick;
  9117. // 2.6 explicit observable API
  9118. Vue.observable = function (obj) {
  9119. observe(obj);
  9120. return obj
  9121. };
  9122. Vue.options = Object.create(null);
  9123. ASSET_TYPES.forEach(function (type) {
  9124. Vue.options[type + 's'] = Object.create(null);
  9125. });
  9126. // this is used to identify the "base" constructor to extend all plain-object
  9127. // components with in Weex's multi-instance scenarios.
  9128. Vue.options._base = Vue;
  9129. extend(Vue.options.components, builtInComponents);
  9130. initUse(Vue);
  9131. initMixin$1(Vue);
  9132. initExtend(Vue);
  9133. initAssetRegisters(Vue);
  9134. }
  9135. initGlobalAPI(Vue);
  9136. Object.defineProperty(Vue.prototype, '$isServer', {
  9137. get: isServerRendering
  9138. });
  9139. Object.defineProperty(Vue.prototype, '$ssrContext', {
  9140. get: function get () {
  9141. /* istanbul ignore next */
  9142. return this.$vnode && this.$vnode.ssrContext
  9143. }
  9144. });
  9145. // expose FunctionalRenderContext for ssr runtime helper installation
  9146. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  9147. value: FunctionalRenderContext
  9148. });
  9149. Vue.version = '2.6.11';
  9150. /**
  9151. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  9152. */
  9153. var ARRAYTYPE = '[object Array]';
  9154. var OBJECTTYPE = '[object Object]';
  9155. var NULLTYPE = '[object Null]';
  9156. var UNDEFINEDTYPE = '[object Undefined]';
  9157. // const FUNCTIONTYPE = '[object Function]'
  9158. function diff(current, pre) {
  9159. var result = {};
  9160. syncKeys(current, pre);
  9161. _diff(current, pre, '', result);
  9162. return result
  9163. }
  9164. function syncKeys(current, pre) {
  9165. if (current === pre) { return }
  9166. var rootCurrentType = type(current);
  9167. var rootPreType = type(pre);
  9168. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  9169. if(Object.keys(current).length >= Object.keys(pre).length){
  9170. for (var key in pre) {
  9171. var currentValue = current[key];
  9172. if (currentValue === undefined) {
  9173. current[key] = null;
  9174. } else {
  9175. syncKeys(currentValue, pre[key]);
  9176. }
  9177. }
  9178. }
  9179. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  9180. if (current.length >= pre.length) {
  9181. pre.forEach(function (item, index) {
  9182. syncKeys(current[index], item);
  9183. });
  9184. }
  9185. }
  9186. }
  9187. function nullOrUndefined(currentType, preType) {
  9188. if(
  9189. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  9190. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  9191. ) {
  9192. return false
  9193. }
  9194. return true
  9195. }
  9196. function _diff(current, pre, path, result) {
  9197. if (current === pre) { return }
  9198. var rootCurrentType = type(current);
  9199. var rootPreType = type(pre);
  9200. if (rootCurrentType == OBJECTTYPE) {
  9201. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  9202. setResult(result, path, current);
  9203. } else {
  9204. var loop = function ( key ) {
  9205. var currentValue = current[key];
  9206. var preValue = pre[key];
  9207. var currentType = type(currentValue);
  9208. var preType = type(preValue);
  9209. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  9210. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  9211. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9212. }
  9213. } else if (currentType == ARRAYTYPE) {
  9214. if (preType != ARRAYTYPE) {
  9215. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9216. } else {
  9217. if (currentValue.length < preValue.length) {
  9218. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9219. } else {
  9220. currentValue.forEach(function (item, index) {
  9221. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  9222. });
  9223. }
  9224. }
  9225. } else if (currentType == OBJECTTYPE) {
  9226. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  9227. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9228. } else {
  9229. for (var subKey in currentValue) {
  9230. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  9231. }
  9232. }
  9233. }
  9234. };
  9235. for (var key in current) loop( key );
  9236. }
  9237. } else if (rootCurrentType == ARRAYTYPE) {
  9238. if (rootPreType != ARRAYTYPE) {
  9239. setResult(result, path, current);
  9240. } else {
  9241. if (current.length < pre.length) {
  9242. setResult(result, path, current);
  9243. } else {
  9244. current.forEach(function (item, index) {
  9245. _diff(item, pre[index], path + '[' + index + ']', result);
  9246. });
  9247. }
  9248. }
  9249. } else {
  9250. setResult(result, path, current);
  9251. }
  9252. }
  9253. function setResult(result, k, v) {
  9254. // if (type(v) != FUNCTIONTYPE) {
  9255. result[k] = v;
  9256. // }
  9257. }
  9258. function type(obj) {
  9259. return Object.prototype.toString.call(obj)
  9260. }
  9261. /* */
  9262. function flushCallbacks$1(vm) {
  9263. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  9264. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kklbWe","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9265. var mpInstance = vm.$scope;
  9266. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9267. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  9268. }
  9269. var copies = vm.__next_tick_callbacks.slice(0);
  9270. vm.__next_tick_callbacks.length = 0;
  9271. for (var i = 0; i < copies.length; i++) {
  9272. copies[i]();
  9273. }
  9274. }
  9275. }
  9276. function hasRenderWatcher(vm) {
  9277. return queue.find(function (watcher) { return vm._watcher === watcher; })
  9278. }
  9279. function nextTick$1(vm, cb) {
  9280. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  9281. //2.nextTick 之前存在 render watcher
  9282. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  9283. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kklbWe","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  9284. var mpInstance = vm.$scope;
  9285. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9286. ']:nextVueTick');
  9287. }
  9288. return nextTick(cb, vm)
  9289. }else{
  9290. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kklbWe","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  9291. var mpInstance$1 = vm.$scope;
  9292. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  9293. ']:nextMPTick');
  9294. }
  9295. }
  9296. var _resolve;
  9297. if (!vm.__next_tick_callbacks) {
  9298. vm.__next_tick_callbacks = [];
  9299. }
  9300. vm.__next_tick_callbacks.push(function () {
  9301. if (cb) {
  9302. try {
  9303. cb.call(vm);
  9304. } catch (e) {
  9305. handleError(e, vm, 'nextTick');
  9306. }
  9307. } else if (_resolve) {
  9308. _resolve(vm);
  9309. }
  9310. });
  9311. // $flow-disable-line
  9312. if (!cb && typeof Promise !== 'undefined') {
  9313. return new Promise(function (resolve) {
  9314. _resolve = resolve;
  9315. })
  9316. }
  9317. }
  9318. /* */
  9319. function clearInstance(key, value) {
  9320. // 简易去除 Vue 和小程序组件实例
  9321. if (value) {
  9322. if (value._isVue || value.__v_isMPComponent) {
  9323. return {}
  9324. }
  9325. }
  9326. return value
  9327. }
  9328. function cloneWithData(vm) {
  9329. // 确保当前 vm 所有数据被同步
  9330. var ret = Object.create(null);
  9331. var dataKeys = [].concat(
  9332. Object.keys(vm._data || {}),
  9333. Object.keys(vm._computedWatchers || {}));
  9334. dataKeys.reduce(function(ret, key) {
  9335. ret[key] = vm[key];
  9336. return ret
  9337. }, ret);
  9338. // vue-composition-api
  9339. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  9340. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  9341. if (rawBindings) {
  9342. Object.keys(rawBindings).forEach(function (key) {
  9343. ret[key] = vm[key];
  9344. });
  9345. }
  9346. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  9347. Object.assign(ret, vm.$mp.data || {});
  9348. if (
  9349. Array.isArray(vm.$options.behaviors) &&
  9350. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  9351. ) { //form-field
  9352. ret['name'] = vm.name;
  9353. ret['value'] = vm.value;
  9354. }
  9355. return JSON.parse(JSON.stringify(ret, clearInstance))
  9356. }
  9357. var patch = function(oldVnode, vnode) {
  9358. var this$1 = this;
  9359. if (vnode === null) { //destroy
  9360. return
  9361. }
  9362. if (this.mpType === 'page' || this.mpType === 'component') {
  9363. var mpInstance = this.$scope;
  9364. var data = Object.create(null);
  9365. try {
  9366. data = cloneWithData(this);
  9367. } catch (err) {
  9368. console.error(err);
  9369. }
  9370. data.__webviewId__ = mpInstance.data.__webviewId__;
  9371. var mpData = Object.create(null);
  9372. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  9373. mpData[key] = mpInstance.data[key];
  9374. });
  9375. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  9376. if (Object.keys(diffData).length) {
  9377. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kklbWe","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9378. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  9379. ']差量更新',
  9380. JSON.stringify(diffData));
  9381. }
  9382. this.__next_tick_pending = true;
  9383. mpInstance.setData(diffData, function () {
  9384. this$1.__next_tick_pending = false;
  9385. flushCallbacks$1(this$1);
  9386. });
  9387. } else {
  9388. flushCallbacks$1(this);
  9389. }
  9390. }
  9391. };
  9392. /* */
  9393. function createEmptyRender() {
  9394. }
  9395. function mountComponent$1(
  9396. vm,
  9397. el,
  9398. hydrating
  9399. ) {
  9400. if (!vm.mpType) {//main.js 中的 new Vue
  9401. return vm
  9402. }
  9403. if (vm.mpType === 'app') {
  9404. vm.$options.render = createEmptyRender;
  9405. }
  9406. if (!vm.$options.render) {
  9407. vm.$options.render = createEmptyRender;
  9408. if (true) {
  9409. /* istanbul ignore if */
  9410. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  9411. vm.$options.el || el) {
  9412. warn(
  9413. 'You are using the runtime-only build of Vue where the template ' +
  9414. 'compiler is not available. Either pre-compile the templates into ' +
  9415. 'render functions, or use the compiler-included build.',
  9416. vm
  9417. );
  9418. } else {
  9419. warn(
  9420. 'Failed to mount component: template or render function not defined.',
  9421. vm
  9422. );
  9423. }
  9424. }
  9425. }
  9426. !vm._$fallback && callHook(vm, 'beforeMount');
  9427. var updateComponent = function () {
  9428. vm._update(vm._render(), hydrating);
  9429. };
  9430. // we set this to vm._watcher inside the watcher's constructor
  9431. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  9432. // component's mounted hook), which relies on vm._watcher being already defined
  9433. new Watcher(vm, updateComponent, noop, {
  9434. before: function before() {
  9435. if (vm._isMounted && !vm._isDestroyed) {
  9436. callHook(vm, 'beforeUpdate');
  9437. }
  9438. }
  9439. }, true /* isRenderWatcher */);
  9440. hydrating = false;
  9441. return vm
  9442. }
  9443. /* */
  9444. function renderClass (
  9445. staticClass,
  9446. dynamicClass
  9447. ) {
  9448. if (isDef(staticClass) || isDef(dynamicClass)) {
  9449. return concat(staticClass, stringifyClass(dynamicClass))
  9450. }
  9451. /* istanbul ignore next */
  9452. return ''
  9453. }
  9454. function concat (a, b) {
  9455. return a ? b ? (a + ' ' + b) : a : (b || '')
  9456. }
  9457. function stringifyClass (value) {
  9458. if (Array.isArray(value)) {
  9459. return stringifyArray(value)
  9460. }
  9461. if (isObject(value)) {
  9462. return stringifyObject(value)
  9463. }
  9464. if (typeof value === 'string') {
  9465. return value
  9466. }
  9467. /* istanbul ignore next */
  9468. return ''
  9469. }
  9470. function stringifyArray (value) {
  9471. var res = '';
  9472. var stringified;
  9473. for (var i = 0, l = value.length; i < l; i++) {
  9474. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  9475. if (res) { res += ' '; }
  9476. res += stringified;
  9477. }
  9478. }
  9479. return res
  9480. }
  9481. function stringifyObject (value) {
  9482. var res = '';
  9483. for (var key in value) {
  9484. if (value[key]) {
  9485. if (res) { res += ' '; }
  9486. res += key;
  9487. }
  9488. }
  9489. return res
  9490. }
  9491. /* */
  9492. var parseStyleText = cached(function (cssText) {
  9493. var res = {};
  9494. var listDelimiter = /;(?![^(]*\))/g;
  9495. var propertyDelimiter = /:(.+)/;
  9496. cssText.split(listDelimiter).forEach(function (item) {
  9497. if (item) {
  9498. var tmp = item.split(propertyDelimiter);
  9499. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  9500. }
  9501. });
  9502. return res
  9503. });
  9504. // normalize possible array / string values into Object
  9505. function normalizeStyleBinding (bindingStyle) {
  9506. if (Array.isArray(bindingStyle)) {
  9507. return toObject(bindingStyle)
  9508. }
  9509. if (typeof bindingStyle === 'string') {
  9510. return parseStyleText(bindingStyle)
  9511. }
  9512. return bindingStyle
  9513. }
  9514. /* */
  9515. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  9516. function getTarget(obj, path) {
  9517. var parts = path.split('.');
  9518. var key = parts[0];
  9519. if (key.indexOf('__$n') === 0) { //number index
  9520. key = parseInt(key.replace('__$n', ''));
  9521. }
  9522. if (parts.length === 1) {
  9523. return obj[key]
  9524. }
  9525. return getTarget(obj[key], parts.slice(1).join('.'))
  9526. }
  9527. function internalMixin(Vue) {
  9528. Vue.config.errorHandler = function(err, vm, info) {
  9529. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  9530. console.error(err);
  9531. /* eslint-disable no-undef */
  9532. var app = typeof getApp === 'function' && getApp();
  9533. if (app && app.onError) {
  9534. app.onError(err);
  9535. }
  9536. };
  9537. var oldEmit = Vue.prototype.$emit;
  9538. Vue.prototype.$emit = function(event) {
  9539. if (this.$scope && event) {
  9540. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  9541. if (triggerEvent) {
  9542. try {
  9543. triggerEvent.call(this.$scope, event, {
  9544. __args__: toArray(arguments, 1)
  9545. });
  9546. } catch (error) {
  9547. }
  9548. }
  9549. }
  9550. return oldEmit.apply(this, arguments)
  9551. };
  9552. Vue.prototype.$nextTick = function(fn) {
  9553. return nextTick$1(this, fn)
  9554. };
  9555. MP_METHODS.forEach(function (method) {
  9556. Vue.prototype[method] = function(args) {
  9557. if (this.$scope && this.$scope[method]) {
  9558. return this.$scope[method](args)
  9559. }
  9560. // mp-alipay
  9561. if (typeof my === 'undefined') {
  9562. return
  9563. }
  9564. if (method === 'createSelectorQuery') {
  9565. /* eslint-disable no-undef */
  9566. return my.createSelectorQuery(args)
  9567. } else if (method === 'createIntersectionObserver') {
  9568. /* eslint-disable no-undef */
  9569. return my.createIntersectionObserver(args)
  9570. }
  9571. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  9572. };
  9573. });
  9574. Vue.prototype.__init_provide = initProvide;
  9575. Vue.prototype.__init_injections = initInjections;
  9576. Vue.prototype.__call_hook = function(hook, args) {
  9577. var vm = this;
  9578. // #7573 disable dep collection when invoking lifecycle hooks
  9579. pushTarget();
  9580. var handlers = vm.$options[hook];
  9581. var info = hook + " hook";
  9582. var ret;
  9583. if (handlers) {
  9584. for (var i = 0, j = handlers.length; i < j; i++) {
  9585. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  9586. }
  9587. }
  9588. if (vm._hasHookEvent) {
  9589. vm.$emit('hook:' + hook, args);
  9590. }
  9591. popTarget();
  9592. return ret
  9593. };
  9594. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  9595. if (Array.isArray(modifiers)) {
  9596. if (modifiers.indexOf('trim') !== -1) {
  9597. value = value.trim();
  9598. }
  9599. if (modifiers.indexOf('number') !== -1) {
  9600. value = this._n(value);
  9601. }
  9602. }
  9603. if (!target) {
  9604. target = this;
  9605. }
  9606. // 解决动态属性添加
  9607. Vue.set(target, key, value);
  9608. };
  9609. Vue.prototype.__set_sync = function(target, key, value) {
  9610. if (!target) {
  9611. target = this;
  9612. }
  9613. // 解决动态属性添加
  9614. Vue.set(target, key, value);
  9615. };
  9616. Vue.prototype.__get_orig = function(item) {
  9617. if (isPlainObject(item)) {
  9618. return item['$orig'] || item
  9619. }
  9620. return item
  9621. };
  9622. Vue.prototype.__get_value = function(dataPath, target) {
  9623. return getTarget(target || this, dataPath)
  9624. };
  9625. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  9626. return renderClass(staticClass, dynamicClass)
  9627. };
  9628. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  9629. if (!dynamicStyle && !staticStyle) {
  9630. return ''
  9631. }
  9632. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  9633. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  9634. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  9635. };
  9636. Vue.prototype.__map = function(val, iteratee) {
  9637. //TODO 暂不考虑 string
  9638. var ret, i, l, keys, key;
  9639. if (Array.isArray(val)) {
  9640. ret = new Array(val.length);
  9641. for (i = 0, l = val.length; i < l; i++) {
  9642. ret[i] = iteratee(val[i], i);
  9643. }
  9644. return ret
  9645. } else if (isObject(val)) {
  9646. keys = Object.keys(val);
  9647. ret = Object.create(null);
  9648. for (i = 0, l = keys.length; i < l; i++) {
  9649. key = keys[i];
  9650. ret[key] = iteratee(val[key], key, i);
  9651. }
  9652. return ret
  9653. } else if (typeof val === 'number') {
  9654. ret = new Array(val);
  9655. for (i = 0, l = val; i < l; i++) {
  9656. // 第一个参数暂时仍和小程序一致
  9657. ret[i] = iteratee(i, i);
  9658. }
  9659. return ret
  9660. }
  9661. return []
  9662. };
  9663. }
  9664. /* */
  9665. var LIFECYCLE_HOOKS$1 = [
  9666. //App
  9667. 'onLaunch',
  9668. 'onShow',
  9669. 'onHide',
  9670. 'onUniNViewMessage',
  9671. 'onPageNotFound',
  9672. 'onThemeChange',
  9673. 'onError',
  9674. 'onUnhandledRejection',
  9675. //Page
  9676. 'onInit',
  9677. 'onLoad',
  9678. // 'onShow',
  9679. 'onReady',
  9680. // 'onHide',
  9681. 'onUnload',
  9682. 'onPullDownRefresh',
  9683. 'onReachBottom',
  9684. 'onTabItemTap',
  9685. 'onAddToFavorites',
  9686. 'onShareTimeline',
  9687. 'onShareAppMessage',
  9688. 'onResize',
  9689. 'onPageScroll',
  9690. 'onNavigationBarButtonTap',
  9691. 'onBackPress',
  9692. 'onNavigationBarSearchInputChanged',
  9693. 'onNavigationBarSearchInputConfirmed',
  9694. 'onNavigationBarSearchInputClicked',
  9695. 'onUploadDouyinVideo',
  9696. 'onNFCReadMessage',
  9697. //Component
  9698. // 'onReady', // 兼容旧版本,应该移除该事件
  9699. 'onPageShow',
  9700. 'onPageHide',
  9701. 'onPageResize'
  9702. ];
  9703. function lifecycleMixin$1(Vue) {
  9704. //fixed vue-class-component
  9705. var oldExtend = Vue.extend;
  9706. Vue.extend = function(extendOptions) {
  9707. extendOptions = extendOptions || {};
  9708. var methods = extendOptions.methods;
  9709. if (methods) {
  9710. Object.keys(methods).forEach(function (methodName) {
  9711. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  9712. extendOptions[methodName] = methods[methodName];
  9713. delete methods[methodName];
  9714. }
  9715. });
  9716. }
  9717. return oldExtend.call(this, extendOptions)
  9718. };
  9719. var strategies = Vue.config.optionMergeStrategies;
  9720. var mergeHook = strategies.created;
  9721. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  9722. strategies[hook] = mergeHook;
  9723. });
  9724. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  9725. }
  9726. /* */
  9727. // install platform patch function
  9728. Vue.prototype.__patch__ = patch;
  9729. // public mount method
  9730. Vue.prototype.$mount = function(
  9731. el ,
  9732. hydrating
  9733. ) {
  9734. return mountComponent$1(this, el, hydrating)
  9735. };
  9736. lifecycleMixin$1(Vue);
  9737. internalMixin(Vue);
  9738. /* */
  9739. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  9740. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  9741. /***/ }),
  9742. /***/ 26:
  9743. /*!********************************************************************!*\
  9744. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/pages.json ***!
  9745. \********************************************************************/
  9746. /*! no static exports found */
  9747. /***/ (function(module, exports) {
  9748. /***/ }),
  9749. /***/ 3:
  9750. /*!***********************************!*\
  9751. !*** (webpack)/buildin/global.js ***!
  9752. \***********************************/
  9753. /*! no static exports found */
  9754. /***/ (function(module, exports) {
  9755. var g;
  9756. // This works in non-strict mode
  9757. g = (function() {
  9758. return this;
  9759. })();
  9760. try {
  9761. // This works if eval is allowed (see CSP)
  9762. g = g || new Function("return this")();
  9763. } catch (e) {
  9764. // This works if the window reference is available
  9765. if (typeof window === "object") g = window;
  9766. }
  9767. // g can still be undefined, but nothing to do about it...
  9768. // We return undefined, instead of nothing here, so it's
  9769. // easier to handle this case. if(!global) { ...}
  9770. module.exports = g;
  9771. /***/ }),
  9772. /***/ 32:
  9773. /*!**********************************************************************************************************!*\
  9774. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  9775. \**********************************************************************************************************/
  9776. /*! exports provided: default */
  9777. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9778. "use strict";
  9779. __webpack_require__.r(__webpack_exports__);
  9780. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  9781. /* globals __VUE_SSR_CONTEXT__ */
  9782. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  9783. // This module is a runtime utility for cleaner component module output and will
  9784. // be included in the final webpack user bundle.
  9785. function normalizeComponent (
  9786. scriptExports,
  9787. render,
  9788. staticRenderFns,
  9789. functionalTemplate,
  9790. injectStyles,
  9791. scopeId,
  9792. moduleIdentifier, /* server only */
  9793. shadowMode, /* vue-cli only */
  9794. components, // fixed by xxxxxx auto components
  9795. renderjs // fixed by xxxxxx renderjs
  9796. ) {
  9797. // Vue.extend constructor export interop
  9798. var options = typeof scriptExports === 'function'
  9799. ? scriptExports.options
  9800. : scriptExports
  9801. // fixed by xxxxxx auto components
  9802. if (components) {
  9803. if (!options.components) {
  9804. options.components = {}
  9805. }
  9806. var hasOwn = Object.prototype.hasOwnProperty
  9807. for (var name in components) {
  9808. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  9809. options.components[name] = components[name]
  9810. }
  9811. }
  9812. }
  9813. // fixed by xxxxxx renderjs
  9814. if (renderjs) {
  9815. if(typeof renderjs.beforeCreate === 'function'){
  9816. renderjs.beforeCreate = [renderjs.beforeCreate]
  9817. }
  9818. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  9819. this[renderjs.__module] = this
  9820. });
  9821. (options.mixins || (options.mixins = [])).push(renderjs)
  9822. }
  9823. // render functions
  9824. if (render) {
  9825. options.render = render
  9826. options.staticRenderFns = staticRenderFns
  9827. options._compiled = true
  9828. }
  9829. // functional template
  9830. if (functionalTemplate) {
  9831. options.functional = true
  9832. }
  9833. // scopedId
  9834. if (scopeId) {
  9835. options._scopeId = 'data-v-' + scopeId
  9836. }
  9837. var hook
  9838. if (moduleIdentifier) { // server build
  9839. hook = function (context) {
  9840. // 2.3 injection
  9841. context =
  9842. context || // cached call
  9843. (this.$vnode && this.$vnode.ssrContext) || // stateful
  9844. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  9845. // 2.2 with runInNewContext: true
  9846. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  9847. context = __VUE_SSR_CONTEXT__
  9848. }
  9849. // inject component styles
  9850. if (injectStyles) {
  9851. injectStyles.call(this, context)
  9852. }
  9853. // register component module identifier for async chunk inferrence
  9854. if (context && context._registeredComponents) {
  9855. context._registeredComponents.add(moduleIdentifier)
  9856. }
  9857. }
  9858. // used by ssr in case component is cached and beforeCreate
  9859. // never gets called
  9860. options._ssrRegister = hook
  9861. } else if (injectStyles) {
  9862. hook = shadowMode
  9863. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  9864. : injectStyles
  9865. }
  9866. if (hook) {
  9867. if (options.functional) {
  9868. // for template-only hot-reload because in that case the render fn doesn't
  9869. // go through the normalizer
  9870. options._injectStyles = hook
  9871. // register for functioal component in vue file
  9872. var originalRender = options.render
  9873. options.render = function renderWithStyleInjection (h, context) {
  9874. hook.call(context)
  9875. return originalRender(h, context)
  9876. }
  9877. } else {
  9878. // inject component registration as beforeCreate hook
  9879. var existing = options.beforeCreate
  9880. options.beforeCreate = existing
  9881. ? [].concat(existing, hook)
  9882. : [hook]
  9883. }
  9884. }
  9885. return {
  9886. exports: scriptExports,
  9887. options: options
  9888. }
  9889. }
  9890. /***/ }),
  9891. /***/ 33:
  9892. /*!**********************************************************************************!*\
  9893. !*** C:/Users/yuanyiming/Desktop/教研app/teaching-uniapp/uni.promisify.adaptor.js ***!
  9894. \**********************************************************************************/
  9895. /*! no static exports found */
  9896. /***/ (function(module, exports, __webpack_require__) {
  9897. /* WEBPACK VAR INJECTION */(function(uni) {var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  9898. uni.addInterceptor({
  9899. returnValue: function returnValue(res) {
  9900. if (!(!!res && (_typeof(res) === "object" || typeof res === "function") && typeof res.then === "function")) {
  9901. return res;
  9902. }
  9903. return new Promise(function (resolve, reject) {
  9904. res.then(function (res) {
  9905. return res[0] ? reject(res[0]) : resolve(res[1]);
  9906. });
  9907. });
  9908. }
  9909. });
  9910. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9911. /***/ }),
  9912. /***/ 4:
  9913. /*!**********************************************************************!*\
  9914. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  9915. \**********************************************************************/
  9916. /*! no static exports found */
  9917. /***/ (function(module, exports) {
  9918. function _interopRequireDefault(obj) {
  9919. return obj && obj.__esModule ? obj : {
  9920. "default": obj
  9921. };
  9922. }
  9923. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  9924. /***/ }),
  9925. /***/ 5:
  9926. /*!**************************************************************!*\
  9927. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  9928. \**************************************************************/
  9929. /*! no static exports found */
  9930. /***/ (function(module, exports, __webpack_require__) {
  9931. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  9932. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  9933. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  9934. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  9935. function _slicedToArray(arr, i) {
  9936. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  9937. }
  9938. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  9939. /***/ }),
  9940. /***/ 6:
  9941. /*!***************************************************************!*\
  9942. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  9943. \***************************************************************/
  9944. /*! no static exports found */
  9945. /***/ (function(module, exports) {
  9946. function _arrayWithHoles(arr) {
  9947. if (Array.isArray(arr)) return arr;
  9948. }
  9949. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  9950. /***/ }),
  9951. /***/ 7:
  9952. /*!*********************************************************************!*\
  9953. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  9954. \*********************************************************************/
  9955. /*! no static exports found */
  9956. /***/ (function(module, exports) {
  9957. function _iterableToArrayLimit(arr, i) {
  9958. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  9959. if (null != _i) {
  9960. var _s,
  9961. _e,
  9962. _x,
  9963. _r,
  9964. _arr = [],
  9965. _n = !0,
  9966. _d = !1;
  9967. try {
  9968. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  9969. if (Object(_i) !== _i) return;
  9970. _n = !1;
  9971. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  9972. ;
  9973. }
  9974. } catch (err) {
  9975. _d = !0, _e = err;
  9976. } finally {
  9977. try {
  9978. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  9979. } finally {
  9980. if (_d) throw _e;
  9981. }
  9982. }
  9983. return _arr;
  9984. }
  9985. }
  9986. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  9987. /***/ }),
  9988. /***/ 8:
  9989. /*!***************************************************************************!*\
  9990. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  9991. \***************************************************************************/
  9992. /*! no static exports found */
  9993. /***/ (function(module, exports, __webpack_require__) {
  9994. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  9995. function _unsupportedIterableToArray(o, minLen) {
  9996. if (!o) return;
  9997. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  9998. var n = Object.prototype.toString.call(o).slice(8, -1);
  9999. if (n === "Object" && o.constructor) n = o.constructor.name;
  10000. if (n === "Map" || n === "Set") return Array.from(o);
  10001. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  10002. }
  10003. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  10004. /***/ }),
  10005. /***/ 9:
  10006. /*!*****************************************************************!*\
  10007. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  10008. \*****************************************************************/
  10009. /*! no static exports found */
  10010. /***/ (function(module, exports) {
  10011. function _arrayLikeToArray(arr, len) {
  10012. if (len == null || len > arr.length) len = arr.length;
  10013. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  10014. arr2[i] = arr[i];
  10015. }
  10016. return arr2;
  10017. }
  10018. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  10019. /***/ })
  10020. }]);
  10021. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map