vendor.js 323 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],[
  2. /* 0 */,
  3. /* 1 */
  4. /*!************************************************************!*\
  5. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  6. \************************************************************/
  7. /*! no static exports found */
  8. /***/ (function(module, exports, __webpack_require__) {
  9. "use strict";
  10. 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;}
  11. var _toString = Object.prototype.toString;
  12. var hasOwnProperty = Object.prototype.hasOwnProperty;
  13. function isFn(fn) {
  14. return typeof fn === 'function';
  15. }
  16. function isStr(str) {
  17. return typeof str === 'string';
  18. }
  19. function isPlainObject(obj) {
  20. return _toString.call(obj) === '[object Object]';
  21. }
  22. function hasOwn(obj, key) {
  23. return hasOwnProperty.call(obj, key);
  24. }
  25. function noop() {}
  26. /**
  27. * Create a cached version of a pure function.
  28. */
  29. function cached(fn) {
  30. var cache = Object.create(null);
  31. return function cachedFn(str) {
  32. var hit = cache[str];
  33. return hit || (cache[str] = fn(str));
  34. };
  35. }
  36. /**
  37. * Camelize a hyphen-delimited string.
  38. */
  39. var camelizeRE = /-(\w)/g;
  40. var camelize = cached(function (str) {
  41. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  42. });
  43. var HOOKS = [
  44. 'invoke',
  45. 'success',
  46. 'fail',
  47. 'complete',
  48. 'returnValue'];
  49. var globalInterceptors = {};
  50. var scopedInterceptors = {};
  51. function mergeHook(parentVal, childVal) {
  52. var res = childVal ?
  53. parentVal ?
  54. parentVal.concat(childVal) :
  55. Array.isArray(childVal) ?
  56. childVal : [childVal] :
  57. parentVal;
  58. return res ?
  59. dedupeHooks(res) :
  60. res;
  61. }
  62. function dedupeHooks(hooks) {
  63. var res = [];
  64. for (var i = 0; i < hooks.length; i++) {
  65. if (res.indexOf(hooks[i]) === -1) {
  66. res.push(hooks[i]);
  67. }
  68. }
  69. return res;
  70. }
  71. function removeHook(hooks, hook) {
  72. var index = hooks.indexOf(hook);
  73. if (index !== -1) {
  74. hooks.splice(index, 1);
  75. }
  76. }
  77. function mergeInterceptorHook(interceptor, option) {
  78. Object.keys(option).forEach(function (hook) {
  79. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  80. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  81. }
  82. });
  83. }
  84. function removeInterceptorHook(interceptor, option) {
  85. if (!interceptor || !option) {
  86. return;
  87. }
  88. Object.keys(option).forEach(function (hook) {
  89. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  90. removeHook(interceptor[hook], option[hook]);
  91. }
  92. });
  93. }
  94. function addInterceptor(method, option) {
  95. if (typeof method === 'string' && isPlainObject(option)) {
  96. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  97. } else if (isPlainObject(method)) {
  98. mergeInterceptorHook(globalInterceptors, method);
  99. }
  100. }
  101. function removeInterceptor(method, option) {
  102. if (typeof method === 'string') {
  103. if (isPlainObject(option)) {
  104. removeInterceptorHook(scopedInterceptors[method], option);
  105. } else {
  106. delete scopedInterceptors[method];
  107. }
  108. } else if (isPlainObject(method)) {
  109. removeInterceptorHook(globalInterceptors, method);
  110. }
  111. }
  112. function wrapperHook(hook) {
  113. return function (data) {
  114. return hook(data) || data;
  115. };
  116. }
  117. function isPromise(obj) {
  118. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  119. }
  120. function queue(hooks, data) {
  121. var promise = false;
  122. for (var i = 0; i < hooks.length; i++) {
  123. var hook = hooks[i];
  124. if (promise) {
  125. promise = Promise.resolve(wrapperHook(hook));
  126. } else {
  127. var res = hook(data);
  128. if (isPromise(res)) {
  129. promise = Promise.resolve(res);
  130. }
  131. if (res === false) {
  132. return {
  133. then: function then() {} };
  134. }
  135. }
  136. }
  137. return promise || {
  138. then: function then(callback) {
  139. return callback(data);
  140. } };
  141. }
  142. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  143. ['success', 'fail', 'complete'].forEach(function (name) {
  144. if (Array.isArray(interceptor[name])) {
  145. var oldCallback = options[name];
  146. options[name] = function callbackInterceptor(res) {
  147. queue(interceptor[name], res).then(function (res) {
  148. /* eslint-disable no-mixed-operators */
  149. return isFn(oldCallback) && oldCallback(res) || res;
  150. });
  151. };
  152. }
  153. });
  154. return options;
  155. }
  156. function wrapperReturnValue(method, returnValue) {
  157. var returnValueHooks = [];
  158. if (Array.isArray(globalInterceptors.returnValue)) {
  159. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  160. }
  161. var interceptor = scopedInterceptors[method];
  162. if (interceptor && Array.isArray(interceptor.returnValue)) {
  163. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  164. }
  165. returnValueHooks.forEach(function (hook) {
  166. returnValue = hook(returnValue) || returnValue;
  167. });
  168. return returnValue;
  169. }
  170. function getApiInterceptorHooks(method) {
  171. var interceptor = Object.create(null);
  172. Object.keys(globalInterceptors).forEach(function (hook) {
  173. if (hook !== 'returnValue') {
  174. interceptor[hook] = globalInterceptors[hook].slice();
  175. }
  176. });
  177. var scopedInterceptor = scopedInterceptors[method];
  178. if (scopedInterceptor) {
  179. Object.keys(scopedInterceptor).forEach(function (hook) {
  180. if (hook !== 'returnValue') {
  181. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  182. }
  183. });
  184. }
  185. return interceptor;
  186. }
  187. 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];}
  188. var interceptor = getApiInterceptorHooks(method);
  189. if (interceptor && Object.keys(interceptor).length) {
  190. if (Array.isArray(interceptor.invoke)) {
  191. var res = queue(interceptor.invoke, options);
  192. return res.then(function (options) {
  193. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  194. });
  195. } else {
  196. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  197. }
  198. }
  199. return api.apply(void 0, [options].concat(params));
  200. }
  201. var promiseInterceptor = {
  202. returnValue: function returnValue(res) {
  203. if (!isPromise(res)) {
  204. return res;
  205. }
  206. return res.then(function (res) {
  207. return res[1];
  208. }).catch(function (res) {
  209. return res[0];
  210. });
  211. } };
  212. var SYNC_API_RE =
  213. /^\$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/;
  214. var CONTEXT_API_RE = /^create|Manager$/;
  215. // Context例外情况
  216. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  217. // 同步例外情况
  218. var ASYNC_API = ['createBLEConnection'];
  219. var CALLBACK_API_RE = /^on|^off/;
  220. function isContextApi(name) {
  221. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  222. }
  223. function isSyncApi(name) {
  224. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  225. }
  226. function isCallbackApi(name) {
  227. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  228. }
  229. function handlePromise(promise) {
  230. return promise.then(function (data) {
  231. return [null, data];
  232. }).
  233. catch(function (err) {return [err];});
  234. }
  235. function shouldPromise(name) {
  236. if (
  237. isContextApi(name) ||
  238. isSyncApi(name) ||
  239. isCallbackApi(name))
  240. {
  241. return false;
  242. }
  243. return true;
  244. }
  245. /* eslint-disable no-extend-native */
  246. if (!Promise.prototype.finally) {
  247. Promise.prototype.finally = function (callback) {
  248. var promise = this.constructor;
  249. return this.then(
  250. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  251. function (reason) {return promise.resolve(callback()).then(function () {
  252. throw reason;
  253. });});
  254. };
  255. }
  256. function promisify(name, api) {
  257. if (!shouldPromise(name)) {
  258. return api;
  259. }
  260. 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];}
  261. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  262. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  263. }
  264. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  265. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  266. success: resolve,
  267. fail: reject })].concat(
  268. params));
  269. })));
  270. };
  271. }
  272. var EPS = 1e-4;
  273. var BASE_DEVICE_WIDTH = 750;
  274. var isIOS = false;
  275. var deviceWidth = 0;
  276. var deviceDPR = 0;
  277. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  278. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  279. deviceWidth = windowWidth;
  280. deviceDPR = pixelRatio;
  281. isIOS = platform === 'ios';
  282. }
  283. function upx2px(number, newDeviceWidth) {
  284. if (deviceWidth === 0) {
  285. checkDeviceWidth();
  286. }
  287. number = Number(number);
  288. if (number === 0) {
  289. return 0;
  290. }
  291. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  292. if (result < 0) {
  293. result = -result;
  294. }
  295. result = Math.floor(result + EPS);
  296. if (result === 0) {
  297. if (deviceDPR === 1 || !isIOS) {
  298. result = 1;
  299. } else {
  300. result = 0.5;
  301. }
  302. }
  303. return number < 0 ? -result : result;
  304. }
  305. var interceptors = {
  306. promiseInterceptor: promiseInterceptor };
  307. var baseApi = /*#__PURE__*/Object.freeze({
  308. __proto__: null,
  309. upx2px: upx2px,
  310. addInterceptor: addInterceptor,
  311. removeInterceptor: removeInterceptor,
  312. interceptors: interceptors });var
  313. EventChannel = /*#__PURE__*/function () {
  314. function EventChannel(id, events) {var _this = this;_classCallCheck(this, EventChannel);
  315. this.id = id;
  316. this.listener = {};
  317. this.emitCache = {};
  318. if (events) {
  319. Object.keys(events).forEach(function (name) {
  320. _this.on(name, events[name]);
  321. });
  322. }
  323. }_createClass(EventChannel, [{ key: "emit", value: function emit(
  324. eventName) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  325. var fns = this.listener[eventName];
  326. if (!fns) {
  327. return (this.emitCache[eventName] || (this.emitCache[eventName] = [])).push(args);
  328. }
  329. fns.forEach(function (opt) {
  330. opt.fn.apply(opt.fn, args);
  331. });
  332. this.listener[eventName] = fns.filter(function (opt) {return opt.type !== 'once';});
  333. } }, { key: "on", value: function on(
  334. eventName, fn) {
  335. this._addListener(eventName, 'on', fn);
  336. this._clearCache(eventName);
  337. } }, { key: "once", value: function once(
  338. eventName, fn) {
  339. this._addListener(eventName, 'once', fn);
  340. this._clearCache(eventName);
  341. } }, { key: "off", value: function off(
  342. eventName, fn) {
  343. var fns = this.listener[eventName];
  344. if (!fns) {
  345. return;
  346. }
  347. if (fn) {
  348. for (var i = 0; i < fns.length;) {
  349. if (fns[i].fn === fn) {
  350. fns.splice(i, 1);
  351. i--;
  352. }
  353. i++;
  354. }
  355. } else {
  356. delete this.listener[eventName];
  357. }
  358. } }, { key: "_clearCache", value: function _clearCache(
  359. eventName) {
  360. var cacheArgs = this.emitCache[eventName];
  361. if (cacheArgs) {
  362. for (; cacheArgs.length > 0;) {
  363. this.emit.apply(this, [eventName].concat(cacheArgs.shift()));
  364. }
  365. }
  366. } }, { key: "_addListener", value: function _addListener(
  367. eventName, type, fn) {
  368. (this.listener[eventName] || (this.listener[eventName] = [])).push({
  369. fn: fn,
  370. type: type });
  371. } }]);return EventChannel;}();
  372. var eventChannels = {};
  373. var eventChannelStack = [];
  374. var id = 0;
  375. function initEventChannel(events) {var cache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  376. id++;
  377. var eventChannel = new EventChannel(id, events);
  378. if (cache) {
  379. eventChannels[id] = eventChannel;
  380. eventChannelStack.push(eventChannel);
  381. }
  382. return eventChannel;
  383. }
  384. function getEventChannel(id) {
  385. if (id) {
  386. var eventChannel = eventChannels[id];
  387. delete eventChannels[id];
  388. return eventChannel;
  389. }
  390. return eventChannelStack.shift();
  391. }
  392. var navigateTo = {
  393. args: function args(fromArgs, toArgs) {
  394. var id = initEventChannel(fromArgs.events).id;
  395. if (fromArgs.url) {
  396. fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + id;
  397. }
  398. },
  399. returnValue: function returnValue(fromRes, toRes) {
  400. fromRes.eventChannel = getEventChannel();
  401. } };
  402. function findExistsPageIndex(url) {
  403. var pages = getCurrentPages();
  404. var len = pages.length;
  405. while (len--) {
  406. var page = pages[len];
  407. if (page.$page && page.$page.fullPath === url) {
  408. return len;
  409. }
  410. }
  411. return -1;
  412. }
  413. var redirectTo = {
  414. name: function name(fromArgs) {
  415. if (fromArgs.exists === 'back' && fromArgs.delta) {
  416. return 'navigateBack';
  417. }
  418. return 'redirectTo';
  419. },
  420. args: function args(fromArgs) {
  421. if (fromArgs.exists === 'back' && fromArgs.url) {
  422. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  423. if (existsPageIndex !== -1) {
  424. var delta = getCurrentPages().length - 1 - existsPageIndex;
  425. if (delta > 0) {
  426. fromArgs.delta = delta;
  427. }
  428. }
  429. }
  430. } };
  431. var previewImage = {
  432. args: function args(fromArgs) {
  433. var currentIndex = parseInt(fromArgs.current);
  434. if (isNaN(currentIndex)) {
  435. return;
  436. }
  437. var urls = fromArgs.urls;
  438. if (!Array.isArray(urls)) {
  439. return;
  440. }
  441. var len = urls.length;
  442. if (!len) {
  443. return;
  444. }
  445. if (currentIndex < 0) {
  446. currentIndex = 0;
  447. } else if (currentIndex >= len) {
  448. currentIndex = len - 1;
  449. }
  450. if (currentIndex > 0) {
  451. fromArgs.current = urls[currentIndex];
  452. fromArgs.urls = urls.filter(
  453. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  454. } else {
  455. fromArgs.current = urls[0];
  456. }
  457. return {
  458. indicator: false,
  459. loop: false };
  460. } };
  461. function addSafeAreaInsets(result) {
  462. if (result.safeArea) {
  463. var safeArea = result.safeArea;
  464. result.safeAreaInsets = {
  465. top: safeArea.top,
  466. left: safeArea.left,
  467. right: result.windowWidth - safeArea.right,
  468. bottom: result.windowHeight - safeArea.bottom };
  469. }
  470. }
  471. var protocols = {
  472. redirectTo: redirectTo,
  473. navigateTo: navigateTo,
  474. previewImage: previewImage,
  475. getSystemInfo: {
  476. returnValue: addSafeAreaInsets },
  477. getSystemInfoSync: {
  478. returnValue: addSafeAreaInsets } };
  479. var todos = [
  480. 'vibrate',
  481. 'preloadPage',
  482. 'unPreloadPage',
  483. 'loadSubPackage'];
  484. var canIUses = [];
  485. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  486. function processCallback(methodName, method, returnValue) {
  487. return function (res) {
  488. return method(processReturnValue(methodName, res, returnValue));
  489. };
  490. }
  491. 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;
  492. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  493. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  494. if (isFn(argsOption)) {
  495. argsOption = argsOption(fromArgs, toArgs) || {};
  496. }
  497. for (var key in fromArgs) {
  498. if (hasOwn(argsOption, key)) {
  499. var keyOption = argsOption[key];
  500. if (isFn(keyOption)) {
  501. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  502. }
  503. if (!keyOption) {// 不支持的参数
  504. console.warn("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F ".concat(methodName, "\u6682\u4E0D\u652F\u6301").concat(key));
  505. } else if (isStr(keyOption)) {// 重写参数 key
  506. toArgs[keyOption] = fromArgs[key];
  507. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  508. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  509. }
  510. } else if (CALLBACKS.indexOf(key) !== -1) {
  511. if (isFn(fromArgs[key])) {
  512. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  513. }
  514. } else {
  515. if (!keepFromArgs) {
  516. toArgs[key] = fromArgs[key];
  517. }
  518. }
  519. }
  520. return toArgs;
  521. } else if (isFn(fromArgs)) {
  522. fromArgs = processCallback(methodName, fromArgs, returnValue);
  523. }
  524. return fromArgs;
  525. }
  526. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  527. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  528. res = protocols.returnValue(methodName, res);
  529. }
  530. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  531. }
  532. function wrapper(methodName, method) {
  533. if (hasOwn(protocols, methodName)) {
  534. var protocol = protocols[methodName];
  535. if (!protocol) {// 暂不支持的 api
  536. return function () {
  537. console.error("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F \u6682\u4E0D\u652F\u6301".concat(methodName));
  538. };
  539. }
  540. return function (arg1, arg2) {// 目前 api 最多两个参数
  541. var options = protocol;
  542. if (isFn(protocol)) {
  543. options = protocol(arg1);
  544. }
  545. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  546. var args = [arg1];
  547. if (typeof arg2 !== 'undefined') {
  548. args.push(arg2);
  549. }
  550. if (isFn(options.name)) {
  551. methodName = options.name(arg1);
  552. } else if (isStr(options.name)) {
  553. methodName = options.name;
  554. }
  555. var returnValue = wx[methodName].apply(wx, args);
  556. if (isSyncApi(methodName)) {// 同步 api
  557. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  558. }
  559. return returnValue;
  560. };
  561. }
  562. return method;
  563. }
  564. var todoApis = Object.create(null);
  565. var TODOS = [
  566. 'onTabBarMidButtonTap',
  567. 'subscribePush',
  568. 'unsubscribePush',
  569. 'onPush',
  570. 'offPush',
  571. 'share'];
  572. function createTodoApi(name) {
  573. return function todoApi(_ref)
  574. {var fail = _ref.fail,complete = _ref.complete;
  575. var res = {
  576. errMsg: "".concat(name, ":fail:\u6682\u4E0D\u652F\u6301 ").concat(name, " \u65B9\u6CD5") };
  577. isFn(fail) && fail(res);
  578. isFn(complete) && complete(res);
  579. };
  580. }
  581. TODOS.forEach(function (name) {
  582. todoApis[name] = createTodoApi(name);
  583. });
  584. var providers = {
  585. oauth: ['weixin'],
  586. share: ['weixin'],
  587. payment: ['wxpay'],
  588. push: ['weixin'] };
  589. function getProvider(_ref2)
  590. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  591. var res = false;
  592. if (providers[service]) {
  593. res = {
  594. errMsg: 'getProvider:ok',
  595. service: service,
  596. provider: providers[service] };
  597. isFn(success) && success(res);
  598. } else {
  599. res = {
  600. errMsg: 'getProvider:fail:服务[' + service + ']不存在' };
  601. isFn(fail) && fail(res);
  602. }
  603. isFn(complete) && complete(res);
  604. }
  605. var extraApi = /*#__PURE__*/Object.freeze({
  606. __proto__: null,
  607. getProvider: getProvider });
  608. var getEmitter = function () {
  609. var Emitter;
  610. return function getUniEmitter() {
  611. if (!Emitter) {
  612. Emitter = new _vue.default();
  613. }
  614. return Emitter;
  615. };
  616. }();
  617. function apply(ctx, method, args) {
  618. return ctx[method].apply(ctx, args);
  619. }
  620. function $on() {
  621. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  622. }
  623. function $off() {
  624. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  625. }
  626. function $once() {
  627. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  628. }
  629. function $emit() {
  630. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  631. }
  632. var eventApi = /*#__PURE__*/Object.freeze({
  633. __proto__: null,
  634. $on: $on,
  635. $off: $off,
  636. $once: $once,
  637. $emit: $emit });
  638. var api = /*#__PURE__*/Object.freeze({
  639. __proto__: null });
  640. var MPPage = Page;
  641. var MPComponent = Component;
  642. var customizeRE = /:/g;
  643. var customize = cached(function (str) {
  644. return camelize(str.replace(customizeRE, '-'));
  645. });
  646. function initTriggerEvent(mpInstance) {
  647. {
  648. if (!wx.canIUse('nextTick')) {
  649. return;
  650. }
  651. }
  652. var oldTriggerEvent = mpInstance.triggerEvent;
  653. 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];}
  654. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  655. };
  656. }
  657. function initHook(name, options) {
  658. var oldHook = options[name];
  659. if (!oldHook) {
  660. options[name] = function () {
  661. initTriggerEvent(this);
  662. };
  663. } else {
  664. options[name] = function () {
  665. initTriggerEvent(this);for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {args[_key5] = arguments[_key5];}
  666. return oldHook.apply(this, args);
  667. };
  668. }
  669. }
  670. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  671. initHook('onLoad', options);
  672. return MPPage(options);
  673. };
  674. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  675. initHook('created', options);
  676. return MPComponent(options);
  677. };
  678. var PAGE_EVENT_HOOKS = [
  679. 'onPullDownRefresh',
  680. 'onReachBottom',
  681. 'onAddToFavorites',
  682. 'onShareTimeline',
  683. 'onShareAppMessage',
  684. 'onPageScroll',
  685. 'onResize',
  686. 'onTabItemTap'];
  687. function initMocks(vm, mocks) {
  688. var mpInstance = vm.$mp[vm.mpType];
  689. mocks.forEach(function (mock) {
  690. if (hasOwn(mpInstance, mock)) {
  691. vm[mock] = mpInstance[mock];
  692. }
  693. });
  694. }
  695. function hasHook(hook, vueOptions) {
  696. if (!vueOptions) {
  697. return true;
  698. }
  699. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  700. return true;
  701. }
  702. vueOptions = vueOptions.default || vueOptions;
  703. if (isFn(vueOptions)) {
  704. if (isFn(vueOptions.extendOptions[hook])) {
  705. return true;
  706. }
  707. if (vueOptions.super &&
  708. vueOptions.super.options &&
  709. Array.isArray(vueOptions.super.options[hook])) {
  710. return true;
  711. }
  712. return false;
  713. }
  714. if (isFn(vueOptions[hook])) {
  715. return true;
  716. }
  717. var mixins = vueOptions.mixins;
  718. if (Array.isArray(mixins)) {
  719. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  720. }
  721. }
  722. function initHooks(mpOptions, hooks, vueOptions) {
  723. hooks.forEach(function (hook) {
  724. if (hasHook(hook, vueOptions)) {
  725. mpOptions[hook] = function (args) {
  726. return this.$vm && this.$vm.__call_hook(hook, args);
  727. };
  728. }
  729. });
  730. }
  731. function initVueComponent(Vue, vueOptions) {
  732. vueOptions = vueOptions.default || vueOptions;
  733. var VueComponent;
  734. if (isFn(vueOptions)) {
  735. VueComponent = vueOptions;
  736. } else {
  737. VueComponent = Vue.extend(vueOptions);
  738. }
  739. vueOptions = VueComponent.options;
  740. return [VueComponent, vueOptions];
  741. }
  742. function initSlots(vm, vueSlots) {
  743. if (Array.isArray(vueSlots) && vueSlots.length) {
  744. var $slots = Object.create(null);
  745. vueSlots.forEach(function (slotName) {
  746. $slots[slotName] = true;
  747. });
  748. vm.$scopedSlots = vm.$slots = $slots;
  749. }
  750. }
  751. function initVueIds(vueIds, mpInstance) {
  752. vueIds = (vueIds || '').split(',');
  753. var len = vueIds.length;
  754. if (len === 1) {
  755. mpInstance._$vueId = vueIds[0];
  756. } else if (len === 2) {
  757. mpInstance._$vueId = vueIds[0];
  758. mpInstance._$vuePid = vueIds[1];
  759. }
  760. }
  761. function initData(vueOptions, context) {
  762. var data = vueOptions.data || {};
  763. var methods = vueOptions.methods || {};
  764. if (typeof data === 'function') {
  765. try {
  766. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  767. } catch (e) {
  768. if (Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  769. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  770. }
  771. }
  772. } else {
  773. try {
  774. // 对 data 格式化
  775. data = JSON.parse(JSON.stringify(data));
  776. } catch (e) {}
  777. }
  778. if (!isPlainObject(data)) {
  779. data = {};
  780. }
  781. Object.keys(methods).forEach(function (methodName) {
  782. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  783. data[methodName] = methods[methodName];
  784. }
  785. });
  786. return data;
  787. }
  788. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  789. function createObserver(name) {
  790. return function observer(newVal, oldVal) {
  791. if (this.$vm) {
  792. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  793. }
  794. };
  795. }
  796. function initBehaviors(vueOptions, initBehavior) {
  797. var vueBehaviors = vueOptions.behaviors;
  798. var vueExtends = vueOptions.extends;
  799. var vueMixins = vueOptions.mixins;
  800. var vueProps = vueOptions.props;
  801. if (!vueProps) {
  802. vueOptions.props = vueProps = [];
  803. }
  804. var behaviors = [];
  805. if (Array.isArray(vueBehaviors)) {
  806. vueBehaviors.forEach(function (behavior) {
  807. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  808. if (behavior === 'uni://form-field') {
  809. if (Array.isArray(vueProps)) {
  810. vueProps.push('name');
  811. vueProps.push('value');
  812. } else {
  813. vueProps.name = {
  814. type: String,
  815. default: '' };
  816. vueProps.value = {
  817. type: [String, Number, Boolean, Array, Object, Date],
  818. default: '' };
  819. }
  820. }
  821. });
  822. }
  823. if (isPlainObject(vueExtends) && vueExtends.props) {
  824. behaviors.push(
  825. initBehavior({
  826. properties: initProperties(vueExtends.props, true) }));
  827. }
  828. if (Array.isArray(vueMixins)) {
  829. vueMixins.forEach(function (vueMixin) {
  830. if (isPlainObject(vueMixin) && vueMixin.props) {
  831. behaviors.push(
  832. initBehavior({
  833. properties: initProperties(vueMixin.props, true) }));
  834. }
  835. });
  836. }
  837. return behaviors;
  838. }
  839. function parsePropType(key, type, defaultValue, file) {
  840. // [String]=>String
  841. if (Array.isArray(type) && type.length === 1) {
  842. return type[0];
  843. }
  844. return type;
  845. }
  846. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  847. var properties = {};
  848. if (!isBehavior) {
  849. properties.vueId = {
  850. type: String,
  851. value: '' };
  852. // 用于字节跳动小程序模拟抽象节点
  853. properties.generic = {
  854. type: Object,
  855. value: null };
  856. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  857. type: null,
  858. value: [],
  859. observer: function observer(newVal, oldVal) {
  860. var $slots = Object.create(null);
  861. newVal.forEach(function (slotName) {
  862. $slots[slotName] = true;
  863. });
  864. this.setData({
  865. $slots: $slots });
  866. } };
  867. }
  868. if (Array.isArray(props)) {// ['title']
  869. props.forEach(function (key) {
  870. properties[key] = {
  871. type: null,
  872. observer: createObserver(key) };
  873. });
  874. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  875. Object.keys(props).forEach(function (key) {
  876. var opts = props[key];
  877. if (isPlainObject(opts)) {// title:{type:String,default:''}
  878. var value = opts.default;
  879. if (isFn(value)) {
  880. value = value();
  881. }
  882. opts.type = parsePropType(key, opts.type);
  883. properties[key] = {
  884. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  885. value: value,
  886. observer: createObserver(key) };
  887. } else {// content:String
  888. var type = parsePropType(key, opts);
  889. properties[key] = {
  890. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  891. observer: createObserver(key) };
  892. }
  893. });
  894. }
  895. return properties;
  896. }
  897. function wrapper$1(event) {
  898. // TODO 又得兼容 mpvue 的 mp 对象
  899. try {
  900. event.mp = JSON.parse(JSON.stringify(event));
  901. } catch (e) {}
  902. event.stopPropagation = noop;
  903. event.preventDefault = noop;
  904. event.target = event.target || {};
  905. if (!hasOwn(event, 'detail')) {
  906. event.detail = {};
  907. }
  908. if (hasOwn(event, 'markerId')) {
  909. event.detail = typeof event.detail === 'object' ? event.detail : {};
  910. event.detail.markerId = event.markerId;
  911. }
  912. if (isPlainObject(event.detail)) {
  913. event.target = Object.assign({}, event.target, event.detail);
  914. }
  915. return event;
  916. }
  917. function getExtraValue(vm, dataPathsArray) {
  918. var context = vm;
  919. dataPathsArray.forEach(function (dataPathArray) {
  920. var dataPath = dataPathArray[0];
  921. var value = dataPathArray[2];
  922. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  923. var propPath = dataPathArray[1];
  924. var valuePath = dataPathArray[3];
  925. var vFor;
  926. if (Number.isInteger(dataPath)) {
  927. vFor = dataPath;
  928. } else if (!dataPath) {
  929. vFor = context;
  930. } else if (typeof dataPath === 'string' && dataPath) {
  931. if (dataPath.indexOf('#s#') === 0) {
  932. vFor = dataPath.substr(3);
  933. } else {
  934. vFor = vm.__get_value(dataPath, context);
  935. }
  936. }
  937. if (Number.isInteger(vFor)) {
  938. context = value;
  939. } else if (!propPath) {
  940. context = vFor[value];
  941. } else {
  942. if (Array.isArray(vFor)) {
  943. context = vFor.find(function (vForItem) {
  944. return vm.__get_value(propPath, vForItem) === value;
  945. });
  946. } else if (isPlainObject(vFor)) {
  947. context = Object.keys(vFor).find(function (vForKey) {
  948. return vm.__get_value(propPath, vFor[vForKey]) === value;
  949. });
  950. } else {
  951. console.error('v-for 暂不支持循环数据:', vFor);
  952. }
  953. }
  954. if (valuePath) {
  955. context = vm.__get_value(valuePath, context);
  956. }
  957. }
  958. });
  959. return context;
  960. }
  961. function processEventExtra(vm, extra, event) {
  962. var extraObj = {};
  963. if (Array.isArray(extra) && extra.length) {
  964. /**
  965. *[
  966. * ['data.items', 'data.id', item.data.id],
  967. * ['metas', 'id', meta.id]
  968. *],
  969. *[
  970. * ['data.items', 'data.id', item.data.id],
  971. * ['metas', 'id', meta.id]
  972. *],
  973. *'test'
  974. */
  975. extra.forEach(function (dataPath, index) {
  976. if (typeof dataPath === 'string') {
  977. if (!dataPath) {// model,prop.sync
  978. extraObj['$' + index] = vm;
  979. } else {
  980. if (dataPath === '$event') {// $event
  981. extraObj['$' + index] = event;
  982. } else if (dataPath === 'arguments') {
  983. if (event.detail && event.detail.__args__) {
  984. extraObj['$' + index] = event.detail.__args__;
  985. } else {
  986. extraObj['$' + index] = [event];
  987. }
  988. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  989. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  990. } else {
  991. extraObj['$' + index] = vm.__get_value(dataPath);
  992. }
  993. }
  994. } else {
  995. extraObj['$' + index] = getExtraValue(vm, dataPath);
  996. }
  997. });
  998. }
  999. return extraObj;
  1000. }
  1001. function getObjByArray(arr) {
  1002. var obj = {};
  1003. for (var i = 1; i < arr.length; i++) {
  1004. var element = arr[i];
  1005. obj[element[0]] = element[1];
  1006. }
  1007. return obj;
  1008. }
  1009. 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;
  1010. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1011. if (isCustom) {// 自定义事件
  1012. isCustomMPEvent = event.currentTarget &&
  1013. event.currentTarget.dataset &&
  1014. event.currentTarget.dataset.comType === 'wx';
  1015. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  1016. if (isCustomMPEvent) {
  1017. return [event];
  1018. }
  1019. return event.detail.__args__ || event.detail;
  1020. }
  1021. }
  1022. var extraObj = processEventExtra(vm, extra, event);
  1023. var ret = [];
  1024. args.forEach(function (arg) {
  1025. if (arg === '$event') {
  1026. if (methodName === '__set_model' && !isCustom) {// input v-model value
  1027. ret.push(event.target.value);
  1028. } else {
  1029. if (isCustom && !isCustomMPEvent) {
  1030. ret.push(event.detail.__args__[0]);
  1031. } else {// wxcomponent 组件或内置组件
  1032. ret.push(event);
  1033. }
  1034. }
  1035. } else {
  1036. if (Array.isArray(arg) && arg[0] === 'o') {
  1037. ret.push(getObjByArray(arg));
  1038. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1039. ret.push(extraObj[arg]);
  1040. } else {
  1041. ret.push(arg);
  1042. }
  1043. }
  1044. });
  1045. return ret;
  1046. }
  1047. var ONCE = '~';
  1048. var CUSTOM = '^';
  1049. function isMatchEventType(eventType, optType) {
  1050. return eventType === optType ||
  1051. optType === 'regionchange' && (
  1052. eventType === 'begin' ||
  1053. eventType === 'end');
  1054. }
  1055. function getContextVm(vm) {
  1056. var $parent = vm.$parent;
  1057. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1058. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1059. $parent = $parent.$parent;
  1060. }
  1061. return $parent && $parent.$parent;
  1062. }
  1063. function handleEvent(event) {var _this2 = this;
  1064. event = wrapper$1(event);
  1065. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1066. var dataset = (event.currentTarget || event.target).dataset;
  1067. if (!dataset) {
  1068. return console.warn('事件信息不存在');
  1069. }
  1070. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1071. if (!eventOpts) {
  1072. return console.warn('事件信息不存在');
  1073. }
  1074. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1075. var eventType = event.type;
  1076. var ret = [];
  1077. eventOpts.forEach(function (eventOpt) {
  1078. var type = eventOpt[0];
  1079. var eventsArray = eventOpt[1];
  1080. var isCustom = type.charAt(0) === CUSTOM;
  1081. type = isCustom ? type.slice(1) : type;
  1082. var isOnce = type.charAt(0) === ONCE;
  1083. type = isOnce ? type.slice(1) : type;
  1084. if (eventsArray && isMatchEventType(eventType, type)) {
  1085. eventsArray.forEach(function (eventArray) {
  1086. var methodName = eventArray[0];
  1087. if (methodName) {
  1088. var handlerCtx = _this2.$vm;
  1089. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1090. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1091. }
  1092. if (methodName === '$emit') {
  1093. handlerCtx.$emit.apply(handlerCtx,
  1094. processEventArgs(
  1095. _this2.$vm,
  1096. event,
  1097. eventArray[1],
  1098. eventArray[2],
  1099. isCustom,
  1100. methodName));
  1101. return;
  1102. }
  1103. var handler = handlerCtx[methodName];
  1104. if (!isFn(handler)) {
  1105. throw new Error(" _vm.".concat(methodName, " is not a function"));
  1106. }
  1107. if (isOnce) {
  1108. if (handler.once) {
  1109. return;
  1110. }
  1111. handler.once = true;
  1112. }
  1113. var params = processEventArgs(
  1114. _this2.$vm,
  1115. event,
  1116. eventArray[1],
  1117. eventArray[2],
  1118. isCustom,
  1119. methodName);
  1120. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1121. // eslint-disable-next-line no-sparse-arrays
  1122. ret.push(handler.apply(handlerCtx, (Array.isArray(params) ? params : []).concat([,,,,,,,,,, event])));
  1123. }
  1124. });
  1125. }
  1126. });
  1127. if (
  1128. eventType === 'input' &&
  1129. ret.length === 1 &&
  1130. typeof ret[0] !== 'undefined')
  1131. {
  1132. return ret[0];
  1133. }
  1134. }
  1135. var hooks = [
  1136. 'onShow',
  1137. 'onHide',
  1138. 'onError',
  1139. 'onPageNotFound',
  1140. 'onThemeChange',
  1141. 'onUnhandledRejection'];
  1142. function parseBaseApp(vm, _ref3)
  1143. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  1144. if (vm.$options.store) {
  1145. _vue.default.prototype.$store = vm.$options.store;
  1146. }
  1147. _vue.default.prototype.mpHost = "mp-weixin";
  1148. _vue.default.mixin({
  1149. beforeCreate: function beforeCreate() {
  1150. if (!this.$options.mpType) {
  1151. return;
  1152. }
  1153. this.mpType = this.$options.mpType;
  1154. this.$mp = _defineProperty({
  1155. data: {} },
  1156. this.mpType, this.$options.mpInstance);
  1157. this.$scope = this.$options.mpInstance;
  1158. delete this.$options.mpType;
  1159. delete this.$options.mpInstance;
  1160. if (this.mpType !== 'app') {
  1161. initRefs(this);
  1162. initMocks(this, mocks);
  1163. }
  1164. } });
  1165. var appOptions = {
  1166. onLaunch: function onLaunch(args) {
  1167. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1168. return;
  1169. }
  1170. {
  1171. if (!wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1172. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1173. }
  1174. }
  1175. this.$vm = vm;
  1176. this.$vm.$mp = {
  1177. app: this };
  1178. this.$vm.$scope = this;
  1179. // vm 上也挂载 globalData
  1180. this.$vm.globalData = this.globalData;
  1181. this.$vm._isMounted = true;
  1182. this.$vm.__call_hook('mounted', args);
  1183. this.$vm.__call_hook('onLaunch', args);
  1184. } };
  1185. // 兼容旧版本 globalData
  1186. appOptions.globalData = vm.$options.globalData || {};
  1187. // 将 methods 中的方法挂在 getApp() 中
  1188. var methods = vm.$options.methods;
  1189. if (methods) {
  1190. Object.keys(methods).forEach(function (name) {
  1191. appOptions[name] = methods[name];
  1192. });
  1193. }
  1194. initHooks(appOptions, hooks);
  1195. return appOptions;
  1196. }
  1197. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1198. function findVmByVueId(vm, vuePid) {
  1199. var $children = vm.$children;
  1200. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1201. for (var i = $children.length - 1; i >= 0; i--) {
  1202. var childVm = $children[i];
  1203. if (childVm.$scope._$vueId === vuePid) {
  1204. return childVm;
  1205. }
  1206. }
  1207. // 反向递归查找
  1208. var parentVm;
  1209. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1210. parentVm = findVmByVueId($children[_i], vuePid);
  1211. if (parentVm) {
  1212. return parentVm;
  1213. }
  1214. }
  1215. }
  1216. function initBehavior(options) {
  1217. return Behavior(options);
  1218. }
  1219. function isPage() {
  1220. return !!this.route;
  1221. }
  1222. function initRelation(detail) {
  1223. this.triggerEvent('__l', detail);
  1224. }
  1225. function initRefs(vm) {
  1226. var mpInstance = vm.$scope;
  1227. Object.defineProperty(vm, '$refs', {
  1228. get: function get() {
  1229. var $refs = {};
  1230. var components = mpInstance.selectAllComponents('.vue-ref');
  1231. components.forEach(function (component) {
  1232. var ref = component.dataset.ref;
  1233. $refs[ref] = component.$vm || component;
  1234. });
  1235. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1236. forComponents.forEach(function (component) {
  1237. var ref = component.dataset.ref;
  1238. if (!$refs[ref]) {
  1239. $refs[ref] = [];
  1240. }
  1241. $refs[ref].push(component.$vm || component);
  1242. });
  1243. return $refs;
  1244. } });
  1245. }
  1246. function handleLink(event) {var _ref4 =
  1247. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1248. var parentVm;
  1249. if (vuePid) {
  1250. parentVm = findVmByVueId(this.$vm, vuePid);
  1251. }
  1252. if (!parentVm) {
  1253. parentVm = this.$vm;
  1254. }
  1255. vueOptions.parent = parentVm;
  1256. }
  1257. function parseApp(vm) {
  1258. return parseBaseApp(vm, {
  1259. mocks: mocks,
  1260. initRefs: initRefs });
  1261. }
  1262. function createApp(vm) {
  1263. _vue.default.prototype.getOpenerEventChannel = function () {
  1264. if (!this.__eventChannel__) {
  1265. this.__eventChannel__ = new EventChannel();
  1266. }
  1267. return this.__eventChannel__;
  1268. };
  1269. var callHook = _vue.default.prototype.__call_hook;
  1270. _vue.default.prototype.__call_hook = function (hook, args) {
  1271. if (hook === 'onLoad' && args && args.__id__) {
  1272. this.__eventChannel__ = getEventChannel(args.__id__);
  1273. delete args.__id__;
  1274. }
  1275. return callHook.call(this, hook, args);
  1276. };
  1277. App(parseApp(vm));
  1278. return vm;
  1279. }
  1280. var encodeReserveRE = /[!'()*]/g;
  1281. var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);};
  1282. var commaRE = /%2C/g;
  1283. // fixed encodeURIComponent which is more conformant to RFC3986:
  1284. // - escapes [!'()*]
  1285. // - preserve commas
  1286. var encode = function encode(str) {return encodeURIComponent(str).
  1287. replace(encodeReserveRE, encodeReserveReplacer).
  1288. replace(commaRE, ',');};
  1289. function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  1290. var res = obj ? Object.keys(obj).map(function (key) {
  1291. var val = obj[key];
  1292. if (val === undefined) {
  1293. return '';
  1294. }
  1295. if (val === null) {
  1296. return encodeStr(key);
  1297. }
  1298. if (Array.isArray(val)) {
  1299. var result = [];
  1300. val.forEach(function (val2) {
  1301. if (val2 === undefined) {
  1302. return;
  1303. }
  1304. if (val2 === null) {
  1305. result.push(encodeStr(key));
  1306. } else {
  1307. result.push(encodeStr(key) + '=' + encodeStr(val2));
  1308. }
  1309. });
  1310. return result.join('&');
  1311. }
  1312. return encodeStr(key) + '=' + encodeStr(val);
  1313. }).filter(function (x) {return x.length > 0;}).join('&') : null;
  1314. return res ? "?".concat(res) : '';
  1315. }
  1316. function parseBaseComponent(vueComponentOptions)
  1317. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1318. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1319. var options = _objectSpread({
  1320. multipleSlots: true,
  1321. addGlobalClass: true },
  1322. vueOptions.options || {});
  1323. {
  1324. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1325. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1326. Object.assign(options, vueOptions['mp-weixin'].options);
  1327. }
  1328. }
  1329. var componentOptions = {
  1330. options: options,
  1331. data: initData(vueOptions, _vue.default.prototype),
  1332. behaviors: initBehaviors(vueOptions, initBehavior),
  1333. properties: initProperties(vueOptions.props, false, vueOptions.__file),
  1334. lifetimes: {
  1335. attached: function attached() {
  1336. var properties = this.properties;
  1337. var options = {
  1338. mpType: isPage.call(this) ? 'page' : 'component',
  1339. mpInstance: this,
  1340. propsData: properties };
  1341. initVueIds(properties.vueId, this);
  1342. // 处理父子关系
  1343. initRelation.call(this, {
  1344. vuePid: this._$vuePid,
  1345. vueOptions: options });
  1346. // 初始化 vue 实例
  1347. this.$vm = new VueComponent(options);
  1348. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1349. initSlots(this.$vm, properties.vueSlots);
  1350. // 触发首次 setData
  1351. this.$vm.$mount();
  1352. },
  1353. ready: function ready() {
  1354. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1355. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1356. if (this.$vm) {
  1357. this.$vm._isMounted = true;
  1358. this.$vm.__call_hook('mounted');
  1359. this.$vm.__call_hook('onReady');
  1360. }
  1361. },
  1362. detached: function detached() {
  1363. this.$vm && this.$vm.$destroy();
  1364. } },
  1365. pageLifetimes: {
  1366. show: function show(args) {
  1367. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1368. },
  1369. hide: function hide() {
  1370. this.$vm && this.$vm.__call_hook('onPageHide');
  1371. },
  1372. resize: function resize(size) {
  1373. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1374. } },
  1375. methods: {
  1376. __l: handleLink,
  1377. __e: handleEvent } };
  1378. // externalClasses
  1379. if (vueOptions.externalClasses) {
  1380. componentOptions.externalClasses = vueOptions.externalClasses;
  1381. }
  1382. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1383. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1384. componentOptions.methods[callMethod] = function (args) {
  1385. return this.$vm[callMethod](args);
  1386. };
  1387. });
  1388. }
  1389. if (isPage) {
  1390. return componentOptions;
  1391. }
  1392. return [componentOptions, VueComponent];
  1393. }
  1394. function parseComponent(vueComponentOptions) {
  1395. return parseBaseComponent(vueComponentOptions, {
  1396. isPage: isPage,
  1397. initRelation: initRelation });
  1398. }
  1399. var hooks$1 = [
  1400. 'onShow',
  1401. 'onHide',
  1402. 'onUnload'];
  1403. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1404. function parseBasePage(vuePageOptions, _ref6)
  1405. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1406. var pageOptions = parseComponent(vuePageOptions);
  1407. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1408. pageOptions.methods.onLoad = function (query) {
  1409. this.options = query;
  1410. var copyQuery = Object.assign({}, query);
  1411. delete copyQuery.__id__;
  1412. this.$page = {
  1413. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery) };
  1414. this.$vm.$mp.query = query; // 兼容 mpvue
  1415. this.$vm.__call_hook('onLoad', query);
  1416. };
  1417. return pageOptions;
  1418. }
  1419. function parsePage(vuePageOptions) {
  1420. return parseBasePage(vuePageOptions, {
  1421. isPage: isPage,
  1422. initRelation: initRelation });
  1423. }
  1424. function createPage(vuePageOptions) {
  1425. {
  1426. return Component(parsePage(vuePageOptions));
  1427. }
  1428. }
  1429. function createComponent(vueOptions) {
  1430. {
  1431. return Component(parseComponent(vueOptions));
  1432. }
  1433. }
  1434. todos.forEach(function (todoApi) {
  1435. protocols[todoApi] = false;
  1436. });
  1437. canIUses.forEach(function (canIUseApi) {
  1438. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  1439. canIUseApi;
  1440. if (!wx.canIUse(apiName)) {
  1441. protocols[canIUseApi] = false;
  1442. }
  1443. });
  1444. var uni = {};
  1445. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  1446. uni = new Proxy({}, {
  1447. get: function get(target, name) {
  1448. if (hasOwn(target, name)) {
  1449. return target[name];
  1450. }
  1451. if (baseApi[name]) {
  1452. return baseApi[name];
  1453. }
  1454. if (api[name]) {
  1455. return promisify(name, api[name]);
  1456. }
  1457. {
  1458. if (extraApi[name]) {
  1459. return promisify(name, extraApi[name]);
  1460. }
  1461. if (todoApis[name]) {
  1462. return promisify(name, todoApis[name]);
  1463. }
  1464. }
  1465. if (eventApi[name]) {
  1466. return eventApi[name];
  1467. }
  1468. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  1469. return;
  1470. }
  1471. return promisify(name, wrapper(name, wx[name]));
  1472. },
  1473. set: function set(target, name, value) {
  1474. target[name] = value;
  1475. return true;
  1476. } });
  1477. } else {
  1478. Object.keys(baseApi).forEach(function (name) {
  1479. uni[name] = baseApi[name];
  1480. });
  1481. {
  1482. Object.keys(todoApis).forEach(function (name) {
  1483. uni[name] = promisify(name, todoApis[name]);
  1484. });
  1485. Object.keys(extraApi).forEach(function (name) {
  1486. uni[name] = promisify(name, todoApis[name]);
  1487. });
  1488. }
  1489. Object.keys(eventApi).forEach(function (name) {
  1490. uni[name] = eventApi[name];
  1491. });
  1492. Object.keys(api).forEach(function (name) {
  1493. uni[name] = promisify(name, api[name]);
  1494. });
  1495. Object.keys(wx).forEach(function (name) {
  1496. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  1497. uni[name] = promisify(name, wrapper(name, wx[name]));
  1498. }
  1499. });
  1500. }
  1501. wx.createApp = createApp;
  1502. wx.createPage = createPage;
  1503. wx.createComponent = createComponent;
  1504. var uni$1 = uni;var _default =
  1505. uni$1;exports.default = _default;
  1506. /***/ }),
  1507. /* 2 */
  1508. /*!******************************************************************************************!*\
  1509. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  1510. \******************************************************************************************/
  1511. /*! exports provided: default */
  1512. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1513. "use strict";
  1514. __webpack_require__.r(__webpack_exports__);
  1515. /* WEBPACK VAR INJECTION */(function(global) {/*!
  1516. * Vue.js v2.6.11
  1517. * (c) 2014-2020 Evan You
  1518. * Released under the MIT License.
  1519. */
  1520. /* */
  1521. var emptyObject = Object.freeze({});
  1522. // These helpers produce better VM code in JS engines due to their
  1523. // explicitness and function inlining.
  1524. function isUndef (v) {
  1525. return v === undefined || v === null
  1526. }
  1527. function isDef (v) {
  1528. return v !== undefined && v !== null
  1529. }
  1530. function isTrue (v) {
  1531. return v === true
  1532. }
  1533. function isFalse (v) {
  1534. return v === false
  1535. }
  1536. /**
  1537. * Check if value is primitive.
  1538. */
  1539. function isPrimitive (value) {
  1540. return (
  1541. typeof value === 'string' ||
  1542. typeof value === 'number' ||
  1543. // $flow-disable-line
  1544. typeof value === 'symbol' ||
  1545. typeof value === 'boolean'
  1546. )
  1547. }
  1548. /**
  1549. * Quick object check - this is primarily used to tell
  1550. * Objects from primitive values when we know the value
  1551. * is a JSON-compliant type.
  1552. */
  1553. function isObject (obj) {
  1554. return obj !== null && typeof obj === 'object'
  1555. }
  1556. /**
  1557. * Get the raw type string of a value, e.g., [object Object].
  1558. */
  1559. var _toString = Object.prototype.toString;
  1560. function toRawType (value) {
  1561. return _toString.call(value).slice(8, -1)
  1562. }
  1563. /**
  1564. * Strict object type check. Only returns true
  1565. * for plain JavaScript objects.
  1566. */
  1567. function isPlainObject (obj) {
  1568. return _toString.call(obj) === '[object Object]'
  1569. }
  1570. function isRegExp (v) {
  1571. return _toString.call(v) === '[object RegExp]'
  1572. }
  1573. /**
  1574. * Check if val is a valid array index.
  1575. */
  1576. function isValidArrayIndex (val) {
  1577. var n = parseFloat(String(val));
  1578. return n >= 0 && Math.floor(n) === n && isFinite(val)
  1579. }
  1580. function isPromise (val) {
  1581. return (
  1582. isDef(val) &&
  1583. typeof val.then === 'function' &&
  1584. typeof val.catch === 'function'
  1585. )
  1586. }
  1587. /**
  1588. * Convert a value to a string that is actually rendered.
  1589. */
  1590. function toString (val) {
  1591. return val == null
  1592. ? ''
  1593. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  1594. ? JSON.stringify(val, null, 2)
  1595. : String(val)
  1596. }
  1597. /**
  1598. * Convert an input value to a number for persistence.
  1599. * If the conversion fails, return original string.
  1600. */
  1601. function toNumber (val) {
  1602. var n = parseFloat(val);
  1603. return isNaN(n) ? val : n
  1604. }
  1605. /**
  1606. * Make a map and return a function for checking if a key
  1607. * is in that map.
  1608. */
  1609. function makeMap (
  1610. str,
  1611. expectsLowerCase
  1612. ) {
  1613. var map = Object.create(null);
  1614. var list = str.split(',');
  1615. for (var i = 0; i < list.length; i++) {
  1616. map[list[i]] = true;
  1617. }
  1618. return expectsLowerCase
  1619. ? function (val) { return map[val.toLowerCase()]; }
  1620. : function (val) { return map[val]; }
  1621. }
  1622. /**
  1623. * Check if a tag is a built-in tag.
  1624. */
  1625. var isBuiltInTag = makeMap('slot,component', true);
  1626. /**
  1627. * Check if an attribute is a reserved attribute.
  1628. */
  1629. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  1630. /**
  1631. * Remove an item from an array.
  1632. */
  1633. function remove (arr, item) {
  1634. if (arr.length) {
  1635. var index = arr.indexOf(item);
  1636. if (index > -1) {
  1637. return arr.splice(index, 1)
  1638. }
  1639. }
  1640. }
  1641. /**
  1642. * Check whether an object has the property.
  1643. */
  1644. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1645. function hasOwn (obj, key) {
  1646. return hasOwnProperty.call(obj, key)
  1647. }
  1648. /**
  1649. * Create a cached version of a pure function.
  1650. */
  1651. function cached (fn) {
  1652. var cache = Object.create(null);
  1653. return (function cachedFn (str) {
  1654. var hit = cache[str];
  1655. return hit || (cache[str] = fn(str))
  1656. })
  1657. }
  1658. /**
  1659. * Camelize a hyphen-delimited string.
  1660. */
  1661. var camelizeRE = /-(\w)/g;
  1662. var camelize = cached(function (str) {
  1663. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  1664. });
  1665. /**
  1666. * Capitalize a string.
  1667. */
  1668. var capitalize = cached(function (str) {
  1669. return str.charAt(0).toUpperCase() + str.slice(1)
  1670. });
  1671. /**
  1672. * Hyphenate a camelCase string.
  1673. */
  1674. var hyphenateRE = /\B([A-Z])/g;
  1675. var hyphenate = cached(function (str) {
  1676. return str.replace(hyphenateRE, '-$1').toLowerCase()
  1677. });
  1678. /**
  1679. * Simple bind polyfill for environments that do not support it,
  1680. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  1681. * since native bind is now performant enough in most browsers.
  1682. * But removing it would mean breaking code that was able to run in
  1683. * PhantomJS 1.x, so this must be kept for backward compatibility.
  1684. */
  1685. /* istanbul ignore next */
  1686. function polyfillBind (fn, ctx) {
  1687. function boundFn (a) {
  1688. var l = arguments.length;
  1689. return l
  1690. ? l > 1
  1691. ? fn.apply(ctx, arguments)
  1692. : fn.call(ctx, a)
  1693. : fn.call(ctx)
  1694. }
  1695. boundFn._length = fn.length;
  1696. return boundFn
  1697. }
  1698. function nativeBind (fn, ctx) {
  1699. return fn.bind(ctx)
  1700. }
  1701. var bind = Function.prototype.bind
  1702. ? nativeBind
  1703. : polyfillBind;
  1704. /**
  1705. * Convert an Array-like object to a real Array.
  1706. */
  1707. function toArray (list, start) {
  1708. start = start || 0;
  1709. var i = list.length - start;
  1710. var ret = new Array(i);
  1711. while (i--) {
  1712. ret[i] = list[i + start];
  1713. }
  1714. return ret
  1715. }
  1716. /**
  1717. * Mix properties into target object.
  1718. */
  1719. function extend (to, _from) {
  1720. for (var key in _from) {
  1721. to[key] = _from[key];
  1722. }
  1723. return to
  1724. }
  1725. /**
  1726. * Merge an Array of Objects into a single Object.
  1727. */
  1728. function toObject (arr) {
  1729. var res = {};
  1730. for (var i = 0; i < arr.length; i++) {
  1731. if (arr[i]) {
  1732. extend(res, arr[i]);
  1733. }
  1734. }
  1735. return res
  1736. }
  1737. /* eslint-disable no-unused-vars */
  1738. /**
  1739. * Perform no operation.
  1740. * Stubbing args to make Flow happy without leaving useless transpiled code
  1741. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  1742. */
  1743. function noop (a, b, c) {}
  1744. /**
  1745. * Always return false.
  1746. */
  1747. var no = function (a, b, c) { return false; };
  1748. /* eslint-enable no-unused-vars */
  1749. /**
  1750. * Return the same value.
  1751. */
  1752. var identity = function (_) { return _; };
  1753. /**
  1754. * Check if two values are loosely equal - that is,
  1755. * if they are plain objects, do they have the same shape?
  1756. */
  1757. function looseEqual (a, b) {
  1758. if (a === b) { return true }
  1759. var isObjectA = isObject(a);
  1760. var isObjectB = isObject(b);
  1761. if (isObjectA && isObjectB) {
  1762. try {
  1763. var isArrayA = Array.isArray(a);
  1764. var isArrayB = Array.isArray(b);
  1765. if (isArrayA && isArrayB) {
  1766. return a.length === b.length && a.every(function (e, i) {
  1767. return looseEqual(e, b[i])
  1768. })
  1769. } else if (a instanceof Date && b instanceof Date) {
  1770. return a.getTime() === b.getTime()
  1771. } else if (!isArrayA && !isArrayB) {
  1772. var keysA = Object.keys(a);
  1773. var keysB = Object.keys(b);
  1774. return keysA.length === keysB.length && keysA.every(function (key) {
  1775. return looseEqual(a[key], b[key])
  1776. })
  1777. } else {
  1778. /* istanbul ignore next */
  1779. return false
  1780. }
  1781. } catch (e) {
  1782. /* istanbul ignore next */
  1783. return false
  1784. }
  1785. } else if (!isObjectA && !isObjectB) {
  1786. return String(a) === String(b)
  1787. } else {
  1788. return false
  1789. }
  1790. }
  1791. /**
  1792. * Return the first index at which a loosely equal value can be
  1793. * found in the array (if value is a plain object, the array must
  1794. * contain an object of the same shape), or -1 if it is not present.
  1795. */
  1796. function looseIndexOf (arr, val) {
  1797. for (var i = 0; i < arr.length; i++) {
  1798. if (looseEqual(arr[i], val)) { return i }
  1799. }
  1800. return -1
  1801. }
  1802. /**
  1803. * Ensure a function is called only once.
  1804. */
  1805. function once (fn) {
  1806. var called = false;
  1807. return function () {
  1808. if (!called) {
  1809. called = true;
  1810. fn.apply(this, arguments);
  1811. }
  1812. }
  1813. }
  1814. var ASSET_TYPES = [
  1815. 'component',
  1816. 'directive',
  1817. 'filter'
  1818. ];
  1819. var LIFECYCLE_HOOKS = [
  1820. 'beforeCreate',
  1821. 'created',
  1822. 'beforeMount',
  1823. 'mounted',
  1824. 'beforeUpdate',
  1825. 'updated',
  1826. 'beforeDestroy',
  1827. 'destroyed',
  1828. 'activated',
  1829. 'deactivated',
  1830. 'errorCaptured',
  1831. 'serverPrefetch'
  1832. ];
  1833. /* */
  1834. var config = ({
  1835. /**
  1836. * Option merge strategies (used in core/util/options)
  1837. */
  1838. // $flow-disable-line
  1839. optionMergeStrategies: Object.create(null),
  1840. /**
  1841. * Whether to suppress warnings.
  1842. */
  1843. silent: false,
  1844. /**
  1845. * Show production mode tip message on boot?
  1846. */
  1847. productionTip: "development" !== 'production',
  1848. /**
  1849. * Whether to enable devtools
  1850. */
  1851. devtools: "development" !== 'production',
  1852. /**
  1853. * Whether to record perf
  1854. */
  1855. performance: false,
  1856. /**
  1857. * Error handler for watcher errors
  1858. */
  1859. errorHandler: null,
  1860. /**
  1861. * Warn handler for watcher warns
  1862. */
  1863. warnHandler: null,
  1864. /**
  1865. * Ignore certain custom elements
  1866. */
  1867. ignoredElements: [],
  1868. /**
  1869. * Custom user key aliases for v-on
  1870. */
  1871. // $flow-disable-line
  1872. keyCodes: Object.create(null),
  1873. /**
  1874. * Check if a tag is reserved so that it cannot be registered as a
  1875. * component. This is platform-dependent and may be overwritten.
  1876. */
  1877. isReservedTag: no,
  1878. /**
  1879. * Check if an attribute is reserved so that it cannot be used as a component
  1880. * prop. This is platform-dependent and may be overwritten.
  1881. */
  1882. isReservedAttr: no,
  1883. /**
  1884. * Check if a tag is an unknown element.
  1885. * Platform-dependent.
  1886. */
  1887. isUnknownElement: no,
  1888. /**
  1889. * Get the namespace of an element
  1890. */
  1891. getTagNamespace: noop,
  1892. /**
  1893. * Parse the real tag name for the specific platform.
  1894. */
  1895. parsePlatformTagName: identity,
  1896. /**
  1897. * Check if an attribute must be bound using property, e.g. value
  1898. * Platform-dependent.
  1899. */
  1900. mustUseProp: no,
  1901. /**
  1902. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  1903. * This will significantly reduce performance if set to false.
  1904. */
  1905. async: true,
  1906. /**
  1907. * Exposed for legacy reasons
  1908. */
  1909. _lifecycleHooks: LIFECYCLE_HOOKS
  1910. });
  1911. /* */
  1912. /**
  1913. * unicode letters used for parsing html tags, component names and property paths.
  1914. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  1915. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  1916. */
  1917. 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/;
  1918. /**
  1919. * Check if a string starts with $ or _
  1920. */
  1921. function isReserved (str) {
  1922. var c = (str + '').charCodeAt(0);
  1923. return c === 0x24 || c === 0x5F
  1924. }
  1925. /**
  1926. * Define a property.
  1927. */
  1928. function def (obj, key, val, enumerable) {
  1929. Object.defineProperty(obj, key, {
  1930. value: val,
  1931. enumerable: !!enumerable,
  1932. writable: true,
  1933. configurable: true
  1934. });
  1935. }
  1936. /**
  1937. * Parse simple path.
  1938. */
  1939. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  1940. function parsePath (path) {
  1941. if (bailRE.test(path)) {
  1942. return
  1943. }
  1944. var segments = path.split('.');
  1945. return function (obj) {
  1946. for (var i = 0; i < segments.length; i++) {
  1947. if (!obj) { return }
  1948. obj = obj[segments[i]];
  1949. }
  1950. return obj
  1951. }
  1952. }
  1953. /* */
  1954. // can we use __proto__?
  1955. var hasProto = '__proto__' in {};
  1956. // Browser environment sniffing
  1957. var inBrowser = typeof window !== 'undefined';
  1958. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  1959. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  1960. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  1961. var isIE = UA && /msie|trident/.test(UA);
  1962. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  1963. var isEdge = UA && UA.indexOf('edge/') > 0;
  1964. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  1965. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  1966. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  1967. var isPhantomJS = UA && /phantomjs/.test(UA);
  1968. var isFF = UA && UA.match(/firefox\/(\d+)/);
  1969. // Firefox has a "watch" function on Object.prototype...
  1970. var nativeWatch = ({}).watch;
  1971. if (inBrowser) {
  1972. try {
  1973. var opts = {};
  1974. Object.defineProperty(opts, 'passive', ({
  1975. get: function get () {
  1976. }
  1977. })); // https://github.com/facebook/flow/issues/285
  1978. window.addEventListener('test-passive', null, opts);
  1979. } catch (e) {}
  1980. }
  1981. // this needs to be lazy-evaled because vue may be required before
  1982. // vue-server-renderer can set VUE_ENV
  1983. var _isServer;
  1984. var isServerRendering = function () {
  1985. if (_isServer === undefined) {
  1986. /* istanbul ignore if */
  1987. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  1988. // detect presence of vue-server-renderer and avoid
  1989. // Webpack shimming the process
  1990. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  1991. } else {
  1992. _isServer = false;
  1993. }
  1994. }
  1995. return _isServer
  1996. };
  1997. // detect devtools
  1998. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  1999. /* istanbul ignore next */
  2000. function isNative (Ctor) {
  2001. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  2002. }
  2003. var hasSymbol =
  2004. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  2005. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  2006. var _Set;
  2007. /* istanbul ignore if */ // $flow-disable-line
  2008. if (typeof Set !== 'undefined' && isNative(Set)) {
  2009. // use native Set when available.
  2010. _Set = Set;
  2011. } else {
  2012. // a non-standard Set polyfill that only works with primitive keys.
  2013. _Set = /*@__PURE__*/(function () {
  2014. function Set () {
  2015. this.set = Object.create(null);
  2016. }
  2017. Set.prototype.has = function has (key) {
  2018. return this.set[key] === true
  2019. };
  2020. Set.prototype.add = function add (key) {
  2021. this.set[key] = true;
  2022. };
  2023. Set.prototype.clear = function clear () {
  2024. this.set = Object.create(null);
  2025. };
  2026. return Set;
  2027. }());
  2028. }
  2029. /* */
  2030. var warn = noop;
  2031. var tip = noop;
  2032. var generateComponentTrace = (noop); // work around flow check
  2033. var formatComponentName = (noop);
  2034. if (true) {
  2035. var hasConsole = typeof console !== 'undefined';
  2036. var classifyRE = /(?:^|[-_])(\w)/g;
  2037. var classify = function (str) { return str
  2038. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  2039. .replace(/[-_]/g, ''); };
  2040. warn = function (msg, vm) {
  2041. var trace = vm ? generateComponentTrace(vm) : '';
  2042. if (config.warnHandler) {
  2043. config.warnHandler.call(null, msg, vm, trace);
  2044. } else if (hasConsole && (!config.silent)) {
  2045. console.error(("[Vue warn]: " + msg + trace));
  2046. }
  2047. };
  2048. tip = function (msg, vm) {
  2049. if (hasConsole && (!config.silent)) {
  2050. console.warn("[Vue tip]: " + msg + (
  2051. vm ? generateComponentTrace(vm) : ''
  2052. ));
  2053. }
  2054. };
  2055. formatComponentName = function (vm, includeFile) {
  2056. if (vm.$root === vm) {
  2057. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  2058. return ('') + vm.$options.__file
  2059. }
  2060. return '<Root>'
  2061. }
  2062. var options = typeof vm === 'function' && vm.cid != null
  2063. ? vm.options
  2064. : vm._isVue
  2065. ? vm.$options || vm.constructor.options
  2066. : vm;
  2067. var name = options.name || options._componentTag;
  2068. var file = options.__file;
  2069. if (!name && file) {
  2070. var match = file.match(/([^/\\]+)\.vue$/);
  2071. name = match && match[1];
  2072. }
  2073. return (
  2074. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  2075. (file && includeFile !== false ? (" at " + file) : '')
  2076. )
  2077. };
  2078. var repeat = function (str, n) {
  2079. var res = '';
  2080. while (n) {
  2081. if (n % 2 === 1) { res += str; }
  2082. if (n > 1) { str += str; }
  2083. n >>= 1;
  2084. }
  2085. return res
  2086. };
  2087. generateComponentTrace = function (vm) {
  2088. if (vm._isVue && vm.$parent) {
  2089. var tree = [];
  2090. var currentRecursiveSequence = 0;
  2091. while (vm && vm.$options.name !== 'PageBody') {
  2092. if (tree.length > 0) {
  2093. var last = tree[tree.length - 1];
  2094. if (last.constructor === vm.constructor) {
  2095. currentRecursiveSequence++;
  2096. vm = vm.$parent;
  2097. continue
  2098. } else if (currentRecursiveSequence > 0) {
  2099. tree[tree.length - 1] = [last, currentRecursiveSequence];
  2100. currentRecursiveSequence = 0;
  2101. }
  2102. }
  2103. !vm.$options.isReserved && tree.push(vm);
  2104. vm = vm.$parent;
  2105. }
  2106. return '\n\nfound in\n\n' + tree
  2107. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  2108. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  2109. : formatComponentName(vm))); })
  2110. .join('\n')
  2111. } else {
  2112. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  2113. }
  2114. };
  2115. }
  2116. /* */
  2117. var uid = 0;
  2118. /**
  2119. * A dep is an observable that can have multiple
  2120. * directives subscribing to it.
  2121. */
  2122. var Dep = function Dep () {
  2123. this.id = uid++;
  2124. this.subs = [];
  2125. };
  2126. Dep.prototype.addSub = function addSub (sub) {
  2127. this.subs.push(sub);
  2128. };
  2129. Dep.prototype.removeSub = function removeSub (sub) {
  2130. remove(this.subs, sub);
  2131. };
  2132. Dep.prototype.depend = function depend () {
  2133. if (Dep.SharedObject.target) {
  2134. Dep.SharedObject.target.addDep(this);
  2135. }
  2136. };
  2137. Dep.prototype.notify = function notify () {
  2138. // stabilize the subscriber list first
  2139. var subs = this.subs.slice();
  2140. if ( true && !config.async) {
  2141. // subs aren't sorted in scheduler if not running async
  2142. // we need to sort them now to make sure they fire in correct
  2143. // order
  2144. subs.sort(function (a, b) { return a.id - b.id; });
  2145. }
  2146. for (var i = 0, l = subs.length; i < l; i++) {
  2147. subs[i].update();
  2148. }
  2149. };
  2150. // The current target watcher being evaluated.
  2151. // This is globally unique because only one watcher
  2152. // can be evaluated at a time.
  2153. // fixed by xxxxxx (nvue shared vuex)
  2154. /* eslint-disable no-undef */
  2155. Dep.SharedObject = {};
  2156. Dep.SharedObject.target = null;
  2157. Dep.SharedObject.targetStack = [];
  2158. function pushTarget (target) {
  2159. Dep.SharedObject.targetStack.push(target);
  2160. Dep.SharedObject.target = target;
  2161. }
  2162. function popTarget () {
  2163. Dep.SharedObject.targetStack.pop();
  2164. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  2165. }
  2166. /* */
  2167. var VNode = function VNode (
  2168. tag,
  2169. data,
  2170. children,
  2171. text,
  2172. elm,
  2173. context,
  2174. componentOptions,
  2175. asyncFactory
  2176. ) {
  2177. this.tag = tag;
  2178. this.data = data;
  2179. this.children = children;
  2180. this.text = text;
  2181. this.elm = elm;
  2182. this.ns = undefined;
  2183. this.context = context;
  2184. this.fnContext = undefined;
  2185. this.fnOptions = undefined;
  2186. this.fnScopeId = undefined;
  2187. this.key = data && data.key;
  2188. this.componentOptions = componentOptions;
  2189. this.componentInstance = undefined;
  2190. this.parent = undefined;
  2191. this.raw = false;
  2192. this.isStatic = false;
  2193. this.isRootInsert = true;
  2194. this.isComment = false;
  2195. this.isCloned = false;
  2196. this.isOnce = false;
  2197. this.asyncFactory = asyncFactory;
  2198. this.asyncMeta = undefined;
  2199. this.isAsyncPlaceholder = false;
  2200. };
  2201. var prototypeAccessors = { child: { configurable: true } };
  2202. // DEPRECATED: alias for componentInstance for backwards compat.
  2203. /* istanbul ignore next */
  2204. prototypeAccessors.child.get = function () {
  2205. return this.componentInstance
  2206. };
  2207. Object.defineProperties( VNode.prototype, prototypeAccessors );
  2208. var createEmptyVNode = function (text) {
  2209. if ( text === void 0 ) text = '';
  2210. var node = new VNode();
  2211. node.text = text;
  2212. node.isComment = true;
  2213. return node
  2214. };
  2215. function createTextVNode (val) {
  2216. return new VNode(undefined, undefined, undefined, String(val))
  2217. }
  2218. // optimized shallow clone
  2219. // used for static nodes and slot nodes because they may be reused across
  2220. // multiple renders, cloning them avoids errors when DOM manipulations rely
  2221. // on their elm reference.
  2222. function cloneVNode (vnode) {
  2223. var cloned = new VNode(
  2224. vnode.tag,
  2225. vnode.data,
  2226. // #7975
  2227. // clone children array to avoid mutating original in case of cloning
  2228. // a child.
  2229. vnode.children && vnode.children.slice(),
  2230. vnode.text,
  2231. vnode.elm,
  2232. vnode.context,
  2233. vnode.componentOptions,
  2234. vnode.asyncFactory
  2235. );
  2236. cloned.ns = vnode.ns;
  2237. cloned.isStatic = vnode.isStatic;
  2238. cloned.key = vnode.key;
  2239. cloned.isComment = vnode.isComment;
  2240. cloned.fnContext = vnode.fnContext;
  2241. cloned.fnOptions = vnode.fnOptions;
  2242. cloned.fnScopeId = vnode.fnScopeId;
  2243. cloned.asyncMeta = vnode.asyncMeta;
  2244. cloned.isCloned = true;
  2245. return cloned
  2246. }
  2247. /*
  2248. * not type checking this file because flow doesn't play well with
  2249. * dynamically accessing methods on Array prototype
  2250. */
  2251. var arrayProto = Array.prototype;
  2252. var arrayMethods = Object.create(arrayProto);
  2253. var methodsToPatch = [
  2254. 'push',
  2255. 'pop',
  2256. 'shift',
  2257. 'unshift',
  2258. 'splice',
  2259. 'sort',
  2260. 'reverse'
  2261. ];
  2262. /**
  2263. * Intercept mutating methods and emit events
  2264. */
  2265. methodsToPatch.forEach(function (method) {
  2266. // cache original method
  2267. var original = arrayProto[method];
  2268. def(arrayMethods, method, function mutator () {
  2269. var args = [], len = arguments.length;
  2270. while ( len-- ) args[ len ] = arguments[ len ];
  2271. var result = original.apply(this, args);
  2272. var ob = this.__ob__;
  2273. var inserted;
  2274. switch (method) {
  2275. case 'push':
  2276. case 'unshift':
  2277. inserted = args;
  2278. break
  2279. case 'splice':
  2280. inserted = args.slice(2);
  2281. break
  2282. }
  2283. if (inserted) { ob.observeArray(inserted); }
  2284. // notify change
  2285. ob.dep.notify();
  2286. return result
  2287. });
  2288. });
  2289. /* */
  2290. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  2291. /**
  2292. * In some cases we may want to disable observation inside a component's
  2293. * update computation.
  2294. */
  2295. var shouldObserve = true;
  2296. function toggleObserving (value) {
  2297. shouldObserve = value;
  2298. }
  2299. /**
  2300. * Observer class that is attached to each observed
  2301. * object. Once attached, the observer converts the target
  2302. * object's property keys into getter/setters that
  2303. * collect dependencies and dispatch updates.
  2304. */
  2305. var Observer = function Observer (value) {
  2306. this.value = value;
  2307. this.dep = new Dep();
  2308. this.vmCount = 0;
  2309. def(value, '__ob__', this);
  2310. if (Array.isArray(value)) {
  2311. if (hasProto) {
  2312. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  2313. if(value.push !== value.__proto__.push){
  2314. copyAugment(value, arrayMethods, arrayKeys);
  2315. } else {
  2316. protoAugment(value, arrayMethods);
  2317. }
  2318. }
  2319. } else {
  2320. copyAugment(value, arrayMethods, arrayKeys);
  2321. }
  2322. this.observeArray(value);
  2323. } else {
  2324. this.walk(value);
  2325. }
  2326. };
  2327. /**
  2328. * Walk through all properties and convert them into
  2329. * getter/setters. This method should only be called when
  2330. * value type is Object.
  2331. */
  2332. Observer.prototype.walk = function walk (obj) {
  2333. var keys = Object.keys(obj);
  2334. for (var i = 0; i < keys.length; i++) {
  2335. defineReactive$$1(obj, keys[i]);
  2336. }
  2337. };
  2338. /**
  2339. * Observe a list of Array items.
  2340. */
  2341. Observer.prototype.observeArray = function observeArray (items) {
  2342. for (var i = 0, l = items.length; i < l; i++) {
  2343. observe(items[i]);
  2344. }
  2345. };
  2346. // helpers
  2347. /**
  2348. * Augment a target Object or Array by intercepting
  2349. * the prototype chain using __proto__
  2350. */
  2351. function protoAugment (target, src) {
  2352. /* eslint-disable no-proto */
  2353. target.__proto__ = src;
  2354. /* eslint-enable no-proto */
  2355. }
  2356. /**
  2357. * Augment a target Object or Array by defining
  2358. * hidden properties.
  2359. */
  2360. /* istanbul ignore next */
  2361. function copyAugment (target, src, keys) {
  2362. for (var i = 0, l = keys.length; i < l; i++) {
  2363. var key = keys[i];
  2364. def(target, key, src[key]);
  2365. }
  2366. }
  2367. /**
  2368. * Attempt to create an observer instance for a value,
  2369. * returns the new observer if successfully observed,
  2370. * or the existing observer if the value already has one.
  2371. */
  2372. function observe (value, asRootData) {
  2373. if (!isObject(value) || value instanceof VNode) {
  2374. return
  2375. }
  2376. var ob;
  2377. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  2378. ob = value.__ob__;
  2379. } else if (
  2380. shouldObserve &&
  2381. !isServerRendering() &&
  2382. (Array.isArray(value) || isPlainObject(value)) &&
  2383. Object.isExtensible(value) &&
  2384. !value._isVue
  2385. ) {
  2386. ob = new Observer(value);
  2387. }
  2388. if (asRootData && ob) {
  2389. ob.vmCount++;
  2390. }
  2391. return ob
  2392. }
  2393. /**
  2394. * Define a reactive property on an Object.
  2395. */
  2396. function defineReactive$$1 (
  2397. obj,
  2398. key,
  2399. val,
  2400. customSetter,
  2401. shallow
  2402. ) {
  2403. var dep = new Dep();
  2404. var property = Object.getOwnPropertyDescriptor(obj, key);
  2405. if (property && property.configurable === false) {
  2406. return
  2407. }
  2408. // cater for pre-defined getter/setters
  2409. var getter = property && property.get;
  2410. var setter = property && property.set;
  2411. if ((!getter || setter) && arguments.length === 2) {
  2412. val = obj[key];
  2413. }
  2414. var childOb = !shallow && observe(val);
  2415. Object.defineProperty(obj, key, {
  2416. enumerable: true,
  2417. configurable: true,
  2418. get: function reactiveGetter () {
  2419. var value = getter ? getter.call(obj) : val;
  2420. if (Dep.SharedObject.target) { // fixed by xxxxxx
  2421. dep.depend();
  2422. if (childOb) {
  2423. childOb.dep.depend();
  2424. if (Array.isArray(value)) {
  2425. dependArray(value);
  2426. }
  2427. }
  2428. }
  2429. return value
  2430. },
  2431. set: function reactiveSetter (newVal) {
  2432. var value = getter ? getter.call(obj) : val;
  2433. /* eslint-disable no-self-compare */
  2434. if (newVal === value || (newVal !== newVal && value !== value)) {
  2435. return
  2436. }
  2437. /* eslint-enable no-self-compare */
  2438. if ( true && customSetter) {
  2439. customSetter();
  2440. }
  2441. // #7981: for accessor properties without setter
  2442. if (getter && !setter) { return }
  2443. if (setter) {
  2444. setter.call(obj, newVal);
  2445. } else {
  2446. val = newVal;
  2447. }
  2448. childOb = !shallow && observe(newVal);
  2449. dep.notify();
  2450. }
  2451. });
  2452. }
  2453. /**
  2454. * Set a property on an object. Adds the new property and
  2455. * triggers change notification if the property doesn't
  2456. * already exist.
  2457. */
  2458. function set (target, key, val) {
  2459. if ( true &&
  2460. (isUndef(target) || isPrimitive(target))
  2461. ) {
  2462. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  2463. }
  2464. if (Array.isArray(target) && isValidArrayIndex(key)) {
  2465. target.length = Math.max(target.length, key);
  2466. target.splice(key, 1, val);
  2467. return val
  2468. }
  2469. if (key in target && !(key in Object.prototype)) {
  2470. target[key] = val;
  2471. return val
  2472. }
  2473. var ob = (target).__ob__;
  2474. if (target._isVue || (ob && ob.vmCount)) {
  2475. true && warn(
  2476. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  2477. 'at runtime - declare it upfront in the data option.'
  2478. );
  2479. return val
  2480. }
  2481. if (!ob) {
  2482. target[key] = val;
  2483. return val
  2484. }
  2485. defineReactive$$1(ob.value, key, val);
  2486. ob.dep.notify();
  2487. return val
  2488. }
  2489. /**
  2490. * Delete a property and trigger change if necessary.
  2491. */
  2492. function del (target, key) {
  2493. if ( true &&
  2494. (isUndef(target) || isPrimitive(target))
  2495. ) {
  2496. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  2497. }
  2498. if (Array.isArray(target) && isValidArrayIndex(key)) {
  2499. target.splice(key, 1);
  2500. return
  2501. }
  2502. var ob = (target).__ob__;
  2503. if (target._isVue || (ob && ob.vmCount)) {
  2504. true && warn(
  2505. 'Avoid deleting properties on a Vue instance or its root $data ' +
  2506. '- just set it to null.'
  2507. );
  2508. return
  2509. }
  2510. if (!hasOwn(target, key)) {
  2511. return
  2512. }
  2513. delete target[key];
  2514. if (!ob) {
  2515. return
  2516. }
  2517. ob.dep.notify();
  2518. }
  2519. /**
  2520. * Collect dependencies on array elements when the array is touched, since
  2521. * we cannot intercept array element access like property getters.
  2522. */
  2523. function dependArray (value) {
  2524. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  2525. e = value[i];
  2526. e && e.__ob__ && e.__ob__.dep.depend();
  2527. if (Array.isArray(e)) {
  2528. dependArray(e);
  2529. }
  2530. }
  2531. }
  2532. /* */
  2533. /**
  2534. * Option overwriting strategies are functions that handle
  2535. * how to merge a parent option value and a child option
  2536. * value into the final value.
  2537. */
  2538. var strats = config.optionMergeStrategies;
  2539. /**
  2540. * Options with restrictions
  2541. */
  2542. if (true) {
  2543. strats.el = strats.propsData = function (parent, child, vm, key) {
  2544. if (!vm) {
  2545. warn(
  2546. "option \"" + key + "\" can only be used during instance " +
  2547. 'creation with the `new` keyword.'
  2548. );
  2549. }
  2550. return defaultStrat(parent, child)
  2551. };
  2552. }
  2553. /**
  2554. * Helper that recursively merges two data objects together.
  2555. */
  2556. function mergeData (to, from) {
  2557. if (!from) { return to }
  2558. var key, toVal, fromVal;
  2559. var keys = hasSymbol
  2560. ? Reflect.ownKeys(from)
  2561. : Object.keys(from);
  2562. for (var i = 0; i < keys.length; i++) {
  2563. key = keys[i];
  2564. // in case the object is already observed...
  2565. if (key === '__ob__') { continue }
  2566. toVal = to[key];
  2567. fromVal = from[key];
  2568. if (!hasOwn(to, key)) {
  2569. set(to, key, fromVal);
  2570. } else if (
  2571. toVal !== fromVal &&
  2572. isPlainObject(toVal) &&
  2573. isPlainObject(fromVal)
  2574. ) {
  2575. mergeData(toVal, fromVal);
  2576. }
  2577. }
  2578. return to
  2579. }
  2580. /**
  2581. * Data
  2582. */
  2583. function mergeDataOrFn (
  2584. parentVal,
  2585. childVal,
  2586. vm
  2587. ) {
  2588. if (!vm) {
  2589. // in a Vue.extend merge, both should be functions
  2590. if (!childVal) {
  2591. return parentVal
  2592. }
  2593. if (!parentVal) {
  2594. return childVal
  2595. }
  2596. // when parentVal & childVal are both present,
  2597. // we need to return a function that returns the
  2598. // merged result of both functions... no need to
  2599. // check if parentVal is a function here because
  2600. // it has to be a function to pass previous merges.
  2601. return function mergedDataFn () {
  2602. return mergeData(
  2603. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  2604. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  2605. )
  2606. }
  2607. } else {
  2608. return function mergedInstanceDataFn () {
  2609. // instance merge
  2610. var instanceData = typeof childVal === 'function'
  2611. ? childVal.call(vm, vm)
  2612. : childVal;
  2613. var defaultData = typeof parentVal === 'function'
  2614. ? parentVal.call(vm, vm)
  2615. : parentVal;
  2616. if (instanceData) {
  2617. return mergeData(instanceData, defaultData)
  2618. } else {
  2619. return defaultData
  2620. }
  2621. }
  2622. }
  2623. }
  2624. strats.data = function (
  2625. parentVal,
  2626. childVal,
  2627. vm
  2628. ) {
  2629. if (!vm) {
  2630. if (childVal && typeof childVal !== 'function') {
  2631. true && warn(
  2632. 'The "data" option should be a function ' +
  2633. 'that returns a per-instance value in component ' +
  2634. 'definitions.',
  2635. vm
  2636. );
  2637. return parentVal
  2638. }
  2639. return mergeDataOrFn(parentVal, childVal)
  2640. }
  2641. return mergeDataOrFn(parentVal, childVal, vm)
  2642. };
  2643. /**
  2644. * Hooks and props are merged as arrays.
  2645. */
  2646. function mergeHook (
  2647. parentVal,
  2648. childVal
  2649. ) {
  2650. var res = childVal
  2651. ? parentVal
  2652. ? parentVal.concat(childVal)
  2653. : Array.isArray(childVal)
  2654. ? childVal
  2655. : [childVal]
  2656. : parentVal;
  2657. return res
  2658. ? dedupeHooks(res)
  2659. : res
  2660. }
  2661. function dedupeHooks (hooks) {
  2662. var res = [];
  2663. for (var i = 0; i < hooks.length; i++) {
  2664. if (res.indexOf(hooks[i]) === -1) {
  2665. res.push(hooks[i]);
  2666. }
  2667. }
  2668. return res
  2669. }
  2670. LIFECYCLE_HOOKS.forEach(function (hook) {
  2671. strats[hook] = mergeHook;
  2672. });
  2673. /**
  2674. * Assets
  2675. *
  2676. * When a vm is present (instance creation), we need to do
  2677. * a three-way merge between constructor options, instance
  2678. * options and parent options.
  2679. */
  2680. function mergeAssets (
  2681. parentVal,
  2682. childVal,
  2683. vm,
  2684. key
  2685. ) {
  2686. var res = Object.create(parentVal || null);
  2687. if (childVal) {
  2688. true && assertObjectType(key, childVal, vm);
  2689. return extend(res, childVal)
  2690. } else {
  2691. return res
  2692. }
  2693. }
  2694. ASSET_TYPES.forEach(function (type) {
  2695. strats[type + 's'] = mergeAssets;
  2696. });
  2697. /**
  2698. * Watchers.
  2699. *
  2700. * Watchers hashes should not overwrite one
  2701. * another, so we merge them as arrays.
  2702. */
  2703. strats.watch = function (
  2704. parentVal,
  2705. childVal,
  2706. vm,
  2707. key
  2708. ) {
  2709. // work around Firefox's Object.prototype.watch...
  2710. if (parentVal === nativeWatch) { parentVal = undefined; }
  2711. if (childVal === nativeWatch) { childVal = undefined; }
  2712. /* istanbul ignore if */
  2713. if (!childVal) { return Object.create(parentVal || null) }
  2714. if (true) {
  2715. assertObjectType(key, childVal, vm);
  2716. }
  2717. if (!parentVal) { return childVal }
  2718. var ret = {};
  2719. extend(ret, parentVal);
  2720. for (var key$1 in childVal) {
  2721. var parent = ret[key$1];
  2722. var child = childVal[key$1];
  2723. if (parent && !Array.isArray(parent)) {
  2724. parent = [parent];
  2725. }
  2726. ret[key$1] = parent
  2727. ? parent.concat(child)
  2728. : Array.isArray(child) ? child : [child];
  2729. }
  2730. return ret
  2731. };
  2732. /**
  2733. * Other object hashes.
  2734. */
  2735. strats.props =
  2736. strats.methods =
  2737. strats.inject =
  2738. strats.computed = function (
  2739. parentVal,
  2740. childVal,
  2741. vm,
  2742. key
  2743. ) {
  2744. if (childVal && "development" !== 'production') {
  2745. assertObjectType(key, childVal, vm);
  2746. }
  2747. if (!parentVal) { return childVal }
  2748. var ret = Object.create(null);
  2749. extend(ret, parentVal);
  2750. if (childVal) { extend(ret, childVal); }
  2751. return ret
  2752. };
  2753. strats.provide = mergeDataOrFn;
  2754. /**
  2755. * Default strategy.
  2756. */
  2757. var defaultStrat = function (parentVal, childVal) {
  2758. return childVal === undefined
  2759. ? parentVal
  2760. : childVal
  2761. };
  2762. /**
  2763. * Validate component names
  2764. */
  2765. function checkComponents (options) {
  2766. for (var key in options.components) {
  2767. validateComponentName(key);
  2768. }
  2769. }
  2770. function validateComponentName (name) {
  2771. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  2772. warn(
  2773. 'Invalid component name: "' + name + '". Component names ' +
  2774. 'should conform to valid custom element name in html5 specification.'
  2775. );
  2776. }
  2777. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  2778. warn(
  2779. 'Do not use built-in or reserved HTML elements as component ' +
  2780. 'id: ' + name
  2781. );
  2782. }
  2783. }
  2784. /**
  2785. * Ensure all props option syntax are normalized into the
  2786. * Object-based format.
  2787. */
  2788. function normalizeProps (options, vm) {
  2789. var props = options.props;
  2790. if (!props) { return }
  2791. var res = {};
  2792. var i, val, name;
  2793. if (Array.isArray(props)) {
  2794. i = props.length;
  2795. while (i--) {
  2796. val = props[i];
  2797. if (typeof val === 'string') {
  2798. name = camelize(val);
  2799. res[name] = { type: null };
  2800. } else if (true) {
  2801. warn('props must be strings when using array syntax.');
  2802. }
  2803. }
  2804. } else if (isPlainObject(props)) {
  2805. for (var key in props) {
  2806. val = props[key];
  2807. name = camelize(key);
  2808. res[name] = isPlainObject(val)
  2809. ? val
  2810. : { type: val };
  2811. }
  2812. } else if (true) {
  2813. warn(
  2814. "Invalid value for option \"props\": expected an Array or an Object, " +
  2815. "but got " + (toRawType(props)) + ".",
  2816. vm
  2817. );
  2818. }
  2819. options.props = res;
  2820. }
  2821. /**
  2822. * Normalize all injections into Object-based format
  2823. */
  2824. function normalizeInject (options, vm) {
  2825. var inject = options.inject;
  2826. if (!inject) { return }
  2827. var normalized = options.inject = {};
  2828. if (Array.isArray(inject)) {
  2829. for (var i = 0; i < inject.length; i++) {
  2830. normalized[inject[i]] = { from: inject[i] };
  2831. }
  2832. } else if (isPlainObject(inject)) {
  2833. for (var key in inject) {
  2834. var val = inject[key];
  2835. normalized[key] = isPlainObject(val)
  2836. ? extend({ from: key }, val)
  2837. : { from: val };
  2838. }
  2839. } else if (true) {
  2840. warn(
  2841. "Invalid value for option \"inject\": expected an Array or an Object, " +
  2842. "but got " + (toRawType(inject)) + ".",
  2843. vm
  2844. );
  2845. }
  2846. }
  2847. /**
  2848. * Normalize raw function directives into object format.
  2849. */
  2850. function normalizeDirectives (options) {
  2851. var dirs = options.directives;
  2852. if (dirs) {
  2853. for (var key in dirs) {
  2854. var def$$1 = dirs[key];
  2855. if (typeof def$$1 === 'function') {
  2856. dirs[key] = { bind: def$$1, update: def$$1 };
  2857. }
  2858. }
  2859. }
  2860. }
  2861. function assertObjectType (name, value, vm) {
  2862. if (!isPlainObject(value)) {
  2863. warn(
  2864. "Invalid value for option \"" + name + "\": expected an Object, " +
  2865. "but got " + (toRawType(value)) + ".",
  2866. vm
  2867. );
  2868. }
  2869. }
  2870. /**
  2871. * Merge two option objects into a new one.
  2872. * Core utility used in both instantiation and inheritance.
  2873. */
  2874. function mergeOptions (
  2875. parent,
  2876. child,
  2877. vm
  2878. ) {
  2879. if (true) {
  2880. checkComponents(child);
  2881. }
  2882. if (typeof child === 'function') {
  2883. child = child.options;
  2884. }
  2885. normalizeProps(child, vm);
  2886. normalizeInject(child, vm);
  2887. normalizeDirectives(child);
  2888. // Apply extends and mixins on the child options,
  2889. // but only if it is a raw options object that isn't
  2890. // the result of another mergeOptions call.
  2891. // Only merged options has the _base property.
  2892. if (!child._base) {
  2893. if (child.extends) {
  2894. parent = mergeOptions(parent, child.extends, vm);
  2895. }
  2896. if (child.mixins) {
  2897. for (var i = 0, l = child.mixins.length; i < l; i++) {
  2898. parent = mergeOptions(parent, child.mixins[i], vm);
  2899. }
  2900. }
  2901. }
  2902. var options = {};
  2903. var key;
  2904. for (key in parent) {
  2905. mergeField(key);
  2906. }
  2907. for (key in child) {
  2908. if (!hasOwn(parent, key)) {
  2909. mergeField(key);
  2910. }
  2911. }
  2912. function mergeField (key) {
  2913. var strat = strats[key] || defaultStrat;
  2914. options[key] = strat(parent[key], child[key], vm, key);
  2915. }
  2916. return options
  2917. }
  2918. /**
  2919. * Resolve an asset.
  2920. * This function is used because child instances need access
  2921. * to assets defined in its ancestor chain.
  2922. */
  2923. function resolveAsset (
  2924. options,
  2925. type,
  2926. id,
  2927. warnMissing
  2928. ) {
  2929. /* istanbul ignore if */
  2930. if (typeof id !== 'string') {
  2931. return
  2932. }
  2933. var assets = options[type];
  2934. // check local registration variations first
  2935. if (hasOwn(assets, id)) { return assets[id] }
  2936. var camelizedId = camelize(id);
  2937. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  2938. var PascalCaseId = capitalize(camelizedId);
  2939. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  2940. // fallback to prototype chain
  2941. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  2942. if ( true && warnMissing && !res) {
  2943. warn(
  2944. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  2945. options
  2946. );
  2947. }
  2948. return res
  2949. }
  2950. /* */
  2951. function validateProp (
  2952. key,
  2953. propOptions,
  2954. propsData,
  2955. vm
  2956. ) {
  2957. var prop = propOptions[key];
  2958. var absent = !hasOwn(propsData, key);
  2959. var value = propsData[key];
  2960. // boolean casting
  2961. var booleanIndex = getTypeIndex(Boolean, prop.type);
  2962. if (booleanIndex > -1) {
  2963. if (absent && !hasOwn(prop, 'default')) {
  2964. value = false;
  2965. } else if (value === '' || value === hyphenate(key)) {
  2966. // only cast empty string / same name to boolean if
  2967. // boolean has higher priority
  2968. var stringIndex = getTypeIndex(String, prop.type);
  2969. if (stringIndex < 0 || booleanIndex < stringIndex) {
  2970. value = true;
  2971. }
  2972. }
  2973. }
  2974. // check default value
  2975. if (value === undefined) {
  2976. value = getPropDefaultValue(vm, prop, key);
  2977. // since the default value is a fresh copy,
  2978. // make sure to observe it.
  2979. var prevShouldObserve = shouldObserve;
  2980. toggleObserving(true);
  2981. observe(value);
  2982. toggleObserving(prevShouldObserve);
  2983. }
  2984. if (
  2985. true
  2986. ) {
  2987. assertProp(prop, key, value, vm, absent);
  2988. }
  2989. return value
  2990. }
  2991. /**
  2992. * Get the default value of a prop.
  2993. */
  2994. function getPropDefaultValue (vm, prop, key) {
  2995. // no default, return undefined
  2996. if (!hasOwn(prop, 'default')) {
  2997. return undefined
  2998. }
  2999. var def = prop.default;
  3000. // warn against non-factory defaults for Object & Array
  3001. if ( true && isObject(def)) {
  3002. warn(
  3003. 'Invalid default value for prop "' + key + '": ' +
  3004. 'Props with type Object/Array must use a factory function ' +
  3005. 'to return the default value.',
  3006. vm
  3007. );
  3008. }
  3009. // the raw prop value was also undefined from previous render,
  3010. // return previous default value to avoid unnecessary watcher trigger
  3011. if (vm && vm.$options.propsData &&
  3012. vm.$options.propsData[key] === undefined &&
  3013. vm._props[key] !== undefined
  3014. ) {
  3015. return vm._props[key]
  3016. }
  3017. // call factory function for non-Function types
  3018. // a value is Function if its prototype is function even across different execution context
  3019. return typeof def === 'function' && getType(prop.type) !== 'Function'
  3020. ? def.call(vm)
  3021. : def
  3022. }
  3023. /**
  3024. * Assert whether a prop is valid.
  3025. */
  3026. function assertProp (
  3027. prop,
  3028. name,
  3029. value,
  3030. vm,
  3031. absent
  3032. ) {
  3033. if (prop.required && absent) {
  3034. warn(
  3035. 'Missing required prop: "' + name + '"',
  3036. vm
  3037. );
  3038. return
  3039. }
  3040. if (value == null && !prop.required) {
  3041. return
  3042. }
  3043. var type = prop.type;
  3044. var valid = !type || type === true;
  3045. var expectedTypes = [];
  3046. if (type) {
  3047. if (!Array.isArray(type)) {
  3048. type = [type];
  3049. }
  3050. for (var i = 0; i < type.length && !valid; i++) {
  3051. var assertedType = assertType(value, type[i]);
  3052. expectedTypes.push(assertedType.expectedType || '');
  3053. valid = assertedType.valid;
  3054. }
  3055. }
  3056. if (!valid) {
  3057. warn(
  3058. getInvalidTypeMessage(name, value, expectedTypes),
  3059. vm
  3060. );
  3061. return
  3062. }
  3063. var validator = prop.validator;
  3064. if (validator) {
  3065. if (!validator(value)) {
  3066. warn(
  3067. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  3068. vm
  3069. );
  3070. }
  3071. }
  3072. }
  3073. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  3074. function assertType (value, type) {
  3075. var valid;
  3076. var expectedType = getType(type);
  3077. if (simpleCheckRE.test(expectedType)) {
  3078. var t = typeof value;
  3079. valid = t === expectedType.toLowerCase();
  3080. // for primitive wrapper objects
  3081. if (!valid && t === 'object') {
  3082. valid = value instanceof type;
  3083. }
  3084. } else if (expectedType === 'Object') {
  3085. valid = isPlainObject(value);
  3086. } else if (expectedType === 'Array') {
  3087. valid = Array.isArray(value);
  3088. } else {
  3089. valid = value instanceof type;
  3090. }
  3091. return {
  3092. valid: valid,
  3093. expectedType: expectedType
  3094. }
  3095. }
  3096. /**
  3097. * Use function string name to check built-in types,
  3098. * because a simple equality check will fail when running
  3099. * across different vms / iframes.
  3100. */
  3101. function getType (fn) {
  3102. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  3103. return match ? match[1] : ''
  3104. }
  3105. function isSameType (a, b) {
  3106. return getType(a) === getType(b)
  3107. }
  3108. function getTypeIndex (type, expectedTypes) {
  3109. if (!Array.isArray(expectedTypes)) {
  3110. return isSameType(expectedTypes, type) ? 0 : -1
  3111. }
  3112. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  3113. if (isSameType(expectedTypes[i], type)) {
  3114. return i
  3115. }
  3116. }
  3117. return -1
  3118. }
  3119. function getInvalidTypeMessage (name, value, expectedTypes) {
  3120. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  3121. " Expected " + (expectedTypes.map(capitalize).join(', '));
  3122. var expectedType = expectedTypes[0];
  3123. var receivedType = toRawType(value);
  3124. var expectedValue = styleValue(value, expectedType);
  3125. var receivedValue = styleValue(value, receivedType);
  3126. // check if we need to specify expected value
  3127. if (expectedTypes.length === 1 &&
  3128. isExplicable(expectedType) &&
  3129. !isBoolean(expectedType, receivedType)) {
  3130. message += " with value " + expectedValue;
  3131. }
  3132. message += ", got " + receivedType + " ";
  3133. // check if we need to specify received value
  3134. if (isExplicable(receivedType)) {
  3135. message += "with value " + receivedValue + ".";
  3136. }
  3137. return message
  3138. }
  3139. function styleValue (value, type) {
  3140. if (type === 'String') {
  3141. return ("\"" + value + "\"")
  3142. } else if (type === 'Number') {
  3143. return ("" + (Number(value)))
  3144. } else {
  3145. return ("" + value)
  3146. }
  3147. }
  3148. function isExplicable (value) {
  3149. var explicitTypes = ['string', 'number', 'boolean'];
  3150. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  3151. }
  3152. function isBoolean () {
  3153. var args = [], len = arguments.length;
  3154. while ( len-- ) args[ len ] = arguments[ len ];
  3155. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  3156. }
  3157. /* */
  3158. function handleError (err, vm, info) {
  3159. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  3160. // See: https://github.com/vuejs/vuex/issues/1505
  3161. pushTarget();
  3162. try {
  3163. if (vm) {
  3164. var cur = vm;
  3165. while ((cur = cur.$parent)) {
  3166. var hooks = cur.$options.errorCaptured;
  3167. if (hooks) {
  3168. for (var i = 0; i < hooks.length; i++) {
  3169. try {
  3170. var capture = hooks[i].call(cur, err, vm, info) === false;
  3171. if (capture) { return }
  3172. } catch (e) {
  3173. globalHandleError(e, cur, 'errorCaptured hook');
  3174. }
  3175. }
  3176. }
  3177. }
  3178. }
  3179. globalHandleError(err, vm, info);
  3180. } finally {
  3181. popTarget();
  3182. }
  3183. }
  3184. function invokeWithErrorHandling (
  3185. handler,
  3186. context,
  3187. args,
  3188. vm,
  3189. info
  3190. ) {
  3191. var res;
  3192. try {
  3193. res = args ? handler.apply(context, args) : handler.call(context);
  3194. if (res && !res._isVue && isPromise(res) && !res._handled) {
  3195. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  3196. // issue #9511
  3197. // avoid catch triggering multiple times when nested calls
  3198. res._handled = true;
  3199. }
  3200. } catch (e) {
  3201. handleError(e, vm, info);
  3202. }
  3203. return res
  3204. }
  3205. function globalHandleError (err, vm, info) {
  3206. if (config.errorHandler) {
  3207. try {
  3208. return config.errorHandler.call(null, err, vm, info)
  3209. } catch (e) {
  3210. // if the user intentionally throws the original error in the handler,
  3211. // do not log it twice
  3212. if (e !== err) {
  3213. logError(e, null, 'config.errorHandler');
  3214. }
  3215. }
  3216. }
  3217. logError(err, vm, info);
  3218. }
  3219. function logError (err, vm, info) {
  3220. if (true) {
  3221. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  3222. }
  3223. /* istanbul ignore else */
  3224. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  3225. console.error(err);
  3226. } else {
  3227. throw err
  3228. }
  3229. }
  3230. /* */
  3231. var callbacks = [];
  3232. var pending = false;
  3233. function flushCallbacks () {
  3234. pending = false;
  3235. var copies = callbacks.slice(0);
  3236. callbacks.length = 0;
  3237. for (var i = 0; i < copies.length; i++) {
  3238. copies[i]();
  3239. }
  3240. }
  3241. // Here we have async deferring wrappers using microtasks.
  3242. // In 2.5 we used (macro) tasks (in combination with microtasks).
  3243. // However, it has subtle problems when state is changed right before repaint
  3244. // (e.g. #6813, out-in transitions).
  3245. // Also, using (macro) tasks in event handler would cause some weird behaviors
  3246. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  3247. // So we now use microtasks everywhere, again.
  3248. // A major drawback of this tradeoff is that there are some scenarios
  3249. // where microtasks have too high a priority and fire in between supposedly
  3250. // sequential events (e.g. #4521, #6690, which have workarounds)
  3251. // or even between bubbling of the same event (#6566).
  3252. var timerFunc;
  3253. // The nextTick behavior leverages the microtask queue, which can be accessed
  3254. // via either native Promise.then or MutationObserver.
  3255. // MutationObserver has wider support, however it is seriously bugged in
  3256. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  3257. // completely stops working after triggering a few times... so, if native
  3258. // Promise is available, we will use it:
  3259. /* istanbul ignore next, $flow-disable-line */
  3260. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  3261. var p = Promise.resolve();
  3262. timerFunc = function () {
  3263. p.then(flushCallbacks);
  3264. // In problematic UIWebViews, Promise.then doesn't completely break, but
  3265. // it can get stuck in a weird state where callbacks are pushed into the
  3266. // microtask queue but the queue isn't being flushed, until the browser
  3267. // needs to do some other work, e.g. handle a timer. Therefore we can
  3268. // "force" the microtask queue to be flushed by adding an empty timer.
  3269. if (isIOS) { setTimeout(noop); }
  3270. };
  3271. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  3272. isNative(MutationObserver) ||
  3273. // PhantomJS and iOS 7.x
  3274. MutationObserver.toString() === '[object MutationObserverConstructor]'
  3275. )) {
  3276. // Use MutationObserver where native Promise is not available,
  3277. // e.g. PhantomJS, iOS7, Android 4.4
  3278. // (#6466 MutationObserver is unreliable in IE11)
  3279. var counter = 1;
  3280. var observer = new MutationObserver(flushCallbacks);
  3281. var textNode = document.createTextNode(String(counter));
  3282. observer.observe(textNode, {
  3283. characterData: true
  3284. });
  3285. timerFunc = function () {
  3286. counter = (counter + 1) % 2;
  3287. textNode.data = String(counter);
  3288. };
  3289. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  3290. // Fallback to setImmediate.
  3291. // Technically it leverages the (macro) task queue,
  3292. // but it is still a better choice than setTimeout.
  3293. timerFunc = function () {
  3294. setImmediate(flushCallbacks);
  3295. };
  3296. } else {
  3297. // Fallback to setTimeout.
  3298. timerFunc = function () {
  3299. setTimeout(flushCallbacks, 0);
  3300. };
  3301. }
  3302. function nextTick (cb, ctx) {
  3303. var _resolve;
  3304. callbacks.push(function () {
  3305. if (cb) {
  3306. try {
  3307. cb.call(ctx);
  3308. } catch (e) {
  3309. handleError(e, ctx, 'nextTick');
  3310. }
  3311. } else if (_resolve) {
  3312. _resolve(ctx);
  3313. }
  3314. });
  3315. if (!pending) {
  3316. pending = true;
  3317. timerFunc();
  3318. }
  3319. // $flow-disable-line
  3320. if (!cb && typeof Promise !== 'undefined') {
  3321. return new Promise(function (resolve) {
  3322. _resolve = resolve;
  3323. })
  3324. }
  3325. }
  3326. /* */
  3327. /* not type checking this file because flow doesn't play well with Proxy */
  3328. var initProxy;
  3329. if (true) {
  3330. var allowedGlobals = makeMap(
  3331. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  3332. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  3333. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  3334. 'require' // for Webpack/Browserify
  3335. );
  3336. var warnNonPresent = function (target, key) {
  3337. warn(
  3338. "Property or method \"" + key + "\" is not defined on the instance but " +
  3339. 'referenced during render. Make sure that this property is reactive, ' +
  3340. 'either in the data option, or for class-based components, by ' +
  3341. 'initializing the property. ' +
  3342. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  3343. target
  3344. );
  3345. };
  3346. var warnReservedPrefix = function (target, key) {
  3347. warn(
  3348. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  3349. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  3350. 'prevent conflicts with Vue internals. ' +
  3351. 'See: https://vuejs.org/v2/api/#data',
  3352. target
  3353. );
  3354. };
  3355. var hasProxy =
  3356. typeof Proxy !== 'undefined' && isNative(Proxy);
  3357. if (hasProxy) {
  3358. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  3359. config.keyCodes = new Proxy(config.keyCodes, {
  3360. set: function set (target, key, value) {
  3361. if (isBuiltInModifier(key)) {
  3362. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  3363. return false
  3364. } else {
  3365. target[key] = value;
  3366. return true
  3367. }
  3368. }
  3369. });
  3370. }
  3371. var hasHandler = {
  3372. has: function has (target, key) {
  3373. var has = key in target;
  3374. var isAllowed = allowedGlobals(key) ||
  3375. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  3376. if (!has && !isAllowed) {
  3377. if (key in target.$data) { warnReservedPrefix(target, key); }
  3378. else { warnNonPresent(target, key); }
  3379. }
  3380. return has || !isAllowed
  3381. }
  3382. };
  3383. var getHandler = {
  3384. get: function get (target, key) {
  3385. if (typeof key === 'string' && !(key in target)) {
  3386. if (key in target.$data) { warnReservedPrefix(target, key); }
  3387. else { warnNonPresent(target, key); }
  3388. }
  3389. return target[key]
  3390. }
  3391. };
  3392. initProxy = function initProxy (vm) {
  3393. if (hasProxy) {
  3394. // determine which proxy handler to use
  3395. var options = vm.$options;
  3396. var handlers = options.render && options.render._withStripped
  3397. ? getHandler
  3398. : hasHandler;
  3399. vm._renderProxy = new Proxy(vm, handlers);
  3400. } else {
  3401. vm._renderProxy = vm;
  3402. }
  3403. };
  3404. }
  3405. /* */
  3406. var seenObjects = new _Set();
  3407. /**
  3408. * Recursively traverse an object to evoke all converted
  3409. * getters, so that every nested property inside the object
  3410. * is collected as a "deep" dependency.
  3411. */
  3412. function traverse (val) {
  3413. _traverse(val, seenObjects);
  3414. seenObjects.clear();
  3415. }
  3416. function _traverse (val, seen) {
  3417. var i, keys;
  3418. var isA = Array.isArray(val);
  3419. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  3420. return
  3421. }
  3422. if (val.__ob__) {
  3423. var depId = val.__ob__.dep.id;
  3424. if (seen.has(depId)) {
  3425. return
  3426. }
  3427. seen.add(depId);
  3428. }
  3429. if (isA) {
  3430. i = val.length;
  3431. while (i--) { _traverse(val[i], seen); }
  3432. } else {
  3433. keys = Object.keys(val);
  3434. i = keys.length;
  3435. while (i--) { _traverse(val[keys[i]], seen); }
  3436. }
  3437. }
  3438. var mark;
  3439. var measure;
  3440. if (true) {
  3441. var perf = inBrowser && window.performance;
  3442. /* istanbul ignore if */
  3443. if (
  3444. perf &&
  3445. perf.mark &&
  3446. perf.measure &&
  3447. perf.clearMarks &&
  3448. perf.clearMeasures
  3449. ) {
  3450. mark = function (tag) { return perf.mark(tag); };
  3451. measure = function (name, startTag, endTag) {
  3452. perf.measure(name, startTag, endTag);
  3453. perf.clearMarks(startTag);
  3454. perf.clearMarks(endTag);
  3455. // perf.clearMeasures(name)
  3456. };
  3457. }
  3458. }
  3459. /* */
  3460. var normalizeEvent = cached(function (name) {
  3461. var passive = name.charAt(0) === '&';
  3462. name = passive ? name.slice(1) : name;
  3463. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  3464. name = once$$1 ? name.slice(1) : name;
  3465. var capture = name.charAt(0) === '!';
  3466. name = capture ? name.slice(1) : name;
  3467. return {
  3468. name: name,
  3469. once: once$$1,
  3470. capture: capture,
  3471. passive: passive
  3472. }
  3473. });
  3474. function createFnInvoker (fns, vm) {
  3475. function invoker () {
  3476. var arguments$1 = arguments;
  3477. var fns = invoker.fns;
  3478. if (Array.isArray(fns)) {
  3479. var cloned = fns.slice();
  3480. for (var i = 0; i < cloned.length; i++) {
  3481. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  3482. }
  3483. } else {
  3484. // return handler return value for single handlers
  3485. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  3486. }
  3487. }
  3488. invoker.fns = fns;
  3489. return invoker
  3490. }
  3491. function updateListeners (
  3492. on,
  3493. oldOn,
  3494. add,
  3495. remove$$1,
  3496. createOnceHandler,
  3497. vm
  3498. ) {
  3499. var name, def$$1, cur, old, event;
  3500. for (name in on) {
  3501. def$$1 = cur = on[name];
  3502. old = oldOn[name];
  3503. event = normalizeEvent(name);
  3504. if (isUndef(cur)) {
  3505. true && warn(
  3506. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  3507. vm
  3508. );
  3509. } else if (isUndef(old)) {
  3510. if (isUndef(cur.fns)) {
  3511. cur = on[name] = createFnInvoker(cur, vm);
  3512. }
  3513. if (isTrue(event.once)) {
  3514. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  3515. }
  3516. add(event.name, cur, event.capture, event.passive, event.params);
  3517. } else if (cur !== old) {
  3518. old.fns = cur;
  3519. on[name] = old;
  3520. }
  3521. }
  3522. for (name in oldOn) {
  3523. if (isUndef(on[name])) {
  3524. event = normalizeEvent(name);
  3525. remove$$1(event.name, oldOn[name], event.capture);
  3526. }
  3527. }
  3528. }
  3529. /* */
  3530. /* */
  3531. // fixed by xxxxxx (mp properties)
  3532. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  3533. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  3534. if (isUndef(propOptions)) {
  3535. return res
  3536. }
  3537. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  3538. var attrs = data.attrs;
  3539. var props = data.props;
  3540. if (isDef(attrs) || isDef(props)) {
  3541. for (var key in propOptions) {
  3542. var altKey = hyphenate(key);
  3543. var result = checkProp(res, props, key, altKey, true) ||
  3544. checkProp(res, attrs, key, altKey, false);
  3545. // externalClass
  3546. if (
  3547. result &&
  3548. res[key] &&
  3549. externalClasses.indexOf(altKey) !== -1 &&
  3550. context[camelize(res[key])]
  3551. ) {
  3552. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  3553. res[key] = context[camelize(res[key])];
  3554. }
  3555. }
  3556. }
  3557. return res
  3558. }
  3559. function extractPropsFromVNodeData (
  3560. data,
  3561. Ctor,
  3562. tag,
  3563. context// fixed by xxxxxx
  3564. ) {
  3565. // we are only extracting raw values here.
  3566. // validation and default values are handled in the child
  3567. // component itself.
  3568. var propOptions = Ctor.options.props;
  3569. if (isUndef(propOptions)) {
  3570. // fixed by xxxxxx
  3571. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  3572. }
  3573. var res = {};
  3574. var attrs = data.attrs;
  3575. var props = data.props;
  3576. if (isDef(attrs) || isDef(props)) {
  3577. for (var key in propOptions) {
  3578. var altKey = hyphenate(key);
  3579. if (true) {
  3580. var keyInLowerCase = key.toLowerCase();
  3581. if (
  3582. key !== keyInLowerCase &&
  3583. attrs && hasOwn(attrs, keyInLowerCase)
  3584. ) {
  3585. tip(
  3586. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  3587. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  3588. " \"" + key + "\". " +
  3589. "Note that HTML attributes are case-insensitive and camelCased " +
  3590. "props need to use their kebab-case equivalents when using in-DOM " +
  3591. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  3592. );
  3593. }
  3594. }
  3595. checkProp(res, props, key, altKey, true) ||
  3596. checkProp(res, attrs, key, altKey, false);
  3597. }
  3598. }
  3599. // fixed by xxxxxx
  3600. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  3601. }
  3602. function checkProp (
  3603. res,
  3604. hash,
  3605. key,
  3606. altKey,
  3607. preserve
  3608. ) {
  3609. if (isDef(hash)) {
  3610. if (hasOwn(hash, key)) {
  3611. res[key] = hash[key];
  3612. if (!preserve) {
  3613. delete hash[key];
  3614. }
  3615. return true
  3616. } else if (hasOwn(hash, altKey)) {
  3617. res[key] = hash[altKey];
  3618. if (!preserve) {
  3619. delete hash[altKey];
  3620. }
  3621. return true
  3622. }
  3623. }
  3624. return false
  3625. }
  3626. /* */
  3627. // The template compiler attempts to minimize the need for normalization by
  3628. // statically analyzing the template at compile time.
  3629. //
  3630. // For plain HTML markup, normalization can be completely skipped because the
  3631. // generated render function is guaranteed to return Array<VNode>. There are
  3632. // two cases where extra normalization is needed:
  3633. // 1. When the children contains components - because a functional component
  3634. // may return an Array instead of a single root. In this case, just a simple
  3635. // normalization is needed - if any child is an Array, we flatten the whole
  3636. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  3637. // because functional components already normalize their own children.
  3638. function simpleNormalizeChildren (children) {
  3639. for (var i = 0; i < children.length; i++) {
  3640. if (Array.isArray(children[i])) {
  3641. return Array.prototype.concat.apply([], children)
  3642. }
  3643. }
  3644. return children
  3645. }
  3646. // 2. When the children contains constructs that always generated nested Arrays,
  3647. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  3648. // with hand-written render functions / JSX. In such cases a full normalization
  3649. // is needed to cater to all possible types of children values.
  3650. function normalizeChildren (children) {
  3651. return isPrimitive(children)
  3652. ? [createTextVNode(children)]
  3653. : Array.isArray(children)
  3654. ? normalizeArrayChildren(children)
  3655. : undefined
  3656. }
  3657. function isTextNode (node) {
  3658. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  3659. }
  3660. function normalizeArrayChildren (children, nestedIndex) {
  3661. var res = [];
  3662. var i, c, lastIndex, last;
  3663. for (i = 0; i < children.length; i++) {
  3664. c = children[i];
  3665. if (isUndef(c) || typeof c === 'boolean') { continue }
  3666. lastIndex = res.length - 1;
  3667. last = res[lastIndex];
  3668. // nested
  3669. if (Array.isArray(c)) {
  3670. if (c.length > 0) {
  3671. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  3672. // merge adjacent text nodes
  3673. if (isTextNode(c[0]) && isTextNode(last)) {
  3674. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  3675. c.shift();
  3676. }
  3677. res.push.apply(res, c);
  3678. }
  3679. } else if (isPrimitive(c)) {
  3680. if (isTextNode(last)) {
  3681. // merge adjacent text nodes
  3682. // this is necessary for SSR hydration because text nodes are
  3683. // essentially merged when rendered to HTML strings
  3684. res[lastIndex] = createTextVNode(last.text + c);
  3685. } else if (c !== '') {
  3686. // convert primitive to vnode
  3687. res.push(createTextVNode(c));
  3688. }
  3689. } else {
  3690. if (isTextNode(c) && isTextNode(last)) {
  3691. // merge adjacent text nodes
  3692. res[lastIndex] = createTextVNode(last.text + c.text);
  3693. } else {
  3694. // default key for nested array children (likely generated by v-for)
  3695. if (isTrue(children._isVList) &&
  3696. isDef(c.tag) &&
  3697. isUndef(c.key) &&
  3698. isDef(nestedIndex)) {
  3699. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  3700. }
  3701. res.push(c);
  3702. }
  3703. }
  3704. }
  3705. return res
  3706. }
  3707. /* */
  3708. function initProvide (vm) {
  3709. var provide = vm.$options.provide;
  3710. if (provide) {
  3711. vm._provided = typeof provide === 'function'
  3712. ? provide.call(vm)
  3713. : provide;
  3714. }
  3715. }
  3716. function initInjections (vm) {
  3717. var result = resolveInject(vm.$options.inject, vm);
  3718. if (result) {
  3719. toggleObserving(false);
  3720. Object.keys(result).forEach(function (key) {
  3721. /* istanbul ignore else */
  3722. if (true) {
  3723. defineReactive$$1(vm, key, result[key], function () {
  3724. warn(
  3725. "Avoid mutating an injected value directly since the changes will be " +
  3726. "overwritten whenever the provided component re-renders. " +
  3727. "injection being mutated: \"" + key + "\"",
  3728. vm
  3729. );
  3730. });
  3731. } else {}
  3732. });
  3733. toggleObserving(true);
  3734. }
  3735. }
  3736. function resolveInject (inject, vm) {
  3737. if (inject) {
  3738. // inject is :any because flow is not smart enough to figure out cached
  3739. var result = Object.create(null);
  3740. var keys = hasSymbol
  3741. ? Reflect.ownKeys(inject)
  3742. : Object.keys(inject);
  3743. for (var i = 0; i < keys.length; i++) {
  3744. var key = keys[i];
  3745. // #6574 in case the inject object is observed...
  3746. if (key === '__ob__') { continue }
  3747. var provideKey = inject[key].from;
  3748. var source = vm;
  3749. while (source) {
  3750. if (source._provided && hasOwn(source._provided, provideKey)) {
  3751. result[key] = source._provided[provideKey];
  3752. break
  3753. }
  3754. source = source.$parent;
  3755. }
  3756. if (!source) {
  3757. if ('default' in inject[key]) {
  3758. var provideDefault = inject[key].default;
  3759. result[key] = typeof provideDefault === 'function'
  3760. ? provideDefault.call(vm)
  3761. : provideDefault;
  3762. } else if (true) {
  3763. warn(("Injection \"" + key + "\" not found"), vm);
  3764. }
  3765. }
  3766. }
  3767. return result
  3768. }
  3769. }
  3770. /* */
  3771. /**
  3772. * Runtime helper for resolving raw children VNodes into a slot object.
  3773. */
  3774. function resolveSlots (
  3775. children,
  3776. context
  3777. ) {
  3778. if (!children || !children.length) {
  3779. return {}
  3780. }
  3781. var slots = {};
  3782. for (var i = 0, l = children.length; i < l; i++) {
  3783. var child = children[i];
  3784. var data = child.data;
  3785. // remove slot attribute if the node is resolved as a Vue slot node
  3786. if (data && data.attrs && data.attrs.slot) {
  3787. delete data.attrs.slot;
  3788. }
  3789. // named slots should only be respected if the vnode was rendered in the
  3790. // same context.
  3791. if ((child.context === context || child.fnContext === context) &&
  3792. data && data.slot != null
  3793. ) {
  3794. var name = data.slot;
  3795. var slot = (slots[name] || (slots[name] = []));
  3796. if (child.tag === 'template') {
  3797. slot.push.apply(slot, child.children || []);
  3798. } else {
  3799. slot.push(child);
  3800. }
  3801. } else {
  3802. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  3803. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  3804. (slots['page'] || (slots['page'] = [])).push(child);
  3805. }else{
  3806. (slots.default || (slots.default = [])).push(child);
  3807. }
  3808. }
  3809. }
  3810. // ignore slots that contains only whitespace
  3811. for (var name$1 in slots) {
  3812. if (slots[name$1].every(isWhitespace)) {
  3813. delete slots[name$1];
  3814. }
  3815. }
  3816. return slots
  3817. }
  3818. function isWhitespace (node) {
  3819. return (node.isComment && !node.asyncFactory) || node.text === ' '
  3820. }
  3821. /* */
  3822. function normalizeScopedSlots (
  3823. slots,
  3824. normalSlots,
  3825. prevSlots
  3826. ) {
  3827. var res;
  3828. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  3829. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  3830. var key = slots && slots.$key;
  3831. if (!slots) {
  3832. res = {};
  3833. } else if (slots._normalized) {
  3834. // fast path 1: child component re-render only, parent did not change
  3835. return slots._normalized
  3836. } else if (
  3837. isStable &&
  3838. prevSlots &&
  3839. prevSlots !== emptyObject &&
  3840. key === prevSlots.$key &&
  3841. !hasNormalSlots &&
  3842. !prevSlots.$hasNormal
  3843. ) {
  3844. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  3845. // only need to normalize once
  3846. return prevSlots
  3847. } else {
  3848. res = {};
  3849. for (var key$1 in slots) {
  3850. if (slots[key$1] && key$1[0] !== '$') {
  3851. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  3852. }
  3853. }
  3854. }
  3855. // expose normal slots on scopedSlots
  3856. for (var key$2 in normalSlots) {
  3857. if (!(key$2 in res)) {
  3858. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  3859. }
  3860. }
  3861. // avoriaz seems to mock a non-extensible $scopedSlots object
  3862. // and when that is passed down this would cause an error
  3863. if (slots && Object.isExtensible(slots)) {
  3864. (slots)._normalized = res;
  3865. }
  3866. def(res, '$stable', isStable);
  3867. def(res, '$key', key);
  3868. def(res, '$hasNormal', hasNormalSlots);
  3869. return res
  3870. }
  3871. function normalizeScopedSlot(normalSlots, key, fn) {
  3872. var normalized = function () {
  3873. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  3874. res = res && typeof res === 'object' && !Array.isArray(res)
  3875. ? [res] // single vnode
  3876. : normalizeChildren(res);
  3877. return res && (
  3878. res.length === 0 ||
  3879. (res.length === 1 && res[0].isComment) // #9658
  3880. ) ? undefined
  3881. : res
  3882. };
  3883. // this is a slot using the new v-slot syntax without scope. although it is
  3884. // compiled as a scoped slot, render fn users would expect it to be present
  3885. // on this.$slots because the usage is semantically a normal slot.
  3886. if (fn.proxy) {
  3887. Object.defineProperty(normalSlots, key, {
  3888. get: normalized,
  3889. enumerable: true,
  3890. configurable: true
  3891. });
  3892. }
  3893. return normalized
  3894. }
  3895. function proxyNormalSlot(slots, key) {
  3896. return function () { return slots[key]; }
  3897. }
  3898. /* */
  3899. /**
  3900. * Runtime helper for rendering v-for lists.
  3901. */
  3902. function renderList (
  3903. val,
  3904. render
  3905. ) {
  3906. var ret, i, l, keys, key;
  3907. if (Array.isArray(val) || typeof val === 'string') {
  3908. ret = new Array(val.length);
  3909. for (i = 0, l = val.length; i < l; i++) {
  3910. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  3911. }
  3912. } else if (typeof val === 'number') {
  3913. ret = new Array(val);
  3914. for (i = 0; i < val; i++) {
  3915. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  3916. }
  3917. } else if (isObject(val)) {
  3918. if (hasSymbol && val[Symbol.iterator]) {
  3919. ret = [];
  3920. var iterator = val[Symbol.iterator]();
  3921. var result = iterator.next();
  3922. while (!result.done) {
  3923. ret.push(render(result.value, ret.length, i++, i)); // fixed by xxxxxx
  3924. result = iterator.next();
  3925. }
  3926. } else {
  3927. keys = Object.keys(val);
  3928. ret = new Array(keys.length);
  3929. for (i = 0, l = keys.length; i < l; i++) {
  3930. key = keys[i];
  3931. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  3932. }
  3933. }
  3934. }
  3935. if (!isDef(ret)) {
  3936. ret = [];
  3937. }
  3938. (ret)._isVList = true;
  3939. return ret
  3940. }
  3941. /* */
  3942. /**
  3943. * Runtime helper for rendering <slot>
  3944. */
  3945. function renderSlot (
  3946. name,
  3947. fallback,
  3948. props,
  3949. bindObject
  3950. ) {
  3951. var scopedSlotFn = this.$scopedSlots[name];
  3952. var nodes;
  3953. if (scopedSlotFn) { // scoped slot
  3954. props = props || {};
  3955. if (bindObject) {
  3956. if ( true && !isObject(bindObject)) {
  3957. warn(
  3958. 'slot v-bind without argument expects an Object',
  3959. this
  3960. );
  3961. }
  3962. props = extend(extend({}, bindObject), props);
  3963. }
  3964. // fixed by xxxxxx app-plus scopedSlot
  3965. nodes = scopedSlotFn(props, this, props._i) || fallback;
  3966. } else {
  3967. nodes = this.$slots[name] || fallback;
  3968. }
  3969. var target = props && props.slot;
  3970. if (target) {
  3971. return this.$createElement('template', { slot: target }, nodes)
  3972. } else {
  3973. return nodes
  3974. }
  3975. }
  3976. /* */
  3977. /**
  3978. * Runtime helper for resolving filters
  3979. */
  3980. function resolveFilter (id) {
  3981. return resolveAsset(this.$options, 'filters', id, true) || identity
  3982. }
  3983. /* */
  3984. function isKeyNotMatch (expect, actual) {
  3985. if (Array.isArray(expect)) {
  3986. return expect.indexOf(actual) === -1
  3987. } else {
  3988. return expect !== actual
  3989. }
  3990. }
  3991. /**
  3992. * Runtime helper for checking keyCodes from config.
  3993. * exposed as Vue.prototype._k
  3994. * passing in eventKeyName as last argument separately for backwards compat
  3995. */
  3996. function checkKeyCodes (
  3997. eventKeyCode,
  3998. key,
  3999. builtInKeyCode,
  4000. eventKeyName,
  4001. builtInKeyName
  4002. ) {
  4003. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  4004. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  4005. return isKeyNotMatch(builtInKeyName, eventKeyName)
  4006. } else if (mappedKeyCode) {
  4007. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  4008. } else if (eventKeyName) {
  4009. return hyphenate(eventKeyName) !== key
  4010. }
  4011. }
  4012. /* */
  4013. /**
  4014. * Runtime helper for merging v-bind="object" into a VNode's data.
  4015. */
  4016. function bindObjectProps (
  4017. data,
  4018. tag,
  4019. value,
  4020. asProp,
  4021. isSync
  4022. ) {
  4023. if (value) {
  4024. if (!isObject(value)) {
  4025. true && warn(
  4026. 'v-bind without argument expects an Object or Array value',
  4027. this
  4028. );
  4029. } else {
  4030. if (Array.isArray(value)) {
  4031. value = toObject(value);
  4032. }
  4033. var hash;
  4034. var loop = function ( key ) {
  4035. if (
  4036. key === 'class' ||
  4037. key === 'style' ||
  4038. isReservedAttribute(key)
  4039. ) {
  4040. hash = data;
  4041. } else {
  4042. var type = data.attrs && data.attrs.type;
  4043. hash = asProp || config.mustUseProp(tag, type, key)
  4044. ? data.domProps || (data.domProps = {})
  4045. : data.attrs || (data.attrs = {});
  4046. }
  4047. var camelizedKey = camelize(key);
  4048. var hyphenatedKey = hyphenate(key);
  4049. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  4050. hash[key] = value[key];
  4051. if (isSync) {
  4052. var on = data.on || (data.on = {});
  4053. on[("update:" + key)] = function ($event) {
  4054. value[key] = $event;
  4055. };
  4056. }
  4057. }
  4058. };
  4059. for (var key in value) loop( key );
  4060. }
  4061. }
  4062. return data
  4063. }
  4064. /* */
  4065. /**
  4066. * Runtime helper for rendering static trees.
  4067. */
  4068. function renderStatic (
  4069. index,
  4070. isInFor
  4071. ) {
  4072. var cached = this._staticTrees || (this._staticTrees = []);
  4073. var tree = cached[index];
  4074. // if has already-rendered static tree and not inside v-for,
  4075. // we can reuse the same tree.
  4076. if (tree && !isInFor) {
  4077. return tree
  4078. }
  4079. // otherwise, render a fresh tree.
  4080. tree = cached[index] = this.$options.staticRenderFns[index].call(
  4081. this._renderProxy,
  4082. null,
  4083. this // for render fns generated for functional component templates
  4084. );
  4085. markStatic(tree, ("__static__" + index), false);
  4086. return tree
  4087. }
  4088. /**
  4089. * Runtime helper for v-once.
  4090. * Effectively it means marking the node as static with a unique key.
  4091. */
  4092. function markOnce (
  4093. tree,
  4094. index,
  4095. key
  4096. ) {
  4097. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  4098. return tree
  4099. }
  4100. function markStatic (
  4101. tree,
  4102. key,
  4103. isOnce
  4104. ) {
  4105. if (Array.isArray(tree)) {
  4106. for (var i = 0; i < tree.length; i++) {
  4107. if (tree[i] && typeof tree[i] !== 'string') {
  4108. markStaticNode(tree[i], (key + "_" + i), isOnce);
  4109. }
  4110. }
  4111. } else {
  4112. markStaticNode(tree, key, isOnce);
  4113. }
  4114. }
  4115. function markStaticNode (node, key, isOnce) {
  4116. node.isStatic = true;
  4117. node.key = key;
  4118. node.isOnce = isOnce;
  4119. }
  4120. /* */
  4121. function bindObjectListeners (data, value) {
  4122. if (value) {
  4123. if (!isPlainObject(value)) {
  4124. true && warn(
  4125. 'v-on without argument expects an Object value',
  4126. this
  4127. );
  4128. } else {
  4129. var on = data.on = data.on ? extend({}, data.on) : {};
  4130. for (var key in value) {
  4131. var existing = on[key];
  4132. var ours = value[key];
  4133. on[key] = existing ? [].concat(existing, ours) : ours;
  4134. }
  4135. }
  4136. }
  4137. return data
  4138. }
  4139. /* */
  4140. function resolveScopedSlots (
  4141. fns, // see flow/vnode
  4142. res,
  4143. // the following are added in 2.6
  4144. hasDynamicKeys,
  4145. contentHashKey
  4146. ) {
  4147. res = res || { $stable: !hasDynamicKeys };
  4148. for (var i = 0; i < fns.length; i++) {
  4149. var slot = fns[i];
  4150. if (Array.isArray(slot)) {
  4151. resolveScopedSlots(slot, res, hasDynamicKeys);
  4152. } else if (slot) {
  4153. // marker for reverse proxying v-slot without scope on this.$slots
  4154. if (slot.proxy) {
  4155. slot.fn.proxy = true;
  4156. }
  4157. res[slot.key] = slot.fn;
  4158. }
  4159. }
  4160. if (contentHashKey) {
  4161. (res).$key = contentHashKey;
  4162. }
  4163. return res
  4164. }
  4165. /* */
  4166. function bindDynamicKeys (baseObj, values) {
  4167. for (var i = 0; i < values.length; i += 2) {
  4168. var key = values[i];
  4169. if (typeof key === 'string' && key) {
  4170. baseObj[values[i]] = values[i + 1];
  4171. } else if ( true && key !== '' && key !== null) {
  4172. // null is a special value for explicitly removing a binding
  4173. warn(
  4174. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  4175. this
  4176. );
  4177. }
  4178. }
  4179. return baseObj
  4180. }
  4181. // helper to dynamically append modifier runtime markers to event names.
  4182. // ensure only append when value is already string, otherwise it will be cast
  4183. // to string and cause the type check to miss.
  4184. function prependModifier (value, symbol) {
  4185. return typeof value === 'string' ? symbol + value : value
  4186. }
  4187. /* */
  4188. function installRenderHelpers (target) {
  4189. target._o = markOnce;
  4190. target._n = toNumber;
  4191. target._s = toString;
  4192. target._l = renderList;
  4193. target._t = renderSlot;
  4194. target._q = looseEqual;
  4195. target._i = looseIndexOf;
  4196. target._m = renderStatic;
  4197. target._f = resolveFilter;
  4198. target._k = checkKeyCodes;
  4199. target._b = bindObjectProps;
  4200. target._v = createTextVNode;
  4201. target._e = createEmptyVNode;
  4202. target._u = resolveScopedSlots;
  4203. target._g = bindObjectListeners;
  4204. target._d = bindDynamicKeys;
  4205. target._p = prependModifier;
  4206. }
  4207. /* */
  4208. function FunctionalRenderContext (
  4209. data,
  4210. props,
  4211. children,
  4212. parent,
  4213. Ctor
  4214. ) {
  4215. var this$1 = this;
  4216. var options = Ctor.options;
  4217. // ensure the createElement function in functional components
  4218. // gets a unique context - this is necessary for correct named slot check
  4219. var contextVm;
  4220. if (hasOwn(parent, '_uid')) {
  4221. contextVm = Object.create(parent);
  4222. // $flow-disable-line
  4223. contextVm._original = parent;
  4224. } else {
  4225. // the context vm passed in is a functional context as well.
  4226. // in this case we want to make sure we are able to get a hold to the
  4227. // real context instance.
  4228. contextVm = parent;
  4229. // $flow-disable-line
  4230. parent = parent._original;
  4231. }
  4232. var isCompiled = isTrue(options._compiled);
  4233. var needNormalization = !isCompiled;
  4234. this.data = data;
  4235. this.props = props;
  4236. this.children = children;
  4237. this.parent = parent;
  4238. this.listeners = data.on || emptyObject;
  4239. this.injections = resolveInject(options.inject, parent);
  4240. this.slots = function () {
  4241. if (!this$1.$slots) {
  4242. normalizeScopedSlots(
  4243. data.scopedSlots,
  4244. this$1.$slots = resolveSlots(children, parent)
  4245. );
  4246. }
  4247. return this$1.$slots
  4248. };
  4249. Object.defineProperty(this, 'scopedSlots', ({
  4250. enumerable: true,
  4251. get: function get () {
  4252. return normalizeScopedSlots(data.scopedSlots, this.slots())
  4253. }
  4254. }));
  4255. // support for compiled functional template
  4256. if (isCompiled) {
  4257. // exposing $options for renderStatic()
  4258. this.$options = options;
  4259. // pre-resolve slots for renderSlot()
  4260. this.$slots = this.slots();
  4261. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  4262. }
  4263. if (options._scopeId) {
  4264. this._c = function (a, b, c, d) {
  4265. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  4266. if (vnode && !Array.isArray(vnode)) {
  4267. vnode.fnScopeId = options._scopeId;
  4268. vnode.fnContext = parent;
  4269. }
  4270. return vnode
  4271. };
  4272. } else {
  4273. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  4274. }
  4275. }
  4276. installRenderHelpers(FunctionalRenderContext.prototype);
  4277. function createFunctionalComponent (
  4278. Ctor,
  4279. propsData,
  4280. data,
  4281. contextVm,
  4282. children
  4283. ) {
  4284. var options = Ctor.options;
  4285. var props = {};
  4286. var propOptions = options.props;
  4287. if (isDef(propOptions)) {
  4288. for (var key in propOptions) {
  4289. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  4290. }
  4291. } else {
  4292. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  4293. if (isDef(data.props)) { mergeProps(props, data.props); }
  4294. }
  4295. var renderContext = new FunctionalRenderContext(
  4296. data,
  4297. props,
  4298. children,
  4299. contextVm,
  4300. Ctor
  4301. );
  4302. var vnode = options.render.call(null, renderContext._c, renderContext);
  4303. if (vnode instanceof VNode) {
  4304. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  4305. } else if (Array.isArray(vnode)) {
  4306. var vnodes = normalizeChildren(vnode) || [];
  4307. var res = new Array(vnodes.length);
  4308. for (var i = 0; i < vnodes.length; i++) {
  4309. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  4310. }
  4311. return res
  4312. }
  4313. }
  4314. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  4315. // #7817 clone node before setting fnContext, otherwise if the node is reused
  4316. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  4317. // that should not be matched to match.
  4318. var clone = cloneVNode(vnode);
  4319. clone.fnContext = contextVm;
  4320. clone.fnOptions = options;
  4321. if (true) {
  4322. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  4323. }
  4324. if (data.slot) {
  4325. (clone.data || (clone.data = {})).slot = data.slot;
  4326. }
  4327. return clone
  4328. }
  4329. function mergeProps (to, from) {
  4330. for (var key in from) {
  4331. to[camelize(key)] = from[key];
  4332. }
  4333. }
  4334. /* */
  4335. /* */
  4336. /* */
  4337. /* */
  4338. // inline hooks to be invoked on component VNodes during patch
  4339. var componentVNodeHooks = {
  4340. init: function init (vnode, hydrating) {
  4341. if (
  4342. vnode.componentInstance &&
  4343. !vnode.componentInstance._isDestroyed &&
  4344. vnode.data.keepAlive
  4345. ) {
  4346. // kept-alive components, treat as a patch
  4347. var mountedNode = vnode; // work around flow
  4348. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  4349. } else {
  4350. var child = vnode.componentInstance = createComponentInstanceForVnode(
  4351. vnode,
  4352. activeInstance
  4353. );
  4354. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  4355. }
  4356. },
  4357. prepatch: function prepatch (oldVnode, vnode) {
  4358. var options = vnode.componentOptions;
  4359. var child = vnode.componentInstance = oldVnode.componentInstance;
  4360. updateChildComponent(
  4361. child,
  4362. options.propsData, // updated props
  4363. options.listeners, // updated listeners
  4364. vnode, // new parent vnode
  4365. options.children // new children
  4366. );
  4367. },
  4368. insert: function insert (vnode) {
  4369. var context = vnode.context;
  4370. var componentInstance = vnode.componentInstance;
  4371. if (!componentInstance._isMounted) {
  4372. callHook(componentInstance, 'onServiceCreated');
  4373. callHook(componentInstance, 'onServiceAttached');
  4374. componentInstance._isMounted = true;
  4375. callHook(componentInstance, 'mounted');
  4376. }
  4377. if (vnode.data.keepAlive) {
  4378. if (context._isMounted) {
  4379. // vue-router#1212
  4380. // During updates, a kept-alive component's child components may
  4381. // change, so directly walking the tree here may call activated hooks
  4382. // on incorrect children. Instead we push them into a queue which will
  4383. // be processed after the whole patch process ended.
  4384. queueActivatedComponent(componentInstance);
  4385. } else {
  4386. activateChildComponent(componentInstance, true /* direct */);
  4387. }
  4388. }
  4389. },
  4390. destroy: function destroy (vnode) {
  4391. var componentInstance = vnode.componentInstance;
  4392. if (!componentInstance._isDestroyed) {
  4393. if (!vnode.data.keepAlive) {
  4394. componentInstance.$destroy();
  4395. } else {
  4396. deactivateChildComponent(componentInstance, true /* direct */);
  4397. }
  4398. }
  4399. }
  4400. };
  4401. var hooksToMerge = Object.keys(componentVNodeHooks);
  4402. function createComponent (
  4403. Ctor,
  4404. data,
  4405. context,
  4406. children,
  4407. tag
  4408. ) {
  4409. if (isUndef(Ctor)) {
  4410. return
  4411. }
  4412. var baseCtor = context.$options._base;
  4413. // plain options object: turn it into a constructor
  4414. if (isObject(Ctor)) {
  4415. Ctor = baseCtor.extend(Ctor);
  4416. }
  4417. // if at this stage it's not a constructor or an async component factory,
  4418. // reject.
  4419. if (typeof Ctor !== 'function') {
  4420. if (true) {
  4421. warn(("Invalid Component definition: " + (String(Ctor))), context);
  4422. }
  4423. return
  4424. }
  4425. // async component
  4426. var asyncFactory;
  4427. if (isUndef(Ctor.cid)) {
  4428. asyncFactory = Ctor;
  4429. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  4430. if (Ctor === undefined) {
  4431. // return a placeholder node for async component, which is rendered
  4432. // as a comment node but preserves all the raw information for the node.
  4433. // the information will be used for async server-rendering and hydration.
  4434. return createAsyncPlaceholder(
  4435. asyncFactory,
  4436. data,
  4437. context,
  4438. children,
  4439. tag
  4440. )
  4441. }
  4442. }
  4443. data = data || {};
  4444. // resolve constructor options in case global mixins are applied after
  4445. // component constructor creation
  4446. resolveConstructorOptions(Ctor);
  4447. // transform component v-model data into props & events
  4448. if (isDef(data.model)) {
  4449. transformModel(Ctor.options, data);
  4450. }
  4451. // extract props
  4452. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  4453. // functional component
  4454. if (isTrue(Ctor.options.functional)) {
  4455. return createFunctionalComponent(Ctor, propsData, data, context, children)
  4456. }
  4457. // extract listeners, since these needs to be treated as
  4458. // child component listeners instead of DOM listeners
  4459. var listeners = data.on;
  4460. // replace with listeners with .native modifier
  4461. // so it gets processed during parent component patch.
  4462. data.on = data.nativeOn;
  4463. if (isTrue(Ctor.options.abstract)) {
  4464. // abstract components do not keep anything
  4465. // other than props & listeners & slot
  4466. // work around flow
  4467. var slot = data.slot;
  4468. data = {};
  4469. if (slot) {
  4470. data.slot = slot;
  4471. }
  4472. }
  4473. // install component management hooks onto the placeholder node
  4474. installComponentHooks(data);
  4475. // return a placeholder vnode
  4476. var name = Ctor.options.name || tag;
  4477. var vnode = new VNode(
  4478. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  4479. data, undefined, undefined, undefined, context,
  4480. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  4481. asyncFactory
  4482. );
  4483. return vnode
  4484. }
  4485. function createComponentInstanceForVnode (
  4486. vnode, // we know it's MountedComponentVNode but flow doesn't
  4487. parent // activeInstance in lifecycle state
  4488. ) {
  4489. var options = {
  4490. _isComponent: true,
  4491. _parentVnode: vnode,
  4492. parent: parent
  4493. };
  4494. // check inline-template render functions
  4495. var inlineTemplate = vnode.data.inlineTemplate;
  4496. if (isDef(inlineTemplate)) {
  4497. options.render = inlineTemplate.render;
  4498. options.staticRenderFns = inlineTemplate.staticRenderFns;
  4499. }
  4500. return new vnode.componentOptions.Ctor(options)
  4501. }
  4502. function installComponentHooks (data) {
  4503. var hooks = data.hook || (data.hook = {});
  4504. for (var i = 0; i < hooksToMerge.length; i++) {
  4505. var key = hooksToMerge[i];
  4506. var existing = hooks[key];
  4507. var toMerge = componentVNodeHooks[key];
  4508. if (existing !== toMerge && !(existing && existing._merged)) {
  4509. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  4510. }
  4511. }
  4512. }
  4513. function mergeHook$1 (f1, f2) {
  4514. var merged = function (a, b) {
  4515. // flow complains about extra args which is why we use any
  4516. f1(a, b);
  4517. f2(a, b);
  4518. };
  4519. merged._merged = true;
  4520. return merged
  4521. }
  4522. // transform component v-model info (value and callback) into
  4523. // prop and event handler respectively.
  4524. function transformModel (options, data) {
  4525. var prop = (options.model && options.model.prop) || 'value';
  4526. var event = (options.model && options.model.event) || 'input'
  4527. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  4528. var on = data.on || (data.on = {});
  4529. var existing = on[event];
  4530. var callback = data.model.callback;
  4531. if (isDef(existing)) {
  4532. if (
  4533. Array.isArray(existing)
  4534. ? existing.indexOf(callback) === -1
  4535. : existing !== callback
  4536. ) {
  4537. on[event] = [callback].concat(existing);
  4538. }
  4539. } else {
  4540. on[event] = callback;
  4541. }
  4542. }
  4543. /* */
  4544. var SIMPLE_NORMALIZE = 1;
  4545. var ALWAYS_NORMALIZE = 2;
  4546. // wrapper function for providing a more flexible interface
  4547. // without getting yelled at by flow
  4548. function createElement (
  4549. context,
  4550. tag,
  4551. data,
  4552. children,
  4553. normalizationType,
  4554. alwaysNormalize
  4555. ) {
  4556. if (Array.isArray(data) || isPrimitive(data)) {
  4557. normalizationType = children;
  4558. children = data;
  4559. data = undefined;
  4560. }
  4561. if (isTrue(alwaysNormalize)) {
  4562. normalizationType = ALWAYS_NORMALIZE;
  4563. }
  4564. return _createElement(context, tag, data, children, normalizationType)
  4565. }
  4566. function _createElement (
  4567. context,
  4568. tag,
  4569. data,
  4570. children,
  4571. normalizationType
  4572. ) {
  4573. if (isDef(data) && isDef((data).__ob__)) {
  4574. true && warn(
  4575. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  4576. 'Always create fresh vnode data objects in each render!',
  4577. context
  4578. );
  4579. return createEmptyVNode()
  4580. }
  4581. // object syntax in v-bind
  4582. if (isDef(data) && isDef(data.is)) {
  4583. tag = data.is;
  4584. }
  4585. if (!tag) {
  4586. // in case of component :is set to falsy value
  4587. return createEmptyVNode()
  4588. }
  4589. // warn against non-primitive key
  4590. if ( true &&
  4591. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  4592. ) {
  4593. {
  4594. warn(
  4595. 'Avoid using non-primitive value as key, ' +
  4596. 'use string/number value instead.',
  4597. context
  4598. );
  4599. }
  4600. }
  4601. // support single function children as default scoped slot
  4602. if (Array.isArray(children) &&
  4603. typeof children[0] === 'function'
  4604. ) {
  4605. data = data || {};
  4606. data.scopedSlots = { default: children[0] };
  4607. children.length = 0;
  4608. }
  4609. if (normalizationType === ALWAYS_NORMALIZE) {
  4610. children = normalizeChildren(children);
  4611. } else if (normalizationType === SIMPLE_NORMALIZE) {
  4612. children = simpleNormalizeChildren(children);
  4613. }
  4614. var vnode, ns;
  4615. if (typeof tag === 'string') {
  4616. var Ctor;
  4617. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  4618. if (config.isReservedTag(tag)) {
  4619. // platform built-in elements
  4620. if ( true && isDef(data) && isDef(data.nativeOn)) {
  4621. warn(
  4622. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  4623. context
  4624. );
  4625. }
  4626. vnode = new VNode(
  4627. config.parsePlatformTagName(tag), data, children,
  4628. undefined, undefined, context
  4629. );
  4630. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  4631. // component
  4632. vnode = createComponent(Ctor, data, context, children, tag);
  4633. } else {
  4634. // unknown or unlisted namespaced elements
  4635. // check at runtime because it may get assigned a namespace when its
  4636. // parent normalizes children
  4637. vnode = new VNode(
  4638. tag, data, children,
  4639. undefined, undefined, context
  4640. );
  4641. }
  4642. } else {
  4643. // direct component options / constructor
  4644. vnode = createComponent(tag, data, context, children);
  4645. }
  4646. if (Array.isArray(vnode)) {
  4647. return vnode
  4648. } else if (isDef(vnode)) {
  4649. if (isDef(ns)) { applyNS(vnode, ns); }
  4650. if (isDef(data)) { registerDeepBindings(data); }
  4651. return vnode
  4652. } else {
  4653. return createEmptyVNode()
  4654. }
  4655. }
  4656. function applyNS (vnode, ns, force) {
  4657. vnode.ns = ns;
  4658. if (vnode.tag === 'foreignObject') {
  4659. // use default namespace inside foreignObject
  4660. ns = undefined;
  4661. force = true;
  4662. }
  4663. if (isDef(vnode.children)) {
  4664. for (var i = 0, l = vnode.children.length; i < l; i++) {
  4665. var child = vnode.children[i];
  4666. if (isDef(child.tag) && (
  4667. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  4668. applyNS(child, ns, force);
  4669. }
  4670. }
  4671. }
  4672. }
  4673. // ref #5318
  4674. // necessary to ensure parent re-render when deep bindings like :style and
  4675. // :class are used on slot nodes
  4676. function registerDeepBindings (data) {
  4677. if (isObject(data.style)) {
  4678. traverse(data.style);
  4679. }
  4680. if (isObject(data.class)) {
  4681. traverse(data.class);
  4682. }
  4683. }
  4684. /* */
  4685. function initRender (vm) {
  4686. vm._vnode = null; // the root of the child tree
  4687. vm._staticTrees = null; // v-once cached trees
  4688. var options = vm.$options;
  4689. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  4690. var renderContext = parentVnode && parentVnode.context;
  4691. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  4692. vm.$scopedSlots = emptyObject;
  4693. // bind the createElement fn to this instance
  4694. // so that we get proper render context inside it.
  4695. // args order: tag, data, children, normalizationType, alwaysNormalize
  4696. // internal version is used by render functions compiled from templates
  4697. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  4698. // normalization is always applied for the public version, used in
  4699. // user-written render functions.
  4700. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  4701. // $attrs & $listeners are exposed for easier HOC creation.
  4702. // they need to be reactive so that HOCs using them are always updated
  4703. var parentData = parentVnode && parentVnode.data;
  4704. /* istanbul ignore else */
  4705. if (true) {
  4706. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  4707. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  4708. }, true);
  4709. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  4710. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  4711. }, true);
  4712. } else {}
  4713. }
  4714. var currentRenderingInstance = null;
  4715. function renderMixin (Vue) {
  4716. // install runtime convenience helpers
  4717. installRenderHelpers(Vue.prototype);
  4718. Vue.prototype.$nextTick = function (fn) {
  4719. return nextTick(fn, this)
  4720. };
  4721. Vue.prototype._render = function () {
  4722. var vm = this;
  4723. var ref = vm.$options;
  4724. var render = ref.render;
  4725. var _parentVnode = ref._parentVnode;
  4726. if (_parentVnode) {
  4727. vm.$scopedSlots = normalizeScopedSlots(
  4728. _parentVnode.data.scopedSlots,
  4729. vm.$slots,
  4730. vm.$scopedSlots
  4731. );
  4732. }
  4733. // set parent vnode. this allows render functions to have access
  4734. // to the data on the placeholder node.
  4735. vm.$vnode = _parentVnode;
  4736. // render self
  4737. var vnode;
  4738. try {
  4739. // There's no need to maintain a stack because all render fns are called
  4740. // separately from one another. Nested component's render fns are called
  4741. // when parent component is patched.
  4742. currentRenderingInstance = vm;
  4743. vnode = render.call(vm._renderProxy, vm.$createElement);
  4744. } catch (e) {
  4745. handleError(e, vm, "render");
  4746. // return error render result,
  4747. // or previous vnode to prevent render error causing blank component
  4748. /* istanbul ignore else */
  4749. if ( true && vm.$options.renderError) {
  4750. try {
  4751. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  4752. } catch (e) {
  4753. handleError(e, vm, "renderError");
  4754. vnode = vm._vnode;
  4755. }
  4756. } else {
  4757. vnode = vm._vnode;
  4758. }
  4759. } finally {
  4760. currentRenderingInstance = null;
  4761. }
  4762. // if the returned array contains only a single node, allow it
  4763. if (Array.isArray(vnode) && vnode.length === 1) {
  4764. vnode = vnode[0];
  4765. }
  4766. // return empty vnode in case the render function errored out
  4767. if (!(vnode instanceof VNode)) {
  4768. if ( true && Array.isArray(vnode)) {
  4769. warn(
  4770. 'Multiple root nodes returned from render function. Render function ' +
  4771. 'should return a single root node.',
  4772. vm
  4773. );
  4774. }
  4775. vnode = createEmptyVNode();
  4776. }
  4777. // set parent
  4778. vnode.parent = _parentVnode;
  4779. return vnode
  4780. };
  4781. }
  4782. /* */
  4783. function ensureCtor (comp, base) {
  4784. if (
  4785. comp.__esModule ||
  4786. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  4787. ) {
  4788. comp = comp.default;
  4789. }
  4790. return isObject(comp)
  4791. ? base.extend(comp)
  4792. : comp
  4793. }
  4794. function createAsyncPlaceholder (
  4795. factory,
  4796. data,
  4797. context,
  4798. children,
  4799. tag
  4800. ) {
  4801. var node = createEmptyVNode();
  4802. node.asyncFactory = factory;
  4803. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  4804. return node
  4805. }
  4806. function resolveAsyncComponent (
  4807. factory,
  4808. baseCtor
  4809. ) {
  4810. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  4811. return factory.errorComp
  4812. }
  4813. if (isDef(factory.resolved)) {
  4814. return factory.resolved
  4815. }
  4816. var owner = currentRenderingInstance;
  4817. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  4818. // already pending
  4819. factory.owners.push(owner);
  4820. }
  4821. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  4822. return factory.loadingComp
  4823. }
  4824. if (owner && !isDef(factory.owners)) {
  4825. var owners = factory.owners = [owner];
  4826. var sync = true;
  4827. var timerLoading = null;
  4828. var timerTimeout = null
  4829. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  4830. var forceRender = function (renderCompleted) {
  4831. for (var i = 0, l = owners.length; i < l; i++) {
  4832. (owners[i]).$forceUpdate();
  4833. }
  4834. if (renderCompleted) {
  4835. owners.length = 0;
  4836. if (timerLoading !== null) {
  4837. clearTimeout(timerLoading);
  4838. timerLoading = null;
  4839. }
  4840. if (timerTimeout !== null) {
  4841. clearTimeout(timerTimeout);
  4842. timerTimeout = null;
  4843. }
  4844. }
  4845. };
  4846. var resolve = once(function (res) {
  4847. // cache resolved
  4848. factory.resolved = ensureCtor(res, baseCtor);
  4849. // invoke callbacks only if this is not a synchronous resolve
  4850. // (async resolves are shimmed as synchronous during SSR)
  4851. if (!sync) {
  4852. forceRender(true);
  4853. } else {
  4854. owners.length = 0;
  4855. }
  4856. });
  4857. var reject = once(function (reason) {
  4858. true && warn(
  4859. "Failed to resolve async component: " + (String(factory)) +
  4860. (reason ? ("\nReason: " + reason) : '')
  4861. );
  4862. if (isDef(factory.errorComp)) {
  4863. factory.error = true;
  4864. forceRender(true);
  4865. }
  4866. });
  4867. var res = factory(resolve, reject);
  4868. if (isObject(res)) {
  4869. if (isPromise(res)) {
  4870. // () => Promise
  4871. if (isUndef(factory.resolved)) {
  4872. res.then(resolve, reject);
  4873. }
  4874. } else if (isPromise(res.component)) {
  4875. res.component.then(resolve, reject);
  4876. if (isDef(res.error)) {
  4877. factory.errorComp = ensureCtor(res.error, baseCtor);
  4878. }
  4879. if (isDef(res.loading)) {
  4880. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  4881. if (res.delay === 0) {
  4882. factory.loading = true;
  4883. } else {
  4884. timerLoading = setTimeout(function () {
  4885. timerLoading = null;
  4886. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  4887. factory.loading = true;
  4888. forceRender(false);
  4889. }
  4890. }, res.delay || 200);
  4891. }
  4892. }
  4893. if (isDef(res.timeout)) {
  4894. timerTimeout = setTimeout(function () {
  4895. timerTimeout = null;
  4896. if (isUndef(factory.resolved)) {
  4897. reject(
  4898. true
  4899. ? ("timeout (" + (res.timeout) + "ms)")
  4900. : undefined
  4901. );
  4902. }
  4903. }, res.timeout);
  4904. }
  4905. }
  4906. }
  4907. sync = false;
  4908. // return in case resolved synchronously
  4909. return factory.loading
  4910. ? factory.loadingComp
  4911. : factory.resolved
  4912. }
  4913. }
  4914. /* */
  4915. function isAsyncPlaceholder (node) {
  4916. return node.isComment && node.asyncFactory
  4917. }
  4918. /* */
  4919. function getFirstComponentChild (children) {
  4920. if (Array.isArray(children)) {
  4921. for (var i = 0; i < children.length; i++) {
  4922. var c = children[i];
  4923. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  4924. return c
  4925. }
  4926. }
  4927. }
  4928. }
  4929. /* */
  4930. /* */
  4931. function initEvents (vm) {
  4932. vm._events = Object.create(null);
  4933. vm._hasHookEvent = false;
  4934. // init parent attached events
  4935. var listeners = vm.$options._parentListeners;
  4936. if (listeners) {
  4937. updateComponentListeners(vm, listeners);
  4938. }
  4939. }
  4940. var target;
  4941. function add (event, fn) {
  4942. target.$on(event, fn);
  4943. }
  4944. function remove$1 (event, fn) {
  4945. target.$off(event, fn);
  4946. }
  4947. function createOnceHandler (event, fn) {
  4948. var _target = target;
  4949. return function onceHandler () {
  4950. var res = fn.apply(null, arguments);
  4951. if (res !== null) {
  4952. _target.$off(event, onceHandler);
  4953. }
  4954. }
  4955. }
  4956. function updateComponentListeners (
  4957. vm,
  4958. listeners,
  4959. oldListeners
  4960. ) {
  4961. target = vm;
  4962. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  4963. target = undefined;
  4964. }
  4965. function eventsMixin (Vue) {
  4966. var hookRE = /^hook:/;
  4967. Vue.prototype.$on = function (event, fn) {
  4968. var vm = this;
  4969. if (Array.isArray(event)) {
  4970. for (var i = 0, l = event.length; i < l; i++) {
  4971. vm.$on(event[i], fn);
  4972. }
  4973. } else {
  4974. (vm._events[event] || (vm._events[event] = [])).push(fn);
  4975. // optimize hook:event cost by using a boolean flag marked at registration
  4976. // instead of a hash lookup
  4977. if (hookRE.test(event)) {
  4978. vm._hasHookEvent = true;
  4979. }
  4980. }
  4981. return vm
  4982. };
  4983. Vue.prototype.$once = function (event, fn) {
  4984. var vm = this;
  4985. function on () {
  4986. vm.$off(event, on);
  4987. fn.apply(vm, arguments);
  4988. }
  4989. on.fn = fn;
  4990. vm.$on(event, on);
  4991. return vm
  4992. };
  4993. Vue.prototype.$off = function (event, fn) {
  4994. var vm = this;
  4995. // all
  4996. if (!arguments.length) {
  4997. vm._events = Object.create(null);
  4998. return vm
  4999. }
  5000. // array of events
  5001. if (Array.isArray(event)) {
  5002. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  5003. vm.$off(event[i$1], fn);
  5004. }
  5005. return vm
  5006. }
  5007. // specific event
  5008. var cbs = vm._events[event];
  5009. if (!cbs) {
  5010. return vm
  5011. }
  5012. if (!fn) {
  5013. vm._events[event] = null;
  5014. return vm
  5015. }
  5016. // specific handler
  5017. var cb;
  5018. var i = cbs.length;
  5019. while (i--) {
  5020. cb = cbs[i];
  5021. if (cb === fn || cb.fn === fn) {
  5022. cbs.splice(i, 1);
  5023. break
  5024. }
  5025. }
  5026. return vm
  5027. };
  5028. Vue.prototype.$emit = function (event) {
  5029. var vm = this;
  5030. if (true) {
  5031. var lowerCaseEvent = event.toLowerCase();
  5032. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  5033. tip(
  5034. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  5035. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  5036. "Note that HTML attributes are case-insensitive and you cannot use " +
  5037. "v-on to listen to camelCase events when using in-DOM templates. " +
  5038. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  5039. );
  5040. }
  5041. }
  5042. var cbs = vm._events[event];
  5043. if (cbs) {
  5044. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  5045. var args = toArray(arguments, 1);
  5046. var info = "event handler for \"" + event + "\"";
  5047. for (var i = 0, l = cbs.length; i < l; i++) {
  5048. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  5049. }
  5050. }
  5051. return vm
  5052. };
  5053. }
  5054. /* */
  5055. var activeInstance = null;
  5056. var isUpdatingChildComponent = false;
  5057. function setActiveInstance(vm) {
  5058. var prevActiveInstance = activeInstance;
  5059. activeInstance = vm;
  5060. return function () {
  5061. activeInstance = prevActiveInstance;
  5062. }
  5063. }
  5064. function initLifecycle (vm) {
  5065. var options = vm.$options;
  5066. // locate first non-abstract parent
  5067. var parent = options.parent;
  5068. if (parent && !options.abstract) {
  5069. while (parent.$options.abstract && parent.$parent) {
  5070. parent = parent.$parent;
  5071. }
  5072. parent.$children.push(vm);
  5073. }
  5074. vm.$parent = parent;
  5075. vm.$root = parent ? parent.$root : vm;
  5076. vm.$children = [];
  5077. vm.$refs = {};
  5078. vm._watcher = null;
  5079. vm._inactive = null;
  5080. vm._directInactive = false;
  5081. vm._isMounted = false;
  5082. vm._isDestroyed = false;
  5083. vm._isBeingDestroyed = false;
  5084. }
  5085. function lifecycleMixin (Vue) {
  5086. Vue.prototype._update = function (vnode, hydrating) {
  5087. var vm = this;
  5088. var prevEl = vm.$el;
  5089. var prevVnode = vm._vnode;
  5090. var restoreActiveInstance = setActiveInstance(vm);
  5091. vm._vnode = vnode;
  5092. // Vue.prototype.__patch__ is injected in entry points
  5093. // based on the rendering backend used.
  5094. if (!prevVnode) {
  5095. // initial render
  5096. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  5097. } else {
  5098. // updates
  5099. vm.$el = vm.__patch__(prevVnode, vnode);
  5100. }
  5101. restoreActiveInstance();
  5102. // update __vue__ reference
  5103. if (prevEl) {
  5104. prevEl.__vue__ = null;
  5105. }
  5106. if (vm.$el) {
  5107. vm.$el.__vue__ = vm;
  5108. }
  5109. // if parent is an HOC, update its $el as well
  5110. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  5111. vm.$parent.$el = vm.$el;
  5112. }
  5113. // updated hook is called by the scheduler to ensure that children are
  5114. // updated in a parent's updated hook.
  5115. };
  5116. Vue.prototype.$forceUpdate = function () {
  5117. var vm = this;
  5118. if (vm._watcher) {
  5119. vm._watcher.update();
  5120. }
  5121. };
  5122. Vue.prototype.$destroy = function () {
  5123. var vm = this;
  5124. if (vm._isBeingDestroyed) {
  5125. return
  5126. }
  5127. callHook(vm, 'beforeDestroy');
  5128. vm._isBeingDestroyed = true;
  5129. // remove self from parent
  5130. var parent = vm.$parent;
  5131. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  5132. remove(parent.$children, vm);
  5133. }
  5134. // teardown watchers
  5135. if (vm._watcher) {
  5136. vm._watcher.teardown();
  5137. }
  5138. var i = vm._watchers.length;
  5139. while (i--) {
  5140. vm._watchers[i].teardown();
  5141. }
  5142. // remove reference from data ob
  5143. // frozen object may not have observer.
  5144. if (vm._data.__ob__) {
  5145. vm._data.__ob__.vmCount--;
  5146. }
  5147. // call the last hook...
  5148. vm._isDestroyed = true;
  5149. // invoke destroy hooks on current rendered tree
  5150. vm.__patch__(vm._vnode, null);
  5151. // fire destroyed hook
  5152. callHook(vm, 'destroyed');
  5153. // turn off all instance listeners.
  5154. vm.$off();
  5155. // remove __vue__ reference
  5156. if (vm.$el) {
  5157. vm.$el.__vue__ = null;
  5158. }
  5159. // release circular reference (#6759)
  5160. if (vm.$vnode) {
  5161. vm.$vnode.parent = null;
  5162. }
  5163. };
  5164. }
  5165. function updateChildComponent (
  5166. vm,
  5167. propsData,
  5168. listeners,
  5169. parentVnode,
  5170. renderChildren
  5171. ) {
  5172. if (true) {
  5173. isUpdatingChildComponent = true;
  5174. }
  5175. // determine whether component has slot children
  5176. // we need to do this before overwriting $options._renderChildren.
  5177. // check if there are dynamic scopedSlots (hand-written or compiled but with
  5178. // dynamic slot names). Static scoped slots compiled from template has the
  5179. // "$stable" marker.
  5180. var newScopedSlots = parentVnode.data.scopedSlots;
  5181. var oldScopedSlots = vm.$scopedSlots;
  5182. var hasDynamicScopedSlot = !!(
  5183. (newScopedSlots && !newScopedSlots.$stable) ||
  5184. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  5185. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  5186. );
  5187. // Any static slot children from the parent may have changed during parent's
  5188. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  5189. // update is necessary to ensure correctness.
  5190. var needsForceUpdate = !!(
  5191. renderChildren || // has new static slots
  5192. vm.$options._renderChildren || // has old static slots
  5193. hasDynamicScopedSlot
  5194. );
  5195. vm.$options._parentVnode = parentVnode;
  5196. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  5197. if (vm._vnode) { // update child tree's parent
  5198. vm._vnode.parent = parentVnode;
  5199. }
  5200. vm.$options._renderChildren = renderChildren;
  5201. // update $attrs and $listeners hash
  5202. // these are also reactive so they may trigger child update if the child
  5203. // used them during render
  5204. vm.$attrs = parentVnode.data.attrs || emptyObject;
  5205. vm.$listeners = listeners || emptyObject;
  5206. // update props
  5207. if (propsData && vm.$options.props) {
  5208. toggleObserving(false);
  5209. var props = vm._props;
  5210. var propKeys = vm.$options._propKeys || [];
  5211. for (var i = 0; i < propKeys.length; i++) {
  5212. var key = propKeys[i];
  5213. var propOptions = vm.$options.props; // wtf flow?
  5214. props[key] = validateProp(key, propOptions, propsData, vm);
  5215. }
  5216. toggleObserving(true);
  5217. // keep a copy of raw propsData
  5218. vm.$options.propsData = propsData;
  5219. }
  5220. // fixed by xxxxxx update properties(mp runtime)
  5221. vm._$updateProperties && vm._$updateProperties(vm);
  5222. // update listeners
  5223. listeners = listeners || emptyObject;
  5224. var oldListeners = vm.$options._parentListeners;
  5225. vm.$options._parentListeners = listeners;
  5226. updateComponentListeners(vm, listeners, oldListeners);
  5227. // resolve slots + force update if has children
  5228. if (needsForceUpdate) {
  5229. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  5230. vm.$forceUpdate();
  5231. }
  5232. if (true) {
  5233. isUpdatingChildComponent = false;
  5234. }
  5235. }
  5236. function isInInactiveTree (vm) {
  5237. while (vm && (vm = vm.$parent)) {
  5238. if (vm._inactive) { return true }
  5239. }
  5240. return false
  5241. }
  5242. function activateChildComponent (vm, direct) {
  5243. if (direct) {
  5244. vm._directInactive = false;
  5245. if (isInInactiveTree(vm)) {
  5246. return
  5247. }
  5248. } else if (vm._directInactive) {
  5249. return
  5250. }
  5251. if (vm._inactive || vm._inactive === null) {
  5252. vm._inactive = false;
  5253. for (var i = 0; i < vm.$children.length; i++) {
  5254. activateChildComponent(vm.$children[i]);
  5255. }
  5256. callHook(vm, 'activated');
  5257. }
  5258. }
  5259. function deactivateChildComponent (vm, direct) {
  5260. if (direct) {
  5261. vm._directInactive = true;
  5262. if (isInInactiveTree(vm)) {
  5263. return
  5264. }
  5265. }
  5266. if (!vm._inactive) {
  5267. vm._inactive = true;
  5268. for (var i = 0; i < vm.$children.length; i++) {
  5269. deactivateChildComponent(vm.$children[i]);
  5270. }
  5271. callHook(vm, 'deactivated');
  5272. }
  5273. }
  5274. function callHook (vm, hook) {
  5275. // #7573 disable dep collection when invoking lifecycle hooks
  5276. pushTarget();
  5277. var handlers = vm.$options[hook];
  5278. var info = hook + " hook";
  5279. if (handlers) {
  5280. for (var i = 0, j = handlers.length; i < j; i++) {
  5281. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  5282. }
  5283. }
  5284. if (vm._hasHookEvent) {
  5285. vm.$emit('hook:' + hook);
  5286. }
  5287. popTarget();
  5288. }
  5289. /* */
  5290. var MAX_UPDATE_COUNT = 100;
  5291. var queue = [];
  5292. var activatedChildren = [];
  5293. var has = {};
  5294. var circular = {};
  5295. var waiting = false;
  5296. var flushing = false;
  5297. var index = 0;
  5298. /**
  5299. * Reset the scheduler's state.
  5300. */
  5301. function resetSchedulerState () {
  5302. index = queue.length = activatedChildren.length = 0;
  5303. has = {};
  5304. if (true) {
  5305. circular = {};
  5306. }
  5307. waiting = flushing = false;
  5308. }
  5309. // Async edge case #6566 requires saving the timestamp when event listeners are
  5310. // attached. However, calling performance.now() has a perf overhead especially
  5311. // if the page has thousands of event listeners. Instead, we take a timestamp
  5312. // every time the scheduler flushes and use that for all event listeners
  5313. // attached during that flush.
  5314. var currentFlushTimestamp = 0;
  5315. // Async edge case fix requires storing an event listener's attach timestamp.
  5316. var getNow = Date.now;
  5317. // Determine what event timestamp the browser is using. Annoyingly, the
  5318. // timestamp can either be hi-res (relative to page load) or low-res
  5319. // (relative to UNIX epoch), so in order to compare time we have to use the
  5320. // same timestamp type when saving the flush timestamp.
  5321. // All IE versions use low-res event timestamps, and have problematic clock
  5322. // implementations (#9632)
  5323. if (inBrowser && !isIE) {
  5324. var performance = window.performance;
  5325. if (
  5326. performance &&
  5327. typeof performance.now === 'function' &&
  5328. getNow() > document.createEvent('Event').timeStamp
  5329. ) {
  5330. // if the event timestamp, although evaluated AFTER the Date.now(), is
  5331. // smaller than it, it means the event is using a hi-res timestamp,
  5332. // and we need to use the hi-res version for event listener timestamps as
  5333. // well.
  5334. getNow = function () { return performance.now(); };
  5335. }
  5336. }
  5337. /**
  5338. * Flush both queues and run the watchers.
  5339. */
  5340. function flushSchedulerQueue () {
  5341. currentFlushTimestamp = getNow();
  5342. flushing = true;
  5343. var watcher, id;
  5344. // Sort queue before flush.
  5345. // This ensures that:
  5346. // 1. Components are updated from parent to child. (because parent is always
  5347. // created before the child)
  5348. // 2. A component's user watchers are run before its render watcher (because
  5349. // user watchers are created before the render watcher)
  5350. // 3. If a component is destroyed during a parent component's watcher run,
  5351. // its watchers can be skipped.
  5352. queue.sort(function (a, b) { return a.id - b.id; });
  5353. // do not cache length because more watchers might be pushed
  5354. // as we run existing watchers
  5355. for (index = 0; index < queue.length; index++) {
  5356. watcher = queue[index];
  5357. if (watcher.before) {
  5358. watcher.before();
  5359. }
  5360. id = watcher.id;
  5361. has[id] = null;
  5362. watcher.run();
  5363. // in dev build, check and stop circular updates.
  5364. if ( true && has[id] != null) {
  5365. circular[id] = (circular[id] || 0) + 1;
  5366. if (circular[id] > MAX_UPDATE_COUNT) {
  5367. warn(
  5368. 'You may have an infinite update loop ' + (
  5369. watcher.user
  5370. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  5371. : "in a component render function."
  5372. ),
  5373. watcher.vm
  5374. );
  5375. break
  5376. }
  5377. }
  5378. }
  5379. // keep copies of post queues before resetting state
  5380. var activatedQueue = activatedChildren.slice();
  5381. var updatedQueue = queue.slice();
  5382. resetSchedulerState();
  5383. // call component updated and activated hooks
  5384. callActivatedHooks(activatedQueue);
  5385. callUpdatedHooks(updatedQueue);
  5386. // devtool hook
  5387. /* istanbul ignore if */
  5388. if (devtools && config.devtools) {
  5389. devtools.emit('flush');
  5390. }
  5391. }
  5392. function callUpdatedHooks (queue) {
  5393. var i = queue.length;
  5394. while (i--) {
  5395. var watcher = queue[i];
  5396. var vm = watcher.vm;
  5397. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  5398. callHook(vm, 'updated');
  5399. }
  5400. }
  5401. }
  5402. /**
  5403. * Queue a kept-alive component that was activated during patch.
  5404. * The queue will be processed after the entire tree has been patched.
  5405. */
  5406. function queueActivatedComponent (vm) {
  5407. // setting _inactive to false here so that a render function can
  5408. // rely on checking whether it's in an inactive tree (e.g. router-view)
  5409. vm._inactive = false;
  5410. activatedChildren.push(vm);
  5411. }
  5412. function callActivatedHooks (queue) {
  5413. for (var i = 0; i < queue.length; i++) {
  5414. queue[i]._inactive = true;
  5415. activateChildComponent(queue[i], true /* true */);
  5416. }
  5417. }
  5418. /**
  5419. * Push a watcher into the watcher queue.
  5420. * Jobs with duplicate IDs will be skipped unless it's
  5421. * pushed when the queue is being flushed.
  5422. */
  5423. function queueWatcher (watcher) {
  5424. var id = watcher.id;
  5425. if (has[id] == null) {
  5426. has[id] = true;
  5427. if (!flushing) {
  5428. queue.push(watcher);
  5429. } else {
  5430. // if already flushing, splice the watcher based on its id
  5431. // if already past its id, it will be run next immediately.
  5432. var i = queue.length - 1;
  5433. while (i > index && queue[i].id > watcher.id) {
  5434. i--;
  5435. }
  5436. queue.splice(i + 1, 0, watcher);
  5437. }
  5438. // queue the flush
  5439. if (!waiting) {
  5440. waiting = true;
  5441. if ( true && !config.async) {
  5442. flushSchedulerQueue();
  5443. return
  5444. }
  5445. nextTick(flushSchedulerQueue);
  5446. }
  5447. }
  5448. }
  5449. /* */
  5450. var uid$2 = 0;
  5451. /**
  5452. * A watcher parses an expression, collects dependencies,
  5453. * and fires callback when the expression value changes.
  5454. * This is used for both the $watch() api and directives.
  5455. */
  5456. var Watcher = function Watcher (
  5457. vm,
  5458. expOrFn,
  5459. cb,
  5460. options,
  5461. isRenderWatcher
  5462. ) {
  5463. this.vm = vm;
  5464. if (isRenderWatcher) {
  5465. vm._watcher = this;
  5466. }
  5467. vm._watchers.push(this);
  5468. // options
  5469. if (options) {
  5470. this.deep = !!options.deep;
  5471. this.user = !!options.user;
  5472. this.lazy = !!options.lazy;
  5473. this.sync = !!options.sync;
  5474. this.before = options.before;
  5475. } else {
  5476. this.deep = this.user = this.lazy = this.sync = false;
  5477. }
  5478. this.cb = cb;
  5479. this.id = ++uid$2; // uid for batching
  5480. this.active = true;
  5481. this.dirty = this.lazy; // for lazy watchers
  5482. this.deps = [];
  5483. this.newDeps = [];
  5484. this.depIds = new _Set();
  5485. this.newDepIds = new _Set();
  5486. this.expression = true
  5487. ? expOrFn.toString()
  5488. : undefined;
  5489. // parse expression for getter
  5490. if (typeof expOrFn === 'function') {
  5491. this.getter = expOrFn;
  5492. } else {
  5493. this.getter = parsePath(expOrFn);
  5494. if (!this.getter) {
  5495. this.getter = noop;
  5496. true && warn(
  5497. "Failed watching path: \"" + expOrFn + "\" " +
  5498. 'Watcher only accepts simple dot-delimited paths. ' +
  5499. 'For full control, use a function instead.',
  5500. vm
  5501. );
  5502. }
  5503. }
  5504. this.value = this.lazy
  5505. ? undefined
  5506. : this.get();
  5507. };
  5508. /**
  5509. * Evaluate the getter, and re-collect dependencies.
  5510. */
  5511. Watcher.prototype.get = function get () {
  5512. pushTarget(this);
  5513. var value;
  5514. var vm = this.vm;
  5515. try {
  5516. value = this.getter.call(vm, vm);
  5517. } catch (e) {
  5518. if (this.user) {
  5519. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  5520. } else {
  5521. throw e
  5522. }
  5523. } finally {
  5524. // "touch" every property so they are all tracked as
  5525. // dependencies for deep watching
  5526. if (this.deep) {
  5527. traverse(value);
  5528. }
  5529. popTarget();
  5530. this.cleanupDeps();
  5531. }
  5532. return value
  5533. };
  5534. /**
  5535. * Add a dependency to this directive.
  5536. */
  5537. Watcher.prototype.addDep = function addDep (dep) {
  5538. var id = dep.id;
  5539. if (!this.newDepIds.has(id)) {
  5540. this.newDepIds.add(id);
  5541. this.newDeps.push(dep);
  5542. if (!this.depIds.has(id)) {
  5543. dep.addSub(this);
  5544. }
  5545. }
  5546. };
  5547. /**
  5548. * Clean up for dependency collection.
  5549. */
  5550. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  5551. var i = this.deps.length;
  5552. while (i--) {
  5553. var dep = this.deps[i];
  5554. if (!this.newDepIds.has(dep.id)) {
  5555. dep.removeSub(this);
  5556. }
  5557. }
  5558. var tmp = this.depIds;
  5559. this.depIds = this.newDepIds;
  5560. this.newDepIds = tmp;
  5561. this.newDepIds.clear();
  5562. tmp = this.deps;
  5563. this.deps = this.newDeps;
  5564. this.newDeps = tmp;
  5565. this.newDeps.length = 0;
  5566. };
  5567. /**
  5568. * Subscriber interface.
  5569. * Will be called when a dependency changes.
  5570. */
  5571. Watcher.prototype.update = function update () {
  5572. /* istanbul ignore else */
  5573. if (this.lazy) {
  5574. this.dirty = true;
  5575. } else if (this.sync) {
  5576. this.run();
  5577. } else {
  5578. queueWatcher(this);
  5579. }
  5580. };
  5581. /**
  5582. * Scheduler job interface.
  5583. * Will be called by the scheduler.
  5584. */
  5585. Watcher.prototype.run = function run () {
  5586. if (this.active) {
  5587. var value = this.get();
  5588. if (
  5589. value !== this.value ||
  5590. // Deep watchers and watchers on Object/Arrays should fire even
  5591. // when the value is the same, because the value may
  5592. // have mutated.
  5593. isObject(value) ||
  5594. this.deep
  5595. ) {
  5596. // set new value
  5597. var oldValue = this.value;
  5598. this.value = value;
  5599. if (this.user) {
  5600. try {
  5601. this.cb.call(this.vm, value, oldValue);
  5602. } catch (e) {
  5603. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  5604. }
  5605. } else {
  5606. this.cb.call(this.vm, value, oldValue);
  5607. }
  5608. }
  5609. }
  5610. };
  5611. /**
  5612. * Evaluate the value of the watcher.
  5613. * This only gets called for lazy watchers.
  5614. */
  5615. Watcher.prototype.evaluate = function evaluate () {
  5616. this.value = this.get();
  5617. this.dirty = false;
  5618. };
  5619. /**
  5620. * Depend on all deps collected by this watcher.
  5621. */
  5622. Watcher.prototype.depend = function depend () {
  5623. var i = this.deps.length;
  5624. while (i--) {
  5625. this.deps[i].depend();
  5626. }
  5627. };
  5628. /**
  5629. * Remove self from all dependencies' subscriber list.
  5630. */
  5631. Watcher.prototype.teardown = function teardown () {
  5632. if (this.active) {
  5633. // remove self from vm's watcher list
  5634. // this is a somewhat expensive operation so we skip it
  5635. // if the vm is being destroyed.
  5636. if (!this.vm._isBeingDestroyed) {
  5637. remove(this.vm._watchers, this);
  5638. }
  5639. var i = this.deps.length;
  5640. while (i--) {
  5641. this.deps[i].removeSub(this);
  5642. }
  5643. this.active = false;
  5644. }
  5645. };
  5646. /* */
  5647. var sharedPropertyDefinition = {
  5648. enumerable: true,
  5649. configurable: true,
  5650. get: noop,
  5651. set: noop
  5652. };
  5653. function proxy (target, sourceKey, key) {
  5654. sharedPropertyDefinition.get = function proxyGetter () {
  5655. return this[sourceKey][key]
  5656. };
  5657. sharedPropertyDefinition.set = function proxySetter (val) {
  5658. this[sourceKey][key] = val;
  5659. };
  5660. Object.defineProperty(target, key, sharedPropertyDefinition);
  5661. }
  5662. function initState (vm) {
  5663. vm._watchers = [];
  5664. var opts = vm.$options;
  5665. if (opts.props) { initProps(vm, opts.props); }
  5666. if (opts.methods) { initMethods(vm, opts.methods); }
  5667. if (opts.data) {
  5668. initData(vm);
  5669. } else {
  5670. observe(vm._data = {}, true /* asRootData */);
  5671. }
  5672. if (opts.computed) { initComputed(vm, opts.computed); }
  5673. if (opts.watch && opts.watch !== nativeWatch) {
  5674. initWatch(vm, opts.watch);
  5675. }
  5676. }
  5677. function initProps (vm, propsOptions) {
  5678. var propsData = vm.$options.propsData || {};
  5679. var props = vm._props = {};
  5680. // cache prop keys so that future props updates can iterate using Array
  5681. // instead of dynamic object key enumeration.
  5682. var keys = vm.$options._propKeys = [];
  5683. var isRoot = !vm.$parent;
  5684. // root instance props should be converted
  5685. if (!isRoot) {
  5686. toggleObserving(false);
  5687. }
  5688. var loop = function ( key ) {
  5689. keys.push(key);
  5690. var value = validateProp(key, propsOptions, propsData, vm);
  5691. /* istanbul ignore else */
  5692. if (true) {
  5693. var hyphenatedKey = hyphenate(key);
  5694. if (isReservedAttribute(hyphenatedKey) ||
  5695. config.isReservedAttr(hyphenatedKey)) {
  5696. warn(
  5697. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  5698. vm
  5699. );
  5700. }
  5701. defineReactive$$1(props, key, value, function () {
  5702. if (!isRoot && !isUpdatingChildComponent) {
  5703. {
  5704. if(vm.mpHost === 'mp-baidu'){//百度 observer 在 setData callback 之后触发,直接忽略该 warn
  5705. return
  5706. }
  5707. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  5708. if(
  5709. key === 'value' &&
  5710. Array.isArray(vm.$options.behaviors) &&
  5711. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  5712. ){
  5713. return
  5714. }
  5715. if(vm._getFormData){
  5716. return
  5717. }
  5718. var $parent = vm.$parent;
  5719. while($parent){
  5720. if($parent.__next_tick_pending){
  5721. return
  5722. }
  5723. $parent = $parent.$parent;
  5724. }
  5725. }
  5726. warn(
  5727. "Avoid mutating a prop directly since the value will be " +
  5728. "overwritten whenever the parent component re-renders. " +
  5729. "Instead, use a data or computed property based on the prop's " +
  5730. "value. Prop being mutated: \"" + key + "\"",
  5731. vm
  5732. );
  5733. }
  5734. });
  5735. } else {}
  5736. // static props are already proxied on the component's prototype
  5737. // during Vue.extend(). We only need to proxy props defined at
  5738. // instantiation here.
  5739. if (!(key in vm)) {
  5740. proxy(vm, "_props", key);
  5741. }
  5742. };
  5743. for (var key in propsOptions) loop( key );
  5744. toggleObserving(true);
  5745. }
  5746. function initData (vm) {
  5747. var data = vm.$options.data;
  5748. data = vm._data = typeof data === 'function'
  5749. ? getData(data, vm)
  5750. : data || {};
  5751. if (!isPlainObject(data)) {
  5752. data = {};
  5753. true && warn(
  5754. 'data functions should return an object:\n' +
  5755. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  5756. vm
  5757. );
  5758. }
  5759. // proxy data on instance
  5760. var keys = Object.keys(data);
  5761. var props = vm.$options.props;
  5762. var methods = vm.$options.methods;
  5763. var i = keys.length;
  5764. while (i--) {
  5765. var key = keys[i];
  5766. if (true) {
  5767. if (methods && hasOwn(methods, key)) {
  5768. warn(
  5769. ("Method \"" + key + "\" has already been defined as a data property."),
  5770. vm
  5771. );
  5772. }
  5773. }
  5774. if (props && hasOwn(props, key)) {
  5775. true && warn(
  5776. "The data property \"" + key + "\" is already declared as a prop. " +
  5777. "Use prop default value instead.",
  5778. vm
  5779. );
  5780. } else if (!isReserved(key)) {
  5781. proxy(vm, "_data", key);
  5782. }
  5783. }
  5784. // observe data
  5785. observe(data, true /* asRootData */);
  5786. }
  5787. function getData (data, vm) {
  5788. // #7573 disable dep collection when invoking data getters
  5789. pushTarget();
  5790. try {
  5791. return data.call(vm, vm)
  5792. } catch (e) {
  5793. handleError(e, vm, "data()");
  5794. return {}
  5795. } finally {
  5796. popTarget();
  5797. }
  5798. }
  5799. var computedWatcherOptions = { lazy: true };
  5800. function initComputed (vm, computed) {
  5801. // $flow-disable-line
  5802. var watchers = vm._computedWatchers = Object.create(null);
  5803. // computed properties are just getters during SSR
  5804. var isSSR = isServerRendering();
  5805. for (var key in computed) {
  5806. var userDef = computed[key];
  5807. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  5808. if ( true && getter == null) {
  5809. warn(
  5810. ("Getter is missing for computed property \"" + key + "\"."),
  5811. vm
  5812. );
  5813. }
  5814. if (!isSSR) {
  5815. // create internal watcher for the computed property.
  5816. watchers[key] = new Watcher(
  5817. vm,
  5818. getter || noop,
  5819. noop,
  5820. computedWatcherOptions
  5821. );
  5822. }
  5823. // component-defined computed properties are already defined on the
  5824. // component prototype. We only need to define computed properties defined
  5825. // at instantiation here.
  5826. if (!(key in vm)) {
  5827. defineComputed(vm, key, userDef);
  5828. } else if (true) {
  5829. if (key in vm.$data) {
  5830. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  5831. } else if (vm.$options.props && key in vm.$options.props) {
  5832. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  5833. }
  5834. }
  5835. }
  5836. }
  5837. function defineComputed (
  5838. target,
  5839. key,
  5840. userDef
  5841. ) {
  5842. var shouldCache = !isServerRendering();
  5843. if (typeof userDef === 'function') {
  5844. sharedPropertyDefinition.get = shouldCache
  5845. ? createComputedGetter(key)
  5846. : createGetterInvoker(userDef);
  5847. sharedPropertyDefinition.set = noop;
  5848. } else {
  5849. sharedPropertyDefinition.get = userDef.get
  5850. ? shouldCache && userDef.cache !== false
  5851. ? createComputedGetter(key)
  5852. : createGetterInvoker(userDef.get)
  5853. : noop;
  5854. sharedPropertyDefinition.set = userDef.set || noop;
  5855. }
  5856. if ( true &&
  5857. sharedPropertyDefinition.set === noop) {
  5858. sharedPropertyDefinition.set = function () {
  5859. warn(
  5860. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  5861. this
  5862. );
  5863. };
  5864. }
  5865. Object.defineProperty(target, key, sharedPropertyDefinition);
  5866. }
  5867. function createComputedGetter (key) {
  5868. return function computedGetter () {
  5869. var watcher = this._computedWatchers && this._computedWatchers[key];
  5870. if (watcher) {
  5871. if (watcher.dirty) {
  5872. watcher.evaluate();
  5873. }
  5874. if (Dep.SharedObject.target) {// fixed by xxxxxx
  5875. watcher.depend();
  5876. }
  5877. return watcher.value
  5878. }
  5879. }
  5880. }
  5881. function createGetterInvoker(fn) {
  5882. return function computedGetter () {
  5883. return fn.call(this, this)
  5884. }
  5885. }
  5886. function initMethods (vm, methods) {
  5887. var props = vm.$options.props;
  5888. for (var key in methods) {
  5889. if (true) {
  5890. if (typeof methods[key] !== 'function') {
  5891. warn(
  5892. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  5893. "Did you reference the function correctly?",
  5894. vm
  5895. );
  5896. }
  5897. if (props && hasOwn(props, key)) {
  5898. warn(
  5899. ("Method \"" + key + "\" has already been defined as a prop."),
  5900. vm
  5901. );
  5902. }
  5903. if ((key in vm) && isReserved(key)) {
  5904. warn(
  5905. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  5906. "Avoid defining component methods that start with _ or $."
  5907. );
  5908. }
  5909. }
  5910. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  5911. }
  5912. }
  5913. function initWatch (vm, watch) {
  5914. for (var key in watch) {
  5915. var handler = watch[key];
  5916. if (Array.isArray(handler)) {
  5917. for (var i = 0; i < handler.length; i++) {
  5918. createWatcher(vm, key, handler[i]);
  5919. }
  5920. } else {
  5921. createWatcher(vm, key, handler);
  5922. }
  5923. }
  5924. }
  5925. function createWatcher (
  5926. vm,
  5927. expOrFn,
  5928. handler,
  5929. options
  5930. ) {
  5931. if (isPlainObject(handler)) {
  5932. options = handler;
  5933. handler = handler.handler;
  5934. }
  5935. if (typeof handler === 'string') {
  5936. handler = vm[handler];
  5937. }
  5938. return vm.$watch(expOrFn, handler, options)
  5939. }
  5940. function stateMixin (Vue) {
  5941. // flow somehow has problems with directly declared definition object
  5942. // when using Object.defineProperty, so we have to procedurally build up
  5943. // the object here.
  5944. var dataDef = {};
  5945. dataDef.get = function () { return this._data };
  5946. var propsDef = {};
  5947. propsDef.get = function () { return this._props };
  5948. if (true) {
  5949. dataDef.set = function () {
  5950. warn(
  5951. 'Avoid replacing instance root $data. ' +
  5952. 'Use nested data properties instead.',
  5953. this
  5954. );
  5955. };
  5956. propsDef.set = function () {
  5957. warn("$props is readonly.", this);
  5958. };
  5959. }
  5960. Object.defineProperty(Vue.prototype, '$data', dataDef);
  5961. Object.defineProperty(Vue.prototype, '$props', propsDef);
  5962. Vue.prototype.$set = set;
  5963. Vue.prototype.$delete = del;
  5964. Vue.prototype.$watch = function (
  5965. expOrFn,
  5966. cb,
  5967. options
  5968. ) {
  5969. var vm = this;
  5970. if (isPlainObject(cb)) {
  5971. return createWatcher(vm, expOrFn, cb, options)
  5972. }
  5973. options = options || {};
  5974. options.user = true;
  5975. var watcher = new Watcher(vm, expOrFn, cb, options);
  5976. if (options.immediate) {
  5977. try {
  5978. cb.call(vm, watcher.value);
  5979. } catch (error) {
  5980. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  5981. }
  5982. }
  5983. return function unwatchFn () {
  5984. watcher.teardown();
  5985. }
  5986. };
  5987. }
  5988. /* */
  5989. var uid$3 = 0;
  5990. function initMixin (Vue) {
  5991. Vue.prototype._init = function (options) {
  5992. var vm = this;
  5993. // a uid
  5994. vm._uid = uid$3++;
  5995. var startTag, endTag;
  5996. /* istanbul ignore if */
  5997. if ( true && config.performance && mark) {
  5998. startTag = "vue-perf-start:" + (vm._uid);
  5999. endTag = "vue-perf-end:" + (vm._uid);
  6000. mark(startTag);
  6001. }
  6002. // a flag to avoid this being observed
  6003. vm._isVue = true;
  6004. // merge options
  6005. if (options && options._isComponent) {
  6006. // optimize internal component instantiation
  6007. // since dynamic options merging is pretty slow, and none of the
  6008. // internal component options needs special treatment.
  6009. initInternalComponent(vm, options);
  6010. } else {
  6011. vm.$options = mergeOptions(
  6012. resolveConstructorOptions(vm.constructor),
  6013. options || {},
  6014. vm
  6015. );
  6016. }
  6017. /* istanbul ignore else */
  6018. if (true) {
  6019. initProxy(vm);
  6020. } else {}
  6021. // expose real self
  6022. vm._self = vm;
  6023. initLifecycle(vm);
  6024. initEvents(vm);
  6025. initRender(vm);
  6026. callHook(vm, 'beforeCreate');
  6027. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  6028. initState(vm);
  6029. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  6030. !vm._$fallback && callHook(vm, 'created');
  6031. /* istanbul ignore if */
  6032. if ( true && config.performance && mark) {
  6033. vm._name = formatComponentName(vm, false);
  6034. mark(endTag);
  6035. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  6036. }
  6037. if (vm.$options.el) {
  6038. vm.$mount(vm.$options.el);
  6039. }
  6040. };
  6041. }
  6042. function initInternalComponent (vm, options) {
  6043. var opts = vm.$options = Object.create(vm.constructor.options);
  6044. // doing this because it's faster than dynamic enumeration.
  6045. var parentVnode = options._parentVnode;
  6046. opts.parent = options.parent;
  6047. opts._parentVnode = parentVnode;
  6048. var vnodeComponentOptions = parentVnode.componentOptions;
  6049. opts.propsData = vnodeComponentOptions.propsData;
  6050. opts._parentListeners = vnodeComponentOptions.listeners;
  6051. opts._renderChildren = vnodeComponentOptions.children;
  6052. opts._componentTag = vnodeComponentOptions.tag;
  6053. if (options.render) {
  6054. opts.render = options.render;
  6055. opts.staticRenderFns = options.staticRenderFns;
  6056. }
  6057. }
  6058. function resolveConstructorOptions (Ctor) {
  6059. var options = Ctor.options;
  6060. if (Ctor.super) {
  6061. var superOptions = resolveConstructorOptions(Ctor.super);
  6062. var cachedSuperOptions = Ctor.superOptions;
  6063. if (superOptions !== cachedSuperOptions) {
  6064. // super option changed,
  6065. // need to resolve new options.
  6066. Ctor.superOptions = superOptions;
  6067. // check if there are any late-modified/attached options (#4976)
  6068. var modifiedOptions = resolveModifiedOptions(Ctor);
  6069. // update base extend options
  6070. if (modifiedOptions) {
  6071. extend(Ctor.extendOptions, modifiedOptions);
  6072. }
  6073. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  6074. if (options.name) {
  6075. options.components[options.name] = Ctor;
  6076. }
  6077. }
  6078. }
  6079. return options
  6080. }
  6081. function resolveModifiedOptions (Ctor) {
  6082. var modified;
  6083. var latest = Ctor.options;
  6084. var sealed = Ctor.sealedOptions;
  6085. for (var key in latest) {
  6086. if (latest[key] !== sealed[key]) {
  6087. if (!modified) { modified = {}; }
  6088. modified[key] = latest[key];
  6089. }
  6090. }
  6091. return modified
  6092. }
  6093. function Vue (options) {
  6094. if ( true &&
  6095. !(this instanceof Vue)
  6096. ) {
  6097. warn('Vue is a constructor and should be called with the `new` keyword');
  6098. }
  6099. this._init(options);
  6100. }
  6101. initMixin(Vue);
  6102. stateMixin(Vue);
  6103. eventsMixin(Vue);
  6104. lifecycleMixin(Vue);
  6105. renderMixin(Vue);
  6106. /* */
  6107. function initUse (Vue) {
  6108. Vue.use = function (plugin) {
  6109. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  6110. if (installedPlugins.indexOf(plugin) > -1) {
  6111. return this
  6112. }
  6113. // additional parameters
  6114. var args = toArray(arguments, 1);
  6115. args.unshift(this);
  6116. if (typeof plugin.install === 'function') {
  6117. plugin.install.apply(plugin, args);
  6118. } else if (typeof plugin === 'function') {
  6119. plugin.apply(null, args);
  6120. }
  6121. installedPlugins.push(plugin);
  6122. return this
  6123. };
  6124. }
  6125. /* */
  6126. function initMixin$1 (Vue) {
  6127. Vue.mixin = function (mixin) {
  6128. this.options = mergeOptions(this.options, mixin);
  6129. return this
  6130. };
  6131. }
  6132. /* */
  6133. function initExtend (Vue) {
  6134. /**
  6135. * Each instance constructor, including Vue, has a unique
  6136. * cid. This enables us to create wrapped "child
  6137. * constructors" for prototypal inheritance and cache them.
  6138. */
  6139. Vue.cid = 0;
  6140. var cid = 1;
  6141. /**
  6142. * Class inheritance
  6143. */
  6144. Vue.extend = function (extendOptions) {
  6145. extendOptions = extendOptions || {};
  6146. var Super = this;
  6147. var SuperId = Super.cid;
  6148. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  6149. if (cachedCtors[SuperId]) {
  6150. return cachedCtors[SuperId]
  6151. }
  6152. var name = extendOptions.name || Super.options.name;
  6153. if ( true && name) {
  6154. validateComponentName(name);
  6155. }
  6156. var Sub = function VueComponent (options) {
  6157. this._init(options);
  6158. };
  6159. Sub.prototype = Object.create(Super.prototype);
  6160. Sub.prototype.constructor = Sub;
  6161. Sub.cid = cid++;
  6162. Sub.options = mergeOptions(
  6163. Super.options,
  6164. extendOptions
  6165. );
  6166. Sub['super'] = Super;
  6167. // For props and computed properties, we define the proxy getters on
  6168. // the Vue instances at extension time, on the extended prototype. This
  6169. // avoids Object.defineProperty calls for each instance created.
  6170. if (Sub.options.props) {
  6171. initProps$1(Sub);
  6172. }
  6173. if (Sub.options.computed) {
  6174. initComputed$1(Sub);
  6175. }
  6176. // allow further extension/mixin/plugin usage
  6177. Sub.extend = Super.extend;
  6178. Sub.mixin = Super.mixin;
  6179. Sub.use = Super.use;
  6180. // create asset registers, so extended classes
  6181. // can have their private assets too.
  6182. ASSET_TYPES.forEach(function (type) {
  6183. Sub[type] = Super[type];
  6184. });
  6185. // enable recursive self-lookup
  6186. if (name) {
  6187. Sub.options.components[name] = Sub;
  6188. }
  6189. // keep a reference to the super options at extension time.
  6190. // later at instantiation we can check if Super's options have
  6191. // been updated.
  6192. Sub.superOptions = Super.options;
  6193. Sub.extendOptions = extendOptions;
  6194. Sub.sealedOptions = extend({}, Sub.options);
  6195. // cache constructor
  6196. cachedCtors[SuperId] = Sub;
  6197. return Sub
  6198. };
  6199. }
  6200. function initProps$1 (Comp) {
  6201. var props = Comp.options.props;
  6202. for (var key in props) {
  6203. proxy(Comp.prototype, "_props", key);
  6204. }
  6205. }
  6206. function initComputed$1 (Comp) {
  6207. var computed = Comp.options.computed;
  6208. for (var key in computed) {
  6209. defineComputed(Comp.prototype, key, computed[key]);
  6210. }
  6211. }
  6212. /* */
  6213. function initAssetRegisters (Vue) {
  6214. /**
  6215. * Create asset registration methods.
  6216. */
  6217. ASSET_TYPES.forEach(function (type) {
  6218. Vue[type] = function (
  6219. id,
  6220. definition
  6221. ) {
  6222. if (!definition) {
  6223. return this.options[type + 's'][id]
  6224. } else {
  6225. /* istanbul ignore if */
  6226. if ( true && type === 'component') {
  6227. validateComponentName(id);
  6228. }
  6229. if (type === 'component' && isPlainObject(definition)) {
  6230. definition.name = definition.name || id;
  6231. definition = this.options._base.extend(definition);
  6232. }
  6233. if (type === 'directive' && typeof definition === 'function') {
  6234. definition = { bind: definition, update: definition };
  6235. }
  6236. this.options[type + 's'][id] = definition;
  6237. return definition
  6238. }
  6239. };
  6240. });
  6241. }
  6242. /* */
  6243. function getComponentName (opts) {
  6244. return opts && (opts.Ctor.options.name || opts.tag)
  6245. }
  6246. function matches (pattern, name) {
  6247. if (Array.isArray(pattern)) {
  6248. return pattern.indexOf(name) > -1
  6249. } else if (typeof pattern === 'string') {
  6250. return pattern.split(',').indexOf(name) > -1
  6251. } else if (isRegExp(pattern)) {
  6252. return pattern.test(name)
  6253. }
  6254. /* istanbul ignore next */
  6255. return false
  6256. }
  6257. function pruneCache (keepAliveInstance, filter) {
  6258. var cache = keepAliveInstance.cache;
  6259. var keys = keepAliveInstance.keys;
  6260. var _vnode = keepAliveInstance._vnode;
  6261. for (var key in cache) {
  6262. var cachedNode = cache[key];
  6263. if (cachedNode) {
  6264. var name = getComponentName(cachedNode.componentOptions);
  6265. if (name && !filter(name)) {
  6266. pruneCacheEntry(cache, key, keys, _vnode);
  6267. }
  6268. }
  6269. }
  6270. }
  6271. function pruneCacheEntry (
  6272. cache,
  6273. key,
  6274. keys,
  6275. current
  6276. ) {
  6277. var cached$$1 = cache[key];
  6278. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  6279. cached$$1.componentInstance.$destroy();
  6280. }
  6281. cache[key] = null;
  6282. remove(keys, key);
  6283. }
  6284. var patternTypes = [String, RegExp, Array];
  6285. var KeepAlive = {
  6286. name: 'keep-alive',
  6287. abstract: true,
  6288. props: {
  6289. include: patternTypes,
  6290. exclude: patternTypes,
  6291. max: [String, Number]
  6292. },
  6293. created: function created () {
  6294. this.cache = Object.create(null);
  6295. this.keys = [];
  6296. },
  6297. destroyed: function destroyed () {
  6298. for (var key in this.cache) {
  6299. pruneCacheEntry(this.cache, key, this.keys);
  6300. }
  6301. },
  6302. mounted: function mounted () {
  6303. var this$1 = this;
  6304. this.$watch('include', function (val) {
  6305. pruneCache(this$1, function (name) { return matches(val, name); });
  6306. });
  6307. this.$watch('exclude', function (val) {
  6308. pruneCache(this$1, function (name) { return !matches(val, name); });
  6309. });
  6310. },
  6311. render: function render () {
  6312. var slot = this.$slots.default;
  6313. var vnode = getFirstComponentChild(slot);
  6314. var componentOptions = vnode && vnode.componentOptions;
  6315. if (componentOptions) {
  6316. // check pattern
  6317. var name = getComponentName(componentOptions);
  6318. var ref = this;
  6319. var include = ref.include;
  6320. var exclude = ref.exclude;
  6321. if (
  6322. // not included
  6323. (include && (!name || !matches(include, name))) ||
  6324. // excluded
  6325. (exclude && name && matches(exclude, name))
  6326. ) {
  6327. return vnode
  6328. }
  6329. var ref$1 = this;
  6330. var cache = ref$1.cache;
  6331. var keys = ref$1.keys;
  6332. var key = vnode.key == null
  6333. // same constructor may get registered as different local components
  6334. // so cid alone is not enough (#3269)
  6335. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  6336. : vnode.key;
  6337. if (cache[key]) {
  6338. vnode.componentInstance = cache[key].componentInstance;
  6339. // make current key freshest
  6340. remove(keys, key);
  6341. keys.push(key);
  6342. } else {
  6343. cache[key] = vnode;
  6344. keys.push(key);
  6345. // prune oldest entry
  6346. if (this.max && keys.length > parseInt(this.max)) {
  6347. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  6348. }
  6349. }
  6350. vnode.data.keepAlive = true;
  6351. }
  6352. return vnode || (slot && slot[0])
  6353. }
  6354. };
  6355. var builtInComponents = {
  6356. KeepAlive: KeepAlive
  6357. };
  6358. /* */
  6359. function initGlobalAPI (Vue) {
  6360. // config
  6361. var configDef = {};
  6362. configDef.get = function () { return config; };
  6363. if (true) {
  6364. configDef.set = function () {
  6365. warn(
  6366. 'Do not replace the Vue.config object, set individual fields instead.'
  6367. );
  6368. };
  6369. }
  6370. Object.defineProperty(Vue, 'config', configDef);
  6371. // exposed util methods.
  6372. // NOTE: these are not considered part of the public API - avoid relying on
  6373. // them unless you are aware of the risk.
  6374. Vue.util = {
  6375. warn: warn,
  6376. extend: extend,
  6377. mergeOptions: mergeOptions,
  6378. defineReactive: defineReactive$$1
  6379. };
  6380. Vue.set = set;
  6381. Vue.delete = del;
  6382. Vue.nextTick = nextTick;
  6383. // 2.6 explicit observable API
  6384. Vue.observable = function (obj) {
  6385. observe(obj);
  6386. return obj
  6387. };
  6388. Vue.options = Object.create(null);
  6389. ASSET_TYPES.forEach(function (type) {
  6390. Vue.options[type + 's'] = Object.create(null);
  6391. });
  6392. // this is used to identify the "base" constructor to extend all plain-object
  6393. // components with in Weex's multi-instance scenarios.
  6394. Vue.options._base = Vue;
  6395. extend(Vue.options.components, builtInComponents);
  6396. initUse(Vue);
  6397. initMixin$1(Vue);
  6398. initExtend(Vue);
  6399. initAssetRegisters(Vue);
  6400. }
  6401. initGlobalAPI(Vue);
  6402. Object.defineProperty(Vue.prototype, '$isServer', {
  6403. get: isServerRendering
  6404. });
  6405. Object.defineProperty(Vue.prototype, '$ssrContext', {
  6406. get: function get () {
  6407. /* istanbul ignore next */
  6408. return this.$vnode && this.$vnode.ssrContext
  6409. }
  6410. });
  6411. // expose FunctionalRenderContext for ssr runtime helper installation
  6412. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  6413. value: FunctionalRenderContext
  6414. });
  6415. Vue.version = '2.6.11';
  6416. /**
  6417. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  6418. */
  6419. var ARRAYTYPE = '[object Array]';
  6420. var OBJECTTYPE = '[object Object]';
  6421. // const FUNCTIONTYPE = '[object Function]'
  6422. function diff(current, pre) {
  6423. var result = {};
  6424. syncKeys(current, pre);
  6425. _diff(current, pre, '', result);
  6426. return result
  6427. }
  6428. function syncKeys(current, pre) {
  6429. if (current === pre) { return }
  6430. var rootCurrentType = type(current);
  6431. var rootPreType = type(pre);
  6432. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  6433. if(Object.keys(current).length >= Object.keys(pre).length){
  6434. for (var key in pre) {
  6435. var currentValue = current[key];
  6436. if (currentValue === undefined) {
  6437. current[key] = null;
  6438. } else {
  6439. syncKeys(currentValue, pre[key]);
  6440. }
  6441. }
  6442. }
  6443. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  6444. if (current.length >= pre.length) {
  6445. pre.forEach(function (item, index) {
  6446. syncKeys(current[index], item);
  6447. });
  6448. }
  6449. }
  6450. }
  6451. function _diff(current, pre, path, result) {
  6452. if (current === pre) { return }
  6453. var rootCurrentType = type(current);
  6454. var rootPreType = type(pre);
  6455. if (rootCurrentType == OBJECTTYPE) {
  6456. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  6457. setResult(result, path, current);
  6458. } else {
  6459. var loop = function ( key ) {
  6460. var currentValue = current[key];
  6461. var preValue = pre[key];
  6462. var currentType = type(currentValue);
  6463. var preType = type(preValue);
  6464. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  6465. if (currentValue != pre[key]) {
  6466. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6467. }
  6468. } else if (currentType == ARRAYTYPE) {
  6469. if (preType != ARRAYTYPE) {
  6470. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6471. } else {
  6472. if (currentValue.length < preValue.length) {
  6473. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6474. } else {
  6475. currentValue.forEach(function (item, index) {
  6476. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  6477. });
  6478. }
  6479. }
  6480. } else if (currentType == OBJECTTYPE) {
  6481. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  6482. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  6483. } else {
  6484. for (var subKey in currentValue) {
  6485. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  6486. }
  6487. }
  6488. }
  6489. };
  6490. for (var key in current) loop( key );
  6491. }
  6492. } else if (rootCurrentType == ARRAYTYPE) {
  6493. if (rootPreType != ARRAYTYPE) {
  6494. setResult(result, path, current);
  6495. } else {
  6496. if (current.length < pre.length) {
  6497. setResult(result, path, current);
  6498. } else {
  6499. current.forEach(function (item, index) {
  6500. _diff(item, pre[index], path + '[' + index + ']', result);
  6501. });
  6502. }
  6503. }
  6504. } else {
  6505. setResult(result, path, current);
  6506. }
  6507. }
  6508. function setResult(result, k, v) {
  6509. // if (type(v) != FUNCTIONTYPE) {
  6510. result[k] = v;
  6511. // }
  6512. }
  6513. function type(obj) {
  6514. return Object.prototype.toString.call(obj)
  6515. }
  6516. /* */
  6517. function flushCallbacks$1(vm) {
  6518. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  6519. if (Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  6520. var mpInstance = vm.$scope;
  6521. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  6522. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  6523. }
  6524. var copies = vm.__next_tick_callbacks.slice(0);
  6525. vm.__next_tick_callbacks.length = 0;
  6526. for (var i = 0; i < copies.length; i++) {
  6527. copies[i]();
  6528. }
  6529. }
  6530. }
  6531. function hasRenderWatcher(vm) {
  6532. return queue.find(function (watcher) { return vm._watcher === watcher; })
  6533. }
  6534. function nextTick$1(vm, cb) {
  6535. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  6536. //2.nextTick 之前存在 render watcher
  6537. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  6538. if(Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  6539. var mpInstance = vm.$scope;
  6540. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  6541. ']:nextVueTick');
  6542. }
  6543. return nextTick(cb, vm)
  6544. }else{
  6545. if(Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  6546. var mpInstance$1 = vm.$scope;
  6547. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  6548. ']:nextMPTick');
  6549. }
  6550. }
  6551. var _resolve;
  6552. if (!vm.__next_tick_callbacks) {
  6553. vm.__next_tick_callbacks = [];
  6554. }
  6555. vm.__next_tick_callbacks.push(function () {
  6556. if (cb) {
  6557. try {
  6558. cb.call(vm);
  6559. } catch (e) {
  6560. handleError(e, vm, 'nextTick');
  6561. }
  6562. } else if (_resolve) {
  6563. _resolve(vm);
  6564. }
  6565. });
  6566. // $flow-disable-line
  6567. if (!cb && typeof Promise !== 'undefined') {
  6568. return new Promise(function (resolve) {
  6569. _resolve = resolve;
  6570. })
  6571. }
  6572. }
  6573. /* */
  6574. function cloneWithData(vm) {
  6575. // 确保当前 vm 所有数据被同步
  6576. var ret = Object.create(null);
  6577. var dataKeys = [].concat(
  6578. Object.keys(vm._data || {}),
  6579. Object.keys(vm._computedWatchers || {}));
  6580. dataKeys.reduce(function(ret, key) {
  6581. ret[key] = vm[key];
  6582. return ret
  6583. }, ret);
  6584. // vue-composition-api
  6585. var rawBindings = vm.__secret_vfa_state__ && vm.__secret_vfa_state__.rawBindings;
  6586. if (rawBindings) {
  6587. Object.keys(rawBindings).forEach(function (key) {
  6588. ret[key] = vm[key];
  6589. });
  6590. }
  6591. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  6592. Object.assign(ret, vm.$mp.data || {});
  6593. if (
  6594. Array.isArray(vm.$options.behaviors) &&
  6595. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  6596. ) { //form-field
  6597. ret['name'] = vm.name;
  6598. ret['value'] = vm.value;
  6599. }
  6600. return JSON.parse(JSON.stringify(ret))
  6601. }
  6602. var patch = function(oldVnode, vnode) {
  6603. var this$1 = this;
  6604. if (vnode === null) { //destroy
  6605. return
  6606. }
  6607. if (this.mpType === 'page' || this.mpType === 'component') {
  6608. var mpInstance = this.$scope;
  6609. var data = Object.create(null);
  6610. try {
  6611. data = cloneWithData(this);
  6612. } catch (err) {
  6613. console.error(err);
  6614. }
  6615. data.__webviewId__ = mpInstance.data.__webviewId__;
  6616. var mpData = Object.create(null);
  6617. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  6618. mpData[key] = mpInstance.data[key];
  6619. });
  6620. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  6621. if (Object.keys(diffData).length) {
  6622. if (Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  6623. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  6624. ']差量更新',
  6625. JSON.stringify(diffData));
  6626. }
  6627. this.__next_tick_pending = true;
  6628. mpInstance.setData(diffData, function () {
  6629. this$1.__next_tick_pending = false;
  6630. flushCallbacks$1(this$1);
  6631. });
  6632. } else {
  6633. flushCallbacks$1(this);
  6634. }
  6635. }
  6636. };
  6637. /* */
  6638. function createEmptyRender() {
  6639. }
  6640. function mountComponent$1(
  6641. vm,
  6642. el,
  6643. hydrating
  6644. ) {
  6645. if (!vm.mpType) {//main.js 中的 new Vue
  6646. return vm
  6647. }
  6648. if (vm.mpType === 'app') {
  6649. vm.$options.render = createEmptyRender;
  6650. }
  6651. if (!vm.$options.render) {
  6652. vm.$options.render = createEmptyRender;
  6653. if (true) {
  6654. /* istanbul ignore if */
  6655. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  6656. vm.$options.el || el) {
  6657. warn(
  6658. 'You are using the runtime-only build of Vue where the template ' +
  6659. 'compiler is not available. Either pre-compile the templates into ' +
  6660. 'render functions, or use the compiler-included build.',
  6661. vm
  6662. );
  6663. } else {
  6664. warn(
  6665. 'Failed to mount component: template or render function not defined.',
  6666. vm
  6667. );
  6668. }
  6669. }
  6670. }
  6671. !vm._$fallback && callHook(vm, 'beforeMount');
  6672. var updateComponent = function () {
  6673. vm._update(vm._render(), hydrating);
  6674. };
  6675. // we set this to vm._watcher inside the watcher's constructor
  6676. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  6677. // component's mounted hook), which relies on vm._watcher being already defined
  6678. new Watcher(vm, updateComponent, noop, {
  6679. before: function before() {
  6680. if (vm._isMounted && !vm._isDestroyed) {
  6681. callHook(vm, 'beforeUpdate');
  6682. }
  6683. }
  6684. }, true /* isRenderWatcher */);
  6685. hydrating = false;
  6686. return vm
  6687. }
  6688. /* */
  6689. function renderClass (
  6690. staticClass,
  6691. dynamicClass
  6692. ) {
  6693. if (isDef(staticClass) || isDef(dynamicClass)) {
  6694. return concat(staticClass, stringifyClass(dynamicClass))
  6695. }
  6696. /* istanbul ignore next */
  6697. return ''
  6698. }
  6699. function concat (a, b) {
  6700. return a ? b ? (a + ' ' + b) : a : (b || '')
  6701. }
  6702. function stringifyClass (value) {
  6703. if (Array.isArray(value)) {
  6704. return stringifyArray(value)
  6705. }
  6706. if (isObject(value)) {
  6707. return stringifyObject(value)
  6708. }
  6709. if (typeof value === 'string') {
  6710. return value
  6711. }
  6712. /* istanbul ignore next */
  6713. return ''
  6714. }
  6715. function stringifyArray (value) {
  6716. var res = '';
  6717. var stringified;
  6718. for (var i = 0, l = value.length; i < l; i++) {
  6719. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  6720. if (res) { res += ' '; }
  6721. res += stringified;
  6722. }
  6723. }
  6724. return res
  6725. }
  6726. function stringifyObject (value) {
  6727. var res = '';
  6728. for (var key in value) {
  6729. if (value[key]) {
  6730. if (res) { res += ' '; }
  6731. res += key;
  6732. }
  6733. }
  6734. return res
  6735. }
  6736. /* */
  6737. var parseStyleText = cached(function (cssText) {
  6738. var res = {};
  6739. var listDelimiter = /;(?![^(]*\))/g;
  6740. var propertyDelimiter = /:(.+)/;
  6741. cssText.split(listDelimiter).forEach(function (item) {
  6742. if (item) {
  6743. var tmp = item.split(propertyDelimiter);
  6744. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  6745. }
  6746. });
  6747. return res
  6748. });
  6749. // normalize possible array / string values into Object
  6750. function normalizeStyleBinding (bindingStyle) {
  6751. if (Array.isArray(bindingStyle)) {
  6752. return toObject(bindingStyle)
  6753. }
  6754. if (typeof bindingStyle === 'string') {
  6755. return parseStyleText(bindingStyle)
  6756. }
  6757. return bindingStyle
  6758. }
  6759. /* */
  6760. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  6761. function getTarget(obj, path) {
  6762. var parts = path.split('.');
  6763. var key = parts[0];
  6764. if (key.indexOf('__$n') === 0) { //number index
  6765. key = parseInt(key.replace('__$n', ''));
  6766. }
  6767. if (parts.length === 1) {
  6768. return obj[key]
  6769. }
  6770. return getTarget(obj[key], parts.slice(1).join('.'))
  6771. }
  6772. function internalMixin(Vue) {
  6773. Vue.config.errorHandler = function(err, vm, info) {
  6774. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  6775. console.error(err);
  6776. /* eslint-disable no-undef */
  6777. var app = getApp();
  6778. if (app && app.onError) {
  6779. app.onError(err);
  6780. }
  6781. };
  6782. var oldEmit = Vue.prototype.$emit;
  6783. Vue.prototype.$emit = function(event) {
  6784. if (this.$scope && event) {
  6785. this.$scope['triggerEvent'](event, {
  6786. __args__: toArray(arguments, 1)
  6787. });
  6788. }
  6789. return oldEmit.apply(this, arguments)
  6790. };
  6791. Vue.prototype.$nextTick = function(fn) {
  6792. return nextTick$1(this, fn)
  6793. };
  6794. MP_METHODS.forEach(function (method) {
  6795. Vue.prototype[method] = function(args) {
  6796. if (this.$scope && this.$scope[method]) {
  6797. return this.$scope[method](args)
  6798. }
  6799. // mp-alipay
  6800. if (typeof my === 'undefined') {
  6801. return
  6802. }
  6803. if (method === 'createSelectorQuery') {
  6804. /* eslint-disable no-undef */
  6805. return my.createSelectorQuery(args)
  6806. } else if (method === 'createIntersectionObserver') {
  6807. /* eslint-disable no-undef */
  6808. return my.createIntersectionObserver(args)
  6809. }
  6810. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  6811. };
  6812. });
  6813. Vue.prototype.__init_provide = initProvide;
  6814. Vue.prototype.__init_injections = initInjections;
  6815. Vue.prototype.__call_hook = function(hook, args) {
  6816. var vm = this;
  6817. // #7573 disable dep collection when invoking lifecycle hooks
  6818. pushTarget();
  6819. var handlers = vm.$options[hook];
  6820. var info = hook + " hook";
  6821. var ret;
  6822. if (handlers) {
  6823. for (var i = 0, j = handlers.length; i < j; i++) {
  6824. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  6825. }
  6826. }
  6827. if (vm._hasHookEvent) {
  6828. vm.$emit('hook:' + hook, args);
  6829. }
  6830. popTarget();
  6831. return ret
  6832. };
  6833. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  6834. if (Array.isArray(modifiers)) {
  6835. if (modifiers.indexOf('trim') !== -1) {
  6836. value = value.trim();
  6837. }
  6838. if (modifiers.indexOf('number') !== -1) {
  6839. value = this._n(value);
  6840. }
  6841. }
  6842. if (!target) {
  6843. target = this;
  6844. }
  6845. target[key] = value;
  6846. };
  6847. Vue.prototype.__set_sync = function(target, key, value) {
  6848. if (!target) {
  6849. target = this;
  6850. }
  6851. target[key] = value;
  6852. };
  6853. Vue.prototype.__get_orig = function(item) {
  6854. if (isPlainObject(item)) {
  6855. return item['$orig'] || item
  6856. }
  6857. return item
  6858. };
  6859. Vue.prototype.__get_value = function(dataPath, target) {
  6860. return getTarget(target || this, dataPath)
  6861. };
  6862. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  6863. return renderClass(staticClass, dynamicClass)
  6864. };
  6865. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  6866. if (!dynamicStyle && !staticStyle) {
  6867. return ''
  6868. }
  6869. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  6870. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  6871. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  6872. };
  6873. Vue.prototype.__map = function(val, iteratee) {
  6874. //TODO 暂不考虑 string
  6875. var ret, i, l, keys, key;
  6876. if (Array.isArray(val)) {
  6877. ret = new Array(val.length);
  6878. for (i = 0, l = val.length; i < l; i++) {
  6879. ret[i] = iteratee(val[i], i);
  6880. }
  6881. return ret
  6882. } else if (isObject(val)) {
  6883. keys = Object.keys(val);
  6884. ret = Object.create(null);
  6885. for (i = 0, l = keys.length; i < l; i++) {
  6886. key = keys[i];
  6887. ret[key] = iteratee(val[key], key, i);
  6888. }
  6889. return ret
  6890. } else if (typeof val === 'number') {
  6891. ret = new Array(val);
  6892. for (i = 0, l = val; i < l; i++) {
  6893. // 第一个参数暂时仍和小程序一致
  6894. ret[i] = iteratee(i, i);
  6895. }
  6896. return ret
  6897. }
  6898. return []
  6899. };
  6900. }
  6901. /* */
  6902. var LIFECYCLE_HOOKS$1 = [
  6903. //App
  6904. 'onLaunch',
  6905. 'onShow',
  6906. 'onHide',
  6907. 'onUniNViewMessage',
  6908. 'onPageNotFound',
  6909. 'onThemeChange',
  6910. 'onError',
  6911. 'onUnhandledRejection',
  6912. //Page
  6913. 'onLoad',
  6914. // 'onShow',
  6915. 'onReady',
  6916. // 'onHide',
  6917. 'onUnload',
  6918. 'onPullDownRefresh',
  6919. 'onReachBottom',
  6920. 'onTabItemTap',
  6921. 'onAddToFavorites',
  6922. 'onShareTimeline',
  6923. 'onShareAppMessage',
  6924. 'onResize',
  6925. 'onPageScroll',
  6926. 'onNavigationBarButtonTap',
  6927. 'onBackPress',
  6928. 'onNavigationBarSearchInputChanged',
  6929. 'onNavigationBarSearchInputConfirmed',
  6930. 'onNavigationBarSearchInputClicked',
  6931. //Component
  6932. // 'onReady', // 兼容旧版本,应该移除该事件
  6933. 'onPageShow',
  6934. 'onPageHide',
  6935. 'onPageResize'
  6936. ];
  6937. function lifecycleMixin$1(Vue) {
  6938. //fixed vue-class-component
  6939. var oldExtend = Vue.extend;
  6940. Vue.extend = function(extendOptions) {
  6941. extendOptions = extendOptions || {};
  6942. var methods = extendOptions.methods;
  6943. if (methods) {
  6944. Object.keys(methods).forEach(function (methodName) {
  6945. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  6946. extendOptions[methodName] = methods[methodName];
  6947. delete methods[methodName];
  6948. }
  6949. });
  6950. }
  6951. return oldExtend.call(this, extendOptions)
  6952. };
  6953. var strategies = Vue.config.optionMergeStrategies;
  6954. var mergeHook = strategies.created;
  6955. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  6956. strategies[hook] = mergeHook;
  6957. });
  6958. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  6959. }
  6960. /* */
  6961. // install platform patch function
  6962. Vue.prototype.__patch__ = patch;
  6963. // public mount method
  6964. Vue.prototype.$mount = function(
  6965. el ,
  6966. hydrating
  6967. ) {
  6968. return mountComponent$1(this, el, hydrating)
  6969. };
  6970. lifecycleMixin$1(Vue);
  6971. internalMixin(Vue);
  6972. /* */
  6973. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  6974. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  6975. /***/ }),
  6976. /* 3 */
  6977. /*!***********************************!*\
  6978. !*** (webpack)/buildin/global.js ***!
  6979. \***********************************/
  6980. /*! no static exports found */
  6981. /***/ (function(module, exports) {
  6982. var g;
  6983. // This works in non-strict mode
  6984. g = (function() {
  6985. return this;
  6986. })();
  6987. try {
  6988. // This works if eval is allowed (see CSP)
  6989. g = g || new Function("return this")();
  6990. } catch (e) {
  6991. // This works if the window reference is available
  6992. if (typeof window === "object") g = window;
  6993. }
  6994. // g can still be undefined, but nothing to do about it...
  6995. // We return undefined, instead of nothing here, so it's
  6996. // easier to handle this case. if(!global) { ...}
  6997. module.exports = g;
  6998. /***/ }),
  6999. /* 4 */
  7000. /*!********************************************************!*\
  7001. !*** D:/66/AAwork/anti-fake/fangwei-select/pages.json ***!
  7002. \********************************************************/
  7003. /*! no static exports found */
  7004. /***/ (function(module, exports) {
  7005. /***/ }),
  7006. /* 5 */,
  7007. /* 6 */,
  7008. /* 7 */,
  7009. /* 8 */,
  7010. /* 9 */,
  7011. /* 10 */
  7012. /*!**********************************************************************************************************!*\
  7013. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  7014. \**********************************************************************************************************/
  7015. /*! exports provided: default */
  7016. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  7017. "use strict";
  7018. __webpack_require__.r(__webpack_exports__);
  7019. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  7020. /* globals __VUE_SSR_CONTEXT__ */
  7021. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  7022. // This module is a runtime utility for cleaner component module output and will
  7023. // be included in the final webpack user bundle.
  7024. function normalizeComponent (
  7025. scriptExports,
  7026. render,
  7027. staticRenderFns,
  7028. functionalTemplate,
  7029. injectStyles,
  7030. scopeId,
  7031. moduleIdentifier, /* server only */
  7032. shadowMode, /* vue-cli only */
  7033. components, // fixed by xxxxxx auto components
  7034. renderjs // fixed by xxxxxx renderjs
  7035. ) {
  7036. // Vue.extend constructor export interop
  7037. var options = typeof scriptExports === 'function'
  7038. ? scriptExports.options
  7039. : scriptExports
  7040. // fixed by xxxxxx auto components
  7041. if (components) {
  7042. if (!options.components) {
  7043. options.components = {}
  7044. }
  7045. var hasOwn = Object.prototype.hasOwnProperty
  7046. for (var name in components) {
  7047. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  7048. options.components[name] = components[name]
  7049. }
  7050. }
  7051. }
  7052. // fixed by xxxxxx renderjs
  7053. if (renderjs) {
  7054. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  7055. this[renderjs.__module] = this
  7056. });
  7057. (options.mixins || (options.mixins = [])).push(renderjs)
  7058. }
  7059. // render functions
  7060. if (render) {
  7061. options.render = render
  7062. options.staticRenderFns = staticRenderFns
  7063. options._compiled = true
  7064. }
  7065. // functional template
  7066. if (functionalTemplate) {
  7067. options.functional = true
  7068. }
  7069. // scopedId
  7070. if (scopeId) {
  7071. options._scopeId = 'data-v-' + scopeId
  7072. }
  7073. var hook
  7074. if (moduleIdentifier) { // server build
  7075. hook = function (context) {
  7076. // 2.3 injection
  7077. context =
  7078. context || // cached call
  7079. (this.$vnode && this.$vnode.ssrContext) || // stateful
  7080. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  7081. // 2.2 with runInNewContext: true
  7082. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  7083. context = __VUE_SSR_CONTEXT__
  7084. }
  7085. // inject component styles
  7086. if (injectStyles) {
  7087. injectStyles.call(this, context)
  7088. }
  7089. // register component module identifier for async chunk inferrence
  7090. if (context && context._registeredComponents) {
  7091. context._registeredComponents.add(moduleIdentifier)
  7092. }
  7093. }
  7094. // used by ssr in case component is cached and beforeCreate
  7095. // never gets called
  7096. options._ssrRegister = hook
  7097. } else if (injectStyles) {
  7098. hook = shadowMode
  7099. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  7100. : injectStyles
  7101. }
  7102. if (hook) {
  7103. if (options.functional) {
  7104. // for template-only hot-reload because in that case the render fn doesn't
  7105. // go through the normalizer
  7106. options._injectStyles = hook
  7107. // register for functioal component in vue file
  7108. var originalRender = options.render
  7109. options.render = function renderWithStyleInjection (h, context) {
  7110. hook.call(context)
  7111. return originalRender(h, context)
  7112. }
  7113. } else {
  7114. // inject component registration as beforeCreate hook
  7115. var existing = options.beforeCreate
  7116. options.beforeCreate = existing
  7117. ? [].concat(existing, hook)
  7118. : [hook]
  7119. }
  7120. }
  7121. return {
  7122. exports: scriptExports,
  7123. options: options
  7124. }
  7125. }
  7126. /***/ }),
  7127. /* 11 */
  7128. /*!****************************************************************************!*\
  7129. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/index.js ***!
  7130. \****************************************************************************/
  7131. /*! no static exports found */
  7132. /***/ (function(module, exports, __webpack_require__) {
  7133. "use strict";
  7134. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  7135. var _mixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mixin.js */ 12));
  7136. var _request = _interopRequireDefault(__webpack_require__(/*! ./libs/request */ 13));
  7137. var _queryParams = _interopRequireDefault(__webpack_require__(/*! ./libs/function/queryParams.js */ 17));
  7138. var _route = _interopRequireDefault(__webpack_require__(/*! ./libs/function/route.js */ 18));
  7139. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFormat.js */ 19));
  7140. var _timeFrom = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFrom.js */ 20));
  7141. var _colorGradient = _interopRequireDefault(__webpack_require__(/*! ./libs/function/colorGradient.js */ 21));
  7142. var _guid = _interopRequireDefault(__webpack_require__(/*! ./libs/function/guid.js */ 22));
  7143. var _color = _interopRequireDefault(__webpack_require__(/*! ./libs/function/color.js */ 23));
  7144. var _type2icon = _interopRequireDefault(__webpack_require__(/*! ./libs/function/type2icon.js */ 24));
  7145. var _randomArray = _interopRequireDefault(__webpack_require__(/*! ./libs/function/randomArray.js */ 25));
  7146. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepClone.js */ 15));
  7147. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepMerge.js */ 14));
  7148. var _addUnit = _interopRequireDefault(__webpack_require__(/*! ./libs/function/addUnit.js */ 26));
  7149. var _test = _interopRequireDefault(__webpack_require__(/*! ./libs/function/test.js */ 16));
  7150. var _random = _interopRequireDefault(__webpack_require__(/*! ./libs/function/random.js */ 27));
  7151. var _trim = _interopRequireDefault(__webpack_require__(/*! ./libs/function/trim.js */ 28));
  7152. var _toast = _interopRequireDefault(__webpack_require__(/*! ./libs/function/toast.js */ 29));
  7153. var _getParent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/getParent.js */ 30));
  7154. var _$parent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/$parent.js */ 31));
  7155. var _sys = __webpack_require__(/*! ./libs/function/sys.js */ 32);
  7156. var _debounce = _interopRequireDefault(__webpack_require__(/*! ./libs/function/debounce.js */ 33));
  7157. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./libs/function/throttle.js */ 34));
  7158. var _config = _interopRequireDefault(__webpack_require__(/*! ./libs/config/config.js */ 35));
  7159. var _zIndex = _interopRequireDefault(__webpack_require__(/*! ./libs/config/zIndex.js */ 36));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} // 引入全局mixin
  7160. // 引入关于是否mixin集成小程序分享的配置
  7161. // import wxshare from './libs/mixin/mpShare.js'
  7162. // 全局挂载引入http相关请求拦截插件
  7163. function wranning(str) {// 开发环境进行信息输出,主要是一些报错信息
  7164. // 这个环境的来由是在程序编写时候,点击hx编辑器运行调试代码的时候,详见:
  7165. // https://uniapp.dcloud.io/frame?id=%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%92%8c%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83
  7166. if (true) {console.warn(str);}} // 尝试判断在根目录的/store中是否有$u.mixin.js,此文件uView默认为需要挂在到全局的vuex的state变量
  7167. // HX2.6.11版本,放到try中,控制台依然会警告,暂时不用此方式,
  7168. // let vuexStore = {};
  7169. // try {
  7170. // vuexStore = require("@/store/$u.mixin.js");
  7171. // } catch (e) {
  7172. // //TODO handle the exception
  7173. // }
  7174. // post类型对象参数转为get类型url参数
  7175. var $u = { queryParams: _queryParams.default, route: _route.default, timeFormat: _timeFormat.default, date: _timeFormat.default, // 另名date
  7176. timeFrom: _timeFrom.default, colorGradient: _colorGradient.default.colorGradient, guid: _guid.default, color: _color.default, sys: _sys.sys, os: _sys.os, type2icon: _type2icon.default, randomArray: _randomArray.default, wranning: wranning, get: _request.default.get, post: _request.default.post,
  7177. put: _request.default.put,
  7178. 'delete': _request.default.delete,
  7179. hexToRgb: _colorGradient.default.hexToRgb,
  7180. rgbToHex: _colorGradient.default.rgbToHex,
  7181. test: _test.default,
  7182. random: _random.default,
  7183. deepClone: _deepClone.default,
  7184. deepMerge: _deepMerge.default,
  7185. getParent: _getParent.default,
  7186. $parent: _$parent.default,
  7187. addUnit: _addUnit.default,
  7188. trim: _trim.default,
  7189. type: ['primary', 'success', 'error', 'warning', 'info'],
  7190. http: _request.default,
  7191. toast: _toast.default,
  7192. config: _config.default, // uView配置信息相关,比如版本号
  7193. zIndex: _zIndex.default,
  7194. debounce: _debounce.default,
  7195. throttle: _throttle.default };
  7196. var install = function install(Vue) {
  7197. Vue.mixin(_mixin.default);
  7198. if (Vue.prototype.openShare) {
  7199. Vue.mixin(mpShare);
  7200. }
  7201. // Vue.mixin(vuexStore);
  7202. // 时间格式化,同时两个名称,date和timeFormat
  7203. Vue.filter('timeFormat', function (timestamp, format) {
  7204. return (0, _timeFormat.default)(timestamp, format);
  7205. });
  7206. Vue.filter('date', function (timestamp, format) {
  7207. return (0, _timeFormat.default)(timestamp, format);
  7208. });
  7209. // 将多久以前的方法,注入到全局过滤器
  7210. Vue.filter('timeFrom', function (timestamp, format) {
  7211. return (0, _timeFrom.default)(timestamp, format);
  7212. });
  7213. Vue.prototype.$u = $u;
  7214. };var _default =
  7215. {
  7216. install: install };exports.default = _default;
  7217. /***/ }),
  7218. /* 12 */
  7219. /*!***************************************************************************************!*\
  7220. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/mixin/mixin.js ***!
  7221. \***************************************************************************************/
  7222. /*! no static exports found */
  7223. /***/ (function(module, exports, __webpack_require__) {
  7224. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  7225. data: function data() {
  7226. return {};
  7227. },
  7228. onLoad: function onLoad() {
  7229. // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
  7230. this.$u.getRect = this.$uGetRect;
  7231. },
  7232. methods: {
  7233. // 查询节点信息
  7234. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  7235. // 解决办法为在组件根部再套一个没有任何作用的view元素
  7236. $uGetRect: function $uGetRect(selector, all) {var _this = this;
  7237. return new Promise(function (resolve) {
  7238. uni.createSelectorQuery().
  7239. in(_this)[all ? 'selectAll' : 'select'](selector).
  7240. boundingClientRect(function (rect) {
  7241. if (all && Array.isArray(rect) && rect.length) {
  7242. resolve(rect);
  7243. }
  7244. if (!all && rect) {
  7245. resolve(rect);
  7246. }
  7247. }).
  7248. exec();
  7249. });
  7250. },
  7251. getParentData: function getParentData() {var _this2 = this;var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  7252. // 避免在created中去定义parent变量
  7253. if (!this.parent) this.parent = false;
  7254. // 这里的本质原理是,通过获取父组件实例(也即u-radio-group的this)
  7255. // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
  7256. // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
  7257. this.parent = this.$u.$parent.call(this, parentName);
  7258. if (this.parent) {
  7259. // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
  7260. Object.keys(this.parentData).map(function (key) {
  7261. _this2.parentData[key] = _this2.parent[key];
  7262. });
  7263. }
  7264. } },
  7265. onReachBottom: function onReachBottom() {
  7266. uni.$emit('uOnReachBottom');
  7267. } };
  7268. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  7269. /***/ }),
  7270. /* 13 */
  7271. /*!*****************************************************************************************!*\
  7272. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/request/index.js ***!
  7273. \*****************************************************************************************/
  7274. /*! no static exports found */
  7275. /***/ (function(module, exports, __webpack_require__) {
  7276. "use strict";
  7277. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ../function/deepMerge */ 14));
  7278. var _test = _interopRequireDefault(__webpack_require__(/*! ../function/test */ 16));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: 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;}var
  7279. Request = /*#__PURE__*/function () {_createClass(Request, [{ key: "setConfig",
  7280. // 设置全局默认配置
  7281. value: function setConfig(customConfig) {
  7282. // 深度合并对象,否则会造成对象深层属性丢失
  7283. this.config = (0, _deepMerge.default)(this.config, customConfig);
  7284. }
  7285. // 主要请求部分
  7286. }, { key: "request", value: function request() {var _this = this;var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  7287. // 检查请求拦截
  7288. if (this.interceptor.request && typeof this.interceptor.request === 'function') {
  7289. var tmpConfig = {};
  7290. var interceptorRequest = this.interceptor.request(options);
  7291. if (interceptorRequest === false) {
  7292. // 返回一个处于pending状态中的Promise,来取消原promise,避免进入then()回调
  7293. return new Promise(function () {});
  7294. }
  7295. this.options = interceptorRequest;
  7296. }
  7297. options.dataType = options.dataType || this.config.dataType;
  7298. options.responseType = options.responseType || this.config.responseType;
  7299. options.url = options.url || '';
  7300. options.params = options.params || {};
  7301. options.header = Object.assign(this.config.header, options.header);
  7302. options.method = options.method || this.config.method;
  7303. return new Promise(function (resolve, reject) {
  7304. options.complete = function (response) {
  7305. // 请求返回后,隐藏loading(如果请求返回快的话,可能会没有loading)
  7306. uni.hideLoading();
  7307. // 清除定时器,如果请求回来了,就无需loading
  7308. clearTimeout(_this.config.timer);
  7309. _this.config.timer = null;
  7310. // 判断用户对拦截返回数据的要求,如果originalData为true,返回所有的数据(response)到拦截器,否则只返回response.data
  7311. if (_this.config.originalData) {
  7312. // 判断是否存在拦截器
  7313. if (_this.interceptor.response && typeof _this.interceptor.response === 'function') {
  7314. var resInterceptors = _this.interceptor.response(response);
  7315. // 如果拦截器不返回false,就将拦截器返回的内容给this.$u.post的then回调
  7316. if (resInterceptors !== false) {
  7317. resolve(resInterceptors);
  7318. } else {
  7319. // 如果拦截器返回false,意味着拦截器定义者认为返回有问题,直接接入catch回调
  7320. reject(response);
  7321. }
  7322. } else {
  7323. // 如果要求返回原始数据,就算没有拦截器,也返回最原始的数据
  7324. resolve(response);
  7325. }
  7326. } else {
  7327. if (response.statusCode == 200) {
  7328. if (_this.interceptor.response && typeof _this.interceptor.response === 'function') {
  7329. var _resInterceptors = _this.interceptor.response(response.data);
  7330. if (_resInterceptors !== false) {
  7331. resolve(_resInterceptors);
  7332. } else {
  7333. reject(response.data);
  7334. }
  7335. } else {
  7336. // 如果不是返回原始数据(originalData=false),且没有拦截器的情况下,返回纯数据给then回调
  7337. resolve(response.data);
  7338. }
  7339. } else {
  7340. // 不返回原始数据的情况下,服务器状态码不为200,modal弹框提示
  7341. // if(response.errMsg) {
  7342. // uni.showModal({
  7343. // title: response.errMsg
  7344. // });
  7345. // }
  7346. reject(response);
  7347. }
  7348. }
  7349. };
  7350. // 判断用户传递的URL是否/开头,如果不是,加上/,这里使用了uView的test.js验证库的url()方法
  7351. options.url = _test.default.url(options.url) ? options.url : _this.config.baseUrl + (options.url.indexOf('/') == 0 ?
  7352. options.url : '/' + options.url);
  7353. // 是否显示loading
  7354. // 加一个是否已有timer定时器的判断,否则有两个同时请求的时候,后者会清除前者的定时器id
  7355. // 而没有清除前者的定时器,导致前者超时,一直显示loading
  7356. if (_this.config.showLoading && !_this.config.timer) {
  7357. _this.config.timer = setTimeout(function () {
  7358. uni.showLoading({
  7359. title: _this.config.loadingText,
  7360. mask: _this.config.loadingMask });
  7361. _this.config.timer = null;
  7362. }, _this.config.loadingTime);
  7363. }
  7364. uni.request(options);
  7365. });
  7366. // .catch(res => {
  7367. // // 如果返回reject(),不让其进入this.$u.post().then().catch()后面的catct()
  7368. // // 因为很多人都会忘了写后面的catch(),导致报错捕获不到catch
  7369. // return new Promise(()=>{});
  7370. // })
  7371. } }]);
  7372. function Request() {var _this2 = this;_classCallCheck(this, Request);
  7373. this.config = {
  7374. baseUrl: '', // 请求的根域名
  7375. // 默认的请求头
  7376. header: {},
  7377. method: 'POST',
  7378. // 设置为json,返回后uni.request会对数据进行一次JSON.parse
  7379. dataType: 'json',
  7380. // 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
  7381. responseType: 'text',
  7382. showLoading: true, // 是否显示请求中的loading
  7383. loadingText: '请求中...',
  7384. loadingTime: 800, // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
  7385. timer: null, // 定时器
  7386. originalData: false, // 是否在拦截器中返回服务端的原始数据,见文档说明
  7387. loadingMask: true // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
  7388. };
  7389. // 拦截器
  7390. this.interceptor = {
  7391. // 请求前的拦截
  7392. request: null,
  7393. // 请求后的拦截
  7394. response: null };
  7395. // get请求
  7396. this.get = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  7397. return _this2.request({
  7398. method: 'GET',
  7399. url: url,
  7400. header: header,
  7401. data: data });
  7402. };
  7403. // post请求
  7404. this.post = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  7405. return _this2.request({
  7406. url: url,
  7407. method: 'POST',
  7408. header: header,
  7409. data: data });
  7410. };
  7411. // put请求,不支持支付宝小程序(HX2.6.15)
  7412. this.put = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  7413. return _this2.request({
  7414. url: url,
  7415. method: 'PUT',
  7416. header: header,
  7417. data: data });
  7418. };
  7419. // delete请求,不支持支付宝和头条小程序(HX2.6.15)
  7420. this.delete = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  7421. return _this2.request({
  7422. url: url,
  7423. method: 'DELETE',
  7424. header: header,
  7425. data: data });
  7426. };
  7427. }return Request;}();var _default =
  7428. new Request();exports.default = _default;
  7429. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  7430. /***/ }),
  7431. /* 14 */
  7432. /*!**********************************************************************************************!*\
  7433. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/deepMerge.js ***!
  7434. \**********************************************************************************************/
  7435. /*! no static exports found */
  7436. /***/ (function(module, exports, __webpack_require__) {
  7437. "use strict";
  7438. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./deepClone */ 15));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  7439. // JS对象深度合并
  7440. function deepMerge() {var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  7441. target = (0, _deepClone.default)(target);
  7442. if (typeof target !== 'object' || typeof source !== 'object') return false;
  7443. for (var prop in source) {
  7444. if (!source.hasOwnProperty(prop)) continue;
  7445. if (prop in target) {
  7446. if (typeof target[prop] !== 'object') {
  7447. target[prop] = source[prop];
  7448. } else {
  7449. if (typeof source[prop] !== 'object') {
  7450. target[prop] = source[prop];
  7451. } else {
  7452. if (target[prop].concat && source[prop].concat) {
  7453. target[prop] = target[prop].concat(source[prop]);
  7454. } else {
  7455. target[prop] = deepMerge(target[prop], source[prop]);
  7456. }
  7457. }
  7458. }
  7459. } else {
  7460. target[prop] = source[prop];
  7461. }
  7462. }
  7463. return target;
  7464. }var _default =
  7465. deepMerge;exports.default = _default;
  7466. /***/ }),
  7467. /* 15 */
  7468. /*!**********************************************************************************************!*\
  7469. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/deepClone.js ***!
  7470. \**********************************************************************************************/
  7471. /*! no static exports found */
  7472. /***/ (function(module, exports, __webpack_require__) {
  7473. "use strict";
  7474. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 判断arr是否为一个数组,返回一个bool值
  7475. function isArray(arr) {
  7476. return Object.prototype.toString.call(arr) === '[object Array]';
  7477. }
  7478. // 深度克隆
  7479. function deepClone(obj) {
  7480. // 对常见的“非”值,直接返回原来值
  7481. if ([null, undefined, NaN, false].includes(obj)) return obj;
  7482. if (typeof obj !== "object" && typeof obj !== 'function') {
  7483. //原始类型直接返回
  7484. return obj;
  7485. }
  7486. var o = isArray(obj) ? [] : {};
  7487. for (var i in obj) {
  7488. if (obj.hasOwnProperty(i)) {
  7489. o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  7490. }
  7491. }
  7492. return o;
  7493. }var _default =
  7494. deepClone;exports.default = _default;
  7495. /***/ }),
  7496. /* 16 */
  7497. /*!*****************************************************************************************!*\
  7498. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/test.js ***!
  7499. \*****************************************************************************************/
  7500. /*! no static exports found */
  7501. /***/ (function(module, exports, __webpack_require__) {
  7502. "use strict";
  7503. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  7504. * 验证电子邮箱格式
  7505. */
  7506. function email(value) {
  7507. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value);
  7508. }
  7509. /**
  7510. * 验证手机格式
  7511. */
  7512. function mobile(value) {
  7513. return /^1[23456789]\d{9}$/.test(value);
  7514. }
  7515. /**
  7516. * 验证URL格式
  7517. */
  7518. function url(value) {
  7519. return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.
  7520. test(value);
  7521. }
  7522. /**
  7523. * 验证日期格式
  7524. */
  7525. function date(value) {
  7526. return !/Invalid|NaN/.test(new Date(value).toString());
  7527. }
  7528. /**
  7529. * 验证ISO类型的日期格式
  7530. */
  7531. function dateISO(value) {
  7532. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  7533. }
  7534. /**
  7535. * 验证十进制数字
  7536. */
  7537. function number(value) {
  7538. return /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);
  7539. }
  7540. /**
  7541. * 验证整数
  7542. */
  7543. function digits(value) {
  7544. return /^\d+$/.test(value);
  7545. }
  7546. /**
  7547. * 验证身份证号码
  7548. */
  7549. function idCard(value) {
  7550. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(
  7551. value);
  7552. }
  7553. /**
  7554. * 是否车牌号
  7555. */
  7556. function carNo(value) {
  7557. // 新能源车牌
  7558. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  7559. // 旧车牌
  7560. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  7561. if (value.length === 7) {
  7562. return creg.test(value);
  7563. } else if (value.length === 8) {
  7564. return xreg.test(value);
  7565. } else {
  7566. return false;
  7567. }
  7568. }
  7569. /**
  7570. * 金额,只允许2位小数
  7571. */
  7572. function amount(value) {
  7573. //金额,只允许保留两位小数
  7574. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  7575. }
  7576. /**
  7577. * 中文
  7578. */
  7579. function chinese(value) {
  7580. var reg = /^[\u4e00-\u9fa5]+$/gi;
  7581. return reg.test(value);
  7582. }
  7583. /**
  7584. * 只能输入字母
  7585. */
  7586. function letter(value) {
  7587. return /^[a-zA-Z]*$/.test(value);
  7588. }
  7589. /**
  7590. * 只能是字母或者数字
  7591. */
  7592. function enOrNum(value) {
  7593. //英文或者数字
  7594. var reg = /^[0-9a-zA-Z]*$/g;
  7595. return reg.test(value);
  7596. }
  7597. /**
  7598. * 验证是否包含某个值
  7599. */
  7600. function contains(value, param) {
  7601. return value.indexOf(param) >= 0;
  7602. }
  7603. /**
  7604. * 验证一个值范围[min, max]
  7605. */
  7606. function range(value, param) {
  7607. return value >= param[0] && value <= param[1];
  7608. }
  7609. /**
  7610. * 验证一个长度范围[min, max]
  7611. */
  7612. function rangeLength(value, param) {
  7613. return value.length >= param[0] && value.length <= param[1];
  7614. }
  7615. /**
  7616. * 是否固定电话
  7617. */
  7618. function landline(value) {
  7619. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  7620. return reg.test(value);
  7621. }
  7622. /**
  7623. * 判断是否为空
  7624. */
  7625. function empty(value) {
  7626. switch (typeof value) {
  7627. case 'undefined':
  7628. return true;
  7629. case 'string':
  7630. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  7631. break;
  7632. case 'boolean':
  7633. if (!value) return true;
  7634. break;
  7635. case 'number':
  7636. if (0 === value || isNaN(value)) return true;
  7637. break;
  7638. case 'object':
  7639. if (null === value || value.length === 0) return true;
  7640. for (var i in value) {
  7641. return false;
  7642. }
  7643. return true;}
  7644. return false;
  7645. }
  7646. /**
  7647. * 是否json字符串
  7648. */
  7649. function jsonString(value) {
  7650. if (typeof value == 'string') {
  7651. try {
  7652. var obj = JSON.parse(value);
  7653. if (typeof obj == 'object' && obj) {
  7654. return true;
  7655. } else {
  7656. return false;
  7657. }
  7658. } catch (e) {
  7659. return false;
  7660. }
  7661. }
  7662. return false;
  7663. }
  7664. /**
  7665. * 是否数组
  7666. */
  7667. function array(value) {
  7668. if (typeof Array.isArray === "function") {
  7669. return Array.isArray(value);
  7670. } else {
  7671. return Object.prototype.toString.call(value) === "[object Array]";
  7672. }
  7673. }
  7674. /**
  7675. * 是否对象
  7676. */
  7677. function object(value) {
  7678. return Object.prototype.toString.call(value) === '[object Object]';
  7679. }
  7680. /**
  7681. * 是否短信验证码
  7682. */
  7683. function code(value) {var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  7684. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  7685. }var _default =
  7686. {
  7687. email: email,
  7688. mobile: mobile,
  7689. url: url,
  7690. date: date,
  7691. dateISO: dateISO,
  7692. number: number,
  7693. digits: digits,
  7694. idCard: idCard,
  7695. carNo: carNo,
  7696. amount: amount,
  7697. chinese: chinese,
  7698. letter: letter,
  7699. enOrNum: enOrNum,
  7700. contains: contains,
  7701. range: range,
  7702. rangeLength: rangeLength,
  7703. empty: empty,
  7704. isEmpty: empty,
  7705. jsonString: jsonString,
  7706. landline: landline,
  7707. object: object,
  7708. array: array,
  7709. code: code };exports.default = _default;
  7710. /***/ }),
  7711. /* 17 */
  7712. /*!************************************************************************************************!*\
  7713. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/queryParams.js ***!
  7714. \************************************************************************************************/
  7715. /*! no static exports found */
  7716. /***/ (function(module, exports, __webpack_require__) {
  7717. "use strict";
  7718. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  7719. * 对象转url参数
  7720. * @param {*} data,对象
  7721. * @param {*} isPrefix,是否自动加上"?"
  7722. */
  7723. function queryParams() {var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var isPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;var arrayFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'brackets';
  7724. var prefix = isPrefix ? '?' : '';
  7725. var _result = [];
  7726. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';var _loop = function _loop(
  7727. key) {
  7728. var value = data[key];
  7729. // 去掉为空的参数
  7730. if (['', undefined, null].indexOf(value) >= 0) {
  7731. return "continue";
  7732. }
  7733. // 如果值为数组,另行处理
  7734. if (value.constructor === Array) {
  7735. // e.g. {ids: [1, 2, 3]}
  7736. switch (arrayFormat) {
  7737. case 'indices':
  7738. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  7739. for (var i = 0; i < value.length; i++) {
  7740. _result.push(key + '[' + i + ']=' + value[i]);
  7741. }
  7742. break;
  7743. case 'brackets':
  7744. // 结果: ids[]=1&ids[]=2&ids[]=3
  7745. value.forEach(function (_value) {
  7746. _result.push(key + '[]=' + _value);
  7747. });
  7748. break;
  7749. case 'repeat':
  7750. // 结果: ids=1&ids=2&ids=3
  7751. value.forEach(function (_value) {
  7752. _result.push(key + '=' + _value);
  7753. });
  7754. break;
  7755. case 'comma':
  7756. // 结果: ids=1,2,3
  7757. var commaStr = "";
  7758. value.forEach(function (_value) {
  7759. commaStr += (commaStr ? "," : "") + _value;
  7760. });
  7761. _result.push(key + '=' + commaStr);
  7762. break;
  7763. default:
  7764. value.forEach(function (_value) {
  7765. _result.push(key + '[]=' + _value);
  7766. });}
  7767. } else {
  7768. _result.push(key + '=' + value);
  7769. }};for (var key in data) {var _ret = _loop(key);if (_ret === "continue") continue;
  7770. }
  7771. return _result.length ? prefix + _result.join('&') : '';
  7772. }var _default =
  7773. queryParams;exports.default = _default;
  7774. /***/ }),
  7775. /* 18 */
  7776. /*!******************************************************************************************!*\
  7777. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/route.js ***!
  7778. \******************************************************************************************/
  7779. /*! no static exports found */
  7780. /***/ (function(module, exports, __webpack_require__) {
  7781. "use strict";
  7782. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _queryParams = _interopRequireDefault(__webpack_require__(/*! ../../libs/function/queryParams.js */ 17));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  7783. /**
  7784. * 路由跳转
  7785. * 注意:本方法没有对跳转的回调函数进行封装
  7786. */
  7787. function route() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  7788. var config = {
  7789. type: 'navigateTo',
  7790. url: '',
  7791. delta: 1, // navigateBack页面后退时,回退的层数
  7792. params: {}, // 传递的参数
  7793. animationType: 'pop-in', // 窗口动画,只在APP有效
  7794. animationDuration: 300 // 窗口动画持续时间,单位毫秒,只在APP有效
  7795. };
  7796. config = Object.assign(config, options);
  7797. // 如果url没有"/"开头,添加上,因为uni的路由跳转需要"/"开头
  7798. if (config.url[0] != '/') config.url = '/' + config.url;
  7799. // 判断是否有传递显式的参数,Object.keys转为数组并判断长度,switchTab类型时不能携带参数
  7800. if (Object.keys(config.params).length && config.type != 'switchTab') {
  7801. // 判断用户传递的url中,是否带有参数
  7802. // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
  7803. // 如果有url中有get参数,转换后无需带上"?"
  7804. var query = '';
  7805. if (/.*\/.*\?.*=.*/.test(config.url)) {
  7806. // object对象转为get类型的参数
  7807. query = (0, _queryParams.default)(config.params, false);
  7808. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  7809. config.url += "&" + query;
  7810. } else {
  7811. query = (0, _queryParams.default)(config.params);
  7812. config.url += query;
  7813. }
  7814. }
  7815. // 简写形式,把url和参数拼接起来
  7816. if (typeof options === 'string' && typeof params == 'object') {
  7817. var _query = '';
  7818. if (/.*\/.*\?.*=.*/.test(options)) {
  7819. // object对象转为get类型的参数
  7820. _query = (0, _queryParams.default)(params, false);
  7821. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  7822. options += "&" + _query;
  7823. } else {
  7824. _query = (0, _queryParams.default)(params);
  7825. options += _query;
  7826. }
  7827. }
  7828. // 判断是否一个字符串,如果是,直接跳转(简写法)
  7829. // 如果是中情形,默认第二个参数为对象形式的参数
  7830. if (typeof options === 'string') {
  7831. if (options[0] != '/') options = '/' + options;
  7832. return uni.navigateTo({
  7833. url: options });
  7834. }
  7835. // navigateTo类型的跳转
  7836. if (config.type == 'navigateTo' || config.type == 'to') {
  7837. return uni.navigateTo({
  7838. url: config.url,
  7839. animationType: config.animationType,
  7840. animationDuration: config.animationDuration });
  7841. }
  7842. if (config.type == 'redirectTo' || config.type == 'redirect') {
  7843. return uni.redirectTo({
  7844. url: config.url });
  7845. }
  7846. if (config.type == 'switchTab' || config.type == 'tab') {
  7847. return uni.switchTab({
  7848. url: config.url });
  7849. }
  7850. if (config.type == 'reLaunch') {
  7851. return uni.reLaunch({
  7852. url: config.url });
  7853. }
  7854. if (config.type == 'navigateBack' || config.type == 'back') {
  7855. return uni.navigateBack({
  7856. delta: parseInt(config.delta ? config.delta : this.delta) });
  7857. }
  7858. }var _default =
  7859. route;exports.default = _default;
  7860. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  7861. /***/ }),
  7862. /* 19 */
  7863. /*!***********************************************************************************************!*\
  7864. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/timeFormat.js ***!
  7865. \***********************************************************************************************/
  7866. /*! no static exports found */
  7867. /***/ (function(module, exports, __webpack_require__) {
  7868. "use strict";
  7869. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序
  7870. // 所以这里做一个兼容polyfill的兼容处理
  7871. if (!String.prototype.padStart) {
  7872. // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解
  7873. String.prototype.padStart = function (maxLength) {var fillString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
  7874. if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError(
  7875. 'fillString must be String');
  7876. var str = this;
  7877. // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉
  7878. if (str.length >= maxLength) return String(str);
  7879. var fillLength = maxLength - str.length,
  7880. times = Math.ceil(fillLength / fillString.length);
  7881. while (times >>= 1) {
  7882. fillString += fillString;
  7883. if (times === 1) {
  7884. fillString += fillString;
  7885. }
  7886. }
  7887. return fillString.slice(0, fillLength) + str;
  7888. };
  7889. }
  7890. function timeFormat() {var timestamp = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;var fmt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  7891. // 其他更多是格式化有如下:
  7892. // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合
  7893. timestamp = parseInt(timestamp);
  7894. // 如果为null,则格式化当前时间
  7895. if (!timestamp) timestamp = Number(new Date());
  7896. // 判断用户输入的时间戳是秒还是毫秒,一般前端js获取的时间戳是毫秒(13位),后端传过来的为秒(10位)
  7897. if (timestamp.toString().length == 10) timestamp *= 1000;
  7898. var date = new Date(timestamp);
  7899. var ret;
  7900. var opt = {
  7901. "y+": date.getFullYear().toString(), // 年
  7902. "m+": (date.getMonth() + 1).toString(), // 月
  7903. "d+": date.getDate().toString(), // 日
  7904. "h+": date.getHours().toString(), // 时
  7905. "M+": date.getMinutes().toString(), // 分
  7906. "s+": date.getSeconds().toString() // 秒
  7907. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  7908. };
  7909. for (var k in opt) {
  7910. ret = new RegExp("(" + k + ")").exec(fmt);
  7911. if (ret) {
  7912. fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0"));
  7913. };
  7914. };
  7915. return fmt;
  7916. }var _default =
  7917. timeFormat;exports.default = _default;
  7918. /***/ }),
  7919. /* 20 */
  7920. /*!*********************************************************************************************!*\
  7921. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/timeFrom.js ***!
  7922. \*********************************************************************************************/
  7923. /*! no static exports found */
  7924. /***/ (function(module, exports, __webpack_require__) {
  7925. "use strict";
  7926. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ../../libs/function/timeFormat.js */ 19));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  7927. /**
  7928. * 时间戳转为多久之前
  7929. * @param String timestamp 时间戳
  7930. * @param String | Boolean format 如果为时间格式字符串,超出一定时间范围,返回固定的时间格式;
  7931. * 如果为布尔值false,无论什么时间,都返回多久以前的格式
  7932. */
  7933. function timeFrom() {var timestamp = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  7934. if (timestamp == null) timestamp = Number(new Date());
  7935. timestamp = parseInt(timestamp);
  7936. // 判断用户输入的时间戳是秒还是毫秒,一般前端js获取的时间戳是毫秒(13位),后端传过来的为秒(10位)
  7937. if (timestamp.toString().length == 10) timestamp *= 1000;
  7938. var timer = new Date().getTime() - timestamp;
  7939. timer = parseInt(timer / 1000);
  7940. // 如果小于5分钟,则返回"刚刚",其他以此类推
  7941. var tips = '';
  7942. switch (true) {
  7943. case timer < 300:
  7944. tips = '刚刚';
  7945. break;
  7946. case timer >= 300 && timer < 3600:
  7947. tips = parseInt(timer / 60) + '分钟前';
  7948. break;
  7949. case timer >= 3600 && timer < 86400:
  7950. tips = parseInt(timer / 3600) + '小时前';
  7951. break;
  7952. case timer >= 86400 && timer < 2592000:
  7953. tips = parseInt(timer / 86400) + '天前';
  7954. break;
  7955. default:
  7956. // 如果format为false,则无论什么时间戳,都显示xx之前
  7957. if (format === false) {
  7958. if (timer >= 2592000 && timer < 365 * 86400) {
  7959. tips = parseInt(timer / (86400 * 30)) + '个月前';
  7960. } else {
  7961. tips = parseInt(timer / (86400 * 365)) + '年前';
  7962. }
  7963. } else {
  7964. tips = (0, _timeFormat.default)(timestamp, format);
  7965. }}
  7966. return tips;
  7967. }var _default =
  7968. timeFrom;exports.default = _default;
  7969. /***/ }),
  7970. /* 21 */
  7971. /*!**************************************************************************************************!*\
  7972. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/colorGradient.js ***!
  7973. \**************************************************************************************************/
  7974. /*! no static exports found */
  7975. /***/ (function(module, exports, __webpack_require__) {
  7976. "use strict";
  7977. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  7978. * 求两个颜色之间的渐变值
  7979. * @param {string} startColor 开始的颜色
  7980. * @param {string} endColor 结束的颜色
  7981. * @param {number} step 颜色等分的份额
  7982. * */
  7983. function colorGradient() {var startColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgb(0, 0, 0)';var endColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rgb(255, 255, 255)';var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
  7984. var startRGB = hexToRgb(startColor, false); //转换为rgb数组模式
  7985. var startR = startRGB[0];
  7986. var startG = startRGB[1];
  7987. var startB = startRGB[2];
  7988. var endRGB = hexToRgb(endColor, false);
  7989. var endR = endRGB[0];
  7990. var endG = endRGB[1];
  7991. var endB = endRGB[2];
  7992. var sR = (endR - startR) / step; //总差值
  7993. var sG = (endG - startG) / step;
  7994. var sB = (endB - startB) / step;
  7995. var colorArr = [];
  7996. for (var i = 0; i < step; i++) {
  7997. //计算每一步的hex值
  7998. var hex = rgbToHex('rgb(' + Math.round(sR * i + startR) + ',' + Math.round(sG * i + startG) + ',' + Math.round(sB *
  7999. i + startB) + ')');
  8000. colorArr.push(hex);
  8001. }
  8002. return colorArr;
  8003. }
  8004. // 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式)
  8005. function hexToRgb(sColor) {var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  8006. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  8007. sColor = sColor.toLowerCase();
  8008. if (sColor && reg.test(sColor)) {
  8009. if (sColor.length === 4) {
  8010. var sColorNew = "#";
  8011. for (var i = 1; i < 4; i += 1) {
  8012. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  8013. }
  8014. sColor = sColorNew;
  8015. }
  8016. //处理六位的颜色值
  8017. var sColorChange = [];
  8018. for (var _i = 1; _i < 7; _i += 2) {
  8019. sColorChange.push(parseInt("0x" + sColor.slice(_i, _i + 2)));
  8020. }
  8021. if (!str) {
  8022. return sColorChange;
  8023. } else {
  8024. return "rgb(".concat(sColorChange[0], ",").concat(sColorChange[1], ",").concat(sColorChange[2], ")");
  8025. }
  8026. } else if (/^(rgb|RGB)/.test(sColor)) {
  8027. var arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  8028. return arr.map(function (val) {return Number(val);});
  8029. } else {
  8030. return sColor;
  8031. }
  8032. };
  8033. // 将rgb表示方式转换为hex表示方式
  8034. function rgbToHex(rgb) {
  8035. var _this = rgb;
  8036. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  8037. if (/^(rgb|RGB)/.test(_this)) {
  8038. var aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  8039. var strHex = "#";
  8040. for (var i = 0; i < aColor.length; i++) {
  8041. var hex = Number(aColor[i]).toString(16);
  8042. hex = String(hex).length == 1 ? 0 + '' + hex : hex; // 保证每个rgb的值为2位
  8043. if (hex === "0") {
  8044. hex += hex;
  8045. }
  8046. strHex += hex;
  8047. }
  8048. if (strHex.length !== 7) {
  8049. strHex = _this;
  8050. }
  8051. return strHex;
  8052. } else if (reg.test(_this)) {
  8053. var aNum = _this.replace(/#/, "").split("");
  8054. if (aNum.length === 6) {
  8055. return _this;
  8056. } else if (aNum.length === 3) {
  8057. var numHex = "#";
  8058. for (var _i2 = 0; _i2 < aNum.length; _i2 += 1) {
  8059. numHex += aNum[_i2] + aNum[_i2];
  8060. }
  8061. return numHex;
  8062. }
  8063. } else {
  8064. return _this;
  8065. }
  8066. }var _default =
  8067. {
  8068. colorGradient: colorGradient,
  8069. hexToRgb: hexToRgb,
  8070. rgbToHex: rgbToHex };exports.default = _default;
  8071. /***/ }),
  8072. /* 22 */
  8073. /*!*****************************************************************************************!*\
  8074. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/guid.js ***!
  8075. \*****************************************************************************************/
  8076. /*! no static exports found */
  8077. /***/ (function(module, exports, __webpack_require__) {
  8078. "use strict";
  8079. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  8080. * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85
  8081. * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier)
  8082. * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
  8083. * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
  8084. * v-for的时候,推荐使用后端返回的id而不是循环的index
  8085. * @param {Number} len uuid的长度
  8086. * @param {Boolean} firstU 将返回的首字母置为"u"
  8087. * @param {Nubmer} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  8088. */
  8089. function guid() {var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;var firstU = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  8090. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  8091. var uuid = [];
  8092. radix = radix || chars.length;
  8093. if (len) {
  8094. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  8095. for (var i = 0; i < len; i++) {uuid[i] = chars[0 | Math.random() * radix];}
  8096. } else {
  8097. var r;
  8098. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  8099. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  8100. uuid[14] = '4';
  8101. for (var _i = 0; _i < 36; _i++) {
  8102. if (!uuid[_i]) {
  8103. r = 0 | Math.random() * 16;
  8104. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  8105. }
  8106. }
  8107. }
  8108. // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guuid不能用作id或者class
  8109. if (firstU) {
  8110. uuid.shift();
  8111. return 'u' + uuid.join('');
  8112. } else {
  8113. return uuid.join('');
  8114. }
  8115. }var _default =
  8116. guid;exports.default = _default;
  8117. /***/ }),
  8118. /* 23 */
  8119. /*!******************************************************************************************!*\
  8120. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/color.js ***!
  8121. \******************************************************************************************/
  8122. /*! no static exports found */
  8123. /***/ (function(module, exports, __webpack_require__) {
  8124. "use strict";
  8125. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
  8126. // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
  8127. var color = {
  8128. primary: "#2979ff",
  8129. primaryDark: "#2b85e4",
  8130. primaryDisabled: "#a0cfff",
  8131. primaryLight: "#ecf5ff",
  8132. bgColor: "#f3f4f6",
  8133. info: "#909399",
  8134. infoDark: "#82848a",
  8135. infoDisabled: "#c8c9cc",
  8136. infoLight: "#f4f4f5",
  8137. warning: "#ff9900",
  8138. warningDark: "#f29100",
  8139. warningDisabled: "#fcbd71",
  8140. warningLight: "#fdf6ec",
  8141. error: "#fa3534",
  8142. errorDark: "#dd6161",
  8143. errorDisabled: "#fab6b6",
  8144. errorLight: "#fef0f0",
  8145. success: "#19be6b",
  8146. successDark: "#18b566",
  8147. successDisabled: "#71d5a1",
  8148. successLight: "#dbf1e1",
  8149. mainColor: "#303133",
  8150. contentColor: "#606266",
  8151. tipsColor: "#909399",
  8152. lightColor: "#c0c4cc",
  8153. borderColor: "#e4e7ed" };var _default =
  8154. color;exports.default = _default;
  8155. /***/ }),
  8156. /* 24 */
  8157. /*!**********************************************************************************************!*\
  8158. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/type2icon.js ***!
  8159. \**********************************************************************************************/
  8160. /*! no static exports found */
  8161. /***/ (function(module, exports, __webpack_require__) {
  8162. "use strict";
  8163. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  8164. * 根据主题type值,获取对应的图标
  8165. * @param String type 主题名称,primary|info|error|warning|success
  8166. * @param String fill 是否使用fill填充实体的图标
  8167. */
  8168. function type2icon() {var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'success';var fill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  8169. // 如果非预置值,默认为success
  8170. if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success';
  8171. var iconName = '';
  8172. // 目前(2019-12-12),info和primary使用同一个图标
  8173. switch (type) {
  8174. case 'primary':
  8175. iconName = 'info-circle';
  8176. break;
  8177. case 'info':
  8178. iconName = 'info-circle';
  8179. break;
  8180. case 'error':
  8181. iconName = 'close-circle';
  8182. break;
  8183. case 'warning':
  8184. iconName = 'error-circle';
  8185. break;
  8186. case 'success':
  8187. iconName = 'checkmark-circle';
  8188. break;
  8189. default:
  8190. iconName = 'checkmark-circle';}
  8191. // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的
  8192. if (fill) iconName += '-fill';
  8193. return iconName;
  8194. }var _default =
  8195. type2icon;exports.default = _default;
  8196. /***/ }),
  8197. /* 25 */
  8198. /*!************************************************************************************************!*\
  8199. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/randomArray.js ***!
  8200. \************************************************************************************************/
  8201. /*! no static exports found */
  8202. /***/ (function(module, exports, __webpack_require__) {
  8203. "use strict";
  8204. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 打乱数组
  8205. function randomArray() {var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  8206. // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
  8207. return array.sort(function () {return Math.random() - 0.5;});
  8208. }var _default =
  8209. randomArray;exports.default = _default;
  8210. /***/ }),
  8211. /* 26 */
  8212. /*!********************************************************************************************!*\
  8213. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/addUnit.js ***!
  8214. \********************************************************************************************/
  8215. /*! no static exports found */
  8216. /***/ (function(module, exports, __webpack_require__) {
  8217. "use strict";
  8218. Object.defineProperty(exports, "__esModule", { value: true });exports.default = addUnit;var _test = _interopRequireDefault(__webpack_require__(/*! ./test.js */ 16));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  8219. // 添加单位,如果有rpx,%,px等单位结尾或者值为auto,直接返回,否则加上rpx单位结尾
  8220. function addUnit() {var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'auto';var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rpx';
  8221. value = String(value);
  8222. // 用uView内置验证规则中的number判断是否为数值
  8223. return _test.default.number(value) ? "".concat(value).concat(unit) : value;
  8224. }
  8225. /***/ }),
  8226. /* 27 */
  8227. /*!*******************************************************************************************!*\
  8228. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/random.js ***!
  8229. \*******************************************************************************************/
  8230. /*! no static exports found */
  8231. /***/ (function(module, exports, __webpack_require__) {
  8232. "use strict";
  8233. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function random(min, max) {
  8234. if (min >= 0 && max > 0 && max >= min) {
  8235. var gab = max - min + 1;
  8236. return Math.floor(Math.random() * gab + min);
  8237. } else {
  8238. return 0;
  8239. }
  8240. }var _default =
  8241. random;exports.default = _default;
  8242. /***/ }),
  8243. /* 28 */
  8244. /*!*****************************************************************************************!*\
  8245. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/trim.js ***!
  8246. \*****************************************************************************************/
  8247. /*! no static exports found */
  8248. /***/ (function(module, exports, __webpack_require__) {
  8249. "use strict";
  8250. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function trim(str) {var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  8251. if (pos == 'both') {
  8252. return str.replace(/^\s+|\s+$/g, "");
  8253. } else if (pos == "left") {
  8254. return str.replace(/^\s*/, '');
  8255. } else if (pos == 'right') {
  8256. return str.replace(/(\s*$)/g, "");
  8257. } else if (pos == 'all') {
  8258. return str.replace(/\s+/g, "");
  8259. } else {
  8260. return str;
  8261. }
  8262. }var _default =
  8263. trim;exports.default = _default;
  8264. /***/ }),
  8265. /* 29 */
  8266. /*!******************************************************************************************!*\
  8267. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/toast.js ***!
  8268. \******************************************************************************************/
  8269. /*! no static exports found */
  8270. /***/ (function(module, exports, __webpack_require__) {
  8271. "use strict";
  8272. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function toast(title) {var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1500;
  8273. uni.showToast({
  8274. title: title,
  8275. icon: 'none',
  8276. duration: duration });
  8277. }var _default =
  8278. toast;exports.default = _default;
  8279. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  8280. /***/ }),
  8281. /* 30 */
  8282. /*!**********************************************************************************************!*\
  8283. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/getParent.js ***!
  8284. \**********************************************************************************************/
  8285. /*! no static exports found */
  8286. /***/ (function(module, exports, __webpack_require__) {
  8287. "use strict";
  8288. Object.defineProperty(exports, "__esModule", { value: true });exports.default = getParent; // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  8289. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  8290. function getParent(name, keys) {
  8291. var parent = this.$parent;
  8292. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  8293. while (parent) {
  8294. // 父组件
  8295. if (parent.$options.name !== name) {
  8296. // 如果组件的name不相等,继续上一级寻找
  8297. parent = parent.$parent;
  8298. } else {var _ret = function () {
  8299. var data = {};
  8300. // 判断keys是否数组,如果传过来的是一个数组,那么直接使用数组元素值当做键值去父组件寻找
  8301. if (Array.isArray(keys)) {
  8302. keys.map(function (val) {
  8303. data[val] = parent[val] ? parent[val] : '';
  8304. });
  8305. } else {
  8306. // 历遍传过来的对象参数
  8307. for (var i in keys) {
  8308. // 如果子组件有此值则用,无此值则用父组件的值
  8309. // 判断是否空数组,如果是,则用父组件的值,否则用子组件的值
  8310. if (Array.isArray(keys[i])) {
  8311. if (keys[i].length) {
  8312. data[i] = keys[i];
  8313. } else {
  8314. data[i] = parent[i];
  8315. }
  8316. } else if (keys[i].constructor === Object) {
  8317. // 判断是否对象,如果是对象,且有属性,那么使用子组件的值,否则使用父组件的值
  8318. if (Object.keys(keys[i]).length) {
  8319. data[i] = keys[i];
  8320. } else {
  8321. data[i] = parent[i];
  8322. }
  8323. } else {
  8324. // 只要子组件有传值,即使是false值,也是“传值”了,也需要覆盖父组件的同名参数
  8325. data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i];
  8326. }
  8327. }
  8328. }
  8329. return { v: data };}();if (typeof _ret === "object") return _ret.v;
  8330. }
  8331. }
  8332. return {};
  8333. }
  8334. /***/ }),
  8335. /* 31 */
  8336. /*!********************************************************************************************!*\
  8337. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/$parent.js ***!
  8338. \********************************************************************************************/
  8339. /*! no static exports found */
  8340. /***/ (function(module, exports, __webpack_require__) {
  8341. "use strict";
  8342. Object.defineProperty(exports, "__esModule", { value: true });exports.default = $parent; // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  8343. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  8344. // 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name
  8345. // 值(默认为undefined),就是查找最顶层的$parent
  8346. function $parent() {var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  8347. var parent = this.$parent;
  8348. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  8349. while (parent) {
  8350. // 父组件
  8351. if (parent.$options && parent.$options.name !== name) {
  8352. // 如果组件的name不相等,继续上一级寻找
  8353. parent = parent.$parent;
  8354. } else {
  8355. return parent;
  8356. }
  8357. }
  8358. return false;
  8359. }
  8360. /***/ }),
  8361. /* 32 */
  8362. /*!****************************************************************************************!*\
  8363. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/sys.js ***!
  8364. \****************************************************************************************/
  8365. /*! no static exports found */
  8366. /***/ (function(module, exports, __webpack_require__) {
  8367. "use strict";
  8368. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.os = os;exports.sys = sys;function os() {
  8369. return uni.getSystemInfoSync().platform;
  8370. };
  8371. function sys() {
  8372. return uni.getSystemInfoSync();
  8373. }
  8374. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  8375. /***/ }),
  8376. /* 33 */
  8377. /*!*********************************************************************************************!*\
  8378. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/debounce.js ***!
  8379. \*********************************************************************************************/
  8380. /*! no static exports found */
  8381. /***/ (function(module, exports, __webpack_require__) {
  8382. "use strict";
  8383. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var timeout = null;
  8384. /**
  8385. * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
  8386. *
  8387. * @param {Function} func 要执行的回调函数
  8388. * @param {Number} wait 延时的时间
  8389. * @param {Boolean} immediate 是否立即执行
  8390. * @return null
  8391. */
  8392. function debounce(func) {var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  8393. // 清除定时器
  8394. if (timeout !== null) clearTimeout(timeout);
  8395. // 立即执行,此类情况一般用不到
  8396. if (immediate) {
  8397. var callNow = !timeout;
  8398. timeout = setTimeout(function () {
  8399. timeout = null;
  8400. }, wait);
  8401. if (callNow) typeof func === 'function' && func();
  8402. } else {
  8403. // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
  8404. timeout = setTimeout(function () {
  8405. typeof func === 'function' && func();
  8406. }, wait);
  8407. }
  8408. }var _default =
  8409. debounce;exports.default = _default;
  8410. /***/ }),
  8411. /* 34 */
  8412. /*!*********************************************************************************************!*\
  8413. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/function/throttle.js ***!
  8414. \*********************************************************************************************/
  8415. /*! no static exports found */
  8416. /***/ (function(module, exports, __webpack_require__) {
  8417. "use strict";
  8418. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var timer, flag;
  8419. /**
  8420. * 节流原理:在一定时间内,只能触发一次
  8421. *
  8422. * @param {Function} func 要执行的回调函数
  8423. * @param {Number} wait 延时的时间
  8424. * @param {Boolean} immediate 是否立即执行
  8425. * @return null
  8426. */
  8427. function throttle(func) {var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  8428. if (immediate) {
  8429. if (!flag) {
  8430. flag = true;
  8431. // 如果是立即执行,则在wait毫秒内开始时执行
  8432. typeof func === 'function' && func();
  8433. timer = setTimeout(function () {
  8434. flag = false;
  8435. }, wait);
  8436. }
  8437. } else {
  8438. if (!flag) {
  8439. flag = true;
  8440. // 如果是非立即执行,则在wait毫秒内的结束处执行
  8441. timer = setTimeout(function () {
  8442. flag = false;
  8443. typeof func === 'function' && func();
  8444. }, wait);
  8445. }
  8446. }
  8447. };var _default =
  8448. throttle;exports.default = _default;
  8449. /***/ }),
  8450. /* 35 */
  8451. /*!*****************************************************************************************!*\
  8452. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/config/config.js ***!
  8453. \*****************************************************************************************/
  8454. /*! no static exports found */
  8455. /***/ (function(module, exports, __webpack_require__) {
  8456. "use strict";
  8457. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 此版本发布于2020-09-22
  8458. var version = '1.7.3';var _default =
  8459. {
  8460. v: version,
  8461. version: version,
  8462. // 主题名称
  8463. type: [
  8464. 'primary',
  8465. 'success',
  8466. 'info',
  8467. 'error',
  8468. 'warning'] };exports.default = _default;
  8469. /***/ }),
  8470. /* 36 */
  8471. /*!*****************************************************************************************!*\
  8472. !*** D:/66/AAwork/anti-fake/fangwei-select/node_modules/uview-ui/libs/config/zIndex.js ***!
  8473. \*****************************************************************************************/
  8474. /*! no static exports found */
  8475. /***/ (function(module, exports, __webpack_require__) {
  8476. "use strict";
  8477. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // uniapp在H5中各API的z-index值如下:
  8478. /**
  8479. * actionsheet: 999
  8480. * modal: 999
  8481. * navigate: 998
  8482. * tabbar: 998
  8483. * toast: 999
  8484. */var _default =
  8485. {
  8486. toast: 10090,
  8487. noNetwork: 10080,
  8488. // popup包含popup,actionsheet,keyboard,picker的值
  8489. popup: 10075,
  8490. mask: 10070,
  8491. navbar: 980,
  8492. topTips: 975,
  8493. sticky: 970,
  8494. indexListSticky: 965 };exports.default = _default;
  8495. /***/ }),
  8496. /* 37 */,
  8497. /* 38 */,
  8498. /* 39 */,
  8499. /* 40 */,
  8500. /* 41 */,
  8501. /* 42 */,
  8502. /* 43 */,
  8503. /* 44 */,
  8504. /* 45 */,
  8505. /* 46 */,
  8506. /* 47 */,
  8507. /* 48 */,
  8508. /* 49 */,
  8509. /* 50 */
  8510. /*!*********************************************************!*\
  8511. !*** D:/66/AAwork/anti-fake/fangwei-select/api/code.js ***!
  8512. \*********************************************************/
  8513. /*! no static exports found */
  8514. /***/ (function(module, exports, __webpack_require__) {
  8515. "use strict";
  8516. Object.defineProperty(exports, "__esModule", { value: true });exports.getImage = exports.getInfo = exports.selectTrue = void 0;var _request = _interopRequireDefault(__webpack_require__(/*! ../utiils/request.js */ 51));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  8517. //防伪查询
  8518. var selectTrue = function selectTrue(params) {return _request.default.get('/select/select_true', params);};
  8519. //获取信息
  8520. exports.selectTrue = selectTrue;var getInfo = function getInfo(params) {return _request.default.get('/authenticity/select_user', params);};
  8521. //获取图片
  8522. exports.getInfo = getInfo;var getImage = function getImage(params) {return _request.default.get('/img/get_img_url', params);};exports.getImage = getImage;
  8523. /***/ }),
  8524. /* 51 */
  8525. /*!***************************************************************!*\
  8526. !*** D:/66/AAwork/anti-fake/fangwei-select/utiils/request.js ***!
  8527. \***************************************************************/
  8528. /*! no static exports found */
  8529. /***/ (function(module, exports, __webpack_require__) {
  8530. "use strict";
  8531. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 52));var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  8532. var _uni_request = _interopRequireDefault(__webpack_require__(/*! ./uni_request.js */ 55));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}
  8533. var request = (0, _uni_request.default)({
  8534. timeout: 123456,
  8535. baseURL: 'http://fangw.jiuweiyun.cn/api', //线上
  8536. // baseURL: 'http://192.168.0.4:8114/api', //本地
  8537. // baseURL: 'http://192.168.0.15:8086/api', //本地
  8538. header: {
  8539. 'content-type': 'application/json' } });
  8540. // 请求前拦截器
  8541. request.interceptors.request.use(function (config) {
  8542. uni.showLoading({
  8543. title: '加载中',
  8544. mask: true });
  8545. config.header.Authorization = 'Bearer ' + uni.getStorageSync("token");
  8546. return config;
  8547. });
  8548. function doRequest(response, url) {
  8549. return new Promise(function (resolve, reject) {
  8550. uni.login({
  8551. success: function success(_ref)
  8552. {var code = _ref.code;
  8553. wx.getLocation({
  8554. success: function success(_ref2)
  8555. {var latitude = _ref2.latitude,longitude = _ref2.longitude;
  8556. wecatLogin({
  8557. openid: '',
  8558. avatar: uni.getStorageSync('userInfo').avatar,
  8559. nickname: uni.getStorageSync('userInfo').nickname,
  8560. code: code,
  8561. longitude: longitude,
  8562. latitude: latitude }).
  8563. then(function (res) {
  8564. if (res.code == 200) {
  8565. uni.setStorageSync('token', res.data.token);
  8566. request.get(url).then(function (res) {
  8567. if (res.code == 200) {
  8568. if (url == '/user/get_info') {
  8569. uni.setStorageSync('userInfo', res.data);
  8570. }
  8571. resolve(res);
  8572. }
  8573. });
  8574. }
  8575. if (res.code == 300) {
  8576. uni.switchTab({
  8577. url: '../index/index?isPhone=' + true });
  8578. }
  8579. }).
  8580. catch(function (e) {});
  8581. },
  8582. fail: function fail(e) {
  8583. uni.showModal({
  8584. content: '不授权将无法获取到您的位置信息',
  8585. showCancel: false });
  8586. } });
  8587. } });
  8588. });
  8589. }
  8590. // 请求后拦截器
  8591. request.interceptors.response.use( /*#__PURE__*/function () {var _ref3 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(response) {var _args = arguments;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0: // 拦截器
  8592. uni.hideLoading();if (!(
  8593. response.data.code === 50000 && uni.getStorageSync('userInfo'))) {_context.next = 8;break;}_context.next = 4;return (
  8594. doRequest(response, _args.length <= 2 ? undefined : _args[2]));case 4:response = _context.sent;return _context.abrupt("return",
  8595. response);case 8:if (!(
  8596. response.data.code === 50000 && !uni.getStorageSync('userInfo'))) {_context.next = 13;break;}
  8597. uni.removeStorageSync('token');
  8598. uni.switchTab({
  8599. url: '/pages/index/index' });_context.next = 18;break;case 13:if (!(
  8600. response.data.code === 200 || response.data.code === 300)) {_context.next = 17;break;}return _context.abrupt("return",
  8601. response);case 17:return _context.abrupt("return",
  8602. response);case 18:case "end":return _context.stop();}}}, _callee);}));return function (_x) {return _ref3.apply(this, arguments);};}());
  8603. request.onerror = function () {for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {args[_key] = arguments[_key];} // 请求失败统一处理方法
  8604. console.log(args);
  8605. uni.hideLoading();
  8606. uni.showModal({
  8607. title: '请求失败',
  8608. content: '网络出错',
  8609. // content: JSON.stringify(args),
  8610. showCancel: false });
  8611. return Promise.reject(args);
  8612. };var _default =
  8613. request;exports.default = _default;
  8614. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  8615. /***/ }),
  8616. /* 52 */
  8617. /*!**********************************************************!*\
  8618. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  8619. \**********************************************************/
  8620. /*! no static exports found */
  8621. /***/ (function(module, exports, __webpack_require__) {
  8622. module.exports = __webpack_require__(/*! regenerator-runtime */ 53);
  8623. /***/ }),
  8624. /* 53 */
  8625. /*!************************************************************!*\
  8626. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  8627. \************************************************************/
  8628. /*! no static exports found */
  8629. /***/ (function(module, exports, __webpack_require__) {
  8630. /**
  8631. * Copyright (c) 2014-present, Facebook, Inc.
  8632. *
  8633. * This source code is licensed under the MIT license found in the
  8634. * LICENSE file in the root directory of this source tree.
  8635. */
  8636. // This method of obtaining a reference to the global object needs to be
  8637. // kept identical to the way it is obtained in runtime.js
  8638. var g = (function() {
  8639. return this || (typeof self === "object" && self);
  8640. })() || Function("return this")();
  8641. // Use `getOwnPropertyNames` because not all browsers support calling
  8642. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  8643. var hadRuntime = g.regeneratorRuntime &&
  8644. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  8645. // Save the old regeneratorRuntime in case it needs to be restored later.
  8646. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  8647. // Force reevalutation of runtime.js.
  8648. g.regeneratorRuntime = undefined;
  8649. module.exports = __webpack_require__(/*! ./runtime */ 54);
  8650. if (hadRuntime) {
  8651. // Restore the original runtime.
  8652. g.regeneratorRuntime = oldRuntime;
  8653. } else {
  8654. // Remove the global property added by runtime.js.
  8655. try {
  8656. delete g.regeneratorRuntime;
  8657. } catch(e) {
  8658. g.regeneratorRuntime = undefined;
  8659. }
  8660. }
  8661. /***/ }),
  8662. /* 54 */
  8663. /*!*****************************************************!*\
  8664. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  8665. \*****************************************************/
  8666. /*! no static exports found */
  8667. /***/ (function(module, exports) {
  8668. /**
  8669. * Copyright (c) 2014-present, Facebook, Inc.
  8670. *
  8671. * This source code is licensed under the MIT license found in the
  8672. * LICENSE file in the root directory of this source tree.
  8673. */
  8674. !(function(global) {
  8675. "use strict";
  8676. var Op = Object.prototype;
  8677. var hasOwn = Op.hasOwnProperty;
  8678. var undefined; // More compressible than void 0.
  8679. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  8680. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  8681. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  8682. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  8683. var inModule = typeof module === "object";
  8684. var runtime = global.regeneratorRuntime;
  8685. if (runtime) {
  8686. if (inModule) {
  8687. // If regeneratorRuntime is defined globally and we're in a module,
  8688. // make the exports object identical to regeneratorRuntime.
  8689. module.exports = runtime;
  8690. }
  8691. // Don't bother evaluating the rest of this file if the runtime was
  8692. // already defined globally.
  8693. return;
  8694. }
  8695. // Define the runtime globally (as expected by generated code) as either
  8696. // module.exports (if we're in a module) or a new, empty object.
  8697. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  8698. function wrap(innerFn, outerFn, self, tryLocsList) {
  8699. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  8700. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  8701. var generator = Object.create(protoGenerator.prototype);
  8702. var context = new Context(tryLocsList || []);
  8703. // The ._invoke method unifies the implementations of the .next,
  8704. // .throw, and .return methods.
  8705. generator._invoke = makeInvokeMethod(innerFn, self, context);
  8706. return generator;
  8707. }
  8708. runtime.wrap = wrap;
  8709. // Try/catch helper to minimize deoptimizations. Returns a completion
  8710. // record like context.tryEntries[i].completion. This interface could
  8711. // have been (and was previously) designed to take a closure to be
  8712. // invoked without arguments, but in all the cases we care about we
  8713. // already have an existing method we want to call, so there's no need
  8714. // to create a new function object. We can even get away with assuming
  8715. // the method takes exactly one argument, since that happens to be true
  8716. // in every case, so we don't have to touch the arguments object. The
  8717. // only additional allocation required is the completion record, which
  8718. // has a stable shape and so hopefully should be cheap to allocate.
  8719. function tryCatch(fn, obj, arg) {
  8720. try {
  8721. return { type: "normal", arg: fn.call(obj, arg) };
  8722. } catch (err) {
  8723. return { type: "throw", arg: err };
  8724. }
  8725. }
  8726. var GenStateSuspendedStart = "suspendedStart";
  8727. var GenStateSuspendedYield = "suspendedYield";
  8728. var GenStateExecuting = "executing";
  8729. var GenStateCompleted = "completed";
  8730. // Returning this object from the innerFn has the same effect as
  8731. // breaking out of the dispatch switch statement.
  8732. var ContinueSentinel = {};
  8733. // Dummy constructor functions that we use as the .constructor and
  8734. // .constructor.prototype properties for functions that return Generator
  8735. // objects. For full spec compliance, you may wish to configure your
  8736. // minifier not to mangle the names of these two functions.
  8737. function Generator() {}
  8738. function GeneratorFunction() {}
  8739. function GeneratorFunctionPrototype() {}
  8740. // This is a polyfill for %IteratorPrototype% for environments that
  8741. // don't natively support it.
  8742. var IteratorPrototype = {};
  8743. IteratorPrototype[iteratorSymbol] = function () {
  8744. return this;
  8745. };
  8746. var getProto = Object.getPrototypeOf;
  8747. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  8748. if (NativeIteratorPrototype &&
  8749. NativeIteratorPrototype !== Op &&
  8750. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  8751. // This environment has a native %IteratorPrototype%; use it instead
  8752. // of the polyfill.
  8753. IteratorPrototype = NativeIteratorPrototype;
  8754. }
  8755. var Gp = GeneratorFunctionPrototype.prototype =
  8756. Generator.prototype = Object.create(IteratorPrototype);
  8757. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  8758. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  8759. GeneratorFunctionPrototype[toStringTagSymbol] =
  8760. GeneratorFunction.displayName = "GeneratorFunction";
  8761. // Helper for defining the .next, .throw, and .return methods of the
  8762. // Iterator interface in terms of a single ._invoke method.
  8763. function defineIteratorMethods(prototype) {
  8764. ["next", "throw", "return"].forEach(function(method) {
  8765. prototype[method] = function(arg) {
  8766. return this._invoke(method, arg);
  8767. };
  8768. });
  8769. }
  8770. runtime.isGeneratorFunction = function(genFun) {
  8771. var ctor = typeof genFun === "function" && genFun.constructor;
  8772. return ctor
  8773. ? ctor === GeneratorFunction ||
  8774. // For the native GeneratorFunction constructor, the best we can
  8775. // do is to check its .name property.
  8776. (ctor.displayName || ctor.name) === "GeneratorFunction"
  8777. : false;
  8778. };
  8779. runtime.mark = function(genFun) {
  8780. if (Object.setPrototypeOf) {
  8781. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  8782. } else {
  8783. genFun.__proto__ = GeneratorFunctionPrototype;
  8784. if (!(toStringTagSymbol in genFun)) {
  8785. genFun[toStringTagSymbol] = "GeneratorFunction";
  8786. }
  8787. }
  8788. genFun.prototype = Object.create(Gp);
  8789. return genFun;
  8790. };
  8791. // Within the body of any async function, `await x` is transformed to
  8792. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  8793. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  8794. // meant to be awaited.
  8795. runtime.awrap = function(arg) {
  8796. return { __await: arg };
  8797. };
  8798. function AsyncIterator(generator) {
  8799. function invoke(method, arg, resolve, reject) {
  8800. var record = tryCatch(generator[method], generator, arg);
  8801. if (record.type === "throw") {
  8802. reject(record.arg);
  8803. } else {
  8804. var result = record.arg;
  8805. var value = result.value;
  8806. if (value &&
  8807. typeof value === "object" &&
  8808. hasOwn.call(value, "__await")) {
  8809. return Promise.resolve(value.__await).then(function(value) {
  8810. invoke("next", value, resolve, reject);
  8811. }, function(err) {
  8812. invoke("throw", err, resolve, reject);
  8813. });
  8814. }
  8815. return Promise.resolve(value).then(function(unwrapped) {
  8816. // When a yielded Promise is resolved, its final value becomes
  8817. // the .value of the Promise<{value,done}> result for the
  8818. // current iteration.
  8819. result.value = unwrapped;
  8820. resolve(result);
  8821. }, function(error) {
  8822. // If a rejected Promise was yielded, throw the rejection back
  8823. // into the async generator function so it can be handled there.
  8824. return invoke("throw", error, resolve, reject);
  8825. });
  8826. }
  8827. }
  8828. var previousPromise;
  8829. function enqueue(method, arg) {
  8830. function callInvokeWithMethodAndArg() {
  8831. return new Promise(function(resolve, reject) {
  8832. invoke(method, arg, resolve, reject);
  8833. });
  8834. }
  8835. return previousPromise =
  8836. // If enqueue has been called before, then we want to wait until
  8837. // all previous Promises have been resolved before calling invoke,
  8838. // so that results are always delivered in the correct order. If
  8839. // enqueue has not been called before, then it is important to
  8840. // call invoke immediately, without waiting on a callback to fire,
  8841. // so that the async generator function has the opportunity to do
  8842. // any necessary setup in a predictable way. This predictability
  8843. // is why the Promise constructor synchronously invokes its
  8844. // executor callback, and why async functions synchronously
  8845. // execute code before the first await. Since we implement simple
  8846. // async functions in terms of async generators, it is especially
  8847. // important to get this right, even though it requires care.
  8848. previousPromise ? previousPromise.then(
  8849. callInvokeWithMethodAndArg,
  8850. // Avoid propagating failures to Promises returned by later
  8851. // invocations of the iterator.
  8852. callInvokeWithMethodAndArg
  8853. ) : callInvokeWithMethodAndArg();
  8854. }
  8855. // Define the unified helper method that is used to implement .next,
  8856. // .throw, and .return (see defineIteratorMethods).
  8857. this._invoke = enqueue;
  8858. }
  8859. defineIteratorMethods(AsyncIterator.prototype);
  8860. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  8861. return this;
  8862. };
  8863. runtime.AsyncIterator = AsyncIterator;
  8864. // Note that simple async functions are implemented on top of
  8865. // AsyncIterator objects; they just return a Promise for the value of
  8866. // the final result produced by the iterator.
  8867. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  8868. var iter = new AsyncIterator(
  8869. wrap(innerFn, outerFn, self, tryLocsList)
  8870. );
  8871. return runtime.isGeneratorFunction(outerFn)
  8872. ? iter // If outerFn is a generator, return the full iterator.
  8873. : iter.next().then(function(result) {
  8874. return result.done ? result.value : iter.next();
  8875. });
  8876. };
  8877. function makeInvokeMethod(innerFn, self, context) {
  8878. var state = GenStateSuspendedStart;
  8879. return function invoke(method, arg) {
  8880. if (state === GenStateExecuting) {
  8881. throw new Error("Generator is already running");
  8882. }
  8883. if (state === GenStateCompleted) {
  8884. if (method === "throw") {
  8885. throw arg;
  8886. }
  8887. // Be forgiving, per 25.3.3.3.3 of the spec:
  8888. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  8889. return doneResult();
  8890. }
  8891. context.method = method;
  8892. context.arg = arg;
  8893. while (true) {
  8894. var delegate = context.delegate;
  8895. if (delegate) {
  8896. var delegateResult = maybeInvokeDelegate(delegate, context);
  8897. if (delegateResult) {
  8898. if (delegateResult === ContinueSentinel) continue;
  8899. return delegateResult;
  8900. }
  8901. }
  8902. if (context.method === "next") {
  8903. // Setting context._sent for legacy support of Babel's
  8904. // function.sent implementation.
  8905. context.sent = context._sent = context.arg;
  8906. } else if (context.method === "throw") {
  8907. if (state === GenStateSuspendedStart) {
  8908. state = GenStateCompleted;
  8909. throw context.arg;
  8910. }
  8911. context.dispatchException(context.arg);
  8912. } else if (context.method === "return") {
  8913. context.abrupt("return", context.arg);
  8914. }
  8915. state = GenStateExecuting;
  8916. var record = tryCatch(innerFn, self, context);
  8917. if (record.type === "normal") {
  8918. // If an exception is thrown from innerFn, we leave state ===
  8919. // GenStateExecuting and loop back for another invocation.
  8920. state = context.done
  8921. ? GenStateCompleted
  8922. : GenStateSuspendedYield;
  8923. if (record.arg === ContinueSentinel) {
  8924. continue;
  8925. }
  8926. return {
  8927. value: record.arg,
  8928. done: context.done
  8929. };
  8930. } else if (record.type === "throw") {
  8931. state = GenStateCompleted;
  8932. // Dispatch the exception by looping back around to the
  8933. // context.dispatchException(context.arg) call above.
  8934. context.method = "throw";
  8935. context.arg = record.arg;
  8936. }
  8937. }
  8938. };
  8939. }
  8940. // Call delegate.iterator[context.method](context.arg) and handle the
  8941. // result, either by returning a { value, done } result from the
  8942. // delegate iterator, or by modifying context.method and context.arg,
  8943. // setting context.delegate to null, and returning the ContinueSentinel.
  8944. function maybeInvokeDelegate(delegate, context) {
  8945. var method = delegate.iterator[context.method];
  8946. if (method === undefined) {
  8947. // A .throw or .return when the delegate iterator has no .throw
  8948. // method always terminates the yield* loop.
  8949. context.delegate = null;
  8950. if (context.method === "throw") {
  8951. if (delegate.iterator.return) {
  8952. // If the delegate iterator has a return method, give it a
  8953. // chance to clean up.
  8954. context.method = "return";
  8955. context.arg = undefined;
  8956. maybeInvokeDelegate(delegate, context);
  8957. if (context.method === "throw") {
  8958. // If maybeInvokeDelegate(context) changed context.method from
  8959. // "return" to "throw", let that override the TypeError below.
  8960. return ContinueSentinel;
  8961. }
  8962. }
  8963. context.method = "throw";
  8964. context.arg = new TypeError(
  8965. "The iterator does not provide a 'throw' method");
  8966. }
  8967. return ContinueSentinel;
  8968. }
  8969. var record = tryCatch(method, delegate.iterator, context.arg);
  8970. if (record.type === "throw") {
  8971. context.method = "throw";
  8972. context.arg = record.arg;
  8973. context.delegate = null;
  8974. return ContinueSentinel;
  8975. }
  8976. var info = record.arg;
  8977. if (! info) {
  8978. context.method = "throw";
  8979. context.arg = new TypeError("iterator result is not an object");
  8980. context.delegate = null;
  8981. return ContinueSentinel;
  8982. }
  8983. if (info.done) {
  8984. // Assign the result of the finished delegate to the temporary
  8985. // variable specified by delegate.resultName (see delegateYield).
  8986. context[delegate.resultName] = info.value;
  8987. // Resume execution at the desired location (see delegateYield).
  8988. context.next = delegate.nextLoc;
  8989. // If context.method was "throw" but the delegate handled the
  8990. // exception, let the outer generator proceed normally. If
  8991. // context.method was "next", forget context.arg since it has been
  8992. // "consumed" by the delegate iterator. If context.method was
  8993. // "return", allow the original .return call to continue in the
  8994. // outer generator.
  8995. if (context.method !== "return") {
  8996. context.method = "next";
  8997. context.arg = undefined;
  8998. }
  8999. } else {
  9000. // Re-yield the result returned by the delegate method.
  9001. return info;
  9002. }
  9003. // The delegate iterator is finished, so forget it and continue with
  9004. // the outer generator.
  9005. context.delegate = null;
  9006. return ContinueSentinel;
  9007. }
  9008. // Define Generator.prototype.{next,throw,return} in terms of the
  9009. // unified ._invoke helper method.
  9010. defineIteratorMethods(Gp);
  9011. Gp[toStringTagSymbol] = "Generator";
  9012. // A Generator should always return itself as the iterator object when the
  9013. // @@iterator function is called on it. Some browsers' implementations of the
  9014. // iterator prototype chain incorrectly implement this, causing the Generator
  9015. // object to not be returned from this call. This ensures that doesn't happen.
  9016. // See https://github.com/facebook/regenerator/issues/274 for more details.
  9017. Gp[iteratorSymbol] = function() {
  9018. return this;
  9019. };
  9020. Gp.toString = function() {
  9021. return "[object Generator]";
  9022. };
  9023. function pushTryEntry(locs) {
  9024. var entry = { tryLoc: locs[0] };
  9025. if (1 in locs) {
  9026. entry.catchLoc = locs[1];
  9027. }
  9028. if (2 in locs) {
  9029. entry.finallyLoc = locs[2];
  9030. entry.afterLoc = locs[3];
  9031. }
  9032. this.tryEntries.push(entry);
  9033. }
  9034. function resetTryEntry(entry) {
  9035. var record = entry.completion || {};
  9036. record.type = "normal";
  9037. delete record.arg;
  9038. entry.completion = record;
  9039. }
  9040. function Context(tryLocsList) {
  9041. // The root entry object (effectively a try statement without a catch
  9042. // or a finally block) gives us a place to store values thrown from
  9043. // locations where there is no enclosing try statement.
  9044. this.tryEntries = [{ tryLoc: "root" }];
  9045. tryLocsList.forEach(pushTryEntry, this);
  9046. this.reset(true);
  9047. }
  9048. runtime.keys = function(object) {
  9049. var keys = [];
  9050. for (var key in object) {
  9051. keys.push(key);
  9052. }
  9053. keys.reverse();
  9054. // Rather than returning an object with a next method, we keep
  9055. // things simple and return the next function itself.
  9056. return function next() {
  9057. while (keys.length) {
  9058. var key = keys.pop();
  9059. if (key in object) {
  9060. next.value = key;
  9061. next.done = false;
  9062. return next;
  9063. }
  9064. }
  9065. // To avoid creating an additional object, we just hang the .value
  9066. // and .done properties off the next function object itself. This
  9067. // also ensures that the minifier will not anonymize the function.
  9068. next.done = true;
  9069. return next;
  9070. };
  9071. };
  9072. function values(iterable) {
  9073. if (iterable) {
  9074. var iteratorMethod = iterable[iteratorSymbol];
  9075. if (iteratorMethod) {
  9076. return iteratorMethod.call(iterable);
  9077. }
  9078. if (typeof iterable.next === "function") {
  9079. return iterable;
  9080. }
  9081. if (!isNaN(iterable.length)) {
  9082. var i = -1, next = function next() {
  9083. while (++i < iterable.length) {
  9084. if (hasOwn.call(iterable, i)) {
  9085. next.value = iterable[i];
  9086. next.done = false;
  9087. return next;
  9088. }
  9089. }
  9090. next.value = undefined;
  9091. next.done = true;
  9092. return next;
  9093. };
  9094. return next.next = next;
  9095. }
  9096. }
  9097. // Return an iterator with no values.
  9098. return { next: doneResult };
  9099. }
  9100. runtime.values = values;
  9101. function doneResult() {
  9102. return { value: undefined, done: true };
  9103. }
  9104. Context.prototype = {
  9105. constructor: Context,
  9106. reset: function(skipTempReset) {
  9107. this.prev = 0;
  9108. this.next = 0;
  9109. // Resetting context._sent for legacy support of Babel's
  9110. // function.sent implementation.
  9111. this.sent = this._sent = undefined;
  9112. this.done = false;
  9113. this.delegate = null;
  9114. this.method = "next";
  9115. this.arg = undefined;
  9116. this.tryEntries.forEach(resetTryEntry);
  9117. if (!skipTempReset) {
  9118. for (var name in this) {
  9119. // Not sure about the optimal order of these conditions:
  9120. if (name.charAt(0) === "t" &&
  9121. hasOwn.call(this, name) &&
  9122. !isNaN(+name.slice(1))) {
  9123. this[name] = undefined;
  9124. }
  9125. }
  9126. }
  9127. },
  9128. stop: function() {
  9129. this.done = true;
  9130. var rootEntry = this.tryEntries[0];
  9131. var rootRecord = rootEntry.completion;
  9132. if (rootRecord.type === "throw") {
  9133. throw rootRecord.arg;
  9134. }
  9135. return this.rval;
  9136. },
  9137. dispatchException: function(exception) {
  9138. if (this.done) {
  9139. throw exception;
  9140. }
  9141. var context = this;
  9142. function handle(loc, caught) {
  9143. record.type = "throw";
  9144. record.arg = exception;
  9145. context.next = loc;
  9146. if (caught) {
  9147. // If the dispatched exception was caught by a catch block,
  9148. // then let that catch block handle the exception normally.
  9149. context.method = "next";
  9150. context.arg = undefined;
  9151. }
  9152. return !! caught;
  9153. }
  9154. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  9155. var entry = this.tryEntries[i];
  9156. var record = entry.completion;
  9157. if (entry.tryLoc === "root") {
  9158. // Exception thrown outside of any try block that could handle
  9159. // it, so set the completion value of the entire function to
  9160. // throw the exception.
  9161. return handle("end");
  9162. }
  9163. if (entry.tryLoc <= this.prev) {
  9164. var hasCatch = hasOwn.call(entry, "catchLoc");
  9165. var hasFinally = hasOwn.call(entry, "finallyLoc");
  9166. if (hasCatch && hasFinally) {
  9167. if (this.prev < entry.catchLoc) {
  9168. return handle(entry.catchLoc, true);
  9169. } else if (this.prev < entry.finallyLoc) {
  9170. return handle(entry.finallyLoc);
  9171. }
  9172. } else if (hasCatch) {
  9173. if (this.prev < entry.catchLoc) {
  9174. return handle(entry.catchLoc, true);
  9175. }
  9176. } else if (hasFinally) {
  9177. if (this.prev < entry.finallyLoc) {
  9178. return handle(entry.finallyLoc);
  9179. }
  9180. } else {
  9181. throw new Error("try statement without catch or finally");
  9182. }
  9183. }
  9184. }
  9185. },
  9186. abrupt: function(type, arg) {
  9187. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  9188. var entry = this.tryEntries[i];
  9189. if (entry.tryLoc <= this.prev &&
  9190. hasOwn.call(entry, "finallyLoc") &&
  9191. this.prev < entry.finallyLoc) {
  9192. var finallyEntry = entry;
  9193. break;
  9194. }
  9195. }
  9196. if (finallyEntry &&
  9197. (type === "break" ||
  9198. type === "continue") &&
  9199. finallyEntry.tryLoc <= arg &&
  9200. arg <= finallyEntry.finallyLoc) {
  9201. // Ignore the finally entry if control is not jumping to a
  9202. // location outside the try/catch block.
  9203. finallyEntry = null;
  9204. }
  9205. var record = finallyEntry ? finallyEntry.completion : {};
  9206. record.type = type;
  9207. record.arg = arg;
  9208. if (finallyEntry) {
  9209. this.method = "next";
  9210. this.next = finallyEntry.finallyLoc;
  9211. return ContinueSentinel;
  9212. }
  9213. return this.complete(record);
  9214. },
  9215. complete: function(record, afterLoc) {
  9216. if (record.type === "throw") {
  9217. throw record.arg;
  9218. }
  9219. if (record.type === "break" ||
  9220. record.type === "continue") {
  9221. this.next = record.arg;
  9222. } else if (record.type === "return") {
  9223. this.rval = this.arg = record.arg;
  9224. this.method = "return";
  9225. this.next = "end";
  9226. } else if (record.type === "normal" && afterLoc) {
  9227. this.next = afterLoc;
  9228. }
  9229. return ContinueSentinel;
  9230. },
  9231. finish: function(finallyLoc) {
  9232. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  9233. var entry = this.tryEntries[i];
  9234. if (entry.finallyLoc === finallyLoc) {
  9235. this.complete(entry.completion, entry.afterLoc);
  9236. resetTryEntry(entry);
  9237. return ContinueSentinel;
  9238. }
  9239. }
  9240. },
  9241. "catch": function(tryLoc) {
  9242. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  9243. var entry = this.tryEntries[i];
  9244. if (entry.tryLoc === tryLoc) {
  9245. var record = entry.completion;
  9246. if (record.type === "throw") {
  9247. var thrown = record.arg;
  9248. resetTryEntry(entry);
  9249. }
  9250. return thrown;
  9251. }
  9252. }
  9253. // The context.catch method must only be called with a location
  9254. // argument that corresponds to a known catch block.
  9255. throw new Error("illegal catch attempt");
  9256. },
  9257. delegateYield: function(iterable, resultName, nextLoc) {
  9258. this.delegate = {
  9259. iterator: values(iterable),
  9260. resultName: resultName,
  9261. nextLoc: nextLoc
  9262. };
  9263. if (this.method === "next") {
  9264. // Deliberately forget the last sent value so that we don't
  9265. // accidentally pass it on to the delegate.
  9266. this.arg = undefined;
  9267. }
  9268. return ContinueSentinel;
  9269. }
  9270. };
  9271. })(
  9272. // In sloppy mode, unbound `this` refers to the global object, fallback to
  9273. // Function constructor if we're in global strict mode. That is sadly a form
  9274. // of indirect eval which violates Content Security Policy.
  9275. (function() {
  9276. return this || (typeof self === "object" && self);
  9277. })() || Function("return this")()
  9278. );
  9279. /***/ }),
  9280. /* 55 */
  9281. /*!*******************************************************************!*\
  9282. !*** D:/66/AAwork/anti-fake/fangwei-select/utiils/uni_request.js ***!
  9283. \*******************************************************************/
  9284. /*! no static exports found */
  9285. /***/ (function(module, exports, __webpack_require__) {
  9286. "use strict";
  9287. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = _default;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 52));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 _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 asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}function _default(_ref) {var baseURL = _ref.baseURL,timeout = _ref.timeout,header = _ref.header;
  9288. return {
  9289. get: function get(url, data) {return this.request('GET', url, data);},
  9290. post: function post(url, data) {return this.request('POST', url, data);},
  9291. put: function put(url, data) {return this.request('PUT', url, data);},
  9292. delete: function _delete(url, data) {return this.request('DELETE', url, data);},
  9293. connect: function connect(url, data) {return this.request('CONNECT', url, data);},
  9294. head: function head(url, data) {return this.request('HEAD', url, data);},
  9295. options: function options(url, data) {return this.request('OPTIONS', url, data);},
  9296. reace: function reace(url, data) {return this.request('TRACE', url, data);},
  9297. uploadFile: function uploadFile(url, data) {return this.file('uploadFile', url, data || {});},
  9298. downloadFile: function downloadFile(url, data) {return this.file('downloadFile', url, data || {});},
  9299. onerror: [], // 请求错误钩子函数集合
  9300. file: function file(method, url, data) {var _this = this;
  9301. var timer,requestTask,aborted = false,abort = function abort() {// timer 检测超时定时器,requestTask 网络请求 task 对象,aborted 请求是否已被取消,abort 取消请求方法
  9302. aborted = true; // 将请求状态标记为已取消
  9303. requestTask ? requestTask.abort() : ''; // 执行取消请求方法
  9304. },progressUpdateHandle,onProgressUpdate = function onProgressUpdate(e) {return progressUpdateHandle = e;}; // progressUpdateHandle 监听上传进度变化回调,onProgressUpdate 监听上传进度变化方法
  9305. return new Proxy(new Promise(function (resolve, reject) {// 返回经过 Proxy 后的 Promise 对象使其可以监听到是否调用 abort 和 onProgressUpdate 方法
  9306. _this.interceptors.request.intercept({ header: data.header || {}, body: data.formData || {} }, method, url, data).then( /*#__PURE__*/function () {var _ref3 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee4(_ref2) {var header, body;return _regenerator.default.wrap(function _callee4$(_context4) {while (1) {switch (_context4.prev = _context4.next) {case 0:header = _ref2.header, body = _ref2.body;if (!
  9307. aborted) {_context4.next = 5;break;}_context4.next = 4;return (
  9308. _this.onerror(method, url, data, '网络请求失败:主动取消'));case 4:return _context4.abrupt("return",
  9309. reject('网络请求失败:主动取消'));case 5:
  9310. requestTask = uni[method]({
  9311. url: url[0] === '/' ? baseURL + url : url,
  9312. name: data.name,
  9313. header: header,
  9314. filePath: data.filePath,
  9315. formData: body,
  9316. success: function () {var _success = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(res) {return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:
  9317. clearTimeout(timer);if (!(
  9318. res.statusCode !== 200)) {_context.next = 6;break;}_context.next = 4;return _this.onerror(method, url, data, "\u7F51\u7EDC\u8BF7\u6C42\u5F02\u5E38\uFF1A\u670D\u52A1\u5668\u54CD\u5E94\u5F02\u5E38\uFF1A\u72B6\u6001\u7801\uFF1A".concat(res.statusCode));case 4:_context.next = 7;break;case 6:'';case 7:
  9319. _this.interceptors.response.intercept(res.statusCode === 200 ? resolve : reject, _objectSpread({ success: res.statusCode === 200 }, res), method, url, data);case 8:case "end":return _context.stop();}}}, _callee);}));function success(_x2) {return _success.apply(this, arguments);}return success;}(),
  9320. fail: function () {var _fail = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee2(res) {return _regenerator.default.wrap(function _callee2$(_context2) {while (1) {switch (_context2.prev = _context2.next) {case 0:
  9321. clearTimeout(timer);_context2.next = 3;return (
  9322. _this.onerror(method, url, data, aborted ? '网络请求失败:主动取消' : '网络请求失败:(URL无效|无网络|DNS解析失败)'));case 3:
  9323. aborted ? reject('网络请求失败:主动取消') : reject('网络请求失败:(URL无效|无网络|DNS解析失败)');case 4:case "end":return _context2.stop();}}}, _callee2);}));function fail(_x3) {return _fail.apply(this, arguments);}return fail;}() });
  9324. requestTask.onProgressUpdate(progressUpdateHandle); // 监听下载进度变化
  9325. timer = setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee3() {return _regenerator.default.wrap(function _callee3$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0: // 请求超时执行方法
  9326. requestTask.abort(); // 执行取消请求方法
  9327. _context3.next = 3;return _this.onerror(method, url, data, '网络请求失败:超时取消');case 3:
  9328. reject('网络请求时间超时'); // reject 原因
  9329. case 4:case "end":return _context3.stop();}}}, _callee3);})), timeout || 12345); // 设定检测超时定时器
  9330. case 8:case "end":return _context4.stop();}}}, _callee4);}));return function (_x) {return _ref3.apply(this, arguments);};}());
  9331. }), { get: function get(target, prop) {return prop === 'abort' ? abort : prop === 'onProgressUpdate' ? onProgressUpdate : Reflect.get(target, prop).bind(target);} }); // 如果调用 cancel 方法,返回 _watcher.cancel 方法
  9332. },
  9333. request: function request(method, url, data) {var _this2 = this;
  9334. var timer,requestTask,aborted = false,abort = function abort() {// timer 检测超时定时器,requestTask 网络请求 task 对象,aborted 请求是否已被取消,abort 取消请求方法
  9335. aborted = true; // 将请求状态标记为已取消
  9336. requestTask ? requestTask.abort() : ''; // 执行取消请求方法
  9337. };
  9338. return new Proxy(new Promise(function (resolve, reject) {// 返回经过 Proxy 后的 Promise 对象使其可以监听到是否调用 abort 方法
  9339. _this2.interceptors.request.intercept({ header: header || {}, body: data || {} }, method, url, data).then( /*#__PURE__*/function () {var _ref6 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee8(_ref5) {var header, data;return _regenerator.default.wrap(function _callee8$(_context8) {while (1) {switch (_context8.prev = _context8.next) {case 0:header = _ref5.header, data = _ref5.body;if (!
  9340. aborted) {_context8.next = 5;break;}_context8.next = 4;return (
  9341. _this2.onerror(method, url, data, '网络请求失败:主动取消'));case 4:return _context8.abrupt("return",
  9342. reject('网络请求失败:主动取消'));case 5:
  9343. requestTask = uni.request({
  9344. url: url[0] === '/' ? baseURL + url : url,
  9345. data: data, method: method, header: header,
  9346. success: function () {var _success2 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee5(res) {return _regenerator.default.wrap(function _callee5$(_context5) {while (1) {switch (_context5.prev = _context5.next) {case 0: // 网络请求成功
  9347. clearTimeout(timer); // 清除检测超时定时器
  9348. if (!(res.statusCode !== 200)) {_context5.next = 6;break;}_context5.next = 4;return _this2.onerror(method, url, data, "\u7F51\u7EDC\u8BF7\u6C42\u5F02\u5E38\uFF1A\u670D\u52A1\u5668\u54CD\u5E94\u5F02\u5E38\uFF1A\u72B6\u6001\u7801\uFF1A".concat(res.statusCode));case 4:_context5.next = 7;break;case 6:'';case 7:
  9349. _this2.interceptors.response.intercept(res.statusCode === 200 ? resolve : reject, _objectSpread({ success: res.statusCode === 200 }, res), method, url, data); // 执行响应拦截器
  9350. case 8:case "end":return _context5.stop();}}}, _callee5);}));function success(_x5) {return _success2.apply(this, arguments);}return success;}(),
  9351. fail: function () {var _fail2 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee6(res) {return _regenerator.default.wrap(function _callee6$(_context6) {while (1) {switch (_context6.prev = _context6.next) {case 0: // 网络请求失败
  9352. clearTimeout(timer); // 清除检测超时定时器
  9353. _context6.next = 3;return _this2.onerror(method, url, data, aborted ? '网络请求失败:主动取消' : '网络请求失败:(URL无效|无网络|DNS解析失败)');case 3:
  9354. aborted ? reject('网络请求失败:主动取消') : reject('网络请求失败:(URL无效|无网络|DNS解析失败)');case 4:case "end":return _context6.stop();}}}, _callee6);}));function fail(_x6) {return _fail2.apply(this, arguments);}return fail;}() });
  9355. timer = setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee7() {return _regenerator.default.wrap(function _callee7$(_context7) {while (1) {switch (_context7.prev = _context7.next) {case 0: // 请求超时执行方法
  9356. requestTask.abort(); // 执行取消请求方法
  9357. _context7.next = 3;return _this2.onerror(method, url, data, '网络请求失败:超时取消');case 3:
  9358. reject('网络请求时间超时'); // reject 原因
  9359. case 4:case "end":return _context7.stop();}}}, _callee7);})), timeout || 12345); // 设定检测超时定时器
  9360. case 7:case "end":return _context8.stop();}}}, _callee8);}));return function (_x4) {return _ref6.apply(this, arguments);};}());
  9361. }), { get: function get(target, prop) {return prop === 'abort' ? abort : Reflect.get(target, prop).bind(target);} }); // 如果调用 abort 方法,返回 abort 方法
  9362. },
  9363. interceptors: { // 拦截器
  9364. request: {
  9365. interceptors: [],
  9366. use: function use(fun) {this.interceptors.push(fun);},
  9367. intercept: function intercept(config, method, url, data) {var _this3 = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee9() {var i;return _regenerator.default.wrap(function _callee9$(_context9) {while (1) {switch (_context9.prev = _context9.next) {case 0:
  9368. i = 0;case 1:if (!(i < _this3.interceptors.length)) {_context9.next = 8;break;}_context9.next = 4;return (
  9369. _this3.interceptors[i](config, method, url, data));case 4:config = _context9.sent;case 5:i++;_context9.next = 1;break;case 8:return _context9.abrupt("return",
  9370. config);case 9:case "end":return _context9.stop();}}}, _callee9);}))();
  9371. } },
  9372. response: {
  9373. interceptors: [],
  9374. use: function use(fun) {this.interceptors.push(fun);},
  9375. intercept: function intercept(STATUS, response, method, url, data) {var _this4 = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee10() {var i;return _regenerator.default.wrap(function _callee10$(_context10) {while (1) {switch (_context10.prev = _context10.next) {case 0:
  9376. i = 0;case 1:if (!(i < _this4.interceptors.length)) {_context10.next = 8;break;}_context10.next = 4;return (
  9377. _this4.interceptors[i](response, method, url, data));case 4:response = _context10.sent;case 5:i++;_context10.next = 1;break;case 8:if (!
  9378. response.success) {_context10.next = 18;break;}_context10.prev = 9;return _context10.abrupt("return",
  9379. STATUS(typeof response.data === 'string' ? JSON.parse(response.data) : response.data));case 13:_context10.prev = 13;_context10.t0 = _context10["catch"](9);return _context10.abrupt("return",
  9380. STATUS(response.data));case 16:_context10.next = 20;break;case 18:
  9381. delete response.success;return _context10.abrupt("return",
  9382. STATUS(response, method, url, data));case 20:case "end":return _context10.stop();}}}, _callee10, null, [[9, 13]]);}))();
  9383. } } } };
  9384. }
  9385. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  9386. /***/ })
  9387. ]]);
  9388. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map