vendor.js 241 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!************************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  5. \************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}
  10. var _toString = Object.prototype.toString;
  11. var hasOwnProperty = Object.prototype.hasOwnProperty;
  12. function isFn(fn) {
  13. return typeof fn === 'function';
  14. }
  15. function isStr(str) {
  16. return typeof str === 'string';
  17. }
  18. function isPlainObject(obj) {
  19. return _toString.call(obj) === '[object Object]';
  20. }
  21. function hasOwn(obj, key) {
  22. return hasOwnProperty.call(obj, key);
  23. }
  24. function noop() {}
  25. /**
  26. * Create a cached version of a pure function.
  27. */
  28. function cached(fn) {
  29. var cache = Object.create(null);
  30. return function cachedFn(str) {
  31. var hit = cache[str];
  32. return hit || (cache[str] = fn(str));
  33. };
  34. }
  35. /**
  36. * Camelize a hyphen-delimited string.
  37. */
  38. var camelizeRE = /-(\w)/g;
  39. var camelize = cached(function (str) {
  40. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  41. });
  42. var HOOKS = [
  43. 'invoke',
  44. 'success',
  45. 'fail',
  46. 'complete',
  47. 'returnValue'];
  48. var globalInterceptors = {};
  49. var scopedInterceptors = {};
  50. function mergeHook(parentVal, childVal) {
  51. var res = childVal ?
  52. parentVal ?
  53. parentVal.concat(childVal) :
  54. Array.isArray(childVal) ?
  55. childVal : [childVal] :
  56. parentVal;
  57. return res ?
  58. dedupeHooks(res) :
  59. res;
  60. }
  61. function dedupeHooks(hooks) {
  62. var res = [];
  63. for (var i = 0; i < hooks.length; i++) {
  64. if (res.indexOf(hooks[i]) === -1) {
  65. res.push(hooks[i]);
  66. }
  67. }
  68. return res;
  69. }
  70. function removeHook(hooks, hook) {
  71. var index = hooks.indexOf(hook);
  72. if (index !== -1) {
  73. hooks.splice(index, 1);
  74. }
  75. }
  76. function mergeInterceptorHook(interceptor, option) {
  77. Object.keys(option).forEach(function (hook) {
  78. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  79. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  80. }
  81. });
  82. }
  83. function removeInterceptorHook(interceptor, option) {
  84. if (!interceptor || !option) {
  85. return;
  86. }
  87. Object.keys(option).forEach(function (hook) {
  88. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  89. removeHook(interceptor[hook], option[hook]);
  90. }
  91. });
  92. }
  93. function addInterceptor(method, option) {
  94. if (typeof method === 'string' && isPlainObject(option)) {
  95. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  96. } else if (isPlainObject(method)) {
  97. mergeInterceptorHook(globalInterceptors, method);
  98. }
  99. }
  100. function removeInterceptor(method, option) {
  101. if (typeof method === 'string') {
  102. if (isPlainObject(option)) {
  103. removeInterceptorHook(scopedInterceptors[method], option);
  104. } else {
  105. delete scopedInterceptors[method];
  106. }
  107. } else if (isPlainObject(method)) {
  108. removeInterceptorHook(globalInterceptors, method);
  109. }
  110. }
  111. function wrapperHook(hook) {
  112. return function (data) {
  113. return hook(data) || data;
  114. };
  115. }
  116. function isPromise(obj) {
  117. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  118. }
  119. function queue(hooks, data) {
  120. var promise = false;
  121. for (var i = 0; i < hooks.length; i++) {
  122. var hook = hooks[i];
  123. if (promise) {
  124. promise = Promise.resolve(wrapperHook(hook));
  125. } else {
  126. var res = hook(data);
  127. if (isPromise(res)) {
  128. promise = Promise.resolve(res);
  129. }
  130. if (res === false) {
  131. return {
  132. then: function then() {} };
  133. }
  134. }
  135. }
  136. return promise || {
  137. then: function then(callback) {
  138. return callback(data);
  139. } };
  140. }
  141. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  142. ['success', 'fail', 'complete'].forEach(function (name) {
  143. if (Array.isArray(interceptor[name])) {
  144. var oldCallback = options[name];
  145. options[name] = function callbackInterceptor(res) {
  146. queue(interceptor[name], res).then(function (res) {
  147. /* eslint-disable no-mixed-operators */
  148. return isFn(oldCallback) && oldCallback(res) || res;
  149. });
  150. };
  151. }
  152. });
  153. return options;
  154. }
  155. function wrapperReturnValue(method, returnValue) {
  156. var returnValueHooks = [];
  157. if (Array.isArray(globalInterceptors.returnValue)) {
  158. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  159. }
  160. var interceptor = scopedInterceptors[method];
  161. if (interceptor && Array.isArray(interceptor.returnValue)) {
  162. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  163. }
  164. returnValueHooks.forEach(function (hook) {
  165. returnValue = hook(returnValue) || returnValue;
  166. });
  167. return returnValue;
  168. }
  169. function getApiInterceptorHooks(method) {
  170. var interceptor = Object.create(null);
  171. Object.keys(globalInterceptors).forEach(function (hook) {
  172. if (hook !== 'returnValue') {
  173. interceptor[hook] = globalInterceptors[hook].slice();
  174. }
  175. });
  176. var scopedInterceptor = scopedInterceptors[method];
  177. if (scopedInterceptor) {
  178. Object.keys(scopedInterceptor).forEach(function (hook) {
  179. if (hook !== 'returnValue') {
  180. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  181. }
  182. });
  183. }
  184. return interceptor;
  185. }
  186. function invokeApi(method, api, options) {for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {params[_key - 3] = arguments[_key];}
  187. var interceptor = getApiInterceptorHooks(method);
  188. if (interceptor && Object.keys(interceptor).length) {
  189. if (Array.isArray(interceptor.invoke)) {
  190. var res = queue(interceptor.invoke, options);
  191. return res.then(function (options) {
  192. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  193. });
  194. } else {
  195. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  196. }
  197. }
  198. return api.apply(void 0, [options].concat(params));
  199. }
  200. var promiseInterceptor = {
  201. returnValue: function returnValue(res) {
  202. if (!isPromise(res)) {
  203. return res;
  204. }
  205. return res.then(function (res) {
  206. return res[1];
  207. }).catch(function (res) {
  208. return res[0];
  209. });
  210. } };
  211. var SYNC_API_RE =
  212. /^\$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/;
  213. var CONTEXT_API_RE = /^create|Manager$/;
  214. // Context例外情况
  215. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  216. // 同步例外情况
  217. var ASYNC_API = ['createBLEConnection'];
  218. var CALLBACK_API_RE = /^on|^off/;
  219. function isContextApi(name) {
  220. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  221. }
  222. function isSyncApi(name) {
  223. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  224. }
  225. function isCallbackApi(name) {
  226. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  227. }
  228. function handlePromise(promise) {
  229. return promise.then(function (data) {
  230. return [null, data];
  231. }).
  232. catch(function (err) {return [err];});
  233. }
  234. function shouldPromise(name) {
  235. if (
  236. isContextApi(name) ||
  237. isSyncApi(name) ||
  238. isCallbackApi(name))
  239. {
  240. return false;
  241. }
  242. return true;
  243. }
  244. /* eslint-disable no-extend-native */
  245. if (!Promise.prototype.finally) {
  246. Promise.prototype.finally = function (callback) {
  247. var promise = this.constructor;
  248. return this.then(
  249. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  250. function (reason) {return promise.resolve(callback()).then(function () {
  251. throw reason;
  252. });});
  253. };
  254. }
  255. function promisify(name, api) {
  256. if (!shouldPromise(name)) {
  257. return api;
  258. }
  259. return function promiseApi() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {params[_key2 - 1] = arguments[_key2];}
  260. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  261. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  262. }
  263. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  264. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  265. success: resolve,
  266. fail: reject })].concat(
  267. params));
  268. })));
  269. };
  270. }
  271. var EPS = 1e-4;
  272. var BASE_DEVICE_WIDTH = 750;
  273. var isIOS = false;
  274. var deviceWidth = 0;
  275. var deviceDPR = 0;
  276. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  277. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  278. deviceWidth = windowWidth;
  279. deviceDPR = pixelRatio;
  280. isIOS = platform === 'ios';
  281. }
  282. function upx2px(number, newDeviceWidth) {
  283. if (deviceWidth === 0) {
  284. checkDeviceWidth();
  285. }
  286. number = Number(number);
  287. if (number === 0) {
  288. return 0;
  289. }
  290. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  291. if (result < 0) {
  292. result = -result;
  293. }
  294. result = Math.floor(result + EPS);
  295. if (result === 0) {
  296. if (deviceDPR === 1 || !isIOS) {
  297. result = 1;
  298. } else {
  299. result = 0.5;
  300. }
  301. }
  302. return number < 0 ? -result : result;
  303. }
  304. var interceptors = {
  305. promiseInterceptor: promiseInterceptor };
  306. var baseApi = /*#__PURE__*/Object.freeze({
  307. __proto__: null,
  308. upx2px: upx2px,
  309. addInterceptor: addInterceptor,
  310. removeInterceptor: removeInterceptor,
  311. interceptors: interceptors });var
  312. EventChannel = /*#__PURE__*/function () {
  313. function EventChannel(id, events) {var _this = this;_classCallCheck(this, EventChannel);
  314. this.id = id;
  315. this.listener = {};
  316. this.emitCache = {};
  317. if (events) {
  318. Object.keys(events).forEach(function (name) {
  319. _this.on(name, events[name]);
  320. });
  321. }
  322. }_createClass(EventChannel, [{ key: "emit", value: function emit(
  323. eventName) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  324. var fns = this.listener[eventName];
  325. if (!fns) {
  326. return (this.emitCache[eventName] || (this.emitCache[eventName] = [])).push(args);
  327. }
  328. fns.forEach(function (opt) {
  329. opt.fn.apply(opt.fn, args);
  330. });
  331. this.listener[eventName] = fns.filter(function (opt) {return opt.type !== 'once';});
  332. } }, { key: "on", value: function on(
  333. eventName, fn) {
  334. this._addListener(eventName, 'on', fn);
  335. this._clearCache(eventName);
  336. } }, { key: "once", value: function once(
  337. eventName, fn) {
  338. this._addListener(eventName, 'once', fn);
  339. this._clearCache(eventName);
  340. } }, { key: "off", value: function off(
  341. eventName, fn) {
  342. var fns = this.listener[eventName];
  343. if (!fns) {
  344. return;
  345. }
  346. if (fn) {
  347. for (var i = 0; i < fns.length;) {
  348. if (fns[i].fn === fn) {
  349. fns.splice(i, 1);
  350. i--;
  351. }
  352. i++;
  353. }
  354. } else {
  355. delete this.listener[eventName];
  356. }
  357. } }, { key: "_clearCache", value: function _clearCache(
  358. eventName) {
  359. var cacheArgs = this.emitCache[eventName];
  360. if (cacheArgs) {
  361. for (; cacheArgs.length > 0;) {
  362. this.emit.apply(this, [eventName].concat(cacheArgs.shift()));
  363. }
  364. }
  365. } }, { key: "_addListener", value: function _addListener(
  366. eventName, type, fn) {
  367. (this.listener[eventName] || (this.listener[eventName] = [])).push({
  368. fn: fn,
  369. type: type });
  370. } }]);return EventChannel;}();
  371. var eventChannels = {};
  372. var eventChannelStack = [];
  373. var id = 0;
  374. function initEventChannel(events) {var cache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  375. id++;
  376. var eventChannel = new EventChannel(id, events);
  377. if (cache) {
  378. eventChannels[id] = eventChannel;
  379. eventChannelStack.push(eventChannel);
  380. }
  381. return eventChannel;
  382. }
  383. function getEventChannel(id) {
  384. if (id) {
  385. var eventChannel = eventChannels[id];
  386. delete eventChannels[id];
  387. return eventChannel;
  388. }
  389. return eventChannelStack.shift();
  390. }
  391. var navigateTo = {
  392. args: function args(fromArgs, toArgs) {
  393. var id = initEventChannel(fromArgs.events).id;
  394. if (fromArgs.url) {
  395. fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + id;
  396. }
  397. },
  398. returnValue: function returnValue(fromRes, toRes) {
  399. fromRes.eventChannel = getEventChannel();
  400. } };
  401. function findExistsPageIndex(url) {
  402. var pages = getCurrentPages();
  403. var len = pages.length;
  404. while (len--) {
  405. var page = pages[len];
  406. if (page.$page && page.$page.fullPath === url) {
  407. return len;
  408. }
  409. }
  410. return -1;
  411. }
  412. var redirectTo = {
  413. name: function name(fromArgs) {
  414. if (fromArgs.exists === 'back' && fromArgs.delta) {
  415. return 'navigateBack';
  416. }
  417. return 'redirectTo';
  418. },
  419. args: function args(fromArgs) {
  420. if (fromArgs.exists === 'back' && fromArgs.url) {
  421. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  422. if (existsPageIndex !== -1) {
  423. var delta = getCurrentPages().length - 1 - existsPageIndex;
  424. if (delta > 0) {
  425. fromArgs.delta = delta;
  426. }
  427. }
  428. }
  429. } };
  430. var previewImage = {
  431. args: function args(fromArgs) {
  432. var currentIndex = parseInt(fromArgs.current);
  433. if (isNaN(currentIndex)) {
  434. return;
  435. }
  436. var urls = fromArgs.urls;
  437. if (!Array.isArray(urls)) {
  438. return;
  439. }
  440. var len = urls.length;
  441. if (!len) {
  442. return;
  443. }
  444. if (currentIndex < 0) {
  445. currentIndex = 0;
  446. } else if (currentIndex >= len) {
  447. currentIndex = len - 1;
  448. }
  449. if (currentIndex > 0) {
  450. fromArgs.current = urls[currentIndex];
  451. fromArgs.urls = urls.filter(
  452. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  453. } else {
  454. fromArgs.current = urls[0];
  455. }
  456. return {
  457. indicator: false,
  458. loop: false };
  459. } };
  460. function addSafeAreaInsets(result) {
  461. if (result.safeArea) {
  462. var safeArea = result.safeArea;
  463. result.safeAreaInsets = {
  464. top: safeArea.top,
  465. left: safeArea.left,
  466. right: result.windowWidth - safeArea.right,
  467. bottom: result.windowHeight - safeArea.bottom };
  468. }
  469. }
  470. var protocols = {
  471. redirectTo: redirectTo,
  472. navigateTo: navigateTo,
  473. previewImage: previewImage,
  474. getSystemInfo: {
  475. returnValue: addSafeAreaInsets },
  476. getSystemInfoSync: {
  477. returnValue: addSafeAreaInsets } };
  478. var todos = [
  479. 'vibrate',
  480. 'preloadPage',
  481. 'unPreloadPage',
  482. 'loadSubPackage'];
  483. var canIUses = [];
  484. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  485. function processCallback(methodName, method, returnValue) {
  486. return function (res) {
  487. return method(processReturnValue(methodName, res, returnValue));
  488. };
  489. }
  490. function processArgs(methodName, fromArgs) {var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  491. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  492. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  493. if (isFn(argsOption)) {
  494. argsOption = argsOption(fromArgs, toArgs) || {};
  495. }
  496. for (var key in fromArgs) {
  497. if (hasOwn(argsOption, key)) {
  498. var keyOption = argsOption[key];
  499. if (isFn(keyOption)) {
  500. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  501. }
  502. if (!keyOption) {// 不支持的参数
  503. console.warn("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F ".concat(methodName, "\u6682\u4E0D\u652F\u6301").concat(key));
  504. } else if (isStr(keyOption)) {// 重写参数 key
  505. toArgs[keyOption] = fromArgs[key];
  506. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  507. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  508. }
  509. } else if (CALLBACKS.indexOf(key) !== -1) {
  510. if (isFn(fromArgs[key])) {
  511. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  512. }
  513. } else {
  514. if (!keepFromArgs) {
  515. toArgs[key] = fromArgs[key];
  516. }
  517. }
  518. }
  519. return toArgs;
  520. } else if (isFn(fromArgs)) {
  521. fromArgs = processCallback(methodName, fromArgs, returnValue);
  522. }
  523. return fromArgs;
  524. }
  525. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  526. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  527. res = protocols.returnValue(methodName, res);
  528. }
  529. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  530. }
  531. function wrapper(methodName, method) {
  532. if (hasOwn(protocols, methodName)) {
  533. var protocol = protocols[methodName];
  534. if (!protocol) {// 暂不支持的 api
  535. return function () {
  536. console.error("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F \u6682\u4E0D\u652F\u6301".concat(methodName));
  537. };
  538. }
  539. return function (arg1, arg2) {// 目前 api 最多两个参数
  540. var options = protocol;
  541. if (isFn(protocol)) {
  542. options = protocol(arg1);
  543. }
  544. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  545. var args = [arg1];
  546. if (typeof arg2 !== 'undefined') {
  547. args.push(arg2);
  548. }
  549. if (isFn(options.name)) {
  550. methodName = options.name(arg1);
  551. } else if (isStr(options.name)) {
  552. methodName = options.name;
  553. }
  554. var returnValue = wx[methodName].apply(wx, args);
  555. if (isSyncApi(methodName)) {// 同步 api
  556. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  557. }
  558. return returnValue;
  559. };
  560. }
  561. return method;
  562. }
  563. var todoApis = Object.create(null);
  564. var TODOS = [
  565. 'onTabBarMidButtonTap',
  566. 'subscribePush',
  567. 'unsubscribePush',
  568. 'onPush',
  569. 'offPush',
  570. 'share'];
  571. function createTodoApi(name) {
  572. return function todoApi(_ref)
  573. {var fail = _ref.fail,complete = _ref.complete;
  574. var res = {
  575. errMsg: "".concat(name, ":fail:\u6682\u4E0D\u652F\u6301 ").concat(name, " \u65B9\u6CD5") };
  576. isFn(fail) && fail(res);
  577. isFn(complete) && complete(res);
  578. };
  579. }
  580. TODOS.forEach(function (name) {
  581. todoApis[name] = createTodoApi(name);
  582. });
  583. var providers = {
  584. oauth: ['weixin'],
  585. share: ['weixin'],
  586. payment: ['wxpay'],
  587. push: ['weixin'] };
  588. function getProvider(_ref2)
  589. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  590. var res = false;
  591. if (providers[service]) {
  592. res = {
  593. errMsg: 'getProvider:ok',
  594. service: service,
  595. provider: providers[service] };
  596. isFn(success) && success(res);
  597. } else {
  598. res = {
  599. errMsg: 'getProvider:fail:服务[' + service + ']不存在' };
  600. isFn(fail) && fail(res);
  601. }
  602. isFn(complete) && complete(res);
  603. }
  604. var extraApi = /*#__PURE__*/Object.freeze({
  605. __proto__: null,
  606. getProvider: getProvider });
  607. var getEmitter = function () {
  608. var Emitter;
  609. return function getUniEmitter() {
  610. if (!Emitter) {
  611. Emitter = new _vue.default();
  612. }
  613. return Emitter;
  614. };
  615. }();
  616. function apply(ctx, method, args) {
  617. return ctx[method].apply(ctx, args);
  618. }
  619. function $on() {
  620. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  621. }
  622. function $off() {
  623. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  624. }
  625. function $once() {
  626. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  627. }
  628. function $emit() {
  629. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  630. }
  631. var eventApi = /*#__PURE__*/Object.freeze({
  632. __proto__: null,
  633. $on: $on,
  634. $off: $off,
  635. $once: $once,
  636. $emit: $emit });
  637. var api = /*#__PURE__*/Object.freeze({
  638. __proto__: null });
  639. var MPPage = Page;
  640. var MPComponent = Component;
  641. var customizeRE = /:/g;
  642. var customize = cached(function (str) {
  643. return camelize(str.replace(customizeRE, '-'));
  644. });
  645. function initTriggerEvent(mpInstance) {
  646. {
  647. if (!wx.canIUse('nextTick')) {
  648. return;
  649. }
  650. }
  651. var oldTriggerEvent = mpInstance.triggerEvent;
  652. mpInstance.triggerEvent = function (event) {for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {args[_key4 - 1] = arguments[_key4];}
  653. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  654. };
  655. }
  656. function initHook(name, options) {
  657. var oldHook = options[name];
  658. if (!oldHook) {
  659. options[name] = function () {
  660. initTriggerEvent(this);
  661. };
  662. } else {
  663. options[name] = function () {
  664. initTriggerEvent(this);for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {args[_key5] = arguments[_key5];}
  665. return oldHook.apply(this, args);
  666. };
  667. }
  668. }
  669. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  670. initHook('onLoad', options);
  671. return MPPage(options);
  672. };
  673. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  674. initHook('created', options);
  675. return MPComponent(options);
  676. };
  677. var PAGE_EVENT_HOOKS = [
  678. 'onPullDownRefresh',
  679. 'onReachBottom',
  680. 'onAddToFavorites',
  681. 'onShareTimeline',
  682. 'onShareAppMessage',
  683. 'onPageScroll',
  684. 'onResize',
  685. 'onTabItemTap'];
  686. function initMocks(vm, mocks) {
  687. var mpInstance = vm.$mp[vm.mpType];
  688. mocks.forEach(function (mock) {
  689. if (hasOwn(mpInstance, mock)) {
  690. vm[mock] = mpInstance[mock];
  691. }
  692. });
  693. }
  694. function hasHook(hook, vueOptions) {
  695. if (!vueOptions) {
  696. return true;
  697. }
  698. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  699. return true;
  700. }
  701. vueOptions = vueOptions.default || vueOptions;
  702. if (isFn(vueOptions)) {
  703. if (isFn(vueOptions.extendOptions[hook])) {
  704. return true;
  705. }
  706. if (vueOptions.super &&
  707. vueOptions.super.options &&
  708. Array.isArray(vueOptions.super.options[hook])) {
  709. return true;
  710. }
  711. return false;
  712. }
  713. if (isFn(vueOptions[hook])) {
  714. return true;
  715. }
  716. var mixins = vueOptions.mixins;
  717. if (Array.isArray(mixins)) {
  718. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  719. }
  720. }
  721. function initHooks(mpOptions, hooks, vueOptions) {
  722. hooks.forEach(function (hook) {
  723. if (hasHook(hook, vueOptions)) {
  724. mpOptions[hook] = function (args) {
  725. return this.$vm && this.$vm.__call_hook(hook, args);
  726. };
  727. }
  728. });
  729. }
  730. function initVueComponent(Vue, vueOptions) {
  731. vueOptions = vueOptions.default || vueOptions;
  732. var VueComponent;
  733. if (isFn(vueOptions)) {
  734. VueComponent = vueOptions;
  735. } else {
  736. VueComponent = Vue.extend(vueOptions);
  737. }
  738. vueOptions = VueComponent.options;
  739. return [VueComponent, vueOptions];
  740. }
  741. function initSlots(vm, vueSlots) {
  742. if (Array.isArray(vueSlots) && vueSlots.length) {
  743. var $slots = Object.create(null);
  744. vueSlots.forEach(function (slotName) {
  745. $slots[slotName] = true;
  746. });
  747. vm.$scopedSlots = vm.$slots = $slots;
  748. }
  749. }
  750. function initVueIds(vueIds, mpInstance) {
  751. vueIds = (vueIds || '').split(',');
  752. var len = vueIds.length;
  753. if (len === 1) {
  754. mpInstance._$vueId = vueIds[0];
  755. } else if (len === 2) {
  756. mpInstance._$vueId = vueIds[0];
  757. mpInstance._$vuePid = vueIds[1];
  758. }
  759. }
  760. function initData(vueOptions, context) {
  761. var data = vueOptions.data || {};
  762. var methods = vueOptions.methods || {};
  763. if (typeof data === 'function') {
  764. try {
  765. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  766. } catch (e) {
  767. if (Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  768. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  769. }
  770. }
  771. } else {
  772. try {
  773. // 对 data 格式化
  774. data = JSON.parse(JSON.stringify(data));
  775. } catch (e) {}
  776. }
  777. if (!isPlainObject(data)) {
  778. data = {};
  779. }
  780. Object.keys(methods).forEach(function (methodName) {
  781. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  782. data[methodName] = methods[methodName];
  783. }
  784. });
  785. return data;
  786. }
  787. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  788. function createObserver(name) {
  789. return function observer(newVal, oldVal) {
  790. if (this.$vm) {
  791. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  792. }
  793. };
  794. }
  795. function initBehaviors(vueOptions, initBehavior) {
  796. var vueBehaviors = vueOptions.behaviors;
  797. var vueExtends = vueOptions.extends;
  798. var vueMixins = vueOptions.mixins;
  799. var vueProps = vueOptions.props;
  800. if (!vueProps) {
  801. vueOptions.props = vueProps = [];
  802. }
  803. var behaviors = [];
  804. if (Array.isArray(vueBehaviors)) {
  805. vueBehaviors.forEach(function (behavior) {
  806. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  807. if (behavior === 'uni://form-field') {
  808. if (Array.isArray(vueProps)) {
  809. vueProps.push('name');
  810. vueProps.push('value');
  811. } else {
  812. vueProps.name = {
  813. type: String,
  814. default: '' };
  815. vueProps.value = {
  816. type: [String, Number, Boolean, Array, Object, Date],
  817. default: '' };
  818. }
  819. }
  820. });
  821. }
  822. if (isPlainObject(vueExtends) && vueExtends.props) {
  823. behaviors.push(
  824. initBehavior({
  825. properties: initProperties(vueExtends.props, true) }));
  826. }
  827. if (Array.isArray(vueMixins)) {
  828. vueMixins.forEach(function (vueMixin) {
  829. if (isPlainObject(vueMixin) && vueMixin.props) {
  830. behaviors.push(
  831. initBehavior({
  832. properties: initProperties(vueMixin.props, true) }));
  833. }
  834. });
  835. }
  836. return behaviors;
  837. }
  838. function parsePropType(key, type, defaultValue, file) {
  839. // [String]=>String
  840. if (Array.isArray(type) && type.length === 1) {
  841. return type[0];
  842. }
  843. return type;
  844. }
  845. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  846. var properties = {};
  847. if (!isBehavior) {
  848. properties.vueId = {
  849. type: String,
  850. value: '' };
  851. // 用于字节跳动小程序模拟抽象节点
  852. properties.generic = {
  853. type: Object,
  854. value: null };
  855. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  856. type: null,
  857. value: [],
  858. observer: function observer(newVal, oldVal) {
  859. var $slots = Object.create(null);
  860. newVal.forEach(function (slotName) {
  861. $slots[slotName] = true;
  862. });
  863. this.setData({
  864. $slots: $slots });
  865. } };
  866. }
  867. if (Array.isArray(props)) {// ['title']
  868. props.forEach(function (key) {
  869. properties[key] = {
  870. type: null,
  871. observer: createObserver(key) };
  872. });
  873. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  874. Object.keys(props).forEach(function (key) {
  875. var opts = props[key];
  876. if (isPlainObject(opts)) {// title:{type:String,default:''}
  877. var value = opts.default;
  878. if (isFn(value)) {
  879. value = value();
  880. }
  881. opts.type = parsePropType(key, opts.type);
  882. properties[key] = {
  883. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  884. value: value,
  885. observer: createObserver(key) };
  886. } else {// content:String
  887. var type = parsePropType(key, opts);
  888. properties[key] = {
  889. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  890. observer: createObserver(key) };
  891. }
  892. });
  893. }
  894. return properties;
  895. }
  896. function wrapper$1(event) {
  897. // TODO 又得兼容 mpvue 的 mp 对象
  898. try {
  899. event.mp = JSON.parse(JSON.stringify(event));
  900. } catch (e) {}
  901. event.stopPropagation = noop;
  902. event.preventDefault = noop;
  903. event.target = event.target || {};
  904. if (!hasOwn(event, 'detail')) {
  905. event.detail = {};
  906. }
  907. if (hasOwn(event, 'markerId')) {
  908. event.detail = typeof event.detail === 'object' ? event.detail : {};
  909. event.detail.markerId = event.markerId;
  910. }
  911. if (isPlainObject(event.detail)) {
  912. event.target = Object.assign({}, event.target, event.detail);
  913. }
  914. return event;
  915. }
  916. function getExtraValue(vm, dataPathsArray) {
  917. var context = vm;
  918. dataPathsArray.forEach(function (dataPathArray) {
  919. var dataPath = dataPathArray[0];
  920. var value = dataPathArray[2];
  921. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  922. var propPath = dataPathArray[1];
  923. var valuePath = dataPathArray[3];
  924. var vFor;
  925. if (Number.isInteger(dataPath)) {
  926. vFor = dataPath;
  927. } else if (!dataPath) {
  928. vFor = context;
  929. } else if (typeof dataPath === 'string' && dataPath) {
  930. if (dataPath.indexOf('#s#') === 0) {
  931. vFor = dataPath.substr(3);
  932. } else {
  933. vFor = vm.__get_value(dataPath, context);
  934. }
  935. }
  936. if (Number.isInteger(vFor)) {
  937. context = value;
  938. } else if (!propPath) {
  939. context = vFor[value];
  940. } else {
  941. if (Array.isArray(vFor)) {
  942. context = vFor.find(function (vForItem) {
  943. return vm.__get_value(propPath, vForItem) === value;
  944. });
  945. } else if (isPlainObject(vFor)) {
  946. context = Object.keys(vFor).find(function (vForKey) {
  947. return vm.__get_value(propPath, vFor[vForKey]) === value;
  948. });
  949. } else {
  950. console.error('v-for 暂不支持循环数据:', vFor);
  951. }
  952. }
  953. if (valuePath) {
  954. context = vm.__get_value(valuePath, context);
  955. }
  956. }
  957. });
  958. return context;
  959. }
  960. function processEventExtra(vm, extra, event) {
  961. var extraObj = {};
  962. if (Array.isArray(extra) && extra.length) {
  963. /**
  964. *[
  965. * ['data.items', 'data.id', item.data.id],
  966. * ['metas', 'id', meta.id]
  967. *],
  968. *[
  969. * ['data.items', 'data.id', item.data.id],
  970. * ['metas', 'id', meta.id]
  971. *],
  972. *'test'
  973. */
  974. extra.forEach(function (dataPath, index) {
  975. if (typeof dataPath === 'string') {
  976. if (!dataPath) {// model,prop.sync
  977. extraObj['$' + index] = vm;
  978. } else {
  979. if (dataPath === '$event') {// $event
  980. extraObj['$' + index] = event;
  981. } else if (dataPath === 'arguments') {
  982. if (event.detail && event.detail.__args__) {
  983. extraObj['$' + index] = event.detail.__args__;
  984. } else {
  985. extraObj['$' + index] = [event];
  986. }
  987. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  988. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  989. } else {
  990. extraObj['$' + index] = vm.__get_value(dataPath);
  991. }
  992. }
  993. } else {
  994. extraObj['$' + index] = getExtraValue(vm, dataPath);
  995. }
  996. });
  997. }
  998. return extraObj;
  999. }
  1000. function getObjByArray(arr) {
  1001. var obj = {};
  1002. for (var i = 1; i < arr.length; i++) {
  1003. var element = arr[i];
  1004. obj[element[0]] = element[1];
  1005. }
  1006. return obj;
  1007. }
  1008. function processEventArgs(vm, event) {var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];var isCustom = arguments.length > 4 ? arguments[4] : undefined;var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1009. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1010. if (isCustom) {// 自定义事件
  1011. isCustomMPEvent = event.currentTarget &&
  1012. event.currentTarget.dataset &&
  1013. event.currentTarget.dataset.comType === 'wx';
  1014. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  1015. if (isCustomMPEvent) {
  1016. return [event];
  1017. }
  1018. return event.detail.__args__ || event.detail;
  1019. }
  1020. }
  1021. var extraObj = processEventExtra(vm, extra, event);
  1022. var ret = [];
  1023. args.forEach(function (arg) {
  1024. if (arg === '$event') {
  1025. if (methodName === '__set_model' && !isCustom) {// input v-model value
  1026. ret.push(event.target.value);
  1027. } else {
  1028. if (isCustom && !isCustomMPEvent) {
  1029. ret.push(event.detail.__args__[0]);
  1030. } else {// wxcomponent 组件或内置组件
  1031. ret.push(event);
  1032. }
  1033. }
  1034. } else {
  1035. if (Array.isArray(arg) && arg[0] === 'o') {
  1036. ret.push(getObjByArray(arg));
  1037. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1038. ret.push(extraObj[arg]);
  1039. } else {
  1040. ret.push(arg);
  1041. }
  1042. }
  1043. });
  1044. return ret;
  1045. }
  1046. var ONCE = '~';
  1047. var CUSTOM = '^';
  1048. function isMatchEventType(eventType, optType) {
  1049. return eventType === optType ||
  1050. optType === 'regionchange' && (
  1051. eventType === 'begin' ||
  1052. eventType === 'end');
  1053. }
  1054. function getContextVm(vm) {
  1055. var $parent = vm.$parent;
  1056. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1057. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1058. $parent = $parent.$parent;
  1059. }
  1060. return $parent && $parent.$parent;
  1061. }
  1062. function handleEvent(event) {var _this2 = this;
  1063. event = wrapper$1(event);
  1064. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1065. var dataset = (event.currentTarget || event.target).dataset;
  1066. if (!dataset) {
  1067. return console.warn('事件信息不存在');
  1068. }
  1069. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1070. if (!eventOpts) {
  1071. return console.warn('事件信息不存在');
  1072. }
  1073. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1074. var eventType = event.type;
  1075. var ret = [];
  1076. eventOpts.forEach(function (eventOpt) {
  1077. var type = eventOpt[0];
  1078. var eventsArray = eventOpt[1];
  1079. var isCustom = type.charAt(0) === CUSTOM;
  1080. type = isCustom ? type.slice(1) : type;
  1081. var isOnce = type.charAt(0) === ONCE;
  1082. type = isOnce ? type.slice(1) : type;
  1083. if (eventsArray && isMatchEventType(eventType, type)) {
  1084. eventsArray.forEach(function (eventArray) {
  1085. var methodName = eventArray[0];
  1086. if (methodName) {
  1087. var handlerCtx = _this2.$vm;
  1088. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1089. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1090. }
  1091. if (methodName === '$emit') {
  1092. handlerCtx.$emit.apply(handlerCtx,
  1093. processEventArgs(
  1094. _this2.$vm,
  1095. event,
  1096. eventArray[1],
  1097. eventArray[2],
  1098. isCustom,
  1099. methodName));
  1100. return;
  1101. }
  1102. var handler = handlerCtx[methodName];
  1103. if (!isFn(handler)) {
  1104. throw new Error(" _vm.".concat(methodName, " is not a function"));
  1105. }
  1106. if (isOnce) {
  1107. if (handler.once) {
  1108. return;
  1109. }
  1110. handler.once = true;
  1111. }
  1112. var params = processEventArgs(
  1113. _this2.$vm,
  1114. event,
  1115. eventArray[1],
  1116. eventArray[2],
  1117. isCustom,
  1118. methodName);
  1119. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1120. // eslint-disable-next-line no-sparse-arrays
  1121. ret.push(handler.apply(handlerCtx, (Array.isArray(params) ? params : []).concat([,,,,,,,,,, event])));
  1122. }
  1123. });
  1124. }
  1125. });
  1126. if (
  1127. eventType === 'input' &&
  1128. ret.length === 1 &&
  1129. typeof ret[0] !== 'undefined')
  1130. {
  1131. return ret[0];
  1132. }
  1133. }
  1134. var hooks = [
  1135. 'onShow',
  1136. 'onHide',
  1137. 'onError',
  1138. 'onPageNotFound',
  1139. 'onThemeChange',
  1140. 'onUnhandledRejection'];
  1141. function parseBaseApp(vm, _ref3)
  1142. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  1143. if (vm.$options.store) {
  1144. _vue.default.prototype.$store = vm.$options.store;
  1145. }
  1146. _vue.default.prototype.mpHost = "mp-weixin";
  1147. _vue.default.mixin({
  1148. beforeCreate: function beforeCreate() {
  1149. if (!this.$options.mpType) {
  1150. return;
  1151. }
  1152. this.mpType = this.$options.mpType;
  1153. this.$mp = _defineProperty({
  1154. data: {} },
  1155. this.mpType, this.$options.mpInstance);
  1156. this.$scope = this.$options.mpInstance;
  1157. delete this.$options.mpType;
  1158. delete this.$options.mpInstance;
  1159. if (this.mpType !== 'app') {
  1160. initRefs(this);
  1161. initMocks(this, mocks);
  1162. }
  1163. } });
  1164. var appOptions = {
  1165. onLaunch: function onLaunch(args) {
  1166. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1167. return;
  1168. }
  1169. {
  1170. if (!wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1171. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1172. }
  1173. }
  1174. this.$vm = vm;
  1175. this.$vm.$mp = {
  1176. app: this };
  1177. this.$vm.$scope = this;
  1178. // vm 上也挂载 globalData
  1179. this.$vm.globalData = this.globalData;
  1180. this.$vm._isMounted = true;
  1181. this.$vm.__call_hook('mounted', args);
  1182. this.$vm.__call_hook('onLaunch', args);
  1183. } };
  1184. // 兼容旧版本 globalData
  1185. appOptions.globalData = vm.$options.globalData || {};
  1186. // 将 methods 中的方法挂在 getApp() 中
  1187. var methods = vm.$options.methods;
  1188. if (methods) {
  1189. Object.keys(methods).forEach(function (name) {
  1190. appOptions[name] = methods[name];
  1191. });
  1192. }
  1193. initHooks(appOptions, hooks);
  1194. return appOptions;
  1195. }
  1196. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1197. function findVmByVueId(vm, vuePid) {
  1198. var $children = vm.$children;
  1199. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1200. for (var i = $children.length - 1; i >= 0; i--) {
  1201. var childVm = $children[i];
  1202. if (childVm.$scope._$vueId === vuePid) {
  1203. return childVm;
  1204. }
  1205. }
  1206. // 反向递归查找
  1207. var parentVm;
  1208. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1209. parentVm = findVmByVueId($children[_i], vuePid);
  1210. if (parentVm) {
  1211. return parentVm;
  1212. }
  1213. }
  1214. }
  1215. function initBehavior(options) {
  1216. return Behavior(options);
  1217. }
  1218. function isPage() {
  1219. return !!this.route;
  1220. }
  1221. function initRelation(detail) {
  1222. this.triggerEvent('__l', detail);
  1223. }
  1224. function initRefs(vm) {
  1225. var mpInstance = vm.$scope;
  1226. Object.defineProperty(vm, '$refs', {
  1227. get: function get() {
  1228. var $refs = {};
  1229. var components = mpInstance.selectAllComponents('.vue-ref');
  1230. components.forEach(function (component) {
  1231. var ref = component.dataset.ref;
  1232. $refs[ref] = component.$vm || component;
  1233. });
  1234. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1235. forComponents.forEach(function (component) {
  1236. var ref = component.dataset.ref;
  1237. if (!$refs[ref]) {
  1238. $refs[ref] = [];
  1239. }
  1240. $refs[ref].push(component.$vm || component);
  1241. });
  1242. return $refs;
  1243. } });
  1244. }
  1245. function handleLink(event) {var _ref4 =
  1246. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1247. var parentVm;
  1248. if (vuePid) {
  1249. parentVm = findVmByVueId(this.$vm, vuePid);
  1250. }
  1251. if (!parentVm) {
  1252. parentVm = this.$vm;
  1253. }
  1254. vueOptions.parent = parentVm;
  1255. }
  1256. function parseApp(vm) {
  1257. return parseBaseApp(vm, {
  1258. mocks: mocks,
  1259. initRefs: initRefs });
  1260. }
  1261. function createApp(vm) {
  1262. _vue.default.prototype.getOpenerEventChannel = function () {
  1263. if (!this.__eventChannel__) {
  1264. this.__eventChannel__ = new EventChannel();
  1265. }
  1266. return this.__eventChannel__;
  1267. };
  1268. var callHook = _vue.default.prototype.__call_hook;
  1269. _vue.default.prototype.__call_hook = function (hook, args) {
  1270. if (hook === 'onLoad' && args && args.__id__) {
  1271. this.__eventChannel__ = getEventChannel(args.__id__);
  1272. delete args.__id__;
  1273. }
  1274. return callHook.call(this, hook, args);
  1275. };
  1276. App(parseApp(vm));
  1277. return vm;
  1278. }
  1279. var encodeReserveRE = /[!'()*]/g;
  1280. var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);};
  1281. var commaRE = /%2C/g;
  1282. // fixed encodeURIComponent which is more conformant to RFC3986:
  1283. // - escapes [!'()*]
  1284. // - preserve commas
  1285. var encode = function encode(str) {return encodeURIComponent(str).
  1286. replace(encodeReserveRE, encodeReserveReplacer).
  1287. replace(commaRE, ',');};
  1288. function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  1289. var res = obj ? Object.keys(obj).map(function (key) {
  1290. var val = obj[key];
  1291. if (val === undefined) {
  1292. return '';
  1293. }
  1294. if (val === null) {
  1295. return encodeStr(key);
  1296. }
  1297. if (Array.isArray(val)) {
  1298. var result = [];
  1299. val.forEach(function (val2) {
  1300. if (val2 === undefined) {
  1301. return;
  1302. }
  1303. if (val2 === null) {
  1304. result.push(encodeStr(key));
  1305. } else {
  1306. result.push(encodeStr(key) + '=' + encodeStr(val2));
  1307. }
  1308. });
  1309. return result.join('&');
  1310. }
  1311. return encodeStr(key) + '=' + encodeStr(val);
  1312. }).filter(function (x) {return x.length > 0;}).join('&') : null;
  1313. return res ? "?".concat(res) : '';
  1314. }
  1315. function parseBaseComponent(vueComponentOptions)
  1316. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1317. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1318. var options = _objectSpread({
  1319. multipleSlots: true,
  1320. addGlobalClass: true },
  1321. vueOptions.options || {});
  1322. {
  1323. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1324. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1325. Object.assign(options, vueOptions['mp-weixin'].options);
  1326. }
  1327. }
  1328. var componentOptions = {
  1329. options: options,
  1330. data: initData(vueOptions, _vue.default.prototype),
  1331. behaviors: initBehaviors(vueOptions, initBehavior),
  1332. properties: initProperties(vueOptions.props, false, vueOptions.__file),
  1333. lifetimes: {
  1334. attached: function attached() {
  1335. var properties = this.properties;
  1336. var options = {
  1337. mpType: isPage.call(this) ? 'page' : 'component',
  1338. mpInstance: this,
  1339. propsData: properties };
  1340. initVueIds(properties.vueId, this);
  1341. // 处理父子关系
  1342. initRelation.call(this, {
  1343. vuePid: this._$vuePid,
  1344. vueOptions: options });
  1345. // 初始化 vue 实例
  1346. this.$vm = new VueComponent(options);
  1347. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1348. initSlots(this.$vm, properties.vueSlots);
  1349. // 触发首次 setData
  1350. this.$vm.$mount();
  1351. },
  1352. ready: function ready() {
  1353. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1354. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1355. if (this.$vm) {
  1356. this.$vm._isMounted = true;
  1357. this.$vm.__call_hook('mounted');
  1358. this.$vm.__call_hook('onReady');
  1359. }
  1360. },
  1361. detached: function detached() {
  1362. this.$vm && this.$vm.$destroy();
  1363. } },
  1364. pageLifetimes: {
  1365. show: function show(args) {
  1366. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1367. },
  1368. hide: function hide() {
  1369. this.$vm && this.$vm.__call_hook('onPageHide');
  1370. },
  1371. resize: function resize(size) {
  1372. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1373. } },
  1374. methods: {
  1375. __l: handleLink,
  1376. __e: handleEvent } };
  1377. // externalClasses
  1378. if (vueOptions.externalClasses) {
  1379. componentOptions.externalClasses = vueOptions.externalClasses;
  1380. }
  1381. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1382. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1383. componentOptions.methods[callMethod] = function (args) {
  1384. return this.$vm[callMethod](args);
  1385. };
  1386. });
  1387. }
  1388. if (isPage) {
  1389. return componentOptions;
  1390. }
  1391. return [componentOptions, VueComponent];
  1392. }
  1393. function parseComponent(vueComponentOptions) {
  1394. return parseBaseComponent(vueComponentOptions, {
  1395. isPage: isPage,
  1396. initRelation: initRelation });
  1397. }
  1398. var hooks$1 = [
  1399. 'onShow',
  1400. 'onHide',
  1401. 'onUnload'];
  1402. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1403. function parseBasePage(vuePageOptions, _ref6)
  1404. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1405. var pageOptions = parseComponent(vuePageOptions);
  1406. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1407. pageOptions.methods.onLoad = function (query) {
  1408. this.options = query;
  1409. var copyQuery = Object.assign({}, query);
  1410. delete copyQuery.__id__;
  1411. this.$page = {
  1412. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery) };
  1413. this.$vm.$mp.query = query; // 兼容 mpvue
  1414. this.$vm.__call_hook('onLoad', query);
  1415. };
  1416. return pageOptions;
  1417. }
  1418. function parsePage(vuePageOptions) {
  1419. return parseBasePage(vuePageOptions, {
  1420. isPage: isPage,
  1421. initRelation: initRelation });
  1422. }
  1423. function createPage(vuePageOptions) {
  1424. {
  1425. return Component(parsePage(vuePageOptions));
  1426. }
  1427. }
  1428. function createComponent(vueOptions) {
  1429. {
  1430. return Component(parseComponent(vueOptions));
  1431. }
  1432. }
  1433. todos.forEach(function (todoApi) {
  1434. protocols[todoApi] = false;
  1435. });
  1436. canIUses.forEach(function (canIUseApi) {
  1437. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  1438. canIUseApi;
  1439. if (!wx.canIUse(apiName)) {
  1440. protocols[canIUseApi] = false;
  1441. }
  1442. });
  1443. var uni = {};
  1444. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  1445. uni = new Proxy({}, {
  1446. get: function get(target, name) {
  1447. if (hasOwn(target, name)) {
  1448. return target[name];
  1449. }
  1450. if (baseApi[name]) {
  1451. return baseApi[name];
  1452. }
  1453. if (api[name]) {
  1454. return promisify(name, api[name]);
  1455. }
  1456. {
  1457. if (extraApi[name]) {
  1458. return promisify(name, extraApi[name]);
  1459. }
  1460. if (todoApis[name]) {
  1461. return promisify(name, todoApis[name]);
  1462. }
  1463. }
  1464. if (eventApi[name]) {
  1465. return eventApi[name];
  1466. }
  1467. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  1468. return;
  1469. }
  1470. return promisify(name, wrapper(name, wx[name]));
  1471. },
  1472. set: function set(target, name, value) {
  1473. target[name] = value;
  1474. return true;
  1475. } });
  1476. } else {
  1477. Object.keys(baseApi).forEach(function (name) {
  1478. uni[name] = baseApi[name];
  1479. });
  1480. {
  1481. Object.keys(todoApis).forEach(function (name) {
  1482. uni[name] = promisify(name, todoApis[name]);
  1483. });
  1484. Object.keys(extraApi).forEach(function (name) {
  1485. uni[name] = promisify(name, todoApis[name]);
  1486. });
  1487. }
  1488. Object.keys(eventApi).forEach(function (name) {
  1489. uni[name] = eventApi[name];
  1490. });
  1491. Object.keys(api).forEach(function (name) {
  1492. uni[name] = promisify(name, api[name]);
  1493. });
  1494. Object.keys(wx).forEach(function (name) {
  1495. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  1496. uni[name] = promisify(name, wrapper(name, wx[name]));
  1497. }
  1498. });
  1499. }
  1500. wx.createApp = createApp;
  1501. wx.createPage = createPage;
  1502. wx.createComponent = createComponent;
  1503. var uni$1 = uni;var _default =
  1504. uni$1;exports.default = _default;
  1505. /***/ }),
  1506. /***/ 10:
  1507. /*!**********************************************************************************************************!*\
  1508. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  1509. \**********************************************************************************************************/
  1510. /*! exports provided: default */
  1511. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1512. "use strict";
  1513. __webpack_require__.r(__webpack_exports__);
  1514. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  1515. /* globals __VUE_SSR_CONTEXT__ */
  1516. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  1517. // This module is a runtime utility for cleaner component module output and will
  1518. // be included in the final webpack user bundle.
  1519. function normalizeComponent (
  1520. scriptExports,
  1521. render,
  1522. staticRenderFns,
  1523. functionalTemplate,
  1524. injectStyles,
  1525. scopeId,
  1526. moduleIdentifier, /* server only */
  1527. shadowMode, /* vue-cli only */
  1528. components, // fixed by xxxxxx auto components
  1529. renderjs // fixed by xxxxxx renderjs
  1530. ) {
  1531. // Vue.extend constructor export interop
  1532. var options = typeof scriptExports === 'function'
  1533. ? scriptExports.options
  1534. : scriptExports
  1535. // fixed by xxxxxx auto components
  1536. if (components) {
  1537. if (!options.components) {
  1538. options.components = {}
  1539. }
  1540. var hasOwn = Object.prototype.hasOwnProperty
  1541. for (var name in components) {
  1542. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  1543. options.components[name] = components[name]
  1544. }
  1545. }
  1546. }
  1547. // fixed by xxxxxx renderjs
  1548. if (renderjs) {
  1549. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  1550. this[renderjs.__module] = this
  1551. });
  1552. (options.mixins || (options.mixins = [])).push(renderjs)
  1553. }
  1554. // render functions
  1555. if (render) {
  1556. options.render = render
  1557. options.staticRenderFns = staticRenderFns
  1558. options._compiled = true
  1559. }
  1560. // functional template
  1561. if (functionalTemplate) {
  1562. options.functional = true
  1563. }
  1564. // scopedId
  1565. if (scopeId) {
  1566. options._scopeId = 'data-v-' + scopeId
  1567. }
  1568. var hook
  1569. if (moduleIdentifier) { // server build
  1570. hook = function (context) {
  1571. // 2.3 injection
  1572. context =
  1573. context || // cached call
  1574. (this.$vnode && this.$vnode.ssrContext) || // stateful
  1575. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  1576. // 2.2 with runInNewContext: true
  1577. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  1578. context = __VUE_SSR_CONTEXT__
  1579. }
  1580. // inject component styles
  1581. if (injectStyles) {
  1582. injectStyles.call(this, context)
  1583. }
  1584. // register component module identifier for async chunk inferrence
  1585. if (context && context._registeredComponents) {
  1586. context._registeredComponents.add(moduleIdentifier)
  1587. }
  1588. }
  1589. // used by ssr in case component is cached and beforeCreate
  1590. // never gets called
  1591. options._ssrRegister = hook
  1592. } else if (injectStyles) {
  1593. hook = shadowMode
  1594. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  1595. : injectStyles
  1596. }
  1597. if (hook) {
  1598. if (options.functional) {
  1599. // for template-only hot-reload because in that case the render fn doesn't
  1600. // go through the normalizer
  1601. options._injectStyles = hook
  1602. // register for functioal component in vue file
  1603. var originalRender = options.render
  1604. options.render = function renderWithStyleInjection (h, context) {
  1605. hook.call(context)
  1606. return originalRender(h, context)
  1607. }
  1608. } else {
  1609. // inject component registration as beforeCreate hook
  1610. var existing = options.beforeCreate
  1611. options.beforeCreate = existing
  1612. ? [].concat(existing, hook)
  1613. : [hook]
  1614. }
  1615. }
  1616. return {
  1617. exports: scriptExports,
  1618. options: options
  1619. }
  1620. }
  1621. /***/ }),
  1622. /***/ 11:
  1623. /*!*******************************************************!*\
  1624. !*** C:/Users/Administrator/Desktop/智慧矿山/util/api.js ***!
  1625. \*******************************************************/
  1626. /*! no static exports found */
  1627. /***/ (function(module, exports, __webpack_require__) {
  1628. "use strict";
  1629. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.myRequest = void 0;var BASE_URL = 'http://colliery.nxjiewei.com/api';
  1630. var myRequest = function myRequest(options) {
  1631. return new Promise(function (resolve, reject) {
  1632. uni.request({
  1633. url: BASE_URL + options.url,
  1634. method: options.method || "GET",
  1635. data: options.data || {},
  1636. header: options.header || {},
  1637. success: function success(res) {
  1638. // console.log(res)
  1639. if (res.data.code !== 0) {
  1640. return uni.showToast({
  1641. title: "获取数据失败" });
  1642. }
  1643. resolve(res);
  1644. },
  1645. fail: function fail(err) {
  1646. console.log(err);
  1647. uni.showToast({
  1648. title: "请求接口失败" });
  1649. reject(err);
  1650. } });
  1651. });
  1652. };exports.myRequest = myRequest;
  1653. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  1654. /***/ }),
  1655. /***/ 177:
  1656. /*!*************************************************************************!*\
  1657. !*** C:/Users/Administrator/Desktop/智慧矿山/components/uni-icons/icons.js ***!
  1658. \*************************************************************************/
  1659. /*! no static exports found */
  1660. /***/ (function(module, exports, __webpack_require__) {
  1661. "use strict";
  1662. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  1663. "pulldown": "\uE588",
  1664. "refreshempty": "\uE461",
  1665. "back": "\uE471",
  1666. "forward": "\uE470",
  1667. "more": "\uE507",
  1668. "more-filled": "\uE537",
  1669. "scan": "\uE612",
  1670. "qq": "\uE264",
  1671. "weibo": "\uE260",
  1672. "weixin": "\uE261",
  1673. "pengyouquan": "\uE262",
  1674. "loop": "\uE565",
  1675. "refresh": "\uE407",
  1676. "refresh-filled": "\uE437",
  1677. "arrowthindown": "\uE585",
  1678. "arrowthinleft": "\uE586",
  1679. "arrowthinright": "\uE587",
  1680. "arrowthinup": "\uE584",
  1681. "undo-filled": "\uE7D6",
  1682. "undo": "\uE406",
  1683. "redo": "\uE405",
  1684. "redo-filled": "\uE7D9",
  1685. "bars": "\uE563",
  1686. "chatboxes": "\uE203",
  1687. "camera": "\uE301",
  1688. "chatboxes-filled": "\uE233",
  1689. "camera-filled": "\uE7EF",
  1690. "cart-filled": "\uE7F4",
  1691. "cart": "\uE7F5",
  1692. "checkbox-filled": "\uE442",
  1693. "checkbox": "\uE7FA",
  1694. "arrowleft": "\uE582",
  1695. "arrowdown": "\uE581",
  1696. "arrowright": "\uE583",
  1697. "smallcircle-filled": "\uE801",
  1698. "arrowup": "\uE580",
  1699. "circle": "\uE411",
  1700. "eye-filled": "\uE568",
  1701. "eye-slash-filled": "\uE822",
  1702. "eye-slash": "\uE823",
  1703. "eye": "\uE824",
  1704. "flag-filled": "\uE825",
  1705. "flag": "\uE508",
  1706. "gear-filled": "\uE532",
  1707. "reload": "\uE462",
  1708. "gear": "\uE502",
  1709. "hand-thumbsdown-filled": "\uE83B",
  1710. "hand-thumbsdown": "\uE83C",
  1711. "hand-thumbsup-filled": "\uE83D",
  1712. "heart-filled": "\uE83E",
  1713. "hand-thumbsup": "\uE83F",
  1714. "heart": "\uE840",
  1715. "home": "\uE500",
  1716. "info": "\uE504",
  1717. "home-filled": "\uE530",
  1718. "info-filled": "\uE534",
  1719. "circle-filled": "\uE441",
  1720. "chat-filled": "\uE847",
  1721. "chat": "\uE263",
  1722. "mail-open-filled": "\uE84D",
  1723. "email-filled": "\uE231",
  1724. "mail-open": "\uE84E",
  1725. "email": "\uE201",
  1726. "checkmarkempty": "\uE472",
  1727. "list": "\uE562",
  1728. "locked-filled": "\uE856",
  1729. "locked": "\uE506",
  1730. "map-filled": "\uE85C",
  1731. "map-pin": "\uE85E",
  1732. "map-pin-ellipse": "\uE864",
  1733. "map": "\uE364",
  1734. "minus-filled": "\uE440",
  1735. "mic-filled": "\uE332",
  1736. "minus": "\uE410",
  1737. "micoff": "\uE360",
  1738. "mic": "\uE302",
  1739. "clear": "\uE434",
  1740. "smallcircle": "\uE868",
  1741. "close": "\uE404",
  1742. "closeempty": "\uE460",
  1743. "paperclip": "\uE567",
  1744. "paperplane": "\uE503",
  1745. "paperplane-filled": "\uE86E",
  1746. "person-filled": "\uE131",
  1747. "contact-filled": "\uE130",
  1748. "person": "\uE101",
  1749. "contact": "\uE100",
  1750. "images-filled": "\uE87A",
  1751. "phone": "\uE200",
  1752. "images": "\uE87B",
  1753. "image": "\uE363",
  1754. "image-filled": "\uE877",
  1755. "location-filled": "\uE333",
  1756. "location": "\uE303",
  1757. "plus-filled": "\uE439",
  1758. "plus": "\uE409",
  1759. "plusempty": "\uE468",
  1760. "help-filled": "\uE535",
  1761. "help": "\uE505",
  1762. "navigate-filled": "\uE884",
  1763. "navigate": "\uE501",
  1764. "mic-slash-filled": "\uE892",
  1765. "search": "\uE466",
  1766. "settings": "\uE560",
  1767. "sound": "\uE590",
  1768. "sound-filled": "\uE8A1",
  1769. "spinner-cycle": "\uE465",
  1770. "download-filled": "\uE8A4",
  1771. "personadd-filled": "\uE132",
  1772. "videocam-filled": "\uE8AF",
  1773. "personadd": "\uE102",
  1774. "upload": "\uE402",
  1775. "upload-filled": "\uE8B1",
  1776. "starhalf": "\uE463",
  1777. "star-filled": "\uE438",
  1778. "star": "\uE408",
  1779. "trash": "\uE401",
  1780. "phone-filled": "\uE230",
  1781. "compose": "\uE400",
  1782. "videocam": "\uE300",
  1783. "trash-filled": "\uE8DC",
  1784. "download": "\uE403",
  1785. "chatbubble-filled": "\uE232",
  1786. "chatbubble": "\uE202",
  1787. "cloud-download": "\uE8E4",
  1788. "cloud-upload-filled": "\uE8E5",
  1789. "cloud-upload": "\uE8E6",
  1790. "cloud-download-filled": "\uE8E9",
  1791. "headphones": "\uE8BF",
  1792. "shop": "\uE609" };exports.default = _default;
  1793. /***/ }),
  1794. /***/ 18:
  1795. /*!**********************************************************!*\
  1796. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  1797. \**********************************************************/
  1798. /*! no static exports found */
  1799. /***/ (function(module, exports, __webpack_require__) {
  1800. module.exports = __webpack_require__(/*! regenerator-runtime */ 19);
  1801. /***/ }),
  1802. /***/ 19:
  1803. /*!************************************************************!*\
  1804. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  1805. \************************************************************/
  1806. /*! no static exports found */
  1807. /***/ (function(module, exports, __webpack_require__) {
  1808. /**
  1809. * Copyright (c) 2014-present, Facebook, Inc.
  1810. *
  1811. * This source code is licensed under the MIT license found in the
  1812. * LICENSE file in the root directory of this source tree.
  1813. */
  1814. // This method of obtaining a reference to the global object needs to be
  1815. // kept identical to the way it is obtained in runtime.js
  1816. var g = (function() {
  1817. return this || (typeof self === "object" && self);
  1818. })() || Function("return this")();
  1819. // Use `getOwnPropertyNames` because not all browsers support calling
  1820. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  1821. var hadRuntime = g.regeneratorRuntime &&
  1822. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  1823. // Save the old regeneratorRuntime in case it needs to be restored later.
  1824. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  1825. // Force reevalutation of runtime.js.
  1826. g.regeneratorRuntime = undefined;
  1827. module.exports = __webpack_require__(/*! ./runtime */ 20);
  1828. if (hadRuntime) {
  1829. // Restore the original runtime.
  1830. g.regeneratorRuntime = oldRuntime;
  1831. } else {
  1832. // Remove the global property added by runtime.js.
  1833. try {
  1834. delete g.regeneratorRuntime;
  1835. } catch(e) {
  1836. g.regeneratorRuntime = undefined;
  1837. }
  1838. }
  1839. /***/ }),
  1840. /***/ 2:
  1841. /*!******************************************************************************************!*\
  1842. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  1843. \******************************************************************************************/
  1844. /*! exports provided: default */
  1845. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1846. "use strict";
  1847. __webpack_require__.r(__webpack_exports__);
  1848. /* WEBPACK VAR INJECTION */(function(global) {/*!
  1849. * Vue.js v2.6.11
  1850. * (c) 2014-2020 Evan You
  1851. * Released under the MIT License.
  1852. */
  1853. /* */
  1854. var emptyObject = Object.freeze({});
  1855. // These helpers produce better VM code in JS engines due to their
  1856. // explicitness and function inlining.
  1857. function isUndef (v) {
  1858. return v === undefined || v === null
  1859. }
  1860. function isDef (v) {
  1861. return v !== undefined && v !== null
  1862. }
  1863. function isTrue (v) {
  1864. return v === true
  1865. }
  1866. function isFalse (v) {
  1867. return v === false
  1868. }
  1869. /**
  1870. * Check if value is primitive.
  1871. */
  1872. function isPrimitive (value) {
  1873. return (
  1874. typeof value === 'string' ||
  1875. typeof value === 'number' ||
  1876. // $flow-disable-line
  1877. typeof value === 'symbol' ||
  1878. typeof value === 'boolean'
  1879. )
  1880. }
  1881. /**
  1882. * Quick object check - this is primarily used to tell
  1883. * Objects from primitive values when we know the value
  1884. * is a JSON-compliant type.
  1885. */
  1886. function isObject (obj) {
  1887. return obj !== null && typeof obj === 'object'
  1888. }
  1889. /**
  1890. * Get the raw type string of a value, e.g., [object Object].
  1891. */
  1892. var _toString = Object.prototype.toString;
  1893. function toRawType (value) {
  1894. return _toString.call(value).slice(8, -1)
  1895. }
  1896. /**
  1897. * Strict object type check. Only returns true
  1898. * for plain JavaScript objects.
  1899. */
  1900. function isPlainObject (obj) {
  1901. return _toString.call(obj) === '[object Object]'
  1902. }
  1903. function isRegExp (v) {
  1904. return _toString.call(v) === '[object RegExp]'
  1905. }
  1906. /**
  1907. * Check if val is a valid array index.
  1908. */
  1909. function isValidArrayIndex (val) {
  1910. var n = parseFloat(String(val));
  1911. return n >= 0 && Math.floor(n) === n && isFinite(val)
  1912. }
  1913. function isPromise (val) {
  1914. return (
  1915. isDef(val) &&
  1916. typeof val.then === 'function' &&
  1917. typeof val.catch === 'function'
  1918. )
  1919. }
  1920. /**
  1921. * Convert a value to a string that is actually rendered.
  1922. */
  1923. function toString (val) {
  1924. return val == null
  1925. ? ''
  1926. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  1927. ? JSON.stringify(val, null, 2)
  1928. : String(val)
  1929. }
  1930. /**
  1931. * Convert an input value to a number for persistence.
  1932. * If the conversion fails, return original string.
  1933. */
  1934. function toNumber (val) {
  1935. var n = parseFloat(val);
  1936. return isNaN(n) ? val : n
  1937. }
  1938. /**
  1939. * Make a map and return a function for checking if a key
  1940. * is in that map.
  1941. */
  1942. function makeMap (
  1943. str,
  1944. expectsLowerCase
  1945. ) {
  1946. var map = Object.create(null);
  1947. var list = str.split(',');
  1948. for (var i = 0; i < list.length; i++) {
  1949. map[list[i]] = true;
  1950. }
  1951. return expectsLowerCase
  1952. ? function (val) { return map[val.toLowerCase()]; }
  1953. : function (val) { return map[val]; }
  1954. }
  1955. /**
  1956. * Check if a tag is a built-in tag.
  1957. */
  1958. var isBuiltInTag = makeMap('slot,component', true);
  1959. /**
  1960. * Check if an attribute is a reserved attribute.
  1961. */
  1962. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  1963. /**
  1964. * Remove an item from an array.
  1965. */
  1966. function remove (arr, item) {
  1967. if (arr.length) {
  1968. var index = arr.indexOf(item);
  1969. if (index > -1) {
  1970. return arr.splice(index, 1)
  1971. }
  1972. }
  1973. }
  1974. /**
  1975. * Check whether an object has the property.
  1976. */
  1977. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1978. function hasOwn (obj, key) {
  1979. return hasOwnProperty.call(obj, key)
  1980. }
  1981. /**
  1982. * Create a cached version of a pure function.
  1983. */
  1984. function cached (fn) {
  1985. var cache = Object.create(null);
  1986. return (function cachedFn (str) {
  1987. var hit = cache[str];
  1988. return hit || (cache[str] = fn(str))
  1989. })
  1990. }
  1991. /**
  1992. * Camelize a hyphen-delimited string.
  1993. */
  1994. var camelizeRE = /-(\w)/g;
  1995. var camelize = cached(function (str) {
  1996. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  1997. });
  1998. /**
  1999. * Capitalize a string.
  2000. */
  2001. var capitalize = cached(function (str) {
  2002. return str.charAt(0).toUpperCase() + str.slice(1)
  2003. });
  2004. /**
  2005. * Hyphenate a camelCase string.
  2006. */
  2007. var hyphenateRE = /\B([A-Z])/g;
  2008. var hyphenate = cached(function (str) {
  2009. return str.replace(hyphenateRE, '-$1').toLowerCase()
  2010. });
  2011. /**
  2012. * Simple bind polyfill for environments that do not support it,
  2013. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  2014. * since native bind is now performant enough in most browsers.
  2015. * But removing it would mean breaking code that was able to run in
  2016. * PhantomJS 1.x, so this must be kept for backward compatibility.
  2017. */
  2018. /* istanbul ignore next */
  2019. function polyfillBind (fn, ctx) {
  2020. function boundFn (a) {
  2021. var l = arguments.length;
  2022. return l
  2023. ? l > 1
  2024. ? fn.apply(ctx, arguments)
  2025. : fn.call(ctx, a)
  2026. : fn.call(ctx)
  2027. }
  2028. boundFn._length = fn.length;
  2029. return boundFn
  2030. }
  2031. function nativeBind (fn, ctx) {
  2032. return fn.bind(ctx)
  2033. }
  2034. var bind = Function.prototype.bind
  2035. ? nativeBind
  2036. : polyfillBind;
  2037. /**
  2038. * Convert an Array-like object to a real Array.
  2039. */
  2040. function toArray (list, start) {
  2041. start = start || 0;
  2042. var i = list.length - start;
  2043. var ret = new Array(i);
  2044. while (i--) {
  2045. ret[i] = list[i + start];
  2046. }
  2047. return ret
  2048. }
  2049. /**
  2050. * Mix properties into target object.
  2051. */
  2052. function extend (to, _from) {
  2053. for (var key in _from) {
  2054. to[key] = _from[key];
  2055. }
  2056. return to
  2057. }
  2058. /**
  2059. * Merge an Array of Objects into a single Object.
  2060. */
  2061. function toObject (arr) {
  2062. var res = {};
  2063. for (var i = 0; i < arr.length; i++) {
  2064. if (arr[i]) {
  2065. extend(res, arr[i]);
  2066. }
  2067. }
  2068. return res
  2069. }
  2070. /* eslint-disable no-unused-vars */
  2071. /**
  2072. * Perform no operation.
  2073. * Stubbing args to make Flow happy without leaving useless transpiled code
  2074. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  2075. */
  2076. function noop (a, b, c) {}
  2077. /**
  2078. * Always return false.
  2079. */
  2080. var no = function (a, b, c) { return false; };
  2081. /* eslint-enable no-unused-vars */
  2082. /**
  2083. * Return the same value.
  2084. */
  2085. var identity = function (_) { return _; };
  2086. /**
  2087. * Check if two values are loosely equal - that is,
  2088. * if they are plain objects, do they have the same shape?
  2089. */
  2090. function looseEqual (a, b) {
  2091. if (a === b) { return true }
  2092. var isObjectA = isObject(a);
  2093. var isObjectB = isObject(b);
  2094. if (isObjectA && isObjectB) {
  2095. try {
  2096. var isArrayA = Array.isArray(a);
  2097. var isArrayB = Array.isArray(b);
  2098. if (isArrayA && isArrayB) {
  2099. return a.length === b.length && a.every(function (e, i) {
  2100. return looseEqual(e, b[i])
  2101. })
  2102. } else if (a instanceof Date && b instanceof Date) {
  2103. return a.getTime() === b.getTime()
  2104. } else if (!isArrayA && !isArrayB) {
  2105. var keysA = Object.keys(a);
  2106. var keysB = Object.keys(b);
  2107. return keysA.length === keysB.length && keysA.every(function (key) {
  2108. return looseEqual(a[key], b[key])
  2109. })
  2110. } else {
  2111. /* istanbul ignore next */
  2112. return false
  2113. }
  2114. } catch (e) {
  2115. /* istanbul ignore next */
  2116. return false
  2117. }
  2118. } else if (!isObjectA && !isObjectB) {
  2119. return String(a) === String(b)
  2120. } else {
  2121. return false
  2122. }
  2123. }
  2124. /**
  2125. * Return the first index at which a loosely equal value can be
  2126. * found in the array (if value is a plain object, the array must
  2127. * contain an object of the same shape), or -1 if it is not present.
  2128. */
  2129. function looseIndexOf (arr, val) {
  2130. for (var i = 0; i < arr.length; i++) {
  2131. if (looseEqual(arr[i], val)) { return i }
  2132. }
  2133. return -1
  2134. }
  2135. /**
  2136. * Ensure a function is called only once.
  2137. */
  2138. function once (fn) {
  2139. var called = false;
  2140. return function () {
  2141. if (!called) {
  2142. called = true;
  2143. fn.apply(this, arguments);
  2144. }
  2145. }
  2146. }
  2147. var ASSET_TYPES = [
  2148. 'component',
  2149. 'directive',
  2150. 'filter'
  2151. ];
  2152. var LIFECYCLE_HOOKS = [
  2153. 'beforeCreate',
  2154. 'created',
  2155. 'beforeMount',
  2156. 'mounted',
  2157. 'beforeUpdate',
  2158. 'updated',
  2159. 'beforeDestroy',
  2160. 'destroyed',
  2161. 'activated',
  2162. 'deactivated',
  2163. 'errorCaptured',
  2164. 'serverPrefetch'
  2165. ];
  2166. /* */
  2167. var config = ({
  2168. /**
  2169. * Option merge strategies (used in core/util/options)
  2170. */
  2171. // $flow-disable-line
  2172. optionMergeStrategies: Object.create(null),
  2173. /**
  2174. * Whether to suppress warnings.
  2175. */
  2176. silent: false,
  2177. /**
  2178. * Show production mode tip message on boot?
  2179. */
  2180. productionTip: "development" !== 'production',
  2181. /**
  2182. * Whether to enable devtools
  2183. */
  2184. devtools: "development" !== 'production',
  2185. /**
  2186. * Whether to record perf
  2187. */
  2188. performance: false,
  2189. /**
  2190. * Error handler for watcher errors
  2191. */
  2192. errorHandler: null,
  2193. /**
  2194. * Warn handler for watcher warns
  2195. */
  2196. warnHandler: null,
  2197. /**
  2198. * Ignore certain custom elements
  2199. */
  2200. ignoredElements: [],
  2201. /**
  2202. * Custom user key aliases for v-on
  2203. */
  2204. // $flow-disable-line
  2205. keyCodes: Object.create(null),
  2206. /**
  2207. * Check if a tag is reserved so that it cannot be registered as a
  2208. * component. This is platform-dependent and may be overwritten.
  2209. */
  2210. isReservedTag: no,
  2211. /**
  2212. * Check if an attribute is reserved so that it cannot be used as a component
  2213. * prop. This is platform-dependent and may be overwritten.
  2214. */
  2215. isReservedAttr: no,
  2216. /**
  2217. * Check if a tag is an unknown element.
  2218. * Platform-dependent.
  2219. */
  2220. isUnknownElement: no,
  2221. /**
  2222. * Get the namespace of an element
  2223. */
  2224. getTagNamespace: noop,
  2225. /**
  2226. * Parse the real tag name for the specific platform.
  2227. */
  2228. parsePlatformTagName: identity,
  2229. /**
  2230. * Check if an attribute must be bound using property, e.g. value
  2231. * Platform-dependent.
  2232. */
  2233. mustUseProp: no,
  2234. /**
  2235. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  2236. * This will significantly reduce performance if set to false.
  2237. */
  2238. async: true,
  2239. /**
  2240. * Exposed for legacy reasons
  2241. */
  2242. _lifecycleHooks: LIFECYCLE_HOOKS
  2243. });
  2244. /* */
  2245. /**
  2246. * unicode letters used for parsing html tags, component names and property paths.
  2247. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  2248. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  2249. */
  2250. 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/;
  2251. /**
  2252. * Check if a string starts with $ or _
  2253. */
  2254. function isReserved (str) {
  2255. var c = (str + '').charCodeAt(0);
  2256. return c === 0x24 || c === 0x5F
  2257. }
  2258. /**
  2259. * Define a property.
  2260. */
  2261. function def (obj, key, val, enumerable) {
  2262. Object.defineProperty(obj, key, {
  2263. value: val,
  2264. enumerable: !!enumerable,
  2265. writable: true,
  2266. configurable: true
  2267. });
  2268. }
  2269. /**
  2270. * Parse simple path.
  2271. */
  2272. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  2273. function parsePath (path) {
  2274. if (bailRE.test(path)) {
  2275. return
  2276. }
  2277. var segments = path.split('.');
  2278. return function (obj) {
  2279. for (var i = 0; i < segments.length; i++) {
  2280. if (!obj) { return }
  2281. obj = obj[segments[i]];
  2282. }
  2283. return obj
  2284. }
  2285. }
  2286. /* */
  2287. // can we use __proto__?
  2288. var hasProto = '__proto__' in {};
  2289. // Browser environment sniffing
  2290. var inBrowser = typeof window !== 'undefined';
  2291. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  2292. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  2293. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  2294. var isIE = UA && /msie|trident/.test(UA);
  2295. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  2296. var isEdge = UA && UA.indexOf('edge/') > 0;
  2297. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  2298. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  2299. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  2300. var isPhantomJS = UA && /phantomjs/.test(UA);
  2301. var isFF = UA && UA.match(/firefox\/(\d+)/);
  2302. // Firefox has a "watch" function on Object.prototype...
  2303. var nativeWatch = ({}).watch;
  2304. if (inBrowser) {
  2305. try {
  2306. var opts = {};
  2307. Object.defineProperty(opts, 'passive', ({
  2308. get: function get () {
  2309. }
  2310. })); // https://github.com/facebook/flow/issues/285
  2311. window.addEventListener('test-passive', null, opts);
  2312. } catch (e) {}
  2313. }
  2314. // this needs to be lazy-evaled because vue may be required before
  2315. // vue-server-renderer can set VUE_ENV
  2316. var _isServer;
  2317. var isServerRendering = function () {
  2318. if (_isServer === undefined) {
  2319. /* istanbul ignore if */
  2320. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  2321. // detect presence of vue-server-renderer and avoid
  2322. // Webpack shimming the process
  2323. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  2324. } else {
  2325. _isServer = false;
  2326. }
  2327. }
  2328. return _isServer
  2329. };
  2330. // detect devtools
  2331. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  2332. /* istanbul ignore next */
  2333. function isNative (Ctor) {
  2334. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  2335. }
  2336. var hasSymbol =
  2337. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  2338. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  2339. var _Set;
  2340. /* istanbul ignore if */ // $flow-disable-line
  2341. if (typeof Set !== 'undefined' && isNative(Set)) {
  2342. // use native Set when available.
  2343. _Set = Set;
  2344. } else {
  2345. // a non-standard Set polyfill that only works with primitive keys.
  2346. _Set = /*@__PURE__*/(function () {
  2347. function Set () {
  2348. this.set = Object.create(null);
  2349. }
  2350. Set.prototype.has = function has (key) {
  2351. return this.set[key] === true
  2352. };
  2353. Set.prototype.add = function add (key) {
  2354. this.set[key] = true;
  2355. };
  2356. Set.prototype.clear = function clear () {
  2357. this.set = Object.create(null);
  2358. };
  2359. return Set;
  2360. }());
  2361. }
  2362. /* */
  2363. var warn = noop;
  2364. var tip = noop;
  2365. var generateComponentTrace = (noop); // work around flow check
  2366. var formatComponentName = (noop);
  2367. if (true) {
  2368. var hasConsole = typeof console !== 'undefined';
  2369. var classifyRE = /(?:^|[-_])(\w)/g;
  2370. var classify = function (str) { return str
  2371. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  2372. .replace(/[-_]/g, ''); };
  2373. warn = function (msg, vm) {
  2374. var trace = vm ? generateComponentTrace(vm) : '';
  2375. if (config.warnHandler) {
  2376. config.warnHandler.call(null, msg, vm, trace);
  2377. } else if (hasConsole && (!config.silent)) {
  2378. console.error(("[Vue warn]: " + msg + trace));
  2379. }
  2380. };
  2381. tip = function (msg, vm) {
  2382. if (hasConsole && (!config.silent)) {
  2383. console.warn("[Vue tip]: " + msg + (
  2384. vm ? generateComponentTrace(vm) : ''
  2385. ));
  2386. }
  2387. };
  2388. formatComponentName = function (vm, includeFile) {
  2389. if (vm.$root === vm) {
  2390. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  2391. return ('') + vm.$options.__file
  2392. }
  2393. return '<Root>'
  2394. }
  2395. var options = typeof vm === 'function' && vm.cid != null
  2396. ? vm.options
  2397. : vm._isVue
  2398. ? vm.$options || vm.constructor.options
  2399. : vm;
  2400. var name = options.name || options._componentTag;
  2401. var file = options.__file;
  2402. if (!name && file) {
  2403. var match = file.match(/([^/\\]+)\.vue$/);
  2404. name = match && match[1];
  2405. }
  2406. return (
  2407. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  2408. (file && includeFile !== false ? (" at " + file) : '')
  2409. )
  2410. };
  2411. var repeat = function (str, n) {
  2412. var res = '';
  2413. while (n) {
  2414. if (n % 2 === 1) { res += str; }
  2415. if (n > 1) { str += str; }
  2416. n >>= 1;
  2417. }
  2418. return res
  2419. };
  2420. generateComponentTrace = function (vm) {
  2421. if (vm._isVue && vm.$parent) {
  2422. var tree = [];
  2423. var currentRecursiveSequence = 0;
  2424. while (vm && vm.$options.name !== 'PageBody') {
  2425. if (tree.length > 0) {
  2426. var last = tree[tree.length - 1];
  2427. if (last.constructor === vm.constructor) {
  2428. currentRecursiveSequence++;
  2429. vm = vm.$parent;
  2430. continue
  2431. } else if (currentRecursiveSequence > 0) {
  2432. tree[tree.length - 1] = [last, currentRecursiveSequence];
  2433. currentRecursiveSequence = 0;
  2434. }
  2435. }
  2436. !vm.$options.isReserved && tree.push(vm);
  2437. vm = vm.$parent;
  2438. }
  2439. return '\n\nfound in\n\n' + tree
  2440. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  2441. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  2442. : formatComponentName(vm))); })
  2443. .join('\n')
  2444. } else {
  2445. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  2446. }
  2447. };
  2448. }
  2449. /* */
  2450. var uid = 0;
  2451. /**
  2452. * A dep is an observable that can have multiple
  2453. * directives subscribing to it.
  2454. */
  2455. var Dep = function Dep () {
  2456. this.id = uid++;
  2457. this.subs = [];
  2458. };
  2459. Dep.prototype.addSub = function addSub (sub) {
  2460. this.subs.push(sub);
  2461. };
  2462. Dep.prototype.removeSub = function removeSub (sub) {
  2463. remove(this.subs, sub);
  2464. };
  2465. Dep.prototype.depend = function depend () {
  2466. if (Dep.SharedObject.target) {
  2467. Dep.SharedObject.target.addDep(this);
  2468. }
  2469. };
  2470. Dep.prototype.notify = function notify () {
  2471. // stabilize the subscriber list first
  2472. var subs = this.subs.slice();
  2473. if ( true && !config.async) {
  2474. // subs aren't sorted in scheduler if not running async
  2475. // we need to sort them now to make sure they fire in correct
  2476. // order
  2477. subs.sort(function (a, b) { return a.id - b.id; });
  2478. }
  2479. for (var i = 0, l = subs.length; i < l; i++) {
  2480. subs[i].update();
  2481. }
  2482. };
  2483. // The current target watcher being evaluated.
  2484. // This is globally unique because only one watcher
  2485. // can be evaluated at a time.
  2486. // fixed by xxxxxx (nvue shared vuex)
  2487. /* eslint-disable no-undef */
  2488. Dep.SharedObject = {};
  2489. Dep.SharedObject.target = null;
  2490. Dep.SharedObject.targetStack = [];
  2491. function pushTarget (target) {
  2492. Dep.SharedObject.targetStack.push(target);
  2493. Dep.SharedObject.target = target;
  2494. Dep.target = target;
  2495. }
  2496. function popTarget () {
  2497. Dep.SharedObject.targetStack.pop();
  2498. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  2499. Dep.target = Dep.SharedObject.target;
  2500. }
  2501. /* */
  2502. var VNode = function VNode (
  2503. tag,
  2504. data,
  2505. children,
  2506. text,
  2507. elm,
  2508. context,
  2509. componentOptions,
  2510. asyncFactory
  2511. ) {
  2512. this.tag = tag;
  2513. this.data = data;
  2514. this.children = children;
  2515. this.text = text;
  2516. this.elm = elm;
  2517. this.ns = undefined;
  2518. this.context = context;
  2519. this.fnContext = undefined;
  2520. this.fnOptions = undefined;
  2521. this.fnScopeId = undefined;
  2522. this.key = data && data.key;
  2523. this.componentOptions = componentOptions;
  2524. this.componentInstance = undefined;
  2525. this.parent = undefined;
  2526. this.raw = false;
  2527. this.isStatic = false;
  2528. this.isRootInsert = true;
  2529. this.isComment = false;
  2530. this.isCloned = false;
  2531. this.isOnce = false;
  2532. this.asyncFactory = asyncFactory;
  2533. this.asyncMeta = undefined;
  2534. this.isAsyncPlaceholder = false;
  2535. };
  2536. var prototypeAccessors = { child: { configurable: true } };
  2537. // DEPRECATED: alias for componentInstance for backwards compat.
  2538. /* istanbul ignore next */
  2539. prototypeAccessors.child.get = function () {
  2540. return this.componentInstance
  2541. };
  2542. Object.defineProperties( VNode.prototype, prototypeAccessors );
  2543. var createEmptyVNode = function (text) {
  2544. if ( text === void 0 ) text = '';
  2545. var node = new VNode();
  2546. node.text = text;
  2547. node.isComment = true;
  2548. return node
  2549. };
  2550. function createTextVNode (val) {
  2551. return new VNode(undefined, undefined, undefined, String(val))
  2552. }
  2553. // optimized shallow clone
  2554. // used for static nodes and slot nodes because they may be reused across
  2555. // multiple renders, cloning them avoids errors when DOM manipulations rely
  2556. // on their elm reference.
  2557. function cloneVNode (vnode) {
  2558. var cloned = new VNode(
  2559. vnode.tag,
  2560. vnode.data,
  2561. // #7975
  2562. // clone children array to avoid mutating original in case of cloning
  2563. // a child.
  2564. vnode.children && vnode.children.slice(),
  2565. vnode.text,
  2566. vnode.elm,
  2567. vnode.context,
  2568. vnode.componentOptions,
  2569. vnode.asyncFactory
  2570. );
  2571. cloned.ns = vnode.ns;
  2572. cloned.isStatic = vnode.isStatic;
  2573. cloned.key = vnode.key;
  2574. cloned.isComment = vnode.isComment;
  2575. cloned.fnContext = vnode.fnContext;
  2576. cloned.fnOptions = vnode.fnOptions;
  2577. cloned.fnScopeId = vnode.fnScopeId;
  2578. cloned.asyncMeta = vnode.asyncMeta;
  2579. cloned.isCloned = true;
  2580. return cloned
  2581. }
  2582. /*
  2583. * not type checking this file because flow doesn't play well with
  2584. * dynamically accessing methods on Array prototype
  2585. */
  2586. var arrayProto = Array.prototype;
  2587. var arrayMethods = Object.create(arrayProto);
  2588. var methodsToPatch = [
  2589. 'push',
  2590. 'pop',
  2591. 'shift',
  2592. 'unshift',
  2593. 'splice',
  2594. 'sort',
  2595. 'reverse'
  2596. ];
  2597. /**
  2598. * Intercept mutating methods and emit events
  2599. */
  2600. methodsToPatch.forEach(function (method) {
  2601. // cache original method
  2602. var original = arrayProto[method];
  2603. def(arrayMethods, method, function mutator () {
  2604. var args = [], len = arguments.length;
  2605. while ( len-- ) args[ len ] = arguments[ len ];
  2606. var result = original.apply(this, args);
  2607. var ob = this.__ob__;
  2608. var inserted;
  2609. switch (method) {
  2610. case 'push':
  2611. case 'unshift':
  2612. inserted = args;
  2613. break
  2614. case 'splice':
  2615. inserted = args.slice(2);
  2616. break
  2617. }
  2618. if (inserted) { ob.observeArray(inserted); }
  2619. // notify change
  2620. ob.dep.notify();
  2621. return result
  2622. });
  2623. });
  2624. /* */
  2625. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  2626. /**
  2627. * In some cases we may want to disable observation inside a component's
  2628. * update computation.
  2629. */
  2630. var shouldObserve = true;
  2631. function toggleObserving (value) {
  2632. shouldObserve = value;
  2633. }
  2634. /**
  2635. * Observer class that is attached to each observed
  2636. * object. Once attached, the observer converts the target
  2637. * object's property keys into getter/setters that
  2638. * collect dependencies and dispatch updates.
  2639. */
  2640. var Observer = function Observer (value) {
  2641. this.value = value;
  2642. this.dep = new Dep();
  2643. this.vmCount = 0;
  2644. def(value, '__ob__', this);
  2645. if (Array.isArray(value)) {
  2646. if (hasProto) {
  2647. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  2648. if(value.push !== value.__proto__.push){
  2649. copyAugment(value, arrayMethods, arrayKeys);
  2650. } else {
  2651. protoAugment(value, arrayMethods);
  2652. }
  2653. }
  2654. } else {
  2655. copyAugment(value, arrayMethods, arrayKeys);
  2656. }
  2657. this.observeArray(value);
  2658. } else {
  2659. this.walk(value);
  2660. }
  2661. };
  2662. /**
  2663. * Walk through all properties and convert them into
  2664. * getter/setters. This method should only be called when
  2665. * value type is Object.
  2666. */
  2667. Observer.prototype.walk = function walk (obj) {
  2668. var keys = Object.keys(obj);
  2669. for (var i = 0; i < keys.length; i++) {
  2670. defineReactive$$1(obj, keys[i]);
  2671. }
  2672. };
  2673. /**
  2674. * Observe a list of Array items.
  2675. */
  2676. Observer.prototype.observeArray = function observeArray (items) {
  2677. for (var i = 0, l = items.length; i < l; i++) {
  2678. observe(items[i]);
  2679. }
  2680. };
  2681. // helpers
  2682. /**
  2683. * Augment a target Object or Array by intercepting
  2684. * the prototype chain using __proto__
  2685. */
  2686. function protoAugment (target, src) {
  2687. /* eslint-disable no-proto */
  2688. target.__proto__ = src;
  2689. /* eslint-enable no-proto */
  2690. }
  2691. /**
  2692. * Augment a target Object or Array by defining
  2693. * hidden properties.
  2694. */
  2695. /* istanbul ignore next */
  2696. function copyAugment (target, src, keys) {
  2697. for (var i = 0, l = keys.length; i < l; i++) {
  2698. var key = keys[i];
  2699. def(target, key, src[key]);
  2700. }
  2701. }
  2702. /**
  2703. * Attempt to create an observer instance for a value,
  2704. * returns the new observer if successfully observed,
  2705. * or the existing observer if the value already has one.
  2706. */
  2707. function observe (value, asRootData) {
  2708. if (!isObject(value) || value instanceof VNode) {
  2709. return
  2710. }
  2711. var ob;
  2712. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  2713. ob = value.__ob__;
  2714. } else if (
  2715. shouldObserve &&
  2716. !isServerRendering() &&
  2717. (Array.isArray(value) || isPlainObject(value)) &&
  2718. Object.isExtensible(value) &&
  2719. !value._isVue
  2720. ) {
  2721. ob = new Observer(value);
  2722. }
  2723. if (asRootData && ob) {
  2724. ob.vmCount++;
  2725. }
  2726. return ob
  2727. }
  2728. /**
  2729. * Define a reactive property on an Object.
  2730. */
  2731. function defineReactive$$1 (
  2732. obj,
  2733. key,
  2734. val,
  2735. customSetter,
  2736. shallow
  2737. ) {
  2738. var dep = new Dep();
  2739. var property = Object.getOwnPropertyDescriptor(obj, key);
  2740. if (property && property.configurable === false) {
  2741. return
  2742. }
  2743. // cater for pre-defined getter/setters
  2744. var getter = property && property.get;
  2745. var setter = property && property.set;
  2746. if ((!getter || setter) && arguments.length === 2) {
  2747. val = obj[key];
  2748. }
  2749. var childOb = !shallow && observe(val);
  2750. Object.defineProperty(obj, key, {
  2751. enumerable: true,
  2752. configurable: true,
  2753. get: function reactiveGetter () {
  2754. var value = getter ? getter.call(obj) : val;
  2755. if (Dep.SharedObject.target) { // fixed by xxxxxx
  2756. dep.depend();
  2757. if (childOb) {
  2758. childOb.dep.depend();
  2759. if (Array.isArray(value)) {
  2760. dependArray(value);
  2761. }
  2762. }
  2763. }
  2764. return value
  2765. },
  2766. set: function reactiveSetter (newVal) {
  2767. var value = getter ? getter.call(obj) : val;
  2768. /* eslint-disable no-self-compare */
  2769. if (newVal === value || (newVal !== newVal && value !== value)) {
  2770. return
  2771. }
  2772. /* eslint-enable no-self-compare */
  2773. if ( true && customSetter) {
  2774. customSetter();
  2775. }
  2776. // #7981: for accessor properties without setter
  2777. if (getter && !setter) { return }
  2778. if (setter) {
  2779. setter.call(obj, newVal);
  2780. } else {
  2781. val = newVal;
  2782. }
  2783. childOb = !shallow && observe(newVal);
  2784. dep.notify();
  2785. }
  2786. });
  2787. }
  2788. /**
  2789. * Set a property on an object. Adds the new property and
  2790. * triggers change notification if the property doesn't
  2791. * already exist.
  2792. */
  2793. function set (target, key, val) {
  2794. if ( true &&
  2795. (isUndef(target) || isPrimitive(target))
  2796. ) {
  2797. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  2798. }
  2799. if (Array.isArray(target) && isValidArrayIndex(key)) {
  2800. target.length = Math.max(target.length, key);
  2801. target.splice(key, 1, val);
  2802. return val
  2803. }
  2804. if (key in target && !(key in Object.prototype)) {
  2805. target[key] = val;
  2806. return val
  2807. }
  2808. var ob = (target).__ob__;
  2809. if (target._isVue || (ob && ob.vmCount)) {
  2810. true && warn(
  2811. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  2812. 'at runtime - declare it upfront in the data option.'
  2813. );
  2814. return val
  2815. }
  2816. if (!ob) {
  2817. target[key] = val;
  2818. return val
  2819. }
  2820. defineReactive$$1(ob.value, key, val);
  2821. ob.dep.notify();
  2822. return val
  2823. }
  2824. /**
  2825. * Delete a property and trigger change if necessary.
  2826. */
  2827. function del (target, key) {
  2828. if ( true &&
  2829. (isUndef(target) || isPrimitive(target))
  2830. ) {
  2831. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  2832. }
  2833. if (Array.isArray(target) && isValidArrayIndex(key)) {
  2834. target.splice(key, 1);
  2835. return
  2836. }
  2837. var ob = (target).__ob__;
  2838. if (target._isVue || (ob && ob.vmCount)) {
  2839. true && warn(
  2840. 'Avoid deleting properties on a Vue instance or its root $data ' +
  2841. '- just set it to null.'
  2842. );
  2843. return
  2844. }
  2845. if (!hasOwn(target, key)) {
  2846. return
  2847. }
  2848. delete target[key];
  2849. if (!ob) {
  2850. return
  2851. }
  2852. ob.dep.notify();
  2853. }
  2854. /**
  2855. * Collect dependencies on array elements when the array is touched, since
  2856. * we cannot intercept array element access like property getters.
  2857. */
  2858. function dependArray (value) {
  2859. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  2860. e = value[i];
  2861. e && e.__ob__ && e.__ob__.dep.depend();
  2862. if (Array.isArray(e)) {
  2863. dependArray(e);
  2864. }
  2865. }
  2866. }
  2867. /* */
  2868. /**
  2869. * Option overwriting strategies are functions that handle
  2870. * how to merge a parent option value and a child option
  2871. * value into the final value.
  2872. */
  2873. var strats = config.optionMergeStrategies;
  2874. /**
  2875. * Options with restrictions
  2876. */
  2877. if (true) {
  2878. strats.el = strats.propsData = function (parent, child, vm, key) {
  2879. if (!vm) {
  2880. warn(
  2881. "option \"" + key + "\" can only be used during instance " +
  2882. 'creation with the `new` keyword.'
  2883. );
  2884. }
  2885. return defaultStrat(parent, child)
  2886. };
  2887. }
  2888. /**
  2889. * Helper that recursively merges two data objects together.
  2890. */
  2891. function mergeData (to, from) {
  2892. if (!from) { return to }
  2893. var key, toVal, fromVal;
  2894. var keys = hasSymbol
  2895. ? Reflect.ownKeys(from)
  2896. : Object.keys(from);
  2897. for (var i = 0; i < keys.length; i++) {
  2898. key = keys[i];
  2899. // in case the object is already observed...
  2900. if (key === '__ob__') { continue }
  2901. toVal = to[key];
  2902. fromVal = from[key];
  2903. if (!hasOwn(to, key)) {
  2904. set(to, key, fromVal);
  2905. } else if (
  2906. toVal !== fromVal &&
  2907. isPlainObject(toVal) &&
  2908. isPlainObject(fromVal)
  2909. ) {
  2910. mergeData(toVal, fromVal);
  2911. }
  2912. }
  2913. return to
  2914. }
  2915. /**
  2916. * Data
  2917. */
  2918. function mergeDataOrFn (
  2919. parentVal,
  2920. childVal,
  2921. vm
  2922. ) {
  2923. if (!vm) {
  2924. // in a Vue.extend merge, both should be functions
  2925. if (!childVal) {
  2926. return parentVal
  2927. }
  2928. if (!parentVal) {
  2929. return childVal
  2930. }
  2931. // when parentVal & childVal are both present,
  2932. // we need to return a function that returns the
  2933. // merged result of both functions... no need to
  2934. // check if parentVal is a function here because
  2935. // it has to be a function to pass previous merges.
  2936. return function mergedDataFn () {
  2937. return mergeData(
  2938. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  2939. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  2940. )
  2941. }
  2942. } else {
  2943. return function mergedInstanceDataFn () {
  2944. // instance merge
  2945. var instanceData = typeof childVal === 'function'
  2946. ? childVal.call(vm, vm)
  2947. : childVal;
  2948. var defaultData = typeof parentVal === 'function'
  2949. ? parentVal.call(vm, vm)
  2950. : parentVal;
  2951. if (instanceData) {
  2952. return mergeData(instanceData, defaultData)
  2953. } else {
  2954. return defaultData
  2955. }
  2956. }
  2957. }
  2958. }
  2959. strats.data = function (
  2960. parentVal,
  2961. childVal,
  2962. vm
  2963. ) {
  2964. if (!vm) {
  2965. if (childVal && typeof childVal !== 'function') {
  2966. true && warn(
  2967. 'The "data" option should be a function ' +
  2968. 'that returns a per-instance value in component ' +
  2969. 'definitions.',
  2970. vm
  2971. );
  2972. return parentVal
  2973. }
  2974. return mergeDataOrFn(parentVal, childVal)
  2975. }
  2976. return mergeDataOrFn(parentVal, childVal, vm)
  2977. };
  2978. /**
  2979. * Hooks and props are merged as arrays.
  2980. */
  2981. function mergeHook (
  2982. parentVal,
  2983. childVal
  2984. ) {
  2985. var res = childVal
  2986. ? parentVal
  2987. ? parentVal.concat(childVal)
  2988. : Array.isArray(childVal)
  2989. ? childVal
  2990. : [childVal]
  2991. : parentVal;
  2992. return res
  2993. ? dedupeHooks(res)
  2994. : res
  2995. }
  2996. function dedupeHooks (hooks) {
  2997. var res = [];
  2998. for (var i = 0; i < hooks.length; i++) {
  2999. if (res.indexOf(hooks[i]) === -1) {
  3000. res.push(hooks[i]);
  3001. }
  3002. }
  3003. return res
  3004. }
  3005. LIFECYCLE_HOOKS.forEach(function (hook) {
  3006. strats[hook] = mergeHook;
  3007. });
  3008. /**
  3009. * Assets
  3010. *
  3011. * When a vm is present (instance creation), we need to do
  3012. * a three-way merge between constructor options, instance
  3013. * options and parent options.
  3014. */
  3015. function mergeAssets (
  3016. parentVal,
  3017. childVal,
  3018. vm,
  3019. key
  3020. ) {
  3021. var res = Object.create(parentVal || null);
  3022. if (childVal) {
  3023. true && assertObjectType(key, childVal, vm);
  3024. return extend(res, childVal)
  3025. } else {
  3026. return res
  3027. }
  3028. }
  3029. ASSET_TYPES.forEach(function (type) {
  3030. strats[type + 's'] = mergeAssets;
  3031. });
  3032. /**
  3033. * Watchers.
  3034. *
  3035. * Watchers hashes should not overwrite one
  3036. * another, so we merge them as arrays.
  3037. */
  3038. strats.watch = function (
  3039. parentVal,
  3040. childVal,
  3041. vm,
  3042. key
  3043. ) {
  3044. // work around Firefox's Object.prototype.watch...
  3045. if (parentVal === nativeWatch) { parentVal = undefined; }
  3046. if (childVal === nativeWatch) { childVal = undefined; }
  3047. /* istanbul ignore if */
  3048. if (!childVal) { return Object.create(parentVal || null) }
  3049. if (true) {
  3050. assertObjectType(key, childVal, vm);
  3051. }
  3052. if (!parentVal) { return childVal }
  3053. var ret = {};
  3054. extend(ret, parentVal);
  3055. for (var key$1 in childVal) {
  3056. var parent = ret[key$1];
  3057. var child = childVal[key$1];
  3058. if (parent && !Array.isArray(parent)) {
  3059. parent = [parent];
  3060. }
  3061. ret[key$1] = parent
  3062. ? parent.concat(child)
  3063. : Array.isArray(child) ? child : [child];
  3064. }
  3065. return ret
  3066. };
  3067. /**
  3068. * Other object hashes.
  3069. */
  3070. strats.props =
  3071. strats.methods =
  3072. strats.inject =
  3073. strats.computed = function (
  3074. parentVal,
  3075. childVal,
  3076. vm,
  3077. key
  3078. ) {
  3079. if (childVal && "development" !== 'production') {
  3080. assertObjectType(key, childVal, vm);
  3081. }
  3082. if (!parentVal) { return childVal }
  3083. var ret = Object.create(null);
  3084. extend(ret, parentVal);
  3085. if (childVal) { extend(ret, childVal); }
  3086. return ret
  3087. };
  3088. strats.provide = mergeDataOrFn;
  3089. /**
  3090. * Default strategy.
  3091. */
  3092. var defaultStrat = function (parentVal, childVal) {
  3093. return childVal === undefined
  3094. ? parentVal
  3095. : childVal
  3096. };
  3097. /**
  3098. * Validate component names
  3099. */
  3100. function checkComponents (options) {
  3101. for (var key in options.components) {
  3102. validateComponentName(key);
  3103. }
  3104. }
  3105. function validateComponentName (name) {
  3106. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  3107. warn(
  3108. 'Invalid component name: "' + name + '". Component names ' +
  3109. 'should conform to valid custom element name in html5 specification.'
  3110. );
  3111. }
  3112. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  3113. warn(
  3114. 'Do not use built-in or reserved HTML elements as component ' +
  3115. 'id: ' + name
  3116. );
  3117. }
  3118. }
  3119. /**
  3120. * Ensure all props option syntax are normalized into the
  3121. * Object-based format.
  3122. */
  3123. function normalizeProps (options, vm) {
  3124. var props = options.props;
  3125. if (!props) { return }
  3126. var res = {};
  3127. var i, val, name;
  3128. if (Array.isArray(props)) {
  3129. i = props.length;
  3130. while (i--) {
  3131. val = props[i];
  3132. if (typeof val === 'string') {
  3133. name = camelize(val);
  3134. res[name] = { type: null };
  3135. } else if (true) {
  3136. warn('props must be strings when using array syntax.');
  3137. }
  3138. }
  3139. } else if (isPlainObject(props)) {
  3140. for (var key in props) {
  3141. val = props[key];
  3142. name = camelize(key);
  3143. res[name] = isPlainObject(val)
  3144. ? val
  3145. : { type: val };
  3146. }
  3147. } else if (true) {
  3148. warn(
  3149. "Invalid value for option \"props\": expected an Array or an Object, " +
  3150. "but got " + (toRawType(props)) + ".",
  3151. vm
  3152. );
  3153. }
  3154. options.props = res;
  3155. }
  3156. /**
  3157. * Normalize all injections into Object-based format
  3158. */
  3159. function normalizeInject (options, vm) {
  3160. var inject = options.inject;
  3161. if (!inject) { return }
  3162. var normalized = options.inject = {};
  3163. if (Array.isArray(inject)) {
  3164. for (var i = 0; i < inject.length; i++) {
  3165. normalized[inject[i]] = { from: inject[i] };
  3166. }
  3167. } else if (isPlainObject(inject)) {
  3168. for (var key in inject) {
  3169. var val = inject[key];
  3170. normalized[key] = isPlainObject(val)
  3171. ? extend({ from: key }, val)
  3172. : { from: val };
  3173. }
  3174. } else if (true) {
  3175. warn(
  3176. "Invalid value for option \"inject\": expected an Array or an Object, " +
  3177. "but got " + (toRawType(inject)) + ".",
  3178. vm
  3179. );
  3180. }
  3181. }
  3182. /**
  3183. * Normalize raw function directives into object format.
  3184. */
  3185. function normalizeDirectives (options) {
  3186. var dirs = options.directives;
  3187. if (dirs) {
  3188. for (var key in dirs) {
  3189. var def$$1 = dirs[key];
  3190. if (typeof def$$1 === 'function') {
  3191. dirs[key] = { bind: def$$1, update: def$$1 };
  3192. }
  3193. }
  3194. }
  3195. }
  3196. function assertObjectType (name, value, vm) {
  3197. if (!isPlainObject(value)) {
  3198. warn(
  3199. "Invalid value for option \"" + name + "\": expected an Object, " +
  3200. "but got " + (toRawType(value)) + ".",
  3201. vm
  3202. );
  3203. }
  3204. }
  3205. /**
  3206. * Merge two option objects into a new one.
  3207. * Core utility used in both instantiation and inheritance.
  3208. */
  3209. function mergeOptions (
  3210. parent,
  3211. child,
  3212. vm
  3213. ) {
  3214. if (true) {
  3215. checkComponents(child);
  3216. }
  3217. if (typeof child === 'function') {
  3218. child = child.options;
  3219. }
  3220. normalizeProps(child, vm);
  3221. normalizeInject(child, vm);
  3222. normalizeDirectives(child);
  3223. // Apply extends and mixins on the child options,
  3224. // but only if it is a raw options object that isn't
  3225. // the result of another mergeOptions call.
  3226. // Only merged options has the _base property.
  3227. if (!child._base) {
  3228. if (child.extends) {
  3229. parent = mergeOptions(parent, child.extends, vm);
  3230. }
  3231. if (child.mixins) {
  3232. for (var i = 0, l = child.mixins.length; i < l; i++) {
  3233. parent = mergeOptions(parent, child.mixins[i], vm);
  3234. }
  3235. }
  3236. }
  3237. var options = {};
  3238. var key;
  3239. for (key in parent) {
  3240. mergeField(key);
  3241. }
  3242. for (key in child) {
  3243. if (!hasOwn(parent, key)) {
  3244. mergeField(key);
  3245. }
  3246. }
  3247. function mergeField (key) {
  3248. var strat = strats[key] || defaultStrat;
  3249. options[key] = strat(parent[key], child[key], vm, key);
  3250. }
  3251. return options
  3252. }
  3253. /**
  3254. * Resolve an asset.
  3255. * This function is used because child instances need access
  3256. * to assets defined in its ancestor chain.
  3257. */
  3258. function resolveAsset (
  3259. options,
  3260. type,
  3261. id,
  3262. warnMissing
  3263. ) {
  3264. /* istanbul ignore if */
  3265. if (typeof id !== 'string') {
  3266. return
  3267. }
  3268. var assets = options[type];
  3269. // check local registration variations first
  3270. if (hasOwn(assets, id)) { return assets[id] }
  3271. var camelizedId = camelize(id);
  3272. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  3273. var PascalCaseId = capitalize(camelizedId);
  3274. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  3275. // fallback to prototype chain
  3276. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  3277. if ( true && warnMissing && !res) {
  3278. warn(
  3279. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  3280. options
  3281. );
  3282. }
  3283. return res
  3284. }
  3285. /* */
  3286. function validateProp (
  3287. key,
  3288. propOptions,
  3289. propsData,
  3290. vm
  3291. ) {
  3292. var prop = propOptions[key];
  3293. var absent = !hasOwn(propsData, key);
  3294. var value = propsData[key];
  3295. // boolean casting
  3296. var booleanIndex = getTypeIndex(Boolean, prop.type);
  3297. if (booleanIndex > -1) {
  3298. if (absent && !hasOwn(prop, 'default')) {
  3299. value = false;
  3300. } else if (value === '' || value === hyphenate(key)) {
  3301. // only cast empty string / same name to boolean if
  3302. // boolean has higher priority
  3303. var stringIndex = getTypeIndex(String, prop.type);
  3304. if (stringIndex < 0 || booleanIndex < stringIndex) {
  3305. value = true;
  3306. }
  3307. }
  3308. }
  3309. // check default value
  3310. if (value === undefined) {
  3311. value = getPropDefaultValue(vm, prop, key);
  3312. // since the default value is a fresh copy,
  3313. // make sure to observe it.
  3314. var prevShouldObserve = shouldObserve;
  3315. toggleObserving(true);
  3316. observe(value);
  3317. toggleObserving(prevShouldObserve);
  3318. }
  3319. if (
  3320. true
  3321. ) {
  3322. assertProp(prop, key, value, vm, absent);
  3323. }
  3324. return value
  3325. }
  3326. /**
  3327. * Get the default value of a prop.
  3328. */
  3329. function getPropDefaultValue (vm, prop, key) {
  3330. // no default, return undefined
  3331. if (!hasOwn(prop, 'default')) {
  3332. return undefined
  3333. }
  3334. var def = prop.default;
  3335. // warn against non-factory defaults for Object & Array
  3336. if ( true && isObject(def)) {
  3337. warn(
  3338. 'Invalid default value for prop "' + key + '": ' +
  3339. 'Props with type Object/Array must use a factory function ' +
  3340. 'to return the default value.',
  3341. vm
  3342. );
  3343. }
  3344. // the raw prop value was also undefined from previous render,
  3345. // return previous default value to avoid unnecessary watcher trigger
  3346. if (vm && vm.$options.propsData &&
  3347. vm.$options.propsData[key] === undefined &&
  3348. vm._props[key] !== undefined
  3349. ) {
  3350. return vm._props[key]
  3351. }
  3352. // call factory function for non-Function types
  3353. // a value is Function if its prototype is function even across different execution context
  3354. return typeof def === 'function' && getType(prop.type) !== 'Function'
  3355. ? def.call(vm)
  3356. : def
  3357. }
  3358. /**
  3359. * Assert whether a prop is valid.
  3360. */
  3361. function assertProp (
  3362. prop,
  3363. name,
  3364. value,
  3365. vm,
  3366. absent
  3367. ) {
  3368. if (prop.required && absent) {
  3369. warn(
  3370. 'Missing required prop: "' + name + '"',
  3371. vm
  3372. );
  3373. return
  3374. }
  3375. if (value == null && !prop.required) {
  3376. return
  3377. }
  3378. var type = prop.type;
  3379. var valid = !type || type === true;
  3380. var expectedTypes = [];
  3381. if (type) {
  3382. if (!Array.isArray(type)) {
  3383. type = [type];
  3384. }
  3385. for (var i = 0; i < type.length && !valid; i++) {
  3386. var assertedType = assertType(value, type[i]);
  3387. expectedTypes.push(assertedType.expectedType || '');
  3388. valid = assertedType.valid;
  3389. }
  3390. }
  3391. if (!valid) {
  3392. warn(
  3393. getInvalidTypeMessage(name, value, expectedTypes),
  3394. vm
  3395. );
  3396. return
  3397. }
  3398. var validator = prop.validator;
  3399. if (validator) {
  3400. if (!validator(value)) {
  3401. warn(
  3402. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  3403. vm
  3404. );
  3405. }
  3406. }
  3407. }
  3408. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  3409. function assertType (value, type) {
  3410. var valid;
  3411. var expectedType = getType(type);
  3412. if (simpleCheckRE.test(expectedType)) {
  3413. var t = typeof value;
  3414. valid = t === expectedType.toLowerCase();
  3415. // for primitive wrapper objects
  3416. if (!valid && t === 'object') {
  3417. valid = value instanceof type;
  3418. }
  3419. } else if (expectedType === 'Object') {
  3420. valid = isPlainObject(value);
  3421. } else if (expectedType === 'Array') {
  3422. valid = Array.isArray(value);
  3423. } else {
  3424. valid = value instanceof type;
  3425. }
  3426. return {
  3427. valid: valid,
  3428. expectedType: expectedType
  3429. }
  3430. }
  3431. /**
  3432. * Use function string name to check built-in types,
  3433. * because a simple equality check will fail when running
  3434. * across different vms / iframes.
  3435. */
  3436. function getType (fn) {
  3437. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  3438. return match ? match[1] : ''
  3439. }
  3440. function isSameType (a, b) {
  3441. return getType(a) === getType(b)
  3442. }
  3443. function getTypeIndex (type, expectedTypes) {
  3444. if (!Array.isArray(expectedTypes)) {
  3445. return isSameType(expectedTypes, type) ? 0 : -1
  3446. }
  3447. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  3448. if (isSameType(expectedTypes[i], type)) {
  3449. return i
  3450. }
  3451. }
  3452. return -1
  3453. }
  3454. function getInvalidTypeMessage (name, value, expectedTypes) {
  3455. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  3456. " Expected " + (expectedTypes.map(capitalize).join(', '));
  3457. var expectedType = expectedTypes[0];
  3458. var receivedType = toRawType(value);
  3459. var expectedValue = styleValue(value, expectedType);
  3460. var receivedValue = styleValue(value, receivedType);
  3461. // check if we need to specify expected value
  3462. if (expectedTypes.length === 1 &&
  3463. isExplicable(expectedType) &&
  3464. !isBoolean(expectedType, receivedType)) {
  3465. message += " with value " + expectedValue;
  3466. }
  3467. message += ", got " + receivedType + " ";
  3468. // check if we need to specify received value
  3469. if (isExplicable(receivedType)) {
  3470. message += "with value " + receivedValue + ".";
  3471. }
  3472. return message
  3473. }
  3474. function styleValue (value, type) {
  3475. if (type === 'String') {
  3476. return ("\"" + value + "\"")
  3477. } else if (type === 'Number') {
  3478. return ("" + (Number(value)))
  3479. } else {
  3480. return ("" + value)
  3481. }
  3482. }
  3483. function isExplicable (value) {
  3484. var explicitTypes = ['string', 'number', 'boolean'];
  3485. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  3486. }
  3487. function isBoolean () {
  3488. var args = [], len = arguments.length;
  3489. while ( len-- ) args[ len ] = arguments[ len ];
  3490. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  3491. }
  3492. /* */
  3493. function handleError (err, vm, info) {
  3494. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  3495. // See: https://github.com/vuejs/vuex/issues/1505
  3496. pushTarget();
  3497. try {
  3498. if (vm) {
  3499. var cur = vm;
  3500. while ((cur = cur.$parent)) {
  3501. var hooks = cur.$options.errorCaptured;
  3502. if (hooks) {
  3503. for (var i = 0; i < hooks.length; i++) {
  3504. try {
  3505. var capture = hooks[i].call(cur, err, vm, info) === false;
  3506. if (capture) { return }
  3507. } catch (e) {
  3508. globalHandleError(e, cur, 'errorCaptured hook');
  3509. }
  3510. }
  3511. }
  3512. }
  3513. }
  3514. globalHandleError(err, vm, info);
  3515. } finally {
  3516. popTarget();
  3517. }
  3518. }
  3519. function invokeWithErrorHandling (
  3520. handler,
  3521. context,
  3522. args,
  3523. vm,
  3524. info
  3525. ) {
  3526. var res;
  3527. try {
  3528. res = args ? handler.apply(context, args) : handler.call(context);
  3529. if (res && !res._isVue && isPromise(res) && !res._handled) {
  3530. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  3531. // issue #9511
  3532. // avoid catch triggering multiple times when nested calls
  3533. res._handled = true;
  3534. }
  3535. } catch (e) {
  3536. handleError(e, vm, info);
  3537. }
  3538. return res
  3539. }
  3540. function globalHandleError (err, vm, info) {
  3541. if (config.errorHandler) {
  3542. try {
  3543. return config.errorHandler.call(null, err, vm, info)
  3544. } catch (e) {
  3545. // if the user intentionally throws the original error in the handler,
  3546. // do not log it twice
  3547. if (e !== err) {
  3548. logError(e, null, 'config.errorHandler');
  3549. }
  3550. }
  3551. }
  3552. logError(err, vm, info);
  3553. }
  3554. function logError (err, vm, info) {
  3555. if (true) {
  3556. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  3557. }
  3558. /* istanbul ignore else */
  3559. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  3560. console.error(err);
  3561. } else {
  3562. throw err
  3563. }
  3564. }
  3565. /* */
  3566. var callbacks = [];
  3567. var pending = false;
  3568. function flushCallbacks () {
  3569. pending = false;
  3570. var copies = callbacks.slice(0);
  3571. callbacks.length = 0;
  3572. for (var i = 0; i < copies.length; i++) {
  3573. copies[i]();
  3574. }
  3575. }
  3576. // Here we have async deferring wrappers using microtasks.
  3577. // In 2.5 we used (macro) tasks (in combination with microtasks).
  3578. // However, it has subtle problems when state is changed right before repaint
  3579. // (e.g. #6813, out-in transitions).
  3580. // Also, using (macro) tasks in event handler would cause some weird behaviors
  3581. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  3582. // So we now use microtasks everywhere, again.
  3583. // A major drawback of this tradeoff is that there are some scenarios
  3584. // where microtasks have too high a priority and fire in between supposedly
  3585. // sequential events (e.g. #4521, #6690, which have workarounds)
  3586. // or even between bubbling of the same event (#6566).
  3587. var timerFunc;
  3588. // The nextTick behavior leverages the microtask queue, which can be accessed
  3589. // via either native Promise.then or MutationObserver.
  3590. // MutationObserver has wider support, however it is seriously bugged in
  3591. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  3592. // completely stops working after triggering a few times... so, if native
  3593. // Promise is available, we will use it:
  3594. /* istanbul ignore next, $flow-disable-line */
  3595. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  3596. var p = Promise.resolve();
  3597. timerFunc = function () {
  3598. p.then(flushCallbacks);
  3599. // In problematic UIWebViews, Promise.then doesn't completely break, but
  3600. // it can get stuck in a weird state where callbacks are pushed into the
  3601. // microtask queue but the queue isn't being flushed, until the browser
  3602. // needs to do some other work, e.g. handle a timer. Therefore we can
  3603. // "force" the microtask queue to be flushed by adding an empty timer.
  3604. if (isIOS) { setTimeout(noop); }
  3605. };
  3606. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  3607. isNative(MutationObserver) ||
  3608. // PhantomJS and iOS 7.x
  3609. MutationObserver.toString() === '[object MutationObserverConstructor]'
  3610. )) {
  3611. // Use MutationObserver where native Promise is not available,
  3612. // e.g. PhantomJS, iOS7, Android 4.4
  3613. // (#6466 MutationObserver is unreliable in IE11)
  3614. var counter = 1;
  3615. var observer = new MutationObserver(flushCallbacks);
  3616. var textNode = document.createTextNode(String(counter));
  3617. observer.observe(textNode, {
  3618. characterData: true
  3619. });
  3620. timerFunc = function () {
  3621. counter = (counter + 1) % 2;
  3622. textNode.data = String(counter);
  3623. };
  3624. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  3625. // Fallback to setImmediate.
  3626. // Technically it leverages the (macro) task queue,
  3627. // but it is still a better choice than setTimeout.
  3628. timerFunc = function () {
  3629. setImmediate(flushCallbacks);
  3630. };
  3631. } else {
  3632. // Fallback to setTimeout.
  3633. timerFunc = function () {
  3634. setTimeout(flushCallbacks, 0);
  3635. };
  3636. }
  3637. function nextTick (cb, ctx) {
  3638. var _resolve;
  3639. callbacks.push(function () {
  3640. if (cb) {
  3641. try {
  3642. cb.call(ctx);
  3643. } catch (e) {
  3644. handleError(e, ctx, 'nextTick');
  3645. }
  3646. } else if (_resolve) {
  3647. _resolve(ctx);
  3648. }
  3649. });
  3650. if (!pending) {
  3651. pending = true;
  3652. timerFunc();
  3653. }
  3654. // $flow-disable-line
  3655. if (!cb && typeof Promise !== 'undefined') {
  3656. return new Promise(function (resolve) {
  3657. _resolve = resolve;
  3658. })
  3659. }
  3660. }
  3661. /* */
  3662. /* not type checking this file because flow doesn't play well with Proxy */
  3663. var initProxy;
  3664. if (true) {
  3665. var allowedGlobals = makeMap(
  3666. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  3667. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  3668. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  3669. 'require' // for Webpack/Browserify
  3670. );
  3671. var warnNonPresent = function (target, key) {
  3672. warn(
  3673. "Property or method \"" + key + "\" is not defined on the instance but " +
  3674. 'referenced during render. Make sure that this property is reactive, ' +
  3675. 'either in the data option, or for class-based components, by ' +
  3676. 'initializing the property. ' +
  3677. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  3678. target
  3679. );
  3680. };
  3681. var warnReservedPrefix = function (target, key) {
  3682. warn(
  3683. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  3684. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  3685. 'prevent conflicts with Vue internals. ' +
  3686. 'See: https://vuejs.org/v2/api/#data',
  3687. target
  3688. );
  3689. };
  3690. var hasProxy =
  3691. typeof Proxy !== 'undefined' && isNative(Proxy);
  3692. if (hasProxy) {
  3693. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  3694. config.keyCodes = new Proxy(config.keyCodes, {
  3695. set: function set (target, key, value) {
  3696. if (isBuiltInModifier(key)) {
  3697. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  3698. return false
  3699. } else {
  3700. target[key] = value;
  3701. return true
  3702. }
  3703. }
  3704. });
  3705. }
  3706. var hasHandler = {
  3707. has: function has (target, key) {
  3708. var has = key in target;
  3709. var isAllowed = allowedGlobals(key) ||
  3710. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  3711. if (!has && !isAllowed) {
  3712. if (key in target.$data) { warnReservedPrefix(target, key); }
  3713. else { warnNonPresent(target, key); }
  3714. }
  3715. return has || !isAllowed
  3716. }
  3717. };
  3718. var getHandler = {
  3719. get: function get (target, key) {
  3720. if (typeof key === 'string' && !(key in target)) {
  3721. if (key in target.$data) { warnReservedPrefix(target, key); }
  3722. else { warnNonPresent(target, key); }
  3723. }
  3724. return target[key]
  3725. }
  3726. };
  3727. initProxy = function initProxy (vm) {
  3728. if (hasProxy) {
  3729. // determine which proxy handler to use
  3730. var options = vm.$options;
  3731. var handlers = options.render && options.render._withStripped
  3732. ? getHandler
  3733. : hasHandler;
  3734. vm._renderProxy = new Proxy(vm, handlers);
  3735. } else {
  3736. vm._renderProxy = vm;
  3737. }
  3738. };
  3739. }
  3740. /* */
  3741. var seenObjects = new _Set();
  3742. /**
  3743. * Recursively traverse an object to evoke all converted
  3744. * getters, so that every nested property inside the object
  3745. * is collected as a "deep" dependency.
  3746. */
  3747. function traverse (val) {
  3748. _traverse(val, seenObjects);
  3749. seenObjects.clear();
  3750. }
  3751. function _traverse (val, seen) {
  3752. var i, keys;
  3753. var isA = Array.isArray(val);
  3754. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  3755. return
  3756. }
  3757. if (val.__ob__) {
  3758. var depId = val.__ob__.dep.id;
  3759. if (seen.has(depId)) {
  3760. return
  3761. }
  3762. seen.add(depId);
  3763. }
  3764. if (isA) {
  3765. i = val.length;
  3766. while (i--) { _traverse(val[i], seen); }
  3767. } else {
  3768. keys = Object.keys(val);
  3769. i = keys.length;
  3770. while (i--) { _traverse(val[keys[i]], seen); }
  3771. }
  3772. }
  3773. var mark;
  3774. var measure;
  3775. if (true) {
  3776. var perf = inBrowser && window.performance;
  3777. /* istanbul ignore if */
  3778. if (
  3779. perf &&
  3780. perf.mark &&
  3781. perf.measure &&
  3782. perf.clearMarks &&
  3783. perf.clearMeasures
  3784. ) {
  3785. mark = function (tag) { return perf.mark(tag); };
  3786. measure = function (name, startTag, endTag) {
  3787. perf.measure(name, startTag, endTag);
  3788. perf.clearMarks(startTag);
  3789. perf.clearMarks(endTag);
  3790. // perf.clearMeasures(name)
  3791. };
  3792. }
  3793. }
  3794. /* */
  3795. var normalizeEvent = cached(function (name) {
  3796. var passive = name.charAt(0) === '&';
  3797. name = passive ? name.slice(1) : name;
  3798. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  3799. name = once$$1 ? name.slice(1) : name;
  3800. var capture = name.charAt(0) === '!';
  3801. name = capture ? name.slice(1) : name;
  3802. return {
  3803. name: name,
  3804. once: once$$1,
  3805. capture: capture,
  3806. passive: passive
  3807. }
  3808. });
  3809. function createFnInvoker (fns, vm) {
  3810. function invoker () {
  3811. var arguments$1 = arguments;
  3812. var fns = invoker.fns;
  3813. if (Array.isArray(fns)) {
  3814. var cloned = fns.slice();
  3815. for (var i = 0; i < cloned.length; i++) {
  3816. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  3817. }
  3818. } else {
  3819. // return handler return value for single handlers
  3820. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  3821. }
  3822. }
  3823. invoker.fns = fns;
  3824. return invoker
  3825. }
  3826. function updateListeners (
  3827. on,
  3828. oldOn,
  3829. add,
  3830. remove$$1,
  3831. createOnceHandler,
  3832. vm
  3833. ) {
  3834. var name, def$$1, cur, old, event;
  3835. for (name in on) {
  3836. def$$1 = cur = on[name];
  3837. old = oldOn[name];
  3838. event = normalizeEvent(name);
  3839. if (isUndef(cur)) {
  3840. true && warn(
  3841. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  3842. vm
  3843. );
  3844. } else if (isUndef(old)) {
  3845. if (isUndef(cur.fns)) {
  3846. cur = on[name] = createFnInvoker(cur, vm);
  3847. }
  3848. if (isTrue(event.once)) {
  3849. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  3850. }
  3851. add(event.name, cur, event.capture, event.passive, event.params);
  3852. } else if (cur !== old) {
  3853. old.fns = cur;
  3854. on[name] = old;
  3855. }
  3856. }
  3857. for (name in oldOn) {
  3858. if (isUndef(on[name])) {
  3859. event = normalizeEvent(name);
  3860. remove$$1(event.name, oldOn[name], event.capture);
  3861. }
  3862. }
  3863. }
  3864. /* */
  3865. /* */
  3866. // fixed by xxxxxx (mp properties)
  3867. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  3868. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  3869. if (isUndef(propOptions)) {
  3870. return res
  3871. }
  3872. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  3873. var attrs = data.attrs;
  3874. var props = data.props;
  3875. if (isDef(attrs) || isDef(props)) {
  3876. for (var key in propOptions) {
  3877. var altKey = hyphenate(key);
  3878. var result = checkProp(res, props, key, altKey, true) ||
  3879. checkProp(res, attrs, key, altKey, false);
  3880. // externalClass
  3881. if (
  3882. result &&
  3883. res[key] &&
  3884. externalClasses.indexOf(altKey) !== -1 &&
  3885. context[camelize(res[key])]
  3886. ) {
  3887. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  3888. res[key] = context[camelize(res[key])];
  3889. }
  3890. }
  3891. }
  3892. return res
  3893. }
  3894. function extractPropsFromVNodeData (
  3895. data,
  3896. Ctor,
  3897. tag,
  3898. context// fixed by xxxxxx
  3899. ) {
  3900. // we are only extracting raw values here.
  3901. // validation and default values are handled in the child
  3902. // component itself.
  3903. var propOptions = Ctor.options.props;
  3904. if (isUndef(propOptions)) {
  3905. // fixed by xxxxxx
  3906. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  3907. }
  3908. var res = {};
  3909. var attrs = data.attrs;
  3910. var props = data.props;
  3911. if (isDef(attrs) || isDef(props)) {
  3912. for (var key in propOptions) {
  3913. var altKey = hyphenate(key);
  3914. if (true) {
  3915. var keyInLowerCase = key.toLowerCase();
  3916. if (
  3917. key !== keyInLowerCase &&
  3918. attrs && hasOwn(attrs, keyInLowerCase)
  3919. ) {
  3920. tip(
  3921. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  3922. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  3923. " \"" + key + "\". " +
  3924. "Note that HTML attributes are case-insensitive and camelCased " +
  3925. "props need to use their kebab-case equivalents when using in-DOM " +
  3926. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  3927. );
  3928. }
  3929. }
  3930. checkProp(res, props, key, altKey, true) ||
  3931. checkProp(res, attrs, key, altKey, false);
  3932. }
  3933. }
  3934. // fixed by xxxxxx
  3935. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  3936. }
  3937. function checkProp (
  3938. res,
  3939. hash,
  3940. key,
  3941. altKey,
  3942. preserve
  3943. ) {
  3944. if (isDef(hash)) {
  3945. if (hasOwn(hash, key)) {
  3946. res[key] = hash[key];
  3947. if (!preserve) {
  3948. delete hash[key];
  3949. }
  3950. return true
  3951. } else if (hasOwn(hash, altKey)) {
  3952. res[key] = hash[altKey];
  3953. if (!preserve) {
  3954. delete hash[altKey];
  3955. }
  3956. return true
  3957. }
  3958. }
  3959. return false
  3960. }
  3961. /* */
  3962. // The template compiler attempts to minimize the need for normalization by
  3963. // statically analyzing the template at compile time.
  3964. //
  3965. // For plain HTML markup, normalization can be completely skipped because the
  3966. // generated render function is guaranteed to return Array<VNode>. There are
  3967. // two cases where extra normalization is needed:
  3968. // 1. When the children contains components - because a functional component
  3969. // may return an Array instead of a single root. In this case, just a simple
  3970. // normalization is needed - if any child is an Array, we flatten the whole
  3971. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  3972. // because functional components already normalize their own children.
  3973. function simpleNormalizeChildren (children) {
  3974. for (var i = 0; i < children.length; i++) {
  3975. if (Array.isArray(children[i])) {
  3976. return Array.prototype.concat.apply([], children)
  3977. }
  3978. }
  3979. return children
  3980. }
  3981. // 2. When the children contains constructs that always generated nested Arrays,
  3982. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  3983. // with hand-written render functions / JSX. In such cases a full normalization
  3984. // is needed to cater to all possible types of children values.
  3985. function normalizeChildren (children) {
  3986. return isPrimitive(children)
  3987. ? [createTextVNode(children)]
  3988. : Array.isArray(children)
  3989. ? normalizeArrayChildren(children)
  3990. : undefined
  3991. }
  3992. function isTextNode (node) {
  3993. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  3994. }
  3995. function normalizeArrayChildren (children, nestedIndex) {
  3996. var res = [];
  3997. var i, c, lastIndex, last;
  3998. for (i = 0; i < children.length; i++) {
  3999. c = children[i];
  4000. if (isUndef(c) || typeof c === 'boolean') { continue }
  4001. lastIndex = res.length - 1;
  4002. last = res[lastIndex];
  4003. // nested
  4004. if (Array.isArray(c)) {
  4005. if (c.length > 0) {
  4006. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  4007. // merge adjacent text nodes
  4008. if (isTextNode(c[0]) && isTextNode(last)) {
  4009. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  4010. c.shift();
  4011. }
  4012. res.push.apply(res, c);
  4013. }
  4014. } else if (isPrimitive(c)) {
  4015. if (isTextNode(last)) {
  4016. // merge adjacent text nodes
  4017. // this is necessary for SSR hydration because text nodes are
  4018. // essentially merged when rendered to HTML strings
  4019. res[lastIndex] = createTextVNode(last.text + c);
  4020. } else if (c !== '') {
  4021. // convert primitive to vnode
  4022. res.push(createTextVNode(c));
  4023. }
  4024. } else {
  4025. if (isTextNode(c) && isTextNode(last)) {
  4026. // merge adjacent text nodes
  4027. res[lastIndex] = createTextVNode(last.text + c.text);
  4028. } else {
  4029. // default key for nested array children (likely generated by v-for)
  4030. if (isTrue(children._isVList) &&
  4031. isDef(c.tag) &&
  4032. isUndef(c.key) &&
  4033. isDef(nestedIndex)) {
  4034. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  4035. }
  4036. res.push(c);
  4037. }
  4038. }
  4039. }
  4040. return res
  4041. }
  4042. /* */
  4043. function initProvide (vm) {
  4044. var provide = vm.$options.provide;
  4045. if (provide) {
  4046. vm._provided = typeof provide === 'function'
  4047. ? provide.call(vm)
  4048. : provide;
  4049. }
  4050. }
  4051. function initInjections (vm) {
  4052. var result = resolveInject(vm.$options.inject, vm);
  4053. if (result) {
  4054. toggleObserving(false);
  4055. Object.keys(result).forEach(function (key) {
  4056. /* istanbul ignore else */
  4057. if (true) {
  4058. defineReactive$$1(vm, key, result[key], function () {
  4059. warn(
  4060. "Avoid mutating an injected value directly since the changes will be " +
  4061. "overwritten whenever the provided component re-renders. " +
  4062. "injection being mutated: \"" + key + "\"",
  4063. vm
  4064. );
  4065. });
  4066. } else {}
  4067. });
  4068. toggleObserving(true);
  4069. }
  4070. }
  4071. function resolveInject (inject, vm) {
  4072. if (inject) {
  4073. // inject is :any because flow is not smart enough to figure out cached
  4074. var result = Object.create(null);
  4075. var keys = hasSymbol
  4076. ? Reflect.ownKeys(inject)
  4077. : Object.keys(inject);
  4078. for (var i = 0; i < keys.length; i++) {
  4079. var key = keys[i];
  4080. // #6574 in case the inject object is observed...
  4081. if (key === '__ob__') { continue }
  4082. var provideKey = inject[key].from;
  4083. var source = vm;
  4084. while (source) {
  4085. if (source._provided && hasOwn(source._provided, provideKey)) {
  4086. result[key] = source._provided[provideKey];
  4087. break
  4088. }
  4089. source = source.$parent;
  4090. }
  4091. if (!source) {
  4092. if ('default' in inject[key]) {
  4093. var provideDefault = inject[key].default;
  4094. result[key] = typeof provideDefault === 'function'
  4095. ? provideDefault.call(vm)
  4096. : provideDefault;
  4097. } else if (true) {
  4098. warn(("Injection \"" + key + "\" not found"), vm);
  4099. }
  4100. }
  4101. }
  4102. return result
  4103. }
  4104. }
  4105. /* */
  4106. /**
  4107. * Runtime helper for resolving raw children VNodes into a slot object.
  4108. */
  4109. function resolveSlots (
  4110. children,
  4111. context
  4112. ) {
  4113. if (!children || !children.length) {
  4114. return {}
  4115. }
  4116. var slots = {};
  4117. for (var i = 0, l = children.length; i < l; i++) {
  4118. var child = children[i];
  4119. var data = child.data;
  4120. // remove slot attribute if the node is resolved as a Vue slot node
  4121. if (data && data.attrs && data.attrs.slot) {
  4122. delete data.attrs.slot;
  4123. }
  4124. // named slots should only be respected if the vnode was rendered in the
  4125. // same context.
  4126. if ((child.context === context || child.fnContext === context) &&
  4127. data && data.slot != null
  4128. ) {
  4129. var name = data.slot;
  4130. var slot = (slots[name] || (slots[name] = []));
  4131. if (child.tag === 'template') {
  4132. slot.push.apply(slot, child.children || []);
  4133. } else {
  4134. slot.push(child);
  4135. }
  4136. } else {
  4137. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  4138. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  4139. (slots['page'] || (slots['page'] = [])).push(child);
  4140. }else{
  4141. (slots.default || (slots.default = [])).push(child);
  4142. }
  4143. }
  4144. }
  4145. // ignore slots that contains only whitespace
  4146. for (var name$1 in slots) {
  4147. if (slots[name$1].every(isWhitespace)) {
  4148. delete slots[name$1];
  4149. }
  4150. }
  4151. return slots
  4152. }
  4153. function isWhitespace (node) {
  4154. return (node.isComment && !node.asyncFactory) || node.text === ' '
  4155. }
  4156. /* */
  4157. function normalizeScopedSlots (
  4158. slots,
  4159. normalSlots,
  4160. prevSlots
  4161. ) {
  4162. var res;
  4163. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  4164. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  4165. var key = slots && slots.$key;
  4166. if (!slots) {
  4167. res = {};
  4168. } else if (slots._normalized) {
  4169. // fast path 1: child component re-render only, parent did not change
  4170. return slots._normalized
  4171. } else if (
  4172. isStable &&
  4173. prevSlots &&
  4174. prevSlots !== emptyObject &&
  4175. key === prevSlots.$key &&
  4176. !hasNormalSlots &&
  4177. !prevSlots.$hasNormal
  4178. ) {
  4179. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  4180. // only need to normalize once
  4181. return prevSlots
  4182. } else {
  4183. res = {};
  4184. for (var key$1 in slots) {
  4185. if (slots[key$1] && key$1[0] !== '$') {
  4186. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  4187. }
  4188. }
  4189. }
  4190. // expose normal slots on scopedSlots
  4191. for (var key$2 in normalSlots) {
  4192. if (!(key$2 in res)) {
  4193. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  4194. }
  4195. }
  4196. // avoriaz seems to mock a non-extensible $scopedSlots object
  4197. // and when that is passed down this would cause an error
  4198. if (slots && Object.isExtensible(slots)) {
  4199. (slots)._normalized = res;
  4200. }
  4201. def(res, '$stable', isStable);
  4202. def(res, '$key', key);
  4203. def(res, '$hasNormal', hasNormalSlots);
  4204. return res
  4205. }
  4206. function normalizeScopedSlot(normalSlots, key, fn) {
  4207. var normalized = function () {
  4208. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  4209. res = res && typeof res === 'object' && !Array.isArray(res)
  4210. ? [res] // single vnode
  4211. : normalizeChildren(res);
  4212. return res && (
  4213. res.length === 0 ||
  4214. (res.length === 1 && res[0].isComment) // #9658
  4215. ) ? undefined
  4216. : res
  4217. };
  4218. // this is a slot using the new v-slot syntax without scope. although it is
  4219. // compiled as a scoped slot, render fn users would expect it to be present
  4220. // on this.$slots because the usage is semantically a normal slot.
  4221. if (fn.proxy) {
  4222. Object.defineProperty(normalSlots, key, {
  4223. get: normalized,
  4224. enumerable: true,
  4225. configurable: true
  4226. });
  4227. }
  4228. return normalized
  4229. }
  4230. function proxyNormalSlot(slots, key) {
  4231. return function () { return slots[key]; }
  4232. }
  4233. /* */
  4234. /**
  4235. * Runtime helper for rendering v-for lists.
  4236. */
  4237. function renderList (
  4238. val,
  4239. render
  4240. ) {
  4241. var ret, i, l, keys, key;
  4242. if (Array.isArray(val) || typeof val === 'string') {
  4243. ret = new Array(val.length);
  4244. for (i = 0, l = val.length; i < l; i++) {
  4245. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  4246. }
  4247. } else if (typeof val === 'number') {
  4248. ret = new Array(val);
  4249. for (i = 0; i < val; i++) {
  4250. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  4251. }
  4252. } else if (isObject(val)) {
  4253. if (hasSymbol && val[Symbol.iterator]) {
  4254. ret = [];
  4255. var iterator = val[Symbol.iterator]();
  4256. var result = iterator.next();
  4257. while (!result.done) {
  4258. ret.push(render(result.value, ret.length, i++, i)); // fixed by xxxxxx
  4259. result = iterator.next();
  4260. }
  4261. } else {
  4262. keys = Object.keys(val);
  4263. ret = new Array(keys.length);
  4264. for (i = 0, l = keys.length; i < l; i++) {
  4265. key = keys[i];
  4266. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  4267. }
  4268. }
  4269. }
  4270. if (!isDef(ret)) {
  4271. ret = [];
  4272. }
  4273. (ret)._isVList = true;
  4274. return ret
  4275. }
  4276. /* */
  4277. /**
  4278. * Runtime helper for rendering <slot>
  4279. */
  4280. function renderSlot (
  4281. name,
  4282. fallback,
  4283. props,
  4284. bindObject
  4285. ) {
  4286. var scopedSlotFn = this.$scopedSlots[name];
  4287. var nodes;
  4288. if (scopedSlotFn) { // scoped slot
  4289. props = props || {};
  4290. if (bindObject) {
  4291. if ( true && !isObject(bindObject)) {
  4292. warn(
  4293. 'slot v-bind without argument expects an Object',
  4294. this
  4295. );
  4296. }
  4297. props = extend(extend({}, bindObject), props);
  4298. }
  4299. // fixed by xxxxxx app-plus scopedSlot
  4300. nodes = scopedSlotFn(props, this, props._i) || fallback;
  4301. } else {
  4302. nodes = this.$slots[name] || fallback;
  4303. }
  4304. var target = props && props.slot;
  4305. if (target) {
  4306. return this.$createElement('template', { slot: target }, nodes)
  4307. } else {
  4308. return nodes
  4309. }
  4310. }
  4311. /* */
  4312. /**
  4313. * Runtime helper for resolving filters
  4314. */
  4315. function resolveFilter (id) {
  4316. return resolveAsset(this.$options, 'filters', id, true) || identity
  4317. }
  4318. /* */
  4319. function isKeyNotMatch (expect, actual) {
  4320. if (Array.isArray(expect)) {
  4321. return expect.indexOf(actual) === -1
  4322. } else {
  4323. return expect !== actual
  4324. }
  4325. }
  4326. /**
  4327. * Runtime helper for checking keyCodes from config.
  4328. * exposed as Vue.prototype._k
  4329. * passing in eventKeyName as last argument separately for backwards compat
  4330. */
  4331. function checkKeyCodes (
  4332. eventKeyCode,
  4333. key,
  4334. builtInKeyCode,
  4335. eventKeyName,
  4336. builtInKeyName
  4337. ) {
  4338. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  4339. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  4340. return isKeyNotMatch(builtInKeyName, eventKeyName)
  4341. } else if (mappedKeyCode) {
  4342. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  4343. } else if (eventKeyName) {
  4344. return hyphenate(eventKeyName) !== key
  4345. }
  4346. }
  4347. /* */
  4348. /**
  4349. * Runtime helper for merging v-bind="object" into a VNode's data.
  4350. */
  4351. function bindObjectProps (
  4352. data,
  4353. tag,
  4354. value,
  4355. asProp,
  4356. isSync
  4357. ) {
  4358. if (value) {
  4359. if (!isObject(value)) {
  4360. true && warn(
  4361. 'v-bind without argument expects an Object or Array value',
  4362. this
  4363. );
  4364. } else {
  4365. if (Array.isArray(value)) {
  4366. value = toObject(value);
  4367. }
  4368. var hash;
  4369. var loop = function ( key ) {
  4370. if (
  4371. key === 'class' ||
  4372. key === 'style' ||
  4373. isReservedAttribute(key)
  4374. ) {
  4375. hash = data;
  4376. } else {
  4377. var type = data.attrs && data.attrs.type;
  4378. hash = asProp || config.mustUseProp(tag, type, key)
  4379. ? data.domProps || (data.domProps = {})
  4380. : data.attrs || (data.attrs = {});
  4381. }
  4382. var camelizedKey = camelize(key);
  4383. var hyphenatedKey = hyphenate(key);
  4384. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  4385. hash[key] = value[key];
  4386. if (isSync) {
  4387. var on = data.on || (data.on = {});
  4388. on[("update:" + key)] = function ($event) {
  4389. value[key] = $event;
  4390. };
  4391. }
  4392. }
  4393. };
  4394. for (var key in value) loop( key );
  4395. }
  4396. }
  4397. return data
  4398. }
  4399. /* */
  4400. /**
  4401. * Runtime helper for rendering static trees.
  4402. */
  4403. function renderStatic (
  4404. index,
  4405. isInFor
  4406. ) {
  4407. var cached = this._staticTrees || (this._staticTrees = []);
  4408. var tree = cached[index];
  4409. // if has already-rendered static tree and not inside v-for,
  4410. // we can reuse the same tree.
  4411. if (tree && !isInFor) {
  4412. return tree
  4413. }
  4414. // otherwise, render a fresh tree.
  4415. tree = cached[index] = this.$options.staticRenderFns[index].call(
  4416. this._renderProxy,
  4417. null,
  4418. this // for render fns generated for functional component templates
  4419. );
  4420. markStatic(tree, ("__static__" + index), false);
  4421. return tree
  4422. }
  4423. /**
  4424. * Runtime helper for v-once.
  4425. * Effectively it means marking the node as static with a unique key.
  4426. */
  4427. function markOnce (
  4428. tree,
  4429. index,
  4430. key
  4431. ) {
  4432. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  4433. return tree
  4434. }
  4435. function markStatic (
  4436. tree,
  4437. key,
  4438. isOnce
  4439. ) {
  4440. if (Array.isArray(tree)) {
  4441. for (var i = 0; i < tree.length; i++) {
  4442. if (tree[i] && typeof tree[i] !== 'string') {
  4443. markStaticNode(tree[i], (key + "_" + i), isOnce);
  4444. }
  4445. }
  4446. } else {
  4447. markStaticNode(tree, key, isOnce);
  4448. }
  4449. }
  4450. function markStaticNode (node, key, isOnce) {
  4451. node.isStatic = true;
  4452. node.key = key;
  4453. node.isOnce = isOnce;
  4454. }
  4455. /* */
  4456. function bindObjectListeners (data, value) {
  4457. if (value) {
  4458. if (!isPlainObject(value)) {
  4459. true && warn(
  4460. 'v-on without argument expects an Object value',
  4461. this
  4462. );
  4463. } else {
  4464. var on = data.on = data.on ? extend({}, data.on) : {};
  4465. for (var key in value) {
  4466. var existing = on[key];
  4467. var ours = value[key];
  4468. on[key] = existing ? [].concat(existing, ours) : ours;
  4469. }
  4470. }
  4471. }
  4472. return data
  4473. }
  4474. /* */
  4475. function resolveScopedSlots (
  4476. fns, // see flow/vnode
  4477. res,
  4478. // the following are added in 2.6
  4479. hasDynamicKeys,
  4480. contentHashKey
  4481. ) {
  4482. res = res || { $stable: !hasDynamicKeys };
  4483. for (var i = 0; i < fns.length; i++) {
  4484. var slot = fns[i];
  4485. if (Array.isArray(slot)) {
  4486. resolveScopedSlots(slot, res, hasDynamicKeys);
  4487. } else if (slot) {
  4488. // marker for reverse proxying v-slot without scope on this.$slots
  4489. if (slot.proxy) {
  4490. slot.fn.proxy = true;
  4491. }
  4492. res[slot.key] = slot.fn;
  4493. }
  4494. }
  4495. if (contentHashKey) {
  4496. (res).$key = contentHashKey;
  4497. }
  4498. return res
  4499. }
  4500. /* */
  4501. function bindDynamicKeys (baseObj, values) {
  4502. for (var i = 0; i < values.length; i += 2) {
  4503. var key = values[i];
  4504. if (typeof key === 'string' && key) {
  4505. baseObj[values[i]] = values[i + 1];
  4506. } else if ( true && key !== '' && key !== null) {
  4507. // null is a special value for explicitly removing a binding
  4508. warn(
  4509. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  4510. this
  4511. );
  4512. }
  4513. }
  4514. return baseObj
  4515. }
  4516. // helper to dynamically append modifier runtime markers to event names.
  4517. // ensure only append when value is already string, otherwise it will be cast
  4518. // to string and cause the type check to miss.
  4519. function prependModifier (value, symbol) {
  4520. return typeof value === 'string' ? symbol + value : value
  4521. }
  4522. /* */
  4523. function installRenderHelpers (target) {
  4524. target._o = markOnce;
  4525. target._n = toNumber;
  4526. target._s = toString;
  4527. target._l = renderList;
  4528. target._t = renderSlot;
  4529. target._q = looseEqual;
  4530. target._i = looseIndexOf;
  4531. target._m = renderStatic;
  4532. target._f = resolveFilter;
  4533. target._k = checkKeyCodes;
  4534. target._b = bindObjectProps;
  4535. target._v = createTextVNode;
  4536. target._e = createEmptyVNode;
  4537. target._u = resolveScopedSlots;
  4538. target._g = bindObjectListeners;
  4539. target._d = bindDynamicKeys;
  4540. target._p = prependModifier;
  4541. }
  4542. /* */
  4543. function FunctionalRenderContext (
  4544. data,
  4545. props,
  4546. children,
  4547. parent,
  4548. Ctor
  4549. ) {
  4550. var this$1 = this;
  4551. var options = Ctor.options;
  4552. // ensure the createElement function in functional components
  4553. // gets a unique context - this is necessary for correct named slot check
  4554. var contextVm;
  4555. if (hasOwn(parent, '_uid')) {
  4556. contextVm = Object.create(parent);
  4557. // $flow-disable-line
  4558. contextVm._original = parent;
  4559. } else {
  4560. // the context vm passed in is a functional context as well.
  4561. // in this case we want to make sure we are able to get a hold to the
  4562. // real context instance.
  4563. contextVm = parent;
  4564. // $flow-disable-line
  4565. parent = parent._original;
  4566. }
  4567. var isCompiled = isTrue(options._compiled);
  4568. var needNormalization = !isCompiled;
  4569. this.data = data;
  4570. this.props = props;
  4571. this.children = children;
  4572. this.parent = parent;
  4573. this.listeners = data.on || emptyObject;
  4574. this.injections = resolveInject(options.inject, parent);
  4575. this.slots = function () {
  4576. if (!this$1.$slots) {
  4577. normalizeScopedSlots(
  4578. data.scopedSlots,
  4579. this$1.$slots = resolveSlots(children, parent)
  4580. );
  4581. }
  4582. return this$1.$slots
  4583. };
  4584. Object.defineProperty(this, 'scopedSlots', ({
  4585. enumerable: true,
  4586. get: function get () {
  4587. return normalizeScopedSlots(data.scopedSlots, this.slots())
  4588. }
  4589. }));
  4590. // support for compiled functional template
  4591. if (isCompiled) {
  4592. // exposing $options for renderStatic()
  4593. this.$options = options;
  4594. // pre-resolve slots for renderSlot()
  4595. this.$slots = this.slots();
  4596. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  4597. }
  4598. if (options._scopeId) {
  4599. this._c = function (a, b, c, d) {
  4600. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  4601. if (vnode && !Array.isArray(vnode)) {
  4602. vnode.fnScopeId = options._scopeId;
  4603. vnode.fnContext = parent;
  4604. }
  4605. return vnode
  4606. };
  4607. } else {
  4608. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  4609. }
  4610. }
  4611. installRenderHelpers(FunctionalRenderContext.prototype);
  4612. function createFunctionalComponent (
  4613. Ctor,
  4614. propsData,
  4615. data,
  4616. contextVm,
  4617. children
  4618. ) {
  4619. var options = Ctor.options;
  4620. var props = {};
  4621. var propOptions = options.props;
  4622. if (isDef(propOptions)) {
  4623. for (var key in propOptions) {
  4624. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  4625. }
  4626. } else {
  4627. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  4628. if (isDef(data.props)) { mergeProps(props, data.props); }
  4629. }
  4630. var renderContext = new FunctionalRenderContext(
  4631. data,
  4632. props,
  4633. children,
  4634. contextVm,
  4635. Ctor
  4636. );
  4637. var vnode = options.render.call(null, renderContext._c, renderContext);
  4638. if (vnode instanceof VNode) {
  4639. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  4640. } else if (Array.isArray(vnode)) {
  4641. var vnodes = normalizeChildren(vnode) || [];
  4642. var res = new Array(vnodes.length);
  4643. for (var i = 0; i < vnodes.length; i++) {
  4644. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  4645. }
  4646. return res
  4647. }
  4648. }
  4649. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  4650. // #7817 clone node before setting fnContext, otherwise if the node is reused
  4651. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  4652. // that should not be matched to match.
  4653. var clone = cloneVNode(vnode);
  4654. clone.fnContext = contextVm;
  4655. clone.fnOptions = options;
  4656. if (true) {
  4657. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  4658. }
  4659. if (data.slot) {
  4660. (clone.data || (clone.data = {})).slot = data.slot;
  4661. }
  4662. return clone
  4663. }
  4664. function mergeProps (to, from) {
  4665. for (var key in from) {
  4666. to[camelize(key)] = from[key];
  4667. }
  4668. }
  4669. /* */
  4670. /* */
  4671. /* */
  4672. /* */
  4673. // inline hooks to be invoked on component VNodes during patch
  4674. var componentVNodeHooks = {
  4675. init: function init (vnode, hydrating) {
  4676. if (
  4677. vnode.componentInstance &&
  4678. !vnode.componentInstance._isDestroyed &&
  4679. vnode.data.keepAlive
  4680. ) {
  4681. // kept-alive components, treat as a patch
  4682. var mountedNode = vnode; // work around flow
  4683. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  4684. } else {
  4685. var child = vnode.componentInstance = createComponentInstanceForVnode(
  4686. vnode,
  4687. activeInstance
  4688. );
  4689. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  4690. }
  4691. },
  4692. prepatch: function prepatch (oldVnode, vnode) {
  4693. var options = vnode.componentOptions;
  4694. var child = vnode.componentInstance = oldVnode.componentInstance;
  4695. updateChildComponent(
  4696. child,
  4697. options.propsData, // updated props
  4698. options.listeners, // updated listeners
  4699. vnode, // new parent vnode
  4700. options.children // new children
  4701. );
  4702. },
  4703. insert: function insert (vnode) {
  4704. var context = vnode.context;
  4705. var componentInstance = vnode.componentInstance;
  4706. if (!componentInstance._isMounted) {
  4707. callHook(componentInstance, 'onServiceCreated');
  4708. callHook(componentInstance, 'onServiceAttached');
  4709. componentInstance._isMounted = true;
  4710. callHook(componentInstance, 'mounted');
  4711. }
  4712. if (vnode.data.keepAlive) {
  4713. if (context._isMounted) {
  4714. // vue-router#1212
  4715. // During updates, a kept-alive component's child components may
  4716. // change, so directly walking the tree here may call activated hooks
  4717. // on incorrect children. Instead we push them into a queue which will
  4718. // be processed after the whole patch process ended.
  4719. queueActivatedComponent(componentInstance);
  4720. } else {
  4721. activateChildComponent(componentInstance, true /* direct */);
  4722. }
  4723. }
  4724. },
  4725. destroy: function destroy (vnode) {
  4726. var componentInstance = vnode.componentInstance;
  4727. if (!componentInstance._isDestroyed) {
  4728. if (!vnode.data.keepAlive) {
  4729. componentInstance.$destroy();
  4730. } else {
  4731. deactivateChildComponent(componentInstance, true /* direct */);
  4732. }
  4733. }
  4734. }
  4735. };
  4736. var hooksToMerge = Object.keys(componentVNodeHooks);
  4737. function createComponent (
  4738. Ctor,
  4739. data,
  4740. context,
  4741. children,
  4742. tag
  4743. ) {
  4744. if (isUndef(Ctor)) {
  4745. return
  4746. }
  4747. var baseCtor = context.$options._base;
  4748. // plain options object: turn it into a constructor
  4749. if (isObject(Ctor)) {
  4750. Ctor = baseCtor.extend(Ctor);
  4751. }
  4752. // if at this stage it's not a constructor or an async component factory,
  4753. // reject.
  4754. if (typeof Ctor !== 'function') {
  4755. if (true) {
  4756. warn(("Invalid Component definition: " + (String(Ctor))), context);
  4757. }
  4758. return
  4759. }
  4760. // async component
  4761. var asyncFactory;
  4762. if (isUndef(Ctor.cid)) {
  4763. asyncFactory = Ctor;
  4764. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  4765. if (Ctor === undefined) {
  4766. // return a placeholder node for async component, which is rendered
  4767. // as a comment node but preserves all the raw information for the node.
  4768. // the information will be used for async server-rendering and hydration.
  4769. return createAsyncPlaceholder(
  4770. asyncFactory,
  4771. data,
  4772. context,
  4773. children,
  4774. tag
  4775. )
  4776. }
  4777. }
  4778. data = data || {};
  4779. // resolve constructor options in case global mixins are applied after
  4780. // component constructor creation
  4781. resolveConstructorOptions(Ctor);
  4782. // transform component v-model data into props & events
  4783. if (isDef(data.model)) {
  4784. transformModel(Ctor.options, data);
  4785. }
  4786. // extract props
  4787. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  4788. // functional component
  4789. if (isTrue(Ctor.options.functional)) {
  4790. return createFunctionalComponent(Ctor, propsData, data, context, children)
  4791. }
  4792. // extract listeners, since these needs to be treated as
  4793. // child component listeners instead of DOM listeners
  4794. var listeners = data.on;
  4795. // replace with listeners with .native modifier
  4796. // so it gets processed during parent component patch.
  4797. data.on = data.nativeOn;
  4798. if (isTrue(Ctor.options.abstract)) {
  4799. // abstract components do not keep anything
  4800. // other than props & listeners & slot
  4801. // work around flow
  4802. var slot = data.slot;
  4803. data = {};
  4804. if (slot) {
  4805. data.slot = slot;
  4806. }
  4807. }
  4808. // install component management hooks onto the placeholder node
  4809. installComponentHooks(data);
  4810. // return a placeholder vnode
  4811. var name = Ctor.options.name || tag;
  4812. var vnode = new VNode(
  4813. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  4814. data, undefined, undefined, undefined, context,
  4815. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  4816. asyncFactory
  4817. );
  4818. return vnode
  4819. }
  4820. function createComponentInstanceForVnode (
  4821. vnode, // we know it's MountedComponentVNode but flow doesn't
  4822. parent // activeInstance in lifecycle state
  4823. ) {
  4824. var options = {
  4825. _isComponent: true,
  4826. _parentVnode: vnode,
  4827. parent: parent
  4828. };
  4829. // check inline-template render functions
  4830. var inlineTemplate = vnode.data.inlineTemplate;
  4831. if (isDef(inlineTemplate)) {
  4832. options.render = inlineTemplate.render;
  4833. options.staticRenderFns = inlineTemplate.staticRenderFns;
  4834. }
  4835. return new vnode.componentOptions.Ctor(options)
  4836. }
  4837. function installComponentHooks (data) {
  4838. var hooks = data.hook || (data.hook = {});
  4839. for (var i = 0; i < hooksToMerge.length; i++) {
  4840. var key = hooksToMerge[i];
  4841. var existing = hooks[key];
  4842. var toMerge = componentVNodeHooks[key];
  4843. if (existing !== toMerge && !(existing && existing._merged)) {
  4844. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  4845. }
  4846. }
  4847. }
  4848. function mergeHook$1 (f1, f2) {
  4849. var merged = function (a, b) {
  4850. // flow complains about extra args which is why we use any
  4851. f1(a, b);
  4852. f2(a, b);
  4853. };
  4854. merged._merged = true;
  4855. return merged
  4856. }
  4857. // transform component v-model info (value and callback) into
  4858. // prop and event handler respectively.
  4859. function transformModel (options, data) {
  4860. var prop = (options.model && options.model.prop) || 'value';
  4861. var event = (options.model && options.model.event) || 'input'
  4862. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  4863. var on = data.on || (data.on = {});
  4864. var existing = on[event];
  4865. var callback = data.model.callback;
  4866. if (isDef(existing)) {
  4867. if (
  4868. Array.isArray(existing)
  4869. ? existing.indexOf(callback) === -1
  4870. : existing !== callback
  4871. ) {
  4872. on[event] = [callback].concat(existing);
  4873. }
  4874. } else {
  4875. on[event] = callback;
  4876. }
  4877. }
  4878. /* */
  4879. var SIMPLE_NORMALIZE = 1;
  4880. var ALWAYS_NORMALIZE = 2;
  4881. // wrapper function for providing a more flexible interface
  4882. // without getting yelled at by flow
  4883. function createElement (
  4884. context,
  4885. tag,
  4886. data,
  4887. children,
  4888. normalizationType,
  4889. alwaysNormalize
  4890. ) {
  4891. if (Array.isArray(data) || isPrimitive(data)) {
  4892. normalizationType = children;
  4893. children = data;
  4894. data = undefined;
  4895. }
  4896. if (isTrue(alwaysNormalize)) {
  4897. normalizationType = ALWAYS_NORMALIZE;
  4898. }
  4899. return _createElement(context, tag, data, children, normalizationType)
  4900. }
  4901. function _createElement (
  4902. context,
  4903. tag,
  4904. data,
  4905. children,
  4906. normalizationType
  4907. ) {
  4908. if (isDef(data) && isDef((data).__ob__)) {
  4909. true && warn(
  4910. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  4911. 'Always create fresh vnode data objects in each render!',
  4912. context
  4913. );
  4914. return createEmptyVNode()
  4915. }
  4916. // object syntax in v-bind
  4917. if (isDef(data) && isDef(data.is)) {
  4918. tag = data.is;
  4919. }
  4920. if (!tag) {
  4921. // in case of component :is set to falsy value
  4922. return createEmptyVNode()
  4923. }
  4924. // warn against non-primitive key
  4925. if ( true &&
  4926. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  4927. ) {
  4928. {
  4929. warn(
  4930. 'Avoid using non-primitive value as key, ' +
  4931. 'use string/number value instead.',
  4932. context
  4933. );
  4934. }
  4935. }
  4936. // support single function children as default scoped slot
  4937. if (Array.isArray(children) &&
  4938. typeof children[0] === 'function'
  4939. ) {
  4940. data = data || {};
  4941. data.scopedSlots = { default: children[0] };
  4942. children.length = 0;
  4943. }
  4944. if (normalizationType === ALWAYS_NORMALIZE) {
  4945. children = normalizeChildren(children);
  4946. } else if (normalizationType === SIMPLE_NORMALIZE) {
  4947. children = simpleNormalizeChildren(children);
  4948. }
  4949. var vnode, ns;
  4950. if (typeof tag === 'string') {
  4951. var Ctor;
  4952. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  4953. if (config.isReservedTag(tag)) {
  4954. // platform built-in elements
  4955. if ( true && isDef(data) && isDef(data.nativeOn)) {
  4956. warn(
  4957. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  4958. context
  4959. );
  4960. }
  4961. vnode = new VNode(
  4962. config.parsePlatformTagName(tag), data, children,
  4963. undefined, undefined, context
  4964. );
  4965. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  4966. // component
  4967. vnode = createComponent(Ctor, data, context, children, tag);
  4968. } else {
  4969. // unknown or unlisted namespaced elements
  4970. // check at runtime because it may get assigned a namespace when its
  4971. // parent normalizes children
  4972. vnode = new VNode(
  4973. tag, data, children,
  4974. undefined, undefined, context
  4975. );
  4976. }
  4977. } else {
  4978. // direct component options / constructor
  4979. vnode = createComponent(tag, data, context, children);
  4980. }
  4981. if (Array.isArray(vnode)) {
  4982. return vnode
  4983. } else if (isDef(vnode)) {
  4984. if (isDef(ns)) { applyNS(vnode, ns); }
  4985. if (isDef(data)) { registerDeepBindings(data); }
  4986. return vnode
  4987. } else {
  4988. return createEmptyVNode()
  4989. }
  4990. }
  4991. function applyNS (vnode, ns, force) {
  4992. vnode.ns = ns;
  4993. if (vnode.tag === 'foreignObject') {
  4994. // use default namespace inside foreignObject
  4995. ns = undefined;
  4996. force = true;
  4997. }
  4998. if (isDef(vnode.children)) {
  4999. for (var i = 0, l = vnode.children.length; i < l; i++) {
  5000. var child = vnode.children[i];
  5001. if (isDef(child.tag) && (
  5002. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  5003. applyNS(child, ns, force);
  5004. }
  5005. }
  5006. }
  5007. }
  5008. // ref #5318
  5009. // necessary to ensure parent re-render when deep bindings like :style and
  5010. // :class are used on slot nodes
  5011. function registerDeepBindings (data) {
  5012. if (isObject(data.style)) {
  5013. traverse(data.style);
  5014. }
  5015. if (isObject(data.class)) {
  5016. traverse(data.class);
  5017. }
  5018. }
  5019. /* */
  5020. function initRender (vm) {
  5021. vm._vnode = null; // the root of the child tree
  5022. vm._staticTrees = null; // v-once cached trees
  5023. var options = vm.$options;
  5024. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  5025. var renderContext = parentVnode && parentVnode.context;
  5026. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  5027. vm.$scopedSlots = emptyObject;
  5028. // bind the createElement fn to this instance
  5029. // so that we get proper render context inside it.
  5030. // args order: tag, data, children, normalizationType, alwaysNormalize
  5031. // internal version is used by render functions compiled from templates
  5032. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  5033. // normalization is always applied for the public version, used in
  5034. // user-written render functions.
  5035. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  5036. // $attrs & $listeners are exposed for easier HOC creation.
  5037. // they need to be reactive so that HOCs using them are always updated
  5038. var parentData = parentVnode && parentVnode.data;
  5039. /* istanbul ignore else */
  5040. if (true) {
  5041. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  5042. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  5043. }, true);
  5044. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  5045. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  5046. }, true);
  5047. } else {}
  5048. }
  5049. var currentRenderingInstance = null;
  5050. function renderMixin (Vue) {
  5051. // install runtime convenience helpers
  5052. installRenderHelpers(Vue.prototype);
  5053. Vue.prototype.$nextTick = function (fn) {
  5054. return nextTick(fn, this)
  5055. };
  5056. Vue.prototype._render = function () {
  5057. var vm = this;
  5058. var ref = vm.$options;
  5059. var render = ref.render;
  5060. var _parentVnode = ref._parentVnode;
  5061. if (_parentVnode) {
  5062. vm.$scopedSlots = normalizeScopedSlots(
  5063. _parentVnode.data.scopedSlots,
  5064. vm.$slots,
  5065. vm.$scopedSlots
  5066. );
  5067. }
  5068. // set parent vnode. this allows render functions to have access
  5069. // to the data on the placeholder node.
  5070. vm.$vnode = _parentVnode;
  5071. // render self
  5072. var vnode;
  5073. try {
  5074. // There's no need to maintain a stack because all render fns are called
  5075. // separately from one another. Nested component's render fns are called
  5076. // when parent component is patched.
  5077. currentRenderingInstance = vm;
  5078. vnode = render.call(vm._renderProxy, vm.$createElement);
  5079. } catch (e) {
  5080. handleError(e, vm, "render");
  5081. // return error render result,
  5082. // or previous vnode to prevent render error causing blank component
  5083. /* istanbul ignore else */
  5084. if ( true && vm.$options.renderError) {
  5085. try {
  5086. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  5087. } catch (e) {
  5088. handleError(e, vm, "renderError");
  5089. vnode = vm._vnode;
  5090. }
  5091. } else {
  5092. vnode = vm._vnode;
  5093. }
  5094. } finally {
  5095. currentRenderingInstance = null;
  5096. }
  5097. // if the returned array contains only a single node, allow it
  5098. if (Array.isArray(vnode) && vnode.length === 1) {
  5099. vnode = vnode[0];
  5100. }
  5101. // return empty vnode in case the render function errored out
  5102. if (!(vnode instanceof VNode)) {
  5103. if ( true && Array.isArray(vnode)) {
  5104. warn(
  5105. 'Multiple root nodes returned from render function. Render function ' +
  5106. 'should return a single root node.',
  5107. vm
  5108. );
  5109. }
  5110. vnode = createEmptyVNode();
  5111. }
  5112. // set parent
  5113. vnode.parent = _parentVnode;
  5114. return vnode
  5115. };
  5116. }
  5117. /* */
  5118. function ensureCtor (comp, base) {
  5119. if (
  5120. comp.__esModule ||
  5121. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  5122. ) {
  5123. comp = comp.default;
  5124. }
  5125. return isObject(comp)
  5126. ? base.extend(comp)
  5127. : comp
  5128. }
  5129. function createAsyncPlaceholder (
  5130. factory,
  5131. data,
  5132. context,
  5133. children,
  5134. tag
  5135. ) {
  5136. var node = createEmptyVNode();
  5137. node.asyncFactory = factory;
  5138. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  5139. return node
  5140. }
  5141. function resolveAsyncComponent (
  5142. factory,
  5143. baseCtor
  5144. ) {
  5145. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  5146. return factory.errorComp
  5147. }
  5148. if (isDef(factory.resolved)) {
  5149. return factory.resolved
  5150. }
  5151. var owner = currentRenderingInstance;
  5152. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  5153. // already pending
  5154. factory.owners.push(owner);
  5155. }
  5156. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  5157. return factory.loadingComp
  5158. }
  5159. if (owner && !isDef(factory.owners)) {
  5160. var owners = factory.owners = [owner];
  5161. var sync = true;
  5162. var timerLoading = null;
  5163. var timerTimeout = null
  5164. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  5165. var forceRender = function (renderCompleted) {
  5166. for (var i = 0, l = owners.length; i < l; i++) {
  5167. (owners[i]).$forceUpdate();
  5168. }
  5169. if (renderCompleted) {
  5170. owners.length = 0;
  5171. if (timerLoading !== null) {
  5172. clearTimeout(timerLoading);
  5173. timerLoading = null;
  5174. }
  5175. if (timerTimeout !== null) {
  5176. clearTimeout(timerTimeout);
  5177. timerTimeout = null;
  5178. }
  5179. }
  5180. };
  5181. var resolve = once(function (res) {
  5182. // cache resolved
  5183. factory.resolved = ensureCtor(res, baseCtor);
  5184. // invoke callbacks only if this is not a synchronous resolve
  5185. // (async resolves are shimmed as synchronous during SSR)
  5186. if (!sync) {
  5187. forceRender(true);
  5188. } else {
  5189. owners.length = 0;
  5190. }
  5191. });
  5192. var reject = once(function (reason) {
  5193. true && warn(
  5194. "Failed to resolve async component: " + (String(factory)) +
  5195. (reason ? ("\nReason: " + reason) : '')
  5196. );
  5197. if (isDef(factory.errorComp)) {
  5198. factory.error = true;
  5199. forceRender(true);
  5200. }
  5201. });
  5202. var res = factory(resolve, reject);
  5203. if (isObject(res)) {
  5204. if (isPromise(res)) {
  5205. // () => Promise
  5206. if (isUndef(factory.resolved)) {
  5207. res.then(resolve, reject);
  5208. }
  5209. } else if (isPromise(res.component)) {
  5210. res.component.then(resolve, reject);
  5211. if (isDef(res.error)) {
  5212. factory.errorComp = ensureCtor(res.error, baseCtor);
  5213. }
  5214. if (isDef(res.loading)) {
  5215. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  5216. if (res.delay === 0) {
  5217. factory.loading = true;
  5218. } else {
  5219. timerLoading = setTimeout(function () {
  5220. timerLoading = null;
  5221. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  5222. factory.loading = true;
  5223. forceRender(false);
  5224. }
  5225. }, res.delay || 200);
  5226. }
  5227. }
  5228. if (isDef(res.timeout)) {
  5229. timerTimeout = setTimeout(function () {
  5230. timerTimeout = null;
  5231. if (isUndef(factory.resolved)) {
  5232. reject(
  5233. true
  5234. ? ("timeout (" + (res.timeout) + "ms)")
  5235. : undefined
  5236. );
  5237. }
  5238. }, res.timeout);
  5239. }
  5240. }
  5241. }
  5242. sync = false;
  5243. // return in case resolved synchronously
  5244. return factory.loading
  5245. ? factory.loadingComp
  5246. : factory.resolved
  5247. }
  5248. }
  5249. /* */
  5250. function isAsyncPlaceholder (node) {
  5251. return node.isComment && node.asyncFactory
  5252. }
  5253. /* */
  5254. function getFirstComponentChild (children) {
  5255. if (Array.isArray(children)) {
  5256. for (var i = 0; i < children.length; i++) {
  5257. var c = children[i];
  5258. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  5259. return c
  5260. }
  5261. }
  5262. }
  5263. }
  5264. /* */
  5265. /* */
  5266. function initEvents (vm) {
  5267. vm._events = Object.create(null);
  5268. vm._hasHookEvent = false;
  5269. // init parent attached events
  5270. var listeners = vm.$options._parentListeners;
  5271. if (listeners) {
  5272. updateComponentListeners(vm, listeners);
  5273. }
  5274. }
  5275. var target;
  5276. function add (event, fn) {
  5277. target.$on(event, fn);
  5278. }
  5279. function remove$1 (event, fn) {
  5280. target.$off(event, fn);
  5281. }
  5282. function createOnceHandler (event, fn) {
  5283. var _target = target;
  5284. return function onceHandler () {
  5285. var res = fn.apply(null, arguments);
  5286. if (res !== null) {
  5287. _target.$off(event, onceHandler);
  5288. }
  5289. }
  5290. }
  5291. function updateComponentListeners (
  5292. vm,
  5293. listeners,
  5294. oldListeners
  5295. ) {
  5296. target = vm;
  5297. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  5298. target = undefined;
  5299. }
  5300. function eventsMixin (Vue) {
  5301. var hookRE = /^hook:/;
  5302. Vue.prototype.$on = function (event, fn) {
  5303. var vm = this;
  5304. if (Array.isArray(event)) {
  5305. for (var i = 0, l = event.length; i < l; i++) {
  5306. vm.$on(event[i], fn);
  5307. }
  5308. } else {
  5309. (vm._events[event] || (vm._events[event] = [])).push(fn);
  5310. // optimize hook:event cost by using a boolean flag marked at registration
  5311. // instead of a hash lookup
  5312. if (hookRE.test(event)) {
  5313. vm._hasHookEvent = true;
  5314. }
  5315. }
  5316. return vm
  5317. };
  5318. Vue.prototype.$once = function (event, fn) {
  5319. var vm = this;
  5320. function on () {
  5321. vm.$off(event, on);
  5322. fn.apply(vm, arguments);
  5323. }
  5324. on.fn = fn;
  5325. vm.$on(event, on);
  5326. return vm
  5327. };
  5328. Vue.prototype.$off = function (event, fn) {
  5329. var vm = this;
  5330. // all
  5331. if (!arguments.length) {
  5332. vm._events = Object.create(null);
  5333. return vm
  5334. }
  5335. // array of events
  5336. if (Array.isArray(event)) {
  5337. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  5338. vm.$off(event[i$1], fn);
  5339. }
  5340. return vm
  5341. }
  5342. // specific event
  5343. var cbs = vm._events[event];
  5344. if (!cbs) {
  5345. return vm
  5346. }
  5347. if (!fn) {
  5348. vm._events[event] = null;
  5349. return vm
  5350. }
  5351. // specific handler
  5352. var cb;
  5353. var i = cbs.length;
  5354. while (i--) {
  5355. cb = cbs[i];
  5356. if (cb === fn || cb.fn === fn) {
  5357. cbs.splice(i, 1);
  5358. break
  5359. }
  5360. }
  5361. return vm
  5362. };
  5363. Vue.prototype.$emit = function (event) {
  5364. var vm = this;
  5365. if (true) {
  5366. var lowerCaseEvent = event.toLowerCase();
  5367. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  5368. tip(
  5369. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  5370. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  5371. "Note that HTML attributes are case-insensitive and you cannot use " +
  5372. "v-on to listen to camelCase events when using in-DOM templates. " +
  5373. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  5374. );
  5375. }
  5376. }
  5377. var cbs = vm._events[event];
  5378. if (cbs) {
  5379. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  5380. var args = toArray(arguments, 1);
  5381. var info = "event handler for \"" + event + "\"";
  5382. for (var i = 0, l = cbs.length; i < l; i++) {
  5383. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  5384. }
  5385. }
  5386. return vm
  5387. };
  5388. }
  5389. /* */
  5390. var activeInstance = null;
  5391. var isUpdatingChildComponent = false;
  5392. function setActiveInstance(vm) {
  5393. var prevActiveInstance = activeInstance;
  5394. activeInstance = vm;
  5395. return function () {
  5396. activeInstance = prevActiveInstance;
  5397. }
  5398. }
  5399. function initLifecycle (vm) {
  5400. var options = vm.$options;
  5401. // locate first non-abstract parent
  5402. var parent = options.parent;
  5403. if (parent && !options.abstract) {
  5404. while (parent.$options.abstract && parent.$parent) {
  5405. parent = parent.$parent;
  5406. }
  5407. parent.$children.push(vm);
  5408. }
  5409. vm.$parent = parent;
  5410. vm.$root = parent ? parent.$root : vm;
  5411. vm.$children = [];
  5412. vm.$refs = {};
  5413. vm._watcher = null;
  5414. vm._inactive = null;
  5415. vm._directInactive = false;
  5416. vm._isMounted = false;
  5417. vm._isDestroyed = false;
  5418. vm._isBeingDestroyed = false;
  5419. }
  5420. function lifecycleMixin (Vue) {
  5421. Vue.prototype._update = function (vnode, hydrating) {
  5422. var vm = this;
  5423. var prevEl = vm.$el;
  5424. var prevVnode = vm._vnode;
  5425. var restoreActiveInstance = setActiveInstance(vm);
  5426. vm._vnode = vnode;
  5427. // Vue.prototype.__patch__ is injected in entry points
  5428. // based on the rendering backend used.
  5429. if (!prevVnode) {
  5430. // initial render
  5431. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  5432. } else {
  5433. // updates
  5434. vm.$el = vm.__patch__(prevVnode, vnode);
  5435. }
  5436. restoreActiveInstance();
  5437. // update __vue__ reference
  5438. if (prevEl) {
  5439. prevEl.__vue__ = null;
  5440. }
  5441. if (vm.$el) {
  5442. vm.$el.__vue__ = vm;
  5443. }
  5444. // if parent is an HOC, update its $el as well
  5445. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  5446. vm.$parent.$el = vm.$el;
  5447. }
  5448. // updated hook is called by the scheduler to ensure that children are
  5449. // updated in a parent's updated hook.
  5450. };
  5451. Vue.prototype.$forceUpdate = function () {
  5452. var vm = this;
  5453. if (vm._watcher) {
  5454. vm._watcher.update();
  5455. }
  5456. };
  5457. Vue.prototype.$destroy = function () {
  5458. var vm = this;
  5459. if (vm._isBeingDestroyed) {
  5460. return
  5461. }
  5462. callHook(vm, 'beforeDestroy');
  5463. vm._isBeingDestroyed = true;
  5464. // remove self from parent
  5465. var parent = vm.$parent;
  5466. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  5467. remove(parent.$children, vm);
  5468. }
  5469. // teardown watchers
  5470. if (vm._watcher) {
  5471. vm._watcher.teardown();
  5472. }
  5473. var i = vm._watchers.length;
  5474. while (i--) {
  5475. vm._watchers[i].teardown();
  5476. }
  5477. // remove reference from data ob
  5478. // frozen object may not have observer.
  5479. if (vm._data.__ob__) {
  5480. vm._data.__ob__.vmCount--;
  5481. }
  5482. // call the last hook...
  5483. vm._isDestroyed = true;
  5484. // invoke destroy hooks on current rendered tree
  5485. vm.__patch__(vm._vnode, null);
  5486. // fire destroyed hook
  5487. callHook(vm, 'destroyed');
  5488. // turn off all instance listeners.
  5489. vm.$off();
  5490. // remove __vue__ reference
  5491. if (vm.$el) {
  5492. vm.$el.__vue__ = null;
  5493. }
  5494. // release circular reference (#6759)
  5495. if (vm.$vnode) {
  5496. vm.$vnode.parent = null;
  5497. }
  5498. };
  5499. }
  5500. function updateChildComponent (
  5501. vm,
  5502. propsData,
  5503. listeners,
  5504. parentVnode,
  5505. renderChildren
  5506. ) {
  5507. if (true) {
  5508. isUpdatingChildComponent = true;
  5509. }
  5510. // determine whether component has slot children
  5511. // we need to do this before overwriting $options._renderChildren.
  5512. // check if there are dynamic scopedSlots (hand-written or compiled but with
  5513. // dynamic slot names). Static scoped slots compiled from template has the
  5514. // "$stable" marker.
  5515. var newScopedSlots = parentVnode.data.scopedSlots;
  5516. var oldScopedSlots = vm.$scopedSlots;
  5517. var hasDynamicScopedSlot = !!(
  5518. (newScopedSlots && !newScopedSlots.$stable) ||
  5519. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  5520. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  5521. );
  5522. // Any static slot children from the parent may have changed during parent's
  5523. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  5524. // update is necessary to ensure correctness.
  5525. var needsForceUpdate = !!(
  5526. renderChildren || // has new static slots
  5527. vm.$options._renderChildren || // has old static slots
  5528. hasDynamicScopedSlot
  5529. );
  5530. vm.$options._parentVnode = parentVnode;
  5531. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  5532. if (vm._vnode) { // update child tree's parent
  5533. vm._vnode.parent = parentVnode;
  5534. }
  5535. vm.$options._renderChildren = renderChildren;
  5536. // update $attrs and $listeners hash
  5537. // these are also reactive so they may trigger child update if the child
  5538. // used them during render
  5539. vm.$attrs = parentVnode.data.attrs || emptyObject;
  5540. vm.$listeners = listeners || emptyObject;
  5541. // update props
  5542. if (propsData && vm.$options.props) {
  5543. toggleObserving(false);
  5544. var props = vm._props;
  5545. var propKeys = vm.$options._propKeys || [];
  5546. for (var i = 0; i < propKeys.length; i++) {
  5547. var key = propKeys[i];
  5548. var propOptions = vm.$options.props; // wtf flow?
  5549. props[key] = validateProp(key, propOptions, propsData, vm);
  5550. }
  5551. toggleObserving(true);
  5552. // keep a copy of raw propsData
  5553. vm.$options.propsData = propsData;
  5554. }
  5555. // fixed by xxxxxx update properties(mp runtime)
  5556. vm._$updateProperties && vm._$updateProperties(vm);
  5557. // update listeners
  5558. listeners = listeners || emptyObject;
  5559. var oldListeners = vm.$options._parentListeners;
  5560. vm.$options._parentListeners = listeners;
  5561. updateComponentListeners(vm, listeners, oldListeners);
  5562. // resolve slots + force update if has children
  5563. if (needsForceUpdate) {
  5564. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  5565. vm.$forceUpdate();
  5566. }
  5567. if (true) {
  5568. isUpdatingChildComponent = false;
  5569. }
  5570. }
  5571. function isInInactiveTree (vm) {
  5572. while (vm && (vm = vm.$parent)) {
  5573. if (vm._inactive) { return true }
  5574. }
  5575. return false
  5576. }
  5577. function activateChildComponent (vm, direct) {
  5578. if (direct) {
  5579. vm._directInactive = false;
  5580. if (isInInactiveTree(vm)) {
  5581. return
  5582. }
  5583. } else if (vm._directInactive) {
  5584. return
  5585. }
  5586. if (vm._inactive || vm._inactive === null) {
  5587. vm._inactive = false;
  5588. for (var i = 0; i < vm.$children.length; i++) {
  5589. activateChildComponent(vm.$children[i]);
  5590. }
  5591. callHook(vm, 'activated');
  5592. }
  5593. }
  5594. function deactivateChildComponent (vm, direct) {
  5595. if (direct) {
  5596. vm._directInactive = true;
  5597. if (isInInactiveTree(vm)) {
  5598. return
  5599. }
  5600. }
  5601. if (!vm._inactive) {
  5602. vm._inactive = true;
  5603. for (var i = 0; i < vm.$children.length; i++) {
  5604. deactivateChildComponent(vm.$children[i]);
  5605. }
  5606. callHook(vm, 'deactivated');
  5607. }
  5608. }
  5609. function callHook (vm, hook) {
  5610. // #7573 disable dep collection when invoking lifecycle hooks
  5611. pushTarget();
  5612. var handlers = vm.$options[hook];
  5613. var info = hook + " hook";
  5614. if (handlers) {
  5615. for (var i = 0, j = handlers.length; i < j; i++) {
  5616. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  5617. }
  5618. }
  5619. if (vm._hasHookEvent) {
  5620. vm.$emit('hook:' + hook);
  5621. }
  5622. popTarget();
  5623. }
  5624. /* */
  5625. var MAX_UPDATE_COUNT = 100;
  5626. var queue = [];
  5627. var activatedChildren = [];
  5628. var has = {};
  5629. var circular = {};
  5630. var waiting = false;
  5631. var flushing = false;
  5632. var index = 0;
  5633. /**
  5634. * Reset the scheduler's state.
  5635. */
  5636. function resetSchedulerState () {
  5637. index = queue.length = activatedChildren.length = 0;
  5638. has = {};
  5639. if (true) {
  5640. circular = {};
  5641. }
  5642. waiting = flushing = false;
  5643. }
  5644. // Async edge case #6566 requires saving the timestamp when event listeners are
  5645. // attached. However, calling performance.now() has a perf overhead especially
  5646. // if the page has thousands of event listeners. Instead, we take a timestamp
  5647. // every time the scheduler flushes and use that for all event listeners
  5648. // attached during that flush.
  5649. var currentFlushTimestamp = 0;
  5650. // Async edge case fix requires storing an event listener's attach timestamp.
  5651. var getNow = Date.now;
  5652. // Determine what event timestamp the browser is using. Annoyingly, the
  5653. // timestamp can either be hi-res (relative to page load) or low-res
  5654. // (relative to UNIX epoch), so in order to compare time we have to use the
  5655. // same timestamp type when saving the flush timestamp.
  5656. // All IE versions use low-res event timestamps, and have problematic clock
  5657. // implementations (#9632)
  5658. if (inBrowser && !isIE) {
  5659. var performance = window.performance;
  5660. if (
  5661. performance &&
  5662. typeof performance.now === 'function' &&
  5663. getNow() > document.createEvent('Event').timeStamp
  5664. ) {
  5665. // if the event timestamp, although evaluated AFTER the Date.now(), is
  5666. // smaller than it, it means the event is using a hi-res timestamp,
  5667. // and we need to use the hi-res version for event listener timestamps as
  5668. // well.
  5669. getNow = function () { return performance.now(); };
  5670. }
  5671. }
  5672. /**
  5673. * Flush both queues and run the watchers.
  5674. */
  5675. function flushSchedulerQueue () {
  5676. currentFlushTimestamp = getNow();
  5677. flushing = true;
  5678. var watcher, id;
  5679. // Sort queue before flush.
  5680. // This ensures that:
  5681. // 1. Components are updated from parent to child. (because parent is always
  5682. // created before the child)
  5683. // 2. A component's user watchers are run before its render watcher (because
  5684. // user watchers are created before the render watcher)
  5685. // 3. If a component is destroyed during a parent component's watcher run,
  5686. // its watchers can be skipped.
  5687. queue.sort(function (a, b) { return a.id - b.id; });
  5688. // do not cache length because more watchers might be pushed
  5689. // as we run existing watchers
  5690. for (index = 0; index < queue.length; index++) {
  5691. watcher = queue[index];
  5692. if (watcher.before) {
  5693. watcher.before();
  5694. }
  5695. id = watcher.id;
  5696. has[id] = null;
  5697. watcher.run();
  5698. // in dev build, check and stop circular updates.
  5699. if ( true && has[id] != null) {
  5700. circular[id] = (circular[id] || 0) + 1;
  5701. if (circular[id] > MAX_UPDATE_COUNT) {
  5702. warn(
  5703. 'You may have an infinite update loop ' + (
  5704. watcher.user
  5705. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  5706. : "in a component render function."
  5707. ),
  5708. watcher.vm
  5709. );
  5710. break
  5711. }
  5712. }
  5713. }
  5714. // keep copies of post queues before resetting state
  5715. var activatedQueue = activatedChildren.slice();
  5716. var updatedQueue = queue.slice();
  5717. resetSchedulerState();
  5718. // call component updated and activated hooks
  5719. callActivatedHooks(activatedQueue);
  5720. callUpdatedHooks(updatedQueue);
  5721. // devtool hook
  5722. /* istanbul ignore if */
  5723. if (devtools && config.devtools) {
  5724. devtools.emit('flush');
  5725. }
  5726. }
  5727. function callUpdatedHooks (queue) {
  5728. var i = queue.length;
  5729. while (i--) {
  5730. var watcher = queue[i];
  5731. var vm = watcher.vm;
  5732. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  5733. callHook(vm, 'updated');
  5734. }
  5735. }
  5736. }
  5737. /**
  5738. * Queue a kept-alive component that was activated during patch.
  5739. * The queue will be processed after the entire tree has been patched.
  5740. */
  5741. function queueActivatedComponent (vm) {
  5742. // setting _inactive to false here so that a render function can
  5743. // rely on checking whether it's in an inactive tree (e.g. router-view)
  5744. vm._inactive = false;
  5745. activatedChildren.push(vm);
  5746. }
  5747. function callActivatedHooks (queue) {
  5748. for (var i = 0; i < queue.length; i++) {
  5749. queue[i]._inactive = true;
  5750. activateChildComponent(queue[i], true /* true */);
  5751. }
  5752. }
  5753. /**
  5754. * Push a watcher into the watcher queue.
  5755. * Jobs with duplicate IDs will be skipped unless it's
  5756. * pushed when the queue is being flushed.
  5757. */
  5758. function queueWatcher (watcher) {
  5759. var id = watcher.id;
  5760. if (has[id] == null) {
  5761. has[id] = true;
  5762. if (!flushing) {
  5763. queue.push(watcher);
  5764. } else {
  5765. // if already flushing, splice the watcher based on its id
  5766. // if already past its id, it will be run next immediately.
  5767. var i = queue.length - 1;
  5768. while (i > index && queue[i].id > watcher.id) {
  5769. i--;
  5770. }
  5771. queue.splice(i + 1, 0, watcher);
  5772. }
  5773. // queue the flush
  5774. if (!waiting) {
  5775. waiting = true;
  5776. if ( true && !config.async) {
  5777. flushSchedulerQueue();
  5778. return
  5779. }
  5780. nextTick(flushSchedulerQueue);
  5781. }
  5782. }
  5783. }
  5784. /* */
  5785. var uid$2 = 0;
  5786. /**
  5787. * A watcher parses an expression, collects dependencies,
  5788. * and fires callback when the expression value changes.
  5789. * This is used for both the $watch() api and directives.
  5790. */
  5791. var Watcher = function Watcher (
  5792. vm,
  5793. expOrFn,
  5794. cb,
  5795. options,
  5796. isRenderWatcher
  5797. ) {
  5798. this.vm = vm;
  5799. if (isRenderWatcher) {
  5800. vm._watcher = this;
  5801. }
  5802. vm._watchers.push(this);
  5803. // options
  5804. if (options) {
  5805. this.deep = !!options.deep;
  5806. this.user = !!options.user;
  5807. this.lazy = !!options.lazy;
  5808. this.sync = !!options.sync;
  5809. this.before = options.before;
  5810. } else {
  5811. this.deep = this.user = this.lazy = this.sync = false;
  5812. }
  5813. this.cb = cb;
  5814. this.id = ++uid$2; // uid for batching
  5815. this.active = true;
  5816. this.dirty = this.lazy; // for lazy watchers
  5817. this.deps = [];
  5818. this.newDeps = [];
  5819. this.depIds = new _Set();
  5820. this.newDepIds = new _Set();
  5821. this.expression = true
  5822. ? expOrFn.toString()
  5823. : undefined;
  5824. // parse expression for getter
  5825. if (typeof expOrFn === 'function') {
  5826. this.getter = expOrFn;
  5827. } else {
  5828. this.getter = parsePath(expOrFn);
  5829. if (!this.getter) {
  5830. this.getter = noop;
  5831. true && warn(
  5832. "Failed watching path: \"" + expOrFn + "\" " +
  5833. 'Watcher only accepts simple dot-delimited paths. ' +
  5834. 'For full control, use a function instead.',
  5835. vm
  5836. );
  5837. }
  5838. }
  5839. this.value = this.lazy
  5840. ? undefined
  5841. : this.get();
  5842. };
  5843. /**
  5844. * Evaluate the getter, and re-collect dependencies.
  5845. */
  5846. Watcher.prototype.get = function get () {
  5847. pushTarget(this);
  5848. var value;
  5849. var vm = this.vm;
  5850. try {
  5851. value = this.getter.call(vm, vm);
  5852. } catch (e) {
  5853. if (this.user) {
  5854. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  5855. } else {
  5856. throw e
  5857. }
  5858. } finally {
  5859. // "touch" every property so they are all tracked as
  5860. // dependencies for deep watching
  5861. if (this.deep) {
  5862. traverse(value);
  5863. }
  5864. popTarget();
  5865. this.cleanupDeps();
  5866. }
  5867. return value
  5868. };
  5869. /**
  5870. * Add a dependency to this directive.
  5871. */
  5872. Watcher.prototype.addDep = function addDep (dep) {
  5873. var id = dep.id;
  5874. if (!this.newDepIds.has(id)) {
  5875. this.newDepIds.add(id);
  5876. this.newDeps.push(dep);
  5877. if (!this.depIds.has(id)) {
  5878. dep.addSub(this);
  5879. }
  5880. }
  5881. };
  5882. /**
  5883. * Clean up for dependency collection.
  5884. */
  5885. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  5886. var i = this.deps.length;
  5887. while (i--) {
  5888. var dep = this.deps[i];
  5889. if (!this.newDepIds.has(dep.id)) {
  5890. dep.removeSub(this);
  5891. }
  5892. }
  5893. var tmp = this.depIds;
  5894. this.depIds = this.newDepIds;
  5895. this.newDepIds = tmp;
  5896. this.newDepIds.clear();
  5897. tmp = this.deps;
  5898. this.deps = this.newDeps;
  5899. this.newDeps = tmp;
  5900. this.newDeps.length = 0;
  5901. };
  5902. /**
  5903. * Subscriber interface.
  5904. * Will be called when a dependency changes.
  5905. */
  5906. Watcher.prototype.update = function update () {
  5907. /* istanbul ignore else */
  5908. if (this.lazy) {
  5909. this.dirty = true;
  5910. } else if (this.sync) {
  5911. this.run();
  5912. } else {
  5913. queueWatcher(this);
  5914. }
  5915. };
  5916. /**
  5917. * Scheduler job interface.
  5918. * Will be called by the scheduler.
  5919. */
  5920. Watcher.prototype.run = function run () {
  5921. if (this.active) {
  5922. var value = this.get();
  5923. if (
  5924. value !== this.value ||
  5925. // Deep watchers and watchers on Object/Arrays should fire even
  5926. // when the value is the same, because the value may
  5927. // have mutated.
  5928. isObject(value) ||
  5929. this.deep
  5930. ) {
  5931. // set new value
  5932. var oldValue = this.value;
  5933. this.value = value;
  5934. if (this.user) {
  5935. try {
  5936. this.cb.call(this.vm, value, oldValue);
  5937. } catch (e) {
  5938. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  5939. }
  5940. } else {
  5941. this.cb.call(this.vm, value, oldValue);
  5942. }
  5943. }
  5944. }
  5945. };
  5946. /**
  5947. * Evaluate the value of the watcher.
  5948. * This only gets called for lazy watchers.
  5949. */
  5950. Watcher.prototype.evaluate = function evaluate () {
  5951. this.value = this.get();
  5952. this.dirty = false;
  5953. };
  5954. /**
  5955. * Depend on all deps collected by this watcher.
  5956. */
  5957. Watcher.prototype.depend = function depend () {
  5958. var i = this.deps.length;
  5959. while (i--) {
  5960. this.deps[i].depend();
  5961. }
  5962. };
  5963. /**
  5964. * Remove self from all dependencies' subscriber list.
  5965. */
  5966. Watcher.prototype.teardown = function teardown () {
  5967. if (this.active) {
  5968. // remove self from vm's watcher list
  5969. // this is a somewhat expensive operation so we skip it
  5970. // if the vm is being destroyed.
  5971. if (!this.vm._isBeingDestroyed) {
  5972. remove(this.vm._watchers, this);
  5973. }
  5974. var i = this.deps.length;
  5975. while (i--) {
  5976. this.deps[i].removeSub(this);
  5977. }
  5978. this.active = false;
  5979. }
  5980. };
  5981. /* */
  5982. var sharedPropertyDefinition = {
  5983. enumerable: true,
  5984. configurable: true,
  5985. get: noop,
  5986. set: noop
  5987. };
  5988. function proxy (target, sourceKey, key) {
  5989. sharedPropertyDefinition.get = function proxyGetter () {
  5990. return this[sourceKey][key]
  5991. };
  5992. sharedPropertyDefinition.set = function proxySetter (val) {
  5993. this[sourceKey][key] = val;
  5994. };
  5995. Object.defineProperty(target, key, sharedPropertyDefinition);
  5996. }
  5997. function initState (vm) {
  5998. vm._watchers = [];
  5999. var opts = vm.$options;
  6000. if (opts.props) { initProps(vm, opts.props); }
  6001. if (opts.methods) { initMethods(vm, opts.methods); }
  6002. if (opts.data) {
  6003. initData(vm);
  6004. } else {
  6005. observe(vm._data = {}, true /* asRootData */);
  6006. }
  6007. if (opts.computed) { initComputed(vm, opts.computed); }
  6008. if (opts.watch && opts.watch !== nativeWatch) {
  6009. initWatch(vm, opts.watch);
  6010. }
  6011. }
  6012. function initProps (vm, propsOptions) {
  6013. var propsData = vm.$options.propsData || {};
  6014. var props = vm._props = {};
  6015. // cache prop keys so that future props updates can iterate using Array
  6016. // instead of dynamic object key enumeration.
  6017. var keys = vm.$options._propKeys = [];
  6018. var isRoot = !vm.$parent;
  6019. // root instance props should be converted
  6020. if (!isRoot) {
  6021. toggleObserving(false);
  6022. }
  6023. var loop = function ( key ) {
  6024. keys.push(key);
  6025. var value = validateProp(key, propsOptions, propsData, vm);
  6026. /* istanbul ignore else */
  6027. if (true) {
  6028. var hyphenatedKey = hyphenate(key);
  6029. if (isReservedAttribute(hyphenatedKey) ||
  6030. config.isReservedAttr(hyphenatedKey)) {
  6031. warn(
  6032. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  6033. vm
  6034. );
  6035. }
  6036. defineReactive$$1(props, key, value, function () {
  6037. if (!isRoot && !isUpdatingChildComponent) {
  6038. {
  6039. if(vm.mpHost === 'mp-baidu'){//百度 observer 在 setData callback 之后触发,直接忽略该 warn
  6040. return
  6041. }
  6042. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  6043. if(
  6044. key === 'value' &&
  6045. Array.isArray(vm.$options.behaviors) &&
  6046. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  6047. ){
  6048. return
  6049. }
  6050. if(vm._getFormData){
  6051. return
  6052. }
  6053. var $parent = vm.$parent;
  6054. while($parent){
  6055. if($parent.__next_tick_pending){
  6056. return
  6057. }
  6058. $parent = $parent.$parent;
  6059. }
  6060. }
  6061. warn(
  6062. "Avoid mutating a prop directly since the value will be " +
  6063. "overwritten whenever the parent component re-renders. " +
  6064. "Instead, use a data or computed property based on the prop's " +
  6065. "value. Prop being mutated: \"" + key + "\"",
  6066. vm
  6067. );
  6068. }
  6069. });
  6070. } else {}
  6071. // static props are already proxied on the component's prototype
  6072. // during Vue.extend(). We only need to proxy props defined at
  6073. // instantiation here.
  6074. if (!(key in vm)) {
  6075. proxy(vm, "_props", key);
  6076. }
  6077. };
  6078. for (var key in propsOptions) loop( key );
  6079. toggleObserving(true);
  6080. }
  6081. function initData (vm) {
  6082. var data = vm.$options.data;
  6083. data = vm._data = typeof data === 'function'
  6084. ? getData(data, vm)
  6085. : data || {};
  6086. if (!isPlainObject(data)) {
  6087. data = {};
  6088. true && warn(
  6089. 'data functions should return an object:\n' +
  6090. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  6091. vm
  6092. );
  6093. }
  6094. // proxy data on instance
  6095. var keys = Object.keys(data);
  6096. var props = vm.$options.props;
  6097. var methods = vm.$options.methods;
  6098. var i = keys.length;
  6099. while (i--) {
  6100. var key = keys[i];
  6101. if (true) {
  6102. if (methods && hasOwn(methods, key)) {
  6103. warn(
  6104. ("Method \"" + key + "\" has already been defined as a data property."),
  6105. vm
  6106. );
  6107. }
  6108. }
  6109. if (props && hasOwn(props, key)) {
  6110. true && warn(
  6111. "The data property \"" + key + "\" is already declared as a prop. " +
  6112. "Use prop default value instead.",
  6113. vm
  6114. );
  6115. } else if (!isReserved(key)) {
  6116. proxy(vm, "_data", key);
  6117. }
  6118. }
  6119. // observe data
  6120. observe(data, true /* asRootData */);
  6121. }
  6122. function getData (data, vm) {
  6123. // #7573 disable dep collection when invoking data getters
  6124. pushTarget();
  6125. try {
  6126. return data.call(vm, vm)
  6127. } catch (e) {
  6128. handleError(e, vm, "data()");
  6129. return {}
  6130. } finally {
  6131. popTarget();
  6132. }
  6133. }
  6134. var computedWatcherOptions = { lazy: true };
  6135. function initComputed (vm, computed) {
  6136. // $flow-disable-line
  6137. var watchers = vm._computedWatchers = Object.create(null);
  6138. // computed properties are just getters during SSR
  6139. var isSSR = isServerRendering();
  6140. for (var key in computed) {
  6141. var userDef = computed[key];
  6142. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  6143. if ( true && getter == null) {
  6144. warn(
  6145. ("Getter is missing for computed property \"" + key + "\"."),
  6146. vm
  6147. );
  6148. }
  6149. if (!isSSR) {
  6150. // create internal watcher for the computed property.
  6151. watchers[key] = new Watcher(
  6152. vm,
  6153. getter || noop,
  6154. noop,
  6155. computedWatcherOptions
  6156. );
  6157. }
  6158. // component-defined computed properties are already defined on the
  6159. // component prototype. We only need to define computed properties defined
  6160. // at instantiation here.
  6161. if (!(key in vm)) {
  6162. defineComputed(vm, key, userDef);
  6163. } else if (true) {
  6164. if (key in vm.$data) {
  6165. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  6166. } else if (vm.$options.props && key in vm.$options.props) {
  6167. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  6168. }
  6169. }
  6170. }
  6171. }
  6172. function defineComputed (
  6173. target,
  6174. key,
  6175. userDef
  6176. ) {
  6177. var shouldCache = !isServerRendering();
  6178. if (typeof userDef === 'function') {
  6179. sharedPropertyDefinition.get = shouldCache
  6180. ? createComputedGetter(key)
  6181. : createGetterInvoker(userDef);
  6182. sharedPropertyDefinition.set = noop;
  6183. } else {
  6184. sharedPropertyDefinition.get = userDef.get
  6185. ? shouldCache && userDef.cache !== false
  6186. ? createComputedGetter(key)
  6187. : createGetterInvoker(userDef.get)
  6188. : noop;
  6189. sharedPropertyDefinition.set = userDef.set || noop;
  6190. }
  6191. if ( true &&
  6192. sharedPropertyDefinition.set === noop) {
  6193. sharedPropertyDefinition.set = function () {
  6194. warn(
  6195. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  6196. this
  6197. );
  6198. };
  6199. }
  6200. Object.defineProperty(target, key, sharedPropertyDefinition);
  6201. }
  6202. function createComputedGetter (key) {
  6203. return function computedGetter () {
  6204. var watcher = this._computedWatchers && this._computedWatchers[key];
  6205. if (watcher) {
  6206. if (watcher.dirty) {
  6207. watcher.evaluate();
  6208. }
  6209. if (Dep.SharedObject.target) {// fixed by xxxxxx
  6210. watcher.depend();
  6211. }
  6212. return watcher.value
  6213. }
  6214. }
  6215. }
  6216. function createGetterInvoker(fn) {
  6217. return function computedGetter () {
  6218. return fn.call(this, this)
  6219. }
  6220. }
  6221. function initMethods (vm, methods) {
  6222. var props = vm.$options.props;
  6223. for (var key in methods) {
  6224. if (true) {
  6225. if (typeof methods[key] !== 'function') {
  6226. warn(
  6227. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  6228. "Did you reference the function correctly?",
  6229. vm
  6230. );
  6231. }
  6232. if (props && hasOwn(props, key)) {
  6233. warn(
  6234. ("Method \"" + key + "\" has already been defined as a prop."),
  6235. vm
  6236. );
  6237. }
  6238. if ((key in vm) && isReserved(key)) {
  6239. warn(
  6240. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  6241. "Avoid defining component methods that start with _ or $."
  6242. );
  6243. }
  6244. }
  6245. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  6246. }
  6247. }
  6248. function initWatch (vm, watch) {
  6249. for (var key in watch) {
  6250. var handler = watch[key];
  6251. if (Array.isArray(handler)) {
  6252. for (var i = 0; i < handler.length; i++) {
  6253. createWatcher(vm, key, handler[i]);
  6254. }
  6255. } else {
  6256. createWatcher(vm, key, handler);
  6257. }
  6258. }
  6259. }
  6260. function createWatcher (
  6261. vm,
  6262. expOrFn,
  6263. handler,
  6264. options
  6265. ) {
  6266. if (isPlainObject(handler)) {
  6267. options = handler;
  6268. handler = handler.handler;
  6269. }
  6270. if (typeof handler === 'string') {
  6271. handler = vm[handler];
  6272. }
  6273. return vm.$watch(expOrFn, handler, options)
  6274. }
  6275. function stateMixin (Vue) {
  6276. // flow somehow has problems with directly declared definition object
  6277. // when using Object.defineProperty, so we have to procedurally build up
  6278. // the object here.
  6279. var dataDef = {};
  6280. dataDef.get = function () { return this._data };
  6281. var propsDef = {};
  6282. propsDef.get = function () { return this._props };
  6283. if (true) {
  6284. dataDef.set = function () {
  6285. warn(
  6286. 'Avoid replacing instance root $data. ' +
  6287. 'Use nested data properties instead.',
  6288. this
  6289. );
  6290. };
  6291. propsDef.set = function () {
  6292. warn("$props is readonly.", this);
  6293. };
  6294. }
  6295. Object.defineProperty(Vue.prototype, '$data', dataDef);
  6296. Object.defineProperty(Vue.prototype, '$props', propsDef);
  6297. Vue.prototype.$set = set;
  6298. Vue.prototype.$delete = del;
  6299. Vue.prototype.$watch = function (
  6300. expOrFn,
  6301. cb,
  6302. options
  6303. ) {
  6304. var vm = this;
  6305. if (isPlainObject(cb)) {
  6306. return createWatcher(vm, expOrFn, cb, options)
  6307. }
  6308. options = options || {};
  6309. options.user = true;
  6310. var watcher = new Watcher(vm, expOrFn, cb, options);
  6311. if (options.immediate) {
  6312. try {
  6313. cb.call(vm, watcher.value);
  6314. } catch (error) {
  6315. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  6316. }
  6317. }
  6318. return function unwatchFn () {
  6319. watcher.teardown();
  6320. }
  6321. };
  6322. }
  6323. /* */
  6324. var uid$3 = 0;
  6325. function initMixin (Vue) {
  6326. Vue.prototype._init = function (options) {
  6327. var vm = this;
  6328. // a uid
  6329. vm._uid = uid$3++;
  6330. var startTag, endTag;
  6331. /* istanbul ignore if */
  6332. if ( true && config.performance && mark) {
  6333. startTag = "vue-perf-start:" + (vm._uid);
  6334. endTag = "vue-perf-end:" + (vm._uid);
  6335. mark(startTag);
  6336. }
  6337. // a flag to avoid this being observed
  6338. vm._isVue = true;
  6339. // merge options
  6340. if (options && options._isComponent) {
  6341. // optimize internal component instantiation
  6342. // since dynamic options merging is pretty slow, and none of the
  6343. // internal component options needs special treatment.
  6344. initInternalComponent(vm, options);
  6345. } else {
  6346. vm.$options = mergeOptions(
  6347. resolveConstructorOptions(vm.constructor),
  6348. options || {},
  6349. vm
  6350. );
  6351. }
  6352. /* istanbul ignore else */
  6353. if (true) {
  6354. initProxy(vm);
  6355. } else {}
  6356. // expose real self
  6357. vm._self = vm;
  6358. initLifecycle(vm);
  6359. initEvents(vm);
  6360. initRender(vm);
  6361. callHook(vm, 'beforeCreate');
  6362. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  6363. initState(vm);
  6364. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  6365. !vm._$fallback && callHook(vm, 'created');
  6366. /* istanbul ignore if */
  6367. if ( true && config.performance && mark) {
  6368. vm._name = formatComponentName(vm, false);
  6369. mark(endTag);
  6370. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  6371. }
  6372. if (vm.$options.el) {
  6373. vm.$mount(vm.$options.el);
  6374. }
  6375. };
  6376. }
  6377. function initInternalComponent (vm, options) {
  6378. var opts = vm.$options = Object.create(vm.constructor.options);
  6379. // doing this because it's faster than dynamic enumeration.
  6380. var parentVnode = options._parentVnode;
  6381. opts.parent = options.parent;
  6382. opts._parentVnode = parentVnode;
  6383. var vnodeComponentOptions = parentVnode.componentOptions;
  6384. opts.propsData = vnodeComponentOptions.propsData;
  6385. opts._parentListeners = vnodeComponentOptions.listeners;
  6386. opts._renderChildren = vnodeComponentOptions.children;
  6387. opts._componentTag = vnodeComponentOptions.tag;
  6388. if (options.render) {
  6389. opts.render = options.render;
  6390. opts.staticRenderFns = options.staticRenderFns;
  6391. }
  6392. }
  6393. function resolveConstructorOptions (Ctor) {
  6394. var options = Ctor.options;
  6395. if (Ctor.super) {
  6396. var superOptions = resolveConstructorOptions(Ctor.super);
  6397. var cachedSuperOptions = Ctor.superOptions;
  6398. if (superOptions !== cachedSuperOptions) {
  6399. // super option changed,
  6400. // need to resolve new options.
  6401. Ctor.superOptions = superOptions;
  6402. // check if there are any late-modified/attached options (#4976)
  6403. var modifiedOptions = resolveModifiedOptions(Ctor);
  6404. // update base extend options
  6405. if (modifiedOptions) {
  6406. extend(Ctor.extendOptions, modifiedOptions);
  6407. }
  6408. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  6409. if (options.name) {
  6410. options.components[options.name] = Ctor;
  6411. }
  6412. }
  6413. }
  6414. return options
  6415. }
  6416. function resolveModifiedOptions (Ctor) {
  6417. var modified;
  6418. var latest = Ctor.options;
  6419. var sealed = Ctor.sealedOptions;
  6420. for (var key in latest) {
  6421. if (latest[key] !== sealed[key]) {
  6422. if (!modified) { modified = {}; }
  6423. modified[key] = latest[key];
  6424. }
  6425. }
  6426. return modified
  6427. }
  6428. function Vue (options) {
  6429. if ( true &&
  6430. !(this instanceof Vue)
  6431. ) {
  6432. warn('Vue is a constructor and should be called with the `new` keyword');
  6433. }
  6434. this._init(options);
  6435. }
  6436. initMixin(Vue);
  6437. stateMixin(Vue);
  6438. eventsMixin(Vue);
  6439. lifecycleMixin(Vue);
  6440. renderMixin(Vue);
  6441. /* */
  6442. function initUse (Vue) {
  6443. Vue.use = function (plugin) {
  6444. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  6445. if (installedPlugins.indexOf(plugin) > -1) {
  6446. return this
  6447. }
  6448. // additional parameters
  6449. var args = toArray(arguments, 1);
  6450. args.unshift(this);
  6451. if (typeof plugin.install === 'function') {
  6452. plugin.install.apply(plugin, args);
  6453. } else if (typeof plugin === 'function') {
  6454. plugin.apply(null, args);
  6455. }
  6456. installedPlugins.push(plugin);
  6457. return this
  6458. };
  6459. }
  6460. /* */
  6461. function initMixin$1 (Vue) {
  6462. Vue.mixin = function (mixin) {
  6463. this.options = mergeOptions(this.options, mixin);
  6464. return this
  6465. };
  6466. }
  6467. /* */
  6468. function initExtend (Vue) {
  6469. /**
  6470. * Each instance constructor, including Vue, has a unique
  6471. * cid. This enables us to create wrapped "child
  6472. * constructors" for prototypal inheritance and cache them.
  6473. */
  6474. Vue.cid = 0;
  6475. var cid = 1;
  6476. /**
  6477. * Class inheritance
  6478. */
  6479. Vue.extend = function (extendOptions) {
  6480. extendOptions = extendOptions || {};
  6481. var Super = this;
  6482. var SuperId = Super.cid;
  6483. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  6484. if (cachedCtors[SuperId]) {
  6485. return cachedCtors[SuperId]
  6486. }
  6487. var name = extendOptions.name || Super.options.name;
  6488. if ( true && name) {
  6489. validateComponentName(name);
  6490. }
  6491. var Sub = function VueComponent (options) {
  6492. this._init(options);
  6493. };
  6494. Sub.prototype = Object.create(Super.prototype);
  6495. Sub.prototype.constructor = Sub;
  6496. Sub.cid = cid++;
  6497. Sub.options = mergeOptions(
  6498. Super.options,
  6499. extendOptions
  6500. );
  6501. Sub['super'] = Super;
  6502. // For props and computed properties, we define the proxy getters on
  6503. // the Vue instances at extension time, on the extended prototype. This
  6504. // avoids Object.defineProperty calls for each instance created.
  6505. if (Sub.options.props) {
  6506. initProps$1(Sub);
  6507. }
  6508. if (Sub.options.computed) {
  6509. initComputed$1(Sub);
  6510. }
  6511. // allow further extension/mixin/plugin usage
  6512. Sub.extend = Super.extend;
  6513. Sub.mixin = Super.mixin;
  6514. Sub.use = Super.use;
  6515. // create asset registers, so extended classes
  6516. // can have their private assets too.
  6517. ASSET_TYPES.forEach(function (type) {
  6518. Sub[type] = Super[type];
  6519. });
  6520. // enable recursive self-lookup
  6521. if (name) {
  6522. Sub.options.components[name] = Sub;
  6523. }
  6524. // keep a reference to the super options at extension time.
  6525. // later at instantiation we can check if Super's options have
  6526. // been updated.
  6527. Sub.superOptions = Super.options;
  6528. Sub.extendOptions = extendOptions;
  6529. Sub.sealedOptions = extend({}, Sub.options);
  6530. // cache constructor
  6531. cachedCtors[SuperId] = Sub;
  6532. return Sub
  6533. };
  6534. }
  6535. function initProps$1 (Comp) {
  6536. var props = Comp.options.props;
  6537. for (var key in props) {
  6538. proxy(Comp.prototype, "_props", key);
  6539. }
  6540. }
  6541. function initComputed$1 (Comp) {
  6542. var computed = Comp.options.computed;
  6543. for (var key in computed) {
  6544. defineComputed(Comp.prototype, key, computed[key]);
  6545. }
  6546. }
  6547. /* */
  6548. function initAssetRegisters (Vue) {
  6549. /**
  6550. * Create asset registration methods.
  6551. */
  6552. ASSET_TYPES.forEach(function (type) {
  6553. Vue[type] = function (
  6554. id,
  6555. definition
  6556. ) {
  6557. if (!definition) {
  6558. return this.options[type + 's'][id]
  6559. } else {
  6560. /* istanbul ignore if */
  6561. if ( true && type === 'component') {
  6562. validateComponentName(id);
  6563. }
  6564. if (type === 'component' && isPlainObject(definition)) {
  6565. definition.name = definition.name || id;
  6566. definition = this.options._base.extend(definition);
  6567. }
  6568. if (type === 'directive' && typeof definition === 'function') {
  6569. definition = { bind: definition, update: definition };
  6570. }
  6571. this.options[type + 's'][id] = definition;
  6572. return definition
  6573. }
  6574. };
  6575. });
  6576. }
  6577. /* */
  6578. function getComponentName (opts) {
  6579. return opts && (opts.Ctor.options.name || opts.tag)
  6580. }
  6581. function matches (pattern, name) {
  6582. if (Array.isArray(pattern)) {
  6583. return pattern.indexOf(name) > -1
  6584. } else if (typeof pattern === 'string') {
  6585. return pattern.split(',').indexOf(name) > -1
  6586. } else if (isRegExp(pattern)) {
  6587. return pattern.test(name)
  6588. }
  6589. /* istanbul ignore next */
  6590. return false
  6591. }
  6592. function pruneCache (keepAliveInstance, filter) {
  6593. var cache = keepAliveInstance.cache;
  6594. var keys = keepAliveInstance.keys;
  6595. var _vnode = keepAliveInstance._vnode;
  6596. for (var key in cache) {
  6597. var cachedNode = cache[key];
  6598. if (cachedNode) {
  6599. var name = getComponentName(cachedNode.componentOptions);
  6600. if (name && !filter(name)) {
  6601. pruneCacheEntry(cache, key, keys, _vnode);
  6602. }
  6603. }
  6604. }
  6605. }
  6606. function pruneCacheEntry (
  6607. cache,
  6608. key,
  6609. keys,
  6610. current
  6611. ) {
  6612. var cached$$1 = cache[key];
  6613. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  6614. cached$$1.componentInstance.$destroy();
  6615. }
  6616. cache[key] = null;
  6617. remove(keys, key);
  6618. }
  6619. var patternTypes = [String, RegExp, Array];
  6620. var KeepAlive = {
  6621. name: 'keep-alive',
  6622. abstract: true,
  6623. props: {
  6624. include: patternTypes,
  6625. exclude: patternTypes,
  6626. max: [String, Number]
  6627. },
  6628. created: function created () {
  6629. this.cache = Object.create(null);
  6630. this.keys = [];
  6631. },
  6632. destroyed: function destroyed () {
  6633. for (var key in this.cache) {
  6634. pruneCacheEntry(this.cache, key, this.keys);
  6635. }
  6636. },
  6637. mounted: function mounted () {
  6638. var this$1 = this;
  6639. this.$watch('include', function (val) {
  6640. pruneCache(this$1, function (name) { return matches(val, name); });
  6641. });
  6642. this.$watch('exclude', function (val) {
  6643. pruneCache(this$1, function (name) { return !matches(val, name); });
  6644. });
  6645. },
  6646. render: function render () {
  6647. var slot = this.$slots.default;
  6648. var vnode = getFirstComponentChild(slot);
  6649. var componentOptions = vnode && vnode.componentOptions;
  6650. if (componentOptions) {
  6651. // check pattern
  6652. var name = getComponentName(componentOptions);
  6653. var ref = this;
  6654. var include = ref.include;
  6655. var exclude = ref.exclude;
  6656. if (
  6657. // not included
  6658. (include && (!name || !matches(include, name))) ||
  6659. // excluded
  6660. (exclude && name && matches(exclude, name))
  6661. ) {
  6662. return vnode
  6663. }
  6664. var ref$1 = this;
  6665. var cache = ref$1.cache;
  6666. var keys = ref$1.keys;
  6667. var key = vnode.key == null
  6668. // same constructor may get registered as different local components
  6669. // so cid alone is not enough (#3269)
  6670. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  6671. : vnode.key;
  6672. if (cache[key]) {
  6673. vnode.componentInstance = cache[key].componentInstance;
  6674. // make current key freshest
  6675. remove(keys, key);
  6676. keys.push(key);
  6677. } else {
  6678. cache[key] = vnode;
  6679. keys.push(key);
  6680. // prune oldest entry
  6681. if (this.max && keys.length > parseInt(this.max)) {
  6682. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  6683. }
  6684. }
  6685. vnode.data.keepAlive = true;
  6686. }
  6687. return vnode || (slot && slot[0])
  6688. }
  6689. };
  6690. var builtInComponents = {
  6691. KeepAlive: KeepAlive
  6692. };
  6693. /* */
  6694. function initGlobalAPI (Vue) {
  6695. // config
  6696. var configDef = {};
  6697. configDef.get = function () { return config; };
  6698. if (true) {
  6699. configDef.set = function () {
  6700. warn(
  6701. 'Do not replace the Vue.config object, set individual fields instead.'
  6702. );
  6703. };
  6704. }
  6705. Object.defineProperty(Vue, 'config', configDef);
  6706. // exposed util methods.
  6707. // NOTE: these are not considered part of the public API - avoid relying on
  6708. // them unless you are aware of the risk.
  6709. Vue.util = {
  6710. warn: warn,
  6711. extend: extend,
  6712. mergeOptions: mergeOptions,
  6713. defineReactive: defineReactive$$1
  6714. };
  6715. Vue.set = set;
  6716. Vue.delete = del;
  6717. Vue.nextTick = nextTick;
  6718. // 2.6 explicit observable API
  6719. Vue.observable = function (obj) {
  6720. observe(obj);
  6721. return obj
  6722. };
  6723. Vue.options = Object.create(null);
  6724. ASSET_TYPES.forEach(function (type) {
  6725. Vue.options[type + 's'] = Object.create(null);
  6726. });
  6727. // this is used to identify the "base" constructor to extend all plain-object
  6728. // components with in Weex's multi-instance scenarios.
  6729. Vue.options._base = Vue;
  6730. extend(Vue.options.components, builtInComponents);
  6731. initUse(Vue);
  6732. initMixin$1(Vue);
  6733. initExtend(Vue);
  6734. initAssetRegisters(Vue);
  6735. }
  6736. initGlobalAPI(Vue);
  6737. Object.defineProperty(Vue.prototype, '$isServer', {
  6738. get: isServerRendering
  6739. });
  6740. Object.defineProperty(Vue.prototype, '$ssrContext', {
  6741. get: function get () {
  6742. /* istanbul ignore next */
  6743. return this.$vnode && this.$vnode.ssrContext
  6744. }
  6745. });
  6746. // expose FunctionalRenderContext for ssr runtime helper installation
  6747. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  6748. value: FunctionalRenderContext
  6749. });
  6750. Vue.version = '2.6.11';
  6751. /**
  6752. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  6753. */
  6754. var ARRAYTYPE = '[object Array]';
  6755. var OBJECTTYPE = '[object Object]';
  6756. // const FUNCTIONTYPE = '[object Function]'
  6757. function diff(current, pre) {
  6758. var result = {};
  6759. syncKeys(current, pre);
  6760. _diff(current, pre, '', result);
  6761. return result
  6762. }
  6763. function syncKeys(current, pre) {
  6764. if (current === pre) { return }
  6765. var rootCurrentType = type(current);
  6766. var rootPreType = type(pre);
  6767. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  6768. if(Object.keys(current).length >= Object.keys(pre).length){
  6769. for (var key in pre) {
  6770. var currentValue = current[key];
  6771. if (currentValue === undefined) {
  6772. current[key] = null;
  6773. } else {
  6774. syncKeys(currentValue, pre[key]);
  6775. }
  6776. }
  6777. }
  6778. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  6779. if (current.length >= pre.length) {
  6780. pre.forEach(function (item, index) {
  6781. syncKeys(current[index], item);
  6782. });
  6783. }
  6784. }
  6785. }
  6786. function _diff(current, pre, path, result) {
  6787. if (current === pre) { return }
  6788. var rootCurrentType = type(current);
  6789. var rootPreType = type(pre);
  6790. if (rootCurrentType == OBJECTTYPE) {
  6791. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  6792. setResult(result, path, current);
  6793. } else {
  6794. var loop = function ( key ) {
  6795. var currentValue = current[key];
  6796. var preValue = pre[key];
  6797. var currentType = type(currentValue);
  6798. var preType = type(preValue);
  6799. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  6800. if (currentValue != pre[key]) {
  6801. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6802. }
  6803. } else if (currentType == ARRAYTYPE) {
  6804. if (preType != ARRAYTYPE) {
  6805. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6806. } else {
  6807. if (currentValue.length < preValue.length) {
  6808. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6809. } else {
  6810. currentValue.forEach(function (item, index) {
  6811. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  6812. });
  6813. }
  6814. }
  6815. } else if (currentType == OBJECTTYPE) {
  6816. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  6817. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6818. } else {
  6819. for (var subKey in currentValue) {
  6820. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  6821. }
  6822. }
  6823. }
  6824. };
  6825. for (var key in current) loop( key );
  6826. }
  6827. } else if (rootCurrentType == ARRAYTYPE) {
  6828. if (rootPreType != ARRAYTYPE) {
  6829. setResult(result, path, current);
  6830. } else {
  6831. if (current.length < pre.length) {
  6832. setResult(result, path, current);
  6833. } else {
  6834. current.forEach(function (item, index) {
  6835. _diff(item, pre[index], path + '[' + index + ']', result);
  6836. });
  6837. }
  6838. }
  6839. } else {
  6840. setResult(result, path, current);
  6841. }
  6842. }
  6843. function setResult(result, k, v) {
  6844. // if (type(v) != FUNCTIONTYPE) {
  6845. result[k] = v;
  6846. // }
  6847. }
  6848. function type(obj) {
  6849. return Object.prototype.toString.call(obj)
  6850. }
  6851. /* */
  6852. function flushCallbacks$1(vm) {
  6853. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  6854. if (Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  6855. var mpInstance = vm.$scope;
  6856. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  6857. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  6858. }
  6859. var copies = vm.__next_tick_callbacks.slice(0);
  6860. vm.__next_tick_callbacks.length = 0;
  6861. for (var i = 0; i < copies.length; i++) {
  6862. copies[i]();
  6863. }
  6864. }
  6865. }
  6866. function hasRenderWatcher(vm) {
  6867. return queue.find(function (watcher) { return vm._watcher === watcher; })
  6868. }
  6869. function nextTick$1(vm, cb) {
  6870. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  6871. //2.nextTick 之前存在 render watcher
  6872. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  6873. if(Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  6874. var mpInstance = vm.$scope;
  6875. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  6876. ']:nextVueTick');
  6877. }
  6878. return nextTick(cb, vm)
  6879. }else{
  6880. if(Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  6881. var mpInstance$1 = vm.$scope;
  6882. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  6883. ']:nextMPTick');
  6884. }
  6885. }
  6886. var _resolve;
  6887. if (!vm.__next_tick_callbacks) {
  6888. vm.__next_tick_callbacks = [];
  6889. }
  6890. vm.__next_tick_callbacks.push(function () {
  6891. if (cb) {
  6892. try {
  6893. cb.call(vm);
  6894. } catch (e) {
  6895. handleError(e, vm, 'nextTick');
  6896. }
  6897. } else if (_resolve) {
  6898. _resolve(vm);
  6899. }
  6900. });
  6901. // $flow-disable-line
  6902. if (!cb && typeof Promise !== 'undefined') {
  6903. return new Promise(function (resolve) {
  6904. _resolve = resolve;
  6905. })
  6906. }
  6907. }
  6908. /* */
  6909. function cloneWithData(vm) {
  6910. // 确保当前 vm 所有数据被同步
  6911. var ret = Object.create(null);
  6912. var dataKeys = [].concat(
  6913. Object.keys(vm._data || {}),
  6914. Object.keys(vm._computedWatchers || {}));
  6915. dataKeys.reduce(function(ret, key) {
  6916. ret[key] = vm[key];
  6917. return ret
  6918. }, ret);
  6919. // vue-composition-api
  6920. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  6921. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  6922. if (rawBindings) {
  6923. Object.keys(rawBindings).forEach(function (key) {
  6924. ret[key] = vm[key];
  6925. });
  6926. }
  6927. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  6928. Object.assign(ret, vm.$mp.data || {});
  6929. if (
  6930. Array.isArray(vm.$options.behaviors) &&
  6931. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  6932. ) { //form-field
  6933. ret['name'] = vm.name;
  6934. ret['value'] = vm.value;
  6935. }
  6936. return JSON.parse(JSON.stringify(ret))
  6937. }
  6938. var patch = function(oldVnode, vnode) {
  6939. var this$1 = this;
  6940. if (vnode === null) { //destroy
  6941. return
  6942. }
  6943. if (this.mpType === 'page' || this.mpType === 'component') {
  6944. var mpInstance = this.$scope;
  6945. var data = Object.create(null);
  6946. try {
  6947. data = cloneWithData(this);
  6948. } catch (err) {
  6949. console.error(err);
  6950. }
  6951. data.__webviewId__ = mpInstance.data.__webviewId__;
  6952. var mpData = Object.create(null);
  6953. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  6954. mpData[key] = mpInstance.data[key];
  6955. });
  6956. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  6957. if (Object.keys(diffData).length) {
  6958. if (Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  6959. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  6960. ']差量更新',
  6961. JSON.stringify(diffData));
  6962. }
  6963. this.__next_tick_pending = true;
  6964. mpInstance.setData(diffData, function () {
  6965. this$1.__next_tick_pending = false;
  6966. flushCallbacks$1(this$1);
  6967. });
  6968. } else {
  6969. flushCallbacks$1(this);
  6970. }
  6971. }
  6972. };
  6973. /* */
  6974. function createEmptyRender() {
  6975. }
  6976. function mountComponent$1(
  6977. vm,
  6978. el,
  6979. hydrating
  6980. ) {
  6981. if (!vm.mpType) {//main.js 中的 new Vue
  6982. return vm
  6983. }
  6984. if (vm.mpType === 'app') {
  6985. vm.$options.render = createEmptyRender;
  6986. }
  6987. if (!vm.$options.render) {
  6988. vm.$options.render = createEmptyRender;
  6989. if (true) {
  6990. /* istanbul ignore if */
  6991. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  6992. vm.$options.el || el) {
  6993. warn(
  6994. 'You are using the runtime-only build of Vue where the template ' +
  6995. 'compiler is not available. Either pre-compile the templates into ' +
  6996. 'render functions, or use the compiler-included build.',
  6997. vm
  6998. );
  6999. } else {
  7000. warn(
  7001. 'Failed to mount component: template or render function not defined.',
  7002. vm
  7003. );
  7004. }
  7005. }
  7006. }
  7007. !vm._$fallback && callHook(vm, 'beforeMount');
  7008. var updateComponent = function () {
  7009. vm._update(vm._render(), hydrating);
  7010. };
  7011. // we set this to vm._watcher inside the watcher's constructor
  7012. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  7013. // component's mounted hook), which relies on vm._watcher being already defined
  7014. new Watcher(vm, updateComponent, noop, {
  7015. before: function before() {
  7016. if (vm._isMounted && !vm._isDestroyed) {
  7017. callHook(vm, 'beforeUpdate');
  7018. }
  7019. }
  7020. }, true /* isRenderWatcher */);
  7021. hydrating = false;
  7022. return vm
  7023. }
  7024. /* */
  7025. function renderClass (
  7026. staticClass,
  7027. dynamicClass
  7028. ) {
  7029. if (isDef(staticClass) || isDef(dynamicClass)) {
  7030. return concat(staticClass, stringifyClass(dynamicClass))
  7031. }
  7032. /* istanbul ignore next */
  7033. return ''
  7034. }
  7035. function concat (a, b) {
  7036. return a ? b ? (a + ' ' + b) : a : (b || '')
  7037. }
  7038. function stringifyClass (value) {
  7039. if (Array.isArray(value)) {
  7040. return stringifyArray(value)
  7041. }
  7042. if (isObject(value)) {
  7043. return stringifyObject(value)
  7044. }
  7045. if (typeof value === 'string') {
  7046. return value
  7047. }
  7048. /* istanbul ignore next */
  7049. return ''
  7050. }
  7051. function stringifyArray (value) {
  7052. var res = '';
  7053. var stringified;
  7054. for (var i = 0, l = value.length; i < l; i++) {
  7055. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  7056. if (res) { res += ' '; }
  7057. res += stringified;
  7058. }
  7059. }
  7060. return res
  7061. }
  7062. function stringifyObject (value) {
  7063. var res = '';
  7064. for (var key in value) {
  7065. if (value[key]) {
  7066. if (res) { res += ' '; }
  7067. res += key;
  7068. }
  7069. }
  7070. return res
  7071. }
  7072. /* */
  7073. var parseStyleText = cached(function (cssText) {
  7074. var res = {};
  7075. var listDelimiter = /;(?![^(]*\))/g;
  7076. var propertyDelimiter = /:(.+)/;
  7077. cssText.split(listDelimiter).forEach(function (item) {
  7078. if (item) {
  7079. var tmp = item.split(propertyDelimiter);
  7080. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  7081. }
  7082. });
  7083. return res
  7084. });
  7085. // normalize possible array / string values into Object
  7086. function normalizeStyleBinding (bindingStyle) {
  7087. if (Array.isArray(bindingStyle)) {
  7088. return toObject(bindingStyle)
  7089. }
  7090. if (typeof bindingStyle === 'string') {
  7091. return parseStyleText(bindingStyle)
  7092. }
  7093. return bindingStyle
  7094. }
  7095. /* */
  7096. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  7097. function getTarget(obj, path) {
  7098. var parts = path.split('.');
  7099. var key = parts[0];
  7100. if (key.indexOf('__$n') === 0) { //number index
  7101. key = parseInt(key.replace('__$n', ''));
  7102. }
  7103. if (parts.length === 1) {
  7104. return obj[key]
  7105. }
  7106. return getTarget(obj[key], parts.slice(1).join('.'))
  7107. }
  7108. function internalMixin(Vue) {
  7109. Vue.config.errorHandler = function(err, vm, info) {
  7110. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  7111. console.error(err);
  7112. /* eslint-disable no-undef */
  7113. var app = getApp();
  7114. if (app && app.onError) {
  7115. app.onError(err);
  7116. }
  7117. };
  7118. var oldEmit = Vue.prototype.$emit;
  7119. Vue.prototype.$emit = function(event) {
  7120. if (this.$scope && event) {
  7121. this.$scope['triggerEvent'](event, {
  7122. __args__: toArray(arguments, 1)
  7123. });
  7124. }
  7125. return oldEmit.apply(this, arguments)
  7126. };
  7127. Vue.prototype.$nextTick = function(fn) {
  7128. return nextTick$1(this, fn)
  7129. };
  7130. MP_METHODS.forEach(function (method) {
  7131. Vue.prototype[method] = function(args) {
  7132. if (this.$scope && this.$scope[method]) {
  7133. return this.$scope[method](args)
  7134. }
  7135. // mp-alipay
  7136. if (typeof my === 'undefined') {
  7137. return
  7138. }
  7139. if (method === 'createSelectorQuery') {
  7140. /* eslint-disable no-undef */
  7141. return my.createSelectorQuery(args)
  7142. } else if (method === 'createIntersectionObserver') {
  7143. /* eslint-disable no-undef */
  7144. return my.createIntersectionObserver(args)
  7145. }
  7146. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  7147. };
  7148. });
  7149. Vue.prototype.__init_provide = initProvide;
  7150. Vue.prototype.__init_injections = initInjections;
  7151. Vue.prototype.__call_hook = function(hook, args) {
  7152. var vm = this;
  7153. // #7573 disable dep collection when invoking lifecycle hooks
  7154. pushTarget();
  7155. var handlers = vm.$options[hook];
  7156. var info = hook + " hook";
  7157. var ret;
  7158. if (handlers) {
  7159. for (var i = 0, j = handlers.length; i < j; i++) {
  7160. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  7161. }
  7162. }
  7163. if (vm._hasHookEvent) {
  7164. vm.$emit('hook:' + hook, args);
  7165. }
  7166. popTarget();
  7167. return ret
  7168. };
  7169. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  7170. if (Array.isArray(modifiers)) {
  7171. if (modifiers.indexOf('trim') !== -1) {
  7172. value = value.trim();
  7173. }
  7174. if (modifiers.indexOf('number') !== -1) {
  7175. value = this._n(value);
  7176. }
  7177. }
  7178. if (!target) {
  7179. target = this;
  7180. }
  7181. target[key] = value;
  7182. };
  7183. Vue.prototype.__set_sync = function(target, key, value) {
  7184. if (!target) {
  7185. target = this;
  7186. }
  7187. target[key] = value;
  7188. };
  7189. Vue.prototype.__get_orig = function(item) {
  7190. if (isPlainObject(item)) {
  7191. return item['$orig'] || item
  7192. }
  7193. return item
  7194. };
  7195. Vue.prototype.__get_value = function(dataPath, target) {
  7196. return getTarget(target || this, dataPath)
  7197. };
  7198. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  7199. return renderClass(staticClass, dynamicClass)
  7200. };
  7201. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  7202. if (!dynamicStyle && !staticStyle) {
  7203. return ''
  7204. }
  7205. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  7206. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  7207. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  7208. };
  7209. Vue.prototype.__map = function(val, iteratee) {
  7210. //TODO 暂不考虑 string
  7211. var ret, i, l, keys, key;
  7212. if (Array.isArray(val)) {
  7213. ret = new Array(val.length);
  7214. for (i = 0, l = val.length; i < l; i++) {
  7215. ret[i] = iteratee(val[i], i);
  7216. }
  7217. return ret
  7218. } else if (isObject(val)) {
  7219. keys = Object.keys(val);
  7220. ret = Object.create(null);
  7221. for (i = 0, l = keys.length; i < l; i++) {
  7222. key = keys[i];
  7223. ret[key] = iteratee(val[key], key, i);
  7224. }
  7225. return ret
  7226. } else if (typeof val === 'number') {
  7227. ret = new Array(val);
  7228. for (i = 0, l = val; i < l; i++) {
  7229. // 第一个参数暂时仍和小程序一致
  7230. ret[i] = iteratee(i, i);
  7231. }
  7232. return ret
  7233. }
  7234. return []
  7235. };
  7236. }
  7237. /* */
  7238. var LIFECYCLE_HOOKS$1 = [
  7239. //App
  7240. 'onLaunch',
  7241. 'onShow',
  7242. 'onHide',
  7243. 'onUniNViewMessage',
  7244. 'onPageNotFound',
  7245. 'onThemeChange',
  7246. 'onError',
  7247. 'onUnhandledRejection',
  7248. //Page
  7249. 'onLoad',
  7250. // 'onShow',
  7251. 'onReady',
  7252. // 'onHide',
  7253. 'onUnload',
  7254. 'onPullDownRefresh',
  7255. 'onReachBottom',
  7256. 'onTabItemTap',
  7257. 'onAddToFavorites',
  7258. 'onShareTimeline',
  7259. 'onShareAppMessage',
  7260. 'onResize',
  7261. 'onPageScroll',
  7262. 'onNavigationBarButtonTap',
  7263. 'onBackPress',
  7264. 'onNavigationBarSearchInputChanged',
  7265. 'onNavigationBarSearchInputConfirmed',
  7266. 'onNavigationBarSearchInputClicked',
  7267. //Component
  7268. // 'onReady', // 兼容旧版本,应该移除该事件
  7269. 'onPageShow',
  7270. 'onPageHide',
  7271. 'onPageResize'
  7272. ];
  7273. function lifecycleMixin$1(Vue) {
  7274. //fixed vue-class-component
  7275. var oldExtend = Vue.extend;
  7276. Vue.extend = function(extendOptions) {
  7277. extendOptions = extendOptions || {};
  7278. var methods = extendOptions.methods;
  7279. if (methods) {
  7280. Object.keys(methods).forEach(function (methodName) {
  7281. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  7282. extendOptions[methodName] = methods[methodName];
  7283. delete methods[methodName];
  7284. }
  7285. });
  7286. }
  7287. return oldExtend.call(this, extendOptions)
  7288. };
  7289. var strategies = Vue.config.optionMergeStrategies;
  7290. var mergeHook = strategies.created;
  7291. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  7292. strategies[hook] = mergeHook;
  7293. });
  7294. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  7295. }
  7296. /* */
  7297. // install platform patch function
  7298. Vue.prototype.__patch__ = patch;
  7299. // public mount method
  7300. Vue.prototype.$mount = function(
  7301. el ,
  7302. hydrating
  7303. ) {
  7304. return mountComponent$1(this, el, hydrating)
  7305. };
  7306. lifecycleMixin$1(Vue);
  7307. internalMixin(Vue);
  7308. /* */
  7309. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  7310. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  7311. /***/ }),
  7312. /***/ 20:
  7313. /*!*****************************************************!*\
  7314. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  7315. \*****************************************************/
  7316. /*! no static exports found */
  7317. /***/ (function(module, exports) {
  7318. /**
  7319. * Copyright (c) 2014-present, Facebook, Inc.
  7320. *
  7321. * This source code is licensed under the MIT license found in the
  7322. * LICENSE file in the root directory of this source tree.
  7323. */
  7324. !(function(global) {
  7325. "use strict";
  7326. var Op = Object.prototype;
  7327. var hasOwn = Op.hasOwnProperty;
  7328. var undefined; // More compressible than void 0.
  7329. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  7330. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  7331. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  7332. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  7333. var inModule = typeof module === "object";
  7334. var runtime = global.regeneratorRuntime;
  7335. if (runtime) {
  7336. if (inModule) {
  7337. // If regeneratorRuntime is defined globally and we're in a module,
  7338. // make the exports object identical to regeneratorRuntime.
  7339. module.exports = runtime;
  7340. }
  7341. // Don't bother evaluating the rest of this file if the runtime was
  7342. // already defined globally.
  7343. return;
  7344. }
  7345. // Define the runtime globally (as expected by generated code) as either
  7346. // module.exports (if we're in a module) or a new, empty object.
  7347. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  7348. function wrap(innerFn, outerFn, self, tryLocsList) {
  7349. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  7350. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  7351. var generator = Object.create(protoGenerator.prototype);
  7352. var context = new Context(tryLocsList || []);
  7353. // The ._invoke method unifies the implementations of the .next,
  7354. // .throw, and .return methods.
  7355. generator._invoke = makeInvokeMethod(innerFn, self, context);
  7356. return generator;
  7357. }
  7358. runtime.wrap = wrap;
  7359. // Try/catch helper to minimize deoptimizations. Returns a completion
  7360. // record like context.tryEntries[i].completion. This interface could
  7361. // have been (and was previously) designed to take a closure to be
  7362. // invoked without arguments, but in all the cases we care about we
  7363. // already have an existing method we want to call, so there's no need
  7364. // to create a new function object. We can even get away with assuming
  7365. // the method takes exactly one argument, since that happens to be true
  7366. // in every case, so we don't have to touch the arguments object. The
  7367. // only additional allocation required is the completion record, which
  7368. // has a stable shape and so hopefully should be cheap to allocate.
  7369. function tryCatch(fn, obj, arg) {
  7370. try {
  7371. return { type: "normal", arg: fn.call(obj, arg) };
  7372. } catch (err) {
  7373. return { type: "throw", arg: err };
  7374. }
  7375. }
  7376. var GenStateSuspendedStart = "suspendedStart";
  7377. var GenStateSuspendedYield = "suspendedYield";
  7378. var GenStateExecuting = "executing";
  7379. var GenStateCompleted = "completed";
  7380. // Returning this object from the innerFn has the same effect as
  7381. // breaking out of the dispatch switch statement.
  7382. var ContinueSentinel = {};
  7383. // Dummy constructor functions that we use as the .constructor and
  7384. // .constructor.prototype properties for functions that return Generator
  7385. // objects. For full spec compliance, you may wish to configure your
  7386. // minifier not to mangle the names of these two functions.
  7387. function Generator() {}
  7388. function GeneratorFunction() {}
  7389. function GeneratorFunctionPrototype() {}
  7390. // This is a polyfill for %IteratorPrototype% for environments that
  7391. // don't natively support it.
  7392. var IteratorPrototype = {};
  7393. IteratorPrototype[iteratorSymbol] = function () {
  7394. return this;
  7395. };
  7396. var getProto = Object.getPrototypeOf;
  7397. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  7398. if (NativeIteratorPrototype &&
  7399. NativeIteratorPrototype !== Op &&
  7400. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  7401. // This environment has a native %IteratorPrototype%; use it instead
  7402. // of the polyfill.
  7403. IteratorPrototype = NativeIteratorPrototype;
  7404. }
  7405. var Gp = GeneratorFunctionPrototype.prototype =
  7406. Generator.prototype = Object.create(IteratorPrototype);
  7407. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  7408. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  7409. GeneratorFunctionPrototype[toStringTagSymbol] =
  7410. GeneratorFunction.displayName = "GeneratorFunction";
  7411. // Helper for defining the .next, .throw, and .return methods of the
  7412. // Iterator interface in terms of a single ._invoke method.
  7413. function defineIteratorMethods(prototype) {
  7414. ["next", "throw", "return"].forEach(function(method) {
  7415. prototype[method] = function(arg) {
  7416. return this._invoke(method, arg);
  7417. };
  7418. });
  7419. }
  7420. runtime.isGeneratorFunction = function(genFun) {
  7421. var ctor = typeof genFun === "function" && genFun.constructor;
  7422. return ctor
  7423. ? ctor === GeneratorFunction ||
  7424. // For the native GeneratorFunction constructor, the best we can
  7425. // do is to check its .name property.
  7426. (ctor.displayName || ctor.name) === "GeneratorFunction"
  7427. : false;
  7428. };
  7429. runtime.mark = function(genFun) {
  7430. if (Object.setPrototypeOf) {
  7431. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  7432. } else {
  7433. genFun.__proto__ = GeneratorFunctionPrototype;
  7434. if (!(toStringTagSymbol in genFun)) {
  7435. genFun[toStringTagSymbol] = "GeneratorFunction";
  7436. }
  7437. }
  7438. genFun.prototype = Object.create(Gp);
  7439. return genFun;
  7440. };
  7441. // Within the body of any async function, `await x` is transformed to
  7442. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  7443. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  7444. // meant to be awaited.
  7445. runtime.awrap = function(arg) {
  7446. return { __await: arg };
  7447. };
  7448. function AsyncIterator(generator) {
  7449. function invoke(method, arg, resolve, reject) {
  7450. var record = tryCatch(generator[method], generator, arg);
  7451. if (record.type === "throw") {
  7452. reject(record.arg);
  7453. } else {
  7454. var result = record.arg;
  7455. var value = result.value;
  7456. if (value &&
  7457. typeof value === "object" &&
  7458. hasOwn.call(value, "__await")) {
  7459. return Promise.resolve(value.__await).then(function(value) {
  7460. invoke("next", value, resolve, reject);
  7461. }, function(err) {
  7462. invoke("throw", err, resolve, reject);
  7463. });
  7464. }
  7465. return Promise.resolve(value).then(function(unwrapped) {
  7466. // When a yielded Promise is resolved, its final value becomes
  7467. // the .value of the Promise<{value,done}> result for the
  7468. // current iteration.
  7469. result.value = unwrapped;
  7470. resolve(result);
  7471. }, function(error) {
  7472. // If a rejected Promise was yielded, throw the rejection back
  7473. // into the async generator function so it can be handled there.
  7474. return invoke("throw", error, resolve, reject);
  7475. });
  7476. }
  7477. }
  7478. var previousPromise;
  7479. function enqueue(method, arg) {
  7480. function callInvokeWithMethodAndArg() {
  7481. return new Promise(function(resolve, reject) {
  7482. invoke(method, arg, resolve, reject);
  7483. });
  7484. }
  7485. return previousPromise =
  7486. // If enqueue has been called before, then we want to wait until
  7487. // all previous Promises have been resolved before calling invoke,
  7488. // so that results are always delivered in the correct order. If
  7489. // enqueue has not been called before, then it is important to
  7490. // call invoke immediately, without waiting on a callback to fire,
  7491. // so that the async generator function has the opportunity to do
  7492. // any necessary setup in a predictable way. This predictability
  7493. // is why the Promise constructor synchronously invokes its
  7494. // executor callback, and why async functions synchronously
  7495. // execute code before the first await. Since we implement simple
  7496. // async functions in terms of async generators, it is especially
  7497. // important to get this right, even though it requires care.
  7498. previousPromise ? previousPromise.then(
  7499. callInvokeWithMethodAndArg,
  7500. // Avoid propagating failures to Promises returned by later
  7501. // invocations of the iterator.
  7502. callInvokeWithMethodAndArg
  7503. ) : callInvokeWithMethodAndArg();
  7504. }
  7505. // Define the unified helper method that is used to implement .next,
  7506. // .throw, and .return (see defineIteratorMethods).
  7507. this._invoke = enqueue;
  7508. }
  7509. defineIteratorMethods(AsyncIterator.prototype);
  7510. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  7511. return this;
  7512. };
  7513. runtime.AsyncIterator = AsyncIterator;
  7514. // Note that simple async functions are implemented on top of
  7515. // AsyncIterator objects; they just return a Promise for the value of
  7516. // the final result produced by the iterator.
  7517. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  7518. var iter = new AsyncIterator(
  7519. wrap(innerFn, outerFn, self, tryLocsList)
  7520. );
  7521. return runtime.isGeneratorFunction(outerFn)
  7522. ? iter // If outerFn is a generator, return the full iterator.
  7523. : iter.next().then(function(result) {
  7524. return result.done ? result.value : iter.next();
  7525. });
  7526. };
  7527. function makeInvokeMethod(innerFn, self, context) {
  7528. var state = GenStateSuspendedStart;
  7529. return function invoke(method, arg) {
  7530. if (state === GenStateExecuting) {
  7531. throw new Error("Generator is already running");
  7532. }
  7533. if (state === GenStateCompleted) {
  7534. if (method === "throw") {
  7535. throw arg;
  7536. }
  7537. // Be forgiving, per 25.3.3.3.3 of the spec:
  7538. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  7539. return doneResult();
  7540. }
  7541. context.method = method;
  7542. context.arg = arg;
  7543. while (true) {
  7544. var delegate = context.delegate;
  7545. if (delegate) {
  7546. var delegateResult = maybeInvokeDelegate(delegate, context);
  7547. if (delegateResult) {
  7548. if (delegateResult === ContinueSentinel) continue;
  7549. return delegateResult;
  7550. }
  7551. }
  7552. if (context.method === "next") {
  7553. // Setting context._sent for legacy support of Babel's
  7554. // function.sent implementation.
  7555. context.sent = context._sent = context.arg;
  7556. } else if (context.method === "throw") {
  7557. if (state === GenStateSuspendedStart) {
  7558. state = GenStateCompleted;
  7559. throw context.arg;
  7560. }
  7561. context.dispatchException(context.arg);
  7562. } else if (context.method === "return") {
  7563. context.abrupt("return", context.arg);
  7564. }
  7565. state = GenStateExecuting;
  7566. var record = tryCatch(innerFn, self, context);
  7567. if (record.type === "normal") {
  7568. // If an exception is thrown from innerFn, we leave state ===
  7569. // GenStateExecuting and loop back for another invocation.
  7570. state = context.done
  7571. ? GenStateCompleted
  7572. : GenStateSuspendedYield;
  7573. if (record.arg === ContinueSentinel) {
  7574. continue;
  7575. }
  7576. return {
  7577. value: record.arg,
  7578. done: context.done
  7579. };
  7580. } else if (record.type === "throw") {
  7581. state = GenStateCompleted;
  7582. // Dispatch the exception by looping back around to the
  7583. // context.dispatchException(context.arg) call above.
  7584. context.method = "throw";
  7585. context.arg = record.arg;
  7586. }
  7587. }
  7588. };
  7589. }
  7590. // Call delegate.iterator[context.method](context.arg) and handle the
  7591. // result, either by returning a { value, done } result from the
  7592. // delegate iterator, or by modifying context.method and context.arg,
  7593. // setting context.delegate to null, and returning the ContinueSentinel.
  7594. function maybeInvokeDelegate(delegate, context) {
  7595. var method = delegate.iterator[context.method];
  7596. if (method === undefined) {
  7597. // A .throw or .return when the delegate iterator has no .throw
  7598. // method always terminates the yield* loop.
  7599. context.delegate = null;
  7600. if (context.method === "throw") {
  7601. if (delegate.iterator.return) {
  7602. // If the delegate iterator has a return method, give it a
  7603. // chance to clean up.
  7604. context.method = "return";
  7605. context.arg = undefined;
  7606. maybeInvokeDelegate(delegate, context);
  7607. if (context.method === "throw") {
  7608. // If maybeInvokeDelegate(context) changed context.method from
  7609. // "return" to "throw", let that override the TypeError below.
  7610. return ContinueSentinel;
  7611. }
  7612. }
  7613. context.method = "throw";
  7614. context.arg = new TypeError(
  7615. "The iterator does not provide a 'throw' method");
  7616. }
  7617. return ContinueSentinel;
  7618. }
  7619. var record = tryCatch(method, delegate.iterator, context.arg);
  7620. if (record.type === "throw") {
  7621. context.method = "throw";
  7622. context.arg = record.arg;
  7623. context.delegate = null;
  7624. return ContinueSentinel;
  7625. }
  7626. var info = record.arg;
  7627. if (! info) {
  7628. context.method = "throw";
  7629. context.arg = new TypeError("iterator result is not an object");
  7630. context.delegate = null;
  7631. return ContinueSentinel;
  7632. }
  7633. if (info.done) {
  7634. // Assign the result of the finished delegate to the temporary
  7635. // variable specified by delegate.resultName (see delegateYield).
  7636. context[delegate.resultName] = info.value;
  7637. // Resume execution at the desired location (see delegateYield).
  7638. context.next = delegate.nextLoc;
  7639. // If context.method was "throw" but the delegate handled the
  7640. // exception, let the outer generator proceed normally. If
  7641. // context.method was "next", forget context.arg since it has been
  7642. // "consumed" by the delegate iterator. If context.method was
  7643. // "return", allow the original .return call to continue in the
  7644. // outer generator.
  7645. if (context.method !== "return") {
  7646. context.method = "next";
  7647. context.arg = undefined;
  7648. }
  7649. } else {
  7650. // Re-yield the result returned by the delegate method.
  7651. return info;
  7652. }
  7653. // The delegate iterator is finished, so forget it and continue with
  7654. // the outer generator.
  7655. context.delegate = null;
  7656. return ContinueSentinel;
  7657. }
  7658. // Define Generator.prototype.{next,throw,return} in terms of the
  7659. // unified ._invoke helper method.
  7660. defineIteratorMethods(Gp);
  7661. Gp[toStringTagSymbol] = "Generator";
  7662. // A Generator should always return itself as the iterator object when the
  7663. // @@iterator function is called on it. Some browsers' implementations of the
  7664. // iterator prototype chain incorrectly implement this, causing the Generator
  7665. // object to not be returned from this call. This ensures that doesn't happen.
  7666. // See https://github.com/facebook/regenerator/issues/274 for more details.
  7667. Gp[iteratorSymbol] = function() {
  7668. return this;
  7669. };
  7670. Gp.toString = function() {
  7671. return "[object Generator]";
  7672. };
  7673. function pushTryEntry(locs) {
  7674. var entry = { tryLoc: locs[0] };
  7675. if (1 in locs) {
  7676. entry.catchLoc = locs[1];
  7677. }
  7678. if (2 in locs) {
  7679. entry.finallyLoc = locs[2];
  7680. entry.afterLoc = locs[3];
  7681. }
  7682. this.tryEntries.push(entry);
  7683. }
  7684. function resetTryEntry(entry) {
  7685. var record = entry.completion || {};
  7686. record.type = "normal";
  7687. delete record.arg;
  7688. entry.completion = record;
  7689. }
  7690. function Context(tryLocsList) {
  7691. // The root entry object (effectively a try statement without a catch
  7692. // or a finally block) gives us a place to store values thrown from
  7693. // locations where there is no enclosing try statement.
  7694. this.tryEntries = [{ tryLoc: "root" }];
  7695. tryLocsList.forEach(pushTryEntry, this);
  7696. this.reset(true);
  7697. }
  7698. runtime.keys = function(object) {
  7699. var keys = [];
  7700. for (var key in object) {
  7701. keys.push(key);
  7702. }
  7703. keys.reverse();
  7704. // Rather than returning an object with a next method, we keep
  7705. // things simple and return the next function itself.
  7706. return function next() {
  7707. while (keys.length) {
  7708. var key = keys.pop();
  7709. if (key in object) {
  7710. next.value = key;
  7711. next.done = false;
  7712. return next;
  7713. }
  7714. }
  7715. // To avoid creating an additional object, we just hang the .value
  7716. // and .done properties off the next function object itself. This
  7717. // also ensures that the minifier will not anonymize the function.
  7718. next.done = true;
  7719. return next;
  7720. };
  7721. };
  7722. function values(iterable) {
  7723. if (iterable) {
  7724. var iteratorMethod = iterable[iteratorSymbol];
  7725. if (iteratorMethod) {
  7726. return iteratorMethod.call(iterable);
  7727. }
  7728. if (typeof iterable.next === "function") {
  7729. return iterable;
  7730. }
  7731. if (!isNaN(iterable.length)) {
  7732. var i = -1, next = function next() {
  7733. while (++i < iterable.length) {
  7734. if (hasOwn.call(iterable, i)) {
  7735. next.value = iterable[i];
  7736. next.done = false;
  7737. return next;
  7738. }
  7739. }
  7740. next.value = undefined;
  7741. next.done = true;
  7742. return next;
  7743. };
  7744. return next.next = next;
  7745. }
  7746. }
  7747. // Return an iterator with no values.
  7748. return { next: doneResult };
  7749. }
  7750. runtime.values = values;
  7751. function doneResult() {
  7752. return { value: undefined, done: true };
  7753. }
  7754. Context.prototype = {
  7755. constructor: Context,
  7756. reset: function(skipTempReset) {
  7757. this.prev = 0;
  7758. this.next = 0;
  7759. // Resetting context._sent for legacy support of Babel's
  7760. // function.sent implementation.
  7761. this.sent = this._sent = undefined;
  7762. this.done = false;
  7763. this.delegate = null;
  7764. this.method = "next";
  7765. this.arg = undefined;
  7766. this.tryEntries.forEach(resetTryEntry);
  7767. if (!skipTempReset) {
  7768. for (var name in this) {
  7769. // Not sure about the optimal order of these conditions:
  7770. if (name.charAt(0) === "t" &&
  7771. hasOwn.call(this, name) &&
  7772. !isNaN(+name.slice(1))) {
  7773. this[name] = undefined;
  7774. }
  7775. }
  7776. }
  7777. },
  7778. stop: function() {
  7779. this.done = true;
  7780. var rootEntry = this.tryEntries[0];
  7781. var rootRecord = rootEntry.completion;
  7782. if (rootRecord.type === "throw") {
  7783. throw rootRecord.arg;
  7784. }
  7785. return this.rval;
  7786. },
  7787. dispatchException: function(exception) {
  7788. if (this.done) {
  7789. throw exception;
  7790. }
  7791. var context = this;
  7792. function handle(loc, caught) {
  7793. record.type = "throw";
  7794. record.arg = exception;
  7795. context.next = loc;
  7796. if (caught) {
  7797. // If the dispatched exception was caught by a catch block,
  7798. // then let that catch block handle the exception normally.
  7799. context.method = "next";
  7800. context.arg = undefined;
  7801. }
  7802. return !! caught;
  7803. }
  7804. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  7805. var entry = this.tryEntries[i];
  7806. var record = entry.completion;
  7807. if (entry.tryLoc === "root") {
  7808. // Exception thrown outside of any try block that could handle
  7809. // it, so set the completion value of the entire function to
  7810. // throw the exception.
  7811. return handle("end");
  7812. }
  7813. if (entry.tryLoc <= this.prev) {
  7814. var hasCatch = hasOwn.call(entry, "catchLoc");
  7815. var hasFinally = hasOwn.call(entry, "finallyLoc");
  7816. if (hasCatch && hasFinally) {
  7817. if (this.prev < entry.catchLoc) {
  7818. return handle(entry.catchLoc, true);
  7819. } else if (this.prev < entry.finallyLoc) {
  7820. return handle(entry.finallyLoc);
  7821. }
  7822. } else if (hasCatch) {
  7823. if (this.prev < entry.catchLoc) {
  7824. return handle(entry.catchLoc, true);
  7825. }
  7826. } else if (hasFinally) {
  7827. if (this.prev < entry.finallyLoc) {
  7828. return handle(entry.finallyLoc);
  7829. }
  7830. } else {
  7831. throw new Error("try statement without catch or finally");
  7832. }
  7833. }
  7834. }
  7835. },
  7836. abrupt: function(type, arg) {
  7837. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  7838. var entry = this.tryEntries[i];
  7839. if (entry.tryLoc <= this.prev &&
  7840. hasOwn.call(entry, "finallyLoc") &&
  7841. this.prev < entry.finallyLoc) {
  7842. var finallyEntry = entry;
  7843. break;
  7844. }
  7845. }
  7846. if (finallyEntry &&
  7847. (type === "break" ||
  7848. type === "continue") &&
  7849. finallyEntry.tryLoc <= arg &&
  7850. arg <= finallyEntry.finallyLoc) {
  7851. // Ignore the finally entry if control is not jumping to a
  7852. // location outside the try/catch block.
  7853. finallyEntry = null;
  7854. }
  7855. var record = finallyEntry ? finallyEntry.completion : {};
  7856. record.type = type;
  7857. record.arg = arg;
  7858. if (finallyEntry) {
  7859. this.method = "next";
  7860. this.next = finallyEntry.finallyLoc;
  7861. return ContinueSentinel;
  7862. }
  7863. return this.complete(record);
  7864. },
  7865. complete: function(record, afterLoc) {
  7866. if (record.type === "throw") {
  7867. throw record.arg;
  7868. }
  7869. if (record.type === "break" ||
  7870. record.type === "continue") {
  7871. this.next = record.arg;
  7872. } else if (record.type === "return") {
  7873. this.rval = this.arg = record.arg;
  7874. this.method = "return";
  7875. this.next = "end";
  7876. } else if (record.type === "normal" && afterLoc) {
  7877. this.next = afterLoc;
  7878. }
  7879. return ContinueSentinel;
  7880. },
  7881. finish: function(finallyLoc) {
  7882. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  7883. var entry = this.tryEntries[i];
  7884. if (entry.finallyLoc === finallyLoc) {
  7885. this.complete(entry.completion, entry.afterLoc);
  7886. resetTryEntry(entry);
  7887. return ContinueSentinel;
  7888. }
  7889. }
  7890. },
  7891. "catch": function(tryLoc) {
  7892. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  7893. var entry = this.tryEntries[i];
  7894. if (entry.tryLoc === tryLoc) {
  7895. var record = entry.completion;
  7896. if (record.type === "throw") {
  7897. var thrown = record.arg;
  7898. resetTryEntry(entry);
  7899. }
  7900. return thrown;
  7901. }
  7902. }
  7903. // The context.catch method must only be called with a location
  7904. // argument that corresponds to a known catch block.
  7905. throw new Error("illegal catch attempt");
  7906. },
  7907. delegateYield: function(iterable, resultName, nextLoc) {
  7908. this.delegate = {
  7909. iterator: values(iterable),
  7910. resultName: resultName,
  7911. nextLoc: nextLoc
  7912. };
  7913. if (this.method === "next") {
  7914. // Deliberately forget the last sent value so that we don't
  7915. // accidentally pass it on to the delegate.
  7916. this.arg = undefined;
  7917. }
  7918. return ContinueSentinel;
  7919. }
  7920. };
  7921. })(
  7922. // In sloppy mode, unbound `this` refers to the global object, fallback to
  7923. // Function constructor if we're in global strict mode. That is sadly a form
  7924. // of indirect eval which violates Content Security Policy.
  7925. (function() {
  7926. return this || (typeof self === "object" && self);
  7927. })() || Function("return this")()
  7928. );
  7929. /***/ }),
  7930. /***/ 3:
  7931. /*!***********************************!*\
  7932. !*** (webpack)/buildin/global.js ***!
  7933. \***********************************/
  7934. /*! no static exports found */
  7935. /***/ (function(module, exports) {
  7936. var g;
  7937. // This works in non-strict mode
  7938. g = (function() {
  7939. return this;
  7940. })();
  7941. try {
  7942. // This works if eval is allowed (see CSP)
  7943. g = g || new Function("return this")();
  7944. } catch (e) {
  7945. // This works if the window reference is available
  7946. if (typeof window === "object") g = window;
  7947. }
  7948. // g can still be undefined, but nothing to do about it...
  7949. // We return undefined, instead of nothing here, so it's
  7950. // easier to handle this case. if(!global) { ...}
  7951. module.exports = g;
  7952. /***/ }),
  7953. /***/ 4:
  7954. /*!******************************************************!*\
  7955. !*** C:/Users/Administrator/Desktop/智慧矿山/pages.json ***!
  7956. \******************************************************/
  7957. /*! no static exports found */
  7958. /***/ (function(module, exports) {
  7959. /***/ })
  7960. }]);
  7961. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map