vendor.js 396 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!************************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  5. \************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _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(n);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}
  10. var _toString = Object.prototype.toString;
  11. var hasOwnProperty = Object.prototype.hasOwnProperty;
  12. function isFn(fn) {
  13. return typeof fn === 'function';
  14. }
  15. function isStr(str) {
  16. return typeof str === 'string';
  17. }
  18. function isPlainObject(obj) {
  19. return _toString.call(obj) === '[object Object]';
  20. }
  21. function hasOwn(obj, key) {
  22. return hasOwnProperty.call(obj, key);
  23. }
  24. function noop() {}
  25. /**
  26. * Create a cached version of a pure function.
  27. */
  28. function cached(fn) {
  29. var cache = Object.create(null);
  30. return function cachedFn(str) {
  31. var hit = cache[str];
  32. return hit || (cache[str] = fn(str));
  33. };
  34. }
  35. /**
  36. * Camelize a hyphen-delimited string.
  37. */
  38. var camelizeRE = /-(\w)/g;
  39. var camelize = cached(function (str) {
  40. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  41. });
  42. var HOOKS = [
  43. 'invoke',
  44. 'success',
  45. 'fail',
  46. 'complete',
  47. 'returnValue'];
  48. var globalInterceptors = {};
  49. var scopedInterceptors = {};
  50. function mergeHook(parentVal, childVal) {
  51. var res = childVal ?
  52. parentVal ?
  53. parentVal.concat(childVal) :
  54. Array.isArray(childVal) ?
  55. childVal : [childVal] :
  56. parentVal;
  57. return res ?
  58. dedupeHooks(res) :
  59. res;
  60. }
  61. function dedupeHooks(hooks) {
  62. var res = [];
  63. for (var i = 0; i < hooks.length; i++) {
  64. if (res.indexOf(hooks[i]) === -1) {
  65. res.push(hooks[i]);
  66. }
  67. }
  68. return res;
  69. }
  70. function removeHook(hooks, hook) {
  71. var index = hooks.indexOf(hook);
  72. if (index !== -1) {
  73. hooks.splice(index, 1);
  74. }
  75. }
  76. function mergeInterceptorHook(interceptor, option) {
  77. Object.keys(option).forEach(function (hook) {
  78. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  79. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  80. }
  81. });
  82. }
  83. function removeInterceptorHook(interceptor, option) {
  84. if (!interceptor || !option) {
  85. return;
  86. }
  87. Object.keys(option).forEach(function (hook) {
  88. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  89. removeHook(interceptor[hook], option[hook]);
  90. }
  91. });
  92. }
  93. function addInterceptor(method, option) {
  94. if (typeof method === 'string' && isPlainObject(option)) {
  95. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  96. } else if (isPlainObject(method)) {
  97. mergeInterceptorHook(globalInterceptors, method);
  98. }
  99. }
  100. function removeInterceptor(method, option) {
  101. if (typeof method === 'string') {
  102. if (isPlainObject(option)) {
  103. removeInterceptorHook(scopedInterceptors[method], option);
  104. } else {
  105. delete scopedInterceptors[method];
  106. }
  107. } else if (isPlainObject(method)) {
  108. removeInterceptorHook(globalInterceptors, method);
  109. }
  110. }
  111. function wrapperHook(hook) {
  112. return function (data) {
  113. return hook(data) || data;
  114. };
  115. }
  116. function isPromise(obj) {
  117. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  118. }
  119. function queue(hooks, data) {
  120. var promise = false;
  121. for (var i = 0; i < hooks.length; i++) {
  122. var hook = hooks[i];
  123. if (promise) {
  124. promise = Promise.resolve(wrapperHook(hook));
  125. } else {
  126. var res = hook(data);
  127. if (isPromise(res)) {
  128. promise = Promise.resolve(res);
  129. }
  130. if (res === false) {
  131. return {
  132. then: function then() {} };
  133. }
  134. }
  135. }
  136. return promise || {
  137. then: function then(callback) {
  138. return callback(data);
  139. } };
  140. }
  141. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  142. ['success', 'fail', 'complete'].forEach(function (name) {
  143. if (Array.isArray(interceptor[name])) {
  144. var oldCallback = options[name];
  145. options[name] = function callbackInterceptor(res) {
  146. queue(interceptor[name], res).then(function (res) {
  147. /* eslint-disable no-mixed-operators */
  148. return isFn(oldCallback) && oldCallback(res) || res;
  149. });
  150. };
  151. }
  152. });
  153. return options;
  154. }
  155. function wrapperReturnValue(method, returnValue) {
  156. var returnValueHooks = [];
  157. if (Array.isArray(globalInterceptors.returnValue)) {
  158. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  159. }
  160. var interceptor = scopedInterceptors[method];
  161. if (interceptor && Array.isArray(interceptor.returnValue)) {
  162. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  163. }
  164. returnValueHooks.forEach(function (hook) {
  165. returnValue = hook(returnValue) || returnValue;
  166. });
  167. return returnValue;
  168. }
  169. function getApiInterceptorHooks(method) {
  170. var interceptor = Object.create(null);
  171. Object.keys(globalInterceptors).forEach(function (hook) {
  172. if (hook !== 'returnValue') {
  173. interceptor[hook] = globalInterceptors[hook].slice();
  174. }
  175. });
  176. var scopedInterceptor = scopedInterceptors[method];
  177. if (scopedInterceptor) {
  178. Object.keys(scopedInterceptor).forEach(function (hook) {
  179. if (hook !== 'returnValue') {
  180. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  181. }
  182. });
  183. }
  184. return interceptor;
  185. }
  186. function invokeApi(method, api, options) {for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {params[_key - 3] = arguments[_key];}
  187. var interceptor = getApiInterceptorHooks(method);
  188. if (interceptor && Object.keys(interceptor).length) {
  189. if (Array.isArray(interceptor.invoke)) {
  190. var res = queue(interceptor.invoke, options);
  191. return res.then(function (options) {
  192. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  193. });
  194. } else {
  195. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  196. }
  197. }
  198. return api.apply(void 0, [options].concat(params));
  199. }
  200. var promiseInterceptor = {
  201. returnValue: function returnValue(res) {
  202. if (!isPromise(res)) {
  203. return res;
  204. }
  205. return res.then(function (res) {
  206. return res[1];
  207. }).catch(function (res) {
  208. return res[0];
  209. });
  210. } };
  211. var SYNC_API_RE =
  212. /^\$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/;
  213. var CONTEXT_API_RE = /^create|Manager$/;
  214. // Context例外情况
  215. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  216. // 同步例外情况
  217. var ASYNC_API = ['createBLEConnection'];
  218. var CALLBACK_API_RE = /^on|^off/;
  219. function isContextApi(name) {
  220. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  221. }
  222. function isSyncApi(name) {
  223. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  224. }
  225. function isCallbackApi(name) {
  226. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  227. }
  228. function handlePromise(promise) {
  229. return promise.then(function (data) {
  230. return [null, data];
  231. }).
  232. catch(function (err) {return [err];});
  233. }
  234. function shouldPromise(name) {
  235. if (
  236. isContextApi(name) ||
  237. isSyncApi(name) ||
  238. isCallbackApi(name))
  239. {
  240. return false;
  241. }
  242. return true;
  243. }
  244. /* eslint-disable no-extend-native */
  245. if (!Promise.prototype.finally) {
  246. Promise.prototype.finally = function (callback) {
  247. var promise = this.constructor;
  248. return this.then(
  249. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  250. function (reason) {return promise.resolve(callback()).then(function () {
  251. throw reason;
  252. });});
  253. };
  254. }
  255. function promisify(name, api) {
  256. if (!shouldPromise(name)) {
  257. return api;
  258. }
  259. return function promiseApi() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {params[_key2 - 1] = arguments[_key2];}
  260. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  261. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  262. }
  263. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  264. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  265. success: resolve,
  266. fail: reject })].concat(
  267. params));
  268. })));
  269. };
  270. }
  271. var EPS = 1e-4;
  272. var BASE_DEVICE_WIDTH = 750;
  273. var isIOS = false;
  274. var deviceWidth = 0;
  275. var deviceDPR = 0;
  276. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  277. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  278. deviceWidth = windowWidth;
  279. deviceDPR = pixelRatio;
  280. isIOS = platform === 'ios';
  281. }
  282. function upx2px(number, newDeviceWidth) {
  283. if (deviceWidth === 0) {
  284. checkDeviceWidth();
  285. }
  286. number = Number(number);
  287. if (number === 0) {
  288. return 0;
  289. }
  290. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  291. if (result < 0) {
  292. result = -result;
  293. }
  294. result = Math.floor(result + EPS);
  295. if (result === 0) {
  296. if (deviceDPR === 1 || !isIOS) {
  297. result = 1;
  298. } else {
  299. result = 0.5;
  300. }
  301. }
  302. return number < 0 ? -result : result;
  303. }
  304. var interceptors = {
  305. promiseInterceptor: promiseInterceptor };
  306. var baseApi = /*#__PURE__*/Object.freeze({
  307. __proto__: null,
  308. upx2px: upx2px,
  309. addInterceptor: addInterceptor,
  310. removeInterceptor: removeInterceptor,
  311. interceptors: interceptors });
  312. var previewImage = {
  313. args: function args(fromArgs) {
  314. var currentIndex = parseInt(fromArgs.current);
  315. if (isNaN(currentIndex)) {
  316. return;
  317. }
  318. var urls = fromArgs.urls;
  319. if (!Array.isArray(urls)) {
  320. return;
  321. }
  322. var len = urls.length;
  323. if (!len) {
  324. return;
  325. }
  326. if (currentIndex < 0) {
  327. currentIndex = 0;
  328. } else if (currentIndex >= len) {
  329. currentIndex = len - 1;
  330. }
  331. if (currentIndex > 0) {
  332. fromArgs.current = urls[currentIndex];
  333. fromArgs.urls = urls.filter(
  334. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  335. } else {
  336. fromArgs.current = urls[0];
  337. }
  338. return {
  339. indicator: false,
  340. loop: false };
  341. } };
  342. function addSafeAreaInsets(result) {
  343. if (result.safeArea) {
  344. var safeArea = result.safeArea;
  345. result.safeAreaInsets = {
  346. top: safeArea.top,
  347. left: safeArea.left,
  348. right: result.windowWidth - safeArea.right,
  349. bottom: result.windowHeight - safeArea.bottom };
  350. }
  351. }
  352. var protocols = {
  353. previewImage: previewImage,
  354. getSystemInfo: {
  355. returnValue: addSafeAreaInsets },
  356. getSystemInfoSync: {
  357. returnValue: addSafeAreaInsets } };
  358. var todos = [
  359. 'vibrate',
  360. 'preloadPage',
  361. 'unPreloadPage',
  362. 'loadSubPackage'];
  363. var canIUses = [];
  364. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  365. function processCallback(methodName, method, returnValue) {
  366. return function (res) {
  367. return method(processReturnValue(methodName, res, returnValue));
  368. };
  369. }
  370. 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;
  371. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  372. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  373. if (isFn(argsOption)) {
  374. argsOption = argsOption(fromArgs, toArgs) || {};
  375. }
  376. for (var key in fromArgs) {
  377. if (hasOwn(argsOption, key)) {
  378. var keyOption = argsOption[key];
  379. if (isFn(keyOption)) {
  380. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  381. }
  382. if (!keyOption) {// 不支持的参数
  383. console.warn("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F ".concat(methodName, "\u6682\u4E0D\u652F\u6301").concat(key));
  384. } else if (isStr(keyOption)) {// 重写参数 key
  385. toArgs[keyOption] = fromArgs[key];
  386. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  387. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  388. }
  389. } else if (CALLBACKS.indexOf(key) !== -1) {
  390. if (isFn(fromArgs[key])) {
  391. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  392. }
  393. } else {
  394. if (!keepFromArgs) {
  395. toArgs[key] = fromArgs[key];
  396. }
  397. }
  398. }
  399. return toArgs;
  400. } else if (isFn(fromArgs)) {
  401. fromArgs = processCallback(methodName, fromArgs, returnValue);
  402. }
  403. return fromArgs;
  404. }
  405. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  406. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  407. res = protocols.returnValue(methodName, res);
  408. }
  409. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  410. }
  411. function wrapper(methodName, method) {
  412. if (hasOwn(protocols, methodName)) {
  413. var protocol = protocols[methodName];
  414. if (!protocol) {// 暂不支持的 api
  415. return function () {
  416. console.error("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F \u6682\u4E0D\u652F\u6301".concat(methodName));
  417. };
  418. }
  419. return function (arg1, arg2) {// 目前 api 最多两个参数
  420. var options = protocol;
  421. if (isFn(protocol)) {
  422. options = protocol(arg1);
  423. }
  424. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  425. var args = [arg1];
  426. if (typeof arg2 !== 'undefined') {
  427. args.push(arg2);
  428. }
  429. var returnValue = wx[options.name || methodName].apply(wx, args);
  430. if (isSyncApi(methodName)) {// 同步 api
  431. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  432. }
  433. return returnValue;
  434. };
  435. }
  436. return method;
  437. }
  438. var todoApis = Object.create(null);
  439. var TODOS = [
  440. 'onTabBarMidButtonTap',
  441. 'subscribePush',
  442. 'unsubscribePush',
  443. 'onPush',
  444. 'offPush',
  445. 'share'];
  446. function createTodoApi(name) {
  447. return function todoApi(_ref)
  448. {var fail = _ref.fail,complete = _ref.complete;
  449. var res = {
  450. errMsg: "".concat(name, ":fail:\u6682\u4E0D\u652F\u6301 ").concat(name, " \u65B9\u6CD5") };
  451. isFn(fail) && fail(res);
  452. isFn(complete) && complete(res);
  453. };
  454. }
  455. TODOS.forEach(function (name) {
  456. todoApis[name] = createTodoApi(name);
  457. });
  458. var providers = {
  459. oauth: ['weixin'],
  460. share: ['weixin'],
  461. payment: ['wxpay'],
  462. push: ['weixin'] };
  463. function getProvider(_ref2)
  464. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  465. var res = false;
  466. if (providers[service]) {
  467. res = {
  468. errMsg: 'getProvider:ok',
  469. service: service,
  470. provider: providers[service] };
  471. isFn(success) && success(res);
  472. } else {
  473. res = {
  474. errMsg: 'getProvider:fail:服务[' + service + ']不存在' };
  475. isFn(fail) && fail(res);
  476. }
  477. isFn(complete) && complete(res);
  478. }
  479. var extraApi = /*#__PURE__*/Object.freeze({
  480. __proto__: null,
  481. getProvider: getProvider });
  482. var getEmitter = function () {
  483. var Emitter;
  484. return function getUniEmitter() {
  485. if (!Emitter) {
  486. Emitter = new _vue.default();
  487. }
  488. return Emitter;
  489. };
  490. }();
  491. function apply(ctx, method, args) {
  492. return ctx[method].apply(ctx, args);
  493. }
  494. function $on() {
  495. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  496. }
  497. function $off() {
  498. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  499. }
  500. function $once() {
  501. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  502. }
  503. function $emit() {
  504. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  505. }
  506. var eventApi = /*#__PURE__*/Object.freeze({
  507. __proto__: null,
  508. $on: $on,
  509. $off: $off,
  510. $once: $once,
  511. $emit: $emit });
  512. var api = /*#__PURE__*/Object.freeze({
  513. __proto__: null });
  514. var MPPage = Page;
  515. var MPComponent = Component;
  516. var customizeRE = /:/g;
  517. var customize = cached(function (str) {
  518. return camelize(str.replace(customizeRE, '-'));
  519. });
  520. function initTriggerEvent(mpInstance) {
  521. {
  522. if (!wx.canIUse('nextTick')) {
  523. return;
  524. }
  525. }
  526. var oldTriggerEvent = mpInstance.triggerEvent;
  527. mpInstance.triggerEvent = function (event) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  528. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  529. };
  530. }
  531. function initHook(name, options) {
  532. var oldHook = options[name];
  533. if (!oldHook) {
  534. options[name] = function () {
  535. initTriggerEvent(this);
  536. };
  537. } else {
  538. options[name] = function () {
  539. initTriggerEvent(this);for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {args[_key4] = arguments[_key4];}
  540. return oldHook.apply(this, args);
  541. };
  542. }
  543. }
  544. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  545. initHook('onLoad', options);
  546. return MPPage(options);
  547. };
  548. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  549. initHook('created', options);
  550. return MPComponent(options);
  551. };
  552. var PAGE_EVENT_HOOKS = [
  553. 'onPullDownRefresh',
  554. 'onReachBottom',
  555. 'onAddToFavorites',
  556. 'onShareTimeline',
  557. 'onShareAppMessage',
  558. 'onPageScroll',
  559. 'onResize',
  560. 'onTabItemTap'];
  561. function initMocks(vm, mocks) {
  562. var mpInstance = vm.$mp[vm.mpType];
  563. mocks.forEach(function (mock) {
  564. if (hasOwn(mpInstance, mock)) {
  565. vm[mock] = mpInstance[mock];
  566. }
  567. });
  568. }
  569. function hasHook(hook, vueOptions) {
  570. if (!vueOptions) {
  571. return true;
  572. }
  573. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  574. return true;
  575. }
  576. vueOptions = vueOptions.default || vueOptions;
  577. if (isFn(vueOptions)) {
  578. if (isFn(vueOptions.extendOptions[hook])) {
  579. return true;
  580. }
  581. if (vueOptions.super &&
  582. vueOptions.super.options &&
  583. Array.isArray(vueOptions.super.options[hook])) {
  584. return true;
  585. }
  586. return false;
  587. }
  588. if (isFn(vueOptions[hook])) {
  589. return true;
  590. }
  591. var mixins = vueOptions.mixins;
  592. if (Array.isArray(mixins)) {
  593. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  594. }
  595. }
  596. function initHooks(mpOptions, hooks, vueOptions) {
  597. hooks.forEach(function (hook) {
  598. if (hasHook(hook, vueOptions)) {
  599. mpOptions[hook] = function (args) {
  600. return this.$vm && this.$vm.__call_hook(hook, args);
  601. };
  602. }
  603. });
  604. }
  605. function initVueComponent(Vue, vueOptions) {
  606. vueOptions = vueOptions.default || vueOptions;
  607. var VueComponent;
  608. if (isFn(vueOptions)) {
  609. VueComponent = vueOptions;
  610. } else {
  611. VueComponent = Vue.extend(vueOptions);
  612. }
  613. vueOptions = VueComponent.options;
  614. return [VueComponent, vueOptions];
  615. }
  616. function initSlots(vm, vueSlots) {
  617. if (Array.isArray(vueSlots) && vueSlots.length) {
  618. var $slots = Object.create(null);
  619. vueSlots.forEach(function (slotName) {
  620. $slots[slotName] = true;
  621. });
  622. vm.$scopedSlots = vm.$slots = $slots;
  623. }
  624. }
  625. function initVueIds(vueIds, mpInstance) {
  626. vueIds = (vueIds || '').split(',');
  627. var len = vueIds.length;
  628. if (len === 1) {
  629. mpInstance._$vueId = vueIds[0];
  630. } else if (len === 2) {
  631. mpInstance._$vueId = vueIds[0];
  632. mpInstance._$vuePid = vueIds[1];
  633. }
  634. }
  635. function initData(vueOptions, context) {
  636. var data = vueOptions.data || {};
  637. var methods = vueOptions.methods || {};
  638. if (typeof data === 'function') {
  639. try {
  640. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  641. } catch (e) {
  642. if (Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  643. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  644. }
  645. }
  646. } else {
  647. try {
  648. // 对 data 格式化
  649. data = JSON.parse(JSON.stringify(data));
  650. } catch (e) {}
  651. }
  652. if (!isPlainObject(data)) {
  653. data = {};
  654. }
  655. Object.keys(methods).forEach(function (methodName) {
  656. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  657. data[methodName] = methods[methodName];
  658. }
  659. });
  660. return data;
  661. }
  662. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  663. function createObserver(name) {
  664. return function observer(newVal, oldVal) {
  665. if (this.$vm) {
  666. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  667. }
  668. };
  669. }
  670. function initBehaviors(vueOptions, initBehavior) {
  671. var vueBehaviors = vueOptions.behaviors;
  672. var vueExtends = vueOptions.extends;
  673. var vueMixins = vueOptions.mixins;
  674. var vueProps = vueOptions.props;
  675. if (!vueProps) {
  676. vueOptions.props = vueProps = [];
  677. }
  678. var behaviors = [];
  679. if (Array.isArray(vueBehaviors)) {
  680. vueBehaviors.forEach(function (behavior) {
  681. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  682. if (behavior === 'uni://form-field') {
  683. if (Array.isArray(vueProps)) {
  684. vueProps.push('name');
  685. vueProps.push('value');
  686. } else {
  687. vueProps.name = {
  688. type: String,
  689. default: '' };
  690. vueProps.value = {
  691. type: [String, Number, Boolean, Array, Object, Date],
  692. default: '' };
  693. }
  694. }
  695. });
  696. }
  697. if (isPlainObject(vueExtends) && vueExtends.props) {
  698. behaviors.push(
  699. initBehavior({
  700. properties: initProperties(vueExtends.props, true) }));
  701. }
  702. if (Array.isArray(vueMixins)) {
  703. vueMixins.forEach(function (vueMixin) {
  704. if (isPlainObject(vueMixin) && vueMixin.props) {
  705. behaviors.push(
  706. initBehavior({
  707. properties: initProperties(vueMixin.props, true) }));
  708. }
  709. });
  710. }
  711. return behaviors;
  712. }
  713. function parsePropType(key, type, defaultValue, file) {
  714. // [String]=>String
  715. if (Array.isArray(type) && type.length === 1) {
  716. return type[0];
  717. }
  718. return type;
  719. }
  720. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  721. var properties = {};
  722. if (!isBehavior) {
  723. properties.vueId = {
  724. type: String,
  725. value: '' };
  726. // 用于字节跳动小程序模拟抽象节点
  727. properties.generic = {
  728. type: Object,
  729. value: null };
  730. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  731. type: null,
  732. value: [],
  733. observer: function observer(newVal, oldVal) {
  734. var $slots = Object.create(null);
  735. newVal.forEach(function (slotName) {
  736. $slots[slotName] = true;
  737. });
  738. this.setData({
  739. $slots: $slots });
  740. } };
  741. }
  742. if (Array.isArray(props)) {// ['title']
  743. props.forEach(function (key) {
  744. properties[key] = {
  745. type: null,
  746. observer: createObserver(key) };
  747. });
  748. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  749. Object.keys(props).forEach(function (key) {
  750. var opts = props[key];
  751. if (isPlainObject(opts)) {// title:{type:String,default:''}
  752. var value = opts.default;
  753. if (isFn(value)) {
  754. value = value();
  755. }
  756. opts.type = parsePropType(key, opts.type);
  757. properties[key] = {
  758. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  759. value: value,
  760. observer: createObserver(key) };
  761. } else {// content:String
  762. var type = parsePropType(key, opts);
  763. properties[key] = {
  764. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  765. observer: createObserver(key) };
  766. }
  767. });
  768. }
  769. return properties;
  770. }
  771. function wrapper$1(event) {
  772. // TODO 又得兼容 mpvue 的 mp 对象
  773. try {
  774. event.mp = JSON.parse(JSON.stringify(event));
  775. } catch (e) {}
  776. event.stopPropagation = noop;
  777. event.preventDefault = noop;
  778. event.target = event.target || {};
  779. if (!hasOwn(event, 'detail')) {
  780. event.detail = {};
  781. }
  782. if (hasOwn(event, 'markerId')) {
  783. event.detail = typeof event.detail === 'object' ? event.detail : {};
  784. event.detail.markerId = event.markerId;
  785. }
  786. if (isPlainObject(event.detail)) {
  787. event.target = Object.assign({}, event.target, event.detail);
  788. }
  789. return event;
  790. }
  791. function getExtraValue(vm, dataPathsArray) {
  792. var context = vm;
  793. dataPathsArray.forEach(function (dataPathArray) {
  794. var dataPath = dataPathArray[0];
  795. var value = dataPathArray[2];
  796. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  797. var propPath = dataPathArray[1];
  798. var valuePath = dataPathArray[3];
  799. var vFor;
  800. if (Number.isInteger(dataPath)) {
  801. vFor = dataPath;
  802. } else if (!dataPath) {
  803. vFor = context;
  804. } else if (typeof dataPath === 'string' && dataPath) {
  805. if (dataPath.indexOf('#s#') === 0) {
  806. vFor = dataPath.substr(3);
  807. } else {
  808. vFor = vm.__get_value(dataPath, context);
  809. }
  810. }
  811. if (Number.isInteger(vFor)) {
  812. context = value;
  813. } else if (!propPath) {
  814. context = vFor[value];
  815. } else {
  816. if (Array.isArray(vFor)) {
  817. context = vFor.find(function (vForItem) {
  818. return vm.__get_value(propPath, vForItem) === value;
  819. });
  820. } else if (isPlainObject(vFor)) {
  821. context = Object.keys(vFor).find(function (vForKey) {
  822. return vm.__get_value(propPath, vFor[vForKey]) === value;
  823. });
  824. } else {
  825. console.error('v-for 暂不支持循环数据:', vFor);
  826. }
  827. }
  828. if (valuePath) {
  829. context = vm.__get_value(valuePath, context);
  830. }
  831. }
  832. });
  833. return context;
  834. }
  835. function processEventExtra(vm, extra, event) {
  836. var extraObj = {};
  837. if (Array.isArray(extra) && extra.length) {
  838. /**
  839. *[
  840. * ['data.items', 'data.id', item.data.id],
  841. * ['metas', 'id', meta.id]
  842. *],
  843. *[
  844. * ['data.items', 'data.id', item.data.id],
  845. * ['metas', 'id', meta.id]
  846. *],
  847. *'test'
  848. */
  849. extra.forEach(function (dataPath, index) {
  850. if (typeof dataPath === 'string') {
  851. if (!dataPath) {// model,prop.sync
  852. extraObj['$' + index] = vm;
  853. } else {
  854. if (dataPath === '$event') {// $event
  855. extraObj['$' + index] = event;
  856. } else if (dataPath === 'arguments') {
  857. if (event.detail && event.detail.__args__) {
  858. extraObj['$' + index] = event.detail.__args__;
  859. } else {
  860. extraObj['$' + index] = [event];
  861. }
  862. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  863. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  864. } else {
  865. extraObj['$' + index] = vm.__get_value(dataPath);
  866. }
  867. }
  868. } else {
  869. extraObj['$' + index] = getExtraValue(vm, dataPath);
  870. }
  871. });
  872. }
  873. return extraObj;
  874. }
  875. function getObjByArray(arr) {
  876. var obj = {};
  877. for (var i = 1; i < arr.length; i++) {
  878. var element = arr[i];
  879. obj[element[0]] = element[1];
  880. }
  881. return obj;
  882. }
  883. 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;
  884. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  885. if (isCustom) {// 自定义事件
  886. isCustomMPEvent = event.currentTarget &&
  887. event.currentTarget.dataset &&
  888. event.currentTarget.dataset.comType === 'wx';
  889. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  890. if (isCustomMPEvent) {
  891. return [event];
  892. }
  893. return event.detail.__args__ || event.detail;
  894. }
  895. }
  896. var extraObj = processEventExtra(vm, extra, event);
  897. var ret = [];
  898. args.forEach(function (arg) {
  899. if (arg === '$event') {
  900. if (methodName === '__set_model' && !isCustom) {// input v-model value
  901. ret.push(event.target.value);
  902. } else {
  903. if (isCustom && !isCustomMPEvent) {
  904. ret.push(event.detail.__args__[0]);
  905. } else {// wxcomponent 组件或内置组件
  906. ret.push(event);
  907. }
  908. }
  909. } else {
  910. if (Array.isArray(arg) && arg[0] === 'o') {
  911. ret.push(getObjByArray(arg));
  912. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  913. ret.push(extraObj[arg]);
  914. } else {
  915. ret.push(arg);
  916. }
  917. }
  918. });
  919. return ret;
  920. }
  921. var ONCE = '~';
  922. var CUSTOM = '^';
  923. function isMatchEventType(eventType, optType) {
  924. return eventType === optType ||
  925. optType === 'regionchange' && (
  926. eventType === 'begin' ||
  927. eventType === 'end');
  928. }
  929. function getContextVm(vm) {
  930. var $parent = vm.$parent;
  931. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  932. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  933. $parent = $parent.$parent;
  934. }
  935. return $parent && $parent.$parent;
  936. }
  937. function handleEvent(event) {var _this = this;
  938. event = wrapper$1(event);
  939. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  940. var dataset = (event.currentTarget || event.target).dataset;
  941. if (!dataset) {
  942. return console.warn('事件信息不存在');
  943. }
  944. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  945. if (!eventOpts) {
  946. return console.warn('事件信息不存在');
  947. }
  948. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  949. var eventType = event.type;
  950. var ret = [];
  951. eventOpts.forEach(function (eventOpt) {
  952. var type = eventOpt[0];
  953. var eventsArray = eventOpt[1];
  954. var isCustom = type.charAt(0) === CUSTOM;
  955. type = isCustom ? type.slice(1) : type;
  956. var isOnce = type.charAt(0) === ONCE;
  957. type = isOnce ? type.slice(1) : type;
  958. if (eventsArray && isMatchEventType(eventType, type)) {
  959. eventsArray.forEach(function (eventArray) {
  960. var methodName = eventArray[0];
  961. if (methodName) {
  962. var handlerCtx = _this.$vm;
  963. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  964. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  965. }
  966. if (methodName === '$emit') {
  967. handlerCtx.$emit.apply(handlerCtx,
  968. processEventArgs(
  969. _this.$vm,
  970. event,
  971. eventArray[1],
  972. eventArray[2],
  973. isCustom,
  974. methodName));
  975. return;
  976. }
  977. var handler = handlerCtx[methodName];
  978. if (!isFn(handler)) {
  979. throw new Error(" _vm.".concat(methodName, " is not a function"));
  980. }
  981. if (isOnce) {
  982. if (handler.once) {
  983. return;
  984. }
  985. handler.once = true;
  986. }
  987. var params = processEventArgs(
  988. _this.$vm,
  989. event,
  990. eventArray[1],
  991. eventArray[2],
  992. isCustom,
  993. methodName);
  994. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  995. // eslint-disable-next-line no-sparse-arrays
  996. ret.push(handler.apply(handlerCtx, (Array.isArray(params) ? params : []).concat([,,,,,,,,,, event])));
  997. }
  998. });
  999. }
  1000. });
  1001. if (
  1002. eventType === 'input' &&
  1003. ret.length === 1 &&
  1004. typeof ret[0] !== 'undefined')
  1005. {
  1006. return ret[0];
  1007. }
  1008. }
  1009. var hooks = [
  1010. 'onShow',
  1011. 'onHide',
  1012. 'onError',
  1013. 'onPageNotFound',
  1014. 'onThemeChange',
  1015. 'onUnhandledRejection'];
  1016. function parseBaseApp(vm, _ref3)
  1017. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  1018. if (vm.$options.store) {
  1019. _vue.default.prototype.$store = vm.$options.store;
  1020. }
  1021. _vue.default.prototype.mpHost = "mp-weixin";
  1022. _vue.default.mixin({
  1023. beforeCreate: function beforeCreate() {
  1024. if (!this.$options.mpType) {
  1025. return;
  1026. }
  1027. this.mpType = this.$options.mpType;
  1028. this.$mp = _defineProperty({
  1029. data: {} },
  1030. this.mpType, this.$options.mpInstance);
  1031. this.$scope = this.$options.mpInstance;
  1032. delete this.$options.mpType;
  1033. delete this.$options.mpInstance;
  1034. if (this.mpType !== 'app') {
  1035. initRefs(this);
  1036. initMocks(this, mocks);
  1037. }
  1038. } });
  1039. var appOptions = {
  1040. onLaunch: function onLaunch(args) {
  1041. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1042. return;
  1043. }
  1044. {
  1045. if (!wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1046. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1047. }
  1048. }
  1049. this.$vm = vm;
  1050. this.$vm.$mp = {
  1051. app: this };
  1052. this.$vm.$scope = this;
  1053. // vm 上也挂载 globalData
  1054. this.$vm.globalData = this.globalData;
  1055. this.$vm._isMounted = true;
  1056. this.$vm.__call_hook('mounted', args);
  1057. this.$vm.__call_hook('onLaunch', args);
  1058. } };
  1059. // 兼容旧版本 globalData
  1060. appOptions.globalData = vm.$options.globalData || {};
  1061. // 将 methods 中的方法挂在 getApp() 中
  1062. var methods = vm.$options.methods;
  1063. if (methods) {
  1064. Object.keys(methods).forEach(function (name) {
  1065. appOptions[name] = methods[name];
  1066. });
  1067. }
  1068. initHooks(appOptions, hooks);
  1069. return appOptions;
  1070. }
  1071. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1072. function findVmByVueId(vm, vuePid) {
  1073. var $children = vm.$children;
  1074. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1075. for (var i = $children.length - 1; i >= 0; i--) {
  1076. var childVm = $children[i];
  1077. if (childVm.$scope._$vueId === vuePid) {
  1078. return childVm;
  1079. }
  1080. }
  1081. // 反向递归查找
  1082. var parentVm;
  1083. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1084. parentVm = findVmByVueId($children[_i], vuePid);
  1085. if (parentVm) {
  1086. return parentVm;
  1087. }
  1088. }
  1089. }
  1090. function initBehavior(options) {
  1091. return Behavior(options);
  1092. }
  1093. function isPage() {
  1094. return !!this.route;
  1095. }
  1096. function initRelation(detail) {
  1097. this.triggerEvent('__l', detail);
  1098. }
  1099. function initRefs(vm) {
  1100. var mpInstance = vm.$scope;
  1101. Object.defineProperty(vm, '$refs', {
  1102. get: function get() {
  1103. var $refs = {};
  1104. var components = mpInstance.selectAllComponents('.vue-ref');
  1105. components.forEach(function (component) {
  1106. var ref = component.dataset.ref;
  1107. $refs[ref] = component.$vm || component;
  1108. });
  1109. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1110. forComponents.forEach(function (component) {
  1111. var ref = component.dataset.ref;
  1112. if (!$refs[ref]) {
  1113. $refs[ref] = [];
  1114. }
  1115. $refs[ref].push(component.$vm || component);
  1116. });
  1117. return $refs;
  1118. } });
  1119. }
  1120. function handleLink(event) {var _ref4 =
  1121. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1122. var parentVm;
  1123. if (vuePid) {
  1124. parentVm = findVmByVueId(this.$vm, vuePid);
  1125. }
  1126. if (!parentVm) {
  1127. parentVm = this.$vm;
  1128. }
  1129. vueOptions.parent = parentVm;
  1130. }
  1131. function parseApp(vm) {
  1132. return parseBaseApp(vm, {
  1133. mocks: mocks,
  1134. initRefs: initRefs });
  1135. }
  1136. function createApp(vm) {
  1137. App(parseApp(vm));
  1138. return vm;
  1139. }
  1140. function parseBaseComponent(vueComponentOptions)
  1141. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1142. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1143. var options = _objectSpread({
  1144. multipleSlots: true,
  1145. addGlobalClass: true },
  1146. vueOptions.options || {});
  1147. {
  1148. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1149. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1150. Object.assign(options, vueOptions['mp-weixin'].options);
  1151. }
  1152. }
  1153. var componentOptions = {
  1154. options: options,
  1155. data: initData(vueOptions, _vue.default.prototype),
  1156. behaviors: initBehaviors(vueOptions, initBehavior),
  1157. properties: initProperties(vueOptions.props, false, vueOptions.__file),
  1158. lifetimes: {
  1159. attached: function attached() {
  1160. var properties = this.properties;
  1161. var options = {
  1162. mpType: isPage.call(this) ? 'page' : 'component',
  1163. mpInstance: this,
  1164. propsData: properties };
  1165. initVueIds(properties.vueId, this);
  1166. // 处理父子关系
  1167. initRelation.call(this, {
  1168. vuePid: this._$vuePid,
  1169. vueOptions: options });
  1170. // 初始化 vue 实例
  1171. this.$vm = new VueComponent(options);
  1172. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1173. initSlots(this.$vm, properties.vueSlots);
  1174. // 触发首次 setData
  1175. this.$vm.$mount();
  1176. },
  1177. ready: function ready() {
  1178. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1179. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1180. if (this.$vm) {
  1181. this.$vm._isMounted = true;
  1182. this.$vm.__call_hook('mounted');
  1183. this.$vm.__call_hook('onReady');
  1184. }
  1185. },
  1186. detached: function detached() {
  1187. this.$vm && this.$vm.$destroy();
  1188. } },
  1189. pageLifetimes: {
  1190. show: function show(args) {
  1191. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1192. },
  1193. hide: function hide() {
  1194. this.$vm && this.$vm.__call_hook('onPageHide');
  1195. },
  1196. resize: function resize(size) {
  1197. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1198. } },
  1199. methods: {
  1200. __l: handleLink,
  1201. __e: handleEvent } };
  1202. // externalClasses
  1203. if (vueOptions.externalClasses) {
  1204. componentOptions.externalClasses = vueOptions.externalClasses;
  1205. }
  1206. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1207. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1208. componentOptions.methods[callMethod] = function (args) {
  1209. return this.$vm[callMethod](args);
  1210. };
  1211. });
  1212. }
  1213. if (isPage) {
  1214. return componentOptions;
  1215. }
  1216. return [componentOptions, VueComponent];
  1217. }
  1218. function parseComponent(vueComponentOptions) {
  1219. return parseBaseComponent(vueComponentOptions, {
  1220. isPage: isPage,
  1221. initRelation: initRelation });
  1222. }
  1223. var hooks$1 = [
  1224. 'onShow',
  1225. 'onHide',
  1226. 'onUnload'];
  1227. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1228. function parseBasePage(vuePageOptions, _ref6)
  1229. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1230. var pageOptions = parseComponent(vuePageOptions);
  1231. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1232. pageOptions.methods.onLoad = function (args) {
  1233. this.$vm.$mp.query = args; // 兼容 mpvue
  1234. this.$vm.__call_hook('onLoad', args);
  1235. };
  1236. return pageOptions;
  1237. }
  1238. function parsePage(vuePageOptions) {
  1239. return parseBasePage(vuePageOptions, {
  1240. isPage: isPage,
  1241. initRelation: initRelation });
  1242. }
  1243. function createPage(vuePageOptions) {
  1244. {
  1245. return Component(parsePage(vuePageOptions));
  1246. }
  1247. }
  1248. function createComponent(vueOptions) {
  1249. {
  1250. return Component(parseComponent(vueOptions));
  1251. }
  1252. }
  1253. todos.forEach(function (todoApi) {
  1254. protocols[todoApi] = false;
  1255. });
  1256. canIUses.forEach(function (canIUseApi) {
  1257. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  1258. canIUseApi;
  1259. if (!wx.canIUse(apiName)) {
  1260. protocols[canIUseApi] = false;
  1261. }
  1262. });
  1263. var uni = {};
  1264. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  1265. uni = new Proxy({}, {
  1266. get: function get(target, name) {
  1267. if (hasOwn(target, name)) {
  1268. return target[name];
  1269. }
  1270. if (baseApi[name]) {
  1271. return baseApi[name];
  1272. }
  1273. if (api[name]) {
  1274. return promisify(name, api[name]);
  1275. }
  1276. {
  1277. if (extraApi[name]) {
  1278. return promisify(name, extraApi[name]);
  1279. }
  1280. if (todoApis[name]) {
  1281. return promisify(name, todoApis[name]);
  1282. }
  1283. }
  1284. if (eventApi[name]) {
  1285. return eventApi[name];
  1286. }
  1287. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  1288. return;
  1289. }
  1290. return promisify(name, wrapper(name, wx[name]));
  1291. },
  1292. set: function set(target, name, value) {
  1293. target[name] = value;
  1294. return true;
  1295. } });
  1296. } else {
  1297. Object.keys(baseApi).forEach(function (name) {
  1298. uni[name] = baseApi[name];
  1299. });
  1300. {
  1301. Object.keys(todoApis).forEach(function (name) {
  1302. uni[name] = promisify(name, todoApis[name]);
  1303. });
  1304. Object.keys(extraApi).forEach(function (name) {
  1305. uni[name] = promisify(name, todoApis[name]);
  1306. });
  1307. }
  1308. Object.keys(eventApi).forEach(function (name) {
  1309. uni[name] = eventApi[name];
  1310. });
  1311. Object.keys(api).forEach(function (name) {
  1312. uni[name] = promisify(name, api[name]);
  1313. });
  1314. Object.keys(wx).forEach(function (name) {
  1315. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  1316. uni[name] = promisify(name, wrapper(name, wx[name]));
  1317. }
  1318. });
  1319. }
  1320. wx.createApp = createApp;
  1321. wx.createPage = createPage;
  1322. wx.createComponent = createComponent;
  1323. var uni$1 = uni;var _default =
  1324. uni$1;exports.default = _default;
  1325. /***/ }),
  1326. /***/ 11:
  1327. /*!**********************************************************************************************************!*\
  1328. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  1329. \**********************************************************************************************************/
  1330. /*! exports provided: default */
  1331. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1332. "use strict";
  1333. __webpack_require__.r(__webpack_exports__);
  1334. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  1335. /* globals __VUE_SSR_CONTEXT__ */
  1336. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  1337. // This module is a runtime utility for cleaner component module output and will
  1338. // be included in the final webpack user bundle.
  1339. function normalizeComponent (
  1340. scriptExports,
  1341. render,
  1342. staticRenderFns,
  1343. functionalTemplate,
  1344. injectStyles,
  1345. scopeId,
  1346. moduleIdentifier, /* server only */
  1347. shadowMode, /* vue-cli only */
  1348. components, // fixed by xxxxxx auto components
  1349. renderjs // fixed by xxxxxx renderjs
  1350. ) {
  1351. // Vue.extend constructor export interop
  1352. var options = typeof scriptExports === 'function'
  1353. ? scriptExports.options
  1354. : scriptExports
  1355. // fixed by xxxxxx auto components
  1356. if (components) {
  1357. if (!options.components) {
  1358. options.components = {}
  1359. }
  1360. var hasOwn = Object.prototype.hasOwnProperty
  1361. for (var name in components) {
  1362. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  1363. options.components[name] = components[name]
  1364. }
  1365. }
  1366. }
  1367. // fixed by xxxxxx renderjs
  1368. if (renderjs) {
  1369. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  1370. this[renderjs.__module] = this
  1371. });
  1372. (options.mixins || (options.mixins = [])).push(renderjs)
  1373. }
  1374. // render functions
  1375. if (render) {
  1376. options.render = render
  1377. options.staticRenderFns = staticRenderFns
  1378. options._compiled = true
  1379. }
  1380. // functional template
  1381. if (functionalTemplate) {
  1382. options.functional = true
  1383. }
  1384. // scopedId
  1385. if (scopeId) {
  1386. options._scopeId = 'data-v-' + scopeId
  1387. }
  1388. var hook
  1389. if (moduleIdentifier) { // server build
  1390. hook = function (context) {
  1391. // 2.3 injection
  1392. context =
  1393. context || // cached call
  1394. (this.$vnode && this.$vnode.ssrContext) || // stateful
  1395. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  1396. // 2.2 with runInNewContext: true
  1397. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  1398. context = __VUE_SSR_CONTEXT__
  1399. }
  1400. // inject component styles
  1401. if (injectStyles) {
  1402. injectStyles.call(this, context)
  1403. }
  1404. // register component module identifier for async chunk inferrence
  1405. if (context && context._registeredComponents) {
  1406. context._registeredComponents.add(moduleIdentifier)
  1407. }
  1408. }
  1409. // used by ssr in case component is cached and beforeCreate
  1410. // never gets called
  1411. options._ssrRegister = hook
  1412. } else if (injectStyles) {
  1413. hook = shadowMode
  1414. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  1415. : injectStyles
  1416. }
  1417. if (hook) {
  1418. if (options.functional) {
  1419. // for template-only hot-reload because in that case the render fn doesn't
  1420. // go through the normalizer
  1421. options._injectStyles = hook
  1422. // register for functioal component in vue file
  1423. var originalRender = options.render
  1424. options.render = function renderWithStyleInjection (h, context) {
  1425. hook.call(context)
  1426. return originalRender(h, context)
  1427. }
  1428. } else {
  1429. // inject component registration as beforeCreate hook
  1430. var existing = options.beforeCreate
  1431. options.beforeCreate = existing
  1432. ? [].concat(existing, hook)
  1433. : [hook]
  1434. }
  1435. }
  1436. return {
  1437. exports: scriptExports,
  1438. options: options
  1439. }
  1440. }
  1441. /***/ }),
  1442. /***/ 12:
  1443. /*!******************************************!*\
  1444. !*** D:/wwwroot/forest/config/config.js ***!
  1445. \******************************************/
  1446. /*! no static exports found */
  1447. /***/ (function(module, exports, __webpack_require__) {
  1448. "use strict";
  1449. Object.defineProperty(exports, "__esModule", { value: true });exports.config = void 0;var config = {
  1450. //dev
  1451. apiBaseurl: 'http://im.t.phpim.cn/', //测试
  1452. //本地图片
  1453. imgUrl: 'http://' + window.location.host,
  1454. // 图片占位
  1455. placeImg: 'http://placekitten.com'
  1456. // loginUrl:'http://ht.t.phpim.cn?backpage=http://tanhuiapp.hongweisoft.com/#/pages/index/index',//登录后跳转到测试链接
  1457. // 密码授权令牌
  1458. // client_id:4,
  1459. // client_secret:'jO1XHQu0GytEdxJzNRFwcIeWmS57yCMBuA5P9yDo',
  1460. //online 线上地址
  1461. // apiBaseurl:'http://hd.phpim.cn/',//线上
  1462. //gloab 全局
  1463. // imgUrl:"http://qny.gzsdtfp.com/",
  1464. };exports.config = config;
  1465. /***/ }),
  1466. /***/ 13:
  1467. /*!****************************************!*\
  1468. !*** D:/wwwroot/forest/store/index.js ***!
  1469. \****************************************/
  1470. /*! no static exports found */
  1471. /***/ (function(module, exports, __webpack_require__) {
  1472. "use strict";
  1473. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  1474. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 14));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  1475. _vue.default.use(_vuex.default);
  1476. var store = new _vuex.default.Store({
  1477. state: {
  1478. hasLogin: false,
  1479. token: '',
  1480. userInfo: {},
  1481. cartListTmp: [],
  1482. maxIncomeVal: 55000 },
  1483. mutations: {
  1484. addCart: function addCart(state, data) {
  1485. if (data) {
  1486. state.cartListTmp = data;
  1487. console.log("vuex add:", state.cartListTmp);
  1488. }
  1489. },
  1490. clearCart: function clearCart(state) {
  1491. state.cartListTmp = [];
  1492. console.log(state.cartListTmp);
  1493. },
  1494. setLogin: function setLogin(state, userInfo) {
  1495. state.userInfo = userInfo.wechatUserInfo || {};
  1496. state.token = userInfo.accessToken;
  1497. state.hasLogin = Boolean(state.token);
  1498. console.log(state);
  1499. uni.setStorage({
  1500. key: "userInfo",
  1501. data: userInfo.wechatUserInfo });
  1502. uni.setStorage({
  1503. key: "hasLogin",
  1504. data: true });
  1505. uni.setStorage({
  1506. key: "token",
  1507. data: userInfo.accessToken });
  1508. },
  1509. logout: function logout(state) {
  1510. userInfo = {};
  1511. hasLogin: false,
  1512. uni.removeStorage({
  1513. key: "userInfo" });
  1514. } },
  1515. actions: {} });var _default =
  1516. store;exports.default = _default;
  1517. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  1518. /***/ }),
  1519. /***/ 130:
  1520. /*!*****************************************************************!*\
  1521. !*** D:/wwwroot/forest/components/mescroll-uni/mescroll-uni.js ***!
  1522. \*****************************************************************/
  1523. /*! no static exports found */
  1524. /***/ (function(module, exports, __webpack_require__) {
  1525. "use strict";
  1526. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = MeScroll; /* mescroll
  1527. * version 1.3.2
  1528. * 2020-08-05 wenju
  1529. * http://www.mescroll.com
  1530. */
  1531. function MeScroll(options, isScrollBody) {
  1532. var me = this;
  1533. me.version = '1.3.2'; // mescroll版本号
  1534. me.options = options || {}; // 配置
  1535. me.isScrollBody = isScrollBody || false; // 滚动区域是否为原生页面滚动; 默认为scroll-view
  1536. me.isDownScrolling = false; // 是否在执行下拉刷新的回调
  1537. me.isUpScrolling = false; // 是否在执行上拉加载的回调
  1538. var hasDownCallback = me.options.down && me.options.down.callback; // 是否配置了down的callback
  1539. // 初始化下拉刷新
  1540. me.initDownScroll();
  1541. // 初始化上拉加载,则初始化
  1542. me.initUpScroll();
  1543. // 自动加载
  1544. setTimeout(function () {// 待主线程执行完毕再执行,避免new MeScroll未初始化,在回调获取不到mescroll的实例
  1545. // 自动触发下拉刷新 (只有配置了down的callback才自动触发下拉刷新)
  1546. if ((me.optDown.use || me.optDown.native) && me.optDown.auto && hasDownCallback) {
  1547. if (me.optDown.autoShowLoading) {
  1548. me.triggerDownScroll(); // 显示下拉进度,执行下拉回调
  1549. } else {
  1550. me.optDown.callback && me.optDown.callback(me); // 不显示下拉进度,直接执行下拉回调
  1551. }
  1552. }
  1553. // 自动触发上拉加载
  1554. if (!me.isUpAutoLoad) {// 部分小程序(头条小程序)emit是异步, 会导致isUpAutoLoad判断有误, 先延时确保先执行down的callback,再执行up的callback
  1555. setTimeout(function () {
  1556. me.optUp.use && me.optUp.auto && !me.isUpAutoLoad && me.triggerUpScroll();
  1557. }, 100);
  1558. }
  1559. }, 30); // 需让me.optDown.inited和me.optUp.inited先执行
  1560. }
  1561. /* 配置参数:下拉刷新 */
  1562. MeScroll.prototype.extendDownScroll = function (optDown) {
  1563. // 下拉刷新的配置
  1564. MeScroll.extend(optDown, {
  1565. use: true, // 是否启用下拉刷新; 默认true
  1566. auto: true, // 是否在初始化完毕之后自动执行下拉刷新的回调; 默认true
  1567. native: false, // 是否使用系统自带的下拉刷新; 默认false; 仅mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  1568. autoShowLoading: false, // 如果设置auto=true(在初始化完毕之后自动执行下拉刷新的回调),那么是否显示下拉刷新的进度; 默认false
  1569. isLock: false, // 是否锁定下拉刷新,默认false;
  1570. offset: 80, // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  1571. startTop: 100, // scroll-view快速滚动到顶部时,此时的scroll-top可能大于0, 此值用于控制最大的误差
  1572. inOffsetRate: 1, // 在列表顶部,下拉的距离小于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  1573. outOffsetRate: 0.2, // 在列表顶部,下拉的距离大于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  1574. bottomOffset: 20, // 当手指touchmove位置在距离body底部20px范围内的时候结束上拉刷新,避免Webview嵌套导致touchend事件不执行
  1575. minAngle: 45, // 向下滑动最少偏移的角度,取值区间 [0,90];默认45度,即向下滑动的角度大于45度则触发下拉;而小于45度,将不触发下拉,避免与左右滑动的轮播等组件冲突;
  1576. textInOffset: '下拉刷新', // 下拉的距离在offset范围内的提示文本
  1577. textOutOffset: '释放更新', // 下拉的距离大于offset范围的提示文本
  1578. textLoading: '加载中 ...', // 加载中的提示文本
  1579. bgColor: "transparent", // 背景颜色 (建议在pages.json中再设置一下backgroundColorTop)
  1580. textColor: "gray", // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  1581. inited: null, // 下拉刷新初始化完毕的回调
  1582. inOffset: null, // 下拉的距离进入offset范围内那一刻的回调
  1583. outOffset: null, // 下拉的距离大于offset那一刻的回调
  1584. onMoving: null, // 下拉过程中的回调,滑动过程一直在执行; rate下拉区域当前高度与指定距离的比值(inOffset: rate<1; outOffset: rate>=1); downHight当前下拉区域的高度
  1585. beforeLoading: null, // 准备触发下拉刷新的回调: 如果return true,将不触发showLoading和callback回调; 常用来完全自定义下拉刷新, 参考案例【淘宝 v6.8.0】
  1586. showLoading: null, // 显示下拉刷新进度的回调
  1587. afterLoading: null, // 显示下拉刷新进度的回调之后,马上要执行的代码 (如: 在wxs中使用)
  1588. beforeEndDownScroll: null, // 准备结束下拉的回调. 返回结束下拉的延时执行时间,默认0ms; 常用于结束下拉之前再显示另外一小段动画,才去隐藏下拉刷新的场景, 参考案例【dotJump】
  1589. endDownScroll: null, // 结束下拉刷新的回调
  1590. afterEndDownScroll: null, // 结束下拉刷新的回调,马上要执行的代码 (如: 在wxs中使用)
  1591. callback: function callback(mescroll) {
  1592. // 下拉刷新的回调;默认重置上拉加载列表为第一页
  1593. mescroll.resetUpScroll();
  1594. } });
  1595. };
  1596. /* 配置参数:上拉加载 */
  1597. MeScroll.prototype.extendUpScroll = function (optUp) {
  1598. // 上拉加载的配置
  1599. MeScroll.extend(optUp, {
  1600. use: true, // 是否启用上拉加载; 默认true
  1601. auto: true, // 是否在初始化完毕之后自动执行上拉加载的回调; 默认true
  1602. isLock: false, // 是否锁定上拉加载,默认false;
  1603. isBoth: true, // 上拉加载时,如果滑动到列表顶部是否可以同时触发下拉刷新;默认true,两者可同时触发;
  1604. callback: null, // 上拉加载的回调;function(page,mescroll){ }
  1605. page: {
  1606. num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  1607. size: 10, // 每页数据的数量
  1608. time: null // 加载第一页数据服务器返回的时间; 防止用户翻页时,后台新增了数据从而导致下一页数据重复;
  1609. },
  1610. noMoreSize: 5, // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
  1611. offset: 80, // 距底部多远时,触发upCallback
  1612. textLoading: '加载中 ...', // 加载中的提示文本
  1613. textNoMore: '-- END --', // 没有更多数据的提示文本
  1614. bgColor: "transparent", // 背景颜色 (建议在pages.json中再设置一下backgroundColorBottom)
  1615. textColor: "gray", // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  1616. inited: null, // 初始化完毕的回调
  1617. showLoading: null, // 显示加载中的回调
  1618. showNoMore: null, // 显示无更多数据的回调
  1619. hideUpScroll: null, // 隐藏上拉加载的回调
  1620. errDistance: 60, // endErr的时候需往上滑动一段距离,使其往下滑动时再次触发onReachBottom,仅mescroll-body生效
  1621. toTop: {
  1622. // 回到顶部按钮,需配置src才显示
  1623. src: null, // 图片路径,默认null (绝对路径或网络图)
  1624. offset: 1000, // 列表滚动多少距离才显示回到顶部按钮,默认1000
  1625. duration: 300, // 回到顶部的动画时长,默认300ms (当值为0或300则使用系统自带回到顶部,更流畅; 其他值则通过step模拟,部分机型可能不够流畅,所以非特殊情况不建议修改此项)
  1626. btnClick: null, // 点击按钮的回调
  1627. onShow: null, // 是否显示的回调
  1628. zIndex: 9990, // fixed定位z-index值
  1629. left: null, // 到左边的距离, 默认null. 此项有值时,right不生效. (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  1630. right: 20, // 到右边的距离, 默认20 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  1631. bottom: 120, // 到底部的距离, 默认120 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  1632. safearea: false, // bottom的偏移量是否加上底部安全区的距离, 默认false, 需要适配iPhoneX时使用 (具体的界面如果不配置此项,则取本vue的safearea值)
  1633. width: 72, // 回到顶部图标的宽度, 默认72 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  1634. radius: "50%" // 圆角, 默认"50%" (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  1635. },
  1636. empty: {
  1637. use: true, // 是否显示空布局
  1638. icon: null, // 图标路径
  1639. tip: '~ 暂无相关数据 ~', // 提示
  1640. btnText: '', // 按钮
  1641. btnClick: null, // 点击按钮的回调
  1642. onShow: null, // 是否显示的回调
  1643. fixed: false, // 是否使用fixed定位,默认false; 配置fixed为true,以下的top和zIndex才生效 (transform会使fixed失效,最终会降级为absolute)
  1644. top: "100rpx", // fixed定位的top值 (完整的单位值,如 "10%"; "100rpx")
  1645. zIndex: 99 // fixed定位z-index值
  1646. },
  1647. onScroll: false // 是否监听滚动事件
  1648. });
  1649. };
  1650. /* 配置参数 */
  1651. MeScroll.extend = function (userOption, defaultOption) {
  1652. if (!userOption) return defaultOption;
  1653. for (var key in defaultOption) {
  1654. if (userOption[key] == null) {
  1655. var def = defaultOption[key];
  1656. if (def != null && typeof def === 'object') {
  1657. userOption[key] = MeScroll.extend({}, def); // 深度匹配
  1658. } else {
  1659. userOption[key] = def;
  1660. }
  1661. } else if (typeof userOption[key] === 'object') {
  1662. MeScroll.extend(userOption[key], defaultOption[key]); // 深度匹配
  1663. }
  1664. }
  1665. return userOption;
  1666. };
  1667. /* 简单判断是否配置了颜色 (非透明,非白色) */
  1668. MeScroll.prototype.hasColor = function (color) {
  1669. if (!color) return false;
  1670. var c = color.toLowerCase();
  1671. return c != "#fff" && c != "#ffffff" && c != "transparent" && c != "white";
  1672. };
  1673. /* -------初始化下拉刷新------- */
  1674. MeScroll.prototype.initDownScroll = function () {
  1675. var me = this;
  1676. // 配置参数
  1677. me.optDown = me.options.down || {};
  1678. if (!me.optDown.textColor && me.hasColor(me.optDown.bgColor)) me.optDown.textColor = "#fff"; // 当bgColor有值且textColor未设置,则textColor默认白色
  1679. me.extendDownScroll(me.optDown);
  1680. // 如果是mescroll-body且配置了native,则禁止自定义的下拉刷新
  1681. if (me.isScrollBody && me.optDown.native) {
  1682. me.optDown.use = false;
  1683. } else {
  1684. me.optDown.native = false; // 仅mescroll-body支持,mescroll-uni不支持
  1685. }
  1686. me.downHight = 0; // 下拉区域的高度
  1687. // 在页面中加入下拉布局
  1688. if (me.optDown.use && me.optDown.inited) {
  1689. // 初始化完毕的回调
  1690. setTimeout(function () {// 待主线程执行完毕再执行,避免new MeScroll未初始化,在回调获取不到mescroll的实例
  1691. me.optDown.inited(me);
  1692. }, 0);
  1693. }
  1694. };
  1695. /* 列表touchstart事件 */
  1696. MeScroll.prototype.touchstartEvent = function (e) {
  1697. if (!this.optDown.use) return;
  1698. this.startPoint = this.getPoint(e); // 记录起点
  1699. this.startTop = this.getScrollTop(); // 记录此时的滚动条位置
  1700. this.startAngle = 0; // 初始角度
  1701. this.lastPoint = this.startPoint; // 重置上次move的点
  1702. this.maxTouchmoveY = this.getBodyHeight() - this.optDown.bottomOffset; // 手指触摸的最大范围(写在touchstart避免body获取高度为0的情况)
  1703. this.inTouchend = false; // 标记不是touchend
  1704. };
  1705. /* 列表touchmove事件 */
  1706. MeScroll.prototype.touchmoveEvent = function (e) {
  1707. if (!this.optDown.use) return;
  1708. var me = this;
  1709. var scrollTop = me.getScrollTop(); // 当前滚动条的距离
  1710. var curPoint = me.getPoint(e); // 当前点
  1711. var moveY = curPoint.y - me.startPoint.y; // 和起点比,移动的距离,大于0向下拉,小于0向上拉
  1712. // 向下拉 && 在顶部
  1713. // mescroll-body,直接判定在顶部即可
  1714. // scroll-view在滚动时不会触发touchmove,当触顶/底/左/右时,才会触发touchmove
  1715. // scroll-view滚动到顶部时,scrollTop不一定为0,也有可能大于0; 在iOS的APP中scrollTop可能为负数,不一定和startTop相等
  1716. if (moveY > 0 && (
  1717. me.isScrollBody && scrollTop <= 0 ||
  1718. !me.isScrollBody && (scrollTop <= 0 || scrollTop <= me.optDown.startTop && scrollTop === me.startTop)))
  1719. {
  1720. // 可下拉的条件
  1721. if (!me.inTouchend && !me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || me.isUpScrolling &&
  1722. me.optUp.isBoth)) {
  1723. // 下拉的初始角度是否在配置的范围内
  1724. if (!me.startAngle) me.startAngle = me.getAngle(me.lastPoint, curPoint); // 两点之间的角度,区间 [0,90]
  1725. if (me.startAngle < me.optDown.minAngle) return; // 如果小于配置的角度,则不往下执行下拉刷新
  1726. // 如果手指的位置超过配置的距离,则提前结束下拉,避免Webview嵌套导致touchend无法触发
  1727. if (me.maxTouchmoveY > 0 && curPoint.y >= me.maxTouchmoveY) {
  1728. me.inTouchend = true; // 标记执行touchend
  1729. me.touchendEvent(); // 提前触发touchend
  1730. return;
  1731. }
  1732. me.preventDefault(e); // 阻止默认事件
  1733. var diff = curPoint.y - me.lastPoint.y; // 和上次比,移动的距离 (大于0向下,小于0向上)
  1734. // 下拉距离 < 指定距离
  1735. if (me.downHight < me.optDown.offset) {
  1736. if (me.movetype !== 1) {
  1737. me.movetype = 1; // 加入标记,保证只执行一次
  1738. me.optDown.inOffset && me.optDown.inOffset(me); // 进入指定距离范围内那一刻的回调,只执行一次
  1739. me.isMoveDown = true; // 标记下拉区域高度改变,在touchend重置回来
  1740. }
  1741. me.downHight += diff * me.optDown.inOffsetRate; // 越往下,高度变化越小
  1742. // 指定距离 <= 下拉距离
  1743. } else {
  1744. if (me.movetype !== 2) {
  1745. me.movetype = 2; // 加入标记,保证只执行一次
  1746. me.optDown.outOffset && me.optDown.outOffset(me); // 下拉超过指定距离那一刻的回调,只执行一次
  1747. me.isMoveDown = true; // 标记下拉区域高度改变,在touchend重置回来
  1748. }
  1749. if (diff > 0) {// 向下拉
  1750. me.downHight += diff * me.optDown.outOffsetRate; // 越往下,高度变化越小
  1751. } else {// 向上收
  1752. me.downHight += diff; // 向上收回高度,则向上滑多少收多少高度
  1753. }
  1754. }
  1755. me.downHight = Math.round(me.downHight); // 取整
  1756. var rate = me.downHight / me.optDown.offset; // 下拉区域当前高度与指定距离的比值
  1757. me.optDown.onMoving && me.optDown.onMoving(me, rate, me.downHight); // 下拉过程中的回调,一直在执行
  1758. }
  1759. }
  1760. me.lastPoint = curPoint; // 记录本次移动的点
  1761. };
  1762. /* 列表touchend事件 */
  1763. MeScroll.prototype.touchendEvent = function (e) {
  1764. if (!this.optDown.use) return;
  1765. // 如果下拉区域高度已改变,则需重置回来
  1766. if (this.isMoveDown) {
  1767. if (this.downHight >= this.optDown.offset) {
  1768. // 符合触发刷新的条件
  1769. this.triggerDownScroll();
  1770. } else {
  1771. // 不符合的话 则重置
  1772. this.downHight = 0;
  1773. this.endDownScrollCall(this);
  1774. }
  1775. this.movetype = 0;
  1776. this.isMoveDown = false;
  1777. } else if (!this.isScrollBody && this.getScrollTop() === this.startTop) {// scroll-view到顶/左/右/底的滑动事件
  1778. var isScrollUp = this.getPoint(e).y - this.startPoint.y < 0; // 和起点比,移动的距离,大于0向下拉,小于0向上拉
  1779. // 上滑
  1780. if (isScrollUp) {
  1781. // 需检查滑动的角度
  1782. var angle = this.getAngle(this.getPoint(e), this.startPoint); // 两点之间的角度,区间 [0,90]
  1783. if (angle > 80) {
  1784. // 检查并触发上拉
  1785. this.triggerUpScroll(true);
  1786. }
  1787. }
  1788. }
  1789. };
  1790. /* 根据点击滑动事件获取第一个手指的坐标 */
  1791. MeScroll.prototype.getPoint = function (e) {
  1792. if (!e) {
  1793. return {
  1794. x: 0,
  1795. y: 0 };
  1796. }
  1797. if (e.touches && e.touches[0]) {
  1798. return {
  1799. x: e.touches[0].pageX,
  1800. y: e.touches[0].pageY };
  1801. } else if (e.changedTouches && e.changedTouches[0]) {
  1802. return {
  1803. x: e.changedTouches[0].pageX,
  1804. y: e.changedTouches[0].pageY };
  1805. } else {
  1806. return {
  1807. x: e.clientX,
  1808. y: e.clientY };
  1809. }
  1810. };
  1811. /* 计算两点之间的角度: 区间 [0,90]*/
  1812. MeScroll.prototype.getAngle = function (p1, p2) {
  1813. var x = Math.abs(p1.x - p2.x);
  1814. var y = Math.abs(p1.y - p2.y);
  1815. var z = Math.sqrt(x * x + y * y);
  1816. var angle = 0;
  1817. if (z !== 0) {
  1818. angle = Math.asin(y / z) / Math.PI * 180;
  1819. }
  1820. return angle;
  1821. };
  1822. /* 触发下拉刷新 */
  1823. MeScroll.prototype.triggerDownScroll = function () {
  1824. if (this.optDown.beforeLoading && this.optDown.beforeLoading(this)) {
  1825. //return true则处于完全自定义状态
  1826. } else {
  1827. this.showDownScroll(); // 下拉刷新中...
  1828. !this.optDown.native && this.optDown.callback && this.optDown.callback(this); // 执行回调,联网加载数据
  1829. }
  1830. };
  1831. /* 显示下拉进度布局 */
  1832. MeScroll.prototype.showDownScroll = function () {
  1833. this.isDownScrolling = true; // 标记下拉中
  1834. if (this.optDown.native) {
  1835. uni.startPullDownRefresh(); // 系统自带的下拉刷新
  1836. this.showDownLoadingCall(0); // 仍触发showLoading,因为上拉加载用到
  1837. } else {
  1838. this.downHight = this.optDown.offset; // 更新下拉区域高度
  1839. this.showDownLoadingCall(this.downHight); // 下拉刷新中...
  1840. }
  1841. };
  1842. MeScroll.prototype.showDownLoadingCall = function (downHight) {
  1843. this.optDown.showLoading && this.optDown.showLoading(this, downHight); // 下拉刷新中...
  1844. this.optDown.afterLoading && this.optDown.afterLoading(this, downHight); // 下拉刷新中...触发之后马上要执行的代码
  1845. };
  1846. /* 显示系统自带的下拉刷新时需要处理的业务 */
  1847. MeScroll.prototype.onPullDownRefresh = function () {
  1848. this.isDownScrolling = true; // 标记下拉中
  1849. this.showDownLoadingCall(0); // 仍触发showLoading,因为上拉加载用到
  1850. this.optDown.callback && this.optDown.callback(this); // 执行回调,联网加载数据
  1851. };
  1852. /* 结束下拉刷新 */
  1853. MeScroll.prototype.endDownScroll = function () {
  1854. if (this.optDown.native) {// 结束原生下拉刷新
  1855. this.isDownScrolling = false;
  1856. this.endDownScrollCall(this);
  1857. uni.stopPullDownRefresh();
  1858. return;
  1859. }
  1860. var me = this;
  1861. // 结束下拉刷新的方法
  1862. var endScroll = function endScroll() {
  1863. me.downHight = 0;
  1864. me.isDownScrolling = false;
  1865. me.endDownScrollCall(me);
  1866. if (!me.isScrollBody) {
  1867. me.setScrollHeight(0); // scroll-view重置滚动区域,使数据不满屏时仍可检查触发翻页
  1868. me.scrollTo(0, 0); // scroll-view需重置滚动条到顶部,避免startTop大于0时,对下拉刷新的影响
  1869. }
  1870. };
  1871. // 结束下拉刷新时的回调
  1872. var delay = 0;
  1873. if (me.optDown.beforeEndDownScroll) delay = me.optDown.beforeEndDownScroll(me); // 结束下拉刷新的延时,单位ms
  1874. if (typeof delay === 'number' && delay > 0) {
  1875. setTimeout(endScroll, delay);
  1876. } else {
  1877. endScroll();
  1878. }
  1879. };
  1880. MeScroll.prototype.endDownScrollCall = function () {
  1881. this.optDown.endDownScroll && this.optDown.endDownScroll(this);
  1882. this.optDown.afterEndDownScroll && this.optDown.afterEndDownScroll(this);
  1883. };
  1884. /* 锁定下拉刷新:isLock=ture,null锁定;isLock=false解锁 */
  1885. MeScroll.prototype.lockDownScroll = function (isLock) {
  1886. if (isLock == null) isLock = true;
  1887. this.optDown.isLock = isLock;
  1888. };
  1889. /* 锁定上拉加载:isLock=ture,null锁定;isLock=false解锁 */
  1890. MeScroll.prototype.lockUpScroll = function (isLock) {
  1891. if (isLock == null) isLock = true;
  1892. this.optUp.isLock = isLock;
  1893. };
  1894. /* -------初始化上拉加载------- */
  1895. MeScroll.prototype.initUpScroll = function () {
  1896. var me = this;
  1897. // 配置参数
  1898. me.optUp = me.options.up || { use: false };
  1899. if (!me.optUp.textColor && me.hasColor(me.optUp.bgColor)) me.optUp.textColor = "#fff"; // 当bgColor有值且textColor未设置,则textColor默认白色
  1900. me.extendUpScroll(me.optUp);
  1901. if (me.optUp.use === false) return; // 配置不使用上拉加载时,则不初始化上拉布局
  1902. me.optUp.hasNext = true; // 如果使用上拉,则默认有下一页
  1903. me.startNum = me.optUp.page.num + 1; // 记录page开始的页码
  1904. // 初始化完毕的回调
  1905. if (me.optUp.inited) {
  1906. setTimeout(function () {// 待主线程执行完毕再执行,避免new MeScroll未初始化,在回调获取不到mescroll的实例
  1907. me.optUp.inited(me);
  1908. }, 0);
  1909. }
  1910. };
  1911. /*滚动到底部的事件 (仅mescroll-body生效)*/
  1912. MeScroll.prototype.onReachBottom = function () {
  1913. if (this.isScrollBody && !this.isUpScrolling) {// 只能支持下拉刷新的时候同时可以触发上拉加载,否则滚动到底部就需要上滑一点才能触发onReachBottom
  1914. if (!this.optUp.isLock && this.optUp.hasNext) {
  1915. this.triggerUpScroll();
  1916. }
  1917. }
  1918. };
  1919. /*列表滚动事件 (仅mescroll-body生效)*/
  1920. MeScroll.prototype.onPageScroll = function (e) {
  1921. if (!this.isScrollBody) return;
  1922. // 更新滚动条的位置 (主要用于判断下拉刷新时,滚动条是否在顶部)
  1923. this.setScrollTop(e.scrollTop);
  1924. // 顶部按钮的显示隐藏
  1925. if (e.scrollTop >= this.optUp.toTop.offset) {
  1926. this.showTopBtn();
  1927. } else {
  1928. this.hideTopBtn();
  1929. }
  1930. };
  1931. /*列表滚动事件*/
  1932. MeScroll.prototype.scroll = function (e, onScroll) {
  1933. // 更新滚动条的位置
  1934. this.setScrollTop(e.scrollTop);
  1935. // 更新滚动内容高度
  1936. this.setScrollHeight(e.scrollHeight);
  1937. // 向上滑还是向下滑动
  1938. if (this.preScrollY == null) this.preScrollY = 0;
  1939. this.isScrollUp = e.scrollTop - this.preScrollY > 0;
  1940. this.preScrollY = e.scrollTop;
  1941. // 上滑 && 检查并触发上拉
  1942. this.isScrollUp && this.triggerUpScroll(true);
  1943. // 顶部按钮的显示隐藏
  1944. if (e.scrollTop >= this.optUp.toTop.offset) {
  1945. this.showTopBtn();
  1946. } else {
  1947. this.hideTopBtn();
  1948. }
  1949. // 滑动监听
  1950. this.optUp.onScroll && onScroll && onScroll();
  1951. };
  1952. /* 触发上拉加载 */
  1953. MeScroll.prototype.triggerUpScroll = function (isCheck) {
  1954. if (!this.isUpScrolling && this.optUp.use && this.optUp.callback) {
  1955. // 是否校验在底部; 默认不校验
  1956. if (isCheck === true) {
  1957. var canUp = false;
  1958. // 还有下一页 && 没有锁定 && 不在下拉中
  1959. if (this.optUp.hasNext && !this.optUp.isLock && !this.isDownScrolling) {
  1960. if (this.getScrollBottom() <= this.optUp.offset) {// 到底部
  1961. canUp = true; // 标记可上拉
  1962. }
  1963. }
  1964. if (canUp === false) return;
  1965. }
  1966. this.showUpScroll(); // 上拉加载中...
  1967. this.optUp.page.num++; // 预先加一页,如果失败则减回
  1968. this.isUpAutoLoad = true; // 标记上拉已经自动执行过,避免初始化时多次触发上拉回调
  1969. this.num = this.optUp.page.num; // 把最新的页数赋值在mescroll上,避免对page的影响
  1970. this.size = this.optUp.page.size; // 把最新的页码赋值在mescroll上,避免对page的影响
  1971. this.time = this.optUp.page.time; // 把最新的页码赋值在mescroll上,避免对page的影响
  1972. this.optUp.callback(this); // 执行回调,联网加载数据
  1973. }
  1974. };
  1975. /* 显示上拉加载中 */
  1976. MeScroll.prototype.showUpScroll = function () {
  1977. this.isUpScrolling = true; // 标记上拉加载中
  1978. this.optUp.showLoading && this.optUp.showLoading(this); // 回调
  1979. };
  1980. /* 显示上拉无更多数据 */
  1981. MeScroll.prototype.showNoMore = function () {
  1982. this.optUp.hasNext = false; // 标记无更多数据
  1983. this.optUp.showNoMore && this.optUp.showNoMore(this); // 回调
  1984. };
  1985. /* 隐藏上拉区域**/
  1986. MeScroll.prototype.hideUpScroll = function () {
  1987. this.optUp.hideUpScroll && this.optUp.hideUpScroll(this); // 回调
  1988. };
  1989. /* 结束上拉加载 */
  1990. MeScroll.prototype.endUpScroll = function (isShowNoMore) {
  1991. if (isShowNoMore != null) {// isShowNoMore=null,不处理下拉状态,下拉刷新的时候调用
  1992. if (isShowNoMore) {
  1993. this.showNoMore(); // isShowNoMore=true,显示无更多数据
  1994. } else {
  1995. this.hideUpScroll(); // isShowNoMore=false,隐藏上拉加载
  1996. }
  1997. }
  1998. this.isUpScrolling = false; // 标记结束上拉加载
  1999. };
  2000. /* 重置上拉加载列表为第一页
  2001. *isShowLoading 是否显示进度布局;
  2002. * 1.默认null,不传参,则显示上拉加载的进度布局
  2003. * 2.传参true, 则显示下拉刷新的进度布局
  2004. * 3.传参false,则不显示上拉和下拉的进度 (常用于静默更新列表数据)
  2005. */
  2006. MeScroll.prototype.resetUpScroll = function (isShowLoading) {
  2007. if (this.optUp && this.optUp.use) {
  2008. var page = this.optUp.page;
  2009. this.prePageNum = page.num; // 缓存重置前的页码,加载失败可退回
  2010. this.prePageTime = page.time; // 缓存重置前的时间,加载失败可退回
  2011. page.num = this.startNum; // 重置为第一页
  2012. page.time = null; // 重置时间为空
  2013. if (!this.isDownScrolling && isShowLoading !== false) {// 如果不是下拉刷新触发的resetUpScroll并且不配置列表静默更新,则显示进度;
  2014. if (isShowLoading == null) {
  2015. this.removeEmpty(); // 移除空布局
  2016. this.showUpScroll(); // 不传参,默认显示上拉加载的进度布局
  2017. } else {
  2018. this.showDownScroll(); // 传true,显示下拉刷新的进度布局,不清空列表
  2019. }
  2020. }
  2021. this.isUpAutoLoad = true; // 标记上拉已经自动执行过,避免初始化时多次触发上拉回调
  2022. this.num = page.num; // 把最新的页数赋值在mescroll上,避免对page的影响
  2023. this.size = page.size; // 把最新的页码赋值在mescroll上,避免对page的影响
  2024. this.time = page.time; // 把最新的页码赋值在mescroll上,避免对page的影响
  2025. this.optUp.callback && this.optUp.callback(this); // 执行上拉回调
  2026. }
  2027. };
  2028. /* 设置page.num的值 */
  2029. MeScroll.prototype.setPageNum = function (num) {
  2030. this.optUp.page.num = num - 1;
  2031. };
  2032. /* 设置page.size的值 */
  2033. MeScroll.prototype.setPageSize = function (size) {
  2034. this.optUp.page.size = size;
  2035. };
  2036. /* 联网回调成功,结束下拉刷新和上拉加载
  2037. * dataSize: 当前页的数据量(必传)
  2038. * totalPage: 总页数(必传)
  2039. * systime: 服务器时间 (可空)
  2040. */
  2041. MeScroll.prototype.endByPage = function (dataSize, totalPage, systime) {
  2042. var hasNext;
  2043. if (this.optUp.use && totalPage != null) hasNext = this.optUp.page.num < totalPage; // 是否还有下一页
  2044. this.endSuccess(dataSize, hasNext, systime);
  2045. };
  2046. /* 联网回调成功,结束下拉刷新和上拉加载
  2047. * dataSize: 当前页的数据量(必传)
  2048. * totalSize: 列表所有数据总数量(必传)
  2049. * systime: 服务器时间 (可空)
  2050. */
  2051. MeScroll.prototype.endBySize = function (dataSize, totalSize, systime) {
  2052. var hasNext;
  2053. if (this.optUp.use && totalSize != null) {
  2054. var loadSize = (this.optUp.page.num - 1) * this.optUp.page.size + dataSize; // 已加载的数据总数
  2055. hasNext = loadSize < totalSize; // 是否还有下一页
  2056. }
  2057. this.endSuccess(dataSize, hasNext, systime);
  2058. };
  2059. /* 联网回调成功,结束下拉刷新和上拉加载
  2060. * dataSize: 当前页的数据个数(不是所有页的数据总和),用于上拉加载判断是否还有下一页.如果不传,则会判断还有下一页
  2061. * hasNext: 是否还有下一页,布尔类型;用来解决这个小问题:比如列表共有20条数据,每页加载10条,共2页.如果只根据dataSize判断,则需翻到第三页才会知道无更多数据,如果传了hasNext,则翻到第二页即可显示无更多数据.
  2062. * systime: 服务器时间(可空);用来解决这个小问题:当准备翻下一页时,数据库新增了几条记录,此时翻下一页,前面的几条数据会和上一页的重复;这里传入了systime,那么upCallback的page.time就会有值,把page.time传给服务器,让后台过滤新加入的那几条记录
  2063. */
  2064. MeScroll.prototype.endSuccess = function (dataSize, hasNext, systime) {
  2065. var me = this;
  2066. // 结束下拉刷新
  2067. if (me.isDownScrolling) me.endDownScroll();
  2068. // 结束上拉加载
  2069. if (me.optUp.use) {
  2070. var isShowNoMore; // 是否已无更多数据
  2071. if (dataSize != null) {
  2072. var pageNum = me.optUp.page.num; // 当前页码
  2073. var pageSize = me.optUp.page.size; // 每页长度
  2074. // 如果是第一页
  2075. if (pageNum === 1) {
  2076. if (systime) me.optUp.page.time = systime; // 设置加载列表数据第一页的时间
  2077. }
  2078. if (dataSize < pageSize || hasNext === false) {
  2079. // 返回的数据不满一页时,则说明已无更多数据
  2080. me.optUp.hasNext = false;
  2081. if (dataSize === 0 && pageNum === 1) {
  2082. // 如果第一页无任何数据且配置了空布局
  2083. isShowNoMore = false;
  2084. me.showEmpty();
  2085. } else {
  2086. // 总列表数少于配置的数量,则不显示无更多数据
  2087. var allDataSize = (pageNum - 1) * pageSize + dataSize;
  2088. if (allDataSize < me.optUp.noMoreSize) {
  2089. isShowNoMore = false;
  2090. } else {
  2091. isShowNoMore = true;
  2092. }
  2093. me.removeEmpty(); // 移除空布局
  2094. }
  2095. } else {
  2096. // 还有下一页
  2097. isShowNoMore = false;
  2098. me.optUp.hasNext = true;
  2099. me.removeEmpty(); // 移除空布局
  2100. }
  2101. }
  2102. // 隐藏上拉
  2103. me.endUpScroll(isShowNoMore);
  2104. }
  2105. };
  2106. /* 回调失败,结束下拉刷新和上拉加载 */
  2107. MeScroll.prototype.endErr = function (errDistance) {
  2108. // 结束下拉,回调失败重置回原来的页码和时间
  2109. if (this.isDownScrolling) {
  2110. var page = this.optUp.page;
  2111. if (page && this.prePageNum) {
  2112. page.num = this.prePageNum;
  2113. page.time = this.prePageTime;
  2114. }
  2115. this.endDownScroll();
  2116. }
  2117. // 结束上拉,回调失败重置回原来的页码
  2118. if (this.isUpScrolling) {
  2119. this.optUp.page.num--;
  2120. this.endUpScroll(false);
  2121. // 如果是mescroll-body,则需往回滚一定距离
  2122. if (this.isScrollBody && errDistance !== 0) {// 不处理0
  2123. if (!errDistance) errDistance = this.optUp.errDistance; // 不传,则取默认
  2124. this.scrollTo(this.getScrollTop() - errDistance, 0); // 往上回滚的距离
  2125. }
  2126. }
  2127. };
  2128. /* 显示空布局 */
  2129. MeScroll.prototype.showEmpty = function () {
  2130. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(true);
  2131. };
  2132. /* 移除空布局 */
  2133. MeScroll.prototype.removeEmpty = function () {
  2134. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(false);
  2135. };
  2136. /* 显示回到顶部的按钮 */
  2137. MeScroll.prototype.showTopBtn = function () {
  2138. if (!this.topBtnShow) {
  2139. this.topBtnShow = true;
  2140. this.optUp.toTop.onShow && this.optUp.toTop.onShow(true);
  2141. }
  2142. };
  2143. /* 隐藏回到顶部的按钮 */
  2144. MeScroll.prototype.hideTopBtn = function () {
  2145. if (this.topBtnShow) {
  2146. this.topBtnShow = false;
  2147. this.optUp.toTop.onShow && this.optUp.toTop.onShow(false);
  2148. }
  2149. };
  2150. /* 获取滚动条的位置 */
  2151. MeScroll.prototype.getScrollTop = function () {
  2152. return this.scrollTop || 0;
  2153. };
  2154. /* 记录滚动条的位置 */
  2155. MeScroll.prototype.setScrollTop = function (y) {
  2156. this.scrollTop = y;
  2157. };
  2158. /* 滚动到指定位置 */
  2159. MeScroll.prototype.scrollTo = function (y, t) {
  2160. this.myScrollTo && this.myScrollTo(y, t); // scrollview需自定义回到顶部方法
  2161. };
  2162. /* 自定义scrollTo */
  2163. MeScroll.prototype.resetScrollTo = function (myScrollTo) {
  2164. this.myScrollTo = myScrollTo;
  2165. };
  2166. /* 滚动条到底部的距离 */
  2167. MeScroll.prototype.getScrollBottom = function () {
  2168. return this.getScrollHeight() - this.getClientHeight() - this.getScrollTop();
  2169. };
  2170. /* 计步器
  2171. star: 开始值
  2172. end: 结束值
  2173. callback(step,timer): 回调step值,计步器timer,可自行通过window.clearInterval(timer)结束计步器;
  2174. t: 计步时长,传0则直接回调end值;不传则默认300ms
  2175. rate: 周期;不传则默认30ms计步一次
  2176. * */
  2177. MeScroll.prototype.getStep = function (star, end, callback, t, rate) {
  2178. var diff = end - star; // 差值
  2179. if (t === 0 || diff === 0) {
  2180. callback && callback(end);
  2181. return;
  2182. }
  2183. t = t || 300; // 时长 300ms
  2184. rate = rate || 30; // 周期 30ms
  2185. var count = t / rate; // 次数
  2186. var step = diff / count; // 步长
  2187. var i = 0; // 计数
  2188. var timer = setInterval(function () {
  2189. if (i < count - 1) {
  2190. star += step;
  2191. callback && callback(star, timer);
  2192. i++;
  2193. } else {
  2194. callback && callback(end, timer); // 最后一次直接设置end,避免计算误差
  2195. clearInterval(timer);
  2196. }
  2197. }, rate);
  2198. };
  2199. /* 滚动容器的高度 */
  2200. MeScroll.prototype.getClientHeight = function (isReal) {
  2201. var h = this.clientHeight || 0;
  2202. if (h === 0 && isReal !== true) {// 未获取到容器的高度,可临时取body的高度 (可能会有误差)
  2203. h = this.getBodyHeight();
  2204. }
  2205. return h;
  2206. };
  2207. MeScroll.prototype.setClientHeight = function (h) {
  2208. this.clientHeight = h;
  2209. };
  2210. /* 滚动内容的高度 */
  2211. MeScroll.prototype.getScrollHeight = function () {
  2212. return this.scrollHeight || 0;
  2213. };
  2214. MeScroll.prototype.setScrollHeight = function (h) {
  2215. this.scrollHeight = h;
  2216. };
  2217. /* body的高度 */
  2218. MeScroll.prototype.getBodyHeight = function () {
  2219. return this.bodyHeight || 0;
  2220. };
  2221. MeScroll.prototype.setBodyHeight = function (h) {
  2222. this.bodyHeight = h;
  2223. };
  2224. /* 阻止浏览器默认滚动事件 */
  2225. MeScroll.prototype.preventDefault = function (e) {
  2226. // 小程序不支持e.preventDefault, 已在wxs中禁止
  2227. // app的bounce只能通过配置pages.json的style.app-plus.bounce为"none"来禁止, 或使用renderjs禁止
  2228. // cancelable:是否可以被禁用; defaultPrevented:是否已经被禁用
  2229. if (e && e.cancelable && !e.defaultPrevented) e.preventDefault();
  2230. };
  2231. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  2232. /***/ }),
  2233. /***/ 131:
  2234. /*!************************************************************************!*\
  2235. !*** D:/wwwroot/forest/components/mescroll-uni/mescroll-uni-option.js ***!
  2236. \************************************************************************/
  2237. /*! no static exports found */
  2238. /***/ (function(module, exports, __webpack_require__) {
  2239. "use strict";
  2240. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 全局配置
  2241. // mescroll-body 和 mescroll-uni 通用
  2242. var GlobalOption = {
  2243. down: {
  2244. // 其他down的配置参数也可以写,这里只展示了常用的配置:
  2245. textInOffset: '下拉刷新', // 下拉的距离在offset范围内的提示文本
  2246. textOutOffset: '释放更新', // 下拉的距离大于offset范围的提示文本
  2247. textLoading: '加载中 ...', // 加载中的提示文本
  2248. offset: 80, // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  2249. native: false // 是否使用系统自带的下拉刷新; 默认false; 仅在mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  2250. },
  2251. up: {
  2252. // 其他up的配置参数也可以写,这里只展示了常用的配置:
  2253. textLoading: '加载中 ...', // 加载中的提示文本
  2254. textNoMore: '-- END --', // 没有更多数据的提示文本
  2255. offset: 80, // 距底部多远时,触发upCallback
  2256. toTop: {
  2257. // 回到顶部按钮,需配置src才显示
  2258. src: "http://www.mescroll.com/img/mescroll-totop.png?v=1", // 图片路径 (建议放入static目录, 如 /static/img/mescroll-totop.png )
  2259. offset: 1000, // 列表滚动多少距离才显示回到顶部按钮,默认1000px
  2260. right: 20, // 到右边的距离, 默认20 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  2261. bottom: 120, // 到底部的距离, 默认120 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  2262. width: 72 // 回到顶部图标的宽度, 默认72 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  2263. },
  2264. empty: {
  2265. use: true, // 是否显示空布局
  2266. icon: "http://www.mescroll.com/img/mescroll-empty.png?v=1", // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
  2267. tip: '~ 空空如也 ~' // 提示
  2268. } } };var _default =
  2269. GlobalOption;exports.default = _default;
  2270. /***/ }),
  2271. /***/ 132:
  2272. /*!***************************************************************!*\
  2273. !*** D:/wwwroot/forest/components/mescroll-uni/wxs/mixins.js ***!
  2274. \***************************************************************/
  2275. /*! no static exports found */
  2276. /***/ (function(module, exports, __webpack_require__) {
  2277. "use strict";
  2278. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 定义在wxs (含renderjs) 逻辑层的数据和方法, 与视图层相互通信
  2279. var WxsMixin = {
  2280. data: function data() {
  2281. return {
  2282. // 传入wxs视图层的数据 (响应式)
  2283. wxsProp: {
  2284. optDown: {}, // 下拉刷新的配置
  2285. scrollTop: 0, // 滚动条的距离
  2286. bodyHeight: 0, // body的高度
  2287. isDownScrolling: false, // 是否正在下拉刷新中
  2288. isUpScrolling: false, // 是否正在上拉加载中
  2289. isScrollBody: true, // 是否为mescroll-body滚动
  2290. isUpBoth: true, // 上拉加载时,是否同时可以下拉刷新
  2291. t: 0 // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  2292. },
  2293. // 标记调用wxs视图层的方法
  2294. callProp: {
  2295. callType: '', // 方法名
  2296. t: 0 // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  2297. },
  2298. // 不用wxs的平台使用此处的wxsBiz对象,抹平wxs的写法 (微信小程序和APP使用的wxsBiz对象是./wxs/wxs.wxs)
  2299. // 不用renderjs的平台使用此处的renderBiz对象,抹平renderjs的写法 (app 和 h5 使用的renderBiz对象是./wxs/renderjs.js)
  2300. renderBiz: {
  2301. propObserver: function propObserver() {} // 抹平renderjs的写法
  2302. } };
  2303. },
  2304. methods: {
  2305. // wxs视图层调用逻辑层的回调
  2306. wxsCall: function wxsCall(msg) {
  2307. if (msg.type === 'setWxsProp') {
  2308. // 更新wxsProp数据 (值改变才触发更新)
  2309. this.wxsProp = {
  2310. optDown: this.mescroll.optDown,
  2311. scrollTop: this.mescroll.getScrollTop(),
  2312. bodyHeight: this.mescroll.getBodyHeight(),
  2313. isDownScrolling: this.mescroll.isDownScrolling,
  2314. isUpScrolling: this.mescroll.isUpScrolling,
  2315. isUpBoth: this.mescroll.optUp.isBoth,
  2316. isScrollBody: this.mescroll.isScrollBody,
  2317. t: Date.now() };
  2318. } else if (msg.type === 'setLoadType') {
  2319. // 设置inOffset,outOffset的状态
  2320. this.downLoadType = msg.downLoadType;
  2321. } else if (msg.type === 'triggerDownScroll') {
  2322. // 主动触发下拉刷新
  2323. this.mescroll.triggerDownScroll();
  2324. } else if (msg.type === 'endDownScroll') {
  2325. // 结束下拉刷新
  2326. this.mescroll.endDownScroll();
  2327. } else if (msg.type === 'triggerUpScroll') {
  2328. // 主动触发上拉加载
  2329. this.mescroll.triggerUpScroll(true);
  2330. }
  2331. } },
  2332. mounted: function mounted() {var _this = this;
  2333. // 配置主动触发wxs显示加载进度的回调
  2334. this.mescroll.optDown.afterLoading = function () {
  2335. _this.callProp = { callType: "showLoading", t: Date.now() }; // 触发wxs的方法 (值改变才触发更新)
  2336. };
  2337. // 配置主动触发wxs隐藏加载进度的回调
  2338. this.mescroll.optDown.afterEndDownScroll = function () {
  2339. _this.callProp = { callType: "endDownScroll", t: Date.now() }; // 触发wxs的方法 (值改变才触发更新)
  2340. setTimeout(function () {
  2341. if (_this.downLoadType === 4 || _this.downLoadType === 0) {
  2342. _this.callProp = { callType: "clearTransform", t: Date.now() }; // 触发wxs的方法 (值改变才触发更新)
  2343. }
  2344. }, 320);
  2345. };
  2346. // 初始化wxs的数据
  2347. this.wxsCall({ type: 'setWxsProp' });
  2348. } };var _default =
  2349. WxsMixin;exports.default = _default;
  2350. /***/ }),
  2351. /***/ 14:
  2352. /*!********************************************!*\
  2353. !*** ./node_modules/vuex/dist/vuex.esm.js ***!
  2354. \********************************************/
  2355. /*! exports provided: Store, install, mapState, mapMutations, mapGetters, mapActions, createNamespacedHelpers, default */
  2356. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2357. "use strict";
  2358. __webpack_require__.r(__webpack_exports__);
  2359. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Store", function() { return Store; });
  2360. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "install", function() { return install; });
  2361. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapState", function() { return mapState; });
  2362. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapMutations", function() { return mapMutations; });
  2363. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapGetters", function() { return mapGetters; });
  2364. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return mapActions; });
  2365. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createNamespacedHelpers", function() { return createNamespacedHelpers; });
  2366. /**
  2367. * vuex v3.0.1
  2368. * (c) 2017 Evan You
  2369. * @license MIT
  2370. */
  2371. var applyMixin = function (Vue) {
  2372. var version = Number(Vue.version.split('.')[0]);
  2373. if (version >= 2) {
  2374. Vue.mixin({ beforeCreate: vuexInit });
  2375. } else {
  2376. // override init and inject vuex init procedure
  2377. // for 1.x backwards compatibility.
  2378. var _init = Vue.prototype._init;
  2379. Vue.prototype._init = function (options) {
  2380. if ( options === void 0 ) options = {};
  2381. options.init = options.init
  2382. ? [vuexInit].concat(options.init)
  2383. : vuexInit;
  2384. _init.call(this, options);
  2385. };
  2386. }
  2387. /**
  2388. * Vuex init hook, injected into each instances init hooks list.
  2389. */
  2390. function vuexInit () {
  2391. var options = this.$options;
  2392. // store injection
  2393. if (options.store) {
  2394. this.$store = typeof options.store === 'function'
  2395. ? options.store()
  2396. : options.store;
  2397. } else if (options.parent && options.parent.$store) {
  2398. this.$store = options.parent.$store;
  2399. }
  2400. }
  2401. };
  2402. var devtoolHook =
  2403. typeof window !== 'undefined' &&
  2404. window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  2405. function devtoolPlugin (store) {
  2406. if (!devtoolHook) { return }
  2407. store._devtoolHook = devtoolHook;
  2408. devtoolHook.emit('vuex:init', store);
  2409. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  2410. store.replaceState(targetState);
  2411. });
  2412. store.subscribe(function (mutation, state) {
  2413. devtoolHook.emit('vuex:mutation', mutation, state);
  2414. });
  2415. }
  2416. /**
  2417. * Get the first item that pass the test
  2418. * by second argument function
  2419. *
  2420. * @param {Array} list
  2421. * @param {Function} f
  2422. * @return {*}
  2423. */
  2424. /**
  2425. * Deep copy the given object considering circular structure.
  2426. * This function caches all nested objects and its copies.
  2427. * If it detects circular structure, use cached copy to avoid infinite loop.
  2428. *
  2429. * @param {*} obj
  2430. * @param {Array<Object>} cache
  2431. * @return {*}
  2432. */
  2433. /**
  2434. * forEach for object
  2435. */
  2436. function forEachValue (obj, fn) {
  2437. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  2438. }
  2439. function isObject (obj) {
  2440. return obj !== null && typeof obj === 'object'
  2441. }
  2442. function isPromise (val) {
  2443. return val && typeof val.then === 'function'
  2444. }
  2445. function assert (condition, msg) {
  2446. if (!condition) { throw new Error(("[vuex] " + msg)) }
  2447. }
  2448. var Module = function Module (rawModule, runtime) {
  2449. this.runtime = runtime;
  2450. this._children = Object.create(null);
  2451. this._rawModule = rawModule;
  2452. var rawState = rawModule.state;
  2453. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  2454. };
  2455. var prototypeAccessors$1 = { namespaced: { configurable: true } };
  2456. prototypeAccessors$1.namespaced.get = function () {
  2457. return !!this._rawModule.namespaced
  2458. };
  2459. Module.prototype.addChild = function addChild (key, module) {
  2460. this._children[key] = module;
  2461. };
  2462. Module.prototype.removeChild = function removeChild (key) {
  2463. delete this._children[key];
  2464. };
  2465. Module.prototype.getChild = function getChild (key) {
  2466. return this._children[key]
  2467. };
  2468. Module.prototype.update = function update (rawModule) {
  2469. this._rawModule.namespaced = rawModule.namespaced;
  2470. if (rawModule.actions) {
  2471. this._rawModule.actions = rawModule.actions;
  2472. }
  2473. if (rawModule.mutations) {
  2474. this._rawModule.mutations = rawModule.mutations;
  2475. }
  2476. if (rawModule.getters) {
  2477. this._rawModule.getters = rawModule.getters;
  2478. }
  2479. };
  2480. Module.prototype.forEachChild = function forEachChild (fn) {
  2481. forEachValue(this._children, fn);
  2482. };
  2483. Module.prototype.forEachGetter = function forEachGetter (fn) {
  2484. if (this._rawModule.getters) {
  2485. forEachValue(this._rawModule.getters, fn);
  2486. }
  2487. };
  2488. Module.prototype.forEachAction = function forEachAction (fn) {
  2489. if (this._rawModule.actions) {
  2490. forEachValue(this._rawModule.actions, fn);
  2491. }
  2492. };
  2493. Module.prototype.forEachMutation = function forEachMutation (fn) {
  2494. if (this._rawModule.mutations) {
  2495. forEachValue(this._rawModule.mutations, fn);
  2496. }
  2497. };
  2498. Object.defineProperties( Module.prototype, prototypeAccessors$1 );
  2499. var ModuleCollection = function ModuleCollection (rawRootModule) {
  2500. // register root module (Vuex.Store options)
  2501. this.register([], rawRootModule, false);
  2502. };
  2503. ModuleCollection.prototype.get = function get (path) {
  2504. return path.reduce(function (module, key) {
  2505. return module.getChild(key)
  2506. }, this.root)
  2507. };
  2508. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  2509. var module = this.root;
  2510. return path.reduce(function (namespace, key) {
  2511. module = module.getChild(key);
  2512. return namespace + (module.namespaced ? key + '/' : '')
  2513. }, '')
  2514. };
  2515. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  2516. update([], this.root, rawRootModule);
  2517. };
  2518. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  2519. var this$1 = this;
  2520. if ( runtime === void 0 ) runtime = true;
  2521. if (true) {
  2522. assertRawModule(path, rawModule);
  2523. }
  2524. var newModule = new Module(rawModule, runtime);
  2525. if (path.length === 0) {
  2526. this.root = newModule;
  2527. } else {
  2528. var parent = this.get(path.slice(0, -1));
  2529. parent.addChild(path[path.length - 1], newModule);
  2530. }
  2531. // register nested modules
  2532. if (rawModule.modules) {
  2533. forEachValue(rawModule.modules, function (rawChildModule, key) {
  2534. this$1.register(path.concat(key), rawChildModule, runtime);
  2535. });
  2536. }
  2537. };
  2538. ModuleCollection.prototype.unregister = function unregister (path) {
  2539. var parent = this.get(path.slice(0, -1));
  2540. var key = path[path.length - 1];
  2541. if (!parent.getChild(key).runtime) { return }
  2542. parent.removeChild(key);
  2543. };
  2544. function update (path, targetModule, newModule) {
  2545. if (true) {
  2546. assertRawModule(path, newModule);
  2547. }
  2548. // update target module
  2549. targetModule.update(newModule);
  2550. // update nested modules
  2551. if (newModule.modules) {
  2552. for (var key in newModule.modules) {
  2553. if (!targetModule.getChild(key)) {
  2554. if (true) {
  2555. console.warn(
  2556. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  2557. 'manual reload is needed'
  2558. );
  2559. }
  2560. return
  2561. }
  2562. update(
  2563. path.concat(key),
  2564. targetModule.getChild(key),
  2565. newModule.modules[key]
  2566. );
  2567. }
  2568. }
  2569. }
  2570. var functionAssert = {
  2571. assert: function (value) { return typeof value === 'function'; },
  2572. expected: 'function'
  2573. };
  2574. var objectAssert = {
  2575. assert: function (value) { return typeof value === 'function' ||
  2576. (typeof value === 'object' && typeof value.handler === 'function'); },
  2577. expected: 'function or object with "handler" function'
  2578. };
  2579. var assertTypes = {
  2580. getters: functionAssert,
  2581. mutations: functionAssert,
  2582. actions: objectAssert
  2583. };
  2584. function assertRawModule (path, rawModule) {
  2585. Object.keys(assertTypes).forEach(function (key) {
  2586. if (!rawModule[key]) { return }
  2587. var assertOptions = assertTypes[key];
  2588. forEachValue(rawModule[key], function (value, type) {
  2589. assert(
  2590. assertOptions.assert(value),
  2591. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  2592. );
  2593. });
  2594. });
  2595. }
  2596. function makeAssertionMessage (path, key, type, value, expected) {
  2597. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  2598. if (path.length > 0) {
  2599. buf += " in module \"" + (path.join('.')) + "\"";
  2600. }
  2601. buf += " is " + (JSON.stringify(value)) + ".";
  2602. return buf
  2603. }
  2604. var Vue; // bind on install
  2605. var Store = function Store (options) {
  2606. var this$1 = this;
  2607. if ( options === void 0 ) options = {};
  2608. // Auto install if it is not done yet and `window` has `Vue`.
  2609. // To allow users to avoid auto-installation in some cases,
  2610. // this code should be placed here. See #731
  2611. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  2612. install(window.Vue);
  2613. }
  2614. if (true) {
  2615. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  2616. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  2617. assert(this instanceof Store, "Store must be called with the new operator.");
  2618. }
  2619. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  2620. var strict = options.strict; if ( strict === void 0 ) strict = false;
  2621. var state = options.state; if ( state === void 0 ) state = {};
  2622. if (typeof state === 'function') {
  2623. state = state() || {};
  2624. }
  2625. // store internal state
  2626. this._committing = false;
  2627. this._actions = Object.create(null);
  2628. this._actionSubscribers = [];
  2629. this._mutations = Object.create(null);
  2630. this._wrappedGetters = Object.create(null);
  2631. this._modules = new ModuleCollection(options);
  2632. this._modulesNamespaceMap = Object.create(null);
  2633. this._subscribers = [];
  2634. this._watcherVM = new Vue();
  2635. // bind commit and dispatch to self
  2636. var store = this;
  2637. var ref = this;
  2638. var dispatch = ref.dispatch;
  2639. var commit = ref.commit;
  2640. this.dispatch = function boundDispatch (type, payload) {
  2641. return dispatch.call(store, type, payload)
  2642. };
  2643. this.commit = function boundCommit (type, payload, options) {
  2644. return commit.call(store, type, payload, options)
  2645. };
  2646. // strict mode
  2647. this.strict = strict;
  2648. // init root module.
  2649. // this also recursively registers all sub-modules
  2650. // and collects all module getters inside this._wrappedGetters
  2651. installModule(this, state, [], this._modules.root);
  2652. // initialize the store vm, which is responsible for the reactivity
  2653. // (also registers _wrappedGetters as computed properties)
  2654. resetStoreVM(this, state);
  2655. // apply plugins
  2656. plugins.forEach(function (plugin) { return plugin(this$1); });
  2657. if (Vue.config.devtools) {
  2658. devtoolPlugin(this);
  2659. }
  2660. };
  2661. var prototypeAccessors = { state: { configurable: true } };
  2662. prototypeAccessors.state.get = function () {
  2663. return this._vm._data.$$state
  2664. };
  2665. prototypeAccessors.state.set = function (v) {
  2666. if (true) {
  2667. assert(false, "Use store.replaceState() to explicit replace store state.");
  2668. }
  2669. };
  2670. Store.prototype.commit = function commit (_type, _payload, _options) {
  2671. var this$1 = this;
  2672. // check object-style commit
  2673. var ref = unifyObjectStyle(_type, _payload, _options);
  2674. var type = ref.type;
  2675. var payload = ref.payload;
  2676. var options = ref.options;
  2677. var mutation = { type: type, payload: payload };
  2678. var entry = this._mutations[type];
  2679. if (!entry) {
  2680. if (true) {
  2681. console.error(("[vuex] unknown mutation type: " + type));
  2682. }
  2683. return
  2684. }
  2685. this._withCommit(function () {
  2686. entry.forEach(function commitIterator (handler) {
  2687. handler(payload);
  2688. });
  2689. });
  2690. this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); });
  2691. if (
  2692. true &&
  2693. options && options.silent
  2694. ) {
  2695. console.warn(
  2696. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  2697. 'Use the filter functionality in the vue-devtools'
  2698. );
  2699. }
  2700. };
  2701. Store.prototype.dispatch = function dispatch (_type, _payload) {
  2702. var this$1 = this;
  2703. // check object-style dispatch
  2704. var ref = unifyObjectStyle(_type, _payload);
  2705. var type = ref.type;
  2706. var payload = ref.payload;
  2707. var action = { type: type, payload: payload };
  2708. var entry = this._actions[type];
  2709. if (!entry) {
  2710. if (true) {
  2711. console.error(("[vuex] unknown action type: " + type));
  2712. }
  2713. return
  2714. }
  2715. this._actionSubscribers.forEach(function (sub) { return sub(action, this$1.state); });
  2716. return entry.length > 1
  2717. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  2718. : entry[0](payload)
  2719. };
  2720. Store.prototype.subscribe = function subscribe (fn) {
  2721. return genericSubscribe(fn, this._subscribers)
  2722. };
  2723. Store.prototype.subscribeAction = function subscribeAction (fn) {
  2724. return genericSubscribe(fn, this._actionSubscribers)
  2725. };
  2726. Store.prototype.watch = function watch (getter, cb, options) {
  2727. var this$1 = this;
  2728. if (true) {
  2729. assert(typeof getter === 'function', "store.watch only accepts a function.");
  2730. }
  2731. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  2732. };
  2733. Store.prototype.replaceState = function replaceState (state) {
  2734. var this$1 = this;
  2735. this._withCommit(function () {
  2736. this$1._vm._data.$$state = state;
  2737. });
  2738. };
  2739. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  2740. if ( options === void 0 ) options = {};
  2741. if (typeof path === 'string') { path = [path]; }
  2742. if (true) {
  2743. assert(Array.isArray(path), "module path must be a string or an Array.");
  2744. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  2745. }
  2746. this._modules.register(path, rawModule);
  2747. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  2748. // reset store to update getters...
  2749. resetStoreVM(this, this.state);
  2750. };
  2751. Store.prototype.unregisterModule = function unregisterModule (path) {
  2752. var this$1 = this;
  2753. if (typeof path === 'string') { path = [path]; }
  2754. if (true) {
  2755. assert(Array.isArray(path), "module path must be a string or an Array.");
  2756. }
  2757. this._modules.unregister(path);
  2758. this._withCommit(function () {
  2759. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  2760. Vue.delete(parentState, path[path.length - 1]);
  2761. });
  2762. resetStore(this);
  2763. };
  2764. Store.prototype.hotUpdate = function hotUpdate (newOptions) {
  2765. this._modules.update(newOptions);
  2766. resetStore(this, true);
  2767. };
  2768. Store.prototype._withCommit = function _withCommit (fn) {
  2769. var committing = this._committing;
  2770. this._committing = true;
  2771. fn();
  2772. this._committing = committing;
  2773. };
  2774. Object.defineProperties( Store.prototype, prototypeAccessors );
  2775. function genericSubscribe (fn, subs) {
  2776. if (subs.indexOf(fn) < 0) {
  2777. subs.push(fn);
  2778. }
  2779. return function () {
  2780. var i = subs.indexOf(fn);
  2781. if (i > -1) {
  2782. subs.splice(i, 1);
  2783. }
  2784. }
  2785. }
  2786. function resetStore (store, hot) {
  2787. store._actions = Object.create(null);
  2788. store._mutations = Object.create(null);
  2789. store._wrappedGetters = Object.create(null);
  2790. store._modulesNamespaceMap = Object.create(null);
  2791. var state = store.state;
  2792. // init all modules
  2793. installModule(store, state, [], store._modules.root, true);
  2794. // reset vm
  2795. resetStoreVM(store, state, hot);
  2796. }
  2797. function resetStoreVM (store, state, hot) {
  2798. var oldVm = store._vm;
  2799. // bind store public getters
  2800. store.getters = {};
  2801. var wrappedGetters = store._wrappedGetters;
  2802. var computed = {};
  2803. forEachValue(wrappedGetters, function (fn, key) {
  2804. // use computed to leverage its lazy-caching mechanism
  2805. computed[key] = function () { return fn(store); };
  2806. Object.defineProperty(store.getters, key, {
  2807. get: function () { return store._vm[key]; },
  2808. enumerable: true // for local getters
  2809. });
  2810. });
  2811. // use a Vue instance to store the state tree
  2812. // suppress warnings just in case the user has added
  2813. // some funky global mixins
  2814. var silent = Vue.config.silent;
  2815. Vue.config.silent = true;
  2816. store._vm = new Vue({
  2817. data: {
  2818. $$state: state
  2819. },
  2820. computed: computed
  2821. });
  2822. Vue.config.silent = silent;
  2823. // enable strict mode for new vm
  2824. if (store.strict) {
  2825. enableStrictMode(store);
  2826. }
  2827. if (oldVm) {
  2828. if (hot) {
  2829. // dispatch changes in all subscribed watchers
  2830. // to force getter re-evaluation for hot reloading.
  2831. store._withCommit(function () {
  2832. oldVm._data.$$state = null;
  2833. });
  2834. }
  2835. Vue.nextTick(function () { return oldVm.$destroy(); });
  2836. }
  2837. }
  2838. function installModule (store, rootState, path, module, hot) {
  2839. var isRoot = !path.length;
  2840. var namespace = store._modules.getNamespace(path);
  2841. // register in namespace map
  2842. if (module.namespaced) {
  2843. store._modulesNamespaceMap[namespace] = module;
  2844. }
  2845. // set state
  2846. if (!isRoot && !hot) {
  2847. var parentState = getNestedState(rootState, path.slice(0, -1));
  2848. var moduleName = path[path.length - 1];
  2849. store._withCommit(function () {
  2850. Vue.set(parentState, moduleName, module.state);
  2851. });
  2852. }
  2853. var local = module.context = makeLocalContext(store, namespace, path);
  2854. module.forEachMutation(function (mutation, key) {
  2855. var namespacedType = namespace + key;
  2856. registerMutation(store, namespacedType, mutation, local);
  2857. });
  2858. module.forEachAction(function (action, key) {
  2859. var type = action.root ? key : namespace + key;
  2860. var handler = action.handler || action;
  2861. registerAction(store, type, handler, local);
  2862. });
  2863. module.forEachGetter(function (getter, key) {
  2864. var namespacedType = namespace + key;
  2865. registerGetter(store, namespacedType, getter, local);
  2866. });
  2867. module.forEachChild(function (child, key) {
  2868. installModule(store, rootState, path.concat(key), child, hot);
  2869. });
  2870. }
  2871. /**
  2872. * make localized dispatch, commit, getters and state
  2873. * if there is no namespace, just use root ones
  2874. */
  2875. function makeLocalContext (store, namespace, path) {
  2876. var noNamespace = namespace === '';
  2877. var local = {
  2878. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  2879. var args = unifyObjectStyle(_type, _payload, _options);
  2880. var payload = args.payload;
  2881. var options = args.options;
  2882. var type = args.type;
  2883. if (!options || !options.root) {
  2884. type = namespace + type;
  2885. if ( true && !store._actions[type]) {
  2886. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  2887. return
  2888. }
  2889. }
  2890. return store.dispatch(type, payload)
  2891. },
  2892. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  2893. var args = unifyObjectStyle(_type, _payload, _options);
  2894. var payload = args.payload;
  2895. var options = args.options;
  2896. var type = args.type;
  2897. if (!options || !options.root) {
  2898. type = namespace + type;
  2899. if ( true && !store._mutations[type]) {
  2900. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  2901. return
  2902. }
  2903. }
  2904. store.commit(type, payload, options);
  2905. }
  2906. };
  2907. // getters and state object must be gotten lazily
  2908. // because they will be changed by vm update
  2909. Object.defineProperties(local, {
  2910. getters: {
  2911. get: noNamespace
  2912. ? function () { return store.getters; }
  2913. : function () { return makeLocalGetters(store, namespace); }
  2914. },
  2915. state: {
  2916. get: function () { return getNestedState(store.state, path); }
  2917. }
  2918. });
  2919. return local
  2920. }
  2921. function makeLocalGetters (store, namespace) {
  2922. var gettersProxy = {};
  2923. var splitPos = namespace.length;
  2924. Object.keys(store.getters).forEach(function (type) {
  2925. // skip if the target getter is not match this namespace
  2926. if (type.slice(0, splitPos) !== namespace) { return }
  2927. // extract local getter type
  2928. var localType = type.slice(splitPos);
  2929. // Add a port to the getters proxy.
  2930. // Define as getter property because
  2931. // we do not want to evaluate the getters in this time.
  2932. Object.defineProperty(gettersProxy, localType, {
  2933. get: function () { return store.getters[type]; },
  2934. enumerable: true
  2935. });
  2936. });
  2937. return gettersProxy
  2938. }
  2939. function registerMutation (store, type, handler, local) {
  2940. var entry = store._mutations[type] || (store._mutations[type] = []);
  2941. entry.push(function wrappedMutationHandler (payload) {
  2942. handler.call(store, local.state, payload);
  2943. });
  2944. }
  2945. function registerAction (store, type, handler, local) {
  2946. var entry = store._actions[type] || (store._actions[type] = []);
  2947. entry.push(function wrappedActionHandler (payload, cb) {
  2948. var res = handler.call(store, {
  2949. dispatch: local.dispatch,
  2950. commit: local.commit,
  2951. getters: local.getters,
  2952. state: local.state,
  2953. rootGetters: store.getters,
  2954. rootState: store.state
  2955. }, payload, cb);
  2956. if (!isPromise(res)) {
  2957. res = Promise.resolve(res);
  2958. }
  2959. if (store._devtoolHook) {
  2960. return res.catch(function (err) {
  2961. store._devtoolHook.emit('vuex:error', err);
  2962. throw err
  2963. })
  2964. } else {
  2965. return res
  2966. }
  2967. });
  2968. }
  2969. function registerGetter (store, type, rawGetter, local) {
  2970. if (store._wrappedGetters[type]) {
  2971. if (true) {
  2972. console.error(("[vuex] duplicate getter key: " + type));
  2973. }
  2974. return
  2975. }
  2976. store._wrappedGetters[type] = function wrappedGetter (store) {
  2977. return rawGetter(
  2978. local.state, // local state
  2979. local.getters, // local getters
  2980. store.state, // root state
  2981. store.getters // root getters
  2982. )
  2983. };
  2984. }
  2985. function enableStrictMode (store) {
  2986. store._vm.$watch(function () { return this._data.$$state }, function () {
  2987. if (true) {
  2988. assert(store._committing, "Do not mutate vuex store state outside mutation handlers.");
  2989. }
  2990. }, { deep: true, sync: true });
  2991. }
  2992. function getNestedState (state, path) {
  2993. return path.length
  2994. ? path.reduce(function (state, key) { return state[key]; }, state)
  2995. : state
  2996. }
  2997. function unifyObjectStyle (type, payload, options) {
  2998. if (isObject(type) && type.type) {
  2999. options = payload;
  3000. payload = type;
  3001. type = type.type;
  3002. }
  3003. if (true) {
  3004. assert(typeof type === 'string', ("Expects string as the type, but found " + (typeof type) + "."));
  3005. }
  3006. return { type: type, payload: payload, options: options }
  3007. }
  3008. function install (_Vue) {
  3009. if (Vue && _Vue === Vue) {
  3010. if (true) {
  3011. console.error(
  3012. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  3013. );
  3014. }
  3015. return
  3016. }
  3017. Vue = _Vue;
  3018. applyMixin(Vue);
  3019. }
  3020. var mapState = normalizeNamespace(function (namespace, states) {
  3021. var res = {};
  3022. normalizeMap(states).forEach(function (ref) {
  3023. var key = ref.key;
  3024. var val = ref.val;
  3025. res[key] = function mappedState () {
  3026. var state = this.$store.state;
  3027. var getters = this.$store.getters;
  3028. if (namespace) {
  3029. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  3030. if (!module) {
  3031. return
  3032. }
  3033. state = module.context.state;
  3034. getters = module.context.getters;
  3035. }
  3036. return typeof val === 'function'
  3037. ? val.call(this, state, getters)
  3038. : state[val]
  3039. };
  3040. // mark vuex getter for devtools
  3041. res[key].vuex = true;
  3042. });
  3043. return res
  3044. });
  3045. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  3046. var res = {};
  3047. normalizeMap(mutations).forEach(function (ref) {
  3048. var key = ref.key;
  3049. var val = ref.val;
  3050. res[key] = function mappedMutation () {
  3051. var args = [], len = arguments.length;
  3052. while ( len-- ) args[ len ] = arguments[ len ];
  3053. var commit = this.$store.commit;
  3054. if (namespace) {
  3055. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  3056. if (!module) {
  3057. return
  3058. }
  3059. commit = module.context.commit;
  3060. }
  3061. return typeof val === 'function'
  3062. ? val.apply(this, [commit].concat(args))
  3063. : commit.apply(this.$store, [val].concat(args))
  3064. };
  3065. });
  3066. return res
  3067. });
  3068. var mapGetters = normalizeNamespace(function (namespace, getters) {
  3069. var res = {};
  3070. normalizeMap(getters).forEach(function (ref) {
  3071. var key = ref.key;
  3072. var val = ref.val;
  3073. val = namespace + val;
  3074. res[key] = function mappedGetter () {
  3075. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  3076. return
  3077. }
  3078. if ( true && !(val in this.$store.getters)) {
  3079. console.error(("[vuex] unknown getter: " + val));
  3080. return
  3081. }
  3082. return this.$store.getters[val]
  3083. };
  3084. // mark vuex getter for devtools
  3085. res[key].vuex = true;
  3086. });
  3087. return res
  3088. });
  3089. var mapActions = normalizeNamespace(function (namespace, actions) {
  3090. var res = {};
  3091. normalizeMap(actions).forEach(function (ref) {
  3092. var key = ref.key;
  3093. var val = ref.val;
  3094. res[key] = function mappedAction () {
  3095. var args = [], len = arguments.length;
  3096. while ( len-- ) args[ len ] = arguments[ len ];
  3097. var dispatch = this.$store.dispatch;
  3098. if (namespace) {
  3099. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  3100. if (!module) {
  3101. return
  3102. }
  3103. dispatch = module.context.dispatch;
  3104. }
  3105. return typeof val === 'function'
  3106. ? val.apply(this, [dispatch].concat(args))
  3107. : dispatch.apply(this.$store, [val].concat(args))
  3108. };
  3109. });
  3110. return res
  3111. });
  3112. var createNamespacedHelpers = function (namespace) { return ({
  3113. mapState: mapState.bind(null, namespace),
  3114. mapGetters: mapGetters.bind(null, namespace),
  3115. mapMutations: mapMutations.bind(null, namespace),
  3116. mapActions: mapActions.bind(null, namespace)
  3117. }); };
  3118. function normalizeMap (map) {
  3119. return Array.isArray(map)
  3120. ? map.map(function (key) { return ({ key: key, val: key }); })
  3121. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  3122. }
  3123. function normalizeNamespace (fn) {
  3124. return function (namespace, map) {
  3125. if (typeof namespace !== 'string') {
  3126. map = namespace;
  3127. namespace = '';
  3128. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  3129. namespace += '/';
  3130. }
  3131. return fn(namespace, map)
  3132. }
  3133. }
  3134. function getModuleByNamespace (store, helper, namespace) {
  3135. var module = store._modulesNamespaceMap[namespace];
  3136. if ( true && !module) {
  3137. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  3138. }
  3139. return module
  3140. }
  3141. var index_esm = {
  3142. Store: Store,
  3143. install: install,
  3144. version: '3.0.1',
  3145. mapState: mapState,
  3146. mapMutations: mapMutations,
  3147. mapGetters: mapGetters,
  3148. mapActions: mapActions,
  3149. createNamespacedHelpers: createNamespacedHelpers
  3150. };
  3151. /* harmony default export */ __webpack_exports__["default"] = (index_esm);
  3152. /***/ }),
  3153. /***/ 142:
  3154. /*!*******************************************************!*\
  3155. !*** D:/wwwroot/forest/components/uni-popup/popup.js ***!
  3156. \*******************************************************/
  3157. /*! no static exports found */
  3158. /***/ (function(module, exports, __webpack_require__) {
  3159. "use strict";
  3160. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _message = _interopRequireDefault(__webpack_require__(/*! ./message.js */ 143));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  3161. // 定义 type 类型:弹出类型:top/bottom/center
  3162. var config = {
  3163. // 顶部弹出
  3164. top: 'top',
  3165. // 底部弹出
  3166. bottom: 'bottom',
  3167. // 居中弹出
  3168. center: 'center',
  3169. // 消息提示
  3170. message: 'top',
  3171. // 对话框
  3172. dialog: 'center',
  3173. // 分享
  3174. share: 'bottom' };var _default =
  3175. {
  3176. data: function data() {
  3177. return {
  3178. config: config };
  3179. },
  3180. mixins: [_message.default] };exports.default = _default;
  3181. /***/ }),
  3182. /***/ 143:
  3183. /*!*********************************************************!*\
  3184. !*** D:/wwwroot/forest/components/uni-popup/message.js ***!
  3185. \*********************************************************/
  3186. /*! no static exports found */
  3187. /***/ (function(module, exports, __webpack_require__) {
  3188. "use strict";
  3189. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  3190. created: function created() {
  3191. if (this.type === 'message') {
  3192. // 不显示遮罩
  3193. this.maskShow = false;
  3194. // 获取子组件对象
  3195. this.childrenMsg = null;
  3196. }
  3197. },
  3198. methods: {
  3199. customOpen: function customOpen() {
  3200. if (this.childrenMsg) {
  3201. this.childrenMsg.open();
  3202. }
  3203. },
  3204. customClose: function customClose() {
  3205. if (this.childrenMsg) {
  3206. this.childrenMsg.close();
  3207. }
  3208. } } };exports.default = _default;
  3209. /***/ }),
  3210. /***/ 15:
  3211. /*!*******************************************************************!*\
  3212. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/index.js ***!
  3213. \*******************************************************************/
  3214. /*! no static exports found */
  3215. /***/ (function(module, exports, __webpack_require__) {
  3216. "use strict";
  3217. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _Request = _interopRequireDefault(__webpack_require__(/*! ./core/Request */ 16));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}var _default =
  3218. _Request.default;exports.default = _default;
  3219. /***/ }),
  3220. /***/ 151:
  3221. /*!*******************************************************!*\
  3222. !*** D:/wwwroot/forest/components/uni-icons/icons.js ***!
  3223. \*******************************************************/
  3224. /*! no static exports found */
  3225. /***/ (function(module, exports, __webpack_require__) {
  3226. "use strict";
  3227. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  3228. 'contact': "\uE100",
  3229. 'person': "\uE101",
  3230. 'personadd': "\uE102",
  3231. 'contact-filled': "\uE130",
  3232. 'person-filled': "\uE131",
  3233. 'personadd-filled': "\uE132",
  3234. 'phone': "\uE200",
  3235. 'email': "\uE201",
  3236. 'chatbubble': "\uE202",
  3237. 'chatboxes': "\uE203",
  3238. 'phone-filled': "\uE230",
  3239. 'email-filled': "\uE231",
  3240. 'chatbubble-filled': "\uE232",
  3241. 'chatboxes-filled': "\uE233",
  3242. 'weibo': "\uE260",
  3243. 'weixin': "\uE261",
  3244. 'pengyouquan': "\uE262",
  3245. 'chat': "\uE263",
  3246. 'qq': "\uE264",
  3247. 'videocam': "\uE300",
  3248. 'camera': "\uE301",
  3249. 'mic': "\uE302",
  3250. 'location': "\uE303",
  3251. 'mic-filled': "\uE332",
  3252. 'speech': "\uE332",
  3253. 'location-filled': "\uE333",
  3254. 'micoff': "\uE360",
  3255. 'image': "\uE363",
  3256. 'map': "\uE364",
  3257. 'compose': "\uE400",
  3258. 'trash': "\uE401",
  3259. 'upload': "\uE402",
  3260. 'download': "\uE403",
  3261. 'close': "\uE404",
  3262. 'redo': "\uE405",
  3263. 'undo': "\uE406",
  3264. 'refresh': "\uE407",
  3265. 'star': "\uE408",
  3266. 'plus': "\uE409",
  3267. 'minus': "\uE410",
  3268. 'circle': "\uE411",
  3269. 'checkbox': "\uE411",
  3270. 'close-filled': "\uE434",
  3271. 'clear': "\uE434",
  3272. 'refresh-filled': "\uE437",
  3273. 'star-filled': "\uE438",
  3274. 'plus-filled': "\uE439",
  3275. 'minus-filled': "\uE440",
  3276. 'circle-filled': "\uE441",
  3277. 'checkbox-filled': "\uE442",
  3278. 'closeempty': "\uE460",
  3279. 'refreshempty': "\uE461",
  3280. 'reload': "\uE462",
  3281. 'starhalf': "\uE463",
  3282. 'spinner': "\uE464",
  3283. 'spinner-cycle': "\uE465",
  3284. 'search': "\uE466",
  3285. 'plusempty': "\uE468",
  3286. 'forward': "\uE470",
  3287. 'back': "\uE471",
  3288. 'left-nav': "\uE471",
  3289. 'checkmarkempty': "\uE472",
  3290. 'home': "\uE500",
  3291. 'navigate': "\uE501",
  3292. 'gear': "\uE502",
  3293. 'paperplane': "\uE503",
  3294. 'info': "\uE504",
  3295. 'help': "\uE505",
  3296. 'locked': "\uE506",
  3297. 'more': "\uE507",
  3298. 'flag': "\uE508",
  3299. 'home-filled': "\uE530",
  3300. 'gear-filled': "\uE532",
  3301. 'info-filled': "\uE534",
  3302. 'help-filled': "\uE535",
  3303. 'more-filled': "\uE537",
  3304. 'settings': "\uE560",
  3305. 'list': "\uE562",
  3306. 'bars': "\uE563",
  3307. 'loop': "\uE565",
  3308. 'paperclip': "\uE567",
  3309. 'eye': "\uE568",
  3310. 'arrowup': "\uE580",
  3311. 'arrowdown': "\uE581",
  3312. 'arrowleft': "\uE582",
  3313. 'arrowright': "\uE583",
  3314. 'arrowthinup': "\uE584",
  3315. 'arrowthindown': "\uE585",
  3316. 'arrowthinleft': "\uE586",
  3317. 'arrowthinright': "\uE587",
  3318. 'pulldown': "\uE588",
  3319. 'closefill': "\uE589",
  3320. 'sound': "\uE590",
  3321. 'scan': "\uE612" };exports.default = _default;
  3322. /***/ }),
  3323. /***/ 16:
  3324. /*!**************************************************************************!*\
  3325. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/core/Request.js ***!
  3326. \**************************************************************************/
  3327. /*! no static exports found */
  3328. /***/ (function(module, exports, __webpack_require__) {
  3329. "use strict";
  3330. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  3331. var _dispatchRequest = _interopRequireDefault(__webpack_require__(/*! ./dispatchRequest */ 17));
  3332. var _InterceptorManager = _interopRequireDefault(__webpack_require__(/*! ./InterceptorManager */ 25));
  3333. var _mergeConfig = _interopRequireDefault(__webpack_require__(/*! ./mergeConfig */ 26));
  3334. var _defaults = _interopRequireDefault(__webpack_require__(/*! ./defaults */ 27));
  3335. var _utils = __webpack_require__(/*! ../utils */ 20);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 _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
  3336. Request = /*#__PURE__*/function () {
  3337. /**
  3338. * @param {Object} arg - 全局配置
  3339. * @param {String} arg.baseURL - 全局根路径
  3340. * @param {Object} arg.header - 全局header
  3341. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  3342. * @param {String} arg.dataType = [json] - 全局默认的dataType
  3343. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。App和支付宝小程序不支持
  3344. * @param {Object} arg.custom - 全局默认的自定义参数
  3345. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认30000。仅微信小程序(2.10.0)、支付宝小程序支持
  3346. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  3347. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  3348. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  3349. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  3350. */
  3351. function Request() {var arg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};_classCallCheck(this, Request);
  3352. if (!(0, _utils.isPlainObject)(arg)) {
  3353. arg = {};
  3354. console.warn('设置全局参数必须接收一个Object');
  3355. }
  3356. this.config = _objectSpread({}, _defaults.default, {}, arg);
  3357. this.interceptors = {
  3358. request: new _InterceptorManager.default(),
  3359. response: new _InterceptorManager.default() };
  3360. }
  3361. /**
  3362. * @Function
  3363. * @param {Request~setConfigCallback} f - 设置全局默认配置
  3364. */_createClass(Request, [{ key: "setConfig", value: function setConfig(
  3365. f) {
  3366. this.config = f(this.config);
  3367. } }, { key: "middleware", value: function middleware(
  3368. config) {
  3369. config = (0, _mergeConfig.default)(this.config, config);
  3370. var chain = [_dispatchRequest.default, undefined];
  3371. var promise = Promise.resolve(config);
  3372. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  3373. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  3374. });
  3375. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  3376. chain.push(interceptor.fulfilled, interceptor.rejected);
  3377. });
  3378. while (chain.length) {
  3379. promise = promise.then(chain.shift(), chain.shift());
  3380. }
  3381. return promise;
  3382. }
  3383. /**
  3384. * @Function
  3385. * @param {Object} config - 请求配置项
  3386. * @prop {String} options.url - 请求路径
  3387. * @prop {Object} options.data - 请求参数
  3388. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  3389. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  3390. * @prop {Object} [options.header = config.header] - 请求header
  3391. * @prop {Object} [options.method = config.method] - 请求方法
  3392. * @returns {Promise<unknown>}
  3393. */ }, { key: "request", value: function request()
  3394. {var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  3395. return this.middleware(config);
  3396. } }, { key: "get", value: function get(
  3397. url) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3398. return this.middleware(_objectSpread({
  3399. url: url,
  3400. method: 'GET' },
  3401. options));
  3402. } }, { key: "post", value: function post(
  3403. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3404. return this.middleware(_objectSpread({
  3405. url: url,
  3406. data: data,
  3407. method: 'POST' },
  3408. options));
  3409. } }, { key: "put", value: function put(
  3410. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3411. return this.middleware(_objectSpread({
  3412. url: url,
  3413. data: data,
  3414. method: 'PUT' },
  3415. options));
  3416. } }, { key: "delete", value: function _delete(
  3417. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3418. return this.middleware(_objectSpread({
  3419. url: url,
  3420. data: data,
  3421. method: 'DELETE' },
  3422. options));
  3423. } }, { key: "connect", value: function connect(
  3424. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3425. return this.middleware(_objectSpread({
  3426. url: url,
  3427. data: data,
  3428. method: 'CONNECT' },
  3429. options));
  3430. } }, { key: "head", value: function head(
  3431. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3432. return this.middleware(_objectSpread({
  3433. url: url,
  3434. data: data,
  3435. method: 'HEAD' },
  3436. options));
  3437. } }, { key: "options", value: function options(
  3438. url, data) {var _options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3439. return this.middleware(_objectSpread({
  3440. url: url,
  3441. data: data,
  3442. method: 'OPTIONS' },
  3443. _options));
  3444. } }, { key: "trace", value: function trace(
  3445. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3446. return this.middleware(_objectSpread({
  3447. url: url,
  3448. data: data,
  3449. method: 'TRACE' },
  3450. options));
  3451. } }, { key: "upload", value: function upload(
  3452. url) {var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3453. config.url = url;
  3454. config.method = 'UPLOAD';
  3455. return this.middleware(config);
  3456. } }, { key: "download", value: function download(
  3457. url) {var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3458. config.url = url;
  3459. config.method = 'DOWNLOAD';
  3460. return this.middleware(config);
  3461. } }]);return Request;}();
  3462. /**
  3463. * setConfig回调
  3464. * @return {Object} - 返回操作后的config
  3465. * @callback Request~setConfigCallback
  3466. * @param {Object} config - 全局默认config
  3467. */exports.default = Request;
  3468. /***/ }),
  3469. /***/ 17:
  3470. /*!**********************************************************************************!*\
  3471. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/core/dispatchRequest.js ***!
  3472. \**********************************************************************************/
  3473. /*! no static exports found */
  3474. /***/ (function(module, exports, __webpack_require__) {
  3475. "use strict";
  3476. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _index = _interopRequireDefault(__webpack_require__(/*! ../adapters/index */ 18));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}var _default =
  3477. function _default(config) {
  3478. return (0, _index.default)(config);
  3479. };exports.default = _default;
  3480. /***/ }),
  3481. /***/ 176:
  3482. /*!**********************************!*\
  3483. !*** D:/wwwroot/forest/wxapi.js ***!
  3484. \**********************************/
  3485. /*! no static exports found */
  3486. /***/ (function(module, exports, __webpack_require__) {
  3487. "use strict";
  3488. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@vue/babel-preset-app/node_modules/@babel/runtime/regenerator */ 177));
  3489. var _index = _interopRequireDefault(__webpack_require__(/*! @/js_sdk/luch-request/luch-request/index.js */ 15));
  3490. var _config = __webpack_require__(/*! ./config/config */ 12);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);});};}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;} //引入微信jssdk
  3491. var wx = __webpack_require__(/*! @/js_sdk/jweixin-1.4.0.js */ 180); //配置注册url
  3492. var url = '/wechat/h5/getJsapiTicket'; //http方法
  3493. var $http = new _index.default(); //系统域名url
  3494. var href = location.href.split('#')[0]; // const href = location.href.split("?")[0]
  3495. //系统域名url
  3496. var _default = _objectSpread({}, wx, { isOk: false, config: function config() {var _this = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:_context.t0 =
  3497. wx;_context.t1 = _objectSpread;_context.t2 = {
  3498. debug: false,
  3499. jsApiList: [
  3500. "updateAppMessageShareData",
  3501. "updateTimelineShareData",
  3502. "onMenuShareTimeline",
  3503. "onMenuShareAppMessage",
  3504. "onMenuShareQQ",
  3505. "onMenuShareWeibo",
  3506. "onMenuShareQZone",
  3507. "startRecord",
  3508. "stopRecord",
  3509. "onVoiceRecordEnd",
  3510. "playVoice",
  3511. "pauseVoice",
  3512. "stopVoice",
  3513. "onVoicePlayEnd",
  3514. "uploadVoice",
  3515. "downloadVoice",
  3516. "chooseImage",
  3517. "previewImage",
  3518. "uploadImage",
  3519. "downloadImage",
  3520. "translateVoice",
  3521. "getNetworkType",
  3522. "openLocation",
  3523. "getLocation",
  3524. "hideOptionMenu",
  3525. "showOptionMenu",
  3526. "hideMenuItems",
  3527. "showMenuItems",
  3528. "hideAllNonBaseMenuItem",
  3529. "showAllNonBaseMenuItem",
  3530. "closeWindow",
  3531. "scanQRCode",
  3532. "chooseWXPay",
  3533. "openProductSpecificView",
  3534. "addCard",
  3535. "chooseCard",
  3536. "openCard"] };_context.next = 5;return (
  3537. $http.get(url, { url: href }));case 5:_context.t3 = _context.sent.retBody;_context.t4 = (0, _context.t1)(_context.t2, _context.t3);_context.t0.config.call(_context.t0, _context.t4);
  3538. wx.ready(function (e) {
  3539. _this.isOk = true;
  3540. _this.hideMenu();
  3541. });
  3542. wx.error(function (e) {
  3543. console.log("失败");
  3544. _this.isOk = false;
  3545. });case 10:case "end":return _context.stop();}}}, _callee);}))();
  3546. },
  3547. hideMenu: function hideMenu() {
  3548. wx.hideAllNonBaseMenuItem();
  3549. },
  3550. showMenu: function showMenu() {
  3551. wx.showMenuItems({
  3552. menuList: [
  3553. "menuItem:share:appMessage",
  3554. "menuItem:profile",
  3555. "menuItem:addContact",
  3556. "menuItem:dayMode",
  3557. "menuItem:nightMode",
  3558. "menuItem:share:timeline",
  3559. "menuItem:favorite"]
  3560. // 要显示的菜单项,所有menu项见附录3
  3561. });
  3562. },
  3563. /**
  3564. * 分享配置
  3565. * @param {Object} info
  3566. */
  3567. share: function share() {var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3568. //添加链接时间戳
  3569. // data.v = new Date().getTime();
  3570. // console.log("shareData",data)
  3571. // let search = [];
  3572. // for (const [key, value] of Object.entries(data)) {
  3573. // // search.push(`${key}=${encodeURIComponent(value)}`);
  3574. // search.push(`${key}=${value}`);
  3575. // }
  3576. // search = "?" + search.join("&");
  3577. var afterEndUrl = _config.config.afterEndUrl;
  3578. // let afterEndUrl = 'http://tanhui.hongweisoft.com/api/wechat/h5/authorize?returnUrl='
  3579. // let afterEndUrl = 'http://gzhjt.gzsdzth.com/api/wechat/h5/authorize?returnUrl='
  3580. var fullUrl = afterEndUrl + location.href.split('?')[0] + '?togetherId=' + data.togetherId + '/#/' + data.routeUrl;
  3581. var shareInfo = _objectSpread({
  3582. title: data.nickname + '邀请你参与贵州省单株碳汇精准扶贫',
  3583. link: fullUrl,
  3584. desc: "购碳扶贫,你我同行",
  3585. imgUrl: href + "/static/logo.png",
  3586. trigger: function trigger(res) {},
  3587. success: function success(res) {},
  3588. cancel: function cancel(res) {},
  3589. fail: function fail(res) {} },
  3590. info);
  3591. console.log('shareInfo', shareInfo, 'fullUrl', fullUrl);
  3592. //自定义“分享给朋友”及“分享到QQ”按钮的分享内容(1.4.0)
  3593. wx.updateAppMessageShareData(shareInfo);
  3594. //自定义“分享到朋友圈”及“分享到QQ空间”按钮的分享内容(1.4.0)
  3595. wx.updateTimelineShareData(shareInfo);
  3596. },
  3597. //拉起微信浏览器端支付
  3598. JSAPI: function JSAPI(res) {
  3599. return new Promise(function (r) {
  3600. wx.chooseWXPay({
  3601. "timestamp": res.timeStamp, //时间戳,自1970年以来的秒数
  3602. "nonceStr": res.nonceStr, //随机串
  3603. "package": res.packageValue,
  3604. "signType": res.signType, //微信签名方式:
  3605. "paySign": res.paySign, //微信签名
  3606. success: function success() {
  3607. r({
  3608. code: 0,
  3609. msg: "成功" });
  3610. },
  3611. cancel: function cancel() {
  3612. r({
  3613. code: 1,
  3614. msg: "取消" });
  3615. },
  3616. fail: function fail() {
  3617. r({
  3618. code: 2,
  3619. msg: "失败" });
  3620. } });
  3621. });
  3622. } });exports.default = _default;
  3623. /***/ }),
  3624. /***/ 177:
  3625. /*!*********************************************************************************************!*\
  3626. !*** ./node_modules/@vue/babel-preset-app/node_modules/@babel/runtime/regenerator/index.js ***!
  3627. \*********************************************************************************************/
  3628. /*! no static exports found */
  3629. /***/ (function(module, exports, __webpack_require__) {
  3630. module.exports = __webpack_require__(/*! regenerator-runtime */ 178);
  3631. /***/ }),
  3632. /***/ 178:
  3633. /*!************************************************************!*\
  3634. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  3635. \************************************************************/
  3636. /*! no static exports found */
  3637. /***/ (function(module, exports, __webpack_require__) {
  3638. /**
  3639. * Copyright (c) 2014-present, Facebook, Inc.
  3640. *
  3641. * This source code is licensed under the MIT license found in the
  3642. * LICENSE file in the root directory of this source tree.
  3643. */
  3644. // This method of obtaining a reference to the global object needs to be
  3645. // kept identical to the way it is obtained in runtime.js
  3646. var g = (function() {
  3647. return this || (typeof self === "object" && self);
  3648. })() || Function("return this")();
  3649. // Use `getOwnPropertyNames` because not all browsers support calling
  3650. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  3651. var hadRuntime = g.regeneratorRuntime &&
  3652. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  3653. // Save the old regeneratorRuntime in case it needs to be restored later.
  3654. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  3655. // Force reevalutation of runtime.js.
  3656. g.regeneratorRuntime = undefined;
  3657. module.exports = __webpack_require__(/*! ./runtime */ 179);
  3658. if (hadRuntime) {
  3659. // Restore the original runtime.
  3660. g.regeneratorRuntime = oldRuntime;
  3661. } else {
  3662. // Remove the global property added by runtime.js.
  3663. try {
  3664. delete g.regeneratorRuntime;
  3665. } catch(e) {
  3666. g.regeneratorRuntime = undefined;
  3667. }
  3668. }
  3669. /***/ }),
  3670. /***/ 179:
  3671. /*!*****************************************************!*\
  3672. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  3673. \*****************************************************/
  3674. /*! no static exports found */
  3675. /***/ (function(module, exports) {
  3676. /**
  3677. * Copyright (c) 2014-present, Facebook, Inc.
  3678. *
  3679. * This source code is licensed under the MIT license found in the
  3680. * LICENSE file in the root directory of this source tree.
  3681. */
  3682. !(function(global) {
  3683. "use strict";
  3684. var Op = Object.prototype;
  3685. var hasOwn = Op.hasOwnProperty;
  3686. var undefined; // More compressible than void 0.
  3687. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  3688. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  3689. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  3690. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  3691. var inModule = typeof module === "object";
  3692. var runtime = global.regeneratorRuntime;
  3693. if (runtime) {
  3694. if (inModule) {
  3695. // If regeneratorRuntime is defined globally and we're in a module,
  3696. // make the exports object identical to regeneratorRuntime.
  3697. module.exports = runtime;
  3698. }
  3699. // Don't bother evaluating the rest of this file if the runtime was
  3700. // already defined globally.
  3701. return;
  3702. }
  3703. // Define the runtime globally (as expected by generated code) as either
  3704. // module.exports (if we're in a module) or a new, empty object.
  3705. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  3706. function wrap(innerFn, outerFn, self, tryLocsList) {
  3707. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  3708. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  3709. var generator = Object.create(protoGenerator.prototype);
  3710. var context = new Context(tryLocsList || []);
  3711. // The ._invoke method unifies the implementations of the .next,
  3712. // .throw, and .return methods.
  3713. generator._invoke = makeInvokeMethod(innerFn, self, context);
  3714. return generator;
  3715. }
  3716. runtime.wrap = wrap;
  3717. // Try/catch helper to minimize deoptimizations. Returns a completion
  3718. // record like context.tryEntries[i].completion. This interface could
  3719. // have been (and was previously) designed to take a closure to be
  3720. // invoked without arguments, but in all the cases we care about we
  3721. // already have an existing method we want to call, so there's no need
  3722. // to create a new function object. We can even get away with assuming
  3723. // the method takes exactly one argument, since that happens to be true
  3724. // in every case, so we don't have to touch the arguments object. The
  3725. // only additional allocation required is the completion record, which
  3726. // has a stable shape and so hopefully should be cheap to allocate.
  3727. function tryCatch(fn, obj, arg) {
  3728. try {
  3729. return { type: "normal", arg: fn.call(obj, arg) };
  3730. } catch (err) {
  3731. return { type: "throw", arg: err };
  3732. }
  3733. }
  3734. var GenStateSuspendedStart = "suspendedStart";
  3735. var GenStateSuspendedYield = "suspendedYield";
  3736. var GenStateExecuting = "executing";
  3737. var GenStateCompleted = "completed";
  3738. // Returning this object from the innerFn has the same effect as
  3739. // breaking out of the dispatch switch statement.
  3740. var ContinueSentinel = {};
  3741. // Dummy constructor functions that we use as the .constructor and
  3742. // .constructor.prototype properties for functions that return Generator
  3743. // objects. For full spec compliance, you may wish to configure your
  3744. // minifier not to mangle the names of these two functions.
  3745. function Generator() {}
  3746. function GeneratorFunction() {}
  3747. function GeneratorFunctionPrototype() {}
  3748. // This is a polyfill for %IteratorPrototype% for environments that
  3749. // don't natively support it.
  3750. var IteratorPrototype = {};
  3751. IteratorPrototype[iteratorSymbol] = function () {
  3752. return this;
  3753. };
  3754. var getProto = Object.getPrototypeOf;
  3755. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  3756. if (NativeIteratorPrototype &&
  3757. NativeIteratorPrototype !== Op &&
  3758. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  3759. // This environment has a native %IteratorPrototype%; use it instead
  3760. // of the polyfill.
  3761. IteratorPrototype = NativeIteratorPrototype;
  3762. }
  3763. var Gp = GeneratorFunctionPrototype.prototype =
  3764. Generator.prototype = Object.create(IteratorPrototype);
  3765. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  3766. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  3767. GeneratorFunctionPrototype[toStringTagSymbol] =
  3768. GeneratorFunction.displayName = "GeneratorFunction";
  3769. // Helper for defining the .next, .throw, and .return methods of the
  3770. // Iterator interface in terms of a single ._invoke method.
  3771. function defineIteratorMethods(prototype) {
  3772. ["next", "throw", "return"].forEach(function(method) {
  3773. prototype[method] = function(arg) {
  3774. return this._invoke(method, arg);
  3775. };
  3776. });
  3777. }
  3778. runtime.isGeneratorFunction = function(genFun) {
  3779. var ctor = typeof genFun === "function" && genFun.constructor;
  3780. return ctor
  3781. ? ctor === GeneratorFunction ||
  3782. // For the native GeneratorFunction constructor, the best we can
  3783. // do is to check its .name property.
  3784. (ctor.displayName || ctor.name) === "GeneratorFunction"
  3785. : false;
  3786. };
  3787. runtime.mark = function(genFun) {
  3788. if (Object.setPrototypeOf) {
  3789. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  3790. } else {
  3791. genFun.__proto__ = GeneratorFunctionPrototype;
  3792. if (!(toStringTagSymbol in genFun)) {
  3793. genFun[toStringTagSymbol] = "GeneratorFunction";
  3794. }
  3795. }
  3796. genFun.prototype = Object.create(Gp);
  3797. return genFun;
  3798. };
  3799. // Within the body of any async function, `await x` is transformed to
  3800. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  3801. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  3802. // meant to be awaited.
  3803. runtime.awrap = function(arg) {
  3804. return { __await: arg };
  3805. };
  3806. function AsyncIterator(generator) {
  3807. function invoke(method, arg, resolve, reject) {
  3808. var record = tryCatch(generator[method], generator, arg);
  3809. if (record.type === "throw") {
  3810. reject(record.arg);
  3811. } else {
  3812. var result = record.arg;
  3813. var value = result.value;
  3814. if (value &&
  3815. typeof value === "object" &&
  3816. hasOwn.call(value, "__await")) {
  3817. return Promise.resolve(value.__await).then(function(value) {
  3818. invoke("next", value, resolve, reject);
  3819. }, function(err) {
  3820. invoke("throw", err, resolve, reject);
  3821. });
  3822. }
  3823. return Promise.resolve(value).then(function(unwrapped) {
  3824. // When a yielded Promise is resolved, its final value becomes
  3825. // the .value of the Promise<{value,done}> result for the
  3826. // current iteration.
  3827. result.value = unwrapped;
  3828. resolve(result);
  3829. }, function(error) {
  3830. // If a rejected Promise was yielded, throw the rejection back
  3831. // into the async generator function so it can be handled there.
  3832. return invoke("throw", error, resolve, reject);
  3833. });
  3834. }
  3835. }
  3836. var previousPromise;
  3837. function enqueue(method, arg) {
  3838. function callInvokeWithMethodAndArg() {
  3839. return new Promise(function(resolve, reject) {
  3840. invoke(method, arg, resolve, reject);
  3841. });
  3842. }
  3843. return previousPromise =
  3844. // If enqueue has been called before, then we want to wait until
  3845. // all previous Promises have been resolved before calling invoke,
  3846. // so that results are always delivered in the correct order. If
  3847. // enqueue has not been called before, then it is important to
  3848. // call invoke immediately, without waiting on a callback to fire,
  3849. // so that the async generator function has the opportunity to do
  3850. // any necessary setup in a predictable way. This predictability
  3851. // is why the Promise constructor synchronously invokes its
  3852. // executor callback, and why async functions synchronously
  3853. // execute code before the first await. Since we implement simple
  3854. // async functions in terms of async generators, it is especially
  3855. // important to get this right, even though it requires care.
  3856. previousPromise ? previousPromise.then(
  3857. callInvokeWithMethodAndArg,
  3858. // Avoid propagating failures to Promises returned by later
  3859. // invocations of the iterator.
  3860. callInvokeWithMethodAndArg
  3861. ) : callInvokeWithMethodAndArg();
  3862. }
  3863. // Define the unified helper method that is used to implement .next,
  3864. // .throw, and .return (see defineIteratorMethods).
  3865. this._invoke = enqueue;
  3866. }
  3867. defineIteratorMethods(AsyncIterator.prototype);
  3868. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  3869. return this;
  3870. };
  3871. runtime.AsyncIterator = AsyncIterator;
  3872. // Note that simple async functions are implemented on top of
  3873. // AsyncIterator objects; they just return a Promise for the value of
  3874. // the final result produced by the iterator.
  3875. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  3876. var iter = new AsyncIterator(
  3877. wrap(innerFn, outerFn, self, tryLocsList)
  3878. );
  3879. return runtime.isGeneratorFunction(outerFn)
  3880. ? iter // If outerFn is a generator, return the full iterator.
  3881. : iter.next().then(function(result) {
  3882. return result.done ? result.value : iter.next();
  3883. });
  3884. };
  3885. function makeInvokeMethod(innerFn, self, context) {
  3886. var state = GenStateSuspendedStart;
  3887. return function invoke(method, arg) {
  3888. if (state === GenStateExecuting) {
  3889. throw new Error("Generator is already running");
  3890. }
  3891. if (state === GenStateCompleted) {
  3892. if (method === "throw") {
  3893. throw arg;
  3894. }
  3895. // Be forgiving, per 25.3.3.3.3 of the spec:
  3896. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  3897. return doneResult();
  3898. }
  3899. context.method = method;
  3900. context.arg = arg;
  3901. while (true) {
  3902. var delegate = context.delegate;
  3903. if (delegate) {
  3904. var delegateResult = maybeInvokeDelegate(delegate, context);
  3905. if (delegateResult) {
  3906. if (delegateResult === ContinueSentinel) continue;
  3907. return delegateResult;
  3908. }
  3909. }
  3910. if (context.method === "next") {
  3911. // Setting context._sent for legacy support of Babel's
  3912. // function.sent implementation.
  3913. context.sent = context._sent = context.arg;
  3914. } else if (context.method === "throw") {
  3915. if (state === GenStateSuspendedStart) {
  3916. state = GenStateCompleted;
  3917. throw context.arg;
  3918. }
  3919. context.dispatchException(context.arg);
  3920. } else if (context.method === "return") {
  3921. context.abrupt("return", context.arg);
  3922. }
  3923. state = GenStateExecuting;
  3924. var record = tryCatch(innerFn, self, context);
  3925. if (record.type === "normal") {
  3926. // If an exception is thrown from innerFn, we leave state ===
  3927. // GenStateExecuting and loop back for another invocation.
  3928. state = context.done
  3929. ? GenStateCompleted
  3930. : GenStateSuspendedYield;
  3931. if (record.arg === ContinueSentinel) {
  3932. continue;
  3933. }
  3934. return {
  3935. value: record.arg,
  3936. done: context.done
  3937. };
  3938. } else if (record.type === "throw") {
  3939. state = GenStateCompleted;
  3940. // Dispatch the exception by looping back around to the
  3941. // context.dispatchException(context.arg) call above.
  3942. context.method = "throw";
  3943. context.arg = record.arg;
  3944. }
  3945. }
  3946. };
  3947. }
  3948. // Call delegate.iterator[context.method](context.arg) and handle the
  3949. // result, either by returning a { value, done } result from the
  3950. // delegate iterator, or by modifying context.method and context.arg,
  3951. // setting context.delegate to null, and returning the ContinueSentinel.
  3952. function maybeInvokeDelegate(delegate, context) {
  3953. var method = delegate.iterator[context.method];
  3954. if (method === undefined) {
  3955. // A .throw or .return when the delegate iterator has no .throw
  3956. // method always terminates the yield* loop.
  3957. context.delegate = null;
  3958. if (context.method === "throw") {
  3959. if (delegate.iterator.return) {
  3960. // If the delegate iterator has a return method, give it a
  3961. // chance to clean up.
  3962. context.method = "return";
  3963. context.arg = undefined;
  3964. maybeInvokeDelegate(delegate, context);
  3965. if (context.method === "throw") {
  3966. // If maybeInvokeDelegate(context) changed context.method from
  3967. // "return" to "throw", let that override the TypeError below.
  3968. return ContinueSentinel;
  3969. }
  3970. }
  3971. context.method = "throw";
  3972. context.arg = new TypeError(
  3973. "The iterator does not provide a 'throw' method");
  3974. }
  3975. return ContinueSentinel;
  3976. }
  3977. var record = tryCatch(method, delegate.iterator, context.arg);
  3978. if (record.type === "throw") {
  3979. context.method = "throw";
  3980. context.arg = record.arg;
  3981. context.delegate = null;
  3982. return ContinueSentinel;
  3983. }
  3984. var info = record.arg;
  3985. if (! info) {
  3986. context.method = "throw";
  3987. context.arg = new TypeError("iterator result is not an object");
  3988. context.delegate = null;
  3989. return ContinueSentinel;
  3990. }
  3991. if (info.done) {
  3992. // Assign the result of the finished delegate to the temporary
  3993. // variable specified by delegate.resultName (see delegateYield).
  3994. context[delegate.resultName] = info.value;
  3995. // Resume execution at the desired location (see delegateYield).
  3996. context.next = delegate.nextLoc;
  3997. // If context.method was "throw" but the delegate handled the
  3998. // exception, let the outer generator proceed normally. If
  3999. // context.method was "next", forget context.arg since it has been
  4000. // "consumed" by the delegate iterator. If context.method was
  4001. // "return", allow the original .return call to continue in the
  4002. // outer generator.
  4003. if (context.method !== "return") {
  4004. context.method = "next";
  4005. context.arg = undefined;
  4006. }
  4007. } else {
  4008. // Re-yield the result returned by the delegate method.
  4009. return info;
  4010. }
  4011. // The delegate iterator is finished, so forget it and continue with
  4012. // the outer generator.
  4013. context.delegate = null;
  4014. return ContinueSentinel;
  4015. }
  4016. // Define Generator.prototype.{next,throw,return} in terms of the
  4017. // unified ._invoke helper method.
  4018. defineIteratorMethods(Gp);
  4019. Gp[toStringTagSymbol] = "Generator";
  4020. // A Generator should always return itself as the iterator object when the
  4021. // @@iterator function is called on it. Some browsers' implementations of the
  4022. // iterator prototype chain incorrectly implement this, causing the Generator
  4023. // object to not be returned from this call. This ensures that doesn't happen.
  4024. // See https://github.com/facebook/regenerator/issues/274 for more details.
  4025. Gp[iteratorSymbol] = function() {
  4026. return this;
  4027. };
  4028. Gp.toString = function() {
  4029. return "[object Generator]";
  4030. };
  4031. function pushTryEntry(locs) {
  4032. var entry = { tryLoc: locs[0] };
  4033. if (1 in locs) {
  4034. entry.catchLoc = locs[1];
  4035. }
  4036. if (2 in locs) {
  4037. entry.finallyLoc = locs[2];
  4038. entry.afterLoc = locs[3];
  4039. }
  4040. this.tryEntries.push(entry);
  4041. }
  4042. function resetTryEntry(entry) {
  4043. var record = entry.completion || {};
  4044. record.type = "normal";
  4045. delete record.arg;
  4046. entry.completion = record;
  4047. }
  4048. function Context(tryLocsList) {
  4049. // The root entry object (effectively a try statement without a catch
  4050. // or a finally block) gives us a place to store values thrown from
  4051. // locations where there is no enclosing try statement.
  4052. this.tryEntries = [{ tryLoc: "root" }];
  4053. tryLocsList.forEach(pushTryEntry, this);
  4054. this.reset(true);
  4055. }
  4056. runtime.keys = function(object) {
  4057. var keys = [];
  4058. for (var key in object) {
  4059. keys.push(key);
  4060. }
  4061. keys.reverse();
  4062. // Rather than returning an object with a next method, we keep
  4063. // things simple and return the next function itself.
  4064. return function next() {
  4065. while (keys.length) {
  4066. var key = keys.pop();
  4067. if (key in object) {
  4068. next.value = key;
  4069. next.done = false;
  4070. return next;
  4071. }
  4072. }
  4073. // To avoid creating an additional object, we just hang the .value
  4074. // and .done properties off the next function object itself. This
  4075. // also ensures that the minifier will not anonymize the function.
  4076. next.done = true;
  4077. return next;
  4078. };
  4079. };
  4080. function values(iterable) {
  4081. if (iterable) {
  4082. var iteratorMethod = iterable[iteratorSymbol];
  4083. if (iteratorMethod) {
  4084. return iteratorMethod.call(iterable);
  4085. }
  4086. if (typeof iterable.next === "function") {
  4087. return iterable;
  4088. }
  4089. if (!isNaN(iterable.length)) {
  4090. var i = -1, next = function next() {
  4091. while (++i < iterable.length) {
  4092. if (hasOwn.call(iterable, i)) {
  4093. next.value = iterable[i];
  4094. next.done = false;
  4095. return next;
  4096. }
  4097. }
  4098. next.value = undefined;
  4099. next.done = true;
  4100. return next;
  4101. };
  4102. return next.next = next;
  4103. }
  4104. }
  4105. // Return an iterator with no values.
  4106. return { next: doneResult };
  4107. }
  4108. runtime.values = values;
  4109. function doneResult() {
  4110. return { value: undefined, done: true };
  4111. }
  4112. Context.prototype = {
  4113. constructor: Context,
  4114. reset: function(skipTempReset) {
  4115. this.prev = 0;
  4116. this.next = 0;
  4117. // Resetting context._sent for legacy support of Babel's
  4118. // function.sent implementation.
  4119. this.sent = this._sent = undefined;
  4120. this.done = false;
  4121. this.delegate = null;
  4122. this.method = "next";
  4123. this.arg = undefined;
  4124. this.tryEntries.forEach(resetTryEntry);
  4125. if (!skipTempReset) {
  4126. for (var name in this) {
  4127. // Not sure about the optimal order of these conditions:
  4128. if (name.charAt(0) === "t" &&
  4129. hasOwn.call(this, name) &&
  4130. !isNaN(+name.slice(1))) {
  4131. this[name] = undefined;
  4132. }
  4133. }
  4134. }
  4135. },
  4136. stop: function() {
  4137. this.done = true;
  4138. var rootEntry = this.tryEntries[0];
  4139. var rootRecord = rootEntry.completion;
  4140. if (rootRecord.type === "throw") {
  4141. throw rootRecord.arg;
  4142. }
  4143. return this.rval;
  4144. },
  4145. dispatchException: function(exception) {
  4146. if (this.done) {
  4147. throw exception;
  4148. }
  4149. var context = this;
  4150. function handle(loc, caught) {
  4151. record.type = "throw";
  4152. record.arg = exception;
  4153. context.next = loc;
  4154. if (caught) {
  4155. // If the dispatched exception was caught by a catch block,
  4156. // then let that catch block handle the exception normally.
  4157. context.method = "next";
  4158. context.arg = undefined;
  4159. }
  4160. return !! caught;
  4161. }
  4162. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  4163. var entry = this.tryEntries[i];
  4164. var record = entry.completion;
  4165. if (entry.tryLoc === "root") {
  4166. // Exception thrown outside of any try block that could handle
  4167. // it, so set the completion value of the entire function to
  4168. // throw the exception.
  4169. return handle("end");
  4170. }
  4171. if (entry.tryLoc <= this.prev) {
  4172. var hasCatch = hasOwn.call(entry, "catchLoc");
  4173. var hasFinally = hasOwn.call(entry, "finallyLoc");
  4174. if (hasCatch && hasFinally) {
  4175. if (this.prev < entry.catchLoc) {
  4176. return handle(entry.catchLoc, true);
  4177. } else if (this.prev < entry.finallyLoc) {
  4178. return handle(entry.finallyLoc);
  4179. }
  4180. } else if (hasCatch) {
  4181. if (this.prev < entry.catchLoc) {
  4182. return handle(entry.catchLoc, true);
  4183. }
  4184. } else if (hasFinally) {
  4185. if (this.prev < entry.finallyLoc) {
  4186. return handle(entry.finallyLoc);
  4187. }
  4188. } else {
  4189. throw new Error("try statement without catch or finally");
  4190. }
  4191. }
  4192. }
  4193. },
  4194. abrupt: function(type, arg) {
  4195. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  4196. var entry = this.tryEntries[i];
  4197. if (entry.tryLoc <= this.prev &&
  4198. hasOwn.call(entry, "finallyLoc") &&
  4199. this.prev < entry.finallyLoc) {
  4200. var finallyEntry = entry;
  4201. break;
  4202. }
  4203. }
  4204. if (finallyEntry &&
  4205. (type === "break" ||
  4206. type === "continue") &&
  4207. finallyEntry.tryLoc <= arg &&
  4208. arg <= finallyEntry.finallyLoc) {
  4209. // Ignore the finally entry if control is not jumping to a
  4210. // location outside the try/catch block.
  4211. finallyEntry = null;
  4212. }
  4213. var record = finallyEntry ? finallyEntry.completion : {};
  4214. record.type = type;
  4215. record.arg = arg;
  4216. if (finallyEntry) {
  4217. this.method = "next";
  4218. this.next = finallyEntry.finallyLoc;
  4219. return ContinueSentinel;
  4220. }
  4221. return this.complete(record);
  4222. },
  4223. complete: function(record, afterLoc) {
  4224. if (record.type === "throw") {
  4225. throw record.arg;
  4226. }
  4227. if (record.type === "break" ||
  4228. record.type === "continue") {
  4229. this.next = record.arg;
  4230. } else if (record.type === "return") {
  4231. this.rval = this.arg = record.arg;
  4232. this.method = "return";
  4233. this.next = "end";
  4234. } else if (record.type === "normal" && afterLoc) {
  4235. this.next = afterLoc;
  4236. }
  4237. return ContinueSentinel;
  4238. },
  4239. finish: function(finallyLoc) {
  4240. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  4241. var entry = this.tryEntries[i];
  4242. if (entry.finallyLoc === finallyLoc) {
  4243. this.complete(entry.completion, entry.afterLoc);
  4244. resetTryEntry(entry);
  4245. return ContinueSentinel;
  4246. }
  4247. }
  4248. },
  4249. "catch": function(tryLoc) {
  4250. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  4251. var entry = this.tryEntries[i];
  4252. if (entry.tryLoc === tryLoc) {
  4253. var record = entry.completion;
  4254. if (record.type === "throw") {
  4255. var thrown = record.arg;
  4256. resetTryEntry(entry);
  4257. }
  4258. return thrown;
  4259. }
  4260. }
  4261. // The context.catch method must only be called with a location
  4262. // argument that corresponds to a known catch block.
  4263. throw new Error("illegal catch attempt");
  4264. },
  4265. delegateYield: function(iterable, resultName, nextLoc) {
  4266. this.delegate = {
  4267. iterator: values(iterable),
  4268. resultName: resultName,
  4269. nextLoc: nextLoc
  4270. };
  4271. if (this.method === "next") {
  4272. // Deliberately forget the last sent value so that we don't
  4273. // accidentally pass it on to the delegate.
  4274. this.arg = undefined;
  4275. }
  4276. return ContinueSentinel;
  4277. }
  4278. };
  4279. })(
  4280. // In sloppy mode, unbound `this` refers to the global object, fallback to
  4281. // Function constructor if we're in global strict mode. That is sadly a form
  4282. // of indirect eval which violates Content Security Policy.
  4283. (function() {
  4284. return this || (typeof self === "object" && self);
  4285. })() || Function("return this")()
  4286. );
  4287. /***/ }),
  4288. /***/ 18:
  4289. /*!****************************************************************************!*\
  4290. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/adapters/index.js ***!
  4291. \****************************************************************************/
  4292. /*! no static exports found */
  4293. /***/ (function(module, exports, __webpack_require__) {
  4294. "use strict";
  4295. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _buildURL = _interopRequireDefault(__webpack_require__(/*! ../helpers/buildURL */ 19));
  4296. var _buildFullPath = _interopRequireDefault(__webpack_require__(/*! ../core/buildFullPath */ 21));
  4297. var _settle = _interopRequireDefault(__webpack_require__(/*! ../core/settle */ 24));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;}
  4298. /**
  4299. * 返回可选值存在的配置
  4300. * @param {Array} keys - 可选值数组
  4301. * @param {Object} config2 - 配置
  4302. * @return {{}} - 存在的配置项
  4303. */
  4304. var mergeKeys = function mergeKeys(keys, config2) {
  4305. var config = {};
  4306. keys.forEach(function (prop) {
  4307. if (typeof config2[prop] !== 'undefined') {
  4308. config[prop] = config2[prop];
  4309. }
  4310. });
  4311. return config;
  4312. };var _default =
  4313. function _default(config) {
  4314. return new Promise(function (resolve, reject) {
  4315. var _config = {
  4316. url: (0, _buildURL.default)((0, _buildFullPath.default)(config.baseURL, config.url), config.params),
  4317. header: config.header,
  4318. complete: function complete(response) {
  4319. response.config = config;
  4320. try {
  4321. // 对可能字符串不是json 的情况容错
  4322. if (typeof response.data === 'string') {
  4323. response.data = JSON.parse(response.data);
  4324. }
  4325. // eslint-disable-next-line no-empty
  4326. } catch (e) {
  4327. }
  4328. (0, _settle.default)(resolve, reject, response);
  4329. } };
  4330. var requestTask;
  4331. if (config.method === 'UPLOAD') {
  4332. delete _config.header['content-type'];
  4333. delete _config.header['Content-Type'];
  4334. var otherConfig = {
  4335. filePath: config.filePath,
  4336. name: config.name };
  4337. var optionalKeys = [
  4338. 'formData'];
  4339. requestTask = uni.uploadFile(_objectSpread({}, _config, {}, otherConfig, {}, mergeKeys(optionalKeys, config)));
  4340. } else if (config.method === 'DOWNLOAD') {
  4341. requestTask = uni.downloadFile(_config);
  4342. } else {
  4343. var _optionalKeys = [
  4344. 'data',
  4345. 'method',
  4346. 'timeout',
  4347. 'dataType',
  4348. 'responseType'];
  4349. requestTask = uni.request(_objectSpread({}, _config, {}, mergeKeys(_optionalKeys, config)));
  4350. }
  4351. if (config.getTask) {
  4352. config.getTask(requestTask, config);
  4353. }
  4354. });
  4355. };exports.default = _default;
  4356. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  4357. /***/ }),
  4358. /***/ 180:
  4359. /*!*************************************************!*\
  4360. !*** D:/wwwroot/forest/js_sdk/jweixin-1.4.0.js ***!
  4361. \*************************************************/
  4362. /*! no static exports found */
  4363. /***/ (function(module, exports, __webpack_require__) {
  4364. var __WEBPACK_AMD_DEFINE_RESULT__;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 (e, n) { true ? !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {return n(e);}).call(exports, __webpack_require__, exports, module),
  4365. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;}(window, function (e, n) {function i(n, i, t) {e.WeixinJSBridge ? WeixinJSBridge.invoke(n, o(i), function (e) {c(n, e, t);}) : u(n, t);}function t(n, i, t) {e.WeixinJSBridge ? WeixinJSBridge.on(n, function (e) {t && t.trigger && t.trigger(e), c(n, e, i);}) : t ? u(n, t) : u(n, i);}function o(e) {return e = e || {}, e.appId = C.appId, e.verifyAppId = C.appId, e.verifySignType = "sha1", e.verifyTimestamp = C.timestamp + "", e.verifyNonceStr = C.nonceStr, e.verifySignature = C.signature, e;}function r(e) {return { timeStamp: e.timestamp + "", nonceStr: e.nonceStr, package: e.package, paySign: e.paySign, signType: e.signType || "SHA1" };}function a(e) {return e.postalCode = e.addressPostalCode, delete e.addressPostalCode, e.provinceName = e.proviceFirstStageName, delete e.proviceFirstStageName, e.cityName = e.addressCitySecondStageName, delete e.addressCitySecondStageName, e.countryName = e.addressCountiesThirdStageName, delete e.addressCountiesThirdStageName, e.detailInfo = e.addressDetailInfo, delete e.addressDetailInfo, e;}function c(e, n, i) {"openEnterpriseChat" == e && (n.errCode = n.err_code), delete n.err_code, delete n.err_desc, delete n.err_detail;var t = n.errMsg;t || (t = n.err_msg, delete n.err_msg, t = s(e, t), n.errMsg = t), (i = i || {})._complete && (i._complete(n), delete i._complete), t = n.errMsg || "", C.debug && !i.isInnerInvoke && alert(JSON.stringify(n));var o = t.indexOf(":");switch (t.substring(o + 1)) {case "ok":i.success && i.success(n);break;case "cancel":i.cancel && i.cancel(n);break;default:i.fail && i.fail(n);}i.complete && i.complete(n);}function s(e, n) {var i = e,t = v[i];t && (i = t);var o = "ok";if (n) {var r = n.indexOf(":");"confirm" == (o = n.substring(r + 1)) && (o = "ok"), "failed" == o && (o = "fail"), -1 != o.indexOf("failed_") && (o = o.substring(7)), -1 != o.indexOf("fail_") && (o = o.substring(5)), "access denied" != (o = (o = o.replace(/_/g, " ")).toLowerCase()) && "no permission to execute" != o || (o = "permission denied"), "config" == i && "function not exist" == o && (o = "ok"), "" == o && (o = "fail");}return n = i + ":" + o;}function d(e) {if (e) {for (var n = 0, i = e.length; n < i; ++n) {var t = e[n],o = h[t];o && (e[n] = o);}return e;}}function u(e, n) {if (!(!C.debug || n && n.isInnerInvoke)) {var i = v[e];i && (e = i), n && n._complete && delete n._complete, console.log('"' + e + '",', n || "");}}function l(e) {if (!(k || w || C.debug || x < "6.0.2" || V.systemType < 0)) {var n = new Image();V.appId = C.appId, V.initTime = A.initEndTime - A.initStartTime, V.preVerifyTime = A.preVerifyEndTime - A.preVerifyStartTime, N.getNetworkType({ isInnerInvoke: !0, success: function success(e) {V.networkType = e.networkType;var i = "https://open.weixin.qq.com/sdk/report?v=" + V.version + "&o=" + V.isPreVerifyOk + "&s=" + V.systemType + "&c=" + V.clientVersion + "&a=" + V.appId + "&n=" + V.networkType + "&i=" + V.initTime + "&p=" + V.preVerifyTime + "&u=" + V.url;n.src = i;} });}}function p() {return new Date().getTime();}function f(n) {T && (e.WeixinJSBridge ? n() : S.addEventListener && S.addEventListener("WeixinJSBridgeReady", n, !1));}function m() {N.invoke || (N.invoke = function (n, i, t) {e.WeixinJSBridge && WeixinJSBridge.invoke(n, o(i), t);}, N.on = function (n, i) {e.WeixinJSBridge && WeixinJSBridge.on(n, i);});}function g(e) {if ("string" == typeof e && e.length > 0) {var n = e.split("?")[0],i = e.split("?")[1];return n += ".html", void 0 !== i ? n + "?" + i : n;}}if (!e.jWeixin) {var _N;var h = { config: "preVerifyJSAPI", onMenuShareTimeline: "menu:share:timeline", onMenuShareAppMessage: "menu:share:appmessage", onMenuShareQQ: "menu:share:qq", onMenuShareWeibo: "menu:share:weiboApp", onMenuShareQZone: "menu:share:QZone", previewImage: "imagePreview", getLocation: "geoLocation", openProductSpecificView: "openProductViewWithPid", addCard: "batchAddCard", openCard: "batchViewCard", chooseWXPay: "getBrandWCPayRequest", openEnterpriseRedPacket: "getRecevieBizHongBaoRequest", startSearchBeacons: "startMonitoringBeacons", stopSearchBeacons: "stopMonitoringBeacons", onSearchBeacons: "onBeaconsInRange", consumeAndShareCard: "consumedShareCard", openAddress: "editAddress" },v = function () {var e = {};for (var n in h) {e[h[n]] = n;}return e;}(),S = e.document,I = S.title,y = navigator.userAgent.toLowerCase(),_ = navigator.platform.toLowerCase(),k = !(!_.match("mac") && !_.match("win")),w = -1 != y.indexOf("wxdebugger"),T = -1 != y.indexOf("micromessenger"),M = -1 != y.indexOf("android"),P = -1 != y.indexOf("iphone") || -1 != y.indexOf("ipad"),x = function () {var e = y.match(/micromessenger\/(\d+\.\d+\.\d+)/) || y.match(/micromessenger\/(\d+\.\d+)/);return e ? e[1] : "";}(),A = { initStartTime: p(), initEndTime: 0, preVerifyStartTime: 0, preVerifyEndTime: 0 },V = { version: 1, appId: "", initTime: 0, preVerifyTime: 0, networkType: "", isPreVerifyOk: 1, systemType: P ? 1 : M ? 2 : -1, clientVersion: x, url: encodeURIComponent(location.href) },C = {},L = { _completes: [] },B = { state: 0, data: {} };f(function () {A.initEndTime = p();});var O = !1,E = [],N = (_N = { config: function config(e) {C = e, u("config", e);var n = !1 !== C.check;f(function () {if (n) i(h.config, { verifyJsApiList: d(C.jsApiList) }, function () {L._complete = function (e) {A.preVerifyEndTime = p(), B.state = 1, B.data = e;}, L.success = function (e) {V.isPreVerifyOk = 0;}, L.fail = function (e) {L._fail ? L._fail(e) : B.state = -1;};var e = L._completes;return e.push(function () {l();}), L.complete = function (n) {for (var i = 0, t = e.length; i < t; ++i) {e[i]();}L._completes = [];}, L;}()), A.preVerifyStartTime = p();else {B.state = 1;for (var e = L._completes, t = 0, o = e.length; t < o; ++t) {e[t]();}L._completes = [];}}), m();}, ready: function ready(e) {0 != B.state ? e() : (L._completes.push(e), !T && C.debug && e());}, error: function error(e) {x < "6.0.2" || (-1 == B.state ? e(B.data) : L._fail = e);}, checkJsApi: function checkJsApi(e) {var n = function n(e) {var n = e.checkResult;for (var i in n) {var t = v[i];t && (n[t] = n[i], delete n[i]);}return e;};i("checkJsApi", { jsApiList: d(e.jsApiList) }, (e._complete = function (e) {if (M) {var i = e.checkResult;i && (e.checkResult = JSON.parse(i));}e = n(e);}, e));}, onMenuShareTimeline: function onMenuShareTimeline(e) {t(h.onMenuShareTimeline, { complete: function complete() {i("shareTimeline", { title: e.title || I, desc: e.title || I, img_url: e.imgUrl || "", link: e.link || location.href, type: e.type || "link", data_url: e.dataUrl || "" }, e);} }, e);}, onMenuShareAppMessage: function onMenuShareAppMessage(e) {t(h.onMenuShareAppMessage, { complete: function complete(n) {"favorite" === n.scene ? i("sendAppMessage", { title: e.title || I, desc: e.desc || "", link: e.link || location.href, img_url: e.imgUrl || "", type: e.type || "link", data_url: e.dataUrl || "" }) : i("sendAppMessage", { title: e.title || I, desc: e.desc || "", link: e.link || location.href, img_url: e.imgUrl || "", type: e.type || "link", data_url: e.dataUrl || "" }, e);} }, e);}, onMenuShareQQ: function onMenuShareQQ(e) {t(h.onMenuShareQQ, { complete: function complete() {i("shareQQ", { title: e.title || I, desc: e.desc || "", img_url: e.imgUrl || "", link: e.link || location.href }, e);} }, e);}, onMenuShareWeibo: function onMenuShareWeibo(e) {t(h.onMenuShareWeibo, { complete: function complete() {i("shareWeiboApp", { title: e.title || I, desc: e.desc || "", img_url: e.imgUrl || "", link: e.link || location.href }, e);} }, e);}, onMenuShareQZone: function onMenuShareQZone(e) {t(h.onMenuShareQZone, { complete: function complete() {i("shareQZone", { title: e.title || I, desc: e.desc || "", img_url: e.imgUrl || "", link: e.link || location.href }, e);} }, e);}, updateTimelineShareData: function updateTimelineShareData(e) {i("updateTimelineShareData", { title: e.title, link: e.link, imgUrl: e.imgUrl }, e);}, updateAppMessageShareData: function updateAppMessageShareData(e) {i("updateAppMessageShareData", { title: e.title, desc: e.desc, link: e.link, imgUrl: e.imgUrl }, e);}, startRecord: function startRecord(e) {i("startRecord", {}, e);}, stopRecord: function stopRecord(e) {i("stopRecord", {}, e);}, onVoiceRecordEnd: function onVoiceRecordEnd(e) {t("onVoiceRecordEnd", e);}, playVoice: function playVoice(e) {i("playVoice", { localId: e.localId }, e);}, pauseVoice: function pauseVoice(e) {i("pauseVoice", { localId: e.localId }, e);}, stopVoice: function stopVoice(e) {i("stopVoice", { localId: e.localId }, e);}, onVoicePlayEnd: function onVoicePlayEnd(e) {t("onVoicePlayEnd", e);}, uploadVoice: function uploadVoice(e) {i("uploadVoice", { localId: e.localId, isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 }, e);}, downloadVoice: function downloadVoice(e) {i("downloadVoice", { serverId: e.serverId, isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 }, e);}, translateVoice: function translateVoice(e) {i("translateVoice", { localId: e.localId, isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 }, e);}, chooseImage: function chooseImage(e) {i("chooseImage", { scene: "1|2", count: e.count || 9, sizeType: e.sizeType || ["original", "compressed"], sourceType: e.sourceType || ["album", "camera"] }, (e._complete = function (e) {if (M) {var n = e.localIds;try {n && (e.localIds = JSON.parse(n));} catch (e) {}}}, e));}, getLocation: function getLocation(e) {}, previewImage: function previewImage(e) {i(h.previewImage, { current: e.current, urls: e.urls }, e);}, uploadImage: function uploadImage(e) {i("uploadImage", { localId: e.localId, isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 }, e);}, downloadImage: function downloadImage(e) {i("downloadImage", { serverId: e.serverId, isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 }, e);}, getLocalImgData: function getLocalImgData(e) {!1 === O ? (O = !0, i("getLocalImgData", { localId: e.localId }, (e._complete = function (e) {if (O = !1, E.length > 0) {var n = E.shift();wx.getLocalImgData(n);}}, e))) : E.push(e);}, getNetworkType: function getNetworkType(e) {var n = function n(e) {var n = e.errMsg;e.errMsg = "getNetworkType:ok";var i = e.subtype;if (delete e.subtype, i) e.networkType = i;else {var t = n.indexOf(":"),o = n.substring(t + 1);switch (o) {case "wifi":case "edge":case "wwan":e.networkType = o;break;default:e.errMsg = "getNetworkType:fail";}}return e;};i("getNetworkType", {}, (e._complete = function (e) {e = n(e);}, e));}, openLocation: function openLocation(e) {i("openLocation", { latitude: e.latitude, longitude: e.longitude, name: e.name || "", address: e.address || "", scale: e.scale || 28, infoUrl: e.infoUrl || "" }, e);} }, _defineProperty(_N, "getLocation", function getLocation(e) {e = e || {}, i(h.getLocation, { type: e.type || "wgs84" }, (e._complete = function (e) {delete e.type;}, e));}), _defineProperty(_N, "hideOptionMenu", function hideOptionMenu(e) {i("hideOptionMenu", {}, e);}), _defineProperty(_N, "showOptionMenu", function showOptionMenu(e) {i("showOptionMenu", {}, e);}), _defineProperty(_N, "closeWindow", function closeWindow(e) {i("closeWindow", {}, e = e || {});}), _defineProperty(_N, "hideMenuItems", function hideMenuItems(e) {i("hideMenuItems", { menuList: e.menuList }, e);}), _defineProperty(_N, "showMenuItems", function showMenuItems(e) {i("showMenuItems", { menuList: e.menuList }, e);}), _defineProperty(_N, "hideAllNonBaseMenuItem", function hideAllNonBaseMenuItem(e) {i("hideAllNonBaseMenuItem", {}, e);}), _defineProperty(_N, "showAllNonBaseMenuItem", function showAllNonBaseMenuItem(e) {i("showAllNonBaseMenuItem", {}, e);}), _defineProperty(_N, "scanQRCode", function scanQRCode(e) {i("scanQRCode", { needResult: (e = e || {}).needResult || 0, scanType: e.scanType || ["qrCode", "barCode"] }, (e._complete = function (e) {if (P) {var n = e.resultStr;if (n) {var i = JSON.parse(n);e.resultStr = i && i.scan_code && i.scan_code.scan_result;}}}, e));}), _defineProperty(_N, "openAddress", function openAddress(e) {i(h.openAddress, {}, (e._complete = function (e) {e = a(e);}, e));}), _defineProperty(_N, "openProductSpecificView", function openProductSpecificView(e) {i(h.openProductSpecificView, { pid: e.productId, view_type: e.viewType || 0, ext_info: e.extInfo }, e);}), _defineProperty(_N, "addCard", function addCard(e) {for (var n = e.cardList, t = [], o = 0, r = n.length; o < r; ++o) {var a = n[o],c = { card_id: a.cardId, card_ext: a.cardExt };t.push(c);}i(h.addCard, { card_list: t }, (e._complete = function (e) {var n = e.card_list;if (n) {for (var i = 0, t = (n = JSON.parse(n)).length; i < t; ++i) {var o = n[i];o.cardId = o.card_id, o.cardExt = o.card_ext, o.isSuccess = !!o.is_succ, delete o.card_id, delete o.card_ext, delete o.is_succ;}e.cardList = n, delete e.card_list;}}, e));}), _defineProperty(_N, "chooseCard", function chooseCard(e) {i("chooseCard", { app_id: C.appId, location_id: e.shopId || "", sign_type: e.signType || "SHA1", card_id: e.cardId || "", card_type: e.cardType || "", card_sign: e.cardSign, time_stamp: e.timestamp + "", nonce_str: e.nonceStr }, (e._complete = function (e) {e.cardList = e.choose_card_info, delete e.choose_card_info;}, e));}), _defineProperty(_N, "openCard", function openCard(e) {for (var n = e.cardList, t = [], o = 0, r = n.length; o < r; ++o) {var a = n[o],c = { card_id: a.cardId, code: a.code };t.push(c);}i(h.openCard, { card_list: t }, e);}), _defineProperty(_N, "consumeAndShareCard", function consumeAndShareCard(e) {i(h.consumeAndShareCard, { consumedCardId: e.cardId, consumedCode: e.code }, e);}), _defineProperty(_N, "chooseWXPay", function chooseWXPay(e) {i(h.chooseWXPay, r(e), e);}), _defineProperty(_N, "openEnterpriseRedPacket", function openEnterpriseRedPacket(e) {i(h.openEnterpriseRedPacket, r(e), e);}), _defineProperty(_N, "startSearchBeacons", function startSearchBeacons(e) {i(h.startSearchBeacons, { ticket: e.ticket }, e);}), _defineProperty(_N, "stopSearchBeacons", function stopSearchBeacons(e) {i(h.stopSearchBeacons, {}, e);}), _defineProperty(_N, "onSearchBeacons", function onSearchBeacons(e) {t(h.onSearchBeacons, e);}), _defineProperty(_N, "openEnterpriseChat", function openEnterpriseChat(e) {i("openEnterpriseChat", { useridlist: e.userIds, chatname: e.groupName }, e);}), _defineProperty(_N, "launchMiniProgram", function launchMiniProgram(e) {i("launchMiniProgram", { targetAppId: e.targetAppId, path: g(e.path), envVersion: e.envVersion }, e);}), _defineProperty(_N, "miniProgram", { navigateBack: function navigateBack(e) {e = e || {}, f(function () {i("invokeMiniProgramAPI", { name: "navigateBack", arg: { delta: e.delta || 1 } }, e);});}, navigateTo: function navigateTo(e) {f(function () {i("invokeMiniProgramAPI", { name: "navigateTo", arg: { url: e.url } }, e);});}, redirectTo: function redirectTo(e) {f(function () {i("invokeMiniProgramAPI", { name: "redirectTo", arg: { url: e.url } }, e);});}, switchTab: function switchTab(e) {f(function () {i("invokeMiniProgramAPI", { name: "switchTab", arg: { url: e.url } }, e);});}, reLaunch: function reLaunch(e) {f(function () {i("invokeMiniProgramAPI", { name: "reLaunch", arg: { url: e.url } }, e);});}, postMessage: function postMessage(e) {f(function () {i("invokeMiniProgramAPI", { name: "postMessage", arg: e.data || {} }, e);});}, getEnv: function getEnv(n) {f(function () {n({ miniprogram: "miniprogram" === e.__wxjs_environment });});} }), _N),b = 1,R = {};return S.addEventListener("error", function (e) {if (!M) {var n = e.target,i = n.tagName,t = n.src;if (("IMG" == i || "VIDEO" == i || "AUDIO" == i || "SOURCE" == i) && -1 != t.indexOf("wxlocalresource://")) {e.preventDefault(), e.stopPropagation();var o = n["wx-id"];if (o || (o = b++, n["wx-id"] = o), R[o]) return;R[o] = !0, wx.ready(function () {wx.getLocalImgData({ localId: t, success: function success(e) {n.src = e.localData;} });});}}}, !0), S.addEventListener("load", function (e) {if (!M) {var n = e.target,i = n.tagName;n.src;if ("IMG" == i || "VIDEO" == i || "AUDIO" == i || "SOURCE" == i) {var t = n["wx-id"];t && (R[t] = !1);}}}, !0), n && (e.wx = e.jWeixin = N), N;}});
  4366. /***/ }),
  4367. /***/ 19:
  4368. /*!******************************************************************************!*\
  4369. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/helpers/buildURL.js ***!
  4370. \******************************************************************************/
  4371. /*! no static exports found */
  4372. /***/ (function(module, exports, __webpack_require__) {
  4373. "use strict";
  4374. Object.defineProperty(exports, "__esModule", { value: true });exports.default = buildURL;
  4375. var utils = _interopRequireWildcard(__webpack_require__(/*! ./../utils */ 20));function _getRequireWildcardCache() {if (typeof WeakMap !== "function") return null;var cache = new WeakMap();_getRequireWildcardCache = function _getRequireWildcardCache() {return cache;};return cache;}function _interopRequireWildcard(obj) {if (obj && obj.__esModule) {return obj;}if (obj === null || typeof obj !== "object" && typeof obj !== "function") {return { default: obj };}var cache = _getRequireWildcardCache();if (cache && cache.has(obj)) {return cache.get(obj);}var newObj = {};var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;for (var key in obj) {if (Object.prototype.hasOwnProperty.call(obj, key)) {var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;if (desc && (desc.get || desc.set)) {Object.defineProperty(newObj, key, desc);} else {newObj[key] = obj[key];}}}newObj.default = obj;if (cache) {cache.set(obj, newObj);}return newObj;}
  4376. function encode(val) {
  4377. return encodeURIComponent(val).
  4378. replace(/%40/gi, '@').
  4379. replace(/%3A/gi, ':').
  4380. replace(/%24/g, '$').
  4381. replace(/%2C/gi, ',').
  4382. replace(/%20/g, '+').
  4383. replace(/%5B/gi, '[').
  4384. replace(/%5D/gi, ']');
  4385. }
  4386. /**
  4387. * Build a URL by appending params to the end
  4388. *
  4389. * @param {string} url The base of the url (e.g., http://www.google.com)
  4390. * @param {object} [params] The params to be appended
  4391. * @returns {string} The formatted url
  4392. */
  4393. function buildURL(url, params) {
  4394. /*eslint no-param-reassign:0*/
  4395. if (!params) {
  4396. return url;
  4397. }
  4398. var serializedParams;
  4399. if (utils.isURLSearchParams(params)) {
  4400. serializedParams = params.toString();
  4401. } else {
  4402. var parts = [];
  4403. utils.forEach(params, function serialize(val, key) {
  4404. if (val === null || typeof val === 'undefined') {
  4405. return;
  4406. }
  4407. if (utils.isArray(val)) {
  4408. key = key + '[]';
  4409. } else {
  4410. val = [val];
  4411. }
  4412. utils.forEach(val, function parseValue(v) {
  4413. if (utils.isDate(v)) {
  4414. v = v.toISOString();
  4415. } else if (utils.isObject(v)) {
  4416. v = JSON.stringify(v);
  4417. }
  4418. parts.push(encode(key) + '=' + encode(v));
  4419. });
  4420. });
  4421. serializedParams = parts.join('&');
  4422. }
  4423. if (serializedParams) {
  4424. var hashmarkIndex = url.indexOf('#');
  4425. if (hashmarkIndex !== -1) {
  4426. url = url.slice(0, hashmarkIndex);
  4427. }
  4428. url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  4429. }
  4430. return url;
  4431. }
  4432. /***/ }),
  4433. /***/ 2:
  4434. /*!******************************************************************************************!*\
  4435. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  4436. \******************************************************************************************/
  4437. /*! exports provided: default */
  4438. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4439. "use strict";
  4440. __webpack_require__.r(__webpack_exports__);
  4441. /* WEBPACK VAR INJECTION */(function(global) {/*!
  4442. * Vue.js v2.6.11
  4443. * (c) 2014-2020 Evan You
  4444. * Released under the MIT License.
  4445. */
  4446. /* */
  4447. var emptyObject = Object.freeze({});
  4448. // These helpers produce better VM code in JS engines due to their
  4449. // explicitness and function inlining.
  4450. function isUndef (v) {
  4451. return v === undefined || v === null
  4452. }
  4453. function isDef (v) {
  4454. return v !== undefined && v !== null
  4455. }
  4456. function isTrue (v) {
  4457. return v === true
  4458. }
  4459. function isFalse (v) {
  4460. return v === false
  4461. }
  4462. /**
  4463. * Check if value is primitive.
  4464. */
  4465. function isPrimitive (value) {
  4466. return (
  4467. typeof value === 'string' ||
  4468. typeof value === 'number' ||
  4469. // $flow-disable-line
  4470. typeof value === 'symbol' ||
  4471. typeof value === 'boolean'
  4472. )
  4473. }
  4474. /**
  4475. * Quick object check - this is primarily used to tell
  4476. * Objects from primitive values when we know the value
  4477. * is a JSON-compliant type.
  4478. */
  4479. function isObject (obj) {
  4480. return obj !== null && typeof obj === 'object'
  4481. }
  4482. /**
  4483. * Get the raw type string of a value, e.g., [object Object].
  4484. */
  4485. var _toString = Object.prototype.toString;
  4486. function toRawType (value) {
  4487. return _toString.call(value).slice(8, -1)
  4488. }
  4489. /**
  4490. * Strict object type check. Only returns true
  4491. * for plain JavaScript objects.
  4492. */
  4493. function isPlainObject (obj) {
  4494. return _toString.call(obj) === '[object Object]'
  4495. }
  4496. function isRegExp (v) {
  4497. return _toString.call(v) === '[object RegExp]'
  4498. }
  4499. /**
  4500. * Check if val is a valid array index.
  4501. */
  4502. function isValidArrayIndex (val) {
  4503. var n = parseFloat(String(val));
  4504. return n >= 0 && Math.floor(n) === n && isFinite(val)
  4505. }
  4506. function isPromise (val) {
  4507. return (
  4508. isDef(val) &&
  4509. typeof val.then === 'function' &&
  4510. typeof val.catch === 'function'
  4511. )
  4512. }
  4513. /**
  4514. * Convert a value to a string that is actually rendered.
  4515. */
  4516. function toString (val) {
  4517. return val == null
  4518. ? ''
  4519. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  4520. ? JSON.stringify(val, null, 2)
  4521. : String(val)
  4522. }
  4523. /**
  4524. * Convert an input value to a number for persistence.
  4525. * If the conversion fails, return original string.
  4526. */
  4527. function toNumber (val) {
  4528. var n = parseFloat(val);
  4529. return isNaN(n) ? val : n
  4530. }
  4531. /**
  4532. * Make a map and return a function for checking if a key
  4533. * is in that map.
  4534. */
  4535. function makeMap (
  4536. str,
  4537. expectsLowerCase
  4538. ) {
  4539. var map = Object.create(null);
  4540. var list = str.split(',');
  4541. for (var i = 0; i < list.length; i++) {
  4542. map[list[i]] = true;
  4543. }
  4544. return expectsLowerCase
  4545. ? function (val) { return map[val.toLowerCase()]; }
  4546. : function (val) { return map[val]; }
  4547. }
  4548. /**
  4549. * Check if a tag is a built-in tag.
  4550. */
  4551. var isBuiltInTag = makeMap('slot,component', true);
  4552. /**
  4553. * Check if an attribute is a reserved attribute.
  4554. */
  4555. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  4556. /**
  4557. * Remove an item from an array.
  4558. */
  4559. function remove (arr, item) {
  4560. if (arr.length) {
  4561. var index = arr.indexOf(item);
  4562. if (index > -1) {
  4563. return arr.splice(index, 1)
  4564. }
  4565. }
  4566. }
  4567. /**
  4568. * Check whether an object has the property.
  4569. */
  4570. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4571. function hasOwn (obj, key) {
  4572. return hasOwnProperty.call(obj, key)
  4573. }
  4574. /**
  4575. * Create a cached version of a pure function.
  4576. */
  4577. function cached (fn) {
  4578. var cache = Object.create(null);
  4579. return (function cachedFn (str) {
  4580. var hit = cache[str];
  4581. return hit || (cache[str] = fn(str))
  4582. })
  4583. }
  4584. /**
  4585. * Camelize a hyphen-delimited string.
  4586. */
  4587. var camelizeRE = /-(\w)/g;
  4588. var camelize = cached(function (str) {
  4589. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  4590. });
  4591. /**
  4592. * Capitalize a string.
  4593. */
  4594. var capitalize = cached(function (str) {
  4595. return str.charAt(0).toUpperCase() + str.slice(1)
  4596. });
  4597. /**
  4598. * Hyphenate a camelCase string.
  4599. */
  4600. var hyphenateRE = /\B([A-Z])/g;
  4601. var hyphenate = cached(function (str) {
  4602. return str.replace(hyphenateRE, '-$1').toLowerCase()
  4603. });
  4604. /**
  4605. * Simple bind polyfill for environments that do not support it,
  4606. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  4607. * since native bind is now performant enough in most browsers.
  4608. * But removing it would mean breaking code that was able to run in
  4609. * PhantomJS 1.x, so this must be kept for backward compatibility.
  4610. */
  4611. /* istanbul ignore next */
  4612. function polyfillBind (fn, ctx) {
  4613. function boundFn (a) {
  4614. var l = arguments.length;
  4615. return l
  4616. ? l > 1
  4617. ? fn.apply(ctx, arguments)
  4618. : fn.call(ctx, a)
  4619. : fn.call(ctx)
  4620. }
  4621. boundFn._length = fn.length;
  4622. return boundFn
  4623. }
  4624. function nativeBind (fn, ctx) {
  4625. return fn.bind(ctx)
  4626. }
  4627. var bind = Function.prototype.bind
  4628. ? nativeBind
  4629. : polyfillBind;
  4630. /**
  4631. * Convert an Array-like object to a real Array.
  4632. */
  4633. function toArray (list, start) {
  4634. start = start || 0;
  4635. var i = list.length - start;
  4636. var ret = new Array(i);
  4637. while (i--) {
  4638. ret[i] = list[i + start];
  4639. }
  4640. return ret
  4641. }
  4642. /**
  4643. * Mix properties into target object.
  4644. */
  4645. function extend (to, _from) {
  4646. for (var key in _from) {
  4647. to[key] = _from[key];
  4648. }
  4649. return to
  4650. }
  4651. /**
  4652. * Merge an Array of Objects into a single Object.
  4653. */
  4654. function toObject (arr) {
  4655. var res = {};
  4656. for (var i = 0; i < arr.length; i++) {
  4657. if (arr[i]) {
  4658. extend(res, arr[i]);
  4659. }
  4660. }
  4661. return res
  4662. }
  4663. /* eslint-disable no-unused-vars */
  4664. /**
  4665. * Perform no operation.
  4666. * Stubbing args to make Flow happy without leaving useless transpiled code
  4667. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  4668. */
  4669. function noop (a, b, c) {}
  4670. /**
  4671. * Always return false.
  4672. */
  4673. var no = function (a, b, c) { return false; };
  4674. /* eslint-enable no-unused-vars */
  4675. /**
  4676. * Return the same value.
  4677. */
  4678. var identity = function (_) { return _; };
  4679. /**
  4680. * Check if two values are loosely equal - that is,
  4681. * if they are plain objects, do they have the same shape?
  4682. */
  4683. function looseEqual (a, b) {
  4684. if (a === b) { return true }
  4685. var isObjectA = isObject(a);
  4686. var isObjectB = isObject(b);
  4687. if (isObjectA && isObjectB) {
  4688. try {
  4689. var isArrayA = Array.isArray(a);
  4690. var isArrayB = Array.isArray(b);
  4691. if (isArrayA && isArrayB) {
  4692. return a.length === b.length && a.every(function (e, i) {
  4693. return looseEqual(e, b[i])
  4694. })
  4695. } else if (a instanceof Date && b instanceof Date) {
  4696. return a.getTime() === b.getTime()
  4697. } else if (!isArrayA && !isArrayB) {
  4698. var keysA = Object.keys(a);
  4699. var keysB = Object.keys(b);
  4700. return keysA.length === keysB.length && keysA.every(function (key) {
  4701. return looseEqual(a[key], b[key])
  4702. })
  4703. } else {
  4704. /* istanbul ignore next */
  4705. return false
  4706. }
  4707. } catch (e) {
  4708. /* istanbul ignore next */
  4709. return false
  4710. }
  4711. } else if (!isObjectA && !isObjectB) {
  4712. return String(a) === String(b)
  4713. } else {
  4714. return false
  4715. }
  4716. }
  4717. /**
  4718. * Return the first index at which a loosely equal value can be
  4719. * found in the array (if value is a plain object, the array must
  4720. * contain an object of the same shape), or -1 if it is not present.
  4721. */
  4722. function looseIndexOf (arr, val) {
  4723. for (var i = 0; i < arr.length; i++) {
  4724. if (looseEqual(arr[i], val)) { return i }
  4725. }
  4726. return -1
  4727. }
  4728. /**
  4729. * Ensure a function is called only once.
  4730. */
  4731. function once (fn) {
  4732. var called = false;
  4733. return function () {
  4734. if (!called) {
  4735. called = true;
  4736. fn.apply(this, arguments);
  4737. }
  4738. }
  4739. }
  4740. var ASSET_TYPES = [
  4741. 'component',
  4742. 'directive',
  4743. 'filter'
  4744. ];
  4745. var LIFECYCLE_HOOKS = [
  4746. 'beforeCreate',
  4747. 'created',
  4748. 'beforeMount',
  4749. 'mounted',
  4750. 'beforeUpdate',
  4751. 'updated',
  4752. 'beforeDestroy',
  4753. 'destroyed',
  4754. 'activated',
  4755. 'deactivated',
  4756. 'errorCaptured',
  4757. 'serverPrefetch'
  4758. ];
  4759. /* */
  4760. var config = ({
  4761. /**
  4762. * Option merge strategies (used in core/util/options)
  4763. */
  4764. // $flow-disable-line
  4765. optionMergeStrategies: Object.create(null),
  4766. /**
  4767. * Whether to suppress warnings.
  4768. */
  4769. silent: false,
  4770. /**
  4771. * Show production mode tip message on boot?
  4772. */
  4773. productionTip: "development" !== 'production',
  4774. /**
  4775. * Whether to enable devtools
  4776. */
  4777. devtools: "development" !== 'production',
  4778. /**
  4779. * Whether to record perf
  4780. */
  4781. performance: false,
  4782. /**
  4783. * Error handler for watcher errors
  4784. */
  4785. errorHandler: null,
  4786. /**
  4787. * Warn handler for watcher warns
  4788. */
  4789. warnHandler: null,
  4790. /**
  4791. * Ignore certain custom elements
  4792. */
  4793. ignoredElements: [],
  4794. /**
  4795. * Custom user key aliases for v-on
  4796. */
  4797. // $flow-disable-line
  4798. keyCodes: Object.create(null),
  4799. /**
  4800. * Check if a tag is reserved so that it cannot be registered as a
  4801. * component. This is platform-dependent and may be overwritten.
  4802. */
  4803. isReservedTag: no,
  4804. /**
  4805. * Check if an attribute is reserved so that it cannot be used as a component
  4806. * prop. This is platform-dependent and may be overwritten.
  4807. */
  4808. isReservedAttr: no,
  4809. /**
  4810. * Check if a tag is an unknown element.
  4811. * Platform-dependent.
  4812. */
  4813. isUnknownElement: no,
  4814. /**
  4815. * Get the namespace of an element
  4816. */
  4817. getTagNamespace: noop,
  4818. /**
  4819. * Parse the real tag name for the specific platform.
  4820. */
  4821. parsePlatformTagName: identity,
  4822. /**
  4823. * Check if an attribute must be bound using property, e.g. value
  4824. * Platform-dependent.
  4825. */
  4826. mustUseProp: no,
  4827. /**
  4828. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  4829. * This will significantly reduce performance if set to false.
  4830. */
  4831. async: true,
  4832. /**
  4833. * Exposed for legacy reasons
  4834. */
  4835. _lifecycleHooks: LIFECYCLE_HOOKS
  4836. });
  4837. /* */
  4838. /**
  4839. * unicode letters used for parsing html tags, component names and property paths.
  4840. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  4841. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  4842. */
  4843. 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/;
  4844. /**
  4845. * Check if a string starts with $ or _
  4846. */
  4847. function isReserved (str) {
  4848. var c = (str + '').charCodeAt(0);
  4849. return c === 0x24 || c === 0x5F
  4850. }
  4851. /**
  4852. * Define a property.
  4853. */
  4854. function def (obj, key, val, enumerable) {
  4855. Object.defineProperty(obj, key, {
  4856. value: val,
  4857. enumerable: !!enumerable,
  4858. writable: true,
  4859. configurable: true
  4860. });
  4861. }
  4862. /**
  4863. * Parse simple path.
  4864. */
  4865. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  4866. function parsePath (path) {
  4867. if (bailRE.test(path)) {
  4868. return
  4869. }
  4870. var segments = path.split('.');
  4871. return function (obj) {
  4872. for (var i = 0; i < segments.length; i++) {
  4873. if (!obj) { return }
  4874. obj = obj[segments[i]];
  4875. }
  4876. return obj
  4877. }
  4878. }
  4879. /* */
  4880. // can we use __proto__?
  4881. var hasProto = '__proto__' in {};
  4882. // Browser environment sniffing
  4883. var inBrowser = typeof window !== 'undefined';
  4884. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  4885. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  4886. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  4887. var isIE = UA && /msie|trident/.test(UA);
  4888. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  4889. var isEdge = UA && UA.indexOf('edge/') > 0;
  4890. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  4891. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  4892. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  4893. var isPhantomJS = UA && /phantomjs/.test(UA);
  4894. var isFF = UA && UA.match(/firefox\/(\d+)/);
  4895. // Firefox has a "watch" function on Object.prototype...
  4896. var nativeWatch = ({}).watch;
  4897. if (inBrowser) {
  4898. try {
  4899. var opts = {};
  4900. Object.defineProperty(opts, 'passive', ({
  4901. get: function get () {
  4902. }
  4903. })); // https://github.com/facebook/flow/issues/285
  4904. window.addEventListener('test-passive', null, opts);
  4905. } catch (e) {}
  4906. }
  4907. // this needs to be lazy-evaled because vue may be required before
  4908. // vue-server-renderer can set VUE_ENV
  4909. var _isServer;
  4910. var isServerRendering = function () {
  4911. if (_isServer === undefined) {
  4912. /* istanbul ignore if */
  4913. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  4914. // detect presence of vue-server-renderer and avoid
  4915. // Webpack shimming the process
  4916. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  4917. } else {
  4918. _isServer = false;
  4919. }
  4920. }
  4921. return _isServer
  4922. };
  4923. // detect devtools
  4924. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  4925. /* istanbul ignore next */
  4926. function isNative (Ctor) {
  4927. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  4928. }
  4929. var hasSymbol =
  4930. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  4931. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  4932. var _Set;
  4933. /* istanbul ignore if */ // $flow-disable-line
  4934. if (typeof Set !== 'undefined' && isNative(Set)) {
  4935. // use native Set when available.
  4936. _Set = Set;
  4937. } else {
  4938. // a non-standard Set polyfill that only works with primitive keys.
  4939. _Set = /*@__PURE__*/(function () {
  4940. function Set () {
  4941. this.set = Object.create(null);
  4942. }
  4943. Set.prototype.has = function has (key) {
  4944. return this.set[key] === true
  4945. };
  4946. Set.prototype.add = function add (key) {
  4947. this.set[key] = true;
  4948. };
  4949. Set.prototype.clear = function clear () {
  4950. this.set = Object.create(null);
  4951. };
  4952. return Set;
  4953. }());
  4954. }
  4955. /* */
  4956. var warn = noop;
  4957. var tip = noop;
  4958. var generateComponentTrace = (noop); // work around flow check
  4959. var formatComponentName = (noop);
  4960. if (true) {
  4961. var hasConsole = typeof console !== 'undefined';
  4962. var classifyRE = /(?:^|[-_])(\w)/g;
  4963. var classify = function (str) { return str
  4964. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  4965. .replace(/[-_]/g, ''); };
  4966. warn = function (msg, vm) {
  4967. var trace = vm ? generateComponentTrace(vm) : '';
  4968. if (config.warnHandler) {
  4969. config.warnHandler.call(null, msg, vm, trace);
  4970. } else if (hasConsole && (!config.silent)) {
  4971. console.error(("[Vue warn]: " + msg + trace));
  4972. }
  4973. };
  4974. tip = function (msg, vm) {
  4975. if (hasConsole && (!config.silent)) {
  4976. console.warn("[Vue tip]: " + msg + (
  4977. vm ? generateComponentTrace(vm) : ''
  4978. ));
  4979. }
  4980. };
  4981. formatComponentName = function (vm, includeFile) {
  4982. if (vm.$root === vm) {
  4983. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  4984. return ('') + vm.$options.__file
  4985. }
  4986. return '<Root>'
  4987. }
  4988. var options = typeof vm === 'function' && vm.cid != null
  4989. ? vm.options
  4990. : vm._isVue
  4991. ? vm.$options || vm.constructor.options
  4992. : vm;
  4993. var name = options.name || options._componentTag;
  4994. var file = options.__file;
  4995. if (!name && file) {
  4996. var match = file.match(/([^/\\]+)\.vue$/);
  4997. name = match && match[1];
  4998. }
  4999. return (
  5000. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  5001. (file && includeFile !== false ? (" at " + file) : '')
  5002. )
  5003. };
  5004. var repeat = function (str, n) {
  5005. var res = '';
  5006. while (n) {
  5007. if (n % 2 === 1) { res += str; }
  5008. if (n > 1) { str += str; }
  5009. n >>= 1;
  5010. }
  5011. return res
  5012. };
  5013. generateComponentTrace = function (vm) {
  5014. if (vm._isVue && vm.$parent) {
  5015. var tree = [];
  5016. var currentRecursiveSequence = 0;
  5017. while (vm && vm.$options.name !== 'PageBody') {
  5018. if (tree.length > 0) {
  5019. var last = tree[tree.length - 1];
  5020. if (last.constructor === vm.constructor) {
  5021. currentRecursiveSequence++;
  5022. vm = vm.$parent;
  5023. continue
  5024. } else if (currentRecursiveSequence > 0) {
  5025. tree[tree.length - 1] = [last, currentRecursiveSequence];
  5026. currentRecursiveSequence = 0;
  5027. }
  5028. }
  5029. !vm.$options.isReserved && tree.push(vm);
  5030. vm = vm.$parent;
  5031. }
  5032. return '\n\nfound in\n\n' + tree
  5033. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  5034. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  5035. : formatComponentName(vm))); })
  5036. .join('\n')
  5037. } else {
  5038. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  5039. }
  5040. };
  5041. }
  5042. /* */
  5043. var uid = 0;
  5044. /**
  5045. * A dep is an observable that can have multiple
  5046. * directives subscribing to it.
  5047. */
  5048. var Dep = function Dep () {
  5049. this.id = uid++;
  5050. this.subs = [];
  5051. };
  5052. Dep.prototype.addSub = function addSub (sub) {
  5053. this.subs.push(sub);
  5054. };
  5055. Dep.prototype.removeSub = function removeSub (sub) {
  5056. remove(this.subs, sub);
  5057. };
  5058. Dep.prototype.depend = function depend () {
  5059. if (Dep.SharedObject.target) {
  5060. Dep.SharedObject.target.addDep(this);
  5061. }
  5062. };
  5063. Dep.prototype.notify = function notify () {
  5064. // stabilize the subscriber list first
  5065. var subs = this.subs.slice();
  5066. if ( true && !config.async) {
  5067. // subs aren't sorted in scheduler if not running async
  5068. // we need to sort them now to make sure they fire in correct
  5069. // order
  5070. subs.sort(function (a, b) { return a.id - b.id; });
  5071. }
  5072. for (var i = 0, l = subs.length; i < l; i++) {
  5073. subs[i].update();
  5074. }
  5075. };
  5076. // The current target watcher being evaluated.
  5077. // This is globally unique because only one watcher
  5078. // can be evaluated at a time.
  5079. // fixed by xxxxxx (nvue shared vuex)
  5080. /* eslint-disable no-undef */
  5081. Dep.SharedObject = {};
  5082. Dep.SharedObject.target = null;
  5083. Dep.SharedObject.targetStack = [];
  5084. function pushTarget (target) {
  5085. Dep.SharedObject.targetStack.push(target);
  5086. Dep.SharedObject.target = target;
  5087. }
  5088. function popTarget () {
  5089. Dep.SharedObject.targetStack.pop();
  5090. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  5091. }
  5092. /* */
  5093. var VNode = function VNode (
  5094. tag,
  5095. data,
  5096. children,
  5097. text,
  5098. elm,
  5099. context,
  5100. componentOptions,
  5101. asyncFactory
  5102. ) {
  5103. this.tag = tag;
  5104. this.data = data;
  5105. this.children = children;
  5106. this.text = text;
  5107. this.elm = elm;
  5108. this.ns = undefined;
  5109. this.context = context;
  5110. this.fnContext = undefined;
  5111. this.fnOptions = undefined;
  5112. this.fnScopeId = undefined;
  5113. this.key = data && data.key;
  5114. this.componentOptions = componentOptions;
  5115. this.componentInstance = undefined;
  5116. this.parent = undefined;
  5117. this.raw = false;
  5118. this.isStatic = false;
  5119. this.isRootInsert = true;
  5120. this.isComment = false;
  5121. this.isCloned = false;
  5122. this.isOnce = false;
  5123. this.asyncFactory = asyncFactory;
  5124. this.asyncMeta = undefined;
  5125. this.isAsyncPlaceholder = false;
  5126. };
  5127. var prototypeAccessors = { child: { configurable: true } };
  5128. // DEPRECATED: alias for componentInstance for backwards compat.
  5129. /* istanbul ignore next */
  5130. prototypeAccessors.child.get = function () {
  5131. return this.componentInstance
  5132. };
  5133. Object.defineProperties( VNode.prototype, prototypeAccessors );
  5134. var createEmptyVNode = function (text) {
  5135. if ( text === void 0 ) text = '';
  5136. var node = new VNode();
  5137. node.text = text;
  5138. node.isComment = true;
  5139. return node
  5140. };
  5141. function createTextVNode (val) {
  5142. return new VNode(undefined, undefined, undefined, String(val))
  5143. }
  5144. // optimized shallow clone
  5145. // used for static nodes and slot nodes because they may be reused across
  5146. // multiple renders, cloning them avoids errors when DOM manipulations rely
  5147. // on their elm reference.
  5148. function cloneVNode (vnode) {
  5149. var cloned = new VNode(
  5150. vnode.tag,
  5151. vnode.data,
  5152. // #7975
  5153. // clone children array to avoid mutating original in case of cloning
  5154. // a child.
  5155. vnode.children && vnode.children.slice(),
  5156. vnode.text,
  5157. vnode.elm,
  5158. vnode.context,
  5159. vnode.componentOptions,
  5160. vnode.asyncFactory
  5161. );
  5162. cloned.ns = vnode.ns;
  5163. cloned.isStatic = vnode.isStatic;
  5164. cloned.key = vnode.key;
  5165. cloned.isComment = vnode.isComment;
  5166. cloned.fnContext = vnode.fnContext;
  5167. cloned.fnOptions = vnode.fnOptions;
  5168. cloned.fnScopeId = vnode.fnScopeId;
  5169. cloned.asyncMeta = vnode.asyncMeta;
  5170. cloned.isCloned = true;
  5171. return cloned
  5172. }
  5173. /*
  5174. * not type checking this file because flow doesn't play well with
  5175. * dynamically accessing methods on Array prototype
  5176. */
  5177. var arrayProto = Array.prototype;
  5178. var arrayMethods = Object.create(arrayProto);
  5179. var methodsToPatch = [
  5180. 'push',
  5181. 'pop',
  5182. 'shift',
  5183. 'unshift',
  5184. 'splice',
  5185. 'sort',
  5186. 'reverse'
  5187. ];
  5188. /**
  5189. * Intercept mutating methods and emit events
  5190. */
  5191. methodsToPatch.forEach(function (method) {
  5192. // cache original method
  5193. var original = arrayProto[method];
  5194. def(arrayMethods, method, function mutator () {
  5195. var args = [], len = arguments.length;
  5196. while ( len-- ) args[ len ] = arguments[ len ];
  5197. var result = original.apply(this, args);
  5198. var ob = this.__ob__;
  5199. var inserted;
  5200. switch (method) {
  5201. case 'push':
  5202. case 'unshift':
  5203. inserted = args;
  5204. break
  5205. case 'splice':
  5206. inserted = args.slice(2);
  5207. break
  5208. }
  5209. if (inserted) { ob.observeArray(inserted); }
  5210. // notify change
  5211. ob.dep.notify();
  5212. return result
  5213. });
  5214. });
  5215. /* */
  5216. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  5217. /**
  5218. * In some cases we may want to disable observation inside a component's
  5219. * update computation.
  5220. */
  5221. var shouldObserve = true;
  5222. function toggleObserving (value) {
  5223. shouldObserve = value;
  5224. }
  5225. /**
  5226. * Observer class that is attached to each observed
  5227. * object. Once attached, the observer converts the target
  5228. * object's property keys into getter/setters that
  5229. * collect dependencies and dispatch updates.
  5230. */
  5231. var Observer = function Observer (value) {
  5232. this.value = value;
  5233. this.dep = new Dep();
  5234. this.vmCount = 0;
  5235. def(value, '__ob__', this);
  5236. if (Array.isArray(value)) {
  5237. if (hasProto) {
  5238. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  5239. if(value.push !== value.__proto__.push){
  5240. copyAugment(value, arrayMethods, arrayKeys);
  5241. } else {
  5242. protoAugment(value, arrayMethods);
  5243. }
  5244. }
  5245. } else {
  5246. copyAugment(value, arrayMethods, arrayKeys);
  5247. }
  5248. this.observeArray(value);
  5249. } else {
  5250. this.walk(value);
  5251. }
  5252. };
  5253. /**
  5254. * Walk through all properties and convert them into
  5255. * getter/setters. This method should only be called when
  5256. * value type is Object.
  5257. */
  5258. Observer.prototype.walk = function walk (obj) {
  5259. var keys = Object.keys(obj);
  5260. for (var i = 0; i < keys.length; i++) {
  5261. defineReactive$$1(obj, keys[i]);
  5262. }
  5263. };
  5264. /**
  5265. * Observe a list of Array items.
  5266. */
  5267. Observer.prototype.observeArray = function observeArray (items) {
  5268. for (var i = 0, l = items.length; i < l; i++) {
  5269. observe(items[i]);
  5270. }
  5271. };
  5272. // helpers
  5273. /**
  5274. * Augment a target Object or Array by intercepting
  5275. * the prototype chain using __proto__
  5276. */
  5277. function protoAugment (target, src) {
  5278. /* eslint-disable no-proto */
  5279. target.__proto__ = src;
  5280. /* eslint-enable no-proto */
  5281. }
  5282. /**
  5283. * Augment a target Object or Array by defining
  5284. * hidden properties.
  5285. */
  5286. /* istanbul ignore next */
  5287. function copyAugment (target, src, keys) {
  5288. for (var i = 0, l = keys.length; i < l; i++) {
  5289. var key = keys[i];
  5290. def(target, key, src[key]);
  5291. }
  5292. }
  5293. /**
  5294. * Attempt to create an observer instance for a value,
  5295. * returns the new observer if successfully observed,
  5296. * or the existing observer if the value already has one.
  5297. */
  5298. function observe (value, asRootData) {
  5299. if (!isObject(value) || value instanceof VNode) {
  5300. return
  5301. }
  5302. var ob;
  5303. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  5304. ob = value.__ob__;
  5305. } else if (
  5306. shouldObserve &&
  5307. !isServerRendering() &&
  5308. (Array.isArray(value) || isPlainObject(value)) &&
  5309. Object.isExtensible(value) &&
  5310. !value._isVue
  5311. ) {
  5312. ob = new Observer(value);
  5313. }
  5314. if (asRootData && ob) {
  5315. ob.vmCount++;
  5316. }
  5317. return ob
  5318. }
  5319. /**
  5320. * Define a reactive property on an Object.
  5321. */
  5322. function defineReactive$$1 (
  5323. obj,
  5324. key,
  5325. val,
  5326. customSetter,
  5327. shallow
  5328. ) {
  5329. var dep = new Dep();
  5330. var property = Object.getOwnPropertyDescriptor(obj, key);
  5331. if (property && property.configurable === false) {
  5332. return
  5333. }
  5334. // cater for pre-defined getter/setters
  5335. var getter = property && property.get;
  5336. var setter = property && property.set;
  5337. if ((!getter || setter) && arguments.length === 2) {
  5338. val = obj[key];
  5339. }
  5340. var childOb = !shallow && observe(val);
  5341. Object.defineProperty(obj, key, {
  5342. enumerable: true,
  5343. configurable: true,
  5344. get: function reactiveGetter () {
  5345. var value = getter ? getter.call(obj) : val;
  5346. if (Dep.SharedObject.target) { // fixed by xxxxxx
  5347. dep.depend();
  5348. if (childOb) {
  5349. childOb.dep.depend();
  5350. if (Array.isArray(value)) {
  5351. dependArray(value);
  5352. }
  5353. }
  5354. }
  5355. return value
  5356. },
  5357. set: function reactiveSetter (newVal) {
  5358. var value = getter ? getter.call(obj) : val;
  5359. /* eslint-disable no-self-compare */
  5360. if (newVal === value || (newVal !== newVal && value !== value)) {
  5361. return
  5362. }
  5363. /* eslint-enable no-self-compare */
  5364. if ( true && customSetter) {
  5365. customSetter();
  5366. }
  5367. // #7981: for accessor properties without setter
  5368. if (getter && !setter) { return }
  5369. if (setter) {
  5370. setter.call(obj, newVal);
  5371. } else {
  5372. val = newVal;
  5373. }
  5374. childOb = !shallow && observe(newVal);
  5375. dep.notify();
  5376. }
  5377. });
  5378. }
  5379. /**
  5380. * Set a property on an object. Adds the new property and
  5381. * triggers change notification if the property doesn't
  5382. * already exist.
  5383. */
  5384. function set (target, key, val) {
  5385. if ( true &&
  5386. (isUndef(target) || isPrimitive(target))
  5387. ) {
  5388. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  5389. }
  5390. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5391. target.length = Math.max(target.length, key);
  5392. target.splice(key, 1, val);
  5393. return val
  5394. }
  5395. if (key in target && !(key in Object.prototype)) {
  5396. target[key] = val;
  5397. return val
  5398. }
  5399. var ob = (target).__ob__;
  5400. if (target._isVue || (ob && ob.vmCount)) {
  5401. true && warn(
  5402. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  5403. 'at runtime - declare it upfront in the data option.'
  5404. );
  5405. return val
  5406. }
  5407. if (!ob) {
  5408. target[key] = val;
  5409. return val
  5410. }
  5411. defineReactive$$1(ob.value, key, val);
  5412. ob.dep.notify();
  5413. return val
  5414. }
  5415. /**
  5416. * Delete a property and trigger change if necessary.
  5417. */
  5418. function del (target, key) {
  5419. if ( true &&
  5420. (isUndef(target) || isPrimitive(target))
  5421. ) {
  5422. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  5423. }
  5424. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5425. target.splice(key, 1);
  5426. return
  5427. }
  5428. var ob = (target).__ob__;
  5429. if (target._isVue || (ob && ob.vmCount)) {
  5430. true && warn(
  5431. 'Avoid deleting properties on a Vue instance or its root $data ' +
  5432. '- just set it to null.'
  5433. );
  5434. return
  5435. }
  5436. if (!hasOwn(target, key)) {
  5437. return
  5438. }
  5439. delete target[key];
  5440. if (!ob) {
  5441. return
  5442. }
  5443. ob.dep.notify();
  5444. }
  5445. /**
  5446. * Collect dependencies on array elements when the array is touched, since
  5447. * we cannot intercept array element access like property getters.
  5448. */
  5449. function dependArray (value) {
  5450. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  5451. e = value[i];
  5452. e && e.__ob__ && e.__ob__.dep.depend();
  5453. if (Array.isArray(e)) {
  5454. dependArray(e);
  5455. }
  5456. }
  5457. }
  5458. /* */
  5459. /**
  5460. * Option overwriting strategies are functions that handle
  5461. * how to merge a parent option value and a child option
  5462. * value into the final value.
  5463. */
  5464. var strats = config.optionMergeStrategies;
  5465. /**
  5466. * Options with restrictions
  5467. */
  5468. if (true) {
  5469. strats.el = strats.propsData = function (parent, child, vm, key) {
  5470. if (!vm) {
  5471. warn(
  5472. "option \"" + key + "\" can only be used during instance " +
  5473. 'creation with the `new` keyword.'
  5474. );
  5475. }
  5476. return defaultStrat(parent, child)
  5477. };
  5478. }
  5479. /**
  5480. * Helper that recursively merges two data objects together.
  5481. */
  5482. function mergeData (to, from) {
  5483. if (!from) { return to }
  5484. var key, toVal, fromVal;
  5485. var keys = hasSymbol
  5486. ? Reflect.ownKeys(from)
  5487. : Object.keys(from);
  5488. for (var i = 0; i < keys.length; i++) {
  5489. key = keys[i];
  5490. // in case the object is already observed...
  5491. if (key === '__ob__') { continue }
  5492. toVal = to[key];
  5493. fromVal = from[key];
  5494. if (!hasOwn(to, key)) {
  5495. set(to, key, fromVal);
  5496. } else if (
  5497. toVal !== fromVal &&
  5498. isPlainObject(toVal) &&
  5499. isPlainObject(fromVal)
  5500. ) {
  5501. mergeData(toVal, fromVal);
  5502. }
  5503. }
  5504. return to
  5505. }
  5506. /**
  5507. * Data
  5508. */
  5509. function mergeDataOrFn (
  5510. parentVal,
  5511. childVal,
  5512. vm
  5513. ) {
  5514. if (!vm) {
  5515. // in a Vue.extend merge, both should be functions
  5516. if (!childVal) {
  5517. return parentVal
  5518. }
  5519. if (!parentVal) {
  5520. return childVal
  5521. }
  5522. // when parentVal & childVal are both present,
  5523. // we need to return a function that returns the
  5524. // merged result of both functions... no need to
  5525. // check if parentVal is a function here because
  5526. // it has to be a function to pass previous merges.
  5527. return function mergedDataFn () {
  5528. return mergeData(
  5529. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  5530. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  5531. )
  5532. }
  5533. } else {
  5534. return function mergedInstanceDataFn () {
  5535. // instance merge
  5536. var instanceData = typeof childVal === 'function'
  5537. ? childVal.call(vm, vm)
  5538. : childVal;
  5539. var defaultData = typeof parentVal === 'function'
  5540. ? parentVal.call(vm, vm)
  5541. : parentVal;
  5542. if (instanceData) {
  5543. return mergeData(instanceData, defaultData)
  5544. } else {
  5545. return defaultData
  5546. }
  5547. }
  5548. }
  5549. }
  5550. strats.data = function (
  5551. parentVal,
  5552. childVal,
  5553. vm
  5554. ) {
  5555. if (!vm) {
  5556. if (childVal && typeof childVal !== 'function') {
  5557. true && warn(
  5558. 'The "data" option should be a function ' +
  5559. 'that returns a per-instance value in component ' +
  5560. 'definitions.',
  5561. vm
  5562. );
  5563. return parentVal
  5564. }
  5565. return mergeDataOrFn(parentVal, childVal)
  5566. }
  5567. return mergeDataOrFn(parentVal, childVal, vm)
  5568. };
  5569. /**
  5570. * Hooks and props are merged as arrays.
  5571. */
  5572. function mergeHook (
  5573. parentVal,
  5574. childVal
  5575. ) {
  5576. var res = childVal
  5577. ? parentVal
  5578. ? parentVal.concat(childVal)
  5579. : Array.isArray(childVal)
  5580. ? childVal
  5581. : [childVal]
  5582. : parentVal;
  5583. return res
  5584. ? dedupeHooks(res)
  5585. : res
  5586. }
  5587. function dedupeHooks (hooks) {
  5588. var res = [];
  5589. for (var i = 0; i < hooks.length; i++) {
  5590. if (res.indexOf(hooks[i]) === -1) {
  5591. res.push(hooks[i]);
  5592. }
  5593. }
  5594. return res
  5595. }
  5596. LIFECYCLE_HOOKS.forEach(function (hook) {
  5597. strats[hook] = mergeHook;
  5598. });
  5599. /**
  5600. * Assets
  5601. *
  5602. * When a vm is present (instance creation), we need to do
  5603. * a three-way merge between constructor options, instance
  5604. * options and parent options.
  5605. */
  5606. function mergeAssets (
  5607. parentVal,
  5608. childVal,
  5609. vm,
  5610. key
  5611. ) {
  5612. var res = Object.create(parentVal || null);
  5613. if (childVal) {
  5614. true && assertObjectType(key, childVal, vm);
  5615. return extend(res, childVal)
  5616. } else {
  5617. return res
  5618. }
  5619. }
  5620. ASSET_TYPES.forEach(function (type) {
  5621. strats[type + 's'] = mergeAssets;
  5622. });
  5623. /**
  5624. * Watchers.
  5625. *
  5626. * Watchers hashes should not overwrite one
  5627. * another, so we merge them as arrays.
  5628. */
  5629. strats.watch = function (
  5630. parentVal,
  5631. childVal,
  5632. vm,
  5633. key
  5634. ) {
  5635. // work around Firefox's Object.prototype.watch...
  5636. if (parentVal === nativeWatch) { parentVal = undefined; }
  5637. if (childVal === nativeWatch) { childVal = undefined; }
  5638. /* istanbul ignore if */
  5639. if (!childVal) { return Object.create(parentVal || null) }
  5640. if (true) {
  5641. assertObjectType(key, childVal, vm);
  5642. }
  5643. if (!parentVal) { return childVal }
  5644. var ret = {};
  5645. extend(ret, parentVal);
  5646. for (var key$1 in childVal) {
  5647. var parent = ret[key$1];
  5648. var child = childVal[key$1];
  5649. if (parent && !Array.isArray(parent)) {
  5650. parent = [parent];
  5651. }
  5652. ret[key$1] = parent
  5653. ? parent.concat(child)
  5654. : Array.isArray(child) ? child : [child];
  5655. }
  5656. return ret
  5657. };
  5658. /**
  5659. * Other object hashes.
  5660. */
  5661. strats.props =
  5662. strats.methods =
  5663. strats.inject =
  5664. strats.computed = function (
  5665. parentVal,
  5666. childVal,
  5667. vm,
  5668. key
  5669. ) {
  5670. if (childVal && "development" !== 'production') {
  5671. assertObjectType(key, childVal, vm);
  5672. }
  5673. if (!parentVal) { return childVal }
  5674. var ret = Object.create(null);
  5675. extend(ret, parentVal);
  5676. if (childVal) { extend(ret, childVal); }
  5677. return ret
  5678. };
  5679. strats.provide = mergeDataOrFn;
  5680. /**
  5681. * Default strategy.
  5682. */
  5683. var defaultStrat = function (parentVal, childVal) {
  5684. return childVal === undefined
  5685. ? parentVal
  5686. : childVal
  5687. };
  5688. /**
  5689. * Validate component names
  5690. */
  5691. function checkComponents (options) {
  5692. for (var key in options.components) {
  5693. validateComponentName(key);
  5694. }
  5695. }
  5696. function validateComponentName (name) {
  5697. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  5698. warn(
  5699. 'Invalid component name: "' + name + '". Component names ' +
  5700. 'should conform to valid custom element name in html5 specification.'
  5701. );
  5702. }
  5703. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  5704. warn(
  5705. 'Do not use built-in or reserved HTML elements as component ' +
  5706. 'id: ' + name
  5707. );
  5708. }
  5709. }
  5710. /**
  5711. * Ensure all props option syntax are normalized into the
  5712. * Object-based format.
  5713. */
  5714. function normalizeProps (options, vm) {
  5715. var props = options.props;
  5716. if (!props) { return }
  5717. var res = {};
  5718. var i, val, name;
  5719. if (Array.isArray(props)) {
  5720. i = props.length;
  5721. while (i--) {
  5722. val = props[i];
  5723. if (typeof val === 'string') {
  5724. name = camelize(val);
  5725. res[name] = { type: null };
  5726. } else if (true) {
  5727. warn('props must be strings when using array syntax.');
  5728. }
  5729. }
  5730. } else if (isPlainObject(props)) {
  5731. for (var key in props) {
  5732. val = props[key];
  5733. name = camelize(key);
  5734. res[name] = isPlainObject(val)
  5735. ? val
  5736. : { type: val };
  5737. }
  5738. } else if (true) {
  5739. warn(
  5740. "Invalid value for option \"props\": expected an Array or an Object, " +
  5741. "but got " + (toRawType(props)) + ".",
  5742. vm
  5743. );
  5744. }
  5745. options.props = res;
  5746. }
  5747. /**
  5748. * Normalize all injections into Object-based format
  5749. */
  5750. function normalizeInject (options, vm) {
  5751. var inject = options.inject;
  5752. if (!inject) { return }
  5753. var normalized = options.inject = {};
  5754. if (Array.isArray(inject)) {
  5755. for (var i = 0; i < inject.length; i++) {
  5756. normalized[inject[i]] = { from: inject[i] };
  5757. }
  5758. } else if (isPlainObject(inject)) {
  5759. for (var key in inject) {
  5760. var val = inject[key];
  5761. normalized[key] = isPlainObject(val)
  5762. ? extend({ from: key }, val)
  5763. : { from: val };
  5764. }
  5765. } else if (true) {
  5766. warn(
  5767. "Invalid value for option \"inject\": expected an Array or an Object, " +
  5768. "but got " + (toRawType(inject)) + ".",
  5769. vm
  5770. );
  5771. }
  5772. }
  5773. /**
  5774. * Normalize raw function directives into object format.
  5775. */
  5776. function normalizeDirectives (options) {
  5777. var dirs = options.directives;
  5778. if (dirs) {
  5779. for (var key in dirs) {
  5780. var def$$1 = dirs[key];
  5781. if (typeof def$$1 === 'function') {
  5782. dirs[key] = { bind: def$$1, update: def$$1 };
  5783. }
  5784. }
  5785. }
  5786. }
  5787. function assertObjectType (name, value, vm) {
  5788. if (!isPlainObject(value)) {
  5789. warn(
  5790. "Invalid value for option \"" + name + "\": expected an Object, " +
  5791. "but got " + (toRawType(value)) + ".",
  5792. vm
  5793. );
  5794. }
  5795. }
  5796. /**
  5797. * Merge two option objects into a new one.
  5798. * Core utility used in both instantiation and inheritance.
  5799. */
  5800. function mergeOptions (
  5801. parent,
  5802. child,
  5803. vm
  5804. ) {
  5805. if (true) {
  5806. checkComponents(child);
  5807. }
  5808. if (typeof child === 'function') {
  5809. child = child.options;
  5810. }
  5811. normalizeProps(child, vm);
  5812. normalizeInject(child, vm);
  5813. normalizeDirectives(child);
  5814. // Apply extends and mixins on the child options,
  5815. // but only if it is a raw options object that isn't
  5816. // the result of another mergeOptions call.
  5817. // Only merged options has the _base property.
  5818. if (!child._base) {
  5819. if (child.extends) {
  5820. parent = mergeOptions(parent, child.extends, vm);
  5821. }
  5822. if (child.mixins) {
  5823. for (var i = 0, l = child.mixins.length; i < l; i++) {
  5824. parent = mergeOptions(parent, child.mixins[i], vm);
  5825. }
  5826. }
  5827. }
  5828. var options = {};
  5829. var key;
  5830. for (key in parent) {
  5831. mergeField(key);
  5832. }
  5833. for (key in child) {
  5834. if (!hasOwn(parent, key)) {
  5835. mergeField(key);
  5836. }
  5837. }
  5838. function mergeField (key) {
  5839. var strat = strats[key] || defaultStrat;
  5840. options[key] = strat(parent[key], child[key], vm, key);
  5841. }
  5842. return options
  5843. }
  5844. /**
  5845. * Resolve an asset.
  5846. * This function is used because child instances need access
  5847. * to assets defined in its ancestor chain.
  5848. */
  5849. function resolveAsset (
  5850. options,
  5851. type,
  5852. id,
  5853. warnMissing
  5854. ) {
  5855. /* istanbul ignore if */
  5856. if (typeof id !== 'string') {
  5857. return
  5858. }
  5859. var assets = options[type];
  5860. // check local registration variations first
  5861. if (hasOwn(assets, id)) { return assets[id] }
  5862. var camelizedId = camelize(id);
  5863. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  5864. var PascalCaseId = capitalize(camelizedId);
  5865. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  5866. // fallback to prototype chain
  5867. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  5868. if ( true && warnMissing && !res) {
  5869. warn(
  5870. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  5871. options
  5872. );
  5873. }
  5874. return res
  5875. }
  5876. /* */
  5877. function validateProp (
  5878. key,
  5879. propOptions,
  5880. propsData,
  5881. vm
  5882. ) {
  5883. var prop = propOptions[key];
  5884. var absent = !hasOwn(propsData, key);
  5885. var value = propsData[key];
  5886. // boolean casting
  5887. var booleanIndex = getTypeIndex(Boolean, prop.type);
  5888. if (booleanIndex > -1) {
  5889. if (absent && !hasOwn(prop, 'default')) {
  5890. value = false;
  5891. } else if (value === '' || value === hyphenate(key)) {
  5892. // only cast empty string / same name to boolean if
  5893. // boolean has higher priority
  5894. var stringIndex = getTypeIndex(String, prop.type);
  5895. if (stringIndex < 0 || booleanIndex < stringIndex) {
  5896. value = true;
  5897. }
  5898. }
  5899. }
  5900. // check default value
  5901. if (value === undefined) {
  5902. value = getPropDefaultValue(vm, prop, key);
  5903. // since the default value is a fresh copy,
  5904. // make sure to observe it.
  5905. var prevShouldObserve = shouldObserve;
  5906. toggleObserving(true);
  5907. observe(value);
  5908. toggleObserving(prevShouldObserve);
  5909. }
  5910. if (
  5911. true
  5912. ) {
  5913. assertProp(prop, key, value, vm, absent);
  5914. }
  5915. return value
  5916. }
  5917. /**
  5918. * Get the default value of a prop.
  5919. */
  5920. function getPropDefaultValue (vm, prop, key) {
  5921. // no default, return undefined
  5922. if (!hasOwn(prop, 'default')) {
  5923. return undefined
  5924. }
  5925. var def = prop.default;
  5926. // warn against non-factory defaults for Object & Array
  5927. if ( true && isObject(def)) {
  5928. warn(
  5929. 'Invalid default value for prop "' + key + '": ' +
  5930. 'Props with type Object/Array must use a factory function ' +
  5931. 'to return the default value.',
  5932. vm
  5933. );
  5934. }
  5935. // the raw prop value was also undefined from previous render,
  5936. // return previous default value to avoid unnecessary watcher trigger
  5937. if (vm && vm.$options.propsData &&
  5938. vm.$options.propsData[key] === undefined &&
  5939. vm._props[key] !== undefined
  5940. ) {
  5941. return vm._props[key]
  5942. }
  5943. // call factory function for non-Function types
  5944. // a value is Function if its prototype is function even across different execution context
  5945. return typeof def === 'function' && getType(prop.type) !== 'Function'
  5946. ? def.call(vm)
  5947. : def
  5948. }
  5949. /**
  5950. * Assert whether a prop is valid.
  5951. */
  5952. function assertProp (
  5953. prop,
  5954. name,
  5955. value,
  5956. vm,
  5957. absent
  5958. ) {
  5959. if (prop.required && absent) {
  5960. warn(
  5961. 'Missing required prop: "' + name + '"',
  5962. vm
  5963. );
  5964. return
  5965. }
  5966. if (value == null && !prop.required) {
  5967. return
  5968. }
  5969. var type = prop.type;
  5970. var valid = !type || type === true;
  5971. var expectedTypes = [];
  5972. if (type) {
  5973. if (!Array.isArray(type)) {
  5974. type = [type];
  5975. }
  5976. for (var i = 0; i < type.length && !valid; i++) {
  5977. var assertedType = assertType(value, type[i]);
  5978. expectedTypes.push(assertedType.expectedType || '');
  5979. valid = assertedType.valid;
  5980. }
  5981. }
  5982. if (!valid) {
  5983. warn(
  5984. getInvalidTypeMessage(name, value, expectedTypes),
  5985. vm
  5986. );
  5987. return
  5988. }
  5989. var validator = prop.validator;
  5990. if (validator) {
  5991. if (!validator(value)) {
  5992. warn(
  5993. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  5994. vm
  5995. );
  5996. }
  5997. }
  5998. }
  5999. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  6000. function assertType (value, type) {
  6001. var valid;
  6002. var expectedType = getType(type);
  6003. if (simpleCheckRE.test(expectedType)) {
  6004. var t = typeof value;
  6005. valid = t === expectedType.toLowerCase();
  6006. // for primitive wrapper objects
  6007. if (!valid && t === 'object') {
  6008. valid = value instanceof type;
  6009. }
  6010. } else if (expectedType === 'Object') {
  6011. valid = isPlainObject(value);
  6012. } else if (expectedType === 'Array') {
  6013. valid = Array.isArray(value);
  6014. } else {
  6015. valid = value instanceof type;
  6016. }
  6017. return {
  6018. valid: valid,
  6019. expectedType: expectedType
  6020. }
  6021. }
  6022. /**
  6023. * Use function string name to check built-in types,
  6024. * because a simple equality check will fail when running
  6025. * across different vms / iframes.
  6026. */
  6027. function getType (fn) {
  6028. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  6029. return match ? match[1] : ''
  6030. }
  6031. function isSameType (a, b) {
  6032. return getType(a) === getType(b)
  6033. }
  6034. function getTypeIndex (type, expectedTypes) {
  6035. if (!Array.isArray(expectedTypes)) {
  6036. return isSameType(expectedTypes, type) ? 0 : -1
  6037. }
  6038. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  6039. if (isSameType(expectedTypes[i], type)) {
  6040. return i
  6041. }
  6042. }
  6043. return -1
  6044. }
  6045. function getInvalidTypeMessage (name, value, expectedTypes) {
  6046. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  6047. " Expected " + (expectedTypes.map(capitalize).join(', '));
  6048. var expectedType = expectedTypes[0];
  6049. var receivedType = toRawType(value);
  6050. var expectedValue = styleValue(value, expectedType);
  6051. var receivedValue = styleValue(value, receivedType);
  6052. // check if we need to specify expected value
  6053. if (expectedTypes.length === 1 &&
  6054. isExplicable(expectedType) &&
  6055. !isBoolean(expectedType, receivedType)) {
  6056. message += " with value " + expectedValue;
  6057. }
  6058. message += ", got " + receivedType + " ";
  6059. // check if we need to specify received value
  6060. if (isExplicable(receivedType)) {
  6061. message += "with value " + receivedValue + ".";
  6062. }
  6063. return message
  6064. }
  6065. function styleValue (value, type) {
  6066. if (type === 'String') {
  6067. return ("\"" + value + "\"")
  6068. } else if (type === 'Number') {
  6069. return ("" + (Number(value)))
  6070. } else {
  6071. return ("" + value)
  6072. }
  6073. }
  6074. function isExplicable (value) {
  6075. var explicitTypes = ['string', 'number', 'boolean'];
  6076. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  6077. }
  6078. function isBoolean () {
  6079. var args = [], len = arguments.length;
  6080. while ( len-- ) args[ len ] = arguments[ len ];
  6081. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  6082. }
  6083. /* */
  6084. function handleError (err, vm, info) {
  6085. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  6086. // See: https://github.com/vuejs/vuex/issues/1505
  6087. pushTarget();
  6088. try {
  6089. if (vm) {
  6090. var cur = vm;
  6091. while ((cur = cur.$parent)) {
  6092. var hooks = cur.$options.errorCaptured;
  6093. if (hooks) {
  6094. for (var i = 0; i < hooks.length; i++) {
  6095. try {
  6096. var capture = hooks[i].call(cur, err, vm, info) === false;
  6097. if (capture) { return }
  6098. } catch (e) {
  6099. globalHandleError(e, cur, 'errorCaptured hook');
  6100. }
  6101. }
  6102. }
  6103. }
  6104. }
  6105. globalHandleError(err, vm, info);
  6106. } finally {
  6107. popTarget();
  6108. }
  6109. }
  6110. function invokeWithErrorHandling (
  6111. handler,
  6112. context,
  6113. args,
  6114. vm,
  6115. info
  6116. ) {
  6117. var res;
  6118. try {
  6119. res = args ? handler.apply(context, args) : handler.call(context);
  6120. if (res && !res._isVue && isPromise(res) && !res._handled) {
  6121. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  6122. // issue #9511
  6123. // avoid catch triggering multiple times when nested calls
  6124. res._handled = true;
  6125. }
  6126. } catch (e) {
  6127. handleError(e, vm, info);
  6128. }
  6129. return res
  6130. }
  6131. function globalHandleError (err, vm, info) {
  6132. if (config.errorHandler) {
  6133. try {
  6134. return config.errorHandler.call(null, err, vm, info)
  6135. } catch (e) {
  6136. // if the user intentionally throws the original error in the handler,
  6137. // do not log it twice
  6138. if (e !== err) {
  6139. logError(e, null, 'config.errorHandler');
  6140. }
  6141. }
  6142. }
  6143. logError(err, vm, info);
  6144. }
  6145. function logError (err, vm, info) {
  6146. if (true) {
  6147. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  6148. }
  6149. /* istanbul ignore else */
  6150. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  6151. console.error(err);
  6152. } else {
  6153. throw err
  6154. }
  6155. }
  6156. /* */
  6157. var callbacks = [];
  6158. var pending = false;
  6159. function flushCallbacks () {
  6160. pending = false;
  6161. var copies = callbacks.slice(0);
  6162. callbacks.length = 0;
  6163. for (var i = 0; i < copies.length; i++) {
  6164. copies[i]();
  6165. }
  6166. }
  6167. // Here we have async deferring wrappers using microtasks.
  6168. // In 2.5 we used (macro) tasks (in combination with microtasks).
  6169. // However, it has subtle problems when state is changed right before repaint
  6170. // (e.g. #6813, out-in transitions).
  6171. // Also, using (macro) tasks in event handler would cause some weird behaviors
  6172. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  6173. // So we now use microtasks everywhere, again.
  6174. // A major drawback of this tradeoff is that there are some scenarios
  6175. // where microtasks have too high a priority and fire in between supposedly
  6176. // sequential events (e.g. #4521, #6690, which have workarounds)
  6177. // or even between bubbling of the same event (#6566).
  6178. var timerFunc;
  6179. // The nextTick behavior leverages the microtask queue, which can be accessed
  6180. // via either native Promise.then or MutationObserver.
  6181. // MutationObserver has wider support, however it is seriously bugged in
  6182. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  6183. // completely stops working after triggering a few times... so, if native
  6184. // Promise is available, we will use it:
  6185. /* istanbul ignore next, $flow-disable-line */
  6186. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  6187. var p = Promise.resolve();
  6188. timerFunc = function () {
  6189. p.then(flushCallbacks);
  6190. // In problematic UIWebViews, Promise.then doesn't completely break, but
  6191. // it can get stuck in a weird state where callbacks are pushed into the
  6192. // microtask queue but the queue isn't being flushed, until the browser
  6193. // needs to do some other work, e.g. handle a timer. Therefore we can
  6194. // "force" the microtask queue to be flushed by adding an empty timer.
  6195. if (isIOS) { setTimeout(noop); }
  6196. };
  6197. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  6198. isNative(MutationObserver) ||
  6199. // PhantomJS and iOS 7.x
  6200. MutationObserver.toString() === '[object MutationObserverConstructor]'
  6201. )) {
  6202. // Use MutationObserver where native Promise is not available,
  6203. // e.g. PhantomJS, iOS7, Android 4.4
  6204. // (#6466 MutationObserver is unreliable in IE11)
  6205. var counter = 1;
  6206. var observer = new MutationObserver(flushCallbacks);
  6207. var textNode = document.createTextNode(String(counter));
  6208. observer.observe(textNode, {
  6209. characterData: true
  6210. });
  6211. timerFunc = function () {
  6212. counter = (counter + 1) % 2;
  6213. textNode.data = String(counter);
  6214. };
  6215. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  6216. // Fallback to setImmediate.
  6217. // Technically it leverages the (macro) task queue,
  6218. // but it is still a better choice than setTimeout.
  6219. timerFunc = function () {
  6220. setImmediate(flushCallbacks);
  6221. };
  6222. } else {
  6223. // Fallback to setTimeout.
  6224. timerFunc = function () {
  6225. setTimeout(flushCallbacks, 0);
  6226. };
  6227. }
  6228. function nextTick (cb, ctx) {
  6229. var _resolve;
  6230. callbacks.push(function () {
  6231. if (cb) {
  6232. try {
  6233. cb.call(ctx);
  6234. } catch (e) {
  6235. handleError(e, ctx, 'nextTick');
  6236. }
  6237. } else if (_resolve) {
  6238. _resolve(ctx);
  6239. }
  6240. });
  6241. if (!pending) {
  6242. pending = true;
  6243. timerFunc();
  6244. }
  6245. // $flow-disable-line
  6246. if (!cb && typeof Promise !== 'undefined') {
  6247. return new Promise(function (resolve) {
  6248. _resolve = resolve;
  6249. })
  6250. }
  6251. }
  6252. /* */
  6253. /* not type checking this file because flow doesn't play well with Proxy */
  6254. var initProxy;
  6255. if (true) {
  6256. var allowedGlobals = makeMap(
  6257. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  6258. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  6259. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  6260. 'require' // for Webpack/Browserify
  6261. );
  6262. var warnNonPresent = function (target, key) {
  6263. warn(
  6264. "Property or method \"" + key + "\" is not defined on the instance but " +
  6265. 'referenced during render. Make sure that this property is reactive, ' +
  6266. 'either in the data option, or for class-based components, by ' +
  6267. 'initializing the property. ' +
  6268. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  6269. target
  6270. );
  6271. };
  6272. var warnReservedPrefix = function (target, key) {
  6273. warn(
  6274. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  6275. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  6276. 'prevent conflicts with Vue internals. ' +
  6277. 'See: https://vuejs.org/v2/api/#data',
  6278. target
  6279. );
  6280. };
  6281. var hasProxy =
  6282. typeof Proxy !== 'undefined' && isNative(Proxy);
  6283. if (hasProxy) {
  6284. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  6285. config.keyCodes = new Proxy(config.keyCodes, {
  6286. set: function set (target, key, value) {
  6287. if (isBuiltInModifier(key)) {
  6288. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  6289. return false
  6290. } else {
  6291. target[key] = value;
  6292. return true
  6293. }
  6294. }
  6295. });
  6296. }
  6297. var hasHandler = {
  6298. has: function has (target, key) {
  6299. var has = key in target;
  6300. var isAllowed = allowedGlobals(key) ||
  6301. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  6302. if (!has && !isAllowed) {
  6303. if (key in target.$data) { warnReservedPrefix(target, key); }
  6304. else { warnNonPresent(target, key); }
  6305. }
  6306. return has || !isAllowed
  6307. }
  6308. };
  6309. var getHandler = {
  6310. get: function get (target, key) {
  6311. if (typeof key === 'string' && !(key in target)) {
  6312. if (key in target.$data) { warnReservedPrefix(target, key); }
  6313. else { warnNonPresent(target, key); }
  6314. }
  6315. return target[key]
  6316. }
  6317. };
  6318. initProxy = function initProxy (vm) {
  6319. if (hasProxy) {
  6320. // determine which proxy handler to use
  6321. var options = vm.$options;
  6322. var handlers = options.render && options.render._withStripped
  6323. ? getHandler
  6324. : hasHandler;
  6325. vm._renderProxy = new Proxy(vm, handlers);
  6326. } else {
  6327. vm._renderProxy = vm;
  6328. }
  6329. };
  6330. }
  6331. /* */
  6332. var seenObjects = new _Set();
  6333. /**
  6334. * Recursively traverse an object to evoke all converted
  6335. * getters, so that every nested property inside the object
  6336. * is collected as a "deep" dependency.
  6337. */
  6338. function traverse (val) {
  6339. _traverse(val, seenObjects);
  6340. seenObjects.clear();
  6341. }
  6342. function _traverse (val, seen) {
  6343. var i, keys;
  6344. var isA = Array.isArray(val);
  6345. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  6346. return
  6347. }
  6348. if (val.__ob__) {
  6349. var depId = val.__ob__.dep.id;
  6350. if (seen.has(depId)) {
  6351. return
  6352. }
  6353. seen.add(depId);
  6354. }
  6355. if (isA) {
  6356. i = val.length;
  6357. while (i--) { _traverse(val[i], seen); }
  6358. } else {
  6359. keys = Object.keys(val);
  6360. i = keys.length;
  6361. while (i--) { _traverse(val[keys[i]], seen); }
  6362. }
  6363. }
  6364. var mark;
  6365. var measure;
  6366. if (true) {
  6367. var perf = inBrowser && window.performance;
  6368. /* istanbul ignore if */
  6369. if (
  6370. perf &&
  6371. perf.mark &&
  6372. perf.measure &&
  6373. perf.clearMarks &&
  6374. perf.clearMeasures
  6375. ) {
  6376. mark = function (tag) { return perf.mark(tag); };
  6377. measure = function (name, startTag, endTag) {
  6378. perf.measure(name, startTag, endTag);
  6379. perf.clearMarks(startTag);
  6380. perf.clearMarks(endTag);
  6381. // perf.clearMeasures(name)
  6382. };
  6383. }
  6384. }
  6385. /* */
  6386. var normalizeEvent = cached(function (name) {
  6387. var passive = name.charAt(0) === '&';
  6388. name = passive ? name.slice(1) : name;
  6389. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  6390. name = once$$1 ? name.slice(1) : name;
  6391. var capture = name.charAt(0) === '!';
  6392. name = capture ? name.slice(1) : name;
  6393. return {
  6394. name: name,
  6395. once: once$$1,
  6396. capture: capture,
  6397. passive: passive
  6398. }
  6399. });
  6400. function createFnInvoker (fns, vm) {
  6401. function invoker () {
  6402. var arguments$1 = arguments;
  6403. var fns = invoker.fns;
  6404. if (Array.isArray(fns)) {
  6405. var cloned = fns.slice();
  6406. for (var i = 0; i < cloned.length; i++) {
  6407. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  6408. }
  6409. } else {
  6410. // return handler return value for single handlers
  6411. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  6412. }
  6413. }
  6414. invoker.fns = fns;
  6415. return invoker
  6416. }
  6417. function updateListeners (
  6418. on,
  6419. oldOn,
  6420. add,
  6421. remove$$1,
  6422. createOnceHandler,
  6423. vm
  6424. ) {
  6425. var name, def$$1, cur, old, event;
  6426. for (name in on) {
  6427. def$$1 = cur = on[name];
  6428. old = oldOn[name];
  6429. event = normalizeEvent(name);
  6430. if (isUndef(cur)) {
  6431. true && warn(
  6432. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  6433. vm
  6434. );
  6435. } else if (isUndef(old)) {
  6436. if (isUndef(cur.fns)) {
  6437. cur = on[name] = createFnInvoker(cur, vm);
  6438. }
  6439. if (isTrue(event.once)) {
  6440. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  6441. }
  6442. add(event.name, cur, event.capture, event.passive, event.params);
  6443. } else if (cur !== old) {
  6444. old.fns = cur;
  6445. on[name] = old;
  6446. }
  6447. }
  6448. for (name in oldOn) {
  6449. if (isUndef(on[name])) {
  6450. event = normalizeEvent(name);
  6451. remove$$1(event.name, oldOn[name], event.capture);
  6452. }
  6453. }
  6454. }
  6455. /* */
  6456. /* */
  6457. // fixed by xxxxxx (mp properties)
  6458. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  6459. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  6460. if (isUndef(propOptions)) {
  6461. return res
  6462. }
  6463. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  6464. var attrs = data.attrs;
  6465. var props = data.props;
  6466. if (isDef(attrs) || isDef(props)) {
  6467. for (var key in propOptions) {
  6468. var altKey = hyphenate(key);
  6469. var result = checkProp(res, props, key, altKey, true) ||
  6470. checkProp(res, attrs, key, altKey, false);
  6471. // externalClass
  6472. if (
  6473. result &&
  6474. res[key] &&
  6475. externalClasses.indexOf(altKey) !== -1 &&
  6476. context[camelize(res[key])]
  6477. ) {
  6478. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  6479. res[key] = context[camelize(res[key])];
  6480. }
  6481. }
  6482. }
  6483. return res
  6484. }
  6485. function extractPropsFromVNodeData (
  6486. data,
  6487. Ctor,
  6488. tag,
  6489. context// fixed by xxxxxx
  6490. ) {
  6491. // we are only extracting raw values here.
  6492. // validation and default values are handled in the child
  6493. // component itself.
  6494. var propOptions = Ctor.options.props;
  6495. if (isUndef(propOptions)) {
  6496. // fixed by xxxxxx
  6497. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  6498. }
  6499. var res = {};
  6500. var attrs = data.attrs;
  6501. var props = data.props;
  6502. if (isDef(attrs) || isDef(props)) {
  6503. for (var key in propOptions) {
  6504. var altKey = hyphenate(key);
  6505. if (true) {
  6506. var keyInLowerCase = key.toLowerCase();
  6507. if (
  6508. key !== keyInLowerCase &&
  6509. attrs && hasOwn(attrs, keyInLowerCase)
  6510. ) {
  6511. tip(
  6512. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  6513. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  6514. " \"" + key + "\". " +
  6515. "Note that HTML attributes are case-insensitive and camelCased " +
  6516. "props need to use their kebab-case equivalents when using in-DOM " +
  6517. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  6518. );
  6519. }
  6520. }
  6521. checkProp(res, props, key, altKey, true) ||
  6522. checkProp(res, attrs, key, altKey, false);
  6523. }
  6524. }
  6525. // fixed by xxxxxx
  6526. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  6527. }
  6528. function checkProp (
  6529. res,
  6530. hash,
  6531. key,
  6532. altKey,
  6533. preserve
  6534. ) {
  6535. if (isDef(hash)) {
  6536. if (hasOwn(hash, key)) {
  6537. res[key] = hash[key];
  6538. if (!preserve) {
  6539. delete hash[key];
  6540. }
  6541. return true
  6542. } else if (hasOwn(hash, altKey)) {
  6543. res[key] = hash[altKey];
  6544. if (!preserve) {
  6545. delete hash[altKey];
  6546. }
  6547. return true
  6548. }
  6549. }
  6550. return false
  6551. }
  6552. /* */
  6553. // The template compiler attempts to minimize the need for normalization by
  6554. // statically analyzing the template at compile time.
  6555. //
  6556. // For plain HTML markup, normalization can be completely skipped because the
  6557. // generated render function is guaranteed to return Array<VNode>. There are
  6558. // two cases where extra normalization is needed:
  6559. // 1. When the children contains components - because a functional component
  6560. // may return an Array instead of a single root. In this case, just a simple
  6561. // normalization is needed - if any child is an Array, we flatten the whole
  6562. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  6563. // because functional components already normalize their own children.
  6564. function simpleNormalizeChildren (children) {
  6565. for (var i = 0; i < children.length; i++) {
  6566. if (Array.isArray(children[i])) {
  6567. return Array.prototype.concat.apply([], children)
  6568. }
  6569. }
  6570. return children
  6571. }
  6572. // 2. When the children contains constructs that always generated nested Arrays,
  6573. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  6574. // with hand-written render functions / JSX. In such cases a full normalization
  6575. // is needed to cater to all possible types of children values.
  6576. function normalizeChildren (children) {
  6577. return isPrimitive(children)
  6578. ? [createTextVNode(children)]
  6579. : Array.isArray(children)
  6580. ? normalizeArrayChildren(children)
  6581. : undefined
  6582. }
  6583. function isTextNode (node) {
  6584. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  6585. }
  6586. function normalizeArrayChildren (children, nestedIndex) {
  6587. var res = [];
  6588. var i, c, lastIndex, last;
  6589. for (i = 0; i < children.length; i++) {
  6590. c = children[i];
  6591. if (isUndef(c) || typeof c === 'boolean') { continue }
  6592. lastIndex = res.length - 1;
  6593. last = res[lastIndex];
  6594. // nested
  6595. if (Array.isArray(c)) {
  6596. if (c.length > 0) {
  6597. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  6598. // merge adjacent text nodes
  6599. if (isTextNode(c[0]) && isTextNode(last)) {
  6600. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  6601. c.shift();
  6602. }
  6603. res.push.apply(res, c);
  6604. }
  6605. } else if (isPrimitive(c)) {
  6606. if (isTextNode(last)) {
  6607. // merge adjacent text nodes
  6608. // this is necessary for SSR hydration because text nodes are
  6609. // essentially merged when rendered to HTML strings
  6610. res[lastIndex] = createTextVNode(last.text + c);
  6611. } else if (c !== '') {
  6612. // convert primitive to vnode
  6613. res.push(createTextVNode(c));
  6614. }
  6615. } else {
  6616. if (isTextNode(c) && isTextNode(last)) {
  6617. // merge adjacent text nodes
  6618. res[lastIndex] = createTextVNode(last.text + c.text);
  6619. } else {
  6620. // default key for nested array children (likely generated by v-for)
  6621. if (isTrue(children._isVList) &&
  6622. isDef(c.tag) &&
  6623. isUndef(c.key) &&
  6624. isDef(nestedIndex)) {
  6625. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  6626. }
  6627. res.push(c);
  6628. }
  6629. }
  6630. }
  6631. return res
  6632. }
  6633. /* */
  6634. function initProvide (vm) {
  6635. var provide = vm.$options.provide;
  6636. if (provide) {
  6637. vm._provided = typeof provide === 'function'
  6638. ? provide.call(vm)
  6639. : provide;
  6640. }
  6641. }
  6642. function initInjections (vm) {
  6643. var result = resolveInject(vm.$options.inject, vm);
  6644. if (result) {
  6645. toggleObserving(false);
  6646. Object.keys(result).forEach(function (key) {
  6647. /* istanbul ignore else */
  6648. if (true) {
  6649. defineReactive$$1(vm, key, result[key], function () {
  6650. warn(
  6651. "Avoid mutating an injected value directly since the changes will be " +
  6652. "overwritten whenever the provided component re-renders. " +
  6653. "injection being mutated: \"" + key + "\"",
  6654. vm
  6655. );
  6656. });
  6657. } else {}
  6658. });
  6659. toggleObserving(true);
  6660. }
  6661. }
  6662. function resolveInject (inject, vm) {
  6663. if (inject) {
  6664. // inject is :any because flow is not smart enough to figure out cached
  6665. var result = Object.create(null);
  6666. var keys = hasSymbol
  6667. ? Reflect.ownKeys(inject)
  6668. : Object.keys(inject);
  6669. for (var i = 0; i < keys.length; i++) {
  6670. var key = keys[i];
  6671. // #6574 in case the inject object is observed...
  6672. if (key === '__ob__') { continue }
  6673. var provideKey = inject[key].from;
  6674. var source = vm;
  6675. while (source) {
  6676. if (source._provided && hasOwn(source._provided, provideKey)) {
  6677. result[key] = source._provided[provideKey];
  6678. break
  6679. }
  6680. source = source.$parent;
  6681. }
  6682. if (!source) {
  6683. if ('default' in inject[key]) {
  6684. var provideDefault = inject[key].default;
  6685. result[key] = typeof provideDefault === 'function'
  6686. ? provideDefault.call(vm)
  6687. : provideDefault;
  6688. } else if (true) {
  6689. warn(("Injection \"" + key + "\" not found"), vm);
  6690. }
  6691. }
  6692. }
  6693. return result
  6694. }
  6695. }
  6696. /* */
  6697. /**
  6698. * Runtime helper for resolving raw children VNodes into a slot object.
  6699. */
  6700. function resolveSlots (
  6701. children,
  6702. context
  6703. ) {
  6704. if (!children || !children.length) {
  6705. return {}
  6706. }
  6707. var slots = {};
  6708. for (var i = 0, l = children.length; i < l; i++) {
  6709. var child = children[i];
  6710. var data = child.data;
  6711. // remove slot attribute if the node is resolved as a Vue slot node
  6712. if (data && data.attrs && data.attrs.slot) {
  6713. delete data.attrs.slot;
  6714. }
  6715. // named slots should only be respected if the vnode was rendered in the
  6716. // same context.
  6717. if ((child.context === context || child.fnContext === context) &&
  6718. data && data.slot != null
  6719. ) {
  6720. var name = data.slot;
  6721. var slot = (slots[name] || (slots[name] = []));
  6722. if (child.tag === 'template') {
  6723. slot.push.apply(slot, child.children || []);
  6724. } else {
  6725. slot.push(child);
  6726. }
  6727. } else {
  6728. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  6729. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  6730. (slots['page'] || (slots['page'] = [])).push(child);
  6731. }else{
  6732. (slots.default || (slots.default = [])).push(child);
  6733. }
  6734. }
  6735. }
  6736. // ignore slots that contains only whitespace
  6737. for (var name$1 in slots) {
  6738. if (slots[name$1].every(isWhitespace)) {
  6739. delete slots[name$1];
  6740. }
  6741. }
  6742. return slots
  6743. }
  6744. function isWhitespace (node) {
  6745. return (node.isComment && !node.asyncFactory) || node.text === ' '
  6746. }
  6747. /* */
  6748. function normalizeScopedSlots (
  6749. slots,
  6750. normalSlots,
  6751. prevSlots
  6752. ) {
  6753. var res;
  6754. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  6755. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  6756. var key = slots && slots.$key;
  6757. if (!slots) {
  6758. res = {};
  6759. } else if (slots._normalized) {
  6760. // fast path 1: child component re-render only, parent did not change
  6761. return slots._normalized
  6762. } else if (
  6763. isStable &&
  6764. prevSlots &&
  6765. prevSlots !== emptyObject &&
  6766. key === prevSlots.$key &&
  6767. !hasNormalSlots &&
  6768. !prevSlots.$hasNormal
  6769. ) {
  6770. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  6771. // only need to normalize once
  6772. return prevSlots
  6773. } else {
  6774. res = {};
  6775. for (var key$1 in slots) {
  6776. if (slots[key$1] && key$1[0] !== '$') {
  6777. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  6778. }
  6779. }
  6780. }
  6781. // expose normal slots on scopedSlots
  6782. for (var key$2 in normalSlots) {
  6783. if (!(key$2 in res)) {
  6784. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  6785. }
  6786. }
  6787. // avoriaz seems to mock a non-extensible $scopedSlots object
  6788. // and when that is passed down this would cause an error
  6789. if (slots && Object.isExtensible(slots)) {
  6790. (slots)._normalized = res;
  6791. }
  6792. def(res, '$stable', isStable);
  6793. def(res, '$key', key);
  6794. def(res, '$hasNormal', hasNormalSlots);
  6795. return res
  6796. }
  6797. function normalizeScopedSlot(normalSlots, key, fn) {
  6798. var normalized = function () {
  6799. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  6800. res = res && typeof res === 'object' && !Array.isArray(res)
  6801. ? [res] // single vnode
  6802. : normalizeChildren(res);
  6803. return res && (
  6804. res.length === 0 ||
  6805. (res.length === 1 && res[0].isComment) // #9658
  6806. ) ? undefined
  6807. : res
  6808. };
  6809. // this is a slot using the new v-slot syntax without scope. although it is
  6810. // compiled as a scoped slot, render fn users would expect it to be present
  6811. // on this.$slots because the usage is semantically a normal slot.
  6812. if (fn.proxy) {
  6813. Object.defineProperty(normalSlots, key, {
  6814. get: normalized,
  6815. enumerable: true,
  6816. configurable: true
  6817. });
  6818. }
  6819. return normalized
  6820. }
  6821. function proxyNormalSlot(slots, key) {
  6822. return function () { return slots[key]; }
  6823. }
  6824. /* */
  6825. /**
  6826. * Runtime helper for rendering v-for lists.
  6827. */
  6828. function renderList (
  6829. val,
  6830. render
  6831. ) {
  6832. var ret, i, l, keys, key;
  6833. if (Array.isArray(val) || typeof val === 'string') {
  6834. ret = new Array(val.length);
  6835. for (i = 0, l = val.length; i < l; i++) {
  6836. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  6837. }
  6838. } else if (typeof val === 'number') {
  6839. ret = new Array(val);
  6840. for (i = 0; i < val; i++) {
  6841. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  6842. }
  6843. } else if (isObject(val)) {
  6844. if (hasSymbol && val[Symbol.iterator]) {
  6845. ret = [];
  6846. var iterator = val[Symbol.iterator]();
  6847. var result = iterator.next();
  6848. while (!result.done) {
  6849. ret.push(render(result.value, ret.length, i++, i)); // fixed by xxxxxx
  6850. result = iterator.next();
  6851. }
  6852. } else {
  6853. keys = Object.keys(val);
  6854. ret = new Array(keys.length);
  6855. for (i = 0, l = keys.length; i < l; i++) {
  6856. key = keys[i];
  6857. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  6858. }
  6859. }
  6860. }
  6861. if (!isDef(ret)) {
  6862. ret = [];
  6863. }
  6864. (ret)._isVList = true;
  6865. return ret
  6866. }
  6867. /* */
  6868. /**
  6869. * Runtime helper for rendering <slot>
  6870. */
  6871. function renderSlot (
  6872. name,
  6873. fallback,
  6874. props,
  6875. bindObject
  6876. ) {
  6877. var scopedSlotFn = this.$scopedSlots[name];
  6878. var nodes;
  6879. if (scopedSlotFn) { // scoped slot
  6880. props = props || {};
  6881. if (bindObject) {
  6882. if ( true && !isObject(bindObject)) {
  6883. warn(
  6884. 'slot v-bind without argument expects an Object',
  6885. this
  6886. );
  6887. }
  6888. props = extend(extend({}, bindObject), props);
  6889. }
  6890. // fixed by xxxxxx app-plus scopedSlot
  6891. nodes = scopedSlotFn(props, this, props._i) || fallback;
  6892. } else {
  6893. nodes = this.$slots[name] || fallback;
  6894. }
  6895. var target = props && props.slot;
  6896. if (target) {
  6897. return this.$createElement('template', { slot: target }, nodes)
  6898. } else {
  6899. return nodes
  6900. }
  6901. }
  6902. /* */
  6903. /**
  6904. * Runtime helper for resolving filters
  6905. */
  6906. function resolveFilter (id) {
  6907. return resolveAsset(this.$options, 'filters', id, true) || identity
  6908. }
  6909. /* */
  6910. function isKeyNotMatch (expect, actual) {
  6911. if (Array.isArray(expect)) {
  6912. return expect.indexOf(actual) === -1
  6913. } else {
  6914. return expect !== actual
  6915. }
  6916. }
  6917. /**
  6918. * Runtime helper for checking keyCodes from config.
  6919. * exposed as Vue.prototype._k
  6920. * passing in eventKeyName as last argument separately for backwards compat
  6921. */
  6922. function checkKeyCodes (
  6923. eventKeyCode,
  6924. key,
  6925. builtInKeyCode,
  6926. eventKeyName,
  6927. builtInKeyName
  6928. ) {
  6929. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  6930. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  6931. return isKeyNotMatch(builtInKeyName, eventKeyName)
  6932. } else if (mappedKeyCode) {
  6933. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  6934. } else if (eventKeyName) {
  6935. return hyphenate(eventKeyName) !== key
  6936. }
  6937. }
  6938. /* */
  6939. /**
  6940. * Runtime helper for merging v-bind="object" into a VNode's data.
  6941. */
  6942. function bindObjectProps (
  6943. data,
  6944. tag,
  6945. value,
  6946. asProp,
  6947. isSync
  6948. ) {
  6949. if (value) {
  6950. if (!isObject(value)) {
  6951. true && warn(
  6952. 'v-bind without argument expects an Object or Array value',
  6953. this
  6954. );
  6955. } else {
  6956. if (Array.isArray(value)) {
  6957. value = toObject(value);
  6958. }
  6959. var hash;
  6960. var loop = function ( key ) {
  6961. if (
  6962. key === 'class' ||
  6963. key === 'style' ||
  6964. isReservedAttribute(key)
  6965. ) {
  6966. hash = data;
  6967. } else {
  6968. var type = data.attrs && data.attrs.type;
  6969. hash = asProp || config.mustUseProp(tag, type, key)
  6970. ? data.domProps || (data.domProps = {})
  6971. : data.attrs || (data.attrs = {});
  6972. }
  6973. var camelizedKey = camelize(key);
  6974. var hyphenatedKey = hyphenate(key);
  6975. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  6976. hash[key] = value[key];
  6977. if (isSync) {
  6978. var on = data.on || (data.on = {});
  6979. on[("update:" + key)] = function ($event) {
  6980. value[key] = $event;
  6981. };
  6982. }
  6983. }
  6984. };
  6985. for (var key in value) loop( key );
  6986. }
  6987. }
  6988. return data
  6989. }
  6990. /* */
  6991. /**
  6992. * Runtime helper for rendering static trees.
  6993. */
  6994. function renderStatic (
  6995. index,
  6996. isInFor
  6997. ) {
  6998. var cached = this._staticTrees || (this._staticTrees = []);
  6999. var tree = cached[index];
  7000. // if has already-rendered static tree and not inside v-for,
  7001. // we can reuse the same tree.
  7002. if (tree && !isInFor) {
  7003. return tree
  7004. }
  7005. // otherwise, render a fresh tree.
  7006. tree = cached[index] = this.$options.staticRenderFns[index].call(
  7007. this._renderProxy,
  7008. null,
  7009. this // for render fns generated for functional component templates
  7010. );
  7011. markStatic(tree, ("__static__" + index), false);
  7012. return tree
  7013. }
  7014. /**
  7015. * Runtime helper for v-once.
  7016. * Effectively it means marking the node as static with a unique key.
  7017. */
  7018. function markOnce (
  7019. tree,
  7020. index,
  7021. key
  7022. ) {
  7023. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  7024. return tree
  7025. }
  7026. function markStatic (
  7027. tree,
  7028. key,
  7029. isOnce
  7030. ) {
  7031. if (Array.isArray(tree)) {
  7032. for (var i = 0; i < tree.length; i++) {
  7033. if (tree[i] && typeof tree[i] !== 'string') {
  7034. markStaticNode(tree[i], (key + "_" + i), isOnce);
  7035. }
  7036. }
  7037. } else {
  7038. markStaticNode(tree, key, isOnce);
  7039. }
  7040. }
  7041. function markStaticNode (node, key, isOnce) {
  7042. node.isStatic = true;
  7043. node.key = key;
  7044. node.isOnce = isOnce;
  7045. }
  7046. /* */
  7047. function bindObjectListeners (data, value) {
  7048. if (value) {
  7049. if (!isPlainObject(value)) {
  7050. true && warn(
  7051. 'v-on without argument expects an Object value',
  7052. this
  7053. );
  7054. } else {
  7055. var on = data.on = data.on ? extend({}, data.on) : {};
  7056. for (var key in value) {
  7057. var existing = on[key];
  7058. var ours = value[key];
  7059. on[key] = existing ? [].concat(existing, ours) : ours;
  7060. }
  7061. }
  7062. }
  7063. return data
  7064. }
  7065. /* */
  7066. function resolveScopedSlots (
  7067. fns, // see flow/vnode
  7068. res,
  7069. // the following are added in 2.6
  7070. hasDynamicKeys,
  7071. contentHashKey
  7072. ) {
  7073. res = res || { $stable: !hasDynamicKeys };
  7074. for (var i = 0; i < fns.length; i++) {
  7075. var slot = fns[i];
  7076. if (Array.isArray(slot)) {
  7077. resolveScopedSlots(slot, res, hasDynamicKeys);
  7078. } else if (slot) {
  7079. // marker for reverse proxying v-slot without scope on this.$slots
  7080. if (slot.proxy) {
  7081. slot.fn.proxy = true;
  7082. }
  7083. res[slot.key] = slot.fn;
  7084. }
  7085. }
  7086. if (contentHashKey) {
  7087. (res).$key = contentHashKey;
  7088. }
  7089. return res
  7090. }
  7091. /* */
  7092. function bindDynamicKeys (baseObj, values) {
  7093. for (var i = 0; i < values.length; i += 2) {
  7094. var key = values[i];
  7095. if (typeof key === 'string' && key) {
  7096. baseObj[values[i]] = values[i + 1];
  7097. } else if ( true && key !== '' && key !== null) {
  7098. // null is a special value for explicitly removing a binding
  7099. warn(
  7100. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  7101. this
  7102. );
  7103. }
  7104. }
  7105. return baseObj
  7106. }
  7107. // helper to dynamically append modifier runtime markers to event names.
  7108. // ensure only append when value is already string, otherwise it will be cast
  7109. // to string and cause the type check to miss.
  7110. function prependModifier (value, symbol) {
  7111. return typeof value === 'string' ? symbol + value : value
  7112. }
  7113. /* */
  7114. function installRenderHelpers (target) {
  7115. target._o = markOnce;
  7116. target._n = toNumber;
  7117. target._s = toString;
  7118. target._l = renderList;
  7119. target._t = renderSlot;
  7120. target._q = looseEqual;
  7121. target._i = looseIndexOf;
  7122. target._m = renderStatic;
  7123. target._f = resolveFilter;
  7124. target._k = checkKeyCodes;
  7125. target._b = bindObjectProps;
  7126. target._v = createTextVNode;
  7127. target._e = createEmptyVNode;
  7128. target._u = resolveScopedSlots;
  7129. target._g = bindObjectListeners;
  7130. target._d = bindDynamicKeys;
  7131. target._p = prependModifier;
  7132. }
  7133. /* */
  7134. function FunctionalRenderContext (
  7135. data,
  7136. props,
  7137. children,
  7138. parent,
  7139. Ctor
  7140. ) {
  7141. var this$1 = this;
  7142. var options = Ctor.options;
  7143. // ensure the createElement function in functional components
  7144. // gets a unique context - this is necessary for correct named slot check
  7145. var contextVm;
  7146. if (hasOwn(parent, '_uid')) {
  7147. contextVm = Object.create(parent);
  7148. // $flow-disable-line
  7149. contextVm._original = parent;
  7150. } else {
  7151. // the context vm passed in is a functional context as well.
  7152. // in this case we want to make sure we are able to get a hold to the
  7153. // real context instance.
  7154. contextVm = parent;
  7155. // $flow-disable-line
  7156. parent = parent._original;
  7157. }
  7158. var isCompiled = isTrue(options._compiled);
  7159. var needNormalization = !isCompiled;
  7160. this.data = data;
  7161. this.props = props;
  7162. this.children = children;
  7163. this.parent = parent;
  7164. this.listeners = data.on || emptyObject;
  7165. this.injections = resolveInject(options.inject, parent);
  7166. this.slots = function () {
  7167. if (!this$1.$slots) {
  7168. normalizeScopedSlots(
  7169. data.scopedSlots,
  7170. this$1.$slots = resolveSlots(children, parent)
  7171. );
  7172. }
  7173. return this$1.$slots
  7174. };
  7175. Object.defineProperty(this, 'scopedSlots', ({
  7176. enumerable: true,
  7177. get: function get () {
  7178. return normalizeScopedSlots(data.scopedSlots, this.slots())
  7179. }
  7180. }));
  7181. // support for compiled functional template
  7182. if (isCompiled) {
  7183. // exposing $options for renderStatic()
  7184. this.$options = options;
  7185. // pre-resolve slots for renderSlot()
  7186. this.$slots = this.slots();
  7187. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  7188. }
  7189. if (options._scopeId) {
  7190. this._c = function (a, b, c, d) {
  7191. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  7192. if (vnode && !Array.isArray(vnode)) {
  7193. vnode.fnScopeId = options._scopeId;
  7194. vnode.fnContext = parent;
  7195. }
  7196. return vnode
  7197. };
  7198. } else {
  7199. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  7200. }
  7201. }
  7202. installRenderHelpers(FunctionalRenderContext.prototype);
  7203. function createFunctionalComponent (
  7204. Ctor,
  7205. propsData,
  7206. data,
  7207. contextVm,
  7208. children
  7209. ) {
  7210. var options = Ctor.options;
  7211. var props = {};
  7212. var propOptions = options.props;
  7213. if (isDef(propOptions)) {
  7214. for (var key in propOptions) {
  7215. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  7216. }
  7217. } else {
  7218. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  7219. if (isDef(data.props)) { mergeProps(props, data.props); }
  7220. }
  7221. var renderContext = new FunctionalRenderContext(
  7222. data,
  7223. props,
  7224. children,
  7225. contextVm,
  7226. Ctor
  7227. );
  7228. var vnode = options.render.call(null, renderContext._c, renderContext);
  7229. if (vnode instanceof VNode) {
  7230. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  7231. } else if (Array.isArray(vnode)) {
  7232. var vnodes = normalizeChildren(vnode) || [];
  7233. var res = new Array(vnodes.length);
  7234. for (var i = 0; i < vnodes.length; i++) {
  7235. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  7236. }
  7237. return res
  7238. }
  7239. }
  7240. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  7241. // #7817 clone node before setting fnContext, otherwise if the node is reused
  7242. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  7243. // that should not be matched to match.
  7244. var clone = cloneVNode(vnode);
  7245. clone.fnContext = contextVm;
  7246. clone.fnOptions = options;
  7247. if (true) {
  7248. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  7249. }
  7250. if (data.slot) {
  7251. (clone.data || (clone.data = {})).slot = data.slot;
  7252. }
  7253. return clone
  7254. }
  7255. function mergeProps (to, from) {
  7256. for (var key in from) {
  7257. to[camelize(key)] = from[key];
  7258. }
  7259. }
  7260. /* */
  7261. /* */
  7262. /* */
  7263. /* */
  7264. // inline hooks to be invoked on component VNodes during patch
  7265. var componentVNodeHooks = {
  7266. init: function init (vnode, hydrating) {
  7267. if (
  7268. vnode.componentInstance &&
  7269. !vnode.componentInstance._isDestroyed &&
  7270. vnode.data.keepAlive
  7271. ) {
  7272. // kept-alive components, treat as a patch
  7273. var mountedNode = vnode; // work around flow
  7274. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  7275. } else {
  7276. var child = vnode.componentInstance = createComponentInstanceForVnode(
  7277. vnode,
  7278. activeInstance
  7279. );
  7280. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  7281. }
  7282. },
  7283. prepatch: function prepatch (oldVnode, vnode) {
  7284. var options = vnode.componentOptions;
  7285. var child = vnode.componentInstance = oldVnode.componentInstance;
  7286. updateChildComponent(
  7287. child,
  7288. options.propsData, // updated props
  7289. options.listeners, // updated listeners
  7290. vnode, // new parent vnode
  7291. options.children // new children
  7292. );
  7293. },
  7294. insert: function insert (vnode) {
  7295. var context = vnode.context;
  7296. var componentInstance = vnode.componentInstance;
  7297. if (!componentInstance._isMounted) {
  7298. callHook(componentInstance, 'onServiceCreated');
  7299. callHook(componentInstance, 'onServiceAttached');
  7300. componentInstance._isMounted = true;
  7301. callHook(componentInstance, 'mounted');
  7302. }
  7303. if (vnode.data.keepAlive) {
  7304. if (context._isMounted) {
  7305. // vue-router#1212
  7306. // During updates, a kept-alive component's child components may
  7307. // change, so directly walking the tree here may call activated hooks
  7308. // on incorrect children. Instead we push them into a queue which will
  7309. // be processed after the whole patch process ended.
  7310. queueActivatedComponent(componentInstance);
  7311. } else {
  7312. activateChildComponent(componentInstance, true /* direct */);
  7313. }
  7314. }
  7315. },
  7316. destroy: function destroy (vnode) {
  7317. var componentInstance = vnode.componentInstance;
  7318. if (!componentInstance._isDestroyed) {
  7319. if (!vnode.data.keepAlive) {
  7320. componentInstance.$destroy();
  7321. } else {
  7322. deactivateChildComponent(componentInstance, true /* direct */);
  7323. }
  7324. }
  7325. }
  7326. };
  7327. var hooksToMerge = Object.keys(componentVNodeHooks);
  7328. function createComponent (
  7329. Ctor,
  7330. data,
  7331. context,
  7332. children,
  7333. tag
  7334. ) {
  7335. if (isUndef(Ctor)) {
  7336. return
  7337. }
  7338. var baseCtor = context.$options._base;
  7339. // plain options object: turn it into a constructor
  7340. if (isObject(Ctor)) {
  7341. Ctor = baseCtor.extend(Ctor);
  7342. }
  7343. // if at this stage it's not a constructor or an async component factory,
  7344. // reject.
  7345. if (typeof Ctor !== 'function') {
  7346. if (true) {
  7347. warn(("Invalid Component definition: " + (String(Ctor))), context);
  7348. }
  7349. return
  7350. }
  7351. // async component
  7352. var asyncFactory;
  7353. if (isUndef(Ctor.cid)) {
  7354. asyncFactory = Ctor;
  7355. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  7356. if (Ctor === undefined) {
  7357. // return a placeholder node for async component, which is rendered
  7358. // as a comment node but preserves all the raw information for the node.
  7359. // the information will be used for async server-rendering and hydration.
  7360. return createAsyncPlaceholder(
  7361. asyncFactory,
  7362. data,
  7363. context,
  7364. children,
  7365. tag
  7366. )
  7367. }
  7368. }
  7369. data = data || {};
  7370. // resolve constructor options in case global mixins are applied after
  7371. // component constructor creation
  7372. resolveConstructorOptions(Ctor);
  7373. // transform component v-model data into props & events
  7374. if (isDef(data.model)) {
  7375. transformModel(Ctor.options, data);
  7376. }
  7377. // extract props
  7378. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  7379. // functional component
  7380. if (isTrue(Ctor.options.functional)) {
  7381. return createFunctionalComponent(Ctor, propsData, data, context, children)
  7382. }
  7383. // extract listeners, since these needs to be treated as
  7384. // child component listeners instead of DOM listeners
  7385. var listeners = data.on;
  7386. // replace with listeners with .native modifier
  7387. // so it gets processed during parent component patch.
  7388. data.on = data.nativeOn;
  7389. if (isTrue(Ctor.options.abstract)) {
  7390. // abstract components do not keep anything
  7391. // other than props & listeners & slot
  7392. // work around flow
  7393. var slot = data.slot;
  7394. data = {};
  7395. if (slot) {
  7396. data.slot = slot;
  7397. }
  7398. }
  7399. // install component management hooks onto the placeholder node
  7400. installComponentHooks(data);
  7401. // return a placeholder vnode
  7402. var name = Ctor.options.name || tag;
  7403. var vnode = new VNode(
  7404. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  7405. data, undefined, undefined, undefined, context,
  7406. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  7407. asyncFactory
  7408. );
  7409. return vnode
  7410. }
  7411. function createComponentInstanceForVnode (
  7412. vnode, // we know it's MountedComponentVNode but flow doesn't
  7413. parent // activeInstance in lifecycle state
  7414. ) {
  7415. var options = {
  7416. _isComponent: true,
  7417. _parentVnode: vnode,
  7418. parent: parent
  7419. };
  7420. // check inline-template render functions
  7421. var inlineTemplate = vnode.data.inlineTemplate;
  7422. if (isDef(inlineTemplate)) {
  7423. options.render = inlineTemplate.render;
  7424. options.staticRenderFns = inlineTemplate.staticRenderFns;
  7425. }
  7426. return new vnode.componentOptions.Ctor(options)
  7427. }
  7428. function installComponentHooks (data) {
  7429. var hooks = data.hook || (data.hook = {});
  7430. for (var i = 0; i < hooksToMerge.length; i++) {
  7431. var key = hooksToMerge[i];
  7432. var existing = hooks[key];
  7433. var toMerge = componentVNodeHooks[key];
  7434. if (existing !== toMerge && !(existing && existing._merged)) {
  7435. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  7436. }
  7437. }
  7438. }
  7439. function mergeHook$1 (f1, f2) {
  7440. var merged = function (a, b) {
  7441. // flow complains about extra args which is why we use any
  7442. f1(a, b);
  7443. f2(a, b);
  7444. };
  7445. merged._merged = true;
  7446. return merged
  7447. }
  7448. // transform component v-model info (value and callback) into
  7449. // prop and event handler respectively.
  7450. function transformModel (options, data) {
  7451. var prop = (options.model && options.model.prop) || 'value';
  7452. var event = (options.model && options.model.event) || 'input'
  7453. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  7454. var on = data.on || (data.on = {});
  7455. var existing = on[event];
  7456. var callback = data.model.callback;
  7457. if (isDef(existing)) {
  7458. if (
  7459. Array.isArray(existing)
  7460. ? existing.indexOf(callback) === -1
  7461. : existing !== callback
  7462. ) {
  7463. on[event] = [callback].concat(existing);
  7464. }
  7465. } else {
  7466. on[event] = callback;
  7467. }
  7468. }
  7469. /* */
  7470. var SIMPLE_NORMALIZE = 1;
  7471. var ALWAYS_NORMALIZE = 2;
  7472. // wrapper function for providing a more flexible interface
  7473. // without getting yelled at by flow
  7474. function createElement (
  7475. context,
  7476. tag,
  7477. data,
  7478. children,
  7479. normalizationType,
  7480. alwaysNormalize
  7481. ) {
  7482. if (Array.isArray(data) || isPrimitive(data)) {
  7483. normalizationType = children;
  7484. children = data;
  7485. data = undefined;
  7486. }
  7487. if (isTrue(alwaysNormalize)) {
  7488. normalizationType = ALWAYS_NORMALIZE;
  7489. }
  7490. return _createElement(context, tag, data, children, normalizationType)
  7491. }
  7492. function _createElement (
  7493. context,
  7494. tag,
  7495. data,
  7496. children,
  7497. normalizationType
  7498. ) {
  7499. if (isDef(data) && isDef((data).__ob__)) {
  7500. true && warn(
  7501. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  7502. 'Always create fresh vnode data objects in each render!',
  7503. context
  7504. );
  7505. return createEmptyVNode()
  7506. }
  7507. // object syntax in v-bind
  7508. if (isDef(data) && isDef(data.is)) {
  7509. tag = data.is;
  7510. }
  7511. if (!tag) {
  7512. // in case of component :is set to falsy value
  7513. return createEmptyVNode()
  7514. }
  7515. // warn against non-primitive key
  7516. if ( true &&
  7517. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  7518. ) {
  7519. {
  7520. warn(
  7521. 'Avoid using non-primitive value as key, ' +
  7522. 'use string/number value instead.',
  7523. context
  7524. );
  7525. }
  7526. }
  7527. // support single function children as default scoped slot
  7528. if (Array.isArray(children) &&
  7529. typeof children[0] === 'function'
  7530. ) {
  7531. data = data || {};
  7532. data.scopedSlots = { default: children[0] };
  7533. children.length = 0;
  7534. }
  7535. if (normalizationType === ALWAYS_NORMALIZE) {
  7536. children = normalizeChildren(children);
  7537. } else if (normalizationType === SIMPLE_NORMALIZE) {
  7538. children = simpleNormalizeChildren(children);
  7539. }
  7540. var vnode, ns;
  7541. if (typeof tag === 'string') {
  7542. var Ctor;
  7543. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  7544. if (config.isReservedTag(tag)) {
  7545. // platform built-in elements
  7546. if ( true && isDef(data) && isDef(data.nativeOn)) {
  7547. warn(
  7548. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  7549. context
  7550. );
  7551. }
  7552. vnode = new VNode(
  7553. config.parsePlatformTagName(tag), data, children,
  7554. undefined, undefined, context
  7555. );
  7556. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  7557. // component
  7558. vnode = createComponent(Ctor, data, context, children, tag);
  7559. } else {
  7560. // unknown or unlisted namespaced elements
  7561. // check at runtime because it may get assigned a namespace when its
  7562. // parent normalizes children
  7563. vnode = new VNode(
  7564. tag, data, children,
  7565. undefined, undefined, context
  7566. );
  7567. }
  7568. } else {
  7569. // direct component options / constructor
  7570. vnode = createComponent(tag, data, context, children);
  7571. }
  7572. if (Array.isArray(vnode)) {
  7573. return vnode
  7574. } else if (isDef(vnode)) {
  7575. if (isDef(ns)) { applyNS(vnode, ns); }
  7576. if (isDef(data)) { registerDeepBindings(data); }
  7577. return vnode
  7578. } else {
  7579. return createEmptyVNode()
  7580. }
  7581. }
  7582. function applyNS (vnode, ns, force) {
  7583. vnode.ns = ns;
  7584. if (vnode.tag === 'foreignObject') {
  7585. // use default namespace inside foreignObject
  7586. ns = undefined;
  7587. force = true;
  7588. }
  7589. if (isDef(vnode.children)) {
  7590. for (var i = 0, l = vnode.children.length; i < l; i++) {
  7591. var child = vnode.children[i];
  7592. if (isDef(child.tag) && (
  7593. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  7594. applyNS(child, ns, force);
  7595. }
  7596. }
  7597. }
  7598. }
  7599. // ref #5318
  7600. // necessary to ensure parent re-render when deep bindings like :style and
  7601. // :class are used on slot nodes
  7602. function registerDeepBindings (data) {
  7603. if (isObject(data.style)) {
  7604. traverse(data.style);
  7605. }
  7606. if (isObject(data.class)) {
  7607. traverse(data.class);
  7608. }
  7609. }
  7610. /* */
  7611. function initRender (vm) {
  7612. vm._vnode = null; // the root of the child tree
  7613. vm._staticTrees = null; // v-once cached trees
  7614. var options = vm.$options;
  7615. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  7616. var renderContext = parentVnode && parentVnode.context;
  7617. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  7618. vm.$scopedSlots = emptyObject;
  7619. // bind the createElement fn to this instance
  7620. // so that we get proper render context inside it.
  7621. // args order: tag, data, children, normalizationType, alwaysNormalize
  7622. // internal version is used by render functions compiled from templates
  7623. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  7624. // normalization is always applied for the public version, used in
  7625. // user-written render functions.
  7626. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  7627. // $attrs & $listeners are exposed for easier HOC creation.
  7628. // they need to be reactive so that HOCs using them are always updated
  7629. var parentData = parentVnode && parentVnode.data;
  7630. /* istanbul ignore else */
  7631. if (true) {
  7632. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  7633. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  7634. }, true);
  7635. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  7636. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  7637. }, true);
  7638. } else {}
  7639. }
  7640. var currentRenderingInstance = null;
  7641. function renderMixin (Vue) {
  7642. // install runtime convenience helpers
  7643. installRenderHelpers(Vue.prototype);
  7644. Vue.prototype.$nextTick = function (fn) {
  7645. return nextTick(fn, this)
  7646. };
  7647. Vue.prototype._render = function () {
  7648. var vm = this;
  7649. var ref = vm.$options;
  7650. var render = ref.render;
  7651. var _parentVnode = ref._parentVnode;
  7652. if (_parentVnode) {
  7653. vm.$scopedSlots = normalizeScopedSlots(
  7654. _parentVnode.data.scopedSlots,
  7655. vm.$slots,
  7656. vm.$scopedSlots
  7657. );
  7658. }
  7659. // set parent vnode. this allows render functions to have access
  7660. // to the data on the placeholder node.
  7661. vm.$vnode = _parentVnode;
  7662. // render self
  7663. var vnode;
  7664. try {
  7665. // There's no need to maintain a stack because all render fns are called
  7666. // separately from one another. Nested component's render fns are called
  7667. // when parent component is patched.
  7668. currentRenderingInstance = vm;
  7669. vnode = render.call(vm._renderProxy, vm.$createElement);
  7670. } catch (e) {
  7671. handleError(e, vm, "render");
  7672. // return error render result,
  7673. // or previous vnode to prevent render error causing blank component
  7674. /* istanbul ignore else */
  7675. if ( true && vm.$options.renderError) {
  7676. try {
  7677. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  7678. } catch (e) {
  7679. handleError(e, vm, "renderError");
  7680. vnode = vm._vnode;
  7681. }
  7682. } else {
  7683. vnode = vm._vnode;
  7684. }
  7685. } finally {
  7686. currentRenderingInstance = null;
  7687. }
  7688. // if the returned array contains only a single node, allow it
  7689. if (Array.isArray(vnode) && vnode.length === 1) {
  7690. vnode = vnode[0];
  7691. }
  7692. // return empty vnode in case the render function errored out
  7693. if (!(vnode instanceof VNode)) {
  7694. if ( true && Array.isArray(vnode)) {
  7695. warn(
  7696. 'Multiple root nodes returned from render function. Render function ' +
  7697. 'should return a single root node.',
  7698. vm
  7699. );
  7700. }
  7701. vnode = createEmptyVNode();
  7702. }
  7703. // set parent
  7704. vnode.parent = _parentVnode;
  7705. return vnode
  7706. };
  7707. }
  7708. /* */
  7709. function ensureCtor (comp, base) {
  7710. if (
  7711. comp.__esModule ||
  7712. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  7713. ) {
  7714. comp = comp.default;
  7715. }
  7716. return isObject(comp)
  7717. ? base.extend(comp)
  7718. : comp
  7719. }
  7720. function createAsyncPlaceholder (
  7721. factory,
  7722. data,
  7723. context,
  7724. children,
  7725. tag
  7726. ) {
  7727. var node = createEmptyVNode();
  7728. node.asyncFactory = factory;
  7729. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  7730. return node
  7731. }
  7732. function resolveAsyncComponent (
  7733. factory,
  7734. baseCtor
  7735. ) {
  7736. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  7737. return factory.errorComp
  7738. }
  7739. if (isDef(factory.resolved)) {
  7740. return factory.resolved
  7741. }
  7742. var owner = currentRenderingInstance;
  7743. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  7744. // already pending
  7745. factory.owners.push(owner);
  7746. }
  7747. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  7748. return factory.loadingComp
  7749. }
  7750. if (owner && !isDef(factory.owners)) {
  7751. var owners = factory.owners = [owner];
  7752. var sync = true;
  7753. var timerLoading = null;
  7754. var timerTimeout = null
  7755. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  7756. var forceRender = function (renderCompleted) {
  7757. for (var i = 0, l = owners.length; i < l; i++) {
  7758. (owners[i]).$forceUpdate();
  7759. }
  7760. if (renderCompleted) {
  7761. owners.length = 0;
  7762. if (timerLoading !== null) {
  7763. clearTimeout(timerLoading);
  7764. timerLoading = null;
  7765. }
  7766. if (timerTimeout !== null) {
  7767. clearTimeout(timerTimeout);
  7768. timerTimeout = null;
  7769. }
  7770. }
  7771. };
  7772. var resolve = once(function (res) {
  7773. // cache resolved
  7774. factory.resolved = ensureCtor(res, baseCtor);
  7775. // invoke callbacks only if this is not a synchronous resolve
  7776. // (async resolves are shimmed as synchronous during SSR)
  7777. if (!sync) {
  7778. forceRender(true);
  7779. } else {
  7780. owners.length = 0;
  7781. }
  7782. });
  7783. var reject = once(function (reason) {
  7784. true && warn(
  7785. "Failed to resolve async component: " + (String(factory)) +
  7786. (reason ? ("\nReason: " + reason) : '')
  7787. );
  7788. if (isDef(factory.errorComp)) {
  7789. factory.error = true;
  7790. forceRender(true);
  7791. }
  7792. });
  7793. var res = factory(resolve, reject);
  7794. if (isObject(res)) {
  7795. if (isPromise(res)) {
  7796. // () => Promise
  7797. if (isUndef(factory.resolved)) {
  7798. res.then(resolve, reject);
  7799. }
  7800. } else if (isPromise(res.component)) {
  7801. res.component.then(resolve, reject);
  7802. if (isDef(res.error)) {
  7803. factory.errorComp = ensureCtor(res.error, baseCtor);
  7804. }
  7805. if (isDef(res.loading)) {
  7806. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  7807. if (res.delay === 0) {
  7808. factory.loading = true;
  7809. } else {
  7810. timerLoading = setTimeout(function () {
  7811. timerLoading = null;
  7812. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  7813. factory.loading = true;
  7814. forceRender(false);
  7815. }
  7816. }, res.delay || 200);
  7817. }
  7818. }
  7819. if (isDef(res.timeout)) {
  7820. timerTimeout = setTimeout(function () {
  7821. timerTimeout = null;
  7822. if (isUndef(factory.resolved)) {
  7823. reject(
  7824. true
  7825. ? ("timeout (" + (res.timeout) + "ms)")
  7826. : undefined
  7827. );
  7828. }
  7829. }, res.timeout);
  7830. }
  7831. }
  7832. }
  7833. sync = false;
  7834. // return in case resolved synchronously
  7835. return factory.loading
  7836. ? factory.loadingComp
  7837. : factory.resolved
  7838. }
  7839. }
  7840. /* */
  7841. function isAsyncPlaceholder (node) {
  7842. return node.isComment && node.asyncFactory
  7843. }
  7844. /* */
  7845. function getFirstComponentChild (children) {
  7846. if (Array.isArray(children)) {
  7847. for (var i = 0; i < children.length; i++) {
  7848. var c = children[i];
  7849. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  7850. return c
  7851. }
  7852. }
  7853. }
  7854. }
  7855. /* */
  7856. /* */
  7857. function initEvents (vm) {
  7858. vm._events = Object.create(null);
  7859. vm._hasHookEvent = false;
  7860. // init parent attached events
  7861. var listeners = vm.$options._parentListeners;
  7862. if (listeners) {
  7863. updateComponentListeners(vm, listeners);
  7864. }
  7865. }
  7866. var target;
  7867. function add (event, fn) {
  7868. target.$on(event, fn);
  7869. }
  7870. function remove$1 (event, fn) {
  7871. target.$off(event, fn);
  7872. }
  7873. function createOnceHandler (event, fn) {
  7874. var _target = target;
  7875. return function onceHandler () {
  7876. var res = fn.apply(null, arguments);
  7877. if (res !== null) {
  7878. _target.$off(event, onceHandler);
  7879. }
  7880. }
  7881. }
  7882. function updateComponentListeners (
  7883. vm,
  7884. listeners,
  7885. oldListeners
  7886. ) {
  7887. target = vm;
  7888. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  7889. target = undefined;
  7890. }
  7891. function eventsMixin (Vue) {
  7892. var hookRE = /^hook:/;
  7893. Vue.prototype.$on = function (event, fn) {
  7894. var vm = this;
  7895. if (Array.isArray(event)) {
  7896. for (var i = 0, l = event.length; i < l; i++) {
  7897. vm.$on(event[i], fn);
  7898. }
  7899. } else {
  7900. (vm._events[event] || (vm._events[event] = [])).push(fn);
  7901. // optimize hook:event cost by using a boolean flag marked at registration
  7902. // instead of a hash lookup
  7903. if (hookRE.test(event)) {
  7904. vm._hasHookEvent = true;
  7905. }
  7906. }
  7907. return vm
  7908. };
  7909. Vue.prototype.$once = function (event, fn) {
  7910. var vm = this;
  7911. function on () {
  7912. vm.$off(event, on);
  7913. fn.apply(vm, arguments);
  7914. }
  7915. on.fn = fn;
  7916. vm.$on(event, on);
  7917. return vm
  7918. };
  7919. Vue.prototype.$off = function (event, fn) {
  7920. var vm = this;
  7921. // all
  7922. if (!arguments.length) {
  7923. vm._events = Object.create(null);
  7924. return vm
  7925. }
  7926. // array of events
  7927. if (Array.isArray(event)) {
  7928. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  7929. vm.$off(event[i$1], fn);
  7930. }
  7931. return vm
  7932. }
  7933. // specific event
  7934. var cbs = vm._events[event];
  7935. if (!cbs) {
  7936. return vm
  7937. }
  7938. if (!fn) {
  7939. vm._events[event] = null;
  7940. return vm
  7941. }
  7942. // specific handler
  7943. var cb;
  7944. var i = cbs.length;
  7945. while (i--) {
  7946. cb = cbs[i];
  7947. if (cb === fn || cb.fn === fn) {
  7948. cbs.splice(i, 1);
  7949. break
  7950. }
  7951. }
  7952. return vm
  7953. };
  7954. Vue.prototype.$emit = function (event) {
  7955. var vm = this;
  7956. if (true) {
  7957. var lowerCaseEvent = event.toLowerCase();
  7958. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  7959. tip(
  7960. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  7961. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  7962. "Note that HTML attributes are case-insensitive and you cannot use " +
  7963. "v-on to listen to camelCase events when using in-DOM templates. " +
  7964. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  7965. );
  7966. }
  7967. }
  7968. var cbs = vm._events[event];
  7969. if (cbs) {
  7970. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  7971. var args = toArray(arguments, 1);
  7972. var info = "event handler for \"" + event + "\"";
  7973. for (var i = 0, l = cbs.length; i < l; i++) {
  7974. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  7975. }
  7976. }
  7977. return vm
  7978. };
  7979. }
  7980. /* */
  7981. var activeInstance = null;
  7982. var isUpdatingChildComponent = false;
  7983. function setActiveInstance(vm) {
  7984. var prevActiveInstance = activeInstance;
  7985. activeInstance = vm;
  7986. return function () {
  7987. activeInstance = prevActiveInstance;
  7988. }
  7989. }
  7990. function initLifecycle (vm) {
  7991. var options = vm.$options;
  7992. // locate first non-abstract parent
  7993. var parent = options.parent;
  7994. if (parent && !options.abstract) {
  7995. while (parent.$options.abstract && parent.$parent) {
  7996. parent = parent.$parent;
  7997. }
  7998. parent.$children.push(vm);
  7999. }
  8000. vm.$parent = parent;
  8001. vm.$root = parent ? parent.$root : vm;
  8002. vm.$children = [];
  8003. vm.$refs = {};
  8004. vm._watcher = null;
  8005. vm._inactive = null;
  8006. vm._directInactive = false;
  8007. vm._isMounted = false;
  8008. vm._isDestroyed = false;
  8009. vm._isBeingDestroyed = false;
  8010. }
  8011. function lifecycleMixin (Vue) {
  8012. Vue.prototype._update = function (vnode, hydrating) {
  8013. var vm = this;
  8014. var prevEl = vm.$el;
  8015. var prevVnode = vm._vnode;
  8016. var restoreActiveInstance = setActiveInstance(vm);
  8017. vm._vnode = vnode;
  8018. // Vue.prototype.__patch__ is injected in entry points
  8019. // based on the rendering backend used.
  8020. if (!prevVnode) {
  8021. // initial render
  8022. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  8023. } else {
  8024. // updates
  8025. vm.$el = vm.__patch__(prevVnode, vnode);
  8026. }
  8027. restoreActiveInstance();
  8028. // update __vue__ reference
  8029. if (prevEl) {
  8030. prevEl.__vue__ = null;
  8031. }
  8032. if (vm.$el) {
  8033. vm.$el.__vue__ = vm;
  8034. }
  8035. // if parent is an HOC, update its $el as well
  8036. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  8037. vm.$parent.$el = vm.$el;
  8038. }
  8039. // updated hook is called by the scheduler to ensure that children are
  8040. // updated in a parent's updated hook.
  8041. };
  8042. Vue.prototype.$forceUpdate = function () {
  8043. var vm = this;
  8044. if (vm._watcher) {
  8045. vm._watcher.update();
  8046. }
  8047. };
  8048. Vue.prototype.$destroy = function () {
  8049. var vm = this;
  8050. if (vm._isBeingDestroyed) {
  8051. return
  8052. }
  8053. callHook(vm, 'beforeDestroy');
  8054. vm._isBeingDestroyed = true;
  8055. // remove self from parent
  8056. var parent = vm.$parent;
  8057. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  8058. remove(parent.$children, vm);
  8059. }
  8060. // teardown watchers
  8061. if (vm._watcher) {
  8062. vm._watcher.teardown();
  8063. }
  8064. var i = vm._watchers.length;
  8065. while (i--) {
  8066. vm._watchers[i].teardown();
  8067. }
  8068. // remove reference from data ob
  8069. // frozen object may not have observer.
  8070. if (vm._data.__ob__) {
  8071. vm._data.__ob__.vmCount--;
  8072. }
  8073. // call the last hook...
  8074. vm._isDestroyed = true;
  8075. // invoke destroy hooks on current rendered tree
  8076. vm.__patch__(vm._vnode, null);
  8077. // fire destroyed hook
  8078. callHook(vm, 'destroyed');
  8079. // turn off all instance listeners.
  8080. vm.$off();
  8081. // remove __vue__ reference
  8082. if (vm.$el) {
  8083. vm.$el.__vue__ = null;
  8084. }
  8085. // release circular reference (#6759)
  8086. if (vm.$vnode) {
  8087. vm.$vnode.parent = null;
  8088. }
  8089. };
  8090. }
  8091. function updateChildComponent (
  8092. vm,
  8093. propsData,
  8094. listeners,
  8095. parentVnode,
  8096. renderChildren
  8097. ) {
  8098. if (true) {
  8099. isUpdatingChildComponent = true;
  8100. }
  8101. // determine whether component has slot children
  8102. // we need to do this before overwriting $options._renderChildren.
  8103. // check if there are dynamic scopedSlots (hand-written or compiled but with
  8104. // dynamic slot names). Static scoped slots compiled from template has the
  8105. // "$stable" marker.
  8106. var newScopedSlots = parentVnode.data.scopedSlots;
  8107. var oldScopedSlots = vm.$scopedSlots;
  8108. var hasDynamicScopedSlot = !!(
  8109. (newScopedSlots && !newScopedSlots.$stable) ||
  8110. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  8111. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  8112. );
  8113. // Any static slot children from the parent may have changed during parent's
  8114. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  8115. // update is necessary to ensure correctness.
  8116. var needsForceUpdate = !!(
  8117. renderChildren || // has new static slots
  8118. vm.$options._renderChildren || // has old static slots
  8119. hasDynamicScopedSlot
  8120. );
  8121. vm.$options._parentVnode = parentVnode;
  8122. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  8123. if (vm._vnode) { // update child tree's parent
  8124. vm._vnode.parent = parentVnode;
  8125. }
  8126. vm.$options._renderChildren = renderChildren;
  8127. // update $attrs and $listeners hash
  8128. // these are also reactive so they may trigger child update if the child
  8129. // used them during render
  8130. vm.$attrs = parentVnode.data.attrs || emptyObject;
  8131. vm.$listeners = listeners || emptyObject;
  8132. // update props
  8133. if (propsData && vm.$options.props) {
  8134. toggleObserving(false);
  8135. var props = vm._props;
  8136. var propKeys = vm.$options._propKeys || [];
  8137. for (var i = 0; i < propKeys.length; i++) {
  8138. var key = propKeys[i];
  8139. var propOptions = vm.$options.props; // wtf flow?
  8140. props[key] = validateProp(key, propOptions, propsData, vm);
  8141. }
  8142. toggleObserving(true);
  8143. // keep a copy of raw propsData
  8144. vm.$options.propsData = propsData;
  8145. }
  8146. // fixed by xxxxxx update properties(mp runtime)
  8147. vm._$updateProperties && vm._$updateProperties(vm);
  8148. // update listeners
  8149. listeners = listeners || emptyObject;
  8150. var oldListeners = vm.$options._parentListeners;
  8151. vm.$options._parentListeners = listeners;
  8152. updateComponentListeners(vm, listeners, oldListeners);
  8153. // resolve slots + force update if has children
  8154. if (needsForceUpdate) {
  8155. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  8156. vm.$forceUpdate();
  8157. }
  8158. if (true) {
  8159. isUpdatingChildComponent = false;
  8160. }
  8161. }
  8162. function isInInactiveTree (vm) {
  8163. while (vm && (vm = vm.$parent)) {
  8164. if (vm._inactive) { return true }
  8165. }
  8166. return false
  8167. }
  8168. function activateChildComponent (vm, direct) {
  8169. if (direct) {
  8170. vm._directInactive = false;
  8171. if (isInInactiveTree(vm)) {
  8172. return
  8173. }
  8174. } else if (vm._directInactive) {
  8175. return
  8176. }
  8177. if (vm._inactive || vm._inactive === null) {
  8178. vm._inactive = false;
  8179. for (var i = 0; i < vm.$children.length; i++) {
  8180. activateChildComponent(vm.$children[i]);
  8181. }
  8182. callHook(vm, 'activated');
  8183. }
  8184. }
  8185. function deactivateChildComponent (vm, direct) {
  8186. if (direct) {
  8187. vm._directInactive = true;
  8188. if (isInInactiveTree(vm)) {
  8189. return
  8190. }
  8191. }
  8192. if (!vm._inactive) {
  8193. vm._inactive = true;
  8194. for (var i = 0; i < vm.$children.length; i++) {
  8195. deactivateChildComponent(vm.$children[i]);
  8196. }
  8197. callHook(vm, 'deactivated');
  8198. }
  8199. }
  8200. function callHook (vm, hook) {
  8201. // #7573 disable dep collection when invoking lifecycle hooks
  8202. pushTarget();
  8203. var handlers = vm.$options[hook];
  8204. var info = hook + " hook";
  8205. if (handlers) {
  8206. for (var i = 0, j = handlers.length; i < j; i++) {
  8207. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  8208. }
  8209. }
  8210. if (vm._hasHookEvent) {
  8211. vm.$emit('hook:' + hook);
  8212. }
  8213. popTarget();
  8214. }
  8215. /* */
  8216. var MAX_UPDATE_COUNT = 100;
  8217. var queue = [];
  8218. var activatedChildren = [];
  8219. var has = {};
  8220. var circular = {};
  8221. var waiting = false;
  8222. var flushing = false;
  8223. var index = 0;
  8224. /**
  8225. * Reset the scheduler's state.
  8226. */
  8227. function resetSchedulerState () {
  8228. index = queue.length = activatedChildren.length = 0;
  8229. has = {};
  8230. if (true) {
  8231. circular = {};
  8232. }
  8233. waiting = flushing = false;
  8234. }
  8235. // Async edge case #6566 requires saving the timestamp when event listeners are
  8236. // attached. However, calling performance.now() has a perf overhead especially
  8237. // if the page has thousands of event listeners. Instead, we take a timestamp
  8238. // every time the scheduler flushes and use that for all event listeners
  8239. // attached during that flush.
  8240. var currentFlushTimestamp = 0;
  8241. // Async edge case fix requires storing an event listener's attach timestamp.
  8242. var getNow = Date.now;
  8243. // Determine what event timestamp the browser is using. Annoyingly, the
  8244. // timestamp can either be hi-res (relative to page load) or low-res
  8245. // (relative to UNIX epoch), so in order to compare time we have to use the
  8246. // same timestamp type when saving the flush timestamp.
  8247. // All IE versions use low-res event timestamps, and have problematic clock
  8248. // implementations (#9632)
  8249. if (inBrowser && !isIE) {
  8250. var performance = window.performance;
  8251. if (
  8252. performance &&
  8253. typeof performance.now === 'function' &&
  8254. getNow() > document.createEvent('Event').timeStamp
  8255. ) {
  8256. // if the event timestamp, although evaluated AFTER the Date.now(), is
  8257. // smaller than it, it means the event is using a hi-res timestamp,
  8258. // and we need to use the hi-res version for event listener timestamps as
  8259. // well.
  8260. getNow = function () { return performance.now(); };
  8261. }
  8262. }
  8263. /**
  8264. * Flush both queues and run the watchers.
  8265. */
  8266. function flushSchedulerQueue () {
  8267. currentFlushTimestamp = getNow();
  8268. flushing = true;
  8269. var watcher, id;
  8270. // Sort queue before flush.
  8271. // This ensures that:
  8272. // 1. Components are updated from parent to child. (because parent is always
  8273. // created before the child)
  8274. // 2. A component's user watchers are run before its render watcher (because
  8275. // user watchers are created before the render watcher)
  8276. // 3. If a component is destroyed during a parent component's watcher run,
  8277. // its watchers can be skipped.
  8278. queue.sort(function (a, b) { return a.id - b.id; });
  8279. // do not cache length because more watchers might be pushed
  8280. // as we run existing watchers
  8281. for (index = 0; index < queue.length; index++) {
  8282. watcher = queue[index];
  8283. if (watcher.before) {
  8284. watcher.before();
  8285. }
  8286. id = watcher.id;
  8287. has[id] = null;
  8288. watcher.run();
  8289. // in dev build, check and stop circular updates.
  8290. if ( true && has[id] != null) {
  8291. circular[id] = (circular[id] || 0) + 1;
  8292. if (circular[id] > MAX_UPDATE_COUNT) {
  8293. warn(
  8294. 'You may have an infinite update loop ' + (
  8295. watcher.user
  8296. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  8297. : "in a component render function."
  8298. ),
  8299. watcher.vm
  8300. );
  8301. break
  8302. }
  8303. }
  8304. }
  8305. // keep copies of post queues before resetting state
  8306. var activatedQueue = activatedChildren.slice();
  8307. var updatedQueue = queue.slice();
  8308. resetSchedulerState();
  8309. // call component updated and activated hooks
  8310. callActivatedHooks(activatedQueue);
  8311. callUpdatedHooks(updatedQueue);
  8312. // devtool hook
  8313. /* istanbul ignore if */
  8314. if (devtools && config.devtools) {
  8315. devtools.emit('flush');
  8316. }
  8317. }
  8318. function callUpdatedHooks (queue) {
  8319. var i = queue.length;
  8320. while (i--) {
  8321. var watcher = queue[i];
  8322. var vm = watcher.vm;
  8323. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  8324. callHook(vm, 'updated');
  8325. }
  8326. }
  8327. }
  8328. /**
  8329. * Queue a kept-alive component that was activated during patch.
  8330. * The queue will be processed after the entire tree has been patched.
  8331. */
  8332. function queueActivatedComponent (vm) {
  8333. // setting _inactive to false here so that a render function can
  8334. // rely on checking whether it's in an inactive tree (e.g. router-view)
  8335. vm._inactive = false;
  8336. activatedChildren.push(vm);
  8337. }
  8338. function callActivatedHooks (queue) {
  8339. for (var i = 0; i < queue.length; i++) {
  8340. queue[i]._inactive = true;
  8341. activateChildComponent(queue[i], true /* true */);
  8342. }
  8343. }
  8344. /**
  8345. * Push a watcher into the watcher queue.
  8346. * Jobs with duplicate IDs will be skipped unless it's
  8347. * pushed when the queue is being flushed.
  8348. */
  8349. function queueWatcher (watcher) {
  8350. var id = watcher.id;
  8351. if (has[id] == null) {
  8352. has[id] = true;
  8353. if (!flushing) {
  8354. queue.push(watcher);
  8355. } else {
  8356. // if already flushing, splice the watcher based on its id
  8357. // if already past its id, it will be run next immediately.
  8358. var i = queue.length - 1;
  8359. while (i > index && queue[i].id > watcher.id) {
  8360. i--;
  8361. }
  8362. queue.splice(i + 1, 0, watcher);
  8363. }
  8364. // queue the flush
  8365. if (!waiting) {
  8366. waiting = true;
  8367. if ( true && !config.async) {
  8368. flushSchedulerQueue();
  8369. return
  8370. }
  8371. nextTick(flushSchedulerQueue);
  8372. }
  8373. }
  8374. }
  8375. /* */
  8376. var uid$2 = 0;
  8377. /**
  8378. * A watcher parses an expression, collects dependencies,
  8379. * and fires callback when the expression value changes.
  8380. * This is used for both the $watch() api and directives.
  8381. */
  8382. var Watcher = function Watcher (
  8383. vm,
  8384. expOrFn,
  8385. cb,
  8386. options,
  8387. isRenderWatcher
  8388. ) {
  8389. this.vm = vm;
  8390. if (isRenderWatcher) {
  8391. vm._watcher = this;
  8392. }
  8393. vm._watchers.push(this);
  8394. // options
  8395. if (options) {
  8396. this.deep = !!options.deep;
  8397. this.user = !!options.user;
  8398. this.lazy = !!options.lazy;
  8399. this.sync = !!options.sync;
  8400. this.before = options.before;
  8401. } else {
  8402. this.deep = this.user = this.lazy = this.sync = false;
  8403. }
  8404. this.cb = cb;
  8405. this.id = ++uid$2; // uid for batching
  8406. this.active = true;
  8407. this.dirty = this.lazy; // for lazy watchers
  8408. this.deps = [];
  8409. this.newDeps = [];
  8410. this.depIds = new _Set();
  8411. this.newDepIds = new _Set();
  8412. this.expression = true
  8413. ? expOrFn.toString()
  8414. : undefined;
  8415. // parse expression for getter
  8416. if (typeof expOrFn === 'function') {
  8417. this.getter = expOrFn;
  8418. } else {
  8419. this.getter = parsePath(expOrFn);
  8420. if (!this.getter) {
  8421. this.getter = noop;
  8422. true && warn(
  8423. "Failed watching path: \"" + expOrFn + "\" " +
  8424. 'Watcher only accepts simple dot-delimited paths. ' +
  8425. 'For full control, use a function instead.',
  8426. vm
  8427. );
  8428. }
  8429. }
  8430. this.value = this.lazy
  8431. ? undefined
  8432. : this.get();
  8433. };
  8434. /**
  8435. * Evaluate the getter, and re-collect dependencies.
  8436. */
  8437. Watcher.prototype.get = function get () {
  8438. pushTarget(this);
  8439. var value;
  8440. var vm = this.vm;
  8441. try {
  8442. value = this.getter.call(vm, vm);
  8443. } catch (e) {
  8444. if (this.user) {
  8445. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  8446. } else {
  8447. throw e
  8448. }
  8449. } finally {
  8450. // "touch" every property so they are all tracked as
  8451. // dependencies for deep watching
  8452. if (this.deep) {
  8453. traverse(value);
  8454. }
  8455. popTarget();
  8456. this.cleanupDeps();
  8457. }
  8458. return value
  8459. };
  8460. /**
  8461. * Add a dependency to this directive.
  8462. */
  8463. Watcher.prototype.addDep = function addDep (dep) {
  8464. var id = dep.id;
  8465. if (!this.newDepIds.has(id)) {
  8466. this.newDepIds.add(id);
  8467. this.newDeps.push(dep);
  8468. if (!this.depIds.has(id)) {
  8469. dep.addSub(this);
  8470. }
  8471. }
  8472. };
  8473. /**
  8474. * Clean up for dependency collection.
  8475. */
  8476. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  8477. var i = this.deps.length;
  8478. while (i--) {
  8479. var dep = this.deps[i];
  8480. if (!this.newDepIds.has(dep.id)) {
  8481. dep.removeSub(this);
  8482. }
  8483. }
  8484. var tmp = this.depIds;
  8485. this.depIds = this.newDepIds;
  8486. this.newDepIds = tmp;
  8487. this.newDepIds.clear();
  8488. tmp = this.deps;
  8489. this.deps = this.newDeps;
  8490. this.newDeps = tmp;
  8491. this.newDeps.length = 0;
  8492. };
  8493. /**
  8494. * Subscriber interface.
  8495. * Will be called when a dependency changes.
  8496. */
  8497. Watcher.prototype.update = function update () {
  8498. /* istanbul ignore else */
  8499. if (this.lazy) {
  8500. this.dirty = true;
  8501. } else if (this.sync) {
  8502. this.run();
  8503. } else {
  8504. queueWatcher(this);
  8505. }
  8506. };
  8507. /**
  8508. * Scheduler job interface.
  8509. * Will be called by the scheduler.
  8510. */
  8511. Watcher.prototype.run = function run () {
  8512. if (this.active) {
  8513. var value = this.get();
  8514. if (
  8515. value !== this.value ||
  8516. // Deep watchers and watchers on Object/Arrays should fire even
  8517. // when the value is the same, because the value may
  8518. // have mutated.
  8519. isObject(value) ||
  8520. this.deep
  8521. ) {
  8522. // set new value
  8523. var oldValue = this.value;
  8524. this.value = value;
  8525. if (this.user) {
  8526. try {
  8527. this.cb.call(this.vm, value, oldValue);
  8528. } catch (e) {
  8529. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  8530. }
  8531. } else {
  8532. this.cb.call(this.vm, value, oldValue);
  8533. }
  8534. }
  8535. }
  8536. };
  8537. /**
  8538. * Evaluate the value of the watcher.
  8539. * This only gets called for lazy watchers.
  8540. */
  8541. Watcher.prototype.evaluate = function evaluate () {
  8542. this.value = this.get();
  8543. this.dirty = false;
  8544. };
  8545. /**
  8546. * Depend on all deps collected by this watcher.
  8547. */
  8548. Watcher.prototype.depend = function depend () {
  8549. var i = this.deps.length;
  8550. while (i--) {
  8551. this.deps[i].depend();
  8552. }
  8553. };
  8554. /**
  8555. * Remove self from all dependencies' subscriber list.
  8556. */
  8557. Watcher.prototype.teardown = function teardown () {
  8558. if (this.active) {
  8559. // remove self from vm's watcher list
  8560. // this is a somewhat expensive operation so we skip it
  8561. // if the vm is being destroyed.
  8562. if (!this.vm._isBeingDestroyed) {
  8563. remove(this.vm._watchers, this);
  8564. }
  8565. var i = this.deps.length;
  8566. while (i--) {
  8567. this.deps[i].removeSub(this);
  8568. }
  8569. this.active = false;
  8570. }
  8571. };
  8572. /* */
  8573. var sharedPropertyDefinition = {
  8574. enumerable: true,
  8575. configurable: true,
  8576. get: noop,
  8577. set: noop
  8578. };
  8579. function proxy (target, sourceKey, key) {
  8580. sharedPropertyDefinition.get = function proxyGetter () {
  8581. return this[sourceKey][key]
  8582. };
  8583. sharedPropertyDefinition.set = function proxySetter (val) {
  8584. this[sourceKey][key] = val;
  8585. };
  8586. Object.defineProperty(target, key, sharedPropertyDefinition);
  8587. }
  8588. function initState (vm) {
  8589. vm._watchers = [];
  8590. var opts = vm.$options;
  8591. if (opts.props) { initProps(vm, opts.props); }
  8592. if (opts.methods) { initMethods(vm, opts.methods); }
  8593. if (opts.data) {
  8594. initData(vm);
  8595. } else {
  8596. observe(vm._data = {}, true /* asRootData */);
  8597. }
  8598. if (opts.computed) { initComputed(vm, opts.computed); }
  8599. if (opts.watch && opts.watch !== nativeWatch) {
  8600. initWatch(vm, opts.watch);
  8601. }
  8602. }
  8603. function initProps (vm, propsOptions) {
  8604. var propsData = vm.$options.propsData || {};
  8605. var props = vm._props = {};
  8606. // cache prop keys so that future props updates can iterate using Array
  8607. // instead of dynamic object key enumeration.
  8608. var keys = vm.$options._propKeys = [];
  8609. var isRoot = !vm.$parent;
  8610. // root instance props should be converted
  8611. if (!isRoot) {
  8612. toggleObserving(false);
  8613. }
  8614. var loop = function ( key ) {
  8615. keys.push(key);
  8616. var value = validateProp(key, propsOptions, propsData, vm);
  8617. /* istanbul ignore else */
  8618. if (true) {
  8619. var hyphenatedKey = hyphenate(key);
  8620. if (isReservedAttribute(hyphenatedKey) ||
  8621. config.isReservedAttr(hyphenatedKey)) {
  8622. warn(
  8623. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  8624. vm
  8625. );
  8626. }
  8627. defineReactive$$1(props, key, value, function () {
  8628. if (!isRoot && !isUpdatingChildComponent) {
  8629. {
  8630. if(vm.mpHost === 'mp-baidu'){//百度 observer 在 setData callback 之后触发,直接忽略该 warn
  8631. return
  8632. }
  8633. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  8634. if(
  8635. key === 'value' &&
  8636. Array.isArray(vm.$options.behaviors) &&
  8637. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8638. ){
  8639. return
  8640. }
  8641. if(vm._getFormData){
  8642. return
  8643. }
  8644. var $parent = vm.$parent;
  8645. while($parent){
  8646. if($parent.__next_tick_pending){
  8647. return
  8648. }
  8649. $parent = $parent.$parent;
  8650. }
  8651. }
  8652. warn(
  8653. "Avoid mutating a prop directly since the value will be " +
  8654. "overwritten whenever the parent component re-renders. " +
  8655. "Instead, use a data or computed property based on the prop's " +
  8656. "value. Prop being mutated: \"" + key + "\"",
  8657. vm
  8658. );
  8659. }
  8660. });
  8661. } else {}
  8662. // static props are already proxied on the component's prototype
  8663. // during Vue.extend(). We only need to proxy props defined at
  8664. // instantiation here.
  8665. if (!(key in vm)) {
  8666. proxy(vm, "_props", key);
  8667. }
  8668. };
  8669. for (var key in propsOptions) loop( key );
  8670. toggleObserving(true);
  8671. }
  8672. function initData (vm) {
  8673. var data = vm.$options.data;
  8674. data = vm._data = typeof data === 'function'
  8675. ? getData(data, vm)
  8676. : data || {};
  8677. if (!isPlainObject(data)) {
  8678. data = {};
  8679. true && warn(
  8680. 'data functions should return an object:\n' +
  8681. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  8682. vm
  8683. );
  8684. }
  8685. // proxy data on instance
  8686. var keys = Object.keys(data);
  8687. var props = vm.$options.props;
  8688. var methods = vm.$options.methods;
  8689. var i = keys.length;
  8690. while (i--) {
  8691. var key = keys[i];
  8692. if (true) {
  8693. if (methods && hasOwn(methods, key)) {
  8694. warn(
  8695. ("Method \"" + key + "\" has already been defined as a data property."),
  8696. vm
  8697. );
  8698. }
  8699. }
  8700. if (props && hasOwn(props, key)) {
  8701. true && warn(
  8702. "The data property \"" + key + "\" is already declared as a prop. " +
  8703. "Use prop default value instead.",
  8704. vm
  8705. );
  8706. } else if (!isReserved(key)) {
  8707. proxy(vm, "_data", key);
  8708. }
  8709. }
  8710. // observe data
  8711. observe(data, true /* asRootData */);
  8712. }
  8713. function getData (data, vm) {
  8714. // #7573 disable dep collection when invoking data getters
  8715. pushTarget();
  8716. try {
  8717. return data.call(vm, vm)
  8718. } catch (e) {
  8719. handleError(e, vm, "data()");
  8720. return {}
  8721. } finally {
  8722. popTarget();
  8723. }
  8724. }
  8725. var computedWatcherOptions = { lazy: true };
  8726. function initComputed (vm, computed) {
  8727. // $flow-disable-line
  8728. var watchers = vm._computedWatchers = Object.create(null);
  8729. // computed properties are just getters during SSR
  8730. var isSSR = isServerRendering();
  8731. for (var key in computed) {
  8732. var userDef = computed[key];
  8733. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  8734. if ( true && getter == null) {
  8735. warn(
  8736. ("Getter is missing for computed property \"" + key + "\"."),
  8737. vm
  8738. );
  8739. }
  8740. if (!isSSR) {
  8741. // create internal watcher for the computed property.
  8742. watchers[key] = new Watcher(
  8743. vm,
  8744. getter || noop,
  8745. noop,
  8746. computedWatcherOptions
  8747. );
  8748. }
  8749. // component-defined computed properties are already defined on the
  8750. // component prototype. We only need to define computed properties defined
  8751. // at instantiation here.
  8752. if (!(key in vm)) {
  8753. defineComputed(vm, key, userDef);
  8754. } else if (true) {
  8755. if (key in vm.$data) {
  8756. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  8757. } else if (vm.$options.props && key in vm.$options.props) {
  8758. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  8759. }
  8760. }
  8761. }
  8762. }
  8763. function defineComputed (
  8764. target,
  8765. key,
  8766. userDef
  8767. ) {
  8768. var shouldCache = !isServerRendering();
  8769. if (typeof userDef === 'function') {
  8770. sharedPropertyDefinition.get = shouldCache
  8771. ? createComputedGetter(key)
  8772. : createGetterInvoker(userDef);
  8773. sharedPropertyDefinition.set = noop;
  8774. } else {
  8775. sharedPropertyDefinition.get = userDef.get
  8776. ? shouldCache && userDef.cache !== false
  8777. ? createComputedGetter(key)
  8778. : createGetterInvoker(userDef.get)
  8779. : noop;
  8780. sharedPropertyDefinition.set = userDef.set || noop;
  8781. }
  8782. if ( true &&
  8783. sharedPropertyDefinition.set === noop) {
  8784. sharedPropertyDefinition.set = function () {
  8785. warn(
  8786. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  8787. this
  8788. );
  8789. };
  8790. }
  8791. Object.defineProperty(target, key, sharedPropertyDefinition);
  8792. }
  8793. function createComputedGetter (key) {
  8794. return function computedGetter () {
  8795. var watcher = this._computedWatchers && this._computedWatchers[key];
  8796. if (watcher) {
  8797. if (watcher.dirty) {
  8798. watcher.evaluate();
  8799. }
  8800. if (Dep.SharedObject.target) {// fixed by xxxxxx
  8801. watcher.depend();
  8802. }
  8803. return watcher.value
  8804. }
  8805. }
  8806. }
  8807. function createGetterInvoker(fn) {
  8808. return function computedGetter () {
  8809. return fn.call(this, this)
  8810. }
  8811. }
  8812. function initMethods (vm, methods) {
  8813. var props = vm.$options.props;
  8814. for (var key in methods) {
  8815. if (true) {
  8816. if (typeof methods[key] !== 'function') {
  8817. warn(
  8818. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  8819. "Did you reference the function correctly?",
  8820. vm
  8821. );
  8822. }
  8823. if (props && hasOwn(props, key)) {
  8824. warn(
  8825. ("Method \"" + key + "\" has already been defined as a prop."),
  8826. vm
  8827. );
  8828. }
  8829. if ((key in vm) && isReserved(key)) {
  8830. warn(
  8831. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  8832. "Avoid defining component methods that start with _ or $."
  8833. );
  8834. }
  8835. }
  8836. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  8837. }
  8838. }
  8839. function initWatch (vm, watch) {
  8840. for (var key in watch) {
  8841. var handler = watch[key];
  8842. if (Array.isArray(handler)) {
  8843. for (var i = 0; i < handler.length; i++) {
  8844. createWatcher(vm, key, handler[i]);
  8845. }
  8846. } else {
  8847. createWatcher(vm, key, handler);
  8848. }
  8849. }
  8850. }
  8851. function createWatcher (
  8852. vm,
  8853. expOrFn,
  8854. handler,
  8855. options
  8856. ) {
  8857. if (isPlainObject(handler)) {
  8858. options = handler;
  8859. handler = handler.handler;
  8860. }
  8861. if (typeof handler === 'string') {
  8862. handler = vm[handler];
  8863. }
  8864. return vm.$watch(expOrFn, handler, options)
  8865. }
  8866. function stateMixin (Vue) {
  8867. // flow somehow has problems with directly declared definition object
  8868. // when using Object.defineProperty, so we have to procedurally build up
  8869. // the object here.
  8870. var dataDef = {};
  8871. dataDef.get = function () { return this._data };
  8872. var propsDef = {};
  8873. propsDef.get = function () { return this._props };
  8874. if (true) {
  8875. dataDef.set = function () {
  8876. warn(
  8877. 'Avoid replacing instance root $data. ' +
  8878. 'Use nested data properties instead.',
  8879. this
  8880. );
  8881. };
  8882. propsDef.set = function () {
  8883. warn("$props is readonly.", this);
  8884. };
  8885. }
  8886. Object.defineProperty(Vue.prototype, '$data', dataDef);
  8887. Object.defineProperty(Vue.prototype, '$props', propsDef);
  8888. Vue.prototype.$set = set;
  8889. Vue.prototype.$delete = del;
  8890. Vue.prototype.$watch = function (
  8891. expOrFn,
  8892. cb,
  8893. options
  8894. ) {
  8895. var vm = this;
  8896. if (isPlainObject(cb)) {
  8897. return createWatcher(vm, expOrFn, cb, options)
  8898. }
  8899. options = options || {};
  8900. options.user = true;
  8901. var watcher = new Watcher(vm, expOrFn, cb, options);
  8902. if (options.immediate) {
  8903. try {
  8904. cb.call(vm, watcher.value);
  8905. } catch (error) {
  8906. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  8907. }
  8908. }
  8909. return function unwatchFn () {
  8910. watcher.teardown();
  8911. }
  8912. };
  8913. }
  8914. /* */
  8915. var uid$3 = 0;
  8916. function initMixin (Vue) {
  8917. Vue.prototype._init = function (options) {
  8918. var vm = this;
  8919. // a uid
  8920. vm._uid = uid$3++;
  8921. var startTag, endTag;
  8922. /* istanbul ignore if */
  8923. if ( true && config.performance && mark) {
  8924. startTag = "vue-perf-start:" + (vm._uid);
  8925. endTag = "vue-perf-end:" + (vm._uid);
  8926. mark(startTag);
  8927. }
  8928. // a flag to avoid this being observed
  8929. vm._isVue = true;
  8930. // merge options
  8931. if (options && options._isComponent) {
  8932. // optimize internal component instantiation
  8933. // since dynamic options merging is pretty slow, and none of the
  8934. // internal component options needs special treatment.
  8935. initInternalComponent(vm, options);
  8936. } else {
  8937. vm.$options = mergeOptions(
  8938. resolveConstructorOptions(vm.constructor),
  8939. options || {},
  8940. vm
  8941. );
  8942. }
  8943. /* istanbul ignore else */
  8944. if (true) {
  8945. initProxy(vm);
  8946. } else {}
  8947. // expose real self
  8948. vm._self = vm;
  8949. initLifecycle(vm);
  8950. initEvents(vm);
  8951. initRender(vm);
  8952. callHook(vm, 'beforeCreate');
  8953. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  8954. initState(vm);
  8955. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  8956. !vm._$fallback && callHook(vm, 'created');
  8957. /* istanbul ignore if */
  8958. if ( true && config.performance && mark) {
  8959. vm._name = formatComponentName(vm, false);
  8960. mark(endTag);
  8961. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  8962. }
  8963. if (vm.$options.el) {
  8964. vm.$mount(vm.$options.el);
  8965. }
  8966. };
  8967. }
  8968. function initInternalComponent (vm, options) {
  8969. var opts = vm.$options = Object.create(vm.constructor.options);
  8970. // doing this because it's faster than dynamic enumeration.
  8971. var parentVnode = options._parentVnode;
  8972. opts.parent = options.parent;
  8973. opts._parentVnode = parentVnode;
  8974. var vnodeComponentOptions = parentVnode.componentOptions;
  8975. opts.propsData = vnodeComponentOptions.propsData;
  8976. opts._parentListeners = vnodeComponentOptions.listeners;
  8977. opts._renderChildren = vnodeComponentOptions.children;
  8978. opts._componentTag = vnodeComponentOptions.tag;
  8979. if (options.render) {
  8980. opts.render = options.render;
  8981. opts.staticRenderFns = options.staticRenderFns;
  8982. }
  8983. }
  8984. function resolveConstructorOptions (Ctor) {
  8985. var options = Ctor.options;
  8986. if (Ctor.super) {
  8987. var superOptions = resolveConstructorOptions(Ctor.super);
  8988. var cachedSuperOptions = Ctor.superOptions;
  8989. if (superOptions !== cachedSuperOptions) {
  8990. // super option changed,
  8991. // need to resolve new options.
  8992. Ctor.superOptions = superOptions;
  8993. // check if there are any late-modified/attached options (#4976)
  8994. var modifiedOptions = resolveModifiedOptions(Ctor);
  8995. // update base extend options
  8996. if (modifiedOptions) {
  8997. extend(Ctor.extendOptions, modifiedOptions);
  8998. }
  8999. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  9000. if (options.name) {
  9001. options.components[options.name] = Ctor;
  9002. }
  9003. }
  9004. }
  9005. return options
  9006. }
  9007. function resolveModifiedOptions (Ctor) {
  9008. var modified;
  9009. var latest = Ctor.options;
  9010. var sealed = Ctor.sealedOptions;
  9011. for (var key in latest) {
  9012. if (latest[key] !== sealed[key]) {
  9013. if (!modified) { modified = {}; }
  9014. modified[key] = latest[key];
  9015. }
  9016. }
  9017. return modified
  9018. }
  9019. function Vue (options) {
  9020. if ( true &&
  9021. !(this instanceof Vue)
  9022. ) {
  9023. warn('Vue is a constructor and should be called with the `new` keyword');
  9024. }
  9025. this._init(options);
  9026. }
  9027. initMixin(Vue);
  9028. stateMixin(Vue);
  9029. eventsMixin(Vue);
  9030. lifecycleMixin(Vue);
  9031. renderMixin(Vue);
  9032. /* */
  9033. function initUse (Vue) {
  9034. Vue.use = function (plugin) {
  9035. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  9036. if (installedPlugins.indexOf(plugin) > -1) {
  9037. return this
  9038. }
  9039. // additional parameters
  9040. var args = toArray(arguments, 1);
  9041. args.unshift(this);
  9042. if (typeof plugin.install === 'function') {
  9043. plugin.install.apply(plugin, args);
  9044. } else if (typeof plugin === 'function') {
  9045. plugin.apply(null, args);
  9046. }
  9047. installedPlugins.push(plugin);
  9048. return this
  9049. };
  9050. }
  9051. /* */
  9052. function initMixin$1 (Vue) {
  9053. Vue.mixin = function (mixin) {
  9054. this.options = mergeOptions(this.options, mixin);
  9055. return this
  9056. };
  9057. }
  9058. /* */
  9059. function initExtend (Vue) {
  9060. /**
  9061. * Each instance constructor, including Vue, has a unique
  9062. * cid. This enables us to create wrapped "child
  9063. * constructors" for prototypal inheritance and cache them.
  9064. */
  9065. Vue.cid = 0;
  9066. var cid = 1;
  9067. /**
  9068. * Class inheritance
  9069. */
  9070. Vue.extend = function (extendOptions) {
  9071. extendOptions = extendOptions || {};
  9072. var Super = this;
  9073. var SuperId = Super.cid;
  9074. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  9075. if (cachedCtors[SuperId]) {
  9076. return cachedCtors[SuperId]
  9077. }
  9078. var name = extendOptions.name || Super.options.name;
  9079. if ( true && name) {
  9080. validateComponentName(name);
  9081. }
  9082. var Sub = function VueComponent (options) {
  9083. this._init(options);
  9084. };
  9085. Sub.prototype = Object.create(Super.prototype);
  9086. Sub.prototype.constructor = Sub;
  9087. Sub.cid = cid++;
  9088. Sub.options = mergeOptions(
  9089. Super.options,
  9090. extendOptions
  9091. );
  9092. Sub['super'] = Super;
  9093. // For props and computed properties, we define the proxy getters on
  9094. // the Vue instances at extension time, on the extended prototype. This
  9095. // avoids Object.defineProperty calls for each instance created.
  9096. if (Sub.options.props) {
  9097. initProps$1(Sub);
  9098. }
  9099. if (Sub.options.computed) {
  9100. initComputed$1(Sub);
  9101. }
  9102. // allow further extension/mixin/plugin usage
  9103. Sub.extend = Super.extend;
  9104. Sub.mixin = Super.mixin;
  9105. Sub.use = Super.use;
  9106. // create asset registers, so extended classes
  9107. // can have their private assets too.
  9108. ASSET_TYPES.forEach(function (type) {
  9109. Sub[type] = Super[type];
  9110. });
  9111. // enable recursive self-lookup
  9112. if (name) {
  9113. Sub.options.components[name] = Sub;
  9114. }
  9115. // keep a reference to the super options at extension time.
  9116. // later at instantiation we can check if Super's options have
  9117. // been updated.
  9118. Sub.superOptions = Super.options;
  9119. Sub.extendOptions = extendOptions;
  9120. Sub.sealedOptions = extend({}, Sub.options);
  9121. // cache constructor
  9122. cachedCtors[SuperId] = Sub;
  9123. return Sub
  9124. };
  9125. }
  9126. function initProps$1 (Comp) {
  9127. var props = Comp.options.props;
  9128. for (var key in props) {
  9129. proxy(Comp.prototype, "_props", key);
  9130. }
  9131. }
  9132. function initComputed$1 (Comp) {
  9133. var computed = Comp.options.computed;
  9134. for (var key in computed) {
  9135. defineComputed(Comp.prototype, key, computed[key]);
  9136. }
  9137. }
  9138. /* */
  9139. function initAssetRegisters (Vue) {
  9140. /**
  9141. * Create asset registration methods.
  9142. */
  9143. ASSET_TYPES.forEach(function (type) {
  9144. Vue[type] = function (
  9145. id,
  9146. definition
  9147. ) {
  9148. if (!definition) {
  9149. return this.options[type + 's'][id]
  9150. } else {
  9151. /* istanbul ignore if */
  9152. if ( true && type === 'component') {
  9153. validateComponentName(id);
  9154. }
  9155. if (type === 'component' && isPlainObject(definition)) {
  9156. definition.name = definition.name || id;
  9157. definition = this.options._base.extend(definition);
  9158. }
  9159. if (type === 'directive' && typeof definition === 'function') {
  9160. definition = { bind: definition, update: definition };
  9161. }
  9162. this.options[type + 's'][id] = definition;
  9163. return definition
  9164. }
  9165. };
  9166. });
  9167. }
  9168. /* */
  9169. function getComponentName (opts) {
  9170. return opts && (opts.Ctor.options.name || opts.tag)
  9171. }
  9172. function matches (pattern, name) {
  9173. if (Array.isArray(pattern)) {
  9174. return pattern.indexOf(name) > -1
  9175. } else if (typeof pattern === 'string') {
  9176. return pattern.split(',').indexOf(name) > -1
  9177. } else if (isRegExp(pattern)) {
  9178. return pattern.test(name)
  9179. }
  9180. /* istanbul ignore next */
  9181. return false
  9182. }
  9183. function pruneCache (keepAliveInstance, filter) {
  9184. var cache = keepAliveInstance.cache;
  9185. var keys = keepAliveInstance.keys;
  9186. var _vnode = keepAliveInstance._vnode;
  9187. for (var key in cache) {
  9188. var cachedNode = cache[key];
  9189. if (cachedNode) {
  9190. var name = getComponentName(cachedNode.componentOptions);
  9191. if (name && !filter(name)) {
  9192. pruneCacheEntry(cache, key, keys, _vnode);
  9193. }
  9194. }
  9195. }
  9196. }
  9197. function pruneCacheEntry (
  9198. cache,
  9199. key,
  9200. keys,
  9201. current
  9202. ) {
  9203. var cached$$1 = cache[key];
  9204. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  9205. cached$$1.componentInstance.$destroy();
  9206. }
  9207. cache[key] = null;
  9208. remove(keys, key);
  9209. }
  9210. var patternTypes = [String, RegExp, Array];
  9211. var KeepAlive = {
  9212. name: 'keep-alive',
  9213. abstract: true,
  9214. props: {
  9215. include: patternTypes,
  9216. exclude: patternTypes,
  9217. max: [String, Number]
  9218. },
  9219. created: function created () {
  9220. this.cache = Object.create(null);
  9221. this.keys = [];
  9222. },
  9223. destroyed: function destroyed () {
  9224. for (var key in this.cache) {
  9225. pruneCacheEntry(this.cache, key, this.keys);
  9226. }
  9227. },
  9228. mounted: function mounted () {
  9229. var this$1 = this;
  9230. this.$watch('include', function (val) {
  9231. pruneCache(this$1, function (name) { return matches(val, name); });
  9232. });
  9233. this.$watch('exclude', function (val) {
  9234. pruneCache(this$1, function (name) { return !matches(val, name); });
  9235. });
  9236. },
  9237. render: function render () {
  9238. var slot = this.$slots.default;
  9239. var vnode = getFirstComponentChild(slot);
  9240. var componentOptions = vnode && vnode.componentOptions;
  9241. if (componentOptions) {
  9242. // check pattern
  9243. var name = getComponentName(componentOptions);
  9244. var ref = this;
  9245. var include = ref.include;
  9246. var exclude = ref.exclude;
  9247. if (
  9248. // not included
  9249. (include && (!name || !matches(include, name))) ||
  9250. // excluded
  9251. (exclude && name && matches(exclude, name))
  9252. ) {
  9253. return vnode
  9254. }
  9255. var ref$1 = this;
  9256. var cache = ref$1.cache;
  9257. var keys = ref$1.keys;
  9258. var key = vnode.key == null
  9259. // same constructor may get registered as different local components
  9260. // so cid alone is not enough (#3269)
  9261. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  9262. : vnode.key;
  9263. if (cache[key]) {
  9264. vnode.componentInstance = cache[key].componentInstance;
  9265. // make current key freshest
  9266. remove(keys, key);
  9267. keys.push(key);
  9268. } else {
  9269. cache[key] = vnode;
  9270. keys.push(key);
  9271. // prune oldest entry
  9272. if (this.max && keys.length > parseInt(this.max)) {
  9273. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  9274. }
  9275. }
  9276. vnode.data.keepAlive = true;
  9277. }
  9278. return vnode || (slot && slot[0])
  9279. }
  9280. };
  9281. var builtInComponents = {
  9282. KeepAlive: KeepAlive
  9283. };
  9284. /* */
  9285. function initGlobalAPI (Vue) {
  9286. // config
  9287. var configDef = {};
  9288. configDef.get = function () { return config; };
  9289. if (true) {
  9290. configDef.set = function () {
  9291. warn(
  9292. 'Do not replace the Vue.config object, set individual fields instead.'
  9293. );
  9294. };
  9295. }
  9296. Object.defineProperty(Vue, 'config', configDef);
  9297. // exposed util methods.
  9298. // NOTE: these are not considered part of the public API - avoid relying on
  9299. // them unless you are aware of the risk.
  9300. Vue.util = {
  9301. warn: warn,
  9302. extend: extend,
  9303. mergeOptions: mergeOptions,
  9304. defineReactive: defineReactive$$1
  9305. };
  9306. Vue.set = set;
  9307. Vue.delete = del;
  9308. Vue.nextTick = nextTick;
  9309. // 2.6 explicit observable API
  9310. Vue.observable = function (obj) {
  9311. observe(obj);
  9312. return obj
  9313. };
  9314. Vue.options = Object.create(null);
  9315. ASSET_TYPES.forEach(function (type) {
  9316. Vue.options[type + 's'] = Object.create(null);
  9317. });
  9318. // this is used to identify the "base" constructor to extend all plain-object
  9319. // components with in Weex's multi-instance scenarios.
  9320. Vue.options._base = Vue;
  9321. extend(Vue.options.components, builtInComponents);
  9322. initUse(Vue);
  9323. initMixin$1(Vue);
  9324. initExtend(Vue);
  9325. initAssetRegisters(Vue);
  9326. }
  9327. initGlobalAPI(Vue);
  9328. Object.defineProperty(Vue.prototype, '$isServer', {
  9329. get: isServerRendering
  9330. });
  9331. Object.defineProperty(Vue.prototype, '$ssrContext', {
  9332. get: function get () {
  9333. /* istanbul ignore next */
  9334. return this.$vnode && this.$vnode.ssrContext
  9335. }
  9336. });
  9337. // expose FunctionalRenderContext for ssr runtime helper installation
  9338. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  9339. value: FunctionalRenderContext
  9340. });
  9341. Vue.version = '2.6.11';
  9342. /**
  9343. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  9344. */
  9345. var ARRAYTYPE = '[object Array]';
  9346. var OBJECTTYPE = '[object Object]';
  9347. // const FUNCTIONTYPE = '[object Function]'
  9348. function diff(current, pre) {
  9349. var result = {};
  9350. syncKeys(current, pre);
  9351. _diff(current, pre, '', result);
  9352. return result
  9353. }
  9354. function syncKeys(current, pre) {
  9355. if (current === pre) { return }
  9356. var rootCurrentType = type(current);
  9357. var rootPreType = type(pre);
  9358. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  9359. if(Object.keys(current).length >= Object.keys(pre).length){
  9360. for (var key in pre) {
  9361. var currentValue = current[key];
  9362. if (currentValue === undefined) {
  9363. current[key] = null;
  9364. } else {
  9365. syncKeys(currentValue, pre[key]);
  9366. }
  9367. }
  9368. }
  9369. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  9370. if (current.length >= pre.length) {
  9371. pre.forEach(function (item, index) {
  9372. syncKeys(current[index], item);
  9373. });
  9374. }
  9375. }
  9376. }
  9377. function _diff(current, pre, path, result) {
  9378. if (current === pre) { return }
  9379. var rootCurrentType = type(current);
  9380. var rootPreType = type(pre);
  9381. if (rootCurrentType == OBJECTTYPE) {
  9382. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  9383. setResult(result, path, current);
  9384. } else {
  9385. var loop = function ( key ) {
  9386. var currentValue = current[key];
  9387. var preValue = pre[key];
  9388. var currentType = type(currentValue);
  9389. var preType = type(preValue);
  9390. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  9391. if (currentValue != pre[key]) {
  9392. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9393. }
  9394. } else if (currentType == ARRAYTYPE) {
  9395. if (preType != ARRAYTYPE) {
  9396. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9397. } else {
  9398. if (currentValue.length < preValue.length) {
  9399. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9400. } else {
  9401. currentValue.forEach(function (item, index) {
  9402. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  9403. });
  9404. }
  9405. }
  9406. } else if (currentType == OBJECTTYPE) {
  9407. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  9408. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9409. } else {
  9410. for (var subKey in currentValue) {
  9411. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  9412. }
  9413. }
  9414. }
  9415. };
  9416. for (var key in current) loop( key );
  9417. }
  9418. } else if (rootCurrentType == ARRAYTYPE) {
  9419. if (rootPreType != ARRAYTYPE) {
  9420. setResult(result, path, current);
  9421. } else {
  9422. if (current.length < pre.length) {
  9423. setResult(result, path, current);
  9424. } else {
  9425. current.forEach(function (item, index) {
  9426. _diff(item, pre[index], path + '[' + index + ']', result);
  9427. });
  9428. }
  9429. }
  9430. } else {
  9431. setResult(result, path, current);
  9432. }
  9433. }
  9434. function setResult(result, k, v) {
  9435. // if (type(v) != FUNCTIONTYPE) {
  9436. result[k] = v;
  9437. // }
  9438. }
  9439. function type(obj) {
  9440. return Object.prototype.toString.call(obj)
  9441. }
  9442. /* */
  9443. function flushCallbacks$1(vm) {
  9444. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  9445. if (Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9446. var mpInstance = vm.$scope;
  9447. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9448. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  9449. }
  9450. var copies = vm.__next_tick_callbacks.slice(0);
  9451. vm.__next_tick_callbacks.length = 0;
  9452. for (var i = 0; i < copies.length; i++) {
  9453. copies[i]();
  9454. }
  9455. }
  9456. }
  9457. function hasRenderWatcher(vm) {
  9458. return queue.find(function (watcher) { return vm._watcher === watcher; })
  9459. }
  9460. function nextTick$1(vm, cb) {
  9461. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  9462. //2.nextTick 之前存在 render watcher
  9463. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  9464. if(Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  9465. var mpInstance = vm.$scope;
  9466. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9467. ']:nextVueTick');
  9468. }
  9469. return nextTick(cb, vm)
  9470. }else{
  9471. if(Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  9472. var mpInstance$1 = vm.$scope;
  9473. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  9474. ']:nextMPTick');
  9475. }
  9476. }
  9477. var _resolve;
  9478. if (!vm.__next_tick_callbacks) {
  9479. vm.__next_tick_callbacks = [];
  9480. }
  9481. vm.__next_tick_callbacks.push(function () {
  9482. if (cb) {
  9483. try {
  9484. cb.call(vm);
  9485. } catch (e) {
  9486. handleError(e, vm, 'nextTick');
  9487. }
  9488. } else if (_resolve) {
  9489. _resolve(vm);
  9490. }
  9491. });
  9492. // $flow-disable-line
  9493. if (!cb && typeof Promise !== 'undefined') {
  9494. return new Promise(function (resolve) {
  9495. _resolve = resolve;
  9496. })
  9497. }
  9498. }
  9499. /* */
  9500. function cloneWithData(vm) {
  9501. // 确保当前 vm 所有数据被同步
  9502. var ret = Object.create(null);
  9503. var dataKeys = [].concat(
  9504. Object.keys(vm._data || {}),
  9505. Object.keys(vm._computedWatchers || {}));
  9506. dataKeys.reduce(function(ret, key) {
  9507. ret[key] = vm[key];
  9508. return ret
  9509. }, ret);
  9510. // vue-composition-api
  9511. var rawBindings = vm.__secret_vfa_state__ && vm.__secret_vfa_state__.rawBindings;
  9512. if (rawBindings) {
  9513. Object.keys(rawBindings).forEach(function (key) {
  9514. ret[key] = vm[key];
  9515. });
  9516. }
  9517. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  9518. Object.assign(ret, vm.$mp.data || {});
  9519. if (
  9520. Array.isArray(vm.$options.behaviors) &&
  9521. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  9522. ) { //form-field
  9523. ret['name'] = vm.name;
  9524. ret['value'] = vm.value;
  9525. }
  9526. return JSON.parse(JSON.stringify(ret))
  9527. }
  9528. var patch = function(oldVnode, vnode) {
  9529. var this$1 = this;
  9530. if (vnode === null) { //destroy
  9531. return
  9532. }
  9533. if (this.mpType === 'page' || this.mpType === 'component') {
  9534. var mpInstance = this.$scope;
  9535. var data = Object.create(null);
  9536. try {
  9537. data = cloneWithData(this);
  9538. } catch (err) {
  9539. console.error(err);
  9540. }
  9541. data.__webviewId__ = mpInstance.data.__webviewId__;
  9542. var mpData = Object.create(null);
  9543. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  9544. mpData[key] = mpInstance.data[key];
  9545. });
  9546. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  9547. if (Object.keys(diffData).length) {
  9548. if (Object({"VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9549. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  9550. ']差量更新',
  9551. JSON.stringify(diffData));
  9552. }
  9553. this.__next_tick_pending = true;
  9554. mpInstance.setData(diffData, function () {
  9555. this$1.__next_tick_pending = false;
  9556. flushCallbacks$1(this$1);
  9557. });
  9558. } else {
  9559. flushCallbacks$1(this);
  9560. }
  9561. }
  9562. };
  9563. /* */
  9564. function createEmptyRender() {
  9565. }
  9566. function mountComponent$1(
  9567. vm,
  9568. el,
  9569. hydrating
  9570. ) {
  9571. if (!vm.mpType) {//main.js 中的 new Vue
  9572. return vm
  9573. }
  9574. if (vm.mpType === 'app') {
  9575. vm.$options.render = createEmptyRender;
  9576. }
  9577. if (!vm.$options.render) {
  9578. vm.$options.render = createEmptyRender;
  9579. if (true) {
  9580. /* istanbul ignore if */
  9581. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  9582. vm.$options.el || el) {
  9583. warn(
  9584. 'You are using the runtime-only build of Vue where the template ' +
  9585. 'compiler is not available. Either pre-compile the templates into ' +
  9586. 'render functions, or use the compiler-included build.',
  9587. vm
  9588. );
  9589. } else {
  9590. warn(
  9591. 'Failed to mount component: template or render function not defined.',
  9592. vm
  9593. );
  9594. }
  9595. }
  9596. }
  9597. !vm._$fallback && callHook(vm, 'beforeMount');
  9598. var updateComponent = function () {
  9599. vm._update(vm._render(), hydrating);
  9600. };
  9601. // we set this to vm._watcher inside the watcher's constructor
  9602. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  9603. // component's mounted hook), which relies on vm._watcher being already defined
  9604. new Watcher(vm, updateComponent, noop, {
  9605. before: function before() {
  9606. if (vm._isMounted && !vm._isDestroyed) {
  9607. callHook(vm, 'beforeUpdate');
  9608. }
  9609. }
  9610. }, true /* isRenderWatcher */);
  9611. hydrating = false;
  9612. return vm
  9613. }
  9614. /* */
  9615. function renderClass (
  9616. staticClass,
  9617. dynamicClass
  9618. ) {
  9619. if (isDef(staticClass) || isDef(dynamicClass)) {
  9620. return concat(staticClass, stringifyClass(dynamicClass))
  9621. }
  9622. /* istanbul ignore next */
  9623. return ''
  9624. }
  9625. function concat (a, b) {
  9626. return a ? b ? (a + ' ' + b) : a : (b || '')
  9627. }
  9628. function stringifyClass (value) {
  9629. if (Array.isArray(value)) {
  9630. return stringifyArray(value)
  9631. }
  9632. if (isObject(value)) {
  9633. return stringifyObject(value)
  9634. }
  9635. if (typeof value === 'string') {
  9636. return value
  9637. }
  9638. /* istanbul ignore next */
  9639. return ''
  9640. }
  9641. function stringifyArray (value) {
  9642. var res = '';
  9643. var stringified;
  9644. for (var i = 0, l = value.length; i < l; i++) {
  9645. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  9646. if (res) { res += ' '; }
  9647. res += stringified;
  9648. }
  9649. }
  9650. return res
  9651. }
  9652. function stringifyObject (value) {
  9653. var res = '';
  9654. for (var key in value) {
  9655. if (value[key]) {
  9656. if (res) { res += ' '; }
  9657. res += key;
  9658. }
  9659. }
  9660. return res
  9661. }
  9662. /* */
  9663. var parseStyleText = cached(function (cssText) {
  9664. var res = {};
  9665. var listDelimiter = /;(?![^(]*\))/g;
  9666. var propertyDelimiter = /:(.+)/;
  9667. cssText.split(listDelimiter).forEach(function (item) {
  9668. if (item) {
  9669. var tmp = item.split(propertyDelimiter);
  9670. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  9671. }
  9672. });
  9673. return res
  9674. });
  9675. // normalize possible array / string values into Object
  9676. function normalizeStyleBinding (bindingStyle) {
  9677. if (Array.isArray(bindingStyle)) {
  9678. return toObject(bindingStyle)
  9679. }
  9680. if (typeof bindingStyle === 'string') {
  9681. return parseStyleText(bindingStyle)
  9682. }
  9683. return bindingStyle
  9684. }
  9685. /* */
  9686. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  9687. function getTarget(obj, path) {
  9688. var parts = path.split('.');
  9689. var key = parts[0];
  9690. if (key.indexOf('__$n') === 0) { //number index
  9691. key = parseInt(key.replace('__$n', ''));
  9692. }
  9693. if (parts.length === 1) {
  9694. return obj[key]
  9695. }
  9696. return getTarget(obj[key], parts.slice(1).join('.'))
  9697. }
  9698. function internalMixin(Vue) {
  9699. Vue.config.errorHandler = function(err, vm, info) {
  9700. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  9701. console.error(err);
  9702. /* eslint-disable no-undef */
  9703. var app = getApp();
  9704. if (app && app.onError) {
  9705. app.onError(err);
  9706. }
  9707. };
  9708. var oldEmit = Vue.prototype.$emit;
  9709. Vue.prototype.$emit = function(event) {
  9710. if (this.$scope && event) {
  9711. this.$scope['triggerEvent'](event, {
  9712. __args__: toArray(arguments, 1)
  9713. });
  9714. }
  9715. return oldEmit.apply(this, arguments)
  9716. };
  9717. Vue.prototype.$nextTick = function(fn) {
  9718. return nextTick$1(this, fn)
  9719. };
  9720. MP_METHODS.forEach(function (method) {
  9721. Vue.prototype[method] = function(args) {
  9722. if (this.$scope && this.$scope[method]) {
  9723. return this.$scope[method](args)
  9724. }
  9725. // mp-alipay
  9726. if (typeof my === 'undefined') {
  9727. return
  9728. }
  9729. if (method === 'createSelectorQuery') {
  9730. /* eslint-disable no-undef */
  9731. return my.createSelectorQuery(args)
  9732. } else if (method === 'createIntersectionObserver') {
  9733. /* eslint-disable no-undef */
  9734. return my.createIntersectionObserver(args)
  9735. }
  9736. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  9737. };
  9738. });
  9739. Vue.prototype.__init_provide = initProvide;
  9740. Vue.prototype.__init_injections = initInjections;
  9741. Vue.prototype.__call_hook = function(hook, args) {
  9742. var vm = this;
  9743. // #7573 disable dep collection when invoking lifecycle hooks
  9744. pushTarget();
  9745. var handlers = vm.$options[hook];
  9746. var info = hook + " hook";
  9747. var ret;
  9748. if (handlers) {
  9749. for (var i = 0, j = handlers.length; i < j; i++) {
  9750. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  9751. }
  9752. }
  9753. if (vm._hasHookEvent) {
  9754. vm.$emit('hook:' + hook, args);
  9755. }
  9756. popTarget();
  9757. return ret
  9758. };
  9759. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  9760. if (Array.isArray(modifiers)) {
  9761. if (modifiers.indexOf('trim') !== -1) {
  9762. value = value.trim();
  9763. }
  9764. if (modifiers.indexOf('number') !== -1) {
  9765. value = this._n(value);
  9766. }
  9767. }
  9768. if (!target) {
  9769. target = this;
  9770. }
  9771. target[key] = value;
  9772. };
  9773. Vue.prototype.__set_sync = function(target, key, value) {
  9774. if (!target) {
  9775. target = this;
  9776. }
  9777. target[key] = value;
  9778. };
  9779. Vue.prototype.__get_orig = function(item) {
  9780. if (isPlainObject(item)) {
  9781. return item['$orig'] || item
  9782. }
  9783. return item
  9784. };
  9785. Vue.prototype.__get_value = function(dataPath, target) {
  9786. return getTarget(target || this, dataPath)
  9787. };
  9788. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  9789. return renderClass(staticClass, dynamicClass)
  9790. };
  9791. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  9792. if (!dynamicStyle && !staticStyle) {
  9793. return ''
  9794. }
  9795. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  9796. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  9797. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  9798. };
  9799. Vue.prototype.__map = function(val, iteratee) {
  9800. //TODO 暂不考虑 string
  9801. var ret, i, l, keys, key;
  9802. if (Array.isArray(val)) {
  9803. ret = new Array(val.length);
  9804. for (i = 0, l = val.length; i < l; i++) {
  9805. ret[i] = iteratee(val[i], i);
  9806. }
  9807. return ret
  9808. } else if (isObject(val)) {
  9809. keys = Object.keys(val);
  9810. ret = Object.create(null);
  9811. for (i = 0, l = keys.length; i < l; i++) {
  9812. key = keys[i];
  9813. ret[key] = iteratee(val[key], key, i);
  9814. }
  9815. return ret
  9816. } else if (typeof val === 'number') {
  9817. ret = new Array(val);
  9818. for (i = 0, l = val; i < l; i++) {
  9819. // 第一个参数暂时仍和小程序一致
  9820. ret[i] = iteratee(i, i);
  9821. }
  9822. return ret
  9823. }
  9824. return []
  9825. };
  9826. }
  9827. /* */
  9828. var LIFECYCLE_HOOKS$1 = [
  9829. //App
  9830. 'onLaunch',
  9831. 'onShow',
  9832. 'onHide',
  9833. 'onUniNViewMessage',
  9834. 'onPageNotFound',
  9835. 'onThemeChange',
  9836. 'onError',
  9837. 'onUnhandledRejection',
  9838. //Page
  9839. 'onLoad',
  9840. // 'onShow',
  9841. 'onReady',
  9842. // 'onHide',
  9843. 'onUnload',
  9844. 'onPullDownRefresh',
  9845. 'onReachBottom',
  9846. 'onTabItemTap',
  9847. 'onAddToFavorites',
  9848. 'onShareTimeline',
  9849. 'onShareAppMessage',
  9850. 'onResize',
  9851. 'onPageScroll',
  9852. 'onNavigationBarButtonTap',
  9853. 'onBackPress',
  9854. 'onNavigationBarSearchInputChanged',
  9855. 'onNavigationBarSearchInputConfirmed',
  9856. 'onNavigationBarSearchInputClicked',
  9857. //Component
  9858. // 'onReady', // 兼容旧版本,应该移除该事件
  9859. 'onPageShow',
  9860. 'onPageHide',
  9861. 'onPageResize'
  9862. ];
  9863. function lifecycleMixin$1(Vue) {
  9864. //fixed vue-class-component
  9865. var oldExtend = Vue.extend;
  9866. Vue.extend = function(extendOptions) {
  9867. extendOptions = extendOptions || {};
  9868. var methods = extendOptions.methods;
  9869. if (methods) {
  9870. Object.keys(methods).forEach(function (methodName) {
  9871. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  9872. extendOptions[methodName] = methods[methodName];
  9873. delete methods[methodName];
  9874. }
  9875. });
  9876. }
  9877. return oldExtend.call(this, extendOptions)
  9878. };
  9879. var strategies = Vue.config.optionMergeStrategies;
  9880. var mergeHook = strategies.created;
  9881. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  9882. strategies[hook] = mergeHook;
  9883. });
  9884. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  9885. }
  9886. /* */
  9887. // install platform patch function
  9888. Vue.prototype.__patch__ = patch;
  9889. // public mount method
  9890. Vue.prototype.$mount = function(
  9891. el ,
  9892. hydrating
  9893. ) {
  9894. return mountComponent$1(this, el, hydrating)
  9895. };
  9896. lifecycleMixin$1(Vue);
  9897. internalMixin(Vue);
  9898. /* */
  9899. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  9900. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  9901. /***/ }),
  9902. /***/ 20:
  9903. /*!*******************************************************************!*\
  9904. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/utils.js ***!
  9905. \*******************************************************************/
  9906. /*! no static exports found */
  9907. /***/ (function(module, exports, __webpack_require__) {
  9908. "use strict";
  9909. // utils is a library of generic helper functions non-specific to axios
  9910. Object.defineProperty(exports, "__esModule", { value: true });exports.isArray = isArray;exports.isObject = isObject;exports.isDate = isDate;exports.isURLSearchParams = isURLSearchParams;exports.forEach = forEach;exports.isBoolean = isBoolean;exports.isPlainObject = isPlainObject;exports.deepMerge = deepMerge;
  9911. var toString = Object.prototype.toString;
  9912. /**
  9913. * Determine if a value is an Array
  9914. *
  9915. * @param {Object} val The value to test
  9916. * @returns {boolean} True if value is an Array, otherwise false
  9917. */
  9918. function isArray(val) {
  9919. return toString.call(val) === '[object Array]';
  9920. }
  9921. /**
  9922. * Determine if a value is an Object
  9923. *
  9924. * @param {Object} val The value to test
  9925. * @returns {boolean} True if value is an Object, otherwise false
  9926. */
  9927. function isObject(val) {
  9928. return val !== null && typeof val === 'object';
  9929. }
  9930. /**
  9931. * Determine if a value is a Date
  9932. *
  9933. * @param {Object} val The value to test
  9934. * @returns {boolean} True if value is a Date, otherwise false
  9935. */
  9936. function isDate(val) {
  9937. return toString.call(val) === '[object Date]';
  9938. }
  9939. /**
  9940. * Determine if a value is a URLSearchParams object
  9941. *
  9942. * @param {Object} val The value to test
  9943. * @returns {boolean} True if value is a URLSearchParams object, otherwise false
  9944. */
  9945. function isURLSearchParams(val) {
  9946. return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
  9947. }
  9948. /**
  9949. * Iterate over an Array or an Object invoking a function for each item.
  9950. *
  9951. * If `obj` is an Array callback will be called passing
  9952. * the value, index, and complete array for each item.
  9953. *
  9954. * If 'obj' is an Object callback will be called passing
  9955. * the value, key, and complete object for each property.
  9956. *
  9957. * @param {Object|Array} obj The object to iterate
  9958. * @param {Function} fn The callback to invoke for each item
  9959. */
  9960. function forEach(obj, fn) {
  9961. // Don't bother if no value provided
  9962. if (obj === null || typeof obj === 'undefined') {
  9963. return;
  9964. }
  9965. // Force an array if not already something iterable
  9966. if (typeof obj !== 'object') {
  9967. /*eslint no-param-reassign:0*/
  9968. obj = [obj];
  9969. }
  9970. if (isArray(obj)) {
  9971. // Iterate over array values
  9972. for (var i = 0, l = obj.length; i < l; i++) {
  9973. fn.call(null, obj[i], i, obj);
  9974. }
  9975. } else {
  9976. // Iterate over object keys
  9977. for (var key in obj) {
  9978. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  9979. fn.call(null, obj[key], key, obj);
  9980. }
  9981. }
  9982. }
  9983. }
  9984. /**
  9985. * 是否为boolean 值
  9986. * @param val
  9987. * @returns {boolean}
  9988. */
  9989. function isBoolean(val) {
  9990. return typeof val === 'boolean';
  9991. }
  9992. /**
  9993. * 是否为真正的对象{} new Object
  9994. * @param {any} obj - 检测的对象
  9995. * @returns {boolean}
  9996. */
  9997. function isPlainObject(obj) {
  9998. return Object.prototype.toString.call(obj) === '[object Object]';
  9999. }
  10000. /**
  10001. * Function equal to merge with the difference being that no reference
  10002. * to original objects is kept.
  10003. *
  10004. * @see merge
  10005. * @param {Object} obj1 Object to merge
  10006. * @returns {Object} Result of all merge properties
  10007. */
  10008. function deepMerge() /* obj1, obj2, obj3, ... */{
  10009. var result = {};
  10010. function assignValue(val, key) {
  10011. if (typeof result[key] === 'object' && typeof val === 'object') {
  10012. result[key] = deepMerge(result[key], val);
  10013. } else if (typeof val === 'object') {
  10014. result[key] = deepMerge({}, val);
  10015. } else {
  10016. result[key] = val;
  10017. }
  10018. }
  10019. for (var i = 0, l = arguments.length; i < l; i++) {
  10020. forEach(arguments[i], assignValue);
  10021. }
  10022. return result;
  10023. }
  10024. /***/ }),
  10025. /***/ 21:
  10026. /*!********************************************************************************!*\
  10027. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/core/buildFullPath.js ***!
  10028. \********************************************************************************/
  10029. /*! no static exports found */
  10030. /***/ (function(module, exports, __webpack_require__) {
  10031. "use strict";
  10032. Object.defineProperty(exports, "__esModule", { value: true });exports.default = buildFullPath;
  10033. var _isAbsoluteURL = _interopRequireDefault(__webpack_require__(/*! ../helpers/isAbsoluteURL */ 22));
  10034. var _combineURLs = _interopRequireDefault(__webpack_require__(/*! ../helpers/combineURLs */ 23));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  10035. /**
  10036. * Creates a new URL by combining the baseURL with the requestedURL,
  10037. * only when the requestedURL is not already an absolute URL.
  10038. * If the requestURL is absolute, this function returns the requestedURL untouched.
  10039. *
  10040. * @param {string} baseURL The base URL
  10041. * @param {string} requestedURL Absolute or relative URL to combine
  10042. * @returns {string} The combined full path
  10043. */
  10044. function buildFullPath(baseURL, requestedURL) {
  10045. if (baseURL && !(0, _isAbsoluteURL.default)(requestedURL)) {
  10046. return (0, _combineURLs.default)(baseURL, requestedURL);
  10047. }
  10048. return requestedURL;
  10049. }
  10050. /***/ }),
  10051. /***/ 22:
  10052. /*!***********************************************************************************!*\
  10053. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/helpers/isAbsoluteURL.js ***!
  10054. \***********************************************************************************/
  10055. /*! no static exports found */
  10056. /***/ (function(module, exports, __webpack_require__) {
  10057. "use strict";
  10058. /**
  10059. * Determines whether the specified URL is absolute
  10060. *
  10061. * @param {string} url The URL to test
  10062. * @returns {boolean} True if the specified URL is absolute, otherwise false
  10063. */Object.defineProperty(exports, "__esModule", { value: true });exports.default = isAbsoluteURL;
  10064. function isAbsoluteURL(url) {
  10065. // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  10066. // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  10067. // by any combination of letters, digits, plus, period, or hyphen.
  10068. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
  10069. }
  10070. /***/ }),
  10071. /***/ 23:
  10072. /*!*********************************************************************************!*\
  10073. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/helpers/combineURLs.js ***!
  10074. \*********************************************************************************/
  10075. /*! no static exports found */
  10076. /***/ (function(module, exports, __webpack_require__) {
  10077. "use strict";
  10078. /**
  10079. * Creates a new URL by combining the specified URLs
  10080. *
  10081. * @param {string} baseURL The base URL
  10082. * @param {string} relativeURL The relative URL
  10083. * @returns {string} The combined URL
  10084. */Object.defineProperty(exports, "__esModule", { value: true });exports.default = combineURLs;
  10085. function combineURLs(baseURL, relativeURL) {
  10086. return relativeURL ?
  10087. baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') :
  10088. baseURL;
  10089. }
  10090. /***/ }),
  10091. /***/ 24:
  10092. /*!*************************************************************************!*\
  10093. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/core/settle.js ***!
  10094. \*************************************************************************/
  10095. /*! no static exports found */
  10096. /***/ (function(module, exports, __webpack_require__) {
  10097. "use strict";
  10098. Object.defineProperty(exports, "__esModule", { value: true });exports.default = settle; /**
  10099. * Resolve or reject a Promise based on response status.
  10100. *
  10101. * @param {Function} resolve A function that resolves the promise.
  10102. * @param {Function} reject A function that rejects the promise.
  10103. * @param {object} response The response.
  10104. */
  10105. function settle(resolve, reject, response) {
  10106. var validateStatus = response.config.validateStatus;
  10107. var status = response.statusCode;
  10108. if (status && (!validateStatus || validateStatus(status))) {
  10109. resolve(response);
  10110. } else {
  10111. reject(response);
  10112. }
  10113. }
  10114. /***/ }),
  10115. /***/ 25:
  10116. /*!*************************************************************************************!*\
  10117. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/core/InterceptorManager.js ***!
  10118. \*************************************************************************************/
  10119. /*! no static exports found */
  10120. /***/ (function(module, exports, __webpack_require__) {
  10121. "use strict";
  10122. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  10123. function InterceptorManager() {
  10124. this.handlers = [];
  10125. }
  10126. /**
  10127. * Add a new interceptor to the stack
  10128. *
  10129. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  10130. * @param {Function} rejected The function to handle `reject` for a `Promise`
  10131. *
  10132. * @return {Number} An ID used to remove interceptor later
  10133. */
  10134. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  10135. this.handlers.push({
  10136. fulfilled: fulfilled,
  10137. rejected: rejected });
  10138. return this.handlers.length - 1;
  10139. };
  10140. /**
  10141. * Remove an interceptor from the stack
  10142. *
  10143. * @param {Number} id The ID that was returned by `use`
  10144. */
  10145. InterceptorManager.prototype.eject = function eject(id) {
  10146. if (this.handlers[id]) {
  10147. this.handlers[id] = null;
  10148. }
  10149. };
  10150. /**
  10151. * Iterate over all the registered interceptors
  10152. *
  10153. * This method is particularly useful for skipping over any
  10154. * interceptors that may have become `null` calling `eject`.
  10155. *
  10156. * @param {Function} fn The function to call for each interceptor
  10157. */
  10158. InterceptorManager.prototype.forEach = function forEach(fn) {
  10159. this.handlers.forEach(function (h) {
  10160. if (h !== null) {
  10161. fn(h);
  10162. }
  10163. });
  10164. };var _default =
  10165. InterceptorManager;exports.default = _default;
  10166. /***/ }),
  10167. /***/ 26:
  10168. /*!******************************************************************************!*\
  10169. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/core/mergeConfig.js ***!
  10170. \******************************************************************************/
  10171. /*! no static exports found */
  10172. /***/ (function(module, exports, __webpack_require__) {
  10173. "use strict";
  10174. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _utils = __webpack_require__(/*! ../utils */ 20);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;}
  10175. /**
  10176. * 合并局部配置优先的配置,如果局部有该配置项则用局部,如果全局有该配置项则用全局
  10177. * @param {Array} keys - 配置项
  10178. * @param {Object} globalsConfig - 当前的全局配置
  10179. * @param {Object} config2 - 局部配置
  10180. * @return {{}}
  10181. */
  10182. var mergeKeys = function mergeKeys(keys, globalsConfig, config2) {
  10183. var config = {};
  10184. keys.forEach(function (prop) {
  10185. if (typeof config2[prop] !== 'undefined') {
  10186. config[prop] = config2[prop];
  10187. } else if (typeof globalsConfig[prop] !== 'undefined') {
  10188. config[prop] = globalsConfig[prop];
  10189. }
  10190. });
  10191. return config;
  10192. };
  10193. /**
  10194. *
  10195. * @param globalsConfig - 当前实例的全局配置
  10196. * @param config2 - 当前的局部配置
  10197. * @return - 合并后的配置
  10198. */var _default =
  10199. function _default(globalsConfig) {var config2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  10200. var method = config2.method || globalsConfig.method || 'GET';
  10201. var config = {
  10202. baseURL: globalsConfig.baseURL || '',
  10203. method: method,
  10204. url: config2.url || '',
  10205. params: config2.params || {},
  10206. custom: _objectSpread({}, globalsConfig.custom || {}, {}, config2.custom || {}),
  10207. header: (0, _utils.deepMerge)(globalsConfig.header || {}, config2.header || {}) };
  10208. var defaultToConfig2Keys = ['getTask', 'validateStatus'];
  10209. config = _objectSpread({}, config, {}, mergeKeys(defaultToConfig2Keys, globalsConfig, config2));
  10210. // eslint-disable-next-line no-empty
  10211. if (method === 'DOWNLOAD') {
  10212. } else if (method === 'UPLOAD') {
  10213. delete config.header['content-type'];
  10214. delete config.header['Content-Type'];
  10215. var uploadKeys = [
  10216. 'filePath',
  10217. 'name',
  10218. 'formData'];
  10219. uploadKeys.forEach(function (prop) {
  10220. if (typeof config2[prop] !== 'undefined') {
  10221. config[prop] = config2[prop];
  10222. }
  10223. });
  10224. } else {
  10225. var defaultsKeys = [
  10226. 'data',
  10227. 'timeout',
  10228. 'dataType',
  10229. 'responseType'];
  10230. config = _objectSpread({}, config, {}, mergeKeys(defaultsKeys, globalsConfig, config2));
  10231. }
  10232. return config;
  10233. };exports.default = _default;
  10234. /***/ }),
  10235. /***/ 27:
  10236. /*!***************************************************************************!*\
  10237. !*** D:/wwwroot/forest/js_sdk/luch-request/luch-request/core/defaults.js ***!
  10238. \***************************************************************************/
  10239. /*! no static exports found */
  10240. /***/ (function(module, exports, __webpack_require__) {
  10241. "use strict";
  10242. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  10243. * 默认的全局配置
  10244. */var _default =
  10245. {
  10246. baseURL: '',
  10247. header: {},
  10248. method: 'GET',
  10249. dataType: 'json',
  10250. responseType: 'text',
  10251. custom: {},
  10252. timeout: 30000,
  10253. validateStatus: function validateStatus(status) {
  10254. return status >= 200 && status < 300;
  10255. } };exports.default = _default;
  10256. /***/ }),
  10257. /***/ 28:
  10258. /*!*****************************************!*\
  10259. !*** D:/wwwroot/forest/utils/filter.js ***!
  10260. \*****************************************/
  10261. /*! no static exports found */
  10262. /***/ (function(module, exports, __webpack_require__) {
  10263. "use strict";
  10264. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  10265. var _config = __webpack_require__(/*! @/config/config */ 12);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  10266. //保留两位小数
  10267. _vue.default.filter('keepTwoNum', function (val) {
  10268. var value = Number(val);
  10269. return value.toFixed(2);
  10270. });
  10271. //链接加时间戳
  10272. _vue.default.filter("timestamp", function (link) {
  10273. return link + '?t=' + new Date().getTime();
  10274. });
  10275. /***/ }),
  10276. /***/ 3:
  10277. /*!***********************************!*\
  10278. !*** (webpack)/buildin/global.js ***!
  10279. \***********************************/
  10280. /*! no static exports found */
  10281. /***/ (function(module, exports) {
  10282. var g;
  10283. // This works in non-strict mode
  10284. g = (function() {
  10285. return this;
  10286. })();
  10287. try {
  10288. // This works if eval is allowed (see CSP)
  10289. g = g || new Function("return this")();
  10290. } catch (e) {
  10291. // This works if the window reference is available
  10292. if (typeof window === "object") g = window;
  10293. }
  10294. // g can still be undefined, but nothing to do about it...
  10295. // We return undefined, instead of nothing here, so it's
  10296. // easier to handle this case. if(!global) { ...}
  10297. module.exports = g;
  10298. /***/ }),
  10299. /***/ 35:
  10300. /*!********************************************************************!*\
  10301. !*** D:/wwwroot/forest/components/mescroll-uni/mescroll-mixins.js ***!
  10302. \********************************************************************/
  10303. /*! no static exports found */
  10304. /***/ (function(module, exports, __webpack_require__) {
  10305. "use strict";
  10306. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // mescroll-body 和 mescroll-uni 通用
  10307. // import MescrollUni from "./mescroll-uni.vue";
  10308. // import MescrollBody from "./mescroll-body.vue";
  10309. var MescrollMixin = {
  10310. // components: { // 非H5端无法通过mixin注册组件, 只能在main.js中注册全局组件或具体界面中注册
  10311. // MescrollUni,
  10312. // MescrollBody
  10313. // },
  10314. data: function data() {
  10315. return {
  10316. mescroll: null //mescroll实例对象
  10317. };
  10318. },
  10319. // 注册系统自带的下拉刷新 (配置down.native为true时生效, 还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  10320. onPullDownRefresh: function onPullDownRefresh() {
  10321. this.mescroll && this.mescroll.onPullDownRefresh();
  10322. },
  10323. // 注册列表滚动事件,用于判定在顶部可下拉刷新,在指定位置可显示隐藏回到顶部按钮 (此方法为页面生命周期,无法在子组件中触发, 仅在mescroll-body生效)
  10324. onPageScroll: function onPageScroll(e) {
  10325. this.mescroll && this.mescroll.onPageScroll(e);
  10326. },
  10327. // 注册滚动到底部的事件,用于上拉加载 (此方法为页面生命周期,无法在子组件中触发, 仅在mescroll-body生效)
  10328. onReachBottom: function onReachBottom() {
  10329. this.mescroll && this.mescroll.onReachBottom();
  10330. },
  10331. methods: {
  10332. // mescroll组件初始化的回调,可获取到mescroll对象
  10333. mescrollInit: function mescrollInit(mescroll) {
  10334. this.mescroll = mescroll;
  10335. this.mescrollInitByRef(); // 兼容字节跳动小程序
  10336. },
  10337. // 以ref的方式初始化mescroll对象 (兼容字节跳动小程序: http://www.mescroll.com/qa.html?v=20200107#q26)
  10338. mescrollInitByRef: function mescrollInitByRef() {
  10339. if (!this.mescroll || !this.mescroll.resetUpScroll) {
  10340. var mescrollRef = this.$refs.mescrollRef;
  10341. if (mescrollRef) this.mescroll = mescrollRef.mescroll;
  10342. }
  10343. },
  10344. // 下拉刷新的回调 (mixin默认resetUpScroll)
  10345. downCallback: function downCallback() {var _this = this;
  10346. if (this.mescroll.optUp.use) {
  10347. this.mescroll.resetUpScroll();
  10348. } else {
  10349. setTimeout(function () {
  10350. _this.mescroll.endSuccess();
  10351. }, 500);
  10352. }
  10353. },
  10354. // 上拉加载的回调
  10355. upCallback: function upCallback() {var _this2 = this;
  10356. // mixin默认延时500自动结束加载
  10357. setTimeout(function () {
  10358. _this2.mescroll.endErr();
  10359. }, 500);
  10360. } },
  10361. mounted: function mounted() {
  10362. this.mescrollInitByRef(); // 兼容字节跳动小程序, 避免未设置@init或@init此时未能取到ref的情况
  10363. } };var _default =
  10364. MescrollMixin;exports.default = _default;
  10365. /***/ }),
  10366. /***/ 4:
  10367. /*!************************************!*\
  10368. !*** D:/wwwroot/forest/pages.json ***!
  10369. \************************************/
  10370. /*! no static exports found */
  10371. /***/ (function(module, exports) {
  10372. /***/ }),
  10373. /***/ 8:
  10374. /*!*****************************************************!*\
  10375. !*** D:/wwwroot/forest/static/iconfont/iconfont.js ***!
  10376. \*****************************************************/
  10377. /*! no static exports found */
  10378. /***/ (function(module, exports) {
  10379. !function (a) {var l,c,_t,h,e,i,_o,n = '<svg><symbol id="iconshangpin" viewBox="0 0 1024 1024"><path d="M615.402667 511.296l-104.341334-104.341333-104.341333 104.341333c-15.466667 15.466667-15.466667 38.656 0 54.101333 15.445333 15.466667 38.634667 15.466667 54.101333 0l11.584-11.584v332.373334c0 21.248 17.386667 38.634667 38.656 38.634666 21.248 0 38.634667-17.386667 38.634667-38.634666V553.813333l11.605333 11.584c7.722667 7.744 17.386667 11.605333 27.050667 11.605334 9.664 0 19.328-3.861333 27.050667-11.605334 15.466667-15.445333 15.466667-38.634667 0-54.101333z" fill="#B8E986" ></path><path d="M279.168 832.064c-3.84 0-7.722667 0-13.525333-1.92C159.36 791.466667 85.930667 689.066667 85.930667 575.061333c0-104.341333 61.845333-200.96 156.522666-243.477333 17.386667-131.413333 131.413333-233.813333 268.586667-233.813333 137.216 0 251.221333 104.341333 268.608 235.733333 94.698667 44.458667 156.522667 139.157333 156.522667 243.498667 0 114.005333-73.429333 214.485333-179.712 253.141333-19.306667 7.722667-42.496-3.861333-48.298667-23.189333-7.722667-19.328 3.861333-42.517333 23.189333-48.32 77.290667-27.050667 129.472-98.56 129.472-179.712 0-81.152-52.181333-152.64-129.493333-179.690667l-27.029333-11.605333v-27.050667c-1.92-102.4-88.896-185.514667-193.237334-185.514667s-191.317333 83.093333-193.237333 185.514667v27.050667l-25.130667 9.664c-77.290667 25.109333-129.472 98.56-129.472 177.770666 0 81.173333 52.181333 152.661333 129.493334 179.712 19.306667 7.744 30.912 28.992 23.168 48.32-5.781333 17.386667-21.248 28.970667-36.693334 28.970667z" fill="#6BBC6D" ></path></symbol><symbol id="iconcaigou" viewBox="0 0 1024 1024"><path d="M342.741333 423.338667h493.824v138.261333H342.741333z" fill="#B8E986" ></path><path d="M915.584 257.408c-21.738667-31.616-59.264-51.349333-98.773333-51.349333H297.301333l-7.893333-37.546667a78.442667 78.442667 0 0 0-77.034667-61.226667H125.44A39.616 39.616 0 0 0 85.952 146.773333c0 21.717333 17.770667 39.509333 39.509333 39.509334h86.912l15.786667 67.157333 90.88 404.928a78.442667 78.442667 0 0 0 77.034667 61.226667h400.981333a39.616 39.616 0 0 0 39.509333-39.488 39.616 39.616 0 0 0-39.509333-39.509334H394.090667l-7.893334-39.509333h375.317334c49.365333 0 94.805333-31.594667 112.576-77.034667l57.301333-154.069333c11.84-39.509333 5.909333-81.002667-15.808-112.597333z m-59.264 82.965333l-59.264 156.053334c-5.930667 15.786667-19.754667 25.664-37.525333 25.664H368.426667l-53.333334-237.013334h501.717334c13.824 0 25.685333 5.909333 33.578666 17.770667 7.893333 11.84 9.877333 25.664 5.930667 37.525333zM402.005333 917.162667a79.253333 79.253333 0 0 1-79.018666-79.018667 79.253333 79.253333 0 0 1 79.018666-79.018667 79.253333 79.253333 0 0 1 78.997334 79.018667 79.253333 79.253333 0 0 1-78.997334 79.018667z m355.541334 0a79.253333 79.253333 0 0 1-78.997334-79.018667 79.253333 79.253333 0 0 1 78.997334-79.018667 79.253333 79.253333 0 0 1 79.018666 79.018667 79.253333 79.253333 0 0 1-79.018666 79.018667z" fill="#6BBC6D" ></path></symbol><symbol id="icondizhi" viewBox="0 0 1024 1024"><path d="M421.461333 476.928a44.864 44.864 0 0 1-44.714666 44.714667h-89.450667a44.864 44.864 0 0 1-44.736-44.714667c0-24.597333 20.138667-44.736 44.736-44.736h89.450667c24.597333 0 44.714667 20.138667 44.714666 44.736z" fill="#B8E986" ></path><path d="M578.005333 298.026667h-134.186666c-73.792 0-134.186667-60.373333-134.186667-134.186667 0-73.792 60.394667-134.165333 134.186667-134.165333h134.186666c73.792 0 134.165333 60.373333 134.165334 134.186666 0 73.792-60.373333 134.165333-134.186667 134.165334z m-134.186666-178.901334a44.864 44.864 0 0 0-44.714667 44.736c0 24.597333 20.117333 44.714667 44.714667 44.714667h134.186666a44.864 44.864 0 0 0 44.714667-44.714667 44.864 44.864 0 0 0-44.714667-44.736h-134.186666z" fill="#6BBC6D" ></path><path d="M801.621333 991.253333H220.202667c-73.813333 0-134.186667-60.373333-134.186667-134.186666v-626.133334c0-73.792 60.373333-134.186667 134.186667-134.186666 24.597333 0 44.736 20.138667 44.736 44.736a44.864 44.864 0 0 1-44.736 44.736 44.864 44.864 0 0 0-44.714667 44.714666v626.133334c0 24.597333 20.117333 44.736 44.714667 44.736h581.418666a44.864 44.864 0 0 0 44.714667-44.736v-626.133334a44.864 44.864 0 0 0-44.714667-44.714666 44.864 44.864 0 0 1-44.736-44.736c0-24.597333 20.138667-44.714667 44.736-44.714667 73.792 0 134.165333 60.373333 134.165334 134.186667v626.133333c0 73.770667-60.373333 134.165333-134.186667 134.165333z" fill="#6BBC6D" ></path><path d="M595.882667 573.077333a44.16 44.16 0 0 1-31.296-13.418666l-84.992-84.970667c-17.877333-17.898667-17.877333-44.736 0-62.613333 17.898667-17.898667 44.736-17.898667 62.613333 0l51.434667 51.413333 107.349333-107.306667c17.877333-17.92 44.714667-17.92 62.613333 0 17.877333 17.877333 17.877333 44.714667 0 62.592l-140.885333 140.885334c-4.48 8.96-15.658667 13.418667-26.837333 13.418666z m-174.421334 172.181334a44.864 44.864 0 0 1-44.714666 44.736h-89.450667a44.864 44.864 0 0 1-44.736-44.736c0-24.597333 20.138667-44.714667 44.736-44.714667h89.450667c24.597333 0 44.714667 20.117333 44.714666 44.714667z m174.421334 96.170666a44.16 44.16 0 0 1-31.296-13.44L479.573333 743.04c-17.877333-17.877333-17.877333-44.714667 0-62.613333 17.898667-17.877333 44.736-17.877333 62.613334 0l51.434666 51.434666 107.349334-107.328c17.877333-17.898667 44.714667-17.898667 62.613333 0 17.877333 17.877333 17.877333 44.714667 0 62.613334l-140.885333 140.885333c-4.48 8.938667-15.658667 13.418667-26.837334 13.418667z" fill="#B8E986" ></path></symbol><symbol id="iconzhaodaimai" viewBox="0 0 1024 1024"><path d="M317.824 279.168c9.664 0 19.328-9.664 19.328-19.328 0-9.642667-9.664-19.306667-19.328-19.306667h-11.605333l25.130666-25.130666a18.688 18.688 0 0 0 0-27.050667 18.688 18.688 0 0 0-27.050666 0l-25.130667 25.130667-25.109333-25.130667a18.688 18.688 0 0 0-27.050667 0 18.688 18.688 0 0 0 0 27.050667l25.109333 25.130666h-11.584c-9.664 0-19.328 9.664-19.328 19.306667 0 9.664 9.664 19.328 19.328 19.328h19.306667v19.328h-19.306667c-9.664 0-19.328 9.664-19.328 19.328s9.664 19.328 19.328 19.328h19.306667v19.306667c0 9.664 9.664 19.328 19.328 19.328s19.328-9.664 19.328-19.328v-19.306667h19.328c9.664 0 19.328-9.664 19.328-19.328s-9.664-19.328-19.328-19.328h-19.328v-19.328h19.328z" fill="#B8E986" ></path><path d="M804.778667 445.354667a182.613333 182.613333 0 0 0 63.786666-139.136c0-100.48-83.114667-183.573333-183.594666-183.573334s-183.573333 83.093333-183.573334 183.573334a182.613333 182.613333 0 0 0 63.786667 139.136c-34.794667 19.328-63.786667 44.437333-86.976 77.290666l-63.786667-65.706666c34.794667-19.306667 57.984-57.962667 57.984-100.48V201.877333c0-63.765333-52.16-115.946667-115.946666-115.946666H201.877333c-63.765333 0-115.946667 52.181333-115.946666 115.946666v154.581334c0 63.786667 52.181333 115.946667 115.946666 115.946666h119.808l123.669334 123.669334c-7.722667 21.269333-11.584 44.458667-11.584 69.568H211.541333a125.354667 125.354667 0 0 0-125.610666 125.610666v19.328a125.354667 125.354667 0 0 0 125.610666 125.589334h599.04a125.354667 125.354667 0 0 0 125.589334-125.589334v-144.938666c0-94.677333-54.101333-177.770667-131.392-220.288zM163.221333 356.48V201.877333c0-21.248 17.408-38.656 38.656-38.656h154.581334c21.269333 0 38.656 17.408 38.656 38.656v154.581334c0 21.269333-17.386667 38.656-38.656 38.656H201.877333a38.762667 38.762667 0 0 1-38.656-38.656z m521.749334-158.442667c57.962667 0 106.282667 48.298667 106.282666 106.282667 0 57.962667-48.32 106.282667-106.282666 106.282667s-106.282667-48.32-106.282667-106.282667c0-57.984 48.32-106.282667 106.282667-106.282667z m0 293.717334a173.184 173.184 0 0 1 173.909333 173.909333H511.061333a173.184 173.184 0 0 1 173.909334-173.909333z m173.909333 318.848a47.829333 47.829333 0 0 1-48.298667 48.298666H211.541333a47.829333 47.829333 0 0 1-48.32-48.298666v-19.328c0-27.050667 21.269333-48.32 48.32-48.32H858.88v67.626666z" fill="#6BBC6D" ></path></symbol><symbol id="iconGroup2" viewBox="0 0 1055 1024"><path d="M430.257343 858.627311C196.19095 858.627311 6.397879 667.842568 6.397879 432.52859 6.397879 197.182622 196.158961 6.397879 430.257343 6.397879c234.130371 0 423.891453 190.784743 423.891453 426.098721 0 235.345968-189.761082 426.130711-423.859464 426.130711z m0-97.983512c180.292222 0 326.419771-146.895295 326.419771-328.115209 0-181.251904-146.12755-328.147199-326.387782-328.147199-180.292222 0-326.419771 146.895295-326.419771 328.147199 0 181.219914 146.12755 328.115209 326.419771 328.115209z" ></path><path d="M872.510708 796.088047l144.52808 145.327815a48.559899 48.559899 0 0 1 0 68.457302l-0.063979 0.063979a48.144037 48.144037 0 0 1-68.265365 0l-144.52808-145.295826a48.559899 48.559899 0 0 1 0-68.457302l0.063978-0.095968a48.144037 48.144037 0 0 1 68.265366 0z" ></path></symbol><symbol id="iconfabu1" viewBox="0 0 1024 1024"><path d="M202.532571 494.153143c16.64 0 30.171429-13.494857 30.171429-30.134857V136.228571c0-1.718857 0.950857-2.413714 1.206857-2.413714h407.04v77.019429c0 36.571429 29.732571 66.304 66.267429 66.304h83.931428v186.88a30.134857 30.134857 0 0 0 60.269715 0V247.003429c0-0.585143 0-1.206857-0.109715-1.828572v-0.438857c0-0.621714-0.109714-1.206857-0.256-1.828571v-0.219429a38.107429 38.107429 0 0 0-2.413714-8.301714v-0.146286c-0.365714-0.621714-0.585143-1.316571-0.950857-1.938286 0 0 0-0.109714-0.109714-0.109714l-0.987429-1.682286c0-0.146286-0.109714-0.146286-0.109714-0.256a14.628571 14.628571 0 0 0-1.206857-1.682285c-0.109714-0.109714-0.109714-0.256-0.219429-0.365715a12.8 12.8 0 0 0-1.206857-1.462857l-0.146286-0.109714-1.462857-1.462857-0.109714-0.109715-150.198857-143.213714-0.146286-0.146286-1.462857-1.316571h-0.073143c-0.512-0.365714-0.987429-0.841143-1.572572-1.206857-0.146286-0.109714-0.256-0.109714-0.365714-0.219429-1.097143-0.841143-2.304-1.462857-3.510857-2.194285 0 0-0.109714 0-0.109714-0.109715a30.354286 30.354286 0 0 0-8.082286-2.779428h-0.256a10.605714 10.605714 0 0 0-2.048-0.219429c-0.585143-0.146286-1.316571-0.146286-1.901714-0.146286H233.910857c-33.901714 0-61.513143 28.086857-61.513143 62.72v327.68c0 16.749714 13.531429 30.244571 30.134857 30.244572z m504.685715-277.284572a6.107429 6.107429 0 0 1-5.997715-6.034285V174.08L746.057143 216.868571h-38.838857z" fill="#999999" ></path><path d="M938.715429 708.388571l-215.698286-169.618285a30.098286 30.098286 0 0 0-10.715429-5.412572c-78.116571-21.101714-261.485714-70.656-276.699428-72.813714-27.721143-4.096-64.621714 16.128-78.848 43.410286-14.957714 28.525714-11.446857 71.972571 23.990857 99.584 4.571429 3.620571 14.811429 11.556571 97.170286 49.664L339.382857 650.971429a30695.350857 30695.350857 0 0 0-129.974857-122.112c-14.226286-12.288-41.837714-15.542857-53.028571-16.384-27.867429-2.048-48.822857 2.742857-62.208 14.555428-16.64 14.628571-23.515429 38.253714-19.675429 68.388572 2.048 16.018286 8.082286 38.948571 18.212571 50.505142 1.097143 1.316571 2.925714 3.291429 210.870858 203.154286 7.350857 7.131429 17.115429 11.081143 27.355428 11.081143h359.168l48.128 57.417143c9.764571 11.702857 23.990857 18.285714 39.168 18.285714h1.206857c15.689143-0.365714 29.988571-7.68 39.533715-20.114286l125.769142-165.156571a30.281143 30.281143 0 0 0-5.193142-42.203429z m-161.572572 161.572572l-49.773714-59.428572a30.134857 30.134857 0 0 0-23.149714-10.715428H339.382857c-66.669714-64.146286-182.052571-175.067429-200.118857-192.658286-3.766857-8.448-6.656-26.697143-4.973714-34.267428 8.923429-1.901714 29.184 0 37.376 3.035428 13.385143 12.544 85.979429 80.749714 134.802285 126.829714 5.449143 5.193143 12.653714 8.045714 20.114286 8.192l296.594286 4.717715a29.988571 29.988571 0 0 0 29.915428-23.771429 30.208 30.208 0 0 0-17.371428-34.011428c-96.329143-42.057143-204.214857-91.721143-218.221714-102.107429-11.812571-9.142857-9.508571-20.48-7.570286-24.137143 2.267429-4.425143 12.434286-10.715429 17.334857-11.410286 19.419429 4.096 167.972571 43.885714 263.204571 69.668572l187.501715 147.456-100.827429 132.608zM300.8 284.745143h299.629714a30.134857 30.134857 0 0 0 0-60.269714H300.8a30.134857 30.134857 0 0 0 0 60.269714z m0 126.829714h422.107429a30.134857 30.134857 0 0 0 0-60.269714H300.8a30.134857 30.134857 0 0 0 0 60.269714z" fill="#999999" ></path></symbol><symbol id="iconhome" viewBox="0 0 1024 1024"><path d="M946.468571 505.014857L534.637714 93.403429a31.926857 31.926857 0 0 0-45.202285 0L77.494857 505.014857a64.073143 64.073143 0 0 0 45.202286 109.312h43.410286v293.668572c0 17.700571 14.262857 32 32 32h249.892571v-224h112.018286v224h265.874285a31.963429 31.963429 0 0 0 32-32v-293.668572h43.410286a64.073143 64.073143 0 0 0 45.202286-109.312z" fill="#65B74E" ></path></symbol><symbol id="iconwode1" viewBox="0 0 1024 1024"><path d="M500.004571 608.621714A267.190857 267.190857 0 0 1 311.076571 152.502857a267.190857 267.190857 0 1 1 377.856 377.856 265.435429 265.435429 0 0 1-188.928 78.262857z m0-477.513143a210.578286 210.578286 0 0 0-210.322285 210.322286 210.578286 210.578286 0 0 0 210.322285 210.322286 210.578286 210.578286 0 0 0 210.322286-210.285714 210.578286 210.578286 0 0 0-210.285714-210.358858z" fill="#999999" ></path><path d="M880.713143 948.553143a28.416 28.416 0 0 1-28.233143-25.234286 354.194286 354.194286 0 0 0-352.475429-314.697143 354.121143 354.121143 0 0 0-352.438857 314.697143 28.416 28.416 0 0 1-56.502857-6.363428 411.574857 411.574857 0 0 1 817.956572 0 28.416 28.416 0 0 1-28.306286 31.597714z m-380.708572-464.932572a353.28 353.28 0 0 1-90.733714-11.849142l-6.4-1.682286a28.416 28.416 0 0 1 14.628572-54.930286l6.363428 1.682286c49.883429 13.238857 102.4 13.238857 152.283429 0l6.4-1.682286a28.416 28.416 0 0 1 14.592 54.930286l-6.4 1.682286a353.353143 353.353143 0 0 1-90.697143 11.849142z" fill="#999999" ></path></symbol><symbol id="iconwode2" viewBox="0 0 1024 1024"><path d="M890.441143 947.565714a28.416 28.416 0 0 1-28.233143-25.234285 354.157714 354.157714 0 0 0-352.475429-314.733715 354.157714 354.157714 0 0 0-352.438857 314.697143 28.416 28.416 0 1 1-56.466285-6.326857 411.574857 411.574857 0 0 1 817.956571 0 28.416 28.416 0 0 1-28.342857 31.597714z" fill="#6BBC6D" ></path><path d="M509.732571 73.252571a267.190857 267.190857 0 1 0 0 534.345143 267.190857 267.190857 0 0 0 0-534.345143z m97.133715 395.812572l-6.4 1.718857a353.755429 353.755429 0 0 1-181.467429 0l-6.363428-1.718857a28.416 28.416 0 1 1 14.592-54.930286l6.363428 1.718857c49.92 13.238857 102.4 13.238857 152.283429 0l6.4-1.718857a28.416 28.416 0 0 1 14.592 54.930286z" fill="#6BBC6D" ></path></symbol><symbol id="iconfabu2" viewBox="0 0 1024 1024"><path d="M202.532571 494.153143c16.64 0 30.171429-13.494857 30.171429-30.134857V136.228571c0-1.718857 0.950857-2.413714 1.206857-2.413714h407.04v77.019429c0 36.571429 29.732571 66.304 66.267429 66.304h83.931428v186.88a30.134857 30.134857 0 0 0 60.269715 0V247.003429c0-0.585143 0-1.206857-0.109715-1.828572v-0.438857c0-0.621714-0.109714-1.206857-0.256-1.828571v-0.219429a38.107429 38.107429 0 0 0-2.413714-8.301714v-0.146286c-0.365714-0.621714-0.585143-1.316571-0.950857-1.938286 0 0 0-0.109714-0.109714-0.109714l-0.987429-1.682286c0-0.146286-0.109714-0.146286-0.109714-0.256a14.628571 14.628571 0 0 0-1.206857-1.682285c-0.109714-0.109714-0.109714-0.256-0.219429-0.365715a12.8 12.8 0 0 0-1.206857-1.462857l-0.146286-0.109714-1.462857-1.462857-0.109714-0.109715-150.198857-143.213714-0.146286-0.146286-1.462857-1.316571h-0.073143c-0.512-0.365714-0.987429-0.841143-1.572572-1.206857-0.146286-0.109714-0.256-0.109714-0.365714-0.219429-1.097143-0.841143-2.304-1.462857-3.510857-2.194285 0 0-0.109714 0-0.109714-0.109715a30.354286 30.354286 0 0 0-8.082286-2.779428h-0.256a10.605714 10.605714 0 0 0-2.048-0.219429c-0.585143-0.146286-1.316571-0.146286-1.901714-0.146286H233.910857c-33.901714 0-61.513143 28.086857-61.513143 62.72v327.68c0 16.749714 13.531429 30.244571 30.134857 30.244572z m504.685715-277.284572a6.107429 6.107429 0 0 1-5.997715-6.034285V174.08L746.057143 216.868571h-38.838857z" fill="#6BBC6D" ></path><path d="M938.715429 708.388571l-215.698286-169.618285a30.098286 30.098286 0 0 0-10.715429-5.412572c-78.116571-21.101714-261.485714-70.656-276.699428-72.813714-27.721143-4.096-64.621714 16.128-78.848 43.410286-14.957714 28.525714-11.446857 71.972571 23.990857 99.584 4.571429 3.620571 14.811429 11.556571 97.170286 49.664L339.382857 650.971429a30695.350857 30695.350857 0 0 0-129.974857-122.112c-14.226286-12.288-41.837714-15.542857-53.028571-16.384-27.867429-2.048-48.822857 2.742857-62.208 14.555428-16.64 14.628571-23.515429 38.253714-19.675429 68.388572 2.048 16.018286 8.082286 38.948571 18.212571 50.505142 1.097143 1.316571 2.925714 3.291429 210.870858 203.154286 7.350857 7.131429 17.115429 11.081143 27.355428 11.081143h359.168l48.128 57.417143c9.764571 11.702857 23.990857 18.285714 39.168 18.285714h1.206857c15.689143-0.365714 29.988571-7.68 39.533715-20.114286l125.769142-165.156571a30.281143 30.281143 0 0 0-5.193142-42.203429zM300.8 284.781714h299.629714a30.134857 30.134857 0 0 0 0-60.269714H300.8a30.134857 30.134857 0 0 0 0 60.269714z m0 126.829715h422.107429a30.134857 30.134857 0 0 0 0-60.269715H300.8a30.134857 30.134857 0 0 0 0 60.269715z" fill="#6BBC6D" ></path></symbol><symbol id="iconhome2" viewBox="0 0 1024 1024"><path d="M770.304 947.638857H245.138286a86.381714 86.381714 0 0 1-86.564572-86.089143v-309.577143H102.582857a28.562286 28.562286 0 0 1-26.331428-17.298285 28.306286 28.306286 0 0 1 5.741714-30.866286L490.569143 82.578286a28.635429 28.635429 0 0 1 41.142857 0l408.576 421.229714c7.972571 8.192 10.24 20.370286 5.741714 30.866286a28.562286 28.562286 0 0 1-26.331428 17.298285H856.868571v309.577143a86.381714 86.381714 0 0 1-86.564571 86.089143zM169.801143 495.140571h17.298286a28.525714 28.525714 0 0 1 28.562285 28.416v337.993143a29.184 29.184 0 0 0 29.44 29.257143h525.165715a29.330286 29.330286 0 0 0 29.403428-29.257143v-337.993143c0-15.725714 12.8-28.416 28.562286-28.416h24.173714l-341.284571-351.890285-341.321143 351.890285z" fill="#999999" ></path><path d="M625.371429 947.638857h-228.571429a28.525714 28.525714 0 0 1-28.525714-28.452571v-283.867429c0-22.162286 18.066286-40.118857 40.301714-40.155428h205.056c22.272 0.036571 40.301714 17.993143 40.338286 40.155428v283.867429a28.525714 28.525714 0 0 1-28.562286 28.452571z m-199.972572-56.868571h171.410286V652.068571h-171.410286v238.738286z" fill="#999999" ></path></symbol></svg>',d = (l = document.getElementsByTagName("script"))[l.length - 1].getAttribute("data-injectcss");if (d && !a.__iconfont__svg__cssinject__) {a.__iconfont__svg__cssinject__ = !0;try {document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>");} catch (a) {console && console.log(a);}}function v() {i || (i = !0, h());}c = function c() {var a,l,c,t,h,e = document.createElement("div");e.innerHTML = n, n = null, (a = e.getElementsByTagName("svg")[0]) && (a.setAttribute("aria-hidden", "true"), a.style.position = "absolute", a.style.width = 0, a.style.height = 0, a.style.overflow = "hidden", l = a, (c = document.body).firstChild ? (t = l, (h = c.firstChild).parentNode.insertBefore(t, h)) : c.appendChild(l));}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(c, 0) : (_t = function t() {document.removeEventListener("DOMContentLoaded", _t, !1), c();}, document.addEventListener("DOMContentLoaded", _t, !1)) : document.attachEvent && (h = c, e = a.document, i = !1, (_o = function o() {try {e.documentElement.doScroll("left");} catch (a) {return void setTimeout(_o, 50);}v();})(), e.onreadystatechange = function () {"complete" == e.readyState && (e.onreadystatechange = null, v());});}(window);
  10380. /***/ })
  10381. }]);
  10382. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map