vendor.js 398 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!************************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  5. \************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}
  10. var _toString = Object.prototype.toString;
  11. var hasOwnProperty = Object.prototype.hasOwnProperty;
  12. function isFn(fn) {
  13. return typeof fn === 'function';
  14. }
  15. function isStr(str) {
  16. return typeof str === 'string';
  17. }
  18. function isPlainObject(obj) {
  19. return _toString.call(obj) === '[object Object]';
  20. }
  21. function hasOwn(obj, key) {
  22. return hasOwnProperty.call(obj, key);
  23. }
  24. function noop() {}
  25. /**
  26. * Create a cached version of a pure function.
  27. */
  28. function cached(fn) {
  29. var cache = Object.create(null);
  30. return function cachedFn(str) {
  31. var hit = cache[str];
  32. return hit || (cache[str] = fn(str));
  33. };
  34. }
  35. /**
  36. * Camelize a hyphen-delimited string.
  37. */
  38. var camelizeRE = /-(\w)/g;
  39. var camelize = cached(function (str) {
  40. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  41. });
  42. var HOOKS = [
  43. 'invoke',
  44. 'success',
  45. 'fail',
  46. 'complete',
  47. 'returnValue'];
  48. var globalInterceptors = {};
  49. var scopedInterceptors = {};
  50. function mergeHook(parentVal, childVal) {
  51. var res = childVal ?
  52. parentVal ?
  53. parentVal.concat(childVal) :
  54. Array.isArray(childVal) ?
  55. childVal : [childVal] :
  56. parentVal;
  57. return res ?
  58. dedupeHooks(res) :
  59. res;
  60. }
  61. function dedupeHooks(hooks) {
  62. var res = [];
  63. for (var i = 0; i < hooks.length; i++) {
  64. if (res.indexOf(hooks[i]) === -1) {
  65. res.push(hooks[i]);
  66. }
  67. }
  68. return res;
  69. }
  70. function removeHook(hooks, hook) {
  71. var index = hooks.indexOf(hook);
  72. if (index !== -1) {
  73. hooks.splice(index, 1);
  74. }
  75. }
  76. function mergeInterceptorHook(interceptor, option) {
  77. Object.keys(option).forEach(function (hook) {
  78. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  79. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  80. }
  81. });
  82. }
  83. function removeInterceptorHook(interceptor, option) {
  84. if (!interceptor || !option) {
  85. return;
  86. }
  87. Object.keys(option).forEach(function (hook) {
  88. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  89. removeHook(interceptor[hook], option[hook]);
  90. }
  91. });
  92. }
  93. function addInterceptor(method, option) {
  94. if (typeof method === 'string' && isPlainObject(option)) {
  95. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  96. } else if (isPlainObject(method)) {
  97. mergeInterceptorHook(globalInterceptors, method);
  98. }
  99. }
  100. function removeInterceptor(method, option) {
  101. if (typeof method === 'string') {
  102. if (isPlainObject(option)) {
  103. removeInterceptorHook(scopedInterceptors[method], option);
  104. } else {
  105. delete scopedInterceptors[method];
  106. }
  107. } else if (isPlainObject(method)) {
  108. removeInterceptorHook(globalInterceptors, method);
  109. }
  110. }
  111. function wrapperHook(hook) {
  112. return function (data) {
  113. return hook(data) || data;
  114. };
  115. }
  116. function isPromise(obj) {
  117. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  118. }
  119. function queue(hooks, data) {
  120. var promise = false;
  121. for (var i = 0; i < hooks.length; i++) {
  122. var hook = hooks[i];
  123. if (promise) {
  124. promise = Promise.resolve(wrapperHook(hook));
  125. } else {
  126. var res = hook(data);
  127. if (isPromise(res)) {
  128. promise = Promise.resolve(res);
  129. }
  130. if (res === false) {
  131. return {
  132. then: function then() {} };
  133. }
  134. }
  135. }
  136. return promise || {
  137. then: function then(callback) {
  138. return callback(data);
  139. } };
  140. }
  141. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  142. ['success', 'fail', 'complete'].forEach(function (name) {
  143. if (Array.isArray(interceptor[name])) {
  144. var oldCallback = options[name];
  145. options[name] = function callbackInterceptor(res) {
  146. queue(interceptor[name], res).then(function (res) {
  147. /* eslint-disable no-mixed-operators */
  148. return isFn(oldCallback) && oldCallback(res) || res;
  149. });
  150. };
  151. }
  152. });
  153. return options;
  154. }
  155. function wrapperReturnValue(method, returnValue) {
  156. var returnValueHooks = [];
  157. if (Array.isArray(globalInterceptors.returnValue)) {
  158. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  159. }
  160. var interceptor = scopedInterceptors[method];
  161. if (interceptor && Array.isArray(interceptor.returnValue)) {
  162. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  163. }
  164. returnValueHooks.forEach(function (hook) {
  165. returnValue = hook(returnValue) || returnValue;
  166. });
  167. return returnValue;
  168. }
  169. function getApiInterceptorHooks(method) {
  170. var interceptor = Object.create(null);
  171. Object.keys(globalInterceptors).forEach(function (hook) {
  172. if (hook !== 'returnValue') {
  173. interceptor[hook] = globalInterceptors[hook].slice();
  174. }
  175. });
  176. var scopedInterceptor = scopedInterceptors[method];
  177. if (scopedInterceptor) {
  178. Object.keys(scopedInterceptor).forEach(function (hook) {
  179. if (hook !== 'returnValue') {
  180. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  181. }
  182. });
  183. }
  184. return interceptor;
  185. }
  186. function invokeApi(method, api, options) {for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {params[_key - 3] = arguments[_key];}
  187. var interceptor = getApiInterceptorHooks(method);
  188. if (interceptor && Object.keys(interceptor).length) {
  189. if (Array.isArray(interceptor.invoke)) {
  190. var res = queue(interceptor.invoke, options);
  191. return res.then(function (options) {
  192. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  193. });
  194. } else {
  195. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  196. }
  197. }
  198. return api.apply(void 0, [options].concat(params));
  199. }
  200. var promiseInterceptor = {
  201. returnValue: function returnValue(res) {
  202. if (!isPromise(res)) {
  203. return res;
  204. }
  205. return res.then(function (res) {
  206. return res[1];
  207. }).catch(function (res) {
  208. return res[0];
  209. });
  210. } };
  211. var SYNC_API_RE =
  212. /^\$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/;
  213. var CONTEXT_API_RE = /^create|Manager$/;
  214. // Context例外情况
  215. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  216. // 同步例外情况
  217. var ASYNC_API = ['createBLEConnection'];
  218. var CALLBACK_API_RE = /^on|^off/;
  219. function isContextApi(name) {
  220. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  221. }
  222. function isSyncApi(name) {
  223. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  224. }
  225. function isCallbackApi(name) {
  226. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  227. }
  228. function handlePromise(promise) {
  229. return promise.then(function (data) {
  230. return [null, data];
  231. }).
  232. catch(function (err) {return [err];});
  233. }
  234. function shouldPromise(name) {
  235. if (
  236. isContextApi(name) ||
  237. isSyncApi(name) ||
  238. isCallbackApi(name))
  239. {
  240. return false;
  241. }
  242. return true;
  243. }
  244. /* eslint-disable no-extend-native */
  245. if (!Promise.prototype.finally) {
  246. Promise.prototype.finally = function (callback) {
  247. var promise = this.constructor;
  248. return this.then(
  249. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  250. function (reason) {return promise.resolve(callback()).then(function () {
  251. throw reason;
  252. });});
  253. };
  254. }
  255. function promisify(name, api) {
  256. if (!shouldPromise(name)) {
  257. return api;
  258. }
  259. return function promiseApi() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {params[_key2 - 1] = arguments[_key2];}
  260. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  261. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  262. }
  263. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  264. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  265. success: resolve,
  266. fail: reject })].concat(
  267. params));
  268. })));
  269. };
  270. }
  271. var EPS = 1e-4;
  272. var BASE_DEVICE_WIDTH = 750;
  273. var isIOS = false;
  274. var deviceWidth = 0;
  275. var deviceDPR = 0;
  276. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  277. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  278. deviceWidth = windowWidth;
  279. deviceDPR = pixelRatio;
  280. isIOS = platform === 'ios';
  281. }
  282. function upx2px(number, newDeviceWidth) {
  283. if (deviceWidth === 0) {
  284. checkDeviceWidth();
  285. }
  286. number = Number(number);
  287. if (number === 0) {
  288. return 0;
  289. }
  290. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  291. if (result < 0) {
  292. result = -result;
  293. }
  294. result = Math.floor(result + EPS);
  295. if (result === 0) {
  296. if (deviceDPR === 1 || !isIOS) {
  297. result = 1;
  298. } else {
  299. result = 0.5;
  300. }
  301. }
  302. return number < 0 ? -result : result;
  303. }
  304. var interceptors = {
  305. promiseInterceptor: promiseInterceptor };
  306. var baseApi = /*#__PURE__*/Object.freeze({
  307. __proto__: null,
  308. upx2px: upx2px,
  309. addInterceptor: addInterceptor,
  310. removeInterceptor: removeInterceptor,
  311. interceptors: interceptors });var
  312. EventChannel = /*#__PURE__*/function () {
  313. function EventChannel(id, events) {var _this = this;_classCallCheck(this, EventChannel);
  314. this.id = id;
  315. this.listener = {};
  316. this.emitCache = {};
  317. if (events) {
  318. Object.keys(events).forEach(function (name) {
  319. _this.on(name, events[name]);
  320. });
  321. }
  322. }_createClass(EventChannel, [{ key: "emit", value: function emit(
  323. eventName) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  324. var fns = this.listener[eventName];
  325. if (!fns) {
  326. return (this.emitCache[eventName] || (this.emitCache[eventName] = [])).push(args);
  327. }
  328. fns.forEach(function (opt) {
  329. opt.fn.apply(opt.fn, args);
  330. });
  331. this.listener[eventName] = fns.filter(function (opt) {return opt.type !== 'once';});
  332. } }, { key: "on", value: function on(
  333. eventName, fn) {
  334. this._addListener(eventName, 'on', fn);
  335. this._clearCache(eventName);
  336. } }, { key: "once", value: function once(
  337. eventName, fn) {
  338. this._addListener(eventName, 'once', fn);
  339. this._clearCache(eventName);
  340. } }, { key: "off", value: function off(
  341. eventName, fn) {
  342. var fns = this.listener[eventName];
  343. if (!fns) {
  344. return;
  345. }
  346. if (fn) {
  347. for (var i = 0; i < fns.length;) {
  348. if (fns[i].fn === fn) {
  349. fns.splice(i, 1);
  350. i--;
  351. }
  352. i++;
  353. }
  354. } else {
  355. delete this.listener[eventName];
  356. }
  357. } }, { key: "_clearCache", value: function _clearCache(
  358. eventName) {
  359. var cacheArgs = this.emitCache[eventName];
  360. if (cacheArgs) {
  361. for (; cacheArgs.length > 0;) {
  362. this.emit.apply(this, [eventName].concat(cacheArgs.shift()));
  363. }
  364. }
  365. } }, { key: "_addListener", value: function _addListener(
  366. eventName, type, fn) {
  367. (this.listener[eventName] || (this.listener[eventName] = [])).push({
  368. fn: fn,
  369. type: type });
  370. } }]);return EventChannel;}();
  371. var eventChannels = {};
  372. var eventChannelStack = [];
  373. var id = 0;
  374. function initEventChannel(events) {var cache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  375. id++;
  376. var eventChannel = new EventChannel(id, events);
  377. if (cache) {
  378. eventChannels[id] = eventChannel;
  379. eventChannelStack.push(eventChannel);
  380. }
  381. return eventChannel;
  382. }
  383. function getEventChannel(id) {
  384. if (id) {
  385. var eventChannel = eventChannels[id];
  386. delete eventChannels[id];
  387. return eventChannel;
  388. }
  389. return eventChannelStack.shift();
  390. }
  391. var navigateTo = {
  392. args: function args(fromArgs, toArgs) {
  393. var id = initEventChannel(fromArgs.events).id;
  394. if (fromArgs.url) {
  395. fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + id;
  396. }
  397. },
  398. returnValue: function returnValue(fromRes, toRes) {
  399. fromRes.eventChannel = getEventChannel();
  400. } };
  401. function findExistsPageIndex(url) {
  402. var pages = getCurrentPages();
  403. var len = pages.length;
  404. while (len--) {
  405. var page = pages[len];
  406. if (page.$page && page.$page.fullPath === url) {
  407. return len;
  408. }
  409. }
  410. return -1;
  411. }
  412. var redirectTo = {
  413. name: function name(fromArgs) {
  414. if (fromArgs.exists === 'back' && fromArgs.delta) {
  415. return 'navigateBack';
  416. }
  417. return 'redirectTo';
  418. },
  419. args: function args(fromArgs) {
  420. if (fromArgs.exists === 'back' && fromArgs.url) {
  421. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  422. if (existsPageIndex !== -1) {
  423. var delta = getCurrentPages().length - 1 - existsPageIndex;
  424. if (delta > 0) {
  425. fromArgs.delta = delta;
  426. }
  427. }
  428. }
  429. } };
  430. var previewImage = {
  431. args: function args(fromArgs) {
  432. var currentIndex = parseInt(fromArgs.current);
  433. if (isNaN(currentIndex)) {
  434. return;
  435. }
  436. var urls = fromArgs.urls;
  437. if (!Array.isArray(urls)) {
  438. return;
  439. }
  440. var len = urls.length;
  441. if (!len) {
  442. return;
  443. }
  444. if (currentIndex < 0) {
  445. currentIndex = 0;
  446. } else if (currentIndex >= len) {
  447. currentIndex = len - 1;
  448. }
  449. if (currentIndex > 0) {
  450. fromArgs.current = urls[currentIndex];
  451. fromArgs.urls = urls.filter(
  452. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  453. } else {
  454. fromArgs.current = urls[0];
  455. }
  456. return {
  457. indicator: false,
  458. loop: false };
  459. } };
  460. function addSafeAreaInsets(result) {
  461. if (result.safeArea) {
  462. var safeArea = result.safeArea;
  463. result.safeAreaInsets = {
  464. top: safeArea.top,
  465. left: safeArea.left,
  466. right: result.windowWidth - safeArea.right,
  467. bottom: result.windowHeight - safeArea.bottom };
  468. }
  469. }
  470. var protocols = {
  471. redirectTo: redirectTo,
  472. navigateTo: navigateTo,
  473. previewImage: previewImage,
  474. getSystemInfo: {
  475. returnValue: addSafeAreaInsets },
  476. getSystemInfoSync: {
  477. returnValue: addSafeAreaInsets } };
  478. var todos = [
  479. 'vibrate',
  480. 'preloadPage',
  481. 'unPreloadPage',
  482. 'loadSubPackage'];
  483. var canIUses = [];
  484. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  485. function processCallback(methodName, method, returnValue) {
  486. return function (res) {
  487. return method(processReturnValue(methodName, res, returnValue));
  488. };
  489. }
  490. function processArgs(methodName, fromArgs) {var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  491. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  492. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  493. if (isFn(argsOption)) {
  494. argsOption = argsOption(fromArgs, toArgs) || {};
  495. }
  496. for (var key in fromArgs) {
  497. if (hasOwn(argsOption, key)) {
  498. var keyOption = argsOption[key];
  499. if (isFn(keyOption)) {
  500. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  501. }
  502. if (!keyOption) {// 不支持的参数
  503. console.warn("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F ".concat(methodName, "\u6682\u4E0D\u652F\u6301").concat(key));
  504. } else if (isStr(keyOption)) {// 重写参数 key
  505. toArgs[keyOption] = fromArgs[key];
  506. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  507. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  508. }
  509. } else if (CALLBACKS.indexOf(key) !== -1) {
  510. if (isFn(fromArgs[key])) {
  511. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  512. }
  513. } else {
  514. if (!keepFromArgs) {
  515. toArgs[key] = fromArgs[key];
  516. }
  517. }
  518. }
  519. return toArgs;
  520. } else if (isFn(fromArgs)) {
  521. fromArgs = processCallback(methodName, fromArgs, returnValue);
  522. }
  523. return fromArgs;
  524. }
  525. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  526. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  527. res = protocols.returnValue(methodName, res);
  528. }
  529. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  530. }
  531. function wrapper(methodName, method) {
  532. if (hasOwn(protocols, methodName)) {
  533. var protocol = protocols[methodName];
  534. if (!protocol) {// 暂不支持的 api
  535. return function () {
  536. console.error("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F \u6682\u4E0D\u652F\u6301".concat(methodName));
  537. };
  538. }
  539. return function (arg1, arg2) {// 目前 api 最多两个参数
  540. var options = protocol;
  541. if (isFn(protocol)) {
  542. options = protocol(arg1);
  543. }
  544. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  545. var args = [arg1];
  546. if (typeof arg2 !== 'undefined') {
  547. args.push(arg2);
  548. }
  549. if (isFn(options.name)) {
  550. methodName = options.name(arg1);
  551. } else if (isStr(options.name)) {
  552. methodName = options.name;
  553. }
  554. var returnValue = wx[methodName].apply(wx, args);
  555. if (isSyncApi(methodName)) {// 同步 api
  556. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  557. }
  558. return returnValue;
  559. };
  560. }
  561. return method;
  562. }
  563. var todoApis = Object.create(null);
  564. var TODOS = [
  565. 'onTabBarMidButtonTap',
  566. 'subscribePush',
  567. 'unsubscribePush',
  568. 'onPush',
  569. 'offPush',
  570. 'share'];
  571. function createTodoApi(name) {
  572. return function todoApi(_ref)
  573. {var fail = _ref.fail,complete = _ref.complete;
  574. var res = {
  575. errMsg: "".concat(name, ":fail:\u6682\u4E0D\u652F\u6301 ").concat(name, " \u65B9\u6CD5") };
  576. isFn(fail) && fail(res);
  577. isFn(complete) && complete(res);
  578. };
  579. }
  580. TODOS.forEach(function (name) {
  581. todoApis[name] = createTodoApi(name);
  582. });
  583. var providers = {
  584. oauth: ['weixin'],
  585. share: ['weixin'],
  586. payment: ['wxpay'],
  587. push: ['weixin'] };
  588. function getProvider(_ref2)
  589. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  590. var res = false;
  591. if (providers[service]) {
  592. res = {
  593. errMsg: 'getProvider:ok',
  594. service: service,
  595. provider: providers[service] };
  596. isFn(success) && success(res);
  597. } else {
  598. res = {
  599. errMsg: 'getProvider:fail:服务[' + service + ']不存在' };
  600. isFn(fail) && fail(res);
  601. }
  602. isFn(complete) && complete(res);
  603. }
  604. var extraApi = /*#__PURE__*/Object.freeze({
  605. __proto__: null,
  606. getProvider: getProvider });
  607. var getEmitter = function () {
  608. var Emitter;
  609. return function getUniEmitter() {
  610. if (!Emitter) {
  611. Emitter = new _vue.default();
  612. }
  613. return Emitter;
  614. };
  615. }();
  616. function apply(ctx, method, args) {
  617. return ctx[method].apply(ctx, args);
  618. }
  619. function $on() {
  620. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  621. }
  622. function $off() {
  623. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  624. }
  625. function $once() {
  626. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  627. }
  628. function $emit() {
  629. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  630. }
  631. var eventApi = /*#__PURE__*/Object.freeze({
  632. __proto__: null,
  633. $on: $on,
  634. $off: $off,
  635. $once: $once,
  636. $emit: $emit });
  637. var api = /*#__PURE__*/Object.freeze({
  638. __proto__: null });
  639. var MPPage = Page;
  640. var MPComponent = Component;
  641. var customizeRE = /:/g;
  642. var customize = cached(function (str) {
  643. return camelize(str.replace(customizeRE, '-'));
  644. });
  645. function initTriggerEvent(mpInstance) {
  646. {
  647. if (!wx.canIUse('nextTick')) {
  648. return;
  649. }
  650. }
  651. var oldTriggerEvent = mpInstance.triggerEvent;
  652. mpInstance.triggerEvent = function (event) {for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {args[_key4 - 1] = arguments[_key4];}
  653. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  654. };
  655. }
  656. function initHook(name, options) {
  657. var oldHook = options[name];
  658. if (!oldHook) {
  659. options[name] = function () {
  660. initTriggerEvent(this);
  661. };
  662. } else {
  663. options[name] = function () {
  664. initTriggerEvent(this);for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {args[_key5] = arguments[_key5];}
  665. return oldHook.apply(this, args);
  666. };
  667. }
  668. }
  669. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  670. initHook('onLoad', options);
  671. return MPPage(options);
  672. };
  673. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  674. initHook('created', options);
  675. return MPComponent(options);
  676. };
  677. var PAGE_EVENT_HOOKS = [
  678. 'onPullDownRefresh',
  679. 'onReachBottom',
  680. 'onAddToFavorites',
  681. 'onShareTimeline',
  682. 'onShareAppMessage',
  683. 'onPageScroll',
  684. 'onResize',
  685. 'onTabItemTap'];
  686. function initMocks(vm, mocks) {
  687. var mpInstance = vm.$mp[vm.mpType];
  688. mocks.forEach(function (mock) {
  689. if (hasOwn(mpInstance, mock)) {
  690. vm[mock] = mpInstance[mock];
  691. }
  692. });
  693. }
  694. function hasHook(hook, vueOptions) {
  695. if (!vueOptions) {
  696. return true;
  697. }
  698. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  699. return true;
  700. }
  701. vueOptions = vueOptions.default || vueOptions;
  702. if (isFn(vueOptions)) {
  703. if (isFn(vueOptions.extendOptions[hook])) {
  704. return true;
  705. }
  706. if (vueOptions.super &&
  707. vueOptions.super.options &&
  708. Array.isArray(vueOptions.super.options[hook])) {
  709. return true;
  710. }
  711. return false;
  712. }
  713. if (isFn(vueOptions[hook])) {
  714. return true;
  715. }
  716. var mixins = vueOptions.mixins;
  717. if (Array.isArray(mixins)) {
  718. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  719. }
  720. }
  721. function initHooks(mpOptions, hooks, vueOptions) {
  722. hooks.forEach(function (hook) {
  723. if (hasHook(hook, vueOptions)) {
  724. mpOptions[hook] = function (args) {
  725. return this.$vm && this.$vm.__call_hook(hook, args);
  726. };
  727. }
  728. });
  729. }
  730. function initVueComponent(Vue, vueOptions) {
  731. vueOptions = vueOptions.default || vueOptions;
  732. var VueComponent;
  733. if (isFn(vueOptions)) {
  734. VueComponent = vueOptions;
  735. } else {
  736. VueComponent = Vue.extend(vueOptions);
  737. }
  738. vueOptions = VueComponent.options;
  739. return [VueComponent, vueOptions];
  740. }
  741. function initSlots(vm, vueSlots) {
  742. if (Array.isArray(vueSlots) && vueSlots.length) {
  743. var $slots = Object.create(null);
  744. vueSlots.forEach(function (slotName) {
  745. $slots[slotName] = true;
  746. });
  747. vm.$scopedSlots = vm.$slots = $slots;
  748. }
  749. }
  750. function initVueIds(vueIds, mpInstance) {
  751. vueIds = (vueIds || '').split(',');
  752. var len = vueIds.length;
  753. if (len === 1) {
  754. mpInstance._$vueId = vueIds[0];
  755. } else if (len === 2) {
  756. mpInstance._$vueId = vueIds[0];
  757. mpInstance._$vuePid = vueIds[1];
  758. }
  759. }
  760. function initData(vueOptions, context) {
  761. var data = vueOptions.data || {};
  762. var methods = vueOptions.methods || {};
  763. if (typeof data === 'function') {
  764. try {
  765. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  766. } catch (e) {
  767. if (Object({"VUE_APP_NAME":"cqcarbonwxapp","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  768. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  769. }
  770. }
  771. } else {
  772. try {
  773. // 对 data 格式化
  774. data = JSON.parse(JSON.stringify(data));
  775. } catch (e) {}
  776. }
  777. if (!isPlainObject(data)) {
  778. data = {};
  779. }
  780. Object.keys(methods).forEach(function (methodName) {
  781. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  782. data[methodName] = methods[methodName];
  783. }
  784. });
  785. return data;
  786. }
  787. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  788. function createObserver(name) {
  789. return function observer(newVal, oldVal) {
  790. if (this.$vm) {
  791. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  792. }
  793. };
  794. }
  795. function initBehaviors(vueOptions, initBehavior) {
  796. var vueBehaviors = vueOptions.behaviors;
  797. var vueExtends = vueOptions.extends;
  798. var vueMixins = vueOptions.mixins;
  799. var vueProps = vueOptions.props;
  800. if (!vueProps) {
  801. vueOptions.props = vueProps = [];
  802. }
  803. var behaviors = [];
  804. if (Array.isArray(vueBehaviors)) {
  805. vueBehaviors.forEach(function (behavior) {
  806. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  807. if (behavior === 'uni://form-field') {
  808. if (Array.isArray(vueProps)) {
  809. vueProps.push('name');
  810. vueProps.push('value');
  811. } else {
  812. vueProps.name = {
  813. type: String,
  814. default: '' };
  815. vueProps.value = {
  816. type: [String, Number, Boolean, Array, Object, Date],
  817. default: '' };
  818. }
  819. }
  820. });
  821. }
  822. if (isPlainObject(vueExtends) && vueExtends.props) {
  823. behaviors.push(
  824. initBehavior({
  825. properties: initProperties(vueExtends.props, true) }));
  826. }
  827. if (Array.isArray(vueMixins)) {
  828. vueMixins.forEach(function (vueMixin) {
  829. if (isPlainObject(vueMixin) && vueMixin.props) {
  830. behaviors.push(
  831. initBehavior({
  832. properties: initProperties(vueMixin.props, true) }));
  833. }
  834. });
  835. }
  836. return behaviors;
  837. }
  838. function parsePropType(key, type, defaultValue, file) {
  839. // [String]=>String
  840. if (Array.isArray(type) && type.length === 1) {
  841. return type[0];
  842. }
  843. return type;
  844. }
  845. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  846. var properties = {};
  847. if (!isBehavior) {
  848. properties.vueId = {
  849. type: String,
  850. value: '' };
  851. // 用于字节跳动小程序模拟抽象节点
  852. properties.generic = {
  853. type: Object,
  854. value: null };
  855. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  856. type: null,
  857. value: [],
  858. observer: function observer(newVal, oldVal) {
  859. var $slots = Object.create(null);
  860. newVal.forEach(function (slotName) {
  861. $slots[slotName] = true;
  862. });
  863. this.setData({
  864. $slots: $slots });
  865. } };
  866. }
  867. if (Array.isArray(props)) {// ['title']
  868. props.forEach(function (key) {
  869. properties[key] = {
  870. type: null,
  871. observer: createObserver(key) };
  872. });
  873. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  874. Object.keys(props).forEach(function (key) {
  875. var opts = props[key];
  876. if (isPlainObject(opts)) {// title:{type:String,default:''}
  877. var value = opts.default;
  878. if (isFn(value)) {
  879. value = value();
  880. }
  881. opts.type = parsePropType(key, opts.type);
  882. properties[key] = {
  883. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  884. value: value,
  885. observer: createObserver(key) };
  886. } else {// content:String
  887. var type = parsePropType(key, opts);
  888. properties[key] = {
  889. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  890. observer: createObserver(key) };
  891. }
  892. });
  893. }
  894. return properties;
  895. }
  896. function wrapper$1(event) {
  897. // TODO 又得兼容 mpvue 的 mp 对象
  898. try {
  899. event.mp = JSON.parse(JSON.stringify(event));
  900. } catch (e) {}
  901. event.stopPropagation = noop;
  902. event.preventDefault = noop;
  903. event.target = event.target || {};
  904. if (!hasOwn(event, 'detail')) {
  905. event.detail = {};
  906. }
  907. if (hasOwn(event, 'markerId')) {
  908. event.detail = typeof event.detail === 'object' ? event.detail : {};
  909. event.detail.markerId = event.markerId;
  910. }
  911. if (isPlainObject(event.detail)) {
  912. event.target = Object.assign({}, event.target, event.detail);
  913. }
  914. return event;
  915. }
  916. function getExtraValue(vm, dataPathsArray) {
  917. var context = vm;
  918. dataPathsArray.forEach(function (dataPathArray) {
  919. var dataPath = dataPathArray[0];
  920. var value = dataPathArray[2];
  921. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  922. var propPath = dataPathArray[1];
  923. var valuePath = dataPathArray[3];
  924. var vFor;
  925. if (Number.isInteger(dataPath)) {
  926. vFor = dataPath;
  927. } else if (!dataPath) {
  928. vFor = context;
  929. } else if (typeof dataPath === 'string' && dataPath) {
  930. if (dataPath.indexOf('#s#') === 0) {
  931. vFor = dataPath.substr(3);
  932. } else {
  933. vFor = vm.__get_value(dataPath, context);
  934. }
  935. }
  936. if (Number.isInteger(vFor)) {
  937. context = value;
  938. } else if (!propPath) {
  939. context = vFor[value];
  940. } else {
  941. if (Array.isArray(vFor)) {
  942. context = vFor.find(function (vForItem) {
  943. return vm.__get_value(propPath, vForItem) === value;
  944. });
  945. } else if (isPlainObject(vFor)) {
  946. context = Object.keys(vFor).find(function (vForKey) {
  947. return vm.__get_value(propPath, vFor[vForKey]) === value;
  948. });
  949. } else {
  950. console.error('v-for 暂不支持循环数据:', vFor);
  951. }
  952. }
  953. if (valuePath) {
  954. context = vm.__get_value(valuePath, context);
  955. }
  956. }
  957. });
  958. return context;
  959. }
  960. function processEventExtra(vm, extra, event) {
  961. var extraObj = {};
  962. if (Array.isArray(extra) && extra.length) {
  963. /**
  964. *[
  965. * ['data.items', 'data.id', item.data.id],
  966. * ['metas', 'id', meta.id]
  967. *],
  968. *[
  969. * ['data.items', 'data.id', item.data.id],
  970. * ['metas', 'id', meta.id]
  971. *],
  972. *'test'
  973. */
  974. extra.forEach(function (dataPath, index) {
  975. if (typeof dataPath === 'string') {
  976. if (!dataPath) {// model,prop.sync
  977. extraObj['$' + index] = vm;
  978. } else {
  979. if (dataPath === '$event') {// $event
  980. extraObj['$' + index] = event;
  981. } else if (dataPath === 'arguments') {
  982. if (event.detail && event.detail.__args__) {
  983. extraObj['$' + index] = event.detail.__args__;
  984. } else {
  985. extraObj['$' + index] = [event];
  986. }
  987. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  988. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  989. } else {
  990. extraObj['$' + index] = vm.__get_value(dataPath);
  991. }
  992. }
  993. } else {
  994. extraObj['$' + index] = getExtraValue(vm, dataPath);
  995. }
  996. });
  997. }
  998. return extraObj;
  999. }
  1000. function getObjByArray(arr) {
  1001. var obj = {};
  1002. for (var i = 1; i < arr.length; i++) {
  1003. var element = arr[i];
  1004. obj[element[0]] = element[1];
  1005. }
  1006. return obj;
  1007. }
  1008. function processEventArgs(vm, event) {var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];var isCustom = arguments.length > 4 ? arguments[4] : undefined;var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1009. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1010. if (isCustom) {// 自定义事件
  1011. isCustomMPEvent = event.currentTarget &&
  1012. event.currentTarget.dataset &&
  1013. event.currentTarget.dataset.comType === 'wx';
  1014. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  1015. if (isCustomMPEvent) {
  1016. return [event];
  1017. }
  1018. return event.detail.__args__ || event.detail;
  1019. }
  1020. }
  1021. var extraObj = processEventExtra(vm, extra, event);
  1022. var ret = [];
  1023. args.forEach(function (arg) {
  1024. if (arg === '$event') {
  1025. if (methodName === '__set_model' && !isCustom) {// input v-model value
  1026. ret.push(event.target.value);
  1027. } else {
  1028. if (isCustom && !isCustomMPEvent) {
  1029. ret.push(event.detail.__args__[0]);
  1030. } else {// wxcomponent 组件或内置组件
  1031. ret.push(event);
  1032. }
  1033. }
  1034. } else {
  1035. if (Array.isArray(arg) && arg[0] === 'o') {
  1036. ret.push(getObjByArray(arg));
  1037. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1038. ret.push(extraObj[arg]);
  1039. } else {
  1040. ret.push(arg);
  1041. }
  1042. }
  1043. });
  1044. return ret;
  1045. }
  1046. var ONCE = '~';
  1047. var CUSTOM = '^';
  1048. function isMatchEventType(eventType, optType) {
  1049. return eventType === optType ||
  1050. optType === 'regionchange' && (
  1051. eventType === 'begin' ||
  1052. eventType === 'end');
  1053. }
  1054. function getContextVm(vm) {
  1055. var $parent = vm.$parent;
  1056. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1057. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1058. $parent = $parent.$parent;
  1059. }
  1060. return $parent && $parent.$parent;
  1061. }
  1062. function handleEvent(event) {var _this2 = this;
  1063. event = wrapper$1(event);
  1064. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1065. var dataset = (event.currentTarget || event.target).dataset;
  1066. if (!dataset) {
  1067. return console.warn('事件信息不存在');
  1068. }
  1069. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1070. if (!eventOpts) {
  1071. return console.warn('事件信息不存在');
  1072. }
  1073. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1074. var eventType = event.type;
  1075. var ret = [];
  1076. eventOpts.forEach(function (eventOpt) {
  1077. var type = eventOpt[0];
  1078. var eventsArray = eventOpt[1];
  1079. var isCustom = type.charAt(0) === CUSTOM;
  1080. type = isCustom ? type.slice(1) : type;
  1081. var isOnce = type.charAt(0) === ONCE;
  1082. type = isOnce ? type.slice(1) : type;
  1083. if (eventsArray && isMatchEventType(eventType, type)) {
  1084. eventsArray.forEach(function (eventArray) {
  1085. var methodName = eventArray[0];
  1086. if (methodName) {
  1087. var handlerCtx = _this2.$vm;
  1088. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1089. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1090. }
  1091. if (methodName === '$emit') {
  1092. handlerCtx.$emit.apply(handlerCtx,
  1093. processEventArgs(
  1094. _this2.$vm,
  1095. event,
  1096. eventArray[1],
  1097. eventArray[2],
  1098. isCustom,
  1099. methodName));
  1100. return;
  1101. }
  1102. var handler = handlerCtx[methodName];
  1103. if (!isFn(handler)) {
  1104. throw new Error(" _vm.".concat(methodName, " is not a function"));
  1105. }
  1106. if (isOnce) {
  1107. if (handler.once) {
  1108. return;
  1109. }
  1110. handler.once = true;
  1111. }
  1112. var params = processEventArgs(
  1113. _this2.$vm,
  1114. event,
  1115. eventArray[1],
  1116. eventArray[2],
  1117. isCustom,
  1118. methodName);
  1119. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1120. // eslint-disable-next-line no-sparse-arrays
  1121. ret.push(handler.apply(handlerCtx, (Array.isArray(params) ? params : []).concat([,,,,,,,,,, event])));
  1122. }
  1123. });
  1124. }
  1125. });
  1126. if (
  1127. eventType === 'input' &&
  1128. ret.length === 1 &&
  1129. typeof ret[0] !== 'undefined')
  1130. {
  1131. return ret[0];
  1132. }
  1133. }
  1134. var hooks = [
  1135. 'onShow',
  1136. 'onHide',
  1137. 'onError',
  1138. 'onPageNotFound',
  1139. 'onThemeChange',
  1140. 'onUnhandledRejection'];
  1141. function parseBaseApp(vm, _ref3)
  1142. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  1143. if (vm.$options.store) {
  1144. _vue.default.prototype.$store = vm.$options.store;
  1145. }
  1146. _vue.default.prototype.mpHost = "mp-weixin";
  1147. _vue.default.mixin({
  1148. beforeCreate: function beforeCreate() {
  1149. if (!this.$options.mpType) {
  1150. return;
  1151. }
  1152. this.mpType = this.$options.mpType;
  1153. this.$mp = _defineProperty({
  1154. data: {} },
  1155. this.mpType, this.$options.mpInstance);
  1156. this.$scope = this.$options.mpInstance;
  1157. delete this.$options.mpType;
  1158. delete this.$options.mpInstance;
  1159. if (this.mpType !== 'app') {
  1160. initRefs(this);
  1161. initMocks(this, mocks);
  1162. }
  1163. } });
  1164. var appOptions = {
  1165. onLaunch: function onLaunch(args) {
  1166. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1167. return;
  1168. }
  1169. {
  1170. if (!wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1171. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1172. }
  1173. }
  1174. this.$vm = vm;
  1175. this.$vm.$mp = {
  1176. app: this };
  1177. this.$vm.$scope = this;
  1178. // vm 上也挂载 globalData
  1179. this.$vm.globalData = this.globalData;
  1180. this.$vm._isMounted = true;
  1181. this.$vm.__call_hook('mounted', args);
  1182. this.$vm.__call_hook('onLaunch', args);
  1183. } };
  1184. // 兼容旧版本 globalData
  1185. appOptions.globalData = vm.$options.globalData || {};
  1186. // 将 methods 中的方法挂在 getApp() 中
  1187. var methods = vm.$options.methods;
  1188. if (methods) {
  1189. Object.keys(methods).forEach(function (name) {
  1190. appOptions[name] = methods[name];
  1191. });
  1192. }
  1193. initHooks(appOptions, hooks);
  1194. return appOptions;
  1195. }
  1196. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1197. function findVmByVueId(vm, vuePid) {
  1198. var $children = vm.$children;
  1199. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1200. for (var i = $children.length - 1; i >= 0; i--) {
  1201. var childVm = $children[i];
  1202. if (childVm.$scope._$vueId === vuePid) {
  1203. return childVm;
  1204. }
  1205. }
  1206. // 反向递归查找
  1207. var parentVm;
  1208. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1209. parentVm = findVmByVueId($children[_i], vuePid);
  1210. if (parentVm) {
  1211. return parentVm;
  1212. }
  1213. }
  1214. }
  1215. function initBehavior(options) {
  1216. return Behavior(options);
  1217. }
  1218. function isPage() {
  1219. return !!this.route;
  1220. }
  1221. function initRelation(detail) {
  1222. this.triggerEvent('__l', detail);
  1223. }
  1224. function initRefs(vm) {
  1225. var mpInstance = vm.$scope;
  1226. Object.defineProperty(vm, '$refs', {
  1227. get: function get() {
  1228. var $refs = {};
  1229. var components = mpInstance.selectAllComponents('.vue-ref');
  1230. components.forEach(function (component) {
  1231. var ref = component.dataset.ref;
  1232. $refs[ref] = component.$vm || component;
  1233. });
  1234. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1235. forComponents.forEach(function (component) {
  1236. var ref = component.dataset.ref;
  1237. if (!$refs[ref]) {
  1238. $refs[ref] = [];
  1239. }
  1240. $refs[ref].push(component.$vm || component);
  1241. });
  1242. return $refs;
  1243. } });
  1244. }
  1245. function handleLink(event) {var _ref4 =
  1246. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1247. var parentVm;
  1248. if (vuePid) {
  1249. parentVm = findVmByVueId(this.$vm, vuePid);
  1250. }
  1251. if (!parentVm) {
  1252. parentVm = this.$vm;
  1253. }
  1254. vueOptions.parent = parentVm;
  1255. }
  1256. function parseApp(vm) {
  1257. return parseBaseApp(vm, {
  1258. mocks: mocks,
  1259. initRefs: initRefs });
  1260. }
  1261. function createApp(vm) {
  1262. _vue.default.prototype.getOpenerEventChannel = function () {
  1263. if (!this.__eventChannel__) {
  1264. this.__eventChannel__ = new EventChannel();
  1265. }
  1266. return this.__eventChannel__;
  1267. };
  1268. var callHook = _vue.default.prototype.__call_hook;
  1269. _vue.default.prototype.__call_hook = function (hook, args) {
  1270. if (hook === 'onLoad' && args && args.__id__) {
  1271. this.__eventChannel__ = getEventChannel(args.__id__);
  1272. delete args.__id__;
  1273. }
  1274. return callHook.call(this, hook, args);
  1275. };
  1276. App(parseApp(vm));
  1277. return vm;
  1278. }
  1279. var encodeReserveRE = /[!'()*]/g;
  1280. var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);};
  1281. var commaRE = /%2C/g;
  1282. // fixed encodeURIComponent which is more conformant to RFC3986:
  1283. // - escapes [!'()*]
  1284. // - preserve commas
  1285. var encode = function encode(str) {return encodeURIComponent(str).
  1286. replace(encodeReserveRE, encodeReserveReplacer).
  1287. replace(commaRE, ',');};
  1288. function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  1289. var res = obj ? Object.keys(obj).map(function (key) {
  1290. var val = obj[key];
  1291. if (val === undefined) {
  1292. return '';
  1293. }
  1294. if (val === null) {
  1295. return encodeStr(key);
  1296. }
  1297. if (Array.isArray(val)) {
  1298. var result = [];
  1299. val.forEach(function (val2) {
  1300. if (val2 === undefined) {
  1301. return;
  1302. }
  1303. if (val2 === null) {
  1304. result.push(encodeStr(key));
  1305. } else {
  1306. result.push(encodeStr(key) + '=' + encodeStr(val2));
  1307. }
  1308. });
  1309. return result.join('&');
  1310. }
  1311. return encodeStr(key) + '=' + encodeStr(val);
  1312. }).filter(function (x) {return x.length > 0;}).join('&') : null;
  1313. return res ? "?".concat(res) : '';
  1314. }
  1315. function parseBaseComponent(vueComponentOptions)
  1316. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1317. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1318. var options = _objectSpread({
  1319. multipleSlots: true,
  1320. addGlobalClass: true },
  1321. vueOptions.options || {});
  1322. {
  1323. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1324. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1325. Object.assign(options, vueOptions['mp-weixin'].options);
  1326. }
  1327. }
  1328. var componentOptions = {
  1329. options: options,
  1330. data: initData(vueOptions, _vue.default.prototype),
  1331. behaviors: initBehaviors(vueOptions, initBehavior),
  1332. properties: initProperties(vueOptions.props, false, vueOptions.__file),
  1333. lifetimes: {
  1334. attached: function attached() {
  1335. var properties = this.properties;
  1336. var options = {
  1337. mpType: isPage.call(this) ? 'page' : 'component',
  1338. mpInstance: this,
  1339. propsData: properties };
  1340. initVueIds(properties.vueId, this);
  1341. // 处理父子关系
  1342. initRelation.call(this, {
  1343. vuePid: this._$vuePid,
  1344. vueOptions: options });
  1345. // 初始化 vue 实例
  1346. this.$vm = new VueComponent(options);
  1347. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1348. initSlots(this.$vm, properties.vueSlots);
  1349. // 触发首次 setData
  1350. this.$vm.$mount();
  1351. },
  1352. ready: function ready() {
  1353. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1354. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1355. if (this.$vm) {
  1356. this.$vm._isMounted = true;
  1357. this.$vm.__call_hook('mounted');
  1358. this.$vm.__call_hook('onReady');
  1359. }
  1360. },
  1361. detached: function detached() {
  1362. this.$vm && this.$vm.$destroy();
  1363. } },
  1364. pageLifetimes: {
  1365. show: function show(args) {
  1366. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1367. },
  1368. hide: function hide() {
  1369. this.$vm && this.$vm.__call_hook('onPageHide');
  1370. },
  1371. resize: function resize(size) {
  1372. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1373. } },
  1374. methods: {
  1375. __l: handleLink,
  1376. __e: handleEvent } };
  1377. // externalClasses
  1378. if (vueOptions.externalClasses) {
  1379. componentOptions.externalClasses = vueOptions.externalClasses;
  1380. }
  1381. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1382. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1383. componentOptions.methods[callMethod] = function (args) {
  1384. return this.$vm[callMethod](args);
  1385. };
  1386. });
  1387. }
  1388. if (isPage) {
  1389. return componentOptions;
  1390. }
  1391. return [componentOptions, VueComponent];
  1392. }
  1393. function parseComponent(vueComponentOptions) {
  1394. return parseBaseComponent(vueComponentOptions, {
  1395. isPage: isPage,
  1396. initRelation: initRelation });
  1397. }
  1398. var hooks$1 = [
  1399. 'onShow',
  1400. 'onHide',
  1401. 'onUnload'];
  1402. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1403. function parseBasePage(vuePageOptions, _ref6)
  1404. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1405. var pageOptions = parseComponent(vuePageOptions);
  1406. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1407. pageOptions.methods.onLoad = function (query) {
  1408. this.options = query;
  1409. var copyQuery = Object.assign({}, query);
  1410. delete copyQuery.__id__;
  1411. this.$page = {
  1412. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery) };
  1413. this.$vm.$mp.query = query; // 兼容 mpvue
  1414. this.$vm.__call_hook('onLoad', query);
  1415. };
  1416. return pageOptions;
  1417. }
  1418. function parsePage(vuePageOptions) {
  1419. return parseBasePage(vuePageOptions, {
  1420. isPage: isPage,
  1421. initRelation: initRelation });
  1422. }
  1423. function createPage(vuePageOptions) {
  1424. {
  1425. return Component(parsePage(vuePageOptions));
  1426. }
  1427. }
  1428. function createComponent(vueOptions) {
  1429. {
  1430. return Component(parseComponent(vueOptions));
  1431. }
  1432. }
  1433. todos.forEach(function (todoApi) {
  1434. protocols[todoApi] = false;
  1435. });
  1436. canIUses.forEach(function (canIUseApi) {
  1437. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  1438. canIUseApi;
  1439. if (!wx.canIUse(apiName)) {
  1440. protocols[canIUseApi] = false;
  1441. }
  1442. });
  1443. var uni = {};
  1444. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  1445. uni = new Proxy({}, {
  1446. get: function get(target, name) {
  1447. if (hasOwn(target, name)) {
  1448. return target[name];
  1449. }
  1450. if (baseApi[name]) {
  1451. return baseApi[name];
  1452. }
  1453. if (api[name]) {
  1454. return promisify(name, api[name]);
  1455. }
  1456. {
  1457. if (extraApi[name]) {
  1458. return promisify(name, extraApi[name]);
  1459. }
  1460. if (todoApis[name]) {
  1461. return promisify(name, todoApis[name]);
  1462. }
  1463. }
  1464. if (eventApi[name]) {
  1465. return eventApi[name];
  1466. }
  1467. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  1468. return;
  1469. }
  1470. return promisify(name, wrapper(name, wx[name]));
  1471. },
  1472. set: function set(target, name, value) {
  1473. target[name] = value;
  1474. return true;
  1475. } });
  1476. } else {
  1477. Object.keys(baseApi).forEach(function (name) {
  1478. uni[name] = baseApi[name];
  1479. });
  1480. {
  1481. Object.keys(todoApis).forEach(function (name) {
  1482. uni[name] = promisify(name, todoApis[name]);
  1483. });
  1484. Object.keys(extraApi).forEach(function (name) {
  1485. uni[name] = promisify(name, todoApis[name]);
  1486. });
  1487. }
  1488. Object.keys(eventApi).forEach(function (name) {
  1489. uni[name] = eventApi[name];
  1490. });
  1491. Object.keys(api).forEach(function (name) {
  1492. uni[name] = promisify(name, api[name]);
  1493. });
  1494. Object.keys(wx).forEach(function (name) {
  1495. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  1496. uni[name] = promisify(name, wrapper(name, wx[name]));
  1497. }
  1498. });
  1499. }
  1500. wx.createApp = createApp;
  1501. wx.createPage = createPage;
  1502. wx.createComponent = createComponent;
  1503. var uni$1 = uni;var _default =
  1504. uni$1;exports.default = _default;
  1505. /***/ }),
  1506. /***/ 10:
  1507. /*!**********************************************************************************************************!*\
  1508. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  1509. \**********************************************************************************************************/
  1510. /*! exports provided: default */
  1511. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1512. "use strict";
  1513. __webpack_require__.r(__webpack_exports__);
  1514. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  1515. /* globals __VUE_SSR_CONTEXT__ */
  1516. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  1517. // This module is a runtime utility for cleaner component module output and will
  1518. // be included in the final webpack user bundle.
  1519. function normalizeComponent (
  1520. scriptExports,
  1521. render,
  1522. staticRenderFns,
  1523. functionalTemplate,
  1524. injectStyles,
  1525. scopeId,
  1526. moduleIdentifier, /* server only */
  1527. shadowMode, /* vue-cli only */
  1528. components, // fixed by xxxxxx auto components
  1529. renderjs // fixed by xxxxxx renderjs
  1530. ) {
  1531. // Vue.extend constructor export interop
  1532. var options = typeof scriptExports === 'function'
  1533. ? scriptExports.options
  1534. : scriptExports
  1535. // fixed by xxxxxx auto components
  1536. if (components) {
  1537. if (!options.components) {
  1538. options.components = {}
  1539. }
  1540. var hasOwn = Object.prototype.hasOwnProperty
  1541. for (var name in components) {
  1542. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  1543. options.components[name] = components[name]
  1544. }
  1545. }
  1546. }
  1547. // fixed by xxxxxx renderjs
  1548. if (renderjs) {
  1549. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  1550. this[renderjs.__module] = this
  1551. });
  1552. (options.mixins || (options.mixins = [])).push(renderjs)
  1553. }
  1554. // render functions
  1555. if (render) {
  1556. options.render = render
  1557. options.staticRenderFns = staticRenderFns
  1558. options._compiled = true
  1559. }
  1560. // functional template
  1561. if (functionalTemplate) {
  1562. options.functional = true
  1563. }
  1564. // scopedId
  1565. if (scopeId) {
  1566. options._scopeId = 'data-v-' + scopeId
  1567. }
  1568. var hook
  1569. if (moduleIdentifier) { // server build
  1570. hook = function (context) {
  1571. // 2.3 injection
  1572. context =
  1573. context || // cached call
  1574. (this.$vnode && this.$vnode.ssrContext) || // stateful
  1575. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  1576. // 2.2 with runInNewContext: true
  1577. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  1578. context = __VUE_SSR_CONTEXT__
  1579. }
  1580. // inject component styles
  1581. if (injectStyles) {
  1582. injectStyles.call(this, context)
  1583. }
  1584. // register component module identifier for async chunk inferrence
  1585. if (context && context._registeredComponents) {
  1586. context._registeredComponents.add(moduleIdentifier)
  1587. }
  1588. }
  1589. // used by ssr in case component is cached and beforeCreate
  1590. // never gets called
  1591. options._ssrRegister = hook
  1592. } else if (injectStyles) {
  1593. hook = shadowMode
  1594. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  1595. : injectStyles
  1596. }
  1597. if (hook) {
  1598. if (options.functional) {
  1599. // for template-only hot-reload because in that case the render fn doesn't
  1600. // go through the normalizer
  1601. options._injectStyles = hook
  1602. // register for functioal component in vue file
  1603. var originalRender = options.render
  1604. options.render = function renderWithStyleInjection (h, context) {
  1605. hook.call(context)
  1606. return originalRender(h, context)
  1607. }
  1608. } else {
  1609. // inject component registration as beforeCreate hook
  1610. var existing = options.beforeCreate
  1611. options.beforeCreate = existing
  1612. ? [].concat(existing, hook)
  1613. : [hook]
  1614. }
  1615. }
  1616. return {
  1617. exports: scriptExports,
  1618. options: options
  1619. }
  1620. }
  1621. /***/ }),
  1622. /***/ 106:
  1623. /*!***************************************************************************!*\
  1624. !*** D:/wwwroot/cqcarbonwxapp/components/mescroll-uni/mescroll-mixins.js ***!
  1625. \***************************************************************************/
  1626. /*! no static exports found */
  1627. /***/ (function(module, exports, __webpack_require__) {
  1628. "use strict";
  1629. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // mescroll-body 和 mescroll-uni 通用
  1630. // import MescrollUni from "./mescroll-uni.vue";
  1631. // import MescrollBody from "./mescroll-body.vue";
  1632. var MescrollMixin = {
  1633. // components: { // 非H5端无法通过mixin注册组件, 只能在main.js中注册全局组件或具体界面中注册
  1634. // MescrollUni,
  1635. // MescrollBody
  1636. // },
  1637. data: function data() {
  1638. return {
  1639. mescroll: null //mescroll实例对象
  1640. };
  1641. },
  1642. // 注册系统自带的下拉刷新 (配置down.native为true时生效, 还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  1643. onPullDownRefresh: function onPullDownRefresh() {
  1644. this.mescroll && this.mescroll.onPullDownRefresh();
  1645. },
  1646. // 注册列表滚动事件,用于判定在顶部可下拉刷新,在指定位置可显示隐藏回到顶部按钮 (此方法为页面生命周期,无法在子组件中触发, 仅在mescroll-body生效)
  1647. onPageScroll: function onPageScroll(e) {
  1648. this.mescroll && this.mescroll.onPageScroll(e);
  1649. },
  1650. // 注册滚动到底部的事件,用于上拉加载 (此方法为页面生命周期,无法在子组件中触发, 仅在mescroll-body生效)
  1651. onReachBottom: function onReachBottom() {
  1652. this.mescroll && this.mescroll.onReachBottom();
  1653. },
  1654. methods: {
  1655. // mescroll组件初始化的回调,可获取到mescroll对象
  1656. mescrollInit: function mescrollInit(mescroll) {
  1657. this.mescroll = mescroll;
  1658. this.mescrollInitByRef(); // 兼容字节跳动小程序
  1659. },
  1660. // 以ref的方式初始化mescroll对象 (兼容字节跳动小程序)
  1661. mescrollInitByRef: function mescrollInitByRef() {
  1662. if (!this.mescroll || !this.mescroll.resetUpScroll) {
  1663. var mescrollRef = this.$refs.mescrollRef;
  1664. if (mescrollRef) this.mescroll = mescrollRef.mescroll;
  1665. }
  1666. },
  1667. // 下拉刷新的回调 (mixin默认resetUpScroll)
  1668. downCallback: function downCallback() {var _this = this;
  1669. if (this.mescroll.optUp.use) {
  1670. this.mescroll.resetUpScroll();
  1671. } else {
  1672. setTimeout(function () {
  1673. _this.mescroll.endSuccess();
  1674. }, 500);
  1675. }
  1676. },
  1677. // 上拉加载的回调
  1678. upCallback: function upCallback() {var _this2 = this;
  1679. // mixin默认延时500自动结束加载
  1680. setTimeout(function () {
  1681. _this2.mescroll.endErr();
  1682. }, 500);
  1683. } },
  1684. mounted: function mounted() {
  1685. this.mescrollInitByRef(); // 兼容字节跳动小程序, 避免未设置@init或@init此时未能取到ref的情况
  1686. } };var _default =
  1687. MescrollMixin;exports.default = _default;
  1688. /***/ }),
  1689. /***/ 11:
  1690. /*!*************************************************!*\
  1691. !*** D:/wwwroot/cqcarbonwxapp/config/config.js ***!
  1692. \*************************************************/
  1693. /*! no static exports found */
  1694. /***/ (function(module, exports, __webpack_require__) {
  1695. "use strict";
  1696. Object.defineProperty(exports, "__esModule", { value: true });exports.config = void 0;var config = {
  1697. //dev
  1698. // apiBaseurl:'http://172.16.90.8:21998',//东东
  1699. apiBaseurl: 'http://wx.hw.hongweisoft.com/cqthminapp', //东东
  1700. // 图片占位
  1701. placeImg: 'http://placekitten.com',
  1702. loginUrl: 'http://wx.hw.hongweisoft.com/zddtest/forest-portal/wechat/h5/authorize?returnUrl=http://foresth5test.hw.hongweisoft.com/#/', //登录后跳转到测试链接 东东
  1703. //版本号:版本号升级将显示引导页
  1704. version: '1',
  1705. // 公司测试配置
  1706. // apiBaseurl:'http://forest.hw.hongweisoft.com/data/forest-portal',//测试
  1707. // loginUrl:'http://forest.hw.hongweisoft.com/data/forest-portal/wechat/h5/authorize?returnUrl=http://forest.hw.hongweisoft.com/#/',//登录后跳转到测试链接
  1708. //online 线上配置
  1709. //本地图片
  1710. // imgUrl:"../../static/img/",
  1711. imgUrl: "http://fqn.hongweisoft.com/cqcarbon/wxapp/",
  1712. //二级页面图片
  1713. // innerImgUrl:"../../../static/img/",
  1714. innerImgUrl: "http://fqn.hongweisoft.com/cqcarbon/wxapp/",
  1715. // 云图片(产品)
  1716. onlineImg: "http://cqth.hw.hongweisoft.com/ht/",
  1717. // 七牛云
  1718. qny: "http://fqn.hongweisoft.com/cqcarbon/wxapp/" };exports.config = config;
  1719. /***/ }),
  1720. /***/ 12:
  1721. /*!***********************************************!*\
  1722. !*** D:/wwwroot/cqcarbonwxapp/store/index.js ***!
  1723. \***********************************************/
  1724. /*! no static exports found */
  1725. /***/ (function(module, exports, __webpack_require__) {
  1726. "use strict";
  1727. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 13));
  1728. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  1729. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 16));
  1730. var _index = _interopRequireDefault(__webpack_require__(/*! @/js_sdk/luch-request/luch-request/index.js */ 17));
  1731. var _md5Min = _interopRequireDefault(__webpack_require__(/*! @/js_sdk/js-md5/md5.min.js */ 30));
  1732. var _config = __webpack_require__(/*! @/config/config.js */ 11);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);});};}var http = new _index.default();
  1733. _vue.default.use(_vuex.default);
  1734. // const userKey = md5("userInfo");
  1735. var userKey = "userInfo";
  1736. var hPageKey = (0, _md5Min.default)('historyPage');
  1737. // const sysTokenKey = md5('accessToken');
  1738. var sysTokenKey = 'accessToken';
  1739. var loginUrl = '/pages/login/loginType';var _default =
  1740. new _vuex.default.Store({
  1741. state: {
  1742. hasLogin: false,
  1743. userInfo: {
  1744. customerCompanyInfoForm: {} },
  1745. token: '',
  1746. cartListTmp: [],
  1747. hPage: '' },
  1748. mutations: {
  1749. addCart: function addCart(state, data) {
  1750. if (data) {
  1751. state.cartListTmp = data;
  1752. console.log("vuex add:", state.cartListTmp);
  1753. }
  1754. },
  1755. clearCart: function clearCart(state) {
  1756. state.cartListTmp = [];
  1757. console.log(state.cartListTmp);
  1758. },
  1759. login: function login(state) {var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  1760. token = token instanceof Object ? token.token : token;
  1761. state.token = token || uni.getStorageSync(sysTokenKey).accessToken || '';
  1762. state.hasLogin = Boolean(state.token);
  1763. //保存token
  1764. uni.setStorage({
  1765. key: sysTokenKey,
  1766. data: {
  1767. accessToken: state.token } });
  1768. },
  1769. /**
  1770. * 退出登录,传入false只更新缓存不跳转
  1771. */
  1772. logout: function logout(state) {var v = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  1773. state.hasLogin = false;
  1774. state.userInfo = {};
  1775. state.token = '';
  1776. uni.removeStorage({
  1777. key: userKey });
  1778. uni.removeStorage({
  1779. key: sysTokenKey });
  1780. //跳到登录页
  1781. // v && $api.goto(loginUrl);
  1782. },
  1783. // historyPage(state, pUrl = '') {
  1784. // if($api.alterUrl('/',pUrl) != loginUrl){
  1785. // state.hPage = pUrl || uni.getStorageSync(hPageKey).url;
  1786. // //记录历史页
  1787. // uni.setStorage({
  1788. // key: hPageKey,
  1789. // data: {
  1790. // url: state.hPage
  1791. // }
  1792. // });
  1793. // }
  1794. // },
  1795. upInfo: function upInfo(state) {var _arguments = arguments;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {var provider, token, thetoken, infoObj, then;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:provider = _arguments.length > 1 && _arguments[1] !== undefined ? _arguments[1] : {};
  1796. token = uni.getStorageSync(sysTokenKey);
  1797. thetoken = 'Bearer ' + token.accessToken;
  1798. //用户信息结构
  1799. infoObj = {
  1800. "page": 0,
  1801. "pageNo": 0,
  1802. "pageNum": 1,
  1803. "pageSize": 10,
  1804. "pageStart": null,
  1805. "pageEnd": null,
  1806. "limit": 0,
  1807. "accessToken": null,
  1808. "fkProductGuid": null,
  1809. "fkOrgGuid": null,
  1810. "state": null,
  1811. "createUser": "",
  1812. "createTime": "",
  1813. "modifiedUser": "",
  1814. "modifiedTime": "",
  1815. "orgBrevity": null,
  1816. "ico": null,
  1817. "params": null,
  1818. "codeUrlPrefix": null,
  1819. "loginOrgGuid": null,
  1820. "msgCode": null,
  1821. "storeName": null,
  1822. "guid": "",
  1823. "account": "",
  1824. "passwd": "",
  1825. "customerType": null,
  1826. "customerName": "",
  1827. "nickName": "",
  1828. "pid": null,
  1829. "phone": null,
  1830. "sex": null,
  1831. "score": null,
  1832. "wxId": "",
  1833. "unionId": null,
  1834. "headImage": "",
  1835. "isCompany": 0,
  1836. "isValidate": 0,
  1837. "isEnable": 1,
  1838. "queryStr": null,
  1839. "carbonAmount": null,
  1840. "goodsNum": null,
  1841. "farmerNum": null,
  1842. "farmerPersonNum": null,
  1843. "goodsList": null,
  1844. "loginType": null,
  1845. "customerCompanyInfoForm": null,
  1846. "channelType": null };
  1847. then = function then(res) {
  1848. if (res.data.code == 0) {
  1849. var data = res.data.retBody instanceof Object ? res.data.retBody : infoObj;
  1850. //处理头像连接
  1851. // data.headImage = $api.alterUrl($api.href, data.headImage || "");
  1852. state.userInfo = data;
  1853. uni.setStorage({ //缓存用户登陆状态
  1854. key: userKey,
  1855. data: data });
  1856. }
  1857. };
  1858. //读取本地缓存信息进行赋值
  1859. then({
  1860. code: 0,
  1861. data: Object.assign(uni.getStorageSync(userKey), provider) });
  1862. //在线更新取得用户信息
  1863. _context.t0 = then;_context.next = 9;return (
  1864. http.get(_config.config.apiBaseurl + '/carbon-h5/wap/customer/getCustomerByToken', { header: { Authorization: thetoken } }).then(function (res) {
  1865. // console.log('getCustomerByToken', res.data);
  1866. if (res.data.retHead.errCode == 0) {res.data.code = 0;}
  1867. // 处理非微信头像
  1868. var headImage = res.data.retBody.headImage;
  1869. if (headImage) {
  1870. //判断是否符合http://符合返回真不符合返回假
  1871. var http = /^http:\/\/.*/i.test(headImage);
  1872. //判断是否符合https://符合返回真不符合返回假
  1873. var https = /^https:\/\/.*/i.test(headImage);
  1874. //如果两个都为假,我们就为客户添加http://
  1875. if (!http && !https) {
  1876. headImage = _config.config.onlineImg + headImage;
  1877. }
  1878. };
  1879. res.data.retBody.headImage = headImage;
  1880. // 处理非微信头像
  1881. return res;
  1882. }).catch(function (err) {
  1883. // console.log('err', err)
  1884. }));case 9:_context.t1 = _context.sent;(0, _context.t0)(_context.t1);case 11:case "end":return _context.stop();}}}, _callee);}))();
  1885. } } });exports.default = _default;
  1886. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  1887. /***/ }),
  1888. /***/ 13:
  1889. /*!**********************************************************!*\
  1890. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  1891. \**********************************************************/
  1892. /*! no static exports found */
  1893. /***/ (function(module, exports, __webpack_require__) {
  1894. module.exports = __webpack_require__(/*! regenerator-runtime */ 14);
  1895. /***/ }),
  1896. /***/ 14:
  1897. /*!************************************************************!*\
  1898. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  1899. \************************************************************/
  1900. /*! no static exports found */
  1901. /***/ (function(module, exports, __webpack_require__) {
  1902. /**
  1903. * Copyright (c) 2014-present, Facebook, Inc.
  1904. *
  1905. * This source code is licensed under the MIT license found in the
  1906. * LICENSE file in the root directory of this source tree.
  1907. */
  1908. // This method of obtaining a reference to the global object needs to be
  1909. // kept identical to the way it is obtained in runtime.js
  1910. var g = (function() {
  1911. return this || (typeof self === "object" && self);
  1912. })() || Function("return this")();
  1913. // Use `getOwnPropertyNames` because not all browsers support calling
  1914. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  1915. var hadRuntime = g.regeneratorRuntime &&
  1916. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  1917. // Save the old regeneratorRuntime in case it needs to be restored later.
  1918. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  1919. // Force reevalutation of runtime.js.
  1920. g.regeneratorRuntime = undefined;
  1921. module.exports = __webpack_require__(/*! ./runtime */ 15);
  1922. if (hadRuntime) {
  1923. // Restore the original runtime.
  1924. g.regeneratorRuntime = oldRuntime;
  1925. } else {
  1926. // Remove the global property added by runtime.js.
  1927. try {
  1928. delete g.regeneratorRuntime;
  1929. } catch(e) {
  1930. g.regeneratorRuntime = undefined;
  1931. }
  1932. }
  1933. /***/ }),
  1934. /***/ 15:
  1935. /*!*****************************************************!*\
  1936. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  1937. \*****************************************************/
  1938. /*! no static exports found */
  1939. /***/ (function(module, exports) {
  1940. /**
  1941. * Copyright (c) 2014-present, Facebook, Inc.
  1942. *
  1943. * This source code is licensed under the MIT license found in the
  1944. * LICENSE file in the root directory of this source tree.
  1945. */
  1946. !(function(global) {
  1947. "use strict";
  1948. var Op = Object.prototype;
  1949. var hasOwn = Op.hasOwnProperty;
  1950. var undefined; // More compressible than void 0.
  1951. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  1952. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  1953. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  1954. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  1955. var inModule = typeof module === "object";
  1956. var runtime = global.regeneratorRuntime;
  1957. if (runtime) {
  1958. if (inModule) {
  1959. // If regeneratorRuntime is defined globally and we're in a module,
  1960. // make the exports object identical to regeneratorRuntime.
  1961. module.exports = runtime;
  1962. }
  1963. // Don't bother evaluating the rest of this file if the runtime was
  1964. // already defined globally.
  1965. return;
  1966. }
  1967. // Define the runtime globally (as expected by generated code) as either
  1968. // module.exports (if we're in a module) or a new, empty object.
  1969. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  1970. function wrap(innerFn, outerFn, self, tryLocsList) {
  1971. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  1972. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  1973. var generator = Object.create(protoGenerator.prototype);
  1974. var context = new Context(tryLocsList || []);
  1975. // The ._invoke method unifies the implementations of the .next,
  1976. // .throw, and .return methods.
  1977. generator._invoke = makeInvokeMethod(innerFn, self, context);
  1978. return generator;
  1979. }
  1980. runtime.wrap = wrap;
  1981. // Try/catch helper to minimize deoptimizations. Returns a completion
  1982. // record like context.tryEntries[i].completion. This interface could
  1983. // have been (and was previously) designed to take a closure to be
  1984. // invoked without arguments, but in all the cases we care about we
  1985. // already have an existing method we want to call, so there's no need
  1986. // to create a new function object. We can even get away with assuming
  1987. // the method takes exactly one argument, since that happens to be true
  1988. // in every case, so we don't have to touch the arguments object. The
  1989. // only additional allocation required is the completion record, which
  1990. // has a stable shape and so hopefully should be cheap to allocate.
  1991. function tryCatch(fn, obj, arg) {
  1992. try {
  1993. return { type: "normal", arg: fn.call(obj, arg) };
  1994. } catch (err) {
  1995. return { type: "throw", arg: err };
  1996. }
  1997. }
  1998. var GenStateSuspendedStart = "suspendedStart";
  1999. var GenStateSuspendedYield = "suspendedYield";
  2000. var GenStateExecuting = "executing";
  2001. var GenStateCompleted = "completed";
  2002. // Returning this object from the innerFn has the same effect as
  2003. // breaking out of the dispatch switch statement.
  2004. var ContinueSentinel = {};
  2005. // Dummy constructor functions that we use as the .constructor and
  2006. // .constructor.prototype properties for functions that return Generator
  2007. // objects. For full spec compliance, you may wish to configure your
  2008. // minifier not to mangle the names of these two functions.
  2009. function Generator() {}
  2010. function GeneratorFunction() {}
  2011. function GeneratorFunctionPrototype() {}
  2012. // This is a polyfill for %IteratorPrototype% for environments that
  2013. // don't natively support it.
  2014. var IteratorPrototype = {};
  2015. IteratorPrototype[iteratorSymbol] = function () {
  2016. return this;
  2017. };
  2018. var getProto = Object.getPrototypeOf;
  2019. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  2020. if (NativeIteratorPrototype &&
  2021. NativeIteratorPrototype !== Op &&
  2022. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  2023. // This environment has a native %IteratorPrototype%; use it instead
  2024. // of the polyfill.
  2025. IteratorPrototype = NativeIteratorPrototype;
  2026. }
  2027. var Gp = GeneratorFunctionPrototype.prototype =
  2028. Generator.prototype = Object.create(IteratorPrototype);
  2029. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  2030. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  2031. GeneratorFunctionPrototype[toStringTagSymbol] =
  2032. GeneratorFunction.displayName = "GeneratorFunction";
  2033. // Helper for defining the .next, .throw, and .return methods of the
  2034. // Iterator interface in terms of a single ._invoke method.
  2035. function defineIteratorMethods(prototype) {
  2036. ["next", "throw", "return"].forEach(function(method) {
  2037. prototype[method] = function(arg) {
  2038. return this._invoke(method, arg);
  2039. };
  2040. });
  2041. }
  2042. runtime.isGeneratorFunction = function(genFun) {
  2043. var ctor = typeof genFun === "function" && genFun.constructor;
  2044. return ctor
  2045. ? ctor === GeneratorFunction ||
  2046. // For the native GeneratorFunction constructor, the best we can
  2047. // do is to check its .name property.
  2048. (ctor.displayName || ctor.name) === "GeneratorFunction"
  2049. : false;
  2050. };
  2051. runtime.mark = function(genFun) {
  2052. if (Object.setPrototypeOf) {
  2053. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  2054. } else {
  2055. genFun.__proto__ = GeneratorFunctionPrototype;
  2056. if (!(toStringTagSymbol in genFun)) {
  2057. genFun[toStringTagSymbol] = "GeneratorFunction";
  2058. }
  2059. }
  2060. genFun.prototype = Object.create(Gp);
  2061. return genFun;
  2062. };
  2063. // Within the body of any async function, `await x` is transformed to
  2064. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  2065. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  2066. // meant to be awaited.
  2067. runtime.awrap = function(arg) {
  2068. return { __await: arg };
  2069. };
  2070. function AsyncIterator(generator) {
  2071. function invoke(method, arg, resolve, reject) {
  2072. var record = tryCatch(generator[method], generator, arg);
  2073. if (record.type === "throw") {
  2074. reject(record.arg);
  2075. } else {
  2076. var result = record.arg;
  2077. var value = result.value;
  2078. if (value &&
  2079. typeof value === "object" &&
  2080. hasOwn.call(value, "__await")) {
  2081. return Promise.resolve(value.__await).then(function(value) {
  2082. invoke("next", value, resolve, reject);
  2083. }, function(err) {
  2084. invoke("throw", err, resolve, reject);
  2085. });
  2086. }
  2087. return Promise.resolve(value).then(function(unwrapped) {
  2088. // When a yielded Promise is resolved, its final value becomes
  2089. // the .value of the Promise<{value,done}> result for the
  2090. // current iteration.
  2091. result.value = unwrapped;
  2092. resolve(result);
  2093. }, function(error) {
  2094. // If a rejected Promise was yielded, throw the rejection back
  2095. // into the async generator function so it can be handled there.
  2096. return invoke("throw", error, resolve, reject);
  2097. });
  2098. }
  2099. }
  2100. var previousPromise;
  2101. function enqueue(method, arg) {
  2102. function callInvokeWithMethodAndArg() {
  2103. return new Promise(function(resolve, reject) {
  2104. invoke(method, arg, resolve, reject);
  2105. });
  2106. }
  2107. return previousPromise =
  2108. // If enqueue has been called before, then we want to wait until
  2109. // all previous Promises have been resolved before calling invoke,
  2110. // so that results are always delivered in the correct order. If
  2111. // enqueue has not been called before, then it is important to
  2112. // call invoke immediately, without waiting on a callback to fire,
  2113. // so that the async generator function has the opportunity to do
  2114. // any necessary setup in a predictable way. This predictability
  2115. // is why the Promise constructor synchronously invokes its
  2116. // executor callback, and why async functions synchronously
  2117. // execute code before the first await. Since we implement simple
  2118. // async functions in terms of async generators, it is especially
  2119. // important to get this right, even though it requires care.
  2120. previousPromise ? previousPromise.then(
  2121. callInvokeWithMethodAndArg,
  2122. // Avoid propagating failures to Promises returned by later
  2123. // invocations of the iterator.
  2124. callInvokeWithMethodAndArg
  2125. ) : callInvokeWithMethodAndArg();
  2126. }
  2127. // Define the unified helper method that is used to implement .next,
  2128. // .throw, and .return (see defineIteratorMethods).
  2129. this._invoke = enqueue;
  2130. }
  2131. defineIteratorMethods(AsyncIterator.prototype);
  2132. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  2133. return this;
  2134. };
  2135. runtime.AsyncIterator = AsyncIterator;
  2136. // Note that simple async functions are implemented on top of
  2137. // AsyncIterator objects; they just return a Promise for the value of
  2138. // the final result produced by the iterator.
  2139. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  2140. var iter = new AsyncIterator(
  2141. wrap(innerFn, outerFn, self, tryLocsList)
  2142. );
  2143. return runtime.isGeneratorFunction(outerFn)
  2144. ? iter // If outerFn is a generator, return the full iterator.
  2145. : iter.next().then(function(result) {
  2146. return result.done ? result.value : iter.next();
  2147. });
  2148. };
  2149. function makeInvokeMethod(innerFn, self, context) {
  2150. var state = GenStateSuspendedStart;
  2151. return function invoke(method, arg) {
  2152. if (state === GenStateExecuting) {
  2153. throw new Error("Generator is already running");
  2154. }
  2155. if (state === GenStateCompleted) {
  2156. if (method === "throw") {
  2157. throw arg;
  2158. }
  2159. // Be forgiving, per 25.3.3.3.3 of the spec:
  2160. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  2161. return doneResult();
  2162. }
  2163. context.method = method;
  2164. context.arg = arg;
  2165. while (true) {
  2166. var delegate = context.delegate;
  2167. if (delegate) {
  2168. var delegateResult = maybeInvokeDelegate(delegate, context);
  2169. if (delegateResult) {
  2170. if (delegateResult === ContinueSentinel) continue;
  2171. return delegateResult;
  2172. }
  2173. }
  2174. if (context.method === "next") {
  2175. // Setting context._sent for legacy support of Babel's
  2176. // function.sent implementation.
  2177. context.sent = context._sent = context.arg;
  2178. } else if (context.method === "throw") {
  2179. if (state === GenStateSuspendedStart) {
  2180. state = GenStateCompleted;
  2181. throw context.arg;
  2182. }
  2183. context.dispatchException(context.arg);
  2184. } else if (context.method === "return") {
  2185. context.abrupt("return", context.arg);
  2186. }
  2187. state = GenStateExecuting;
  2188. var record = tryCatch(innerFn, self, context);
  2189. if (record.type === "normal") {
  2190. // If an exception is thrown from innerFn, we leave state ===
  2191. // GenStateExecuting and loop back for another invocation.
  2192. state = context.done
  2193. ? GenStateCompleted
  2194. : GenStateSuspendedYield;
  2195. if (record.arg === ContinueSentinel) {
  2196. continue;
  2197. }
  2198. return {
  2199. value: record.arg,
  2200. done: context.done
  2201. };
  2202. } else if (record.type === "throw") {
  2203. state = GenStateCompleted;
  2204. // Dispatch the exception by looping back around to the
  2205. // context.dispatchException(context.arg) call above.
  2206. context.method = "throw";
  2207. context.arg = record.arg;
  2208. }
  2209. }
  2210. };
  2211. }
  2212. // Call delegate.iterator[context.method](context.arg) and handle the
  2213. // result, either by returning a { value, done } result from the
  2214. // delegate iterator, or by modifying context.method and context.arg,
  2215. // setting context.delegate to null, and returning the ContinueSentinel.
  2216. function maybeInvokeDelegate(delegate, context) {
  2217. var method = delegate.iterator[context.method];
  2218. if (method === undefined) {
  2219. // A .throw or .return when the delegate iterator has no .throw
  2220. // method always terminates the yield* loop.
  2221. context.delegate = null;
  2222. if (context.method === "throw") {
  2223. if (delegate.iterator.return) {
  2224. // If the delegate iterator has a return method, give it a
  2225. // chance to clean up.
  2226. context.method = "return";
  2227. context.arg = undefined;
  2228. maybeInvokeDelegate(delegate, context);
  2229. if (context.method === "throw") {
  2230. // If maybeInvokeDelegate(context) changed context.method from
  2231. // "return" to "throw", let that override the TypeError below.
  2232. return ContinueSentinel;
  2233. }
  2234. }
  2235. context.method = "throw";
  2236. context.arg = new TypeError(
  2237. "The iterator does not provide a 'throw' method");
  2238. }
  2239. return ContinueSentinel;
  2240. }
  2241. var record = tryCatch(method, delegate.iterator, context.arg);
  2242. if (record.type === "throw") {
  2243. context.method = "throw";
  2244. context.arg = record.arg;
  2245. context.delegate = null;
  2246. return ContinueSentinel;
  2247. }
  2248. var info = record.arg;
  2249. if (! info) {
  2250. context.method = "throw";
  2251. context.arg = new TypeError("iterator result is not an object");
  2252. context.delegate = null;
  2253. return ContinueSentinel;
  2254. }
  2255. if (info.done) {
  2256. // Assign the result of the finished delegate to the temporary
  2257. // variable specified by delegate.resultName (see delegateYield).
  2258. context[delegate.resultName] = info.value;
  2259. // Resume execution at the desired location (see delegateYield).
  2260. context.next = delegate.nextLoc;
  2261. // If context.method was "throw" but the delegate handled the
  2262. // exception, let the outer generator proceed normally. If
  2263. // context.method was "next", forget context.arg since it has been
  2264. // "consumed" by the delegate iterator. If context.method was
  2265. // "return", allow the original .return call to continue in the
  2266. // outer generator.
  2267. if (context.method !== "return") {
  2268. context.method = "next";
  2269. context.arg = undefined;
  2270. }
  2271. } else {
  2272. // Re-yield the result returned by the delegate method.
  2273. return info;
  2274. }
  2275. // The delegate iterator is finished, so forget it and continue with
  2276. // the outer generator.
  2277. context.delegate = null;
  2278. return ContinueSentinel;
  2279. }
  2280. // Define Generator.prototype.{next,throw,return} in terms of the
  2281. // unified ._invoke helper method.
  2282. defineIteratorMethods(Gp);
  2283. Gp[toStringTagSymbol] = "Generator";
  2284. // A Generator should always return itself as the iterator object when the
  2285. // @@iterator function is called on it. Some browsers' implementations of the
  2286. // iterator prototype chain incorrectly implement this, causing the Generator
  2287. // object to not be returned from this call. This ensures that doesn't happen.
  2288. // See https://github.com/facebook/regenerator/issues/274 for more details.
  2289. Gp[iteratorSymbol] = function() {
  2290. return this;
  2291. };
  2292. Gp.toString = function() {
  2293. return "[object Generator]";
  2294. };
  2295. function pushTryEntry(locs) {
  2296. var entry = { tryLoc: locs[0] };
  2297. if (1 in locs) {
  2298. entry.catchLoc = locs[1];
  2299. }
  2300. if (2 in locs) {
  2301. entry.finallyLoc = locs[2];
  2302. entry.afterLoc = locs[3];
  2303. }
  2304. this.tryEntries.push(entry);
  2305. }
  2306. function resetTryEntry(entry) {
  2307. var record = entry.completion || {};
  2308. record.type = "normal";
  2309. delete record.arg;
  2310. entry.completion = record;
  2311. }
  2312. function Context(tryLocsList) {
  2313. // The root entry object (effectively a try statement without a catch
  2314. // or a finally block) gives us a place to store values thrown from
  2315. // locations where there is no enclosing try statement.
  2316. this.tryEntries = [{ tryLoc: "root" }];
  2317. tryLocsList.forEach(pushTryEntry, this);
  2318. this.reset(true);
  2319. }
  2320. runtime.keys = function(object) {
  2321. var keys = [];
  2322. for (var key in object) {
  2323. keys.push(key);
  2324. }
  2325. keys.reverse();
  2326. // Rather than returning an object with a next method, we keep
  2327. // things simple and return the next function itself.
  2328. return function next() {
  2329. while (keys.length) {
  2330. var key = keys.pop();
  2331. if (key in object) {
  2332. next.value = key;
  2333. next.done = false;
  2334. return next;
  2335. }
  2336. }
  2337. // To avoid creating an additional object, we just hang the .value
  2338. // and .done properties off the next function object itself. This
  2339. // also ensures that the minifier will not anonymize the function.
  2340. next.done = true;
  2341. return next;
  2342. };
  2343. };
  2344. function values(iterable) {
  2345. if (iterable) {
  2346. var iteratorMethod = iterable[iteratorSymbol];
  2347. if (iteratorMethod) {
  2348. return iteratorMethod.call(iterable);
  2349. }
  2350. if (typeof iterable.next === "function") {
  2351. return iterable;
  2352. }
  2353. if (!isNaN(iterable.length)) {
  2354. var i = -1, next = function next() {
  2355. while (++i < iterable.length) {
  2356. if (hasOwn.call(iterable, i)) {
  2357. next.value = iterable[i];
  2358. next.done = false;
  2359. return next;
  2360. }
  2361. }
  2362. next.value = undefined;
  2363. next.done = true;
  2364. return next;
  2365. };
  2366. return next.next = next;
  2367. }
  2368. }
  2369. // Return an iterator with no values.
  2370. return { next: doneResult };
  2371. }
  2372. runtime.values = values;
  2373. function doneResult() {
  2374. return { value: undefined, done: true };
  2375. }
  2376. Context.prototype = {
  2377. constructor: Context,
  2378. reset: function(skipTempReset) {
  2379. this.prev = 0;
  2380. this.next = 0;
  2381. // Resetting context._sent for legacy support of Babel's
  2382. // function.sent implementation.
  2383. this.sent = this._sent = undefined;
  2384. this.done = false;
  2385. this.delegate = null;
  2386. this.method = "next";
  2387. this.arg = undefined;
  2388. this.tryEntries.forEach(resetTryEntry);
  2389. if (!skipTempReset) {
  2390. for (var name in this) {
  2391. // Not sure about the optimal order of these conditions:
  2392. if (name.charAt(0) === "t" &&
  2393. hasOwn.call(this, name) &&
  2394. !isNaN(+name.slice(1))) {
  2395. this[name] = undefined;
  2396. }
  2397. }
  2398. }
  2399. },
  2400. stop: function() {
  2401. this.done = true;
  2402. var rootEntry = this.tryEntries[0];
  2403. var rootRecord = rootEntry.completion;
  2404. if (rootRecord.type === "throw") {
  2405. throw rootRecord.arg;
  2406. }
  2407. return this.rval;
  2408. },
  2409. dispatchException: function(exception) {
  2410. if (this.done) {
  2411. throw exception;
  2412. }
  2413. var context = this;
  2414. function handle(loc, caught) {
  2415. record.type = "throw";
  2416. record.arg = exception;
  2417. context.next = loc;
  2418. if (caught) {
  2419. // If the dispatched exception was caught by a catch block,
  2420. // then let that catch block handle the exception normally.
  2421. context.method = "next";
  2422. context.arg = undefined;
  2423. }
  2424. return !! caught;
  2425. }
  2426. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  2427. var entry = this.tryEntries[i];
  2428. var record = entry.completion;
  2429. if (entry.tryLoc === "root") {
  2430. // Exception thrown outside of any try block that could handle
  2431. // it, so set the completion value of the entire function to
  2432. // throw the exception.
  2433. return handle("end");
  2434. }
  2435. if (entry.tryLoc <= this.prev) {
  2436. var hasCatch = hasOwn.call(entry, "catchLoc");
  2437. var hasFinally = hasOwn.call(entry, "finallyLoc");
  2438. if (hasCatch && hasFinally) {
  2439. if (this.prev < entry.catchLoc) {
  2440. return handle(entry.catchLoc, true);
  2441. } else if (this.prev < entry.finallyLoc) {
  2442. return handle(entry.finallyLoc);
  2443. }
  2444. } else if (hasCatch) {
  2445. if (this.prev < entry.catchLoc) {
  2446. return handle(entry.catchLoc, true);
  2447. }
  2448. } else if (hasFinally) {
  2449. if (this.prev < entry.finallyLoc) {
  2450. return handle(entry.finallyLoc);
  2451. }
  2452. } else {
  2453. throw new Error("try statement without catch or finally");
  2454. }
  2455. }
  2456. }
  2457. },
  2458. abrupt: function(type, arg) {
  2459. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  2460. var entry = this.tryEntries[i];
  2461. if (entry.tryLoc <= this.prev &&
  2462. hasOwn.call(entry, "finallyLoc") &&
  2463. this.prev < entry.finallyLoc) {
  2464. var finallyEntry = entry;
  2465. break;
  2466. }
  2467. }
  2468. if (finallyEntry &&
  2469. (type === "break" ||
  2470. type === "continue") &&
  2471. finallyEntry.tryLoc <= arg &&
  2472. arg <= finallyEntry.finallyLoc) {
  2473. // Ignore the finally entry if control is not jumping to a
  2474. // location outside the try/catch block.
  2475. finallyEntry = null;
  2476. }
  2477. var record = finallyEntry ? finallyEntry.completion : {};
  2478. record.type = type;
  2479. record.arg = arg;
  2480. if (finallyEntry) {
  2481. this.method = "next";
  2482. this.next = finallyEntry.finallyLoc;
  2483. return ContinueSentinel;
  2484. }
  2485. return this.complete(record);
  2486. },
  2487. complete: function(record, afterLoc) {
  2488. if (record.type === "throw") {
  2489. throw record.arg;
  2490. }
  2491. if (record.type === "break" ||
  2492. record.type === "continue") {
  2493. this.next = record.arg;
  2494. } else if (record.type === "return") {
  2495. this.rval = this.arg = record.arg;
  2496. this.method = "return";
  2497. this.next = "end";
  2498. } else if (record.type === "normal" && afterLoc) {
  2499. this.next = afterLoc;
  2500. }
  2501. return ContinueSentinel;
  2502. },
  2503. finish: function(finallyLoc) {
  2504. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  2505. var entry = this.tryEntries[i];
  2506. if (entry.finallyLoc === finallyLoc) {
  2507. this.complete(entry.completion, entry.afterLoc);
  2508. resetTryEntry(entry);
  2509. return ContinueSentinel;
  2510. }
  2511. }
  2512. },
  2513. "catch": function(tryLoc) {
  2514. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  2515. var entry = this.tryEntries[i];
  2516. if (entry.tryLoc === tryLoc) {
  2517. var record = entry.completion;
  2518. if (record.type === "throw") {
  2519. var thrown = record.arg;
  2520. resetTryEntry(entry);
  2521. }
  2522. return thrown;
  2523. }
  2524. }
  2525. // The context.catch method must only be called with a location
  2526. // argument that corresponds to a known catch block.
  2527. throw new Error("illegal catch attempt");
  2528. },
  2529. delegateYield: function(iterable, resultName, nextLoc) {
  2530. this.delegate = {
  2531. iterator: values(iterable),
  2532. resultName: resultName,
  2533. nextLoc: nextLoc
  2534. };
  2535. if (this.method === "next") {
  2536. // Deliberately forget the last sent value so that we don't
  2537. // accidentally pass it on to the delegate.
  2538. this.arg = undefined;
  2539. }
  2540. return ContinueSentinel;
  2541. }
  2542. };
  2543. })(
  2544. // In sloppy mode, unbound `this` refers to the global object, fallback to
  2545. // Function constructor if we're in global strict mode. That is sadly a form
  2546. // of indirect eval which violates Content Security Policy.
  2547. (function() {
  2548. return this || (typeof self === "object" && self);
  2549. })() || Function("return this")()
  2550. );
  2551. /***/ }),
  2552. /***/ 16:
  2553. /*!********************************************!*\
  2554. !*** ./node_modules/vuex/dist/vuex.esm.js ***!
  2555. \********************************************/
  2556. /*! exports provided: default, Store, createNamespacedHelpers, install, mapActions, mapGetters, mapMutations, mapState */
  2557. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2558. "use strict";
  2559. __webpack_require__.r(__webpack_exports__);
  2560. /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Store", function() { return Store; });
  2561. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createNamespacedHelpers", function() { return createNamespacedHelpers; });
  2562. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "install", function() { return install; });
  2563. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return mapActions; });
  2564. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapGetters", function() { return mapGetters; });
  2565. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapMutations", function() { return mapMutations; });
  2566. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapState", function() { return mapState; });
  2567. /*!
  2568. * vuex v3.4.0
  2569. * (c) 2020 Evan You
  2570. * @license MIT
  2571. */
  2572. function applyMixin (Vue) {
  2573. var version = Number(Vue.version.split('.')[0]);
  2574. if (version >= 2) {
  2575. Vue.mixin({ beforeCreate: vuexInit });
  2576. } else {
  2577. // override init and inject vuex init procedure
  2578. // for 1.x backwards compatibility.
  2579. var _init = Vue.prototype._init;
  2580. Vue.prototype._init = function (options) {
  2581. if ( options === void 0 ) options = {};
  2582. options.init = options.init
  2583. ? [vuexInit].concat(options.init)
  2584. : vuexInit;
  2585. _init.call(this, options);
  2586. };
  2587. }
  2588. /**
  2589. * Vuex init hook, injected into each instances init hooks list.
  2590. */
  2591. function vuexInit () {
  2592. var options = this.$options;
  2593. // store injection
  2594. if (options.store) {
  2595. this.$store = typeof options.store === 'function'
  2596. ? options.store()
  2597. : options.store;
  2598. } else if (options.parent && options.parent.$store) {
  2599. this.$store = options.parent.$store;
  2600. }
  2601. }
  2602. }
  2603. var target = typeof window !== 'undefined'
  2604. ? window
  2605. : typeof global !== 'undefined'
  2606. ? global
  2607. : {};
  2608. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  2609. function devtoolPlugin (store) {
  2610. if (!devtoolHook) { return }
  2611. store._devtoolHook = devtoolHook;
  2612. devtoolHook.emit('vuex:init', store);
  2613. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  2614. store.replaceState(targetState);
  2615. });
  2616. store.subscribe(function (mutation, state) {
  2617. devtoolHook.emit('vuex:mutation', mutation, state);
  2618. }, { prepend: true });
  2619. store.subscribeAction(function (action, state) {
  2620. devtoolHook.emit('vuex:action', action, state);
  2621. }, { prepend: true });
  2622. }
  2623. /**
  2624. * Get the first item that pass the test
  2625. * by second argument function
  2626. *
  2627. * @param {Array} list
  2628. * @param {Function} f
  2629. * @return {*}
  2630. */
  2631. /**
  2632. * forEach for object
  2633. */
  2634. function forEachValue (obj, fn) {
  2635. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  2636. }
  2637. function isObject (obj) {
  2638. return obj !== null && typeof obj === 'object'
  2639. }
  2640. function isPromise (val) {
  2641. return val && typeof val.then === 'function'
  2642. }
  2643. function assert (condition, msg) {
  2644. if (!condition) { throw new Error(("[vuex] " + msg)) }
  2645. }
  2646. function partial (fn, arg) {
  2647. return function () {
  2648. return fn(arg)
  2649. }
  2650. }
  2651. // Base data struct for store's module, package with some attribute and method
  2652. var Module = function Module (rawModule, runtime) {
  2653. this.runtime = runtime;
  2654. // Store some children item
  2655. this._children = Object.create(null);
  2656. // Store the origin module object which passed by programmer
  2657. this._rawModule = rawModule;
  2658. var rawState = rawModule.state;
  2659. // Store the origin module's state
  2660. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  2661. };
  2662. var prototypeAccessors = { namespaced: { configurable: true } };
  2663. prototypeAccessors.namespaced.get = function () {
  2664. return !!this._rawModule.namespaced
  2665. };
  2666. Module.prototype.addChild = function addChild (key, module) {
  2667. this._children[key] = module;
  2668. };
  2669. Module.prototype.removeChild = function removeChild (key) {
  2670. delete this._children[key];
  2671. };
  2672. Module.prototype.getChild = function getChild (key) {
  2673. return this._children[key]
  2674. };
  2675. Module.prototype.hasChild = function hasChild (key) {
  2676. return key in this._children
  2677. };
  2678. Module.prototype.update = function update (rawModule) {
  2679. this._rawModule.namespaced = rawModule.namespaced;
  2680. if (rawModule.actions) {
  2681. this._rawModule.actions = rawModule.actions;
  2682. }
  2683. if (rawModule.mutations) {
  2684. this._rawModule.mutations = rawModule.mutations;
  2685. }
  2686. if (rawModule.getters) {
  2687. this._rawModule.getters = rawModule.getters;
  2688. }
  2689. };
  2690. Module.prototype.forEachChild = function forEachChild (fn) {
  2691. forEachValue(this._children, fn);
  2692. };
  2693. Module.prototype.forEachGetter = function forEachGetter (fn) {
  2694. if (this._rawModule.getters) {
  2695. forEachValue(this._rawModule.getters, fn);
  2696. }
  2697. };
  2698. Module.prototype.forEachAction = function forEachAction (fn) {
  2699. if (this._rawModule.actions) {
  2700. forEachValue(this._rawModule.actions, fn);
  2701. }
  2702. };
  2703. Module.prototype.forEachMutation = function forEachMutation (fn) {
  2704. if (this._rawModule.mutations) {
  2705. forEachValue(this._rawModule.mutations, fn);
  2706. }
  2707. };
  2708. Object.defineProperties( Module.prototype, prototypeAccessors );
  2709. var ModuleCollection = function ModuleCollection (rawRootModule) {
  2710. // register root module (Vuex.Store options)
  2711. this.register([], rawRootModule, false);
  2712. };
  2713. ModuleCollection.prototype.get = function get (path) {
  2714. return path.reduce(function (module, key) {
  2715. return module.getChild(key)
  2716. }, this.root)
  2717. };
  2718. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  2719. var module = this.root;
  2720. return path.reduce(function (namespace, key) {
  2721. module = module.getChild(key);
  2722. return namespace + (module.namespaced ? key + '/' : '')
  2723. }, '')
  2724. };
  2725. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  2726. update([], this.root, rawRootModule);
  2727. };
  2728. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  2729. var this$1 = this;
  2730. if ( runtime === void 0 ) runtime = true;
  2731. if ((true)) {
  2732. assertRawModule(path, rawModule);
  2733. }
  2734. var newModule = new Module(rawModule, runtime);
  2735. if (path.length === 0) {
  2736. this.root = newModule;
  2737. } else {
  2738. var parent = this.get(path.slice(0, -1));
  2739. parent.addChild(path[path.length - 1], newModule);
  2740. }
  2741. // register nested modules
  2742. if (rawModule.modules) {
  2743. forEachValue(rawModule.modules, function (rawChildModule, key) {
  2744. this$1.register(path.concat(key), rawChildModule, runtime);
  2745. });
  2746. }
  2747. };
  2748. ModuleCollection.prototype.unregister = function unregister (path) {
  2749. var parent = this.get(path.slice(0, -1));
  2750. var key = path[path.length - 1];
  2751. if (!parent.getChild(key).runtime) { return }
  2752. parent.removeChild(key);
  2753. };
  2754. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  2755. var parent = this.get(path.slice(0, -1));
  2756. var key = path[path.length - 1];
  2757. return parent.hasChild(key)
  2758. };
  2759. function update (path, targetModule, newModule) {
  2760. if ((true)) {
  2761. assertRawModule(path, newModule);
  2762. }
  2763. // update target module
  2764. targetModule.update(newModule);
  2765. // update nested modules
  2766. if (newModule.modules) {
  2767. for (var key in newModule.modules) {
  2768. if (!targetModule.getChild(key)) {
  2769. if ((true)) {
  2770. console.warn(
  2771. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  2772. 'manual reload is needed'
  2773. );
  2774. }
  2775. return
  2776. }
  2777. update(
  2778. path.concat(key),
  2779. targetModule.getChild(key),
  2780. newModule.modules[key]
  2781. );
  2782. }
  2783. }
  2784. }
  2785. var functionAssert = {
  2786. assert: function (value) { return typeof value === 'function'; },
  2787. expected: 'function'
  2788. };
  2789. var objectAssert = {
  2790. assert: function (value) { return typeof value === 'function' ||
  2791. (typeof value === 'object' && typeof value.handler === 'function'); },
  2792. expected: 'function or object with "handler" function'
  2793. };
  2794. var assertTypes = {
  2795. getters: functionAssert,
  2796. mutations: functionAssert,
  2797. actions: objectAssert
  2798. };
  2799. function assertRawModule (path, rawModule) {
  2800. Object.keys(assertTypes).forEach(function (key) {
  2801. if (!rawModule[key]) { return }
  2802. var assertOptions = assertTypes[key];
  2803. forEachValue(rawModule[key], function (value, type) {
  2804. assert(
  2805. assertOptions.assert(value),
  2806. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  2807. );
  2808. });
  2809. });
  2810. }
  2811. function makeAssertionMessage (path, key, type, value, expected) {
  2812. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  2813. if (path.length > 0) {
  2814. buf += " in module \"" + (path.join('.')) + "\"";
  2815. }
  2816. buf += " is " + (JSON.stringify(value)) + ".";
  2817. return buf
  2818. }
  2819. var Vue; // bind on install
  2820. var Store = function Store (options) {
  2821. var this$1 = this;
  2822. if ( options === void 0 ) options = {};
  2823. // Auto install if it is not done yet and `window` has `Vue`.
  2824. // To allow users to avoid auto-installation in some cases,
  2825. // this code should be placed here. See #731
  2826. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  2827. install(window.Vue);
  2828. }
  2829. if ((true)) {
  2830. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  2831. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  2832. assert(this instanceof Store, "store must be called with the new operator.");
  2833. }
  2834. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  2835. var strict = options.strict; if ( strict === void 0 ) strict = false;
  2836. // store internal state
  2837. this._committing = false;
  2838. this._actions = Object.create(null);
  2839. this._actionSubscribers = [];
  2840. this._mutations = Object.create(null);
  2841. this._wrappedGetters = Object.create(null);
  2842. this._modules = new ModuleCollection(options);
  2843. this._modulesNamespaceMap = Object.create(null);
  2844. this._subscribers = [];
  2845. this._watcherVM = new Vue();
  2846. this._makeLocalGettersCache = Object.create(null);
  2847. // bind commit and dispatch to self
  2848. var store = this;
  2849. var ref = this;
  2850. var dispatch = ref.dispatch;
  2851. var commit = ref.commit;
  2852. this.dispatch = function boundDispatch (type, payload) {
  2853. return dispatch.call(store, type, payload)
  2854. };
  2855. this.commit = function boundCommit (type, payload, options) {
  2856. return commit.call(store, type, payload, options)
  2857. };
  2858. // strict mode
  2859. this.strict = strict;
  2860. var state = this._modules.root.state;
  2861. // init root module.
  2862. // this also recursively registers all sub-modules
  2863. // and collects all module getters inside this._wrappedGetters
  2864. installModule(this, state, [], this._modules.root);
  2865. // initialize the store vm, which is responsible for the reactivity
  2866. // (also registers _wrappedGetters as computed properties)
  2867. resetStoreVM(this, state);
  2868. // apply plugins
  2869. plugins.forEach(function (plugin) { return plugin(this$1); });
  2870. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  2871. if (useDevtools) {
  2872. devtoolPlugin(this);
  2873. }
  2874. };
  2875. var prototypeAccessors$1 = { state: { configurable: true } };
  2876. prototypeAccessors$1.state.get = function () {
  2877. return this._vm._data.$$state
  2878. };
  2879. prototypeAccessors$1.state.set = function (v) {
  2880. if ((true)) {
  2881. assert(false, "use store.replaceState() to explicit replace store state.");
  2882. }
  2883. };
  2884. Store.prototype.commit = function commit (_type, _payload, _options) {
  2885. var this$1 = this;
  2886. // check object-style commit
  2887. var ref = unifyObjectStyle(_type, _payload, _options);
  2888. var type = ref.type;
  2889. var payload = ref.payload;
  2890. var options = ref.options;
  2891. var mutation = { type: type, payload: payload };
  2892. var entry = this._mutations[type];
  2893. if (!entry) {
  2894. if ((true)) {
  2895. console.error(("[vuex] unknown mutation type: " + type));
  2896. }
  2897. return
  2898. }
  2899. this._withCommit(function () {
  2900. entry.forEach(function commitIterator (handler) {
  2901. handler(payload);
  2902. });
  2903. });
  2904. this._subscribers
  2905. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  2906. .forEach(function (sub) { return sub(mutation, this$1.state); });
  2907. if (
  2908. ( true) &&
  2909. options && options.silent
  2910. ) {
  2911. console.warn(
  2912. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  2913. 'Use the filter functionality in the vue-devtools'
  2914. );
  2915. }
  2916. };
  2917. Store.prototype.dispatch = function dispatch (_type, _payload) {
  2918. var this$1 = this;
  2919. // check object-style dispatch
  2920. var ref = unifyObjectStyle(_type, _payload);
  2921. var type = ref.type;
  2922. var payload = ref.payload;
  2923. var action = { type: type, payload: payload };
  2924. var entry = this._actions[type];
  2925. if (!entry) {
  2926. if ((true)) {
  2927. console.error(("[vuex] unknown action type: " + type));
  2928. }
  2929. return
  2930. }
  2931. try {
  2932. this._actionSubscribers
  2933. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  2934. .filter(function (sub) { return sub.before; })
  2935. .forEach(function (sub) { return sub.before(action, this$1.state); });
  2936. } catch (e) {
  2937. if ((true)) {
  2938. console.warn("[vuex] error in before action subscribers: ");
  2939. console.error(e);
  2940. }
  2941. }
  2942. var result = entry.length > 1
  2943. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  2944. : entry[0](payload);
  2945. return new Promise(function (resolve, reject) {
  2946. result.then(function (res) {
  2947. try {
  2948. this$1._actionSubscribers
  2949. .filter(function (sub) { return sub.after; })
  2950. .forEach(function (sub) { return sub.after(action, this$1.state); });
  2951. } catch (e) {
  2952. if ((true)) {
  2953. console.warn("[vuex] error in after action subscribers: ");
  2954. console.error(e);
  2955. }
  2956. }
  2957. resolve(res);
  2958. }, function (error) {
  2959. try {
  2960. this$1._actionSubscribers
  2961. .filter(function (sub) { return sub.error; })
  2962. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  2963. } catch (e) {
  2964. if ((true)) {
  2965. console.warn("[vuex] error in error action subscribers: ");
  2966. console.error(e);
  2967. }
  2968. }
  2969. reject(error);
  2970. });
  2971. })
  2972. };
  2973. Store.prototype.subscribe = function subscribe (fn, options) {
  2974. return genericSubscribe(fn, this._subscribers, options)
  2975. };
  2976. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  2977. var subs = typeof fn === 'function' ? { before: fn } : fn;
  2978. return genericSubscribe(subs, this._actionSubscribers, options)
  2979. };
  2980. Store.prototype.watch = function watch (getter, cb, options) {
  2981. var this$1 = this;
  2982. if ((true)) {
  2983. assert(typeof getter === 'function', "store.watch only accepts a function.");
  2984. }
  2985. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  2986. };
  2987. Store.prototype.replaceState = function replaceState (state) {
  2988. var this$1 = this;
  2989. this._withCommit(function () {
  2990. this$1._vm._data.$$state = state;
  2991. });
  2992. };
  2993. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  2994. if ( options === void 0 ) options = {};
  2995. if (typeof path === 'string') { path = [path]; }
  2996. if ((true)) {
  2997. assert(Array.isArray(path), "module path must be a string or an Array.");
  2998. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  2999. }
  3000. this._modules.register(path, rawModule);
  3001. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  3002. // reset store to update getters...
  3003. resetStoreVM(this, this.state);
  3004. };
  3005. Store.prototype.unregisterModule = function unregisterModule (path) {
  3006. var this$1 = this;
  3007. if (typeof path === 'string') { path = [path]; }
  3008. if ((true)) {
  3009. assert(Array.isArray(path), "module path must be a string or an Array.");
  3010. }
  3011. this._modules.unregister(path);
  3012. this._withCommit(function () {
  3013. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  3014. Vue.delete(parentState, path[path.length - 1]);
  3015. });
  3016. resetStore(this);
  3017. };
  3018. Store.prototype.hasModule = function hasModule (path) {
  3019. if (typeof path === 'string') { path = [path]; }
  3020. if ((true)) {
  3021. assert(Array.isArray(path), "module path must be a string or an Array.");
  3022. }
  3023. return this._modules.isRegistered(path)
  3024. };
  3025. Store.prototype.hotUpdate = function hotUpdate (newOptions) {
  3026. this._modules.update(newOptions);
  3027. resetStore(this, true);
  3028. };
  3029. Store.prototype._withCommit = function _withCommit (fn) {
  3030. var committing = this._committing;
  3031. this._committing = true;
  3032. fn();
  3033. this._committing = committing;
  3034. };
  3035. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  3036. function genericSubscribe (fn, subs, options) {
  3037. if (subs.indexOf(fn) < 0) {
  3038. options && options.prepend
  3039. ? subs.unshift(fn)
  3040. : subs.push(fn);
  3041. }
  3042. return function () {
  3043. var i = subs.indexOf(fn);
  3044. if (i > -1) {
  3045. subs.splice(i, 1);
  3046. }
  3047. }
  3048. }
  3049. function resetStore (store, hot) {
  3050. store._actions = Object.create(null);
  3051. store._mutations = Object.create(null);
  3052. store._wrappedGetters = Object.create(null);
  3053. store._modulesNamespaceMap = Object.create(null);
  3054. var state = store.state;
  3055. // init all modules
  3056. installModule(store, state, [], store._modules.root, true);
  3057. // reset vm
  3058. resetStoreVM(store, state, hot);
  3059. }
  3060. function resetStoreVM (store, state, hot) {
  3061. var oldVm = store._vm;
  3062. // bind store public getters
  3063. store.getters = {};
  3064. // reset local getters cache
  3065. store._makeLocalGettersCache = Object.create(null);
  3066. var wrappedGetters = store._wrappedGetters;
  3067. var computed = {};
  3068. forEachValue(wrappedGetters, function (fn, key) {
  3069. // use computed to leverage its lazy-caching mechanism
  3070. // direct inline function use will lead to closure preserving oldVm.
  3071. // using partial to return function with only arguments preserved in closure environment.
  3072. computed[key] = partial(fn, store);
  3073. Object.defineProperty(store.getters, key, {
  3074. get: function () { return store._vm[key]; },
  3075. enumerable: true // for local getters
  3076. });
  3077. });
  3078. // use a Vue instance to store the state tree
  3079. // suppress warnings just in case the user has added
  3080. // some funky global mixins
  3081. var silent = Vue.config.silent;
  3082. Vue.config.silent = true;
  3083. store._vm = new Vue({
  3084. data: {
  3085. $$state: state
  3086. },
  3087. computed: computed
  3088. });
  3089. Vue.config.silent = silent;
  3090. // enable strict mode for new vm
  3091. if (store.strict) {
  3092. enableStrictMode(store);
  3093. }
  3094. if (oldVm) {
  3095. if (hot) {
  3096. // dispatch changes in all subscribed watchers
  3097. // to force getter re-evaluation for hot reloading.
  3098. store._withCommit(function () {
  3099. oldVm._data.$$state = null;
  3100. });
  3101. }
  3102. Vue.nextTick(function () { return oldVm.$destroy(); });
  3103. }
  3104. }
  3105. function installModule (store, rootState, path, module, hot) {
  3106. var isRoot = !path.length;
  3107. var namespace = store._modules.getNamespace(path);
  3108. // register in namespace map
  3109. if (module.namespaced) {
  3110. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  3111. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  3112. }
  3113. store._modulesNamespaceMap[namespace] = module;
  3114. }
  3115. // set state
  3116. if (!isRoot && !hot) {
  3117. var parentState = getNestedState(rootState, path.slice(0, -1));
  3118. var moduleName = path[path.length - 1];
  3119. store._withCommit(function () {
  3120. if ((true)) {
  3121. if (moduleName in parentState) {
  3122. console.warn(
  3123. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  3124. );
  3125. }
  3126. }
  3127. Vue.set(parentState, moduleName, module.state);
  3128. });
  3129. }
  3130. var local = module.context = makeLocalContext(store, namespace, path);
  3131. module.forEachMutation(function (mutation, key) {
  3132. var namespacedType = namespace + key;
  3133. registerMutation(store, namespacedType, mutation, local);
  3134. });
  3135. module.forEachAction(function (action, key) {
  3136. var type = action.root ? key : namespace + key;
  3137. var handler = action.handler || action;
  3138. registerAction(store, type, handler, local);
  3139. });
  3140. module.forEachGetter(function (getter, key) {
  3141. var namespacedType = namespace + key;
  3142. registerGetter(store, namespacedType, getter, local);
  3143. });
  3144. module.forEachChild(function (child, key) {
  3145. installModule(store, rootState, path.concat(key), child, hot);
  3146. });
  3147. }
  3148. /**
  3149. * make localized dispatch, commit, getters and state
  3150. * if there is no namespace, just use root ones
  3151. */
  3152. function makeLocalContext (store, namespace, path) {
  3153. var noNamespace = namespace === '';
  3154. var local = {
  3155. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  3156. var args = unifyObjectStyle(_type, _payload, _options);
  3157. var payload = args.payload;
  3158. var options = args.options;
  3159. var type = args.type;
  3160. if (!options || !options.root) {
  3161. type = namespace + type;
  3162. if (( true) && !store._actions[type]) {
  3163. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  3164. return
  3165. }
  3166. }
  3167. return store.dispatch(type, payload)
  3168. },
  3169. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  3170. var args = unifyObjectStyle(_type, _payload, _options);
  3171. var payload = args.payload;
  3172. var options = args.options;
  3173. var type = args.type;
  3174. if (!options || !options.root) {
  3175. type = namespace + type;
  3176. if (( true) && !store._mutations[type]) {
  3177. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  3178. return
  3179. }
  3180. }
  3181. store.commit(type, payload, options);
  3182. }
  3183. };
  3184. // getters and state object must be gotten lazily
  3185. // because they will be changed by vm update
  3186. Object.defineProperties(local, {
  3187. getters: {
  3188. get: noNamespace
  3189. ? function () { return store.getters; }
  3190. : function () { return makeLocalGetters(store, namespace); }
  3191. },
  3192. state: {
  3193. get: function () { return getNestedState(store.state, path); }
  3194. }
  3195. });
  3196. return local
  3197. }
  3198. function makeLocalGetters (store, namespace) {
  3199. if (!store._makeLocalGettersCache[namespace]) {
  3200. var gettersProxy = {};
  3201. var splitPos = namespace.length;
  3202. Object.keys(store.getters).forEach(function (type) {
  3203. // skip if the target getter is not match this namespace
  3204. if (type.slice(0, splitPos) !== namespace) { return }
  3205. // extract local getter type
  3206. var localType = type.slice(splitPos);
  3207. // Add a port to the getters proxy.
  3208. // Define as getter property because
  3209. // we do not want to evaluate the getters in this time.
  3210. Object.defineProperty(gettersProxy, localType, {
  3211. get: function () { return store.getters[type]; },
  3212. enumerable: true
  3213. });
  3214. });
  3215. store._makeLocalGettersCache[namespace] = gettersProxy;
  3216. }
  3217. return store._makeLocalGettersCache[namespace]
  3218. }
  3219. function registerMutation (store, type, handler, local) {
  3220. var entry = store._mutations[type] || (store._mutations[type] = []);
  3221. entry.push(function wrappedMutationHandler (payload) {
  3222. handler.call(store, local.state, payload);
  3223. });
  3224. }
  3225. function registerAction (store, type, handler, local) {
  3226. var entry = store._actions[type] || (store._actions[type] = []);
  3227. entry.push(function wrappedActionHandler (payload) {
  3228. var res = handler.call(store, {
  3229. dispatch: local.dispatch,
  3230. commit: local.commit,
  3231. getters: local.getters,
  3232. state: local.state,
  3233. rootGetters: store.getters,
  3234. rootState: store.state
  3235. }, payload);
  3236. if (!isPromise(res)) {
  3237. res = Promise.resolve(res);
  3238. }
  3239. if (store._devtoolHook) {
  3240. return res.catch(function (err) {
  3241. store._devtoolHook.emit('vuex:error', err);
  3242. throw err
  3243. })
  3244. } else {
  3245. return res
  3246. }
  3247. });
  3248. }
  3249. function registerGetter (store, type, rawGetter, local) {
  3250. if (store._wrappedGetters[type]) {
  3251. if ((true)) {
  3252. console.error(("[vuex] duplicate getter key: " + type));
  3253. }
  3254. return
  3255. }
  3256. store._wrappedGetters[type] = function wrappedGetter (store) {
  3257. return rawGetter(
  3258. local.state, // local state
  3259. local.getters, // local getters
  3260. store.state, // root state
  3261. store.getters // root getters
  3262. )
  3263. };
  3264. }
  3265. function enableStrictMode (store) {
  3266. store._vm.$watch(function () { return this._data.$$state }, function () {
  3267. if ((true)) {
  3268. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  3269. }
  3270. }, { deep: true, sync: true });
  3271. }
  3272. function getNestedState (state, path) {
  3273. return path.reduce(function (state, key) { return state[key]; }, state)
  3274. }
  3275. function unifyObjectStyle (type, payload, options) {
  3276. if (isObject(type) && type.type) {
  3277. options = payload;
  3278. payload = type;
  3279. type = type.type;
  3280. }
  3281. if ((true)) {
  3282. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  3283. }
  3284. return { type: type, payload: payload, options: options }
  3285. }
  3286. function install (_Vue) {
  3287. if (Vue && _Vue === Vue) {
  3288. if ((true)) {
  3289. console.error(
  3290. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  3291. );
  3292. }
  3293. return
  3294. }
  3295. Vue = _Vue;
  3296. applyMixin(Vue);
  3297. }
  3298. /**
  3299. * Reduce the code which written in Vue.js for getting the state.
  3300. * @param {String} [namespace] - Module's namespace
  3301. * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
  3302. * @param {Object}
  3303. */
  3304. var mapState = normalizeNamespace(function (namespace, states) {
  3305. var res = {};
  3306. if (( true) && !isValidMap(states)) {
  3307. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  3308. }
  3309. normalizeMap(states).forEach(function (ref) {
  3310. var key = ref.key;
  3311. var val = ref.val;
  3312. res[key] = function mappedState () {
  3313. var state = this.$store.state;
  3314. var getters = this.$store.getters;
  3315. if (namespace) {
  3316. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  3317. if (!module) {
  3318. return
  3319. }
  3320. state = module.context.state;
  3321. getters = module.context.getters;
  3322. }
  3323. return typeof val === 'function'
  3324. ? val.call(this, state, getters)
  3325. : state[val]
  3326. };
  3327. // mark vuex getter for devtools
  3328. res[key].vuex = true;
  3329. });
  3330. return res
  3331. });
  3332. /**
  3333. * Reduce the code which written in Vue.js for committing the mutation
  3334. * @param {String} [namespace] - Module's namespace
  3335. * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept anthor params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  3336. * @return {Object}
  3337. */
  3338. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  3339. var res = {};
  3340. if (( true) && !isValidMap(mutations)) {
  3341. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  3342. }
  3343. normalizeMap(mutations).forEach(function (ref) {
  3344. var key = ref.key;
  3345. var val = ref.val;
  3346. res[key] = function mappedMutation () {
  3347. var args = [], len = arguments.length;
  3348. while ( len-- ) args[ len ] = arguments[ len ];
  3349. // Get the commit method from store
  3350. var commit = this.$store.commit;
  3351. if (namespace) {
  3352. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  3353. if (!module) {
  3354. return
  3355. }
  3356. commit = module.context.commit;
  3357. }
  3358. return typeof val === 'function'
  3359. ? val.apply(this, [commit].concat(args))
  3360. : commit.apply(this.$store, [val].concat(args))
  3361. };
  3362. });
  3363. return res
  3364. });
  3365. /**
  3366. * Reduce the code which written in Vue.js for getting the getters
  3367. * @param {String} [namespace] - Module's namespace
  3368. * @param {Object|Array} getters
  3369. * @return {Object}
  3370. */
  3371. var mapGetters = normalizeNamespace(function (namespace, getters) {
  3372. var res = {};
  3373. if (( true) && !isValidMap(getters)) {
  3374. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  3375. }
  3376. normalizeMap(getters).forEach(function (ref) {
  3377. var key = ref.key;
  3378. var val = ref.val;
  3379. // The namespace has been mutated by normalizeNamespace
  3380. val = namespace + val;
  3381. res[key] = function mappedGetter () {
  3382. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  3383. return
  3384. }
  3385. if (( true) && !(val in this.$store.getters)) {
  3386. console.error(("[vuex] unknown getter: " + val));
  3387. return
  3388. }
  3389. return this.$store.getters[val]
  3390. };
  3391. // mark vuex getter for devtools
  3392. res[key].vuex = true;
  3393. });
  3394. return res
  3395. });
  3396. /**
  3397. * Reduce the code which written in Vue.js for dispatch the action
  3398. * @param {String} [namespace] - Module's namespace
  3399. * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  3400. * @return {Object}
  3401. */
  3402. var mapActions = normalizeNamespace(function (namespace, actions) {
  3403. var res = {};
  3404. if (( true) && !isValidMap(actions)) {
  3405. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  3406. }
  3407. normalizeMap(actions).forEach(function (ref) {
  3408. var key = ref.key;
  3409. var val = ref.val;
  3410. res[key] = function mappedAction () {
  3411. var args = [], len = arguments.length;
  3412. while ( len-- ) args[ len ] = arguments[ len ];
  3413. // get dispatch function from store
  3414. var dispatch = this.$store.dispatch;
  3415. if (namespace) {
  3416. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  3417. if (!module) {
  3418. return
  3419. }
  3420. dispatch = module.context.dispatch;
  3421. }
  3422. return typeof val === 'function'
  3423. ? val.apply(this, [dispatch].concat(args))
  3424. : dispatch.apply(this.$store, [val].concat(args))
  3425. };
  3426. });
  3427. return res
  3428. });
  3429. /**
  3430. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  3431. * @param {String} namespace
  3432. * @return {Object}
  3433. */
  3434. var createNamespacedHelpers = function (namespace) { return ({
  3435. mapState: mapState.bind(null, namespace),
  3436. mapGetters: mapGetters.bind(null, namespace),
  3437. mapMutations: mapMutations.bind(null, namespace),
  3438. mapActions: mapActions.bind(null, namespace)
  3439. }); };
  3440. /**
  3441. * Normalize the map
  3442. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  3443. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  3444. * @param {Array|Object} map
  3445. * @return {Object}
  3446. */
  3447. function normalizeMap (map) {
  3448. if (!isValidMap(map)) {
  3449. return []
  3450. }
  3451. return Array.isArray(map)
  3452. ? map.map(function (key) { return ({ key: key, val: key }); })
  3453. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  3454. }
  3455. /**
  3456. * Validate whether given map is valid or not
  3457. * @param {*} map
  3458. * @return {Boolean}
  3459. */
  3460. function isValidMap (map) {
  3461. return Array.isArray(map) || isObject(map)
  3462. }
  3463. /**
  3464. * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
  3465. * @param {Function} fn
  3466. * @return {Function}
  3467. */
  3468. function normalizeNamespace (fn) {
  3469. return function (namespace, map) {
  3470. if (typeof namespace !== 'string') {
  3471. map = namespace;
  3472. namespace = '';
  3473. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  3474. namespace += '/';
  3475. }
  3476. return fn(namespace, map)
  3477. }
  3478. }
  3479. /**
  3480. * Search a special module from store by namespace. if module not exist, print error message.
  3481. * @param {Object} store
  3482. * @param {String} helper
  3483. * @param {String} namespace
  3484. * @return {Object}
  3485. */
  3486. function getModuleByNamespace (store, helper, namespace) {
  3487. var module = store._modulesNamespaceMap[namespace];
  3488. if (( true) && !module) {
  3489. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  3490. }
  3491. return module
  3492. }
  3493. var index = {
  3494. Store: Store,
  3495. install: install,
  3496. version: '3.4.0',
  3497. mapState: mapState,
  3498. mapMutations: mapMutations,
  3499. mapGetters: mapGetters,
  3500. mapActions: mapActions,
  3501. createNamespacedHelpers: createNamespacedHelpers
  3502. };
  3503. /* harmony default export */ __webpack_exports__["default"] = (index);
  3504. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 3)))
  3505. /***/ }),
  3506. /***/ 169:
  3507. /*!**************************************************************!*\
  3508. !*** D:/wwwroot/cqcarbonwxapp/components/uni-popup/popup.js ***!
  3509. \**************************************************************/
  3510. /*! no static exports found */
  3511. /***/ (function(module, exports, __webpack_require__) {
  3512. "use strict";
  3513. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _message = _interopRequireDefault(__webpack_require__(/*! ./message.js */ 170));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  3514. // 定义 type 类型:弹出类型:top/bottom/center
  3515. var config = {
  3516. // 顶部弹出
  3517. top: 'top',
  3518. // 底部弹出
  3519. bottom: 'bottom',
  3520. // 居中弹出
  3521. center: 'center',
  3522. // 消息提示
  3523. message: 'top',
  3524. // 对话框
  3525. dialog: 'center',
  3526. // 分享
  3527. share: 'bottom' };var _default =
  3528. {
  3529. data: function data() {
  3530. return {
  3531. config: config };
  3532. },
  3533. mixins: [_message.default] };exports.default = _default;
  3534. /***/ }),
  3535. /***/ 17:
  3536. /*!**************************************************************************!*\
  3537. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/index.js ***!
  3538. \**************************************************************************/
  3539. /*! no static exports found */
  3540. /***/ (function(module, exports, __webpack_require__) {
  3541. "use strict";
  3542. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _Request = _interopRequireDefault(__webpack_require__(/*! ./core/Request */ 18));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}var _default =
  3543. _Request.default;exports.default = _default;
  3544. /***/ }),
  3545. /***/ 170:
  3546. /*!****************************************************************!*\
  3547. !*** D:/wwwroot/cqcarbonwxapp/components/uni-popup/message.js ***!
  3548. \****************************************************************/
  3549. /*! no static exports found */
  3550. /***/ (function(module, exports, __webpack_require__) {
  3551. "use strict";
  3552. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  3553. created: function created() {
  3554. if (this.type === 'message') {
  3555. // 不显示遮罩
  3556. this.maskShow = false;
  3557. // 获取子组件对象
  3558. this.childrenMsg = null;
  3559. }
  3560. },
  3561. methods: {
  3562. customOpen: function customOpen() {
  3563. if (this.childrenMsg) {
  3564. this.childrenMsg.open();
  3565. }
  3566. },
  3567. customClose: function customClose() {
  3568. if (this.childrenMsg) {
  3569. this.childrenMsg.close();
  3570. }
  3571. } } };exports.default = _default;
  3572. /***/ }),
  3573. /***/ 18:
  3574. /*!*********************************************************************************!*\
  3575. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/core/Request.js ***!
  3576. \*********************************************************************************/
  3577. /*! no static exports found */
  3578. /***/ (function(module, exports, __webpack_require__) {
  3579. "use strict";
  3580. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  3581. var _dispatchRequest = _interopRequireDefault(__webpack_require__(/*! ./dispatchRequest */ 19));
  3582. var _InterceptorManager = _interopRequireDefault(__webpack_require__(/*! ./InterceptorManager */ 27));
  3583. var _mergeConfig = _interopRequireDefault(__webpack_require__(/*! ./mergeConfig */ 28));
  3584. var _defaults = _interopRequireDefault(__webpack_require__(/*! ./defaults */ 29));
  3585. var _utils = __webpack_require__(/*! ../utils */ 22);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
  3586. Request = /*#__PURE__*/function () {
  3587. /**
  3588. * @param {Object} arg - 全局配置
  3589. * @param {String} arg.baseURL - 全局根路径
  3590. * @param {Object} arg.header - 全局header
  3591. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  3592. * @param {String} arg.dataType = [json] - 全局默认的dataType
  3593. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。App和支付宝小程序不支持
  3594. * @param {Object} arg.custom - 全局默认的自定义参数
  3595. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认30000。仅微信小程序(2.10.0)、支付宝小程序支持
  3596. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  3597. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  3598. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  3599. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  3600. */
  3601. function Request() {var arg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};_classCallCheck(this, Request);
  3602. if (!(0, _utils.isPlainObject)(arg)) {
  3603. arg = {};
  3604. console.warn('设置全局参数必须接收一个Object');
  3605. }
  3606. this.config = _objectSpread(_objectSpread({}, _defaults.default), arg);
  3607. this.interceptors = {
  3608. request: new _InterceptorManager.default(),
  3609. response: new _InterceptorManager.default() };
  3610. }
  3611. /**
  3612. * @Function
  3613. * @param {Request~setConfigCallback} f - 设置全局默认配置
  3614. */_createClass(Request, [{ key: "setConfig", value: function setConfig(
  3615. f) {
  3616. this.config = f(this.config);
  3617. } }, { key: "middleware", value: function middleware(
  3618. config) {
  3619. config = (0, _mergeConfig.default)(this.config, config);
  3620. var chain = [_dispatchRequest.default, undefined];
  3621. var promise = Promise.resolve(config);
  3622. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  3623. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  3624. });
  3625. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  3626. chain.push(interceptor.fulfilled, interceptor.rejected);
  3627. });
  3628. while (chain.length) {
  3629. promise = promise.then(chain.shift(), chain.shift());
  3630. }
  3631. return promise;
  3632. }
  3633. /**
  3634. * @Function
  3635. * @param {Object} config - 请求配置项
  3636. * @prop {String} options.url - 请求路径
  3637. * @prop {Object} options.data - 请求参数
  3638. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  3639. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  3640. * @prop {Object} [options.header = config.header] - 请求header
  3641. * @prop {Object} [options.method = config.method] - 请求方法
  3642. * @returns {Promise<unknown>}
  3643. */ }, { key: "request", value: function request()
  3644. {var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  3645. return this.middleware(config);
  3646. } }, { key: "get", value: function get(
  3647. url) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3648. return this.middleware(_objectSpread({
  3649. url: url,
  3650. method: 'GET' },
  3651. options));
  3652. } }, { key: "post", value: function post(
  3653. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3654. return this.middleware(_objectSpread({
  3655. url: url,
  3656. data: data,
  3657. method: 'POST' },
  3658. options));
  3659. } }, { key: "put", value: function put(
  3660. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3661. return this.middleware(_objectSpread({
  3662. url: url,
  3663. data: data,
  3664. method: 'PUT' },
  3665. options));
  3666. } }, { key: "delete", value: function _delete(
  3667. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3668. return this.middleware(_objectSpread({
  3669. url: url,
  3670. data: data,
  3671. method: 'DELETE' },
  3672. options));
  3673. } }, { key: "connect", value: function connect(
  3674. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3675. return this.middleware(_objectSpread({
  3676. url: url,
  3677. data: data,
  3678. method: 'CONNECT' },
  3679. options));
  3680. } }, { key: "head", value: function head(
  3681. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3682. return this.middleware(_objectSpread({
  3683. url: url,
  3684. data: data,
  3685. method: 'HEAD' },
  3686. options));
  3687. } }, { key: "options", value: function options(
  3688. url, data) {var _options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3689. return this.middleware(_objectSpread({
  3690. url: url,
  3691. data: data,
  3692. method: 'OPTIONS' },
  3693. _options));
  3694. } }, { key: "trace", value: function trace(
  3695. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  3696. return this.middleware(_objectSpread({
  3697. url: url,
  3698. data: data,
  3699. method: 'TRACE' },
  3700. options));
  3701. } }, { key: "upload", value: function upload(
  3702. url) {var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3703. config.url = url;
  3704. config.method = 'UPLOAD';
  3705. return this.middleware(config);
  3706. } }, { key: "download", value: function download(
  3707. url) {var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3708. config.url = url;
  3709. config.method = 'DOWNLOAD';
  3710. return this.middleware(config);
  3711. } }]);return Request;}();
  3712. /**
  3713. * setConfig回调
  3714. * @return {Object} - 返回操作后的config
  3715. * @callback Request~setConfigCallback
  3716. * @param {Object} config - 全局默认config
  3717. */exports.default = Request;
  3718. /***/ }),
  3719. /***/ 185:
  3720. /*!************************************************************************!*\
  3721. !*** D:/wwwroot/cqcarbonwxapp/components/mescroll-uni/mescroll-uni.js ***!
  3722. \************************************************************************/
  3723. /*! no static exports found */
  3724. /***/ (function(module, exports, __webpack_require__) {
  3725. "use strict";
  3726. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = MeScroll; /* mescroll
  3727. * version 1.3.3
  3728. * 2020-09-15 wenju
  3729. * https://www.mescroll.com
  3730. */
  3731. function MeScroll(options, isScrollBody) {
  3732. var me = this;
  3733. me.version = '1.3.3'; // mescroll版本号
  3734. me.options = options || {}; // 配置
  3735. me.isScrollBody = isScrollBody || false; // 滚动区域是否为原生页面滚动; 默认为scroll-view
  3736. me.isDownScrolling = false; // 是否在执行下拉刷新的回调
  3737. me.isUpScrolling = false; // 是否在执行上拉加载的回调
  3738. var hasDownCallback = me.options.down && me.options.down.callback; // 是否配置了down的callback
  3739. // 初始化下拉刷新
  3740. me.initDownScroll();
  3741. // 初始化上拉加载,则初始化
  3742. me.initUpScroll();
  3743. // 自动加载
  3744. setTimeout(function () {// 待主线程执行完毕再执行,避免new MeScroll未初始化,在回调获取不到mescroll的实例
  3745. // 自动触发下拉刷新 (只有配置了down的callback才自动触发下拉刷新)
  3746. if ((me.optDown.use || me.optDown.native) && me.optDown.auto && hasDownCallback) {
  3747. if (me.optDown.autoShowLoading) {
  3748. me.triggerDownScroll(); // 显示下拉进度,执行下拉回调
  3749. } else {
  3750. me.optDown.callback && me.optDown.callback(me); // 不显示下拉进度,直接执行下拉回调
  3751. }
  3752. }
  3753. // 自动触发上拉加载
  3754. if (!me.isUpAutoLoad) {// 部分小程序(头条小程序)emit是异步, 会导致isUpAutoLoad判断有误, 先延时确保先执行down的callback,再执行up的callback
  3755. setTimeout(function () {
  3756. me.optUp.use && me.optUp.auto && !me.isUpAutoLoad && me.triggerUpScroll();
  3757. }, 100);
  3758. }
  3759. }, 30); // 需让me.optDown.inited和me.optUp.inited先执行
  3760. }
  3761. /* 配置参数:下拉刷新 */
  3762. MeScroll.prototype.extendDownScroll = function (optDown) {
  3763. // 下拉刷新的配置
  3764. MeScroll.extend(optDown, {
  3765. use: true, // 是否启用下拉刷新; 默认true
  3766. auto: true, // 是否在初始化完毕之后自动执行下拉刷新的回调; 默认true
  3767. native: false, // 是否使用系统自带的下拉刷新; 默认false; 仅mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  3768. autoShowLoading: false, // 如果设置auto=true(在初始化完毕之后自动执行下拉刷新的回调),那么是否显示下拉刷新的进度; 默认false
  3769. isLock: false, // 是否锁定下拉刷新,默认false;
  3770. offset: 80, // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  3771. startTop: 100, // scroll-view快速滚动到顶部时,此时的scroll-top可能大于0, 此值用于控制最大的误差
  3772. inOffsetRate: 1, // 在列表顶部,下拉的距离小于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  3773. outOffsetRate: 0.2, // 在列表顶部,下拉的距离大于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  3774. bottomOffset: 20, // 当手指touchmove位置在距离body底部20px范围内的时候结束上拉刷新,避免Webview嵌套导致touchend事件不执行
  3775. minAngle: 45, // 向下滑动最少偏移的角度,取值区间 [0,90];默认45度,即向下滑动的角度大于45度则触发下拉;而小于45度,将不触发下拉,避免与左右滑动的轮播等组件冲突;
  3776. textInOffset: '下拉刷新', // 下拉的距离在offset范围内的提示文本
  3777. textOutOffset: '释放更新', // 下拉的距离大于offset范围的提示文本
  3778. textLoading: '加载中 ...', // 加载中的提示文本
  3779. textSuccess: '加载成功', // 加载成功的文本
  3780. textErr: '加载失败', // 加载失败的文本
  3781. beforeEndDelay: 100, // 延时结束的时长 (显示加载成功/失败的时长)
  3782. bgColor: "transparent", // 背景颜色 (建议在pages.json中再设置一下backgroundColorTop)
  3783. textColor: "gray", // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  3784. inited: null, // 下拉刷新初始化完毕的回调
  3785. inOffset: null, // 下拉的距离进入offset范围内那一刻的回调
  3786. outOffset: null, // 下拉的距离大于offset那一刻的回调
  3787. onMoving: null, // 下拉过程中的回调,滑动过程一直在执行; rate下拉区域当前高度与指定距离的比值(inOffset: rate<1; outOffset: rate>=1); downHight当前下拉区域的高度
  3788. beforeLoading: null, // 准备触发下拉刷新的回调: 如果return true,将不触发showLoading和callback回调; 常用来完全自定义下拉刷新, 参考案例【淘宝 v6.8.0】
  3789. showLoading: null, // 显示下拉刷新进度的回调
  3790. afterLoading: null, // 显示下拉刷新进度的回调之后,马上要执行的代码 (如: 在wxs中使用)
  3791. beforeEndDownScroll: null, // 准备结束下拉的回调. 返回结束下拉的延时执行时间,默认0ms; 常用于结束下拉之前再显示另外一小段动画,才去隐藏下拉刷新的场景, 参考案例【dotJump】
  3792. endDownScroll: null, // 结束下拉刷新的回调
  3793. afterEndDownScroll: null, // 结束下拉刷新的回调,马上要执行的代码 (如: 在wxs中使用)
  3794. callback: function callback(mescroll) {
  3795. // 下拉刷新的回调;默认重置上拉加载列表为第一页
  3796. mescroll.resetUpScroll();
  3797. } });
  3798. };
  3799. /* 配置参数:上拉加载 */
  3800. MeScroll.prototype.extendUpScroll = function (optUp) {
  3801. // 上拉加载的配置
  3802. MeScroll.extend(optUp, {
  3803. use: true, // 是否启用上拉加载; 默认true
  3804. auto: true, // 是否在初始化完毕之后自动执行上拉加载的回调; 默认true
  3805. isLock: false, // 是否锁定上拉加载,默认false;
  3806. isBoth: true, // 上拉加载时,如果滑动到列表顶部是否可以同时触发下拉刷新;默认true,两者可同时触发;
  3807. callback: null, // 上拉加载的回调;function(page,mescroll){ }
  3808. page: {
  3809. num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  3810. size: 10, // 每页数据的数量
  3811. time: null // 加载第一页数据服务器返回的时间; 防止用户翻页时,后台新增了数据从而导致下一页数据重复;
  3812. },
  3813. noMoreSize: 5, // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
  3814. offset: 150, // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  3815. textLoading: '加载中 ...', // 加载中的提示文本
  3816. textNoMore: '-- END --', // 没有更多数据的提示文本
  3817. bgColor: "transparent", // 背景颜色 (建议在pages.json中再设置一下backgroundColorBottom)
  3818. textColor: "gray", // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  3819. inited: null, // 初始化完毕的回调
  3820. showLoading: null, // 显示加载中的回调
  3821. showNoMore: null, // 显示无更多数据的回调
  3822. hideUpScroll: null, // 隐藏上拉加载的回调
  3823. errDistance: 60, // endErr的时候需往上滑动一段距离,使其往下滑动时再次触发onReachBottom,仅mescroll-body生效
  3824. toTop: {
  3825. // 回到顶部按钮,需配置src才显示
  3826. src: null, // 图片路径,默认null (绝对路径或网络图)
  3827. offset: 1000, // 列表滚动多少距离才显示回到顶部按钮,默认1000
  3828. duration: 300, // 回到顶部的动画时长,默认300ms (当值为0或300则使用系统自带回到顶部,更流畅; 其他值则通过step模拟,部分机型可能不够流畅,所以非特殊情况不建议修改此项)
  3829. btnClick: null, // 点击按钮的回调
  3830. onShow: null, // 是否显示的回调
  3831. zIndex: 9990, // fixed定位z-index值
  3832. left: null, // 到左边的距离, 默认null. 此项有值时,right不生效. (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  3833. right: 20, // 到右边的距离, 默认20 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  3834. bottom: 120, // 到底部的距离, 默认120 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  3835. safearea: false, // bottom的偏移量是否加上底部安全区的距离, 默认false, 需要适配iPhoneX时使用 (具体的界面如果不配置此项,则取本vue的safearea值)
  3836. width: 72, // 回到顶部图标的宽度, 默认72 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  3837. radius: "50%" // 圆角, 默认"50%" (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  3838. },
  3839. empty: {
  3840. use: true, // 是否显示空布局
  3841. icon: null, // 图标路径
  3842. tip: '~ 暂无相关数据 ~', // 提示
  3843. btnText: '', // 按钮
  3844. btnClick: null, // 点击按钮的回调
  3845. onShow: null, // 是否显示的回调
  3846. fixed: false, // 是否使用fixed定位,默认false; 配置fixed为true,以下的top和zIndex才生效 (transform会使fixed失效,最终会降级为absolute)
  3847. top: "100rpx", // fixed定位的top值 (完整的单位值,如 "10%"; "100rpx")
  3848. zIndex: 99 // fixed定位z-index值
  3849. },
  3850. onScroll: false // 是否监听滚动事件
  3851. });
  3852. };
  3853. /* 配置参数 */
  3854. MeScroll.extend = function (userOption, defaultOption) {
  3855. if (!userOption) return defaultOption;
  3856. for (var key in defaultOption) {
  3857. if (userOption[key] == null) {
  3858. var def = defaultOption[key];
  3859. if (def != null && typeof def === 'object') {
  3860. userOption[key] = MeScroll.extend({}, def); // 深度匹配
  3861. } else {
  3862. userOption[key] = def;
  3863. }
  3864. } else if (typeof userOption[key] === 'object') {
  3865. MeScroll.extend(userOption[key], defaultOption[key]); // 深度匹配
  3866. }
  3867. }
  3868. return userOption;
  3869. };
  3870. /* 简单判断是否配置了颜色 (非透明,非白色) */
  3871. MeScroll.prototype.hasColor = function (color) {
  3872. if (!color) return false;
  3873. var c = color.toLowerCase();
  3874. return c != "#fff" && c != "#ffffff" && c != "transparent" && c != "white";
  3875. };
  3876. /* -------初始化下拉刷新------- */
  3877. MeScroll.prototype.initDownScroll = function () {
  3878. var me = this;
  3879. // 配置参数
  3880. me.optDown = me.options.down || {};
  3881. if (!me.optDown.textColor && me.hasColor(me.optDown.bgColor)) me.optDown.textColor = "#fff"; // 当bgColor有值且textColor未设置,则textColor默认白色
  3882. me.extendDownScroll(me.optDown);
  3883. // 如果是mescroll-body且配置了native,则禁止自定义的下拉刷新
  3884. if (me.isScrollBody && me.optDown.native) {
  3885. me.optDown.use = false;
  3886. } else {
  3887. me.optDown.native = false; // 仅mescroll-body支持,mescroll-uni不支持
  3888. }
  3889. me.downHight = 0; // 下拉区域的高度
  3890. // 在页面中加入下拉布局
  3891. if (me.optDown.use && me.optDown.inited) {
  3892. // 初始化完毕的回调
  3893. setTimeout(function () {// 待主线程执行完毕再执行,避免new MeScroll未初始化,在回调获取不到mescroll的实例
  3894. me.optDown.inited(me);
  3895. }, 0);
  3896. }
  3897. };
  3898. /* 列表touchstart事件 */
  3899. MeScroll.prototype.touchstartEvent = function (e) {
  3900. if (!this.optDown.use) return;
  3901. this.startPoint = this.getPoint(e); // 记录起点
  3902. this.startTop = this.getScrollTop(); // 记录此时的滚动条位置
  3903. this.startAngle = 0; // 初始角度
  3904. this.lastPoint = this.startPoint; // 重置上次move的点
  3905. this.maxTouchmoveY = this.getBodyHeight() - this.optDown.bottomOffset; // 手指触摸的最大范围(写在touchstart避免body获取高度为0的情况)
  3906. this.inTouchend = false; // 标记不是touchend
  3907. };
  3908. /* 列表touchmove事件 */
  3909. MeScroll.prototype.touchmoveEvent = function (e) {
  3910. if (!this.optDown.use) return;
  3911. var me = this;
  3912. var scrollTop = me.getScrollTop(); // 当前滚动条的距离
  3913. var curPoint = me.getPoint(e); // 当前点
  3914. var moveY = curPoint.y - me.startPoint.y; // 和起点比,移动的距离,大于0向下拉,小于0向上拉
  3915. // 向下拉 && 在顶部
  3916. // mescroll-body,直接判定在顶部即可
  3917. // scroll-view在滚动时不会触发touchmove,当触顶/底/左/右时,才会触发touchmove
  3918. // scroll-view滚动到顶部时,scrollTop不一定为0,也有可能大于0; 在iOS的APP中scrollTop可能为负数,不一定和startTop相等
  3919. if (moveY > 0 && (
  3920. me.isScrollBody && scrollTop <= 0 ||
  3921. !me.isScrollBody && (scrollTop <= 0 || scrollTop <= me.optDown.startTop && scrollTop === me.startTop)))
  3922. {
  3923. // 可下拉的条件
  3924. if (!me.inTouchend && !me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || me.isUpScrolling &&
  3925. me.optUp.isBoth)) {
  3926. // 下拉的初始角度是否在配置的范围内
  3927. if (!me.startAngle) me.startAngle = me.getAngle(me.lastPoint, curPoint); // 两点之间的角度,区间 [0,90]
  3928. if (me.startAngle < me.optDown.minAngle) return; // 如果小于配置的角度,则不往下执行下拉刷新
  3929. // 如果手指的位置超过配置的距离,则提前结束下拉,避免Webview嵌套导致touchend无法触发
  3930. if (me.maxTouchmoveY > 0 && curPoint.y >= me.maxTouchmoveY) {
  3931. me.inTouchend = true; // 标记执行touchend
  3932. me.touchendEvent(); // 提前触发touchend
  3933. return;
  3934. }
  3935. me.preventDefault(e); // 阻止默认事件
  3936. var diff = curPoint.y - me.lastPoint.y; // 和上次比,移动的距离 (大于0向下,小于0向上)
  3937. // 下拉距离 < 指定距离
  3938. if (me.downHight < me.optDown.offset) {
  3939. if (me.movetype !== 1) {
  3940. me.movetype = 1; // 加入标记,保证只执行一次
  3941. me.isDownEndSuccess = null; // 重置是否加载成功的状态 (wxs执行的是wxs.wxs)
  3942. me.optDown.inOffset && me.optDown.inOffset(me); // 进入指定距离范围内那一刻的回调,只执行一次
  3943. me.isMoveDown = true; // 标记下拉区域高度改变,在touchend重置回来
  3944. }
  3945. me.downHight += diff * me.optDown.inOffsetRate; // 越往下,高度变化越小
  3946. // 指定距离 <= 下拉距离
  3947. } else {
  3948. if (me.movetype !== 2) {
  3949. me.movetype = 2; // 加入标记,保证只执行一次
  3950. me.optDown.outOffset && me.optDown.outOffset(me); // 下拉超过指定距离那一刻的回调,只执行一次
  3951. me.isMoveDown = true; // 标记下拉区域高度改变,在touchend重置回来
  3952. }
  3953. if (diff > 0) {// 向下拉
  3954. me.downHight += diff * me.optDown.outOffsetRate; // 越往下,高度变化越小
  3955. } else {// 向上收
  3956. me.downHight += diff; // 向上收回高度,则向上滑多少收多少高度
  3957. }
  3958. }
  3959. me.downHight = Math.round(me.downHight); // 取整
  3960. var rate = me.downHight / me.optDown.offset; // 下拉区域当前高度与指定距离的比值
  3961. me.optDown.onMoving && me.optDown.onMoving(me, rate, me.downHight); // 下拉过程中的回调,一直在执行
  3962. }
  3963. }
  3964. me.lastPoint = curPoint; // 记录本次移动的点
  3965. };
  3966. /* 列表touchend事件 */
  3967. MeScroll.prototype.touchendEvent = function (e) {
  3968. if (!this.optDown.use) return;
  3969. // 如果下拉区域高度已改变,则需重置回来
  3970. if (this.isMoveDown) {
  3971. if (this.downHight >= this.optDown.offset) {
  3972. // 符合触发刷新的条件
  3973. this.triggerDownScroll();
  3974. } else {
  3975. // 不符合的话 则重置
  3976. this.downHight = 0;
  3977. this.endDownScrollCall(this);
  3978. }
  3979. this.movetype = 0;
  3980. this.isMoveDown = false;
  3981. } else if (!this.isScrollBody && this.getScrollTop() === this.startTop) {// scroll-view到顶/左/右/底的滑动事件
  3982. var isScrollUp = this.getPoint(e).y - this.startPoint.y < 0; // 和起点比,移动的距离,大于0向下拉,小于0向上拉
  3983. // 上滑
  3984. if (isScrollUp) {
  3985. // 需检查滑动的角度
  3986. var angle = this.getAngle(this.getPoint(e), this.startPoint); // 两点之间的角度,区间 [0,90]
  3987. if (angle > 80) {
  3988. // 检查并触发上拉
  3989. this.triggerUpScroll(true);
  3990. }
  3991. }
  3992. }
  3993. };
  3994. /* 根据点击滑动事件获取第一个手指的坐标 */
  3995. MeScroll.prototype.getPoint = function (e) {
  3996. if (!e) {
  3997. return {
  3998. x: 0,
  3999. y: 0 };
  4000. }
  4001. if (e.touches && e.touches[0]) {
  4002. return {
  4003. x: e.touches[0].pageX,
  4004. y: e.touches[0].pageY };
  4005. } else if (e.changedTouches && e.changedTouches[0]) {
  4006. return {
  4007. x: e.changedTouches[0].pageX,
  4008. y: e.changedTouches[0].pageY };
  4009. } else {
  4010. return {
  4011. x: e.clientX,
  4012. y: e.clientY };
  4013. }
  4014. };
  4015. /* 计算两点之间的角度: 区间 [0,90]*/
  4016. MeScroll.prototype.getAngle = function (p1, p2) {
  4017. var x = Math.abs(p1.x - p2.x);
  4018. var y = Math.abs(p1.y - p2.y);
  4019. var z = Math.sqrt(x * x + y * y);
  4020. var angle = 0;
  4021. if (z !== 0) {
  4022. angle = Math.asin(y / z) / Math.PI * 180;
  4023. }
  4024. return angle;
  4025. };
  4026. /* 触发下拉刷新 */
  4027. MeScroll.prototype.triggerDownScroll = function () {
  4028. if (this.optDown.beforeLoading && this.optDown.beforeLoading(this)) {
  4029. //return true则处于完全自定义状态
  4030. } else {
  4031. this.showDownScroll(); // 下拉刷新中...
  4032. !this.optDown.native && this.optDown.callback && this.optDown.callback(this); // 执行回调,联网加载数据
  4033. }
  4034. };
  4035. /* 显示下拉进度布局 */
  4036. MeScroll.prototype.showDownScroll = function () {
  4037. this.isDownScrolling = true; // 标记下拉中
  4038. if (this.optDown.native) {
  4039. uni.startPullDownRefresh(); // 系统自带的下拉刷新
  4040. this.showDownLoadingCall(0); // 仍触发showLoading,因为上拉加载用到
  4041. } else {
  4042. this.downHight = this.optDown.offset; // 更新下拉区域高度
  4043. this.showDownLoadingCall(this.downHight); // 下拉刷新中...
  4044. }
  4045. };
  4046. MeScroll.prototype.showDownLoadingCall = function (downHight) {
  4047. this.optDown.showLoading && this.optDown.showLoading(this, downHight); // 下拉刷新中...
  4048. this.optDown.afterLoading && this.optDown.afterLoading(this, downHight); // 下拉刷新中...触发之后马上要执行的代码
  4049. };
  4050. /* 显示系统自带的下拉刷新时需要处理的业务 */
  4051. MeScroll.prototype.onPullDownRefresh = function () {
  4052. this.isDownScrolling = true; // 标记下拉中
  4053. this.showDownLoadingCall(0); // 仍触发showLoading,因为上拉加载用到
  4054. this.optDown.callback && this.optDown.callback(this); // 执行回调,联网加载数据
  4055. };
  4056. /* 结束下拉刷新 */
  4057. MeScroll.prototype.endDownScroll = function () {
  4058. if (this.optDown.native) {// 结束原生下拉刷新
  4059. this.isDownScrolling = false;
  4060. this.endDownScrollCall(this);
  4061. uni.stopPullDownRefresh();
  4062. return;
  4063. }
  4064. var me = this;
  4065. // 结束下拉刷新的方法
  4066. var endScroll = function endScroll() {
  4067. me.downHight = 0;
  4068. me.isDownScrolling = false;
  4069. me.endDownScrollCall(me);
  4070. if (!me.isScrollBody) {
  4071. me.setScrollHeight(0); // scroll-view重置滚动区域,使数据不满屏时仍可检查触发翻页
  4072. me.scrollTo(0, 0); // scroll-view需重置滚动条到顶部,避免startTop大于0时,对下拉刷新的影响
  4073. }
  4074. };
  4075. // 结束下拉刷新时的回调
  4076. var delay = 0;
  4077. if (me.optDown.beforeEndDownScroll) {
  4078. delay = me.optDown.beforeEndDownScroll(me); // 结束下拉刷新的延时,单位ms
  4079. if (me.isDownEndSuccess == null) delay = 0; // 没有执行加载中,则不延时
  4080. }
  4081. if (typeof delay === 'number' && delay > 0) {
  4082. setTimeout(endScroll, delay);
  4083. } else {
  4084. endScroll();
  4085. }
  4086. };
  4087. MeScroll.prototype.endDownScrollCall = function () {
  4088. this.optDown.endDownScroll && this.optDown.endDownScroll(this);
  4089. this.optDown.afterEndDownScroll && this.optDown.afterEndDownScroll(this);
  4090. };
  4091. /* 锁定下拉刷新:isLock=ture,null锁定;isLock=false解锁 */
  4092. MeScroll.prototype.lockDownScroll = function (isLock) {
  4093. if (isLock == null) isLock = true;
  4094. this.optDown.isLock = isLock;
  4095. };
  4096. /* 锁定上拉加载:isLock=ture,null锁定;isLock=false解锁 */
  4097. MeScroll.prototype.lockUpScroll = function (isLock) {
  4098. if (isLock == null) isLock = true;
  4099. this.optUp.isLock = isLock;
  4100. };
  4101. /* -------初始化上拉加载------- */
  4102. MeScroll.prototype.initUpScroll = function () {
  4103. var me = this;
  4104. // 配置参数
  4105. me.optUp = me.options.up || { use: false };
  4106. if (!me.optUp.textColor && me.hasColor(me.optUp.bgColor)) me.optUp.textColor = "#fff"; // 当bgColor有值且textColor未设置,则textColor默认白色
  4107. me.extendUpScroll(me.optUp);
  4108. if (me.optUp.use === false) return; // 配置不使用上拉加载时,则不初始化上拉布局
  4109. me.optUp.hasNext = true; // 如果使用上拉,则默认有下一页
  4110. me.startNum = me.optUp.page.num + 1; // 记录page开始的页码
  4111. // 初始化完毕的回调
  4112. if (me.optUp.inited) {
  4113. setTimeout(function () {// 待主线程执行完毕再执行,避免new MeScroll未初始化,在回调获取不到mescroll的实例
  4114. me.optUp.inited(me);
  4115. }, 0);
  4116. }
  4117. };
  4118. /*滚动到底部的事件 (仅mescroll-body生效)*/
  4119. MeScroll.prototype.onReachBottom = function () {
  4120. if (this.isScrollBody && !this.isUpScrolling) {// 只能支持下拉刷新的时候同时可以触发上拉加载,否则滚动到底部就需要上滑一点才能触发onReachBottom
  4121. if (!this.optUp.isLock && this.optUp.hasNext) {
  4122. this.triggerUpScroll();
  4123. }
  4124. }
  4125. };
  4126. /*列表滚动事件 (仅mescroll-body生效)*/
  4127. MeScroll.prototype.onPageScroll = function (e) {
  4128. if (!this.isScrollBody) return;
  4129. // 更新滚动条的位置 (主要用于判断下拉刷新时,滚动条是否在顶部)
  4130. this.setScrollTop(e.scrollTop);
  4131. // 顶部按钮的显示隐藏
  4132. if (e.scrollTop >= this.optUp.toTop.offset) {
  4133. this.showTopBtn();
  4134. } else {
  4135. this.hideTopBtn();
  4136. }
  4137. };
  4138. /*列表滚动事件*/
  4139. MeScroll.prototype.scroll = function (e, onScroll) {
  4140. // 更新滚动条的位置
  4141. this.setScrollTop(e.scrollTop);
  4142. // 更新滚动内容高度
  4143. this.setScrollHeight(e.scrollHeight);
  4144. // 向上滑还是向下滑动
  4145. if (this.preScrollY == null) this.preScrollY = 0;
  4146. this.isScrollUp = e.scrollTop - this.preScrollY > 0;
  4147. this.preScrollY = e.scrollTop;
  4148. // 上滑 && 检查并触发上拉
  4149. this.isScrollUp && this.triggerUpScroll(true);
  4150. // 顶部按钮的显示隐藏
  4151. if (e.scrollTop >= this.optUp.toTop.offset) {
  4152. this.showTopBtn();
  4153. } else {
  4154. this.hideTopBtn();
  4155. }
  4156. // 滑动监听
  4157. this.optUp.onScroll && onScroll && onScroll();
  4158. };
  4159. /* 触发上拉加载 */
  4160. MeScroll.prototype.triggerUpScroll = function (isCheck) {
  4161. if (!this.isUpScrolling && this.optUp.use && this.optUp.callback) {
  4162. // 是否校验在底部; 默认不校验
  4163. if (isCheck === true) {
  4164. var canUp = false;
  4165. // 还有下一页 && 没有锁定 && 不在下拉中
  4166. if (this.optUp.hasNext && !this.optUp.isLock && !this.isDownScrolling) {
  4167. if (this.getScrollBottom() <= this.optUp.offset) {// 到底部
  4168. canUp = true; // 标记可上拉
  4169. }
  4170. }
  4171. if (canUp === false) return;
  4172. }
  4173. this.showUpScroll(); // 上拉加载中...
  4174. this.optUp.page.num++; // 预先加一页,如果失败则减回
  4175. this.isUpAutoLoad = true; // 标记上拉已经自动执行过,避免初始化时多次触发上拉回调
  4176. this.num = this.optUp.page.num; // 把最新的页数赋值在mescroll上,避免对page的影响
  4177. this.size = this.optUp.page.size; // 把最新的页码赋值在mescroll上,避免对page的影响
  4178. this.time = this.optUp.page.time; // 把最新的页码赋值在mescroll上,避免对page的影响
  4179. this.optUp.callback(this); // 执行回调,联网加载数据
  4180. }
  4181. };
  4182. /* 显示上拉加载中 */
  4183. MeScroll.prototype.showUpScroll = function () {
  4184. this.isUpScrolling = true; // 标记上拉加载中
  4185. this.optUp.showLoading && this.optUp.showLoading(this); // 回调
  4186. };
  4187. /* 显示上拉无更多数据 */
  4188. MeScroll.prototype.showNoMore = function () {
  4189. this.optUp.hasNext = false; // 标记无更多数据
  4190. this.optUp.showNoMore && this.optUp.showNoMore(this); // 回调
  4191. };
  4192. /* 隐藏上拉区域**/
  4193. MeScroll.prototype.hideUpScroll = function () {
  4194. this.optUp.hideUpScroll && this.optUp.hideUpScroll(this); // 回调
  4195. };
  4196. /* 结束上拉加载 */
  4197. MeScroll.prototype.endUpScroll = function (isShowNoMore) {
  4198. if (isShowNoMore != null) {// isShowNoMore=null,不处理下拉状态,下拉刷新的时候调用
  4199. if (isShowNoMore) {
  4200. this.showNoMore(); // isShowNoMore=true,显示无更多数据
  4201. } else {
  4202. this.hideUpScroll(); // isShowNoMore=false,隐藏上拉加载
  4203. }
  4204. }
  4205. this.isUpScrolling = false; // 标记结束上拉加载
  4206. };
  4207. /* 重置上拉加载列表为第一页
  4208. *isShowLoading 是否显示进度布局;
  4209. * 1.默认null,不传参,则显示上拉加载的进度布局
  4210. * 2.传参true, 则显示下拉刷新的进度布局
  4211. * 3.传参false,则不显示上拉和下拉的进度 (常用于静默更新列表数据)
  4212. */
  4213. MeScroll.prototype.resetUpScroll = function (isShowLoading) {
  4214. if (this.optUp && this.optUp.use) {
  4215. var page = this.optUp.page;
  4216. this.prePageNum = page.num; // 缓存重置前的页码,加载失败可退回
  4217. this.prePageTime = page.time; // 缓存重置前的时间,加载失败可退回
  4218. page.num = this.startNum; // 重置为第一页
  4219. page.time = null; // 重置时间为空
  4220. if (!this.isDownScrolling && isShowLoading !== false) {// 如果不是下拉刷新触发的resetUpScroll并且不配置列表静默更新,则显示进度;
  4221. if (isShowLoading == null) {
  4222. this.removeEmpty(); // 移除空布局
  4223. this.showUpScroll(); // 不传参,默认显示上拉加载的进度布局
  4224. } else {
  4225. this.showDownScroll(); // 传true,显示下拉刷新的进度布局,不清空列表
  4226. }
  4227. }
  4228. this.isUpAutoLoad = true; // 标记上拉已经自动执行过,避免初始化时多次触发上拉回调
  4229. this.num = page.num; // 把最新的页数赋值在mescroll上,避免对page的影响
  4230. this.size = page.size; // 把最新的页码赋值在mescroll上,避免对page的影响
  4231. this.time = page.time; // 把最新的页码赋值在mescroll上,避免对page的影响
  4232. this.optUp.callback && this.optUp.callback(this); // 执行上拉回调
  4233. }
  4234. };
  4235. /* 设置page.num的值 */
  4236. MeScroll.prototype.setPageNum = function (num) {
  4237. this.optUp.page.num = num - 1;
  4238. };
  4239. /* 设置page.size的值 */
  4240. MeScroll.prototype.setPageSize = function (size) {
  4241. this.optUp.page.size = size;
  4242. };
  4243. /* 联网回调成功,结束下拉刷新和上拉加载
  4244. * dataSize: 当前页的数据量(必传)
  4245. * totalPage: 总页数(必传)
  4246. * systime: 服务器时间 (可空)
  4247. */
  4248. MeScroll.prototype.endByPage = function (dataSize, totalPage, systime) {
  4249. var hasNext;
  4250. if (this.optUp.use && totalPage != null) hasNext = this.optUp.page.num < totalPage; // 是否还有下一页
  4251. this.endSuccess(dataSize, hasNext, systime);
  4252. };
  4253. /* 联网回调成功,结束下拉刷新和上拉加载
  4254. * dataSize: 当前页的数据量(必传)
  4255. * totalSize: 列表所有数据总数量(必传)
  4256. * systime: 服务器时间 (可空)
  4257. */
  4258. MeScroll.prototype.endBySize = function (dataSize, totalSize, systime) {
  4259. var hasNext;
  4260. if (this.optUp.use && totalSize != null) {
  4261. var loadSize = (this.optUp.page.num - 1) * this.optUp.page.size + dataSize; // 已加载的数据总数
  4262. hasNext = loadSize < totalSize; // 是否还有下一页
  4263. }
  4264. this.endSuccess(dataSize, hasNext, systime);
  4265. };
  4266. /* 联网回调成功,结束下拉刷新和上拉加载
  4267. * dataSize: 当前页的数据个数(不是所有页的数据总和),用于上拉加载判断是否还有下一页.如果不传,则会判断还有下一页
  4268. * hasNext: 是否还有下一页,布尔类型;用来解决这个小问题:比如列表共有20条数据,每页加载10条,共2页.如果只根据dataSize判断,则需翻到第三页才会知道无更多数据,如果传了hasNext,则翻到第二页即可显示无更多数据.
  4269. * systime: 服务器时间(可空);用来解决这个小问题:当准备翻下一页时,数据库新增了几条记录,此时翻下一页,前面的几条数据会和上一页的重复;这里传入了systime,那么upCallback的page.time就会有值,把page.time传给服务器,让后台过滤新加入的那几条记录
  4270. */
  4271. MeScroll.prototype.endSuccess = function (dataSize, hasNext, systime) {
  4272. var me = this;
  4273. // 结束下拉刷新
  4274. if (me.isDownScrolling) {
  4275. me.isDownEndSuccess = true;
  4276. me.endDownScroll();
  4277. }
  4278. // 结束上拉加载
  4279. if (me.optUp.use) {
  4280. var isShowNoMore; // 是否已无更多数据
  4281. if (dataSize != null) {
  4282. var pageNum = me.optUp.page.num; // 当前页码
  4283. var pageSize = me.optUp.page.size; // 每页长度
  4284. // 如果是第一页
  4285. if (pageNum === 1) {
  4286. if (systime) me.optUp.page.time = systime; // 设置加载列表数据第一页的时间
  4287. }
  4288. if (dataSize < pageSize || hasNext === false) {
  4289. // 返回的数据不满一页时,则说明已无更多数据
  4290. me.optUp.hasNext = false;
  4291. if (dataSize === 0 && pageNum === 1) {
  4292. // 如果第一页无任何数据且配置了空布局
  4293. isShowNoMore = false;
  4294. me.showEmpty();
  4295. } else {
  4296. // 总列表数少于配置的数量,则不显示无更多数据
  4297. var allDataSize = (pageNum - 1) * pageSize + dataSize;
  4298. if (allDataSize < me.optUp.noMoreSize) {
  4299. isShowNoMore = false;
  4300. } else {
  4301. isShowNoMore = true;
  4302. }
  4303. me.removeEmpty(); // 移除空布局
  4304. }
  4305. } else {
  4306. // 还有下一页
  4307. isShowNoMore = false;
  4308. me.optUp.hasNext = true;
  4309. me.removeEmpty(); // 移除空布局
  4310. }
  4311. }
  4312. // 隐藏上拉
  4313. me.endUpScroll(isShowNoMore);
  4314. }
  4315. };
  4316. /* 回调失败,结束下拉刷新和上拉加载 */
  4317. MeScroll.prototype.endErr = function (errDistance) {
  4318. // 结束下拉,回调失败重置回原来的页码和时间
  4319. if (this.isDownScrolling) {
  4320. this.isDownEndSuccess = false;
  4321. var page = this.optUp.page;
  4322. if (page && this.prePageNum) {
  4323. page.num = this.prePageNum;
  4324. page.time = this.prePageTime;
  4325. }
  4326. this.endDownScroll();
  4327. }
  4328. // 结束上拉,回调失败重置回原来的页码
  4329. if (this.isUpScrolling) {
  4330. this.optUp.page.num--;
  4331. this.endUpScroll(false);
  4332. // 如果是mescroll-body,则需往回滚一定距离
  4333. if (this.isScrollBody && errDistance !== 0) {// 不处理0
  4334. if (!errDistance) errDistance = this.optUp.errDistance; // 不传,则取默认
  4335. this.scrollTo(this.getScrollTop() - errDistance, 0); // 往上回滚的距离
  4336. }
  4337. }
  4338. };
  4339. /* 显示空布局 */
  4340. MeScroll.prototype.showEmpty = function () {
  4341. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(true);
  4342. };
  4343. /* 移除空布局 */
  4344. MeScroll.prototype.removeEmpty = function () {
  4345. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(false);
  4346. };
  4347. /* 显示回到顶部的按钮 */
  4348. MeScroll.prototype.showTopBtn = function () {
  4349. if (!this.topBtnShow) {
  4350. this.topBtnShow = true;
  4351. this.optUp.toTop.onShow && this.optUp.toTop.onShow(true);
  4352. }
  4353. };
  4354. /* 隐藏回到顶部的按钮 */
  4355. MeScroll.prototype.hideTopBtn = function () {
  4356. if (this.topBtnShow) {
  4357. this.topBtnShow = false;
  4358. this.optUp.toTop.onShow && this.optUp.toTop.onShow(false);
  4359. }
  4360. };
  4361. /* 获取滚动条的位置 */
  4362. MeScroll.prototype.getScrollTop = function () {
  4363. return this.scrollTop || 0;
  4364. };
  4365. /* 记录滚动条的位置 */
  4366. MeScroll.prototype.setScrollTop = function (y) {
  4367. this.scrollTop = y;
  4368. };
  4369. /* 滚动到指定位置 */
  4370. MeScroll.prototype.scrollTo = function (y, t) {
  4371. this.myScrollTo && this.myScrollTo(y, t); // scrollview需自定义回到顶部方法
  4372. };
  4373. /* 自定义scrollTo */
  4374. MeScroll.prototype.resetScrollTo = function (myScrollTo) {
  4375. this.myScrollTo = myScrollTo;
  4376. };
  4377. /* 滚动条到底部的距离 */
  4378. MeScroll.prototype.getScrollBottom = function () {
  4379. return this.getScrollHeight() - this.getClientHeight() - this.getScrollTop();
  4380. };
  4381. /* 计步器
  4382. star: 开始值
  4383. end: 结束值
  4384. callback(step,timer): 回调step值,计步器timer,可自行通过window.clearInterval(timer)结束计步器;
  4385. t: 计步时长,传0则直接回调end值;不传则默认300ms
  4386. rate: 周期;不传则默认30ms计步一次
  4387. * */
  4388. MeScroll.prototype.getStep = function (star, end, callback, t, rate) {
  4389. var diff = end - star; // 差值
  4390. if (t === 0 || diff === 0) {
  4391. callback && callback(end);
  4392. return;
  4393. }
  4394. t = t || 300; // 时长 300ms
  4395. rate = rate || 30; // 周期 30ms
  4396. var count = t / rate; // 次数
  4397. var step = diff / count; // 步长
  4398. var i = 0; // 计数
  4399. var timer = setInterval(function () {
  4400. if (i < count - 1) {
  4401. star += step;
  4402. callback && callback(star, timer);
  4403. i++;
  4404. } else {
  4405. callback && callback(end, timer); // 最后一次直接设置end,避免计算误差
  4406. clearInterval(timer);
  4407. }
  4408. }, rate);
  4409. };
  4410. /* 滚动容器的高度 */
  4411. MeScroll.prototype.getClientHeight = function (isReal) {
  4412. var h = this.clientHeight || 0;
  4413. if (h === 0 && isReal !== true) {// 未获取到容器的高度,可临时取body的高度 (可能会有误差)
  4414. h = this.getBodyHeight();
  4415. }
  4416. return h;
  4417. };
  4418. MeScroll.prototype.setClientHeight = function (h) {
  4419. this.clientHeight = h;
  4420. };
  4421. /* 滚动内容的高度 */
  4422. MeScroll.prototype.getScrollHeight = function () {
  4423. return this.scrollHeight || 0;
  4424. };
  4425. MeScroll.prototype.setScrollHeight = function (h) {
  4426. this.scrollHeight = h;
  4427. };
  4428. /* body的高度 */
  4429. MeScroll.prototype.getBodyHeight = function () {
  4430. return this.bodyHeight || 0;
  4431. };
  4432. MeScroll.prototype.setBodyHeight = function (h) {
  4433. this.bodyHeight = h;
  4434. };
  4435. /* 阻止浏览器默认滚动事件 */
  4436. MeScroll.prototype.preventDefault = function (e) {
  4437. // 小程序不支持e.preventDefault, 已在wxs中禁止
  4438. // app的bounce只能通过配置pages.json的style.app-plus.bounce为"none"来禁止, 或使用renderjs禁止
  4439. // cancelable:是否可以被禁用; defaultPrevented:是否已经被禁用
  4440. if (e && e.cancelable && !e.defaultPrevented) e.preventDefault();
  4441. };
  4442. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  4443. /***/ }),
  4444. /***/ 186:
  4445. /*!*******************************************************************************!*\
  4446. !*** D:/wwwroot/cqcarbonwxapp/components/mescroll-uni/mescroll-uni-option.js ***!
  4447. \*******************************************************************************/
  4448. /*! no static exports found */
  4449. /***/ (function(module, exports, __webpack_require__) {
  4450. "use strict";
  4451. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 全局配置
  4452. // mescroll-body 和 mescroll-uni 通用
  4453. var GlobalOption = {
  4454. down: {
  4455. // 其他down的配置参数也可以写,这里只展示了常用的配置:
  4456. textInOffset: '下拉刷新', // 下拉的距离在offset范围内的提示文本
  4457. textOutOffset: '释放更新', // 下拉的距离大于offset范围的提示文本
  4458. textLoading: '加载中 ...', // 加载中的提示文本
  4459. textSuccess: '加载成功', // 加载成功的文本
  4460. textErr: '加载失败', // 加载失败的文本
  4461. beforeEndDelay: 100, // 延时结束的时长 (显示加载成功/失败的时长)
  4462. offset: 80, // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  4463. native: false // 是否使用系统自带的下拉刷新; 默认false; 仅在mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  4464. },
  4465. up: {
  4466. // 其他up的配置参数也可以写,这里只展示了常用的配置:
  4467. textLoading: '加载中 ...', // 加载中的提示文本
  4468. textNoMore: '-- END --', // 没有更多数据的提示文本
  4469. offset: 150, // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  4470. toTop: {
  4471. // 回到顶部按钮,需配置src才显示
  4472. src: "https://www.mescroll.com/img/mescroll-totop.png", // 图片路径 (建议放入static目录, 如 /static/img/mescroll-totop.png )
  4473. offset: 1000, // 列表滚动多少距离才显示回到顶部按钮,默认1000px
  4474. right: 20, // 到右边的距离, 默认20 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  4475. bottom: 120, // 到底部的距离, 默认120 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  4476. width: 72 // 回到顶部图标的宽度, 默认72 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  4477. },
  4478. empty: {
  4479. use: true, // 是否显示空布局
  4480. icon: "https://www.mescroll.com/img/mescroll-empty.png", // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
  4481. tip: '~ 空空如也 ~' // 提示
  4482. } } };var _default =
  4483. GlobalOption;exports.default = _default;
  4484. /***/ }),
  4485. /***/ 187:
  4486. /*!**********************************************************************!*\
  4487. !*** D:/wwwroot/cqcarbonwxapp/components/mescroll-uni/wxs/mixins.js ***!
  4488. \**********************************************************************/
  4489. /*! no static exports found */
  4490. /***/ (function(module, exports, __webpack_require__) {
  4491. "use strict";
  4492. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 定义在wxs (含renderjs) 逻辑层的数据和方法, 与视图层相互通信
  4493. var WxsMixin = {
  4494. data: function data() {
  4495. return {
  4496. // 传入wxs视图层的数据 (响应式)
  4497. wxsProp: {
  4498. optDown: {}, // 下拉刷新的配置
  4499. scrollTop: 0, // 滚动条的距离
  4500. bodyHeight: 0, // body的高度
  4501. isDownScrolling: false, // 是否正在下拉刷新中
  4502. isUpScrolling: false, // 是否正在上拉加载中
  4503. isScrollBody: true, // 是否为mescroll-body滚动
  4504. isUpBoth: true, // 上拉加载时,是否同时可以下拉刷新
  4505. t: 0 // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  4506. },
  4507. // 标记调用wxs视图层的方法
  4508. callProp: {
  4509. callType: '', // 方法名
  4510. t: 0 // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  4511. },
  4512. // 不用wxs的平台使用此处的wxsBiz对象,抹平wxs的写法 (微信小程序和APP使用的wxsBiz对象是./wxs/wxs.wxs)
  4513. // 不用renderjs的平台使用此处的renderBiz对象,抹平renderjs的写法 (app 和 h5 使用的renderBiz对象是./wxs/renderjs.js)
  4514. renderBiz: {
  4515. propObserver: function propObserver() {} // 抹平renderjs的写法
  4516. } };
  4517. },
  4518. methods: {
  4519. // wxs视图层调用逻辑层的回调
  4520. wxsCall: function wxsCall(msg) {
  4521. if (msg.type === 'setWxsProp') {
  4522. // 更新wxsProp数据 (值改变才触发更新)
  4523. this.wxsProp = {
  4524. optDown: this.mescroll.optDown,
  4525. scrollTop: this.mescroll.getScrollTop(),
  4526. bodyHeight: this.mescroll.getBodyHeight(),
  4527. isDownScrolling: this.mescroll.isDownScrolling,
  4528. isUpScrolling: this.mescroll.isUpScrolling,
  4529. isUpBoth: this.mescroll.optUp.isBoth,
  4530. isScrollBody: this.mescroll.isScrollBody,
  4531. t: Date.now() };
  4532. } else if (msg.type === 'setLoadType') {
  4533. // 设置inOffset,outOffset的状态
  4534. this.downLoadType = msg.downLoadType;
  4535. // 状态挂载到mescroll对象, 以便在其他组件中使用, 比如<me-video>中
  4536. this.$set(this.mescroll, 'downLoadType', this.downLoadType);
  4537. // 重置是否加载成功的状态
  4538. this.$set(this.mescroll, 'isDownEndSuccess', null);
  4539. } else if (msg.type === 'triggerDownScroll') {
  4540. // 主动触发下拉刷新
  4541. this.mescroll.triggerDownScroll();
  4542. } else if (msg.type === 'endDownScroll') {
  4543. // 结束下拉刷新
  4544. this.mescroll.endDownScroll();
  4545. } else if (msg.type === 'triggerUpScroll') {
  4546. // 主动触发上拉加载
  4547. this.mescroll.triggerUpScroll(true);
  4548. }
  4549. } },
  4550. mounted: function mounted() {var _this = this;
  4551. // 配置主动触发wxs显示加载进度的回调
  4552. this.mescroll.optDown.afterLoading = function () {
  4553. _this.callProp = { callType: "showLoading", t: Date.now() }; // 触发wxs的方法 (值改变才触发更新)
  4554. };
  4555. // 配置主动触发wxs隐藏加载进度的回调
  4556. this.mescroll.optDown.afterEndDownScroll = function () {
  4557. _this.callProp = { callType: "endDownScroll", t: Date.now() }; // 触发wxs的方法 (值改变才触发更新)
  4558. var delay = 300 + (_this.mescroll.optDown.beforeEndDelay || 0);
  4559. setTimeout(function () {
  4560. if (_this.downLoadType === 4 || _this.downLoadType === 0) {
  4561. _this.callProp = { callType: "clearTransform", t: Date.now() }; // 触发wxs的方法 (值改变才触发更新)
  4562. }
  4563. // 状态挂载到mescroll对象, 以便在其他组件中使用, 比如<me-video>中
  4564. _this.$set(_this.mescroll, 'downLoadType', _this.downLoadType);
  4565. }, delay);
  4566. };
  4567. // 初始化wxs的数据
  4568. this.wxsCall({ type: 'setWxsProp' });
  4569. } };var _default =
  4570. WxsMixin;exports.default = _default;
  4571. /***/ }),
  4572. /***/ 19:
  4573. /*!*****************************************************************************************!*\
  4574. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/core/dispatchRequest.js ***!
  4575. \*****************************************************************************************/
  4576. /*! no static exports found */
  4577. /***/ (function(module, exports, __webpack_require__) {
  4578. "use strict";
  4579. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _index = _interopRequireDefault(__webpack_require__(/*! ../adapters/index */ 20));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}var _default =
  4580. function _default(config) {
  4581. return (0, _index.default)(config);
  4582. };exports.default = _default;
  4583. /***/ }),
  4584. /***/ 2:
  4585. /*!******************************************************************************************!*\
  4586. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  4587. \******************************************************************************************/
  4588. /*! exports provided: default */
  4589. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4590. "use strict";
  4591. __webpack_require__.r(__webpack_exports__);
  4592. /* WEBPACK VAR INJECTION */(function(global) {/*!
  4593. * Vue.js v2.6.11
  4594. * (c) 2014-2020 Evan You
  4595. * Released under the MIT License.
  4596. */
  4597. /* */
  4598. var emptyObject = Object.freeze({});
  4599. // These helpers produce better VM code in JS engines due to their
  4600. // explicitness and function inlining.
  4601. function isUndef (v) {
  4602. return v === undefined || v === null
  4603. }
  4604. function isDef (v) {
  4605. return v !== undefined && v !== null
  4606. }
  4607. function isTrue (v) {
  4608. return v === true
  4609. }
  4610. function isFalse (v) {
  4611. return v === false
  4612. }
  4613. /**
  4614. * Check if value is primitive.
  4615. */
  4616. function isPrimitive (value) {
  4617. return (
  4618. typeof value === 'string' ||
  4619. typeof value === 'number' ||
  4620. // $flow-disable-line
  4621. typeof value === 'symbol' ||
  4622. typeof value === 'boolean'
  4623. )
  4624. }
  4625. /**
  4626. * Quick object check - this is primarily used to tell
  4627. * Objects from primitive values when we know the value
  4628. * is a JSON-compliant type.
  4629. */
  4630. function isObject (obj) {
  4631. return obj !== null && typeof obj === 'object'
  4632. }
  4633. /**
  4634. * Get the raw type string of a value, e.g., [object Object].
  4635. */
  4636. var _toString = Object.prototype.toString;
  4637. function toRawType (value) {
  4638. return _toString.call(value).slice(8, -1)
  4639. }
  4640. /**
  4641. * Strict object type check. Only returns true
  4642. * for plain JavaScript objects.
  4643. */
  4644. function isPlainObject (obj) {
  4645. return _toString.call(obj) === '[object Object]'
  4646. }
  4647. function isRegExp (v) {
  4648. return _toString.call(v) === '[object RegExp]'
  4649. }
  4650. /**
  4651. * Check if val is a valid array index.
  4652. */
  4653. function isValidArrayIndex (val) {
  4654. var n = parseFloat(String(val));
  4655. return n >= 0 && Math.floor(n) === n && isFinite(val)
  4656. }
  4657. function isPromise (val) {
  4658. return (
  4659. isDef(val) &&
  4660. typeof val.then === 'function' &&
  4661. typeof val.catch === 'function'
  4662. )
  4663. }
  4664. /**
  4665. * Convert a value to a string that is actually rendered.
  4666. */
  4667. function toString (val) {
  4668. return val == null
  4669. ? ''
  4670. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  4671. ? JSON.stringify(val, null, 2)
  4672. : String(val)
  4673. }
  4674. /**
  4675. * Convert an input value to a number for persistence.
  4676. * If the conversion fails, return original string.
  4677. */
  4678. function toNumber (val) {
  4679. var n = parseFloat(val);
  4680. return isNaN(n) ? val : n
  4681. }
  4682. /**
  4683. * Make a map and return a function for checking if a key
  4684. * is in that map.
  4685. */
  4686. function makeMap (
  4687. str,
  4688. expectsLowerCase
  4689. ) {
  4690. var map = Object.create(null);
  4691. var list = str.split(',');
  4692. for (var i = 0; i < list.length; i++) {
  4693. map[list[i]] = true;
  4694. }
  4695. return expectsLowerCase
  4696. ? function (val) { return map[val.toLowerCase()]; }
  4697. : function (val) { return map[val]; }
  4698. }
  4699. /**
  4700. * Check if a tag is a built-in tag.
  4701. */
  4702. var isBuiltInTag = makeMap('slot,component', true);
  4703. /**
  4704. * Check if an attribute is a reserved attribute.
  4705. */
  4706. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  4707. /**
  4708. * Remove an item from an array.
  4709. */
  4710. function remove (arr, item) {
  4711. if (arr.length) {
  4712. var index = arr.indexOf(item);
  4713. if (index > -1) {
  4714. return arr.splice(index, 1)
  4715. }
  4716. }
  4717. }
  4718. /**
  4719. * Check whether an object has the property.
  4720. */
  4721. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4722. function hasOwn (obj, key) {
  4723. return hasOwnProperty.call(obj, key)
  4724. }
  4725. /**
  4726. * Create a cached version of a pure function.
  4727. */
  4728. function cached (fn) {
  4729. var cache = Object.create(null);
  4730. return (function cachedFn (str) {
  4731. var hit = cache[str];
  4732. return hit || (cache[str] = fn(str))
  4733. })
  4734. }
  4735. /**
  4736. * Camelize a hyphen-delimited string.
  4737. */
  4738. var camelizeRE = /-(\w)/g;
  4739. var camelize = cached(function (str) {
  4740. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  4741. });
  4742. /**
  4743. * Capitalize a string.
  4744. */
  4745. var capitalize = cached(function (str) {
  4746. return str.charAt(0).toUpperCase() + str.slice(1)
  4747. });
  4748. /**
  4749. * Hyphenate a camelCase string.
  4750. */
  4751. var hyphenateRE = /\B([A-Z])/g;
  4752. var hyphenate = cached(function (str) {
  4753. return str.replace(hyphenateRE, '-$1').toLowerCase()
  4754. });
  4755. /**
  4756. * Simple bind polyfill for environments that do not support it,
  4757. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  4758. * since native bind is now performant enough in most browsers.
  4759. * But removing it would mean breaking code that was able to run in
  4760. * PhantomJS 1.x, so this must be kept for backward compatibility.
  4761. */
  4762. /* istanbul ignore next */
  4763. function polyfillBind (fn, ctx) {
  4764. function boundFn (a) {
  4765. var l = arguments.length;
  4766. return l
  4767. ? l > 1
  4768. ? fn.apply(ctx, arguments)
  4769. : fn.call(ctx, a)
  4770. : fn.call(ctx)
  4771. }
  4772. boundFn._length = fn.length;
  4773. return boundFn
  4774. }
  4775. function nativeBind (fn, ctx) {
  4776. return fn.bind(ctx)
  4777. }
  4778. var bind = Function.prototype.bind
  4779. ? nativeBind
  4780. : polyfillBind;
  4781. /**
  4782. * Convert an Array-like object to a real Array.
  4783. */
  4784. function toArray (list, start) {
  4785. start = start || 0;
  4786. var i = list.length - start;
  4787. var ret = new Array(i);
  4788. while (i--) {
  4789. ret[i] = list[i + start];
  4790. }
  4791. return ret
  4792. }
  4793. /**
  4794. * Mix properties into target object.
  4795. */
  4796. function extend (to, _from) {
  4797. for (var key in _from) {
  4798. to[key] = _from[key];
  4799. }
  4800. return to
  4801. }
  4802. /**
  4803. * Merge an Array of Objects into a single Object.
  4804. */
  4805. function toObject (arr) {
  4806. var res = {};
  4807. for (var i = 0; i < arr.length; i++) {
  4808. if (arr[i]) {
  4809. extend(res, arr[i]);
  4810. }
  4811. }
  4812. return res
  4813. }
  4814. /* eslint-disable no-unused-vars */
  4815. /**
  4816. * Perform no operation.
  4817. * Stubbing args to make Flow happy without leaving useless transpiled code
  4818. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  4819. */
  4820. function noop (a, b, c) {}
  4821. /**
  4822. * Always return false.
  4823. */
  4824. var no = function (a, b, c) { return false; };
  4825. /* eslint-enable no-unused-vars */
  4826. /**
  4827. * Return the same value.
  4828. */
  4829. var identity = function (_) { return _; };
  4830. /**
  4831. * Check if two values are loosely equal - that is,
  4832. * if they are plain objects, do they have the same shape?
  4833. */
  4834. function looseEqual (a, b) {
  4835. if (a === b) { return true }
  4836. var isObjectA = isObject(a);
  4837. var isObjectB = isObject(b);
  4838. if (isObjectA && isObjectB) {
  4839. try {
  4840. var isArrayA = Array.isArray(a);
  4841. var isArrayB = Array.isArray(b);
  4842. if (isArrayA && isArrayB) {
  4843. return a.length === b.length && a.every(function (e, i) {
  4844. return looseEqual(e, b[i])
  4845. })
  4846. } else if (a instanceof Date && b instanceof Date) {
  4847. return a.getTime() === b.getTime()
  4848. } else if (!isArrayA && !isArrayB) {
  4849. var keysA = Object.keys(a);
  4850. var keysB = Object.keys(b);
  4851. return keysA.length === keysB.length && keysA.every(function (key) {
  4852. return looseEqual(a[key], b[key])
  4853. })
  4854. } else {
  4855. /* istanbul ignore next */
  4856. return false
  4857. }
  4858. } catch (e) {
  4859. /* istanbul ignore next */
  4860. return false
  4861. }
  4862. } else if (!isObjectA && !isObjectB) {
  4863. return String(a) === String(b)
  4864. } else {
  4865. return false
  4866. }
  4867. }
  4868. /**
  4869. * Return the first index at which a loosely equal value can be
  4870. * found in the array (if value is a plain object, the array must
  4871. * contain an object of the same shape), or -1 if it is not present.
  4872. */
  4873. function looseIndexOf (arr, val) {
  4874. for (var i = 0; i < arr.length; i++) {
  4875. if (looseEqual(arr[i], val)) { return i }
  4876. }
  4877. return -1
  4878. }
  4879. /**
  4880. * Ensure a function is called only once.
  4881. */
  4882. function once (fn) {
  4883. var called = false;
  4884. return function () {
  4885. if (!called) {
  4886. called = true;
  4887. fn.apply(this, arguments);
  4888. }
  4889. }
  4890. }
  4891. var ASSET_TYPES = [
  4892. 'component',
  4893. 'directive',
  4894. 'filter'
  4895. ];
  4896. var LIFECYCLE_HOOKS = [
  4897. 'beforeCreate',
  4898. 'created',
  4899. 'beforeMount',
  4900. 'mounted',
  4901. 'beforeUpdate',
  4902. 'updated',
  4903. 'beforeDestroy',
  4904. 'destroyed',
  4905. 'activated',
  4906. 'deactivated',
  4907. 'errorCaptured',
  4908. 'serverPrefetch'
  4909. ];
  4910. /* */
  4911. var config = ({
  4912. /**
  4913. * Option merge strategies (used in core/util/options)
  4914. */
  4915. // $flow-disable-line
  4916. optionMergeStrategies: Object.create(null),
  4917. /**
  4918. * Whether to suppress warnings.
  4919. */
  4920. silent: false,
  4921. /**
  4922. * Show production mode tip message on boot?
  4923. */
  4924. productionTip: "development" !== 'production',
  4925. /**
  4926. * Whether to enable devtools
  4927. */
  4928. devtools: "development" !== 'production',
  4929. /**
  4930. * Whether to record perf
  4931. */
  4932. performance: false,
  4933. /**
  4934. * Error handler for watcher errors
  4935. */
  4936. errorHandler: null,
  4937. /**
  4938. * Warn handler for watcher warns
  4939. */
  4940. warnHandler: null,
  4941. /**
  4942. * Ignore certain custom elements
  4943. */
  4944. ignoredElements: [],
  4945. /**
  4946. * Custom user key aliases for v-on
  4947. */
  4948. // $flow-disable-line
  4949. keyCodes: Object.create(null),
  4950. /**
  4951. * Check if a tag is reserved so that it cannot be registered as a
  4952. * component. This is platform-dependent and may be overwritten.
  4953. */
  4954. isReservedTag: no,
  4955. /**
  4956. * Check if an attribute is reserved so that it cannot be used as a component
  4957. * prop. This is platform-dependent and may be overwritten.
  4958. */
  4959. isReservedAttr: no,
  4960. /**
  4961. * Check if a tag is an unknown element.
  4962. * Platform-dependent.
  4963. */
  4964. isUnknownElement: no,
  4965. /**
  4966. * Get the namespace of an element
  4967. */
  4968. getTagNamespace: noop,
  4969. /**
  4970. * Parse the real tag name for the specific platform.
  4971. */
  4972. parsePlatformTagName: identity,
  4973. /**
  4974. * Check if an attribute must be bound using property, e.g. value
  4975. * Platform-dependent.
  4976. */
  4977. mustUseProp: no,
  4978. /**
  4979. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  4980. * This will significantly reduce performance if set to false.
  4981. */
  4982. async: true,
  4983. /**
  4984. * Exposed for legacy reasons
  4985. */
  4986. _lifecycleHooks: LIFECYCLE_HOOKS
  4987. });
  4988. /* */
  4989. /**
  4990. * unicode letters used for parsing html tags, component names and property paths.
  4991. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  4992. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  4993. */
  4994. 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/;
  4995. /**
  4996. * Check if a string starts with $ or _
  4997. */
  4998. function isReserved (str) {
  4999. var c = (str + '').charCodeAt(0);
  5000. return c === 0x24 || c === 0x5F
  5001. }
  5002. /**
  5003. * Define a property.
  5004. */
  5005. function def (obj, key, val, enumerable) {
  5006. Object.defineProperty(obj, key, {
  5007. value: val,
  5008. enumerable: !!enumerable,
  5009. writable: true,
  5010. configurable: true
  5011. });
  5012. }
  5013. /**
  5014. * Parse simple path.
  5015. */
  5016. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  5017. function parsePath (path) {
  5018. if (bailRE.test(path)) {
  5019. return
  5020. }
  5021. var segments = path.split('.');
  5022. return function (obj) {
  5023. for (var i = 0; i < segments.length; i++) {
  5024. if (!obj) { return }
  5025. obj = obj[segments[i]];
  5026. }
  5027. return obj
  5028. }
  5029. }
  5030. /* */
  5031. // can we use __proto__?
  5032. var hasProto = '__proto__' in {};
  5033. // Browser environment sniffing
  5034. var inBrowser = typeof window !== 'undefined';
  5035. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  5036. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  5037. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  5038. var isIE = UA && /msie|trident/.test(UA);
  5039. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  5040. var isEdge = UA && UA.indexOf('edge/') > 0;
  5041. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  5042. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  5043. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  5044. var isPhantomJS = UA && /phantomjs/.test(UA);
  5045. var isFF = UA && UA.match(/firefox\/(\d+)/);
  5046. // Firefox has a "watch" function on Object.prototype...
  5047. var nativeWatch = ({}).watch;
  5048. if (inBrowser) {
  5049. try {
  5050. var opts = {};
  5051. Object.defineProperty(opts, 'passive', ({
  5052. get: function get () {
  5053. }
  5054. })); // https://github.com/facebook/flow/issues/285
  5055. window.addEventListener('test-passive', null, opts);
  5056. } catch (e) {}
  5057. }
  5058. // this needs to be lazy-evaled because vue may be required before
  5059. // vue-server-renderer can set VUE_ENV
  5060. var _isServer;
  5061. var isServerRendering = function () {
  5062. if (_isServer === undefined) {
  5063. /* istanbul ignore if */
  5064. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  5065. // detect presence of vue-server-renderer and avoid
  5066. // Webpack shimming the process
  5067. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  5068. } else {
  5069. _isServer = false;
  5070. }
  5071. }
  5072. return _isServer
  5073. };
  5074. // detect devtools
  5075. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  5076. /* istanbul ignore next */
  5077. function isNative (Ctor) {
  5078. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  5079. }
  5080. var hasSymbol =
  5081. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  5082. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  5083. var _Set;
  5084. /* istanbul ignore if */ // $flow-disable-line
  5085. if (typeof Set !== 'undefined' && isNative(Set)) {
  5086. // use native Set when available.
  5087. _Set = Set;
  5088. } else {
  5089. // a non-standard Set polyfill that only works with primitive keys.
  5090. _Set = /*@__PURE__*/(function () {
  5091. function Set () {
  5092. this.set = Object.create(null);
  5093. }
  5094. Set.prototype.has = function has (key) {
  5095. return this.set[key] === true
  5096. };
  5097. Set.prototype.add = function add (key) {
  5098. this.set[key] = true;
  5099. };
  5100. Set.prototype.clear = function clear () {
  5101. this.set = Object.create(null);
  5102. };
  5103. return Set;
  5104. }());
  5105. }
  5106. /* */
  5107. var warn = noop;
  5108. var tip = noop;
  5109. var generateComponentTrace = (noop); // work around flow check
  5110. var formatComponentName = (noop);
  5111. if (true) {
  5112. var hasConsole = typeof console !== 'undefined';
  5113. var classifyRE = /(?:^|[-_])(\w)/g;
  5114. var classify = function (str) { return str
  5115. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  5116. .replace(/[-_]/g, ''); };
  5117. warn = function (msg, vm) {
  5118. var trace = vm ? generateComponentTrace(vm) : '';
  5119. if (config.warnHandler) {
  5120. config.warnHandler.call(null, msg, vm, trace);
  5121. } else if (hasConsole && (!config.silent)) {
  5122. console.error(("[Vue warn]: " + msg + trace));
  5123. }
  5124. };
  5125. tip = function (msg, vm) {
  5126. if (hasConsole && (!config.silent)) {
  5127. console.warn("[Vue tip]: " + msg + (
  5128. vm ? generateComponentTrace(vm) : ''
  5129. ));
  5130. }
  5131. };
  5132. formatComponentName = function (vm, includeFile) {
  5133. if (vm.$root === vm) {
  5134. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  5135. return ('') + vm.$options.__file
  5136. }
  5137. return '<Root>'
  5138. }
  5139. var options = typeof vm === 'function' && vm.cid != null
  5140. ? vm.options
  5141. : vm._isVue
  5142. ? vm.$options || vm.constructor.options
  5143. : vm;
  5144. var name = options.name || options._componentTag;
  5145. var file = options.__file;
  5146. if (!name && file) {
  5147. var match = file.match(/([^/\\]+)\.vue$/);
  5148. name = match && match[1];
  5149. }
  5150. return (
  5151. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  5152. (file && includeFile !== false ? (" at " + file) : '')
  5153. )
  5154. };
  5155. var repeat = function (str, n) {
  5156. var res = '';
  5157. while (n) {
  5158. if (n % 2 === 1) { res += str; }
  5159. if (n > 1) { str += str; }
  5160. n >>= 1;
  5161. }
  5162. return res
  5163. };
  5164. generateComponentTrace = function (vm) {
  5165. if (vm._isVue && vm.$parent) {
  5166. var tree = [];
  5167. var currentRecursiveSequence = 0;
  5168. while (vm && vm.$options.name !== 'PageBody') {
  5169. if (tree.length > 0) {
  5170. var last = tree[tree.length - 1];
  5171. if (last.constructor === vm.constructor) {
  5172. currentRecursiveSequence++;
  5173. vm = vm.$parent;
  5174. continue
  5175. } else if (currentRecursiveSequence > 0) {
  5176. tree[tree.length - 1] = [last, currentRecursiveSequence];
  5177. currentRecursiveSequence = 0;
  5178. }
  5179. }
  5180. !vm.$options.isReserved && tree.push(vm);
  5181. vm = vm.$parent;
  5182. }
  5183. return '\n\nfound in\n\n' + tree
  5184. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  5185. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  5186. : formatComponentName(vm))); })
  5187. .join('\n')
  5188. } else {
  5189. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  5190. }
  5191. };
  5192. }
  5193. /* */
  5194. var uid = 0;
  5195. /**
  5196. * A dep is an observable that can have multiple
  5197. * directives subscribing to it.
  5198. */
  5199. var Dep = function Dep () {
  5200. this.id = uid++;
  5201. this.subs = [];
  5202. };
  5203. Dep.prototype.addSub = function addSub (sub) {
  5204. this.subs.push(sub);
  5205. };
  5206. Dep.prototype.removeSub = function removeSub (sub) {
  5207. remove(this.subs, sub);
  5208. };
  5209. Dep.prototype.depend = function depend () {
  5210. if (Dep.SharedObject.target) {
  5211. Dep.SharedObject.target.addDep(this);
  5212. }
  5213. };
  5214. Dep.prototype.notify = function notify () {
  5215. // stabilize the subscriber list first
  5216. var subs = this.subs.slice();
  5217. if ( true && !config.async) {
  5218. // subs aren't sorted in scheduler if not running async
  5219. // we need to sort them now to make sure they fire in correct
  5220. // order
  5221. subs.sort(function (a, b) { return a.id - b.id; });
  5222. }
  5223. for (var i = 0, l = subs.length; i < l; i++) {
  5224. subs[i].update();
  5225. }
  5226. };
  5227. // The current target watcher being evaluated.
  5228. // This is globally unique because only one watcher
  5229. // can be evaluated at a time.
  5230. // fixed by xxxxxx (nvue shared vuex)
  5231. /* eslint-disable no-undef */
  5232. Dep.SharedObject = {};
  5233. Dep.SharedObject.target = null;
  5234. Dep.SharedObject.targetStack = [];
  5235. function pushTarget (target) {
  5236. Dep.SharedObject.targetStack.push(target);
  5237. Dep.SharedObject.target = target;
  5238. Dep.target = target;
  5239. }
  5240. function popTarget () {
  5241. Dep.SharedObject.targetStack.pop();
  5242. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  5243. Dep.target = Dep.SharedObject.target;
  5244. }
  5245. /* */
  5246. var VNode = function VNode (
  5247. tag,
  5248. data,
  5249. children,
  5250. text,
  5251. elm,
  5252. context,
  5253. componentOptions,
  5254. asyncFactory
  5255. ) {
  5256. this.tag = tag;
  5257. this.data = data;
  5258. this.children = children;
  5259. this.text = text;
  5260. this.elm = elm;
  5261. this.ns = undefined;
  5262. this.context = context;
  5263. this.fnContext = undefined;
  5264. this.fnOptions = undefined;
  5265. this.fnScopeId = undefined;
  5266. this.key = data && data.key;
  5267. this.componentOptions = componentOptions;
  5268. this.componentInstance = undefined;
  5269. this.parent = undefined;
  5270. this.raw = false;
  5271. this.isStatic = false;
  5272. this.isRootInsert = true;
  5273. this.isComment = false;
  5274. this.isCloned = false;
  5275. this.isOnce = false;
  5276. this.asyncFactory = asyncFactory;
  5277. this.asyncMeta = undefined;
  5278. this.isAsyncPlaceholder = false;
  5279. };
  5280. var prototypeAccessors = { child: { configurable: true } };
  5281. // DEPRECATED: alias for componentInstance for backwards compat.
  5282. /* istanbul ignore next */
  5283. prototypeAccessors.child.get = function () {
  5284. return this.componentInstance
  5285. };
  5286. Object.defineProperties( VNode.prototype, prototypeAccessors );
  5287. var createEmptyVNode = function (text) {
  5288. if ( text === void 0 ) text = '';
  5289. var node = new VNode();
  5290. node.text = text;
  5291. node.isComment = true;
  5292. return node
  5293. };
  5294. function createTextVNode (val) {
  5295. return new VNode(undefined, undefined, undefined, String(val))
  5296. }
  5297. // optimized shallow clone
  5298. // used for static nodes and slot nodes because they may be reused across
  5299. // multiple renders, cloning them avoids errors when DOM manipulations rely
  5300. // on their elm reference.
  5301. function cloneVNode (vnode) {
  5302. var cloned = new VNode(
  5303. vnode.tag,
  5304. vnode.data,
  5305. // #7975
  5306. // clone children array to avoid mutating original in case of cloning
  5307. // a child.
  5308. vnode.children && vnode.children.slice(),
  5309. vnode.text,
  5310. vnode.elm,
  5311. vnode.context,
  5312. vnode.componentOptions,
  5313. vnode.asyncFactory
  5314. );
  5315. cloned.ns = vnode.ns;
  5316. cloned.isStatic = vnode.isStatic;
  5317. cloned.key = vnode.key;
  5318. cloned.isComment = vnode.isComment;
  5319. cloned.fnContext = vnode.fnContext;
  5320. cloned.fnOptions = vnode.fnOptions;
  5321. cloned.fnScopeId = vnode.fnScopeId;
  5322. cloned.asyncMeta = vnode.asyncMeta;
  5323. cloned.isCloned = true;
  5324. return cloned
  5325. }
  5326. /*
  5327. * not type checking this file because flow doesn't play well with
  5328. * dynamically accessing methods on Array prototype
  5329. */
  5330. var arrayProto = Array.prototype;
  5331. var arrayMethods = Object.create(arrayProto);
  5332. var methodsToPatch = [
  5333. 'push',
  5334. 'pop',
  5335. 'shift',
  5336. 'unshift',
  5337. 'splice',
  5338. 'sort',
  5339. 'reverse'
  5340. ];
  5341. /**
  5342. * Intercept mutating methods and emit events
  5343. */
  5344. methodsToPatch.forEach(function (method) {
  5345. // cache original method
  5346. var original = arrayProto[method];
  5347. def(arrayMethods, method, function mutator () {
  5348. var args = [], len = arguments.length;
  5349. while ( len-- ) args[ len ] = arguments[ len ];
  5350. var result = original.apply(this, args);
  5351. var ob = this.__ob__;
  5352. var inserted;
  5353. switch (method) {
  5354. case 'push':
  5355. case 'unshift':
  5356. inserted = args;
  5357. break
  5358. case 'splice':
  5359. inserted = args.slice(2);
  5360. break
  5361. }
  5362. if (inserted) { ob.observeArray(inserted); }
  5363. // notify change
  5364. ob.dep.notify();
  5365. return result
  5366. });
  5367. });
  5368. /* */
  5369. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  5370. /**
  5371. * In some cases we may want to disable observation inside a component's
  5372. * update computation.
  5373. */
  5374. var shouldObserve = true;
  5375. function toggleObserving (value) {
  5376. shouldObserve = value;
  5377. }
  5378. /**
  5379. * Observer class that is attached to each observed
  5380. * object. Once attached, the observer converts the target
  5381. * object's property keys into getter/setters that
  5382. * collect dependencies and dispatch updates.
  5383. */
  5384. var Observer = function Observer (value) {
  5385. this.value = value;
  5386. this.dep = new Dep();
  5387. this.vmCount = 0;
  5388. def(value, '__ob__', this);
  5389. if (Array.isArray(value)) {
  5390. if (hasProto) {
  5391. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  5392. if(value.push !== value.__proto__.push){
  5393. copyAugment(value, arrayMethods, arrayKeys);
  5394. } else {
  5395. protoAugment(value, arrayMethods);
  5396. }
  5397. }
  5398. } else {
  5399. copyAugment(value, arrayMethods, arrayKeys);
  5400. }
  5401. this.observeArray(value);
  5402. } else {
  5403. this.walk(value);
  5404. }
  5405. };
  5406. /**
  5407. * Walk through all properties and convert them into
  5408. * getter/setters. This method should only be called when
  5409. * value type is Object.
  5410. */
  5411. Observer.prototype.walk = function walk (obj) {
  5412. var keys = Object.keys(obj);
  5413. for (var i = 0; i < keys.length; i++) {
  5414. defineReactive$$1(obj, keys[i]);
  5415. }
  5416. };
  5417. /**
  5418. * Observe a list of Array items.
  5419. */
  5420. Observer.prototype.observeArray = function observeArray (items) {
  5421. for (var i = 0, l = items.length; i < l; i++) {
  5422. observe(items[i]);
  5423. }
  5424. };
  5425. // helpers
  5426. /**
  5427. * Augment a target Object or Array by intercepting
  5428. * the prototype chain using __proto__
  5429. */
  5430. function protoAugment (target, src) {
  5431. /* eslint-disable no-proto */
  5432. target.__proto__ = src;
  5433. /* eslint-enable no-proto */
  5434. }
  5435. /**
  5436. * Augment a target Object or Array by defining
  5437. * hidden properties.
  5438. */
  5439. /* istanbul ignore next */
  5440. function copyAugment (target, src, keys) {
  5441. for (var i = 0, l = keys.length; i < l; i++) {
  5442. var key = keys[i];
  5443. def(target, key, src[key]);
  5444. }
  5445. }
  5446. /**
  5447. * Attempt to create an observer instance for a value,
  5448. * returns the new observer if successfully observed,
  5449. * or the existing observer if the value already has one.
  5450. */
  5451. function observe (value, asRootData) {
  5452. if (!isObject(value) || value instanceof VNode) {
  5453. return
  5454. }
  5455. var ob;
  5456. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  5457. ob = value.__ob__;
  5458. } else if (
  5459. shouldObserve &&
  5460. !isServerRendering() &&
  5461. (Array.isArray(value) || isPlainObject(value)) &&
  5462. Object.isExtensible(value) &&
  5463. !value._isVue
  5464. ) {
  5465. ob = new Observer(value);
  5466. }
  5467. if (asRootData && ob) {
  5468. ob.vmCount++;
  5469. }
  5470. return ob
  5471. }
  5472. /**
  5473. * Define a reactive property on an Object.
  5474. */
  5475. function defineReactive$$1 (
  5476. obj,
  5477. key,
  5478. val,
  5479. customSetter,
  5480. shallow
  5481. ) {
  5482. var dep = new Dep();
  5483. var property = Object.getOwnPropertyDescriptor(obj, key);
  5484. if (property && property.configurable === false) {
  5485. return
  5486. }
  5487. // cater for pre-defined getter/setters
  5488. var getter = property && property.get;
  5489. var setter = property && property.set;
  5490. if ((!getter || setter) && arguments.length === 2) {
  5491. val = obj[key];
  5492. }
  5493. var childOb = !shallow && observe(val);
  5494. Object.defineProperty(obj, key, {
  5495. enumerable: true,
  5496. configurable: true,
  5497. get: function reactiveGetter () {
  5498. var value = getter ? getter.call(obj) : val;
  5499. if (Dep.SharedObject.target) { // fixed by xxxxxx
  5500. dep.depend();
  5501. if (childOb) {
  5502. childOb.dep.depend();
  5503. if (Array.isArray(value)) {
  5504. dependArray(value);
  5505. }
  5506. }
  5507. }
  5508. return value
  5509. },
  5510. set: function reactiveSetter (newVal) {
  5511. var value = getter ? getter.call(obj) : val;
  5512. /* eslint-disable no-self-compare */
  5513. if (newVal === value || (newVal !== newVal && value !== value)) {
  5514. return
  5515. }
  5516. /* eslint-enable no-self-compare */
  5517. if ( true && customSetter) {
  5518. customSetter();
  5519. }
  5520. // #7981: for accessor properties without setter
  5521. if (getter && !setter) { return }
  5522. if (setter) {
  5523. setter.call(obj, newVal);
  5524. } else {
  5525. val = newVal;
  5526. }
  5527. childOb = !shallow && observe(newVal);
  5528. dep.notify();
  5529. }
  5530. });
  5531. }
  5532. /**
  5533. * Set a property on an object. Adds the new property and
  5534. * triggers change notification if the property doesn't
  5535. * already exist.
  5536. */
  5537. function set (target, key, val) {
  5538. if ( true &&
  5539. (isUndef(target) || isPrimitive(target))
  5540. ) {
  5541. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  5542. }
  5543. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5544. target.length = Math.max(target.length, key);
  5545. target.splice(key, 1, val);
  5546. return val
  5547. }
  5548. if (key in target && !(key in Object.prototype)) {
  5549. target[key] = val;
  5550. return val
  5551. }
  5552. var ob = (target).__ob__;
  5553. if (target._isVue || (ob && ob.vmCount)) {
  5554. true && warn(
  5555. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  5556. 'at runtime - declare it upfront in the data option.'
  5557. );
  5558. return val
  5559. }
  5560. if (!ob) {
  5561. target[key] = val;
  5562. return val
  5563. }
  5564. defineReactive$$1(ob.value, key, val);
  5565. ob.dep.notify();
  5566. return val
  5567. }
  5568. /**
  5569. * Delete a property and trigger change if necessary.
  5570. */
  5571. function del (target, key) {
  5572. if ( true &&
  5573. (isUndef(target) || isPrimitive(target))
  5574. ) {
  5575. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  5576. }
  5577. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5578. target.splice(key, 1);
  5579. return
  5580. }
  5581. var ob = (target).__ob__;
  5582. if (target._isVue || (ob && ob.vmCount)) {
  5583. true && warn(
  5584. 'Avoid deleting properties on a Vue instance or its root $data ' +
  5585. '- just set it to null.'
  5586. );
  5587. return
  5588. }
  5589. if (!hasOwn(target, key)) {
  5590. return
  5591. }
  5592. delete target[key];
  5593. if (!ob) {
  5594. return
  5595. }
  5596. ob.dep.notify();
  5597. }
  5598. /**
  5599. * Collect dependencies on array elements when the array is touched, since
  5600. * we cannot intercept array element access like property getters.
  5601. */
  5602. function dependArray (value) {
  5603. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  5604. e = value[i];
  5605. e && e.__ob__ && e.__ob__.dep.depend();
  5606. if (Array.isArray(e)) {
  5607. dependArray(e);
  5608. }
  5609. }
  5610. }
  5611. /* */
  5612. /**
  5613. * Option overwriting strategies are functions that handle
  5614. * how to merge a parent option value and a child option
  5615. * value into the final value.
  5616. */
  5617. var strats = config.optionMergeStrategies;
  5618. /**
  5619. * Options with restrictions
  5620. */
  5621. if (true) {
  5622. strats.el = strats.propsData = function (parent, child, vm, key) {
  5623. if (!vm) {
  5624. warn(
  5625. "option \"" + key + "\" can only be used during instance " +
  5626. 'creation with the `new` keyword.'
  5627. );
  5628. }
  5629. return defaultStrat(parent, child)
  5630. };
  5631. }
  5632. /**
  5633. * Helper that recursively merges two data objects together.
  5634. */
  5635. function mergeData (to, from) {
  5636. if (!from) { return to }
  5637. var key, toVal, fromVal;
  5638. var keys = hasSymbol
  5639. ? Reflect.ownKeys(from)
  5640. : Object.keys(from);
  5641. for (var i = 0; i < keys.length; i++) {
  5642. key = keys[i];
  5643. // in case the object is already observed...
  5644. if (key === '__ob__') { continue }
  5645. toVal = to[key];
  5646. fromVal = from[key];
  5647. if (!hasOwn(to, key)) {
  5648. set(to, key, fromVal);
  5649. } else if (
  5650. toVal !== fromVal &&
  5651. isPlainObject(toVal) &&
  5652. isPlainObject(fromVal)
  5653. ) {
  5654. mergeData(toVal, fromVal);
  5655. }
  5656. }
  5657. return to
  5658. }
  5659. /**
  5660. * Data
  5661. */
  5662. function mergeDataOrFn (
  5663. parentVal,
  5664. childVal,
  5665. vm
  5666. ) {
  5667. if (!vm) {
  5668. // in a Vue.extend merge, both should be functions
  5669. if (!childVal) {
  5670. return parentVal
  5671. }
  5672. if (!parentVal) {
  5673. return childVal
  5674. }
  5675. // when parentVal & childVal are both present,
  5676. // we need to return a function that returns the
  5677. // merged result of both functions... no need to
  5678. // check if parentVal is a function here because
  5679. // it has to be a function to pass previous merges.
  5680. return function mergedDataFn () {
  5681. return mergeData(
  5682. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  5683. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  5684. )
  5685. }
  5686. } else {
  5687. return function mergedInstanceDataFn () {
  5688. // instance merge
  5689. var instanceData = typeof childVal === 'function'
  5690. ? childVal.call(vm, vm)
  5691. : childVal;
  5692. var defaultData = typeof parentVal === 'function'
  5693. ? parentVal.call(vm, vm)
  5694. : parentVal;
  5695. if (instanceData) {
  5696. return mergeData(instanceData, defaultData)
  5697. } else {
  5698. return defaultData
  5699. }
  5700. }
  5701. }
  5702. }
  5703. strats.data = function (
  5704. parentVal,
  5705. childVal,
  5706. vm
  5707. ) {
  5708. if (!vm) {
  5709. if (childVal && typeof childVal !== 'function') {
  5710. true && warn(
  5711. 'The "data" option should be a function ' +
  5712. 'that returns a per-instance value in component ' +
  5713. 'definitions.',
  5714. vm
  5715. );
  5716. return parentVal
  5717. }
  5718. return mergeDataOrFn(parentVal, childVal)
  5719. }
  5720. return mergeDataOrFn(parentVal, childVal, vm)
  5721. };
  5722. /**
  5723. * Hooks and props are merged as arrays.
  5724. */
  5725. function mergeHook (
  5726. parentVal,
  5727. childVal
  5728. ) {
  5729. var res = childVal
  5730. ? parentVal
  5731. ? parentVal.concat(childVal)
  5732. : Array.isArray(childVal)
  5733. ? childVal
  5734. : [childVal]
  5735. : parentVal;
  5736. return res
  5737. ? dedupeHooks(res)
  5738. : res
  5739. }
  5740. function dedupeHooks (hooks) {
  5741. var res = [];
  5742. for (var i = 0; i < hooks.length; i++) {
  5743. if (res.indexOf(hooks[i]) === -1) {
  5744. res.push(hooks[i]);
  5745. }
  5746. }
  5747. return res
  5748. }
  5749. LIFECYCLE_HOOKS.forEach(function (hook) {
  5750. strats[hook] = mergeHook;
  5751. });
  5752. /**
  5753. * Assets
  5754. *
  5755. * When a vm is present (instance creation), we need to do
  5756. * a three-way merge between constructor options, instance
  5757. * options and parent options.
  5758. */
  5759. function mergeAssets (
  5760. parentVal,
  5761. childVal,
  5762. vm,
  5763. key
  5764. ) {
  5765. var res = Object.create(parentVal || null);
  5766. if (childVal) {
  5767. true && assertObjectType(key, childVal, vm);
  5768. return extend(res, childVal)
  5769. } else {
  5770. return res
  5771. }
  5772. }
  5773. ASSET_TYPES.forEach(function (type) {
  5774. strats[type + 's'] = mergeAssets;
  5775. });
  5776. /**
  5777. * Watchers.
  5778. *
  5779. * Watchers hashes should not overwrite one
  5780. * another, so we merge them as arrays.
  5781. */
  5782. strats.watch = function (
  5783. parentVal,
  5784. childVal,
  5785. vm,
  5786. key
  5787. ) {
  5788. // work around Firefox's Object.prototype.watch...
  5789. if (parentVal === nativeWatch) { parentVal = undefined; }
  5790. if (childVal === nativeWatch) { childVal = undefined; }
  5791. /* istanbul ignore if */
  5792. if (!childVal) { return Object.create(parentVal || null) }
  5793. if (true) {
  5794. assertObjectType(key, childVal, vm);
  5795. }
  5796. if (!parentVal) { return childVal }
  5797. var ret = {};
  5798. extend(ret, parentVal);
  5799. for (var key$1 in childVal) {
  5800. var parent = ret[key$1];
  5801. var child = childVal[key$1];
  5802. if (parent && !Array.isArray(parent)) {
  5803. parent = [parent];
  5804. }
  5805. ret[key$1] = parent
  5806. ? parent.concat(child)
  5807. : Array.isArray(child) ? child : [child];
  5808. }
  5809. return ret
  5810. };
  5811. /**
  5812. * Other object hashes.
  5813. */
  5814. strats.props =
  5815. strats.methods =
  5816. strats.inject =
  5817. strats.computed = function (
  5818. parentVal,
  5819. childVal,
  5820. vm,
  5821. key
  5822. ) {
  5823. if (childVal && "development" !== 'production') {
  5824. assertObjectType(key, childVal, vm);
  5825. }
  5826. if (!parentVal) { return childVal }
  5827. var ret = Object.create(null);
  5828. extend(ret, parentVal);
  5829. if (childVal) { extend(ret, childVal); }
  5830. return ret
  5831. };
  5832. strats.provide = mergeDataOrFn;
  5833. /**
  5834. * Default strategy.
  5835. */
  5836. var defaultStrat = function (parentVal, childVal) {
  5837. return childVal === undefined
  5838. ? parentVal
  5839. : childVal
  5840. };
  5841. /**
  5842. * Validate component names
  5843. */
  5844. function checkComponents (options) {
  5845. for (var key in options.components) {
  5846. validateComponentName(key);
  5847. }
  5848. }
  5849. function validateComponentName (name) {
  5850. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  5851. warn(
  5852. 'Invalid component name: "' + name + '". Component names ' +
  5853. 'should conform to valid custom element name in html5 specification.'
  5854. );
  5855. }
  5856. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  5857. warn(
  5858. 'Do not use built-in or reserved HTML elements as component ' +
  5859. 'id: ' + name
  5860. );
  5861. }
  5862. }
  5863. /**
  5864. * Ensure all props option syntax are normalized into the
  5865. * Object-based format.
  5866. */
  5867. function normalizeProps (options, vm) {
  5868. var props = options.props;
  5869. if (!props) { return }
  5870. var res = {};
  5871. var i, val, name;
  5872. if (Array.isArray(props)) {
  5873. i = props.length;
  5874. while (i--) {
  5875. val = props[i];
  5876. if (typeof val === 'string') {
  5877. name = camelize(val);
  5878. res[name] = { type: null };
  5879. } else if (true) {
  5880. warn('props must be strings when using array syntax.');
  5881. }
  5882. }
  5883. } else if (isPlainObject(props)) {
  5884. for (var key in props) {
  5885. val = props[key];
  5886. name = camelize(key);
  5887. res[name] = isPlainObject(val)
  5888. ? val
  5889. : { type: val };
  5890. }
  5891. } else if (true) {
  5892. warn(
  5893. "Invalid value for option \"props\": expected an Array or an Object, " +
  5894. "but got " + (toRawType(props)) + ".",
  5895. vm
  5896. );
  5897. }
  5898. options.props = res;
  5899. }
  5900. /**
  5901. * Normalize all injections into Object-based format
  5902. */
  5903. function normalizeInject (options, vm) {
  5904. var inject = options.inject;
  5905. if (!inject) { return }
  5906. var normalized = options.inject = {};
  5907. if (Array.isArray(inject)) {
  5908. for (var i = 0; i < inject.length; i++) {
  5909. normalized[inject[i]] = { from: inject[i] };
  5910. }
  5911. } else if (isPlainObject(inject)) {
  5912. for (var key in inject) {
  5913. var val = inject[key];
  5914. normalized[key] = isPlainObject(val)
  5915. ? extend({ from: key }, val)
  5916. : { from: val };
  5917. }
  5918. } else if (true) {
  5919. warn(
  5920. "Invalid value for option \"inject\": expected an Array or an Object, " +
  5921. "but got " + (toRawType(inject)) + ".",
  5922. vm
  5923. );
  5924. }
  5925. }
  5926. /**
  5927. * Normalize raw function directives into object format.
  5928. */
  5929. function normalizeDirectives (options) {
  5930. var dirs = options.directives;
  5931. if (dirs) {
  5932. for (var key in dirs) {
  5933. var def$$1 = dirs[key];
  5934. if (typeof def$$1 === 'function') {
  5935. dirs[key] = { bind: def$$1, update: def$$1 };
  5936. }
  5937. }
  5938. }
  5939. }
  5940. function assertObjectType (name, value, vm) {
  5941. if (!isPlainObject(value)) {
  5942. warn(
  5943. "Invalid value for option \"" + name + "\": expected an Object, " +
  5944. "but got " + (toRawType(value)) + ".",
  5945. vm
  5946. );
  5947. }
  5948. }
  5949. /**
  5950. * Merge two option objects into a new one.
  5951. * Core utility used in both instantiation and inheritance.
  5952. */
  5953. function mergeOptions (
  5954. parent,
  5955. child,
  5956. vm
  5957. ) {
  5958. if (true) {
  5959. checkComponents(child);
  5960. }
  5961. if (typeof child === 'function') {
  5962. child = child.options;
  5963. }
  5964. normalizeProps(child, vm);
  5965. normalizeInject(child, vm);
  5966. normalizeDirectives(child);
  5967. // Apply extends and mixins on the child options,
  5968. // but only if it is a raw options object that isn't
  5969. // the result of another mergeOptions call.
  5970. // Only merged options has the _base property.
  5971. if (!child._base) {
  5972. if (child.extends) {
  5973. parent = mergeOptions(parent, child.extends, vm);
  5974. }
  5975. if (child.mixins) {
  5976. for (var i = 0, l = child.mixins.length; i < l; i++) {
  5977. parent = mergeOptions(parent, child.mixins[i], vm);
  5978. }
  5979. }
  5980. }
  5981. var options = {};
  5982. var key;
  5983. for (key in parent) {
  5984. mergeField(key);
  5985. }
  5986. for (key in child) {
  5987. if (!hasOwn(parent, key)) {
  5988. mergeField(key);
  5989. }
  5990. }
  5991. function mergeField (key) {
  5992. var strat = strats[key] || defaultStrat;
  5993. options[key] = strat(parent[key], child[key], vm, key);
  5994. }
  5995. return options
  5996. }
  5997. /**
  5998. * Resolve an asset.
  5999. * This function is used because child instances need access
  6000. * to assets defined in its ancestor chain.
  6001. */
  6002. function resolveAsset (
  6003. options,
  6004. type,
  6005. id,
  6006. warnMissing
  6007. ) {
  6008. /* istanbul ignore if */
  6009. if (typeof id !== 'string') {
  6010. return
  6011. }
  6012. var assets = options[type];
  6013. // check local registration variations first
  6014. if (hasOwn(assets, id)) { return assets[id] }
  6015. var camelizedId = camelize(id);
  6016. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  6017. var PascalCaseId = capitalize(camelizedId);
  6018. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  6019. // fallback to prototype chain
  6020. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  6021. if ( true && warnMissing && !res) {
  6022. warn(
  6023. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  6024. options
  6025. );
  6026. }
  6027. return res
  6028. }
  6029. /* */
  6030. function validateProp (
  6031. key,
  6032. propOptions,
  6033. propsData,
  6034. vm
  6035. ) {
  6036. var prop = propOptions[key];
  6037. var absent = !hasOwn(propsData, key);
  6038. var value = propsData[key];
  6039. // boolean casting
  6040. var booleanIndex = getTypeIndex(Boolean, prop.type);
  6041. if (booleanIndex > -1) {
  6042. if (absent && !hasOwn(prop, 'default')) {
  6043. value = false;
  6044. } else if (value === '' || value === hyphenate(key)) {
  6045. // only cast empty string / same name to boolean if
  6046. // boolean has higher priority
  6047. var stringIndex = getTypeIndex(String, prop.type);
  6048. if (stringIndex < 0 || booleanIndex < stringIndex) {
  6049. value = true;
  6050. }
  6051. }
  6052. }
  6053. // check default value
  6054. if (value === undefined) {
  6055. value = getPropDefaultValue(vm, prop, key);
  6056. // since the default value is a fresh copy,
  6057. // make sure to observe it.
  6058. var prevShouldObserve = shouldObserve;
  6059. toggleObserving(true);
  6060. observe(value);
  6061. toggleObserving(prevShouldObserve);
  6062. }
  6063. if (
  6064. true
  6065. ) {
  6066. assertProp(prop, key, value, vm, absent);
  6067. }
  6068. return value
  6069. }
  6070. /**
  6071. * Get the default value of a prop.
  6072. */
  6073. function getPropDefaultValue (vm, prop, key) {
  6074. // no default, return undefined
  6075. if (!hasOwn(prop, 'default')) {
  6076. return undefined
  6077. }
  6078. var def = prop.default;
  6079. // warn against non-factory defaults for Object & Array
  6080. if ( true && isObject(def)) {
  6081. warn(
  6082. 'Invalid default value for prop "' + key + '": ' +
  6083. 'Props with type Object/Array must use a factory function ' +
  6084. 'to return the default value.',
  6085. vm
  6086. );
  6087. }
  6088. // the raw prop value was also undefined from previous render,
  6089. // return previous default value to avoid unnecessary watcher trigger
  6090. if (vm && vm.$options.propsData &&
  6091. vm.$options.propsData[key] === undefined &&
  6092. vm._props[key] !== undefined
  6093. ) {
  6094. return vm._props[key]
  6095. }
  6096. // call factory function for non-Function types
  6097. // a value is Function if its prototype is function even across different execution context
  6098. return typeof def === 'function' && getType(prop.type) !== 'Function'
  6099. ? def.call(vm)
  6100. : def
  6101. }
  6102. /**
  6103. * Assert whether a prop is valid.
  6104. */
  6105. function assertProp (
  6106. prop,
  6107. name,
  6108. value,
  6109. vm,
  6110. absent
  6111. ) {
  6112. if (prop.required && absent) {
  6113. warn(
  6114. 'Missing required prop: "' + name + '"',
  6115. vm
  6116. );
  6117. return
  6118. }
  6119. if (value == null && !prop.required) {
  6120. return
  6121. }
  6122. var type = prop.type;
  6123. var valid = !type || type === true;
  6124. var expectedTypes = [];
  6125. if (type) {
  6126. if (!Array.isArray(type)) {
  6127. type = [type];
  6128. }
  6129. for (var i = 0; i < type.length && !valid; i++) {
  6130. var assertedType = assertType(value, type[i]);
  6131. expectedTypes.push(assertedType.expectedType || '');
  6132. valid = assertedType.valid;
  6133. }
  6134. }
  6135. if (!valid) {
  6136. warn(
  6137. getInvalidTypeMessage(name, value, expectedTypes),
  6138. vm
  6139. );
  6140. return
  6141. }
  6142. var validator = prop.validator;
  6143. if (validator) {
  6144. if (!validator(value)) {
  6145. warn(
  6146. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  6147. vm
  6148. );
  6149. }
  6150. }
  6151. }
  6152. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  6153. function assertType (value, type) {
  6154. var valid;
  6155. var expectedType = getType(type);
  6156. if (simpleCheckRE.test(expectedType)) {
  6157. var t = typeof value;
  6158. valid = t === expectedType.toLowerCase();
  6159. // for primitive wrapper objects
  6160. if (!valid && t === 'object') {
  6161. valid = value instanceof type;
  6162. }
  6163. } else if (expectedType === 'Object') {
  6164. valid = isPlainObject(value);
  6165. } else if (expectedType === 'Array') {
  6166. valid = Array.isArray(value);
  6167. } else {
  6168. valid = value instanceof type;
  6169. }
  6170. return {
  6171. valid: valid,
  6172. expectedType: expectedType
  6173. }
  6174. }
  6175. /**
  6176. * Use function string name to check built-in types,
  6177. * because a simple equality check will fail when running
  6178. * across different vms / iframes.
  6179. */
  6180. function getType (fn) {
  6181. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  6182. return match ? match[1] : ''
  6183. }
  6184. function isSameType (a, b) {
  6185. return getType(a) === getType(b)
  6186. }
  6187. function getTypeIndex (type, expectedTypes) {
  6188. if (!Array.isArray(expectedTypes)) {
  6189. return isSameType(expectedTypes, type) ? 0 : -1
  6190. }
  6191. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  6192. if (isSameType(expectedTypes[i], type)) {
  6193. return i
  6194. }
  6195. }
  6196. return -1
  6197. }
  6198. function getInvalidTypeMessage (name, value, expectedTypes) {
  6199. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  6200. " Expected " + (expectedTypes.map(capitalize).join(', '));
  6201. var expectedType = expectedTypes[0];
  6202. var receivedType = toRawType(value);
  6203. var expectedValue = styleValue(value, expectedType);
  6204. var receivedValue = styleValue(value, receivedType);
  6205. // check if we need to specify expected value
  6206. if (expectedTypes.length === 1 &&
  6207. isExplicable(expectedType) &&
  6208. !isBoolean(expectedType, receivedType)) {
  6209. message += " with value " + expectedValue;
  6210. }
  6211. message += ", got " + receivedType + " ";
  6212. // check if we need to specify received value
  6213. if (isExplicable(receivedType)) {
  6214. message += "with value " + receivedValue + ".";
  6215. }
  6216. return message
  6217. }
  6218. function styleValue (value, type) {
  6219. if (type === 'String') {
  6220. return ("\"" + value + "\"")
  6221. } else if (type === 'Number') {
  6222. return ("" + (Number(value)))
  6223. } else {
  6224. return ("" + value)
  6225. }
  6226. }
  6227. function isExplicable (value) {
  6228. var explicitTypes = ['string', 'number', 'boolean'];
  6229. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  6230. }
  6231. function isBoolean () {
  6232. var args = [], len = arguments.length;
  6233. while ( len-- ) args[ len ] = arguments[ len ];
  6234. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  6235. }
  6236. /* */
  6237. function handleError (err, vm, info) {
  6238. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  6239. // See: https://github.com/vuejs/vuex/issues/1505
  6240. pushTarget();
  6241. try {
  6242. if (vm) {
  6243. var cur = vm;
  6244. while ((cur = cur.$parent)) {
  6245. var hooks = cur.$options.errorCaptured;
  6246. if (hooks) {
  6247. for (var i = 0; i < hooks.length; i++) {
  6248. try {
  6249. var capture = hooks[i].call(cur, err, vm, info) === false;
  6250. if (capture) { return }
  6251. } catch (e) {
  6252. globalHandleError(e, cur, 'errorCaptured hook');
  6253. }
  6254. }
  6255. }
  6256. }
  6257. }
  6258. globalHandleError(err, vm, info);
  6259. } finally {
  6260. popTarget();
  6261. }
  6262. }
  6263. function invokeWithErrorHandling (
  6264. handler,
  6265. context,
  6266. args,
  6267. vm,
  6268. info
  6269. ) {
  6270. var res;
  6271. try {
  6272. res = args ? handler.apply(context, args) : handler.call(context);
  6273. if (res && !res._isVue && isPromise(res) && !res._handled) {
  6274. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  6275. // issue #9511
  6276. // avoid catch triggering multiple times when nested calls
  6277. res._handled = true;
  6278. }
  6279. } catch (e) {
  6280. handleError(e, vm, info);
  6281. }
  6282. return res
  6283. }
  6284. function globalHandleError (err, vm, info) {
  6285. if (config.errorHandler) {
  6286. try {
  6287. return config.errorHandler.call(null, err, vm, info)
  6288. } catch (e) {
  6289. // if the user intentionally throws the original error in the handler,
  6290. // do not log it twice
  6291. if (e !== err) {
  6292. logError(e, null, 'config.errorHandler');
  6293. }
  6294. }
  6295. }
  6296. logError(err, vm, info);
  6297. }
  6298. function logError (err, vm, info) {
  6299. if (true) {
  6300. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  6301. }
  6302. /* istanbul ignore else */
  6303. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  6304. console.error(err);
  6305. } else {
  6306. throw err
  6307. }
  6308. }
  6309. /* */
  6310. var callbacks = [];
  6311. var pending = false;
  6312. function flushCallbacks () {
  6313. pending = false;
  6314. var copies = callbacks.slice(0);
  6315. callbacks.length = 0;
  6316. for (var i = 0; i < copies.length; i++) {
  6317. copies[i]();
  6318. }
  6319. }
  6320. // Here we have async deferring wrappers using microtasks.
  6321. // In 2.5 we used (macro) tasks (in combination with microtasks).
  6322. // However, it has subtle problems when state is changed right before repaint
  6323. // (e.g. #6813, out-in transitions).
  6324. // Also, using (macro) tasks in event handler would cause some weird behaviors
  6325. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  6326. // So we now use microtasks everywhere, again.
  6327. // A major drawback of this tradeoff is that there are some scenarios
  6328. // where microtasks have too high a priority and fire in between supposedly
  6329. // sequential events (e.g. #4521, #6690, which have workarounds)
  6330. // or even between bubbling of the same event (#6566).
  6331. var timerFunc;
  6332. // The nextTick behavior leverages the microtask queue, which can be accessed
  6333. // via either native Promise.then or MutationObserver.
  6334. // MutationObserver has wider support, however it is seriously bugged in
  6335. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  6336. // completely stops working after triggering a few times... so, if native
  6337. // Promise is available, we will use it:
  6338. /* istanbul ignore next, $flow-disable-line */
  6339. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  6340. var p = Promise.resolve();
  6341. timerFunc = function () {
  6342. p.then(flushCallbacks);
  6343. // In problematic UIWebViews, Promise.then doesn't completely break, but
  6344. // it can get stuck in a weird state where callbacks are pushed into the
  6345. // microtask queue but the queue isn't being flushed, until the browser
  6346. // needs to do some other work, e.g. handle a timer. Therefore we can
  6347. // "force" the microtask queue to be flushed by adding an empty timer.
  6348. if (isIOS) { setTimeout(noop); }
  6349. };
  6350. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  6351. isNative(MutationObserver) ||
  6352. // PhantomJS and iOS 7.x
  6353. MutationObserver.toString() === '[object MutationObserverConstructor]'
  6354. )) {
  6355. // Use MutationObserver where native Promise is not available,
  6356. // e.g. PhantomJS, iOS7, Android 4.4
  6357. // (#6466 MutationObserver is unreliable in IE11)
  6358. var counter = 1;
  6359. var observer = new MutationObserver(flushCallbacks);
  6360. var textNode = document.createTextNode(String(counter));
  6361. observer.observe(textNode, {
  6362. characterData: true
  6363. });
  6364. timerFunc = function () {
  6365. counter = (counter + 1) % 2;
  6366. textNode.data = String(counter);
  6367. };
  6368. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  6369. // Fallback to setImmediate.
  6370. // Technically it leverages the (macro) task queue,
  6371. // but it is still a better choice than setTimeout.
  6372. timerFunc = function () {
  6373. setImmediate(flushCallbacks);
  6374. };
  6375. } else {
  6376. // Fallback to setTimeout.
  6377. timerFunc = function () {
  6378. setTimeout(flushCallbacks, 0);
  6379. };
  6380. }
  6381. function nextTick (cb, ctx) {
  6382. var _resolve;
  6383. callbacks.push(function () {
  6384. if (cb) {
  6385. try {
  6386. cb.call(ctx);
  6387. } catch (e) {
  6388. handleError(e, ctx, 'nextTick');
  6389. }
  6390. } else if (_resolve) {
  6391. _resolve(ctx);
  6392. }
  6393. });
  6394. if (!pending) {
  6395. pending = true;
  6396. timerFunc();
  6397. }
  6398. // $flow-disable-line
  6399. if (!cb && typeof Promise !== 'undefined') {
  6400. return new Promise(function (resolve) {
  6401. _resolve = resolve;
  6402. })
  6403. }
  6404. }
  6405. /* */
  6406. /* not type checking this file because flow doesn't play well with Proxy */
  6407. var initProxy;
  6408. if (true) {
  6409. var allowedGlobals = makeMap(
  6410. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  6411. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  6412. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  6413. 'require' // for Webpack/Browserify
  6414. );
  6415. var warnNonPresent = function (target, key) {
  6416. warn(
  6417. "Property or method \"" + key + "\" is not defined on the instance but " +
  6418. 'referenced during render. Make sure that this property is reactive, ' +
  6419. 'either in the data option, or for class-based components, by ' +
  6420. 'initializing the property. ' +
  6421. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  6422. target
  6423. );
  6424. };
  6425. var warnReservedPrefix = function (target, key) {
  6426. warn(
  6427. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  6428. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  6429. 'prevent conflicts with Vue internals. ' +
  6430. 'See: https://vuejs.org/v2/api/#data',
  6431. target
  6432. );
  6433. };
  6434. var hasProxy =
  6435. typeof Proxy !== 'undefined' && isNative(Proxy);
  6436. if (hasProxy) {
  6437. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  6438. config.keyCodes = new Proxy(config.keyCodes, {
  6439. set: function set (target, key, value) {
  6440. if (isBuiltInModifier(key)) {
  6441. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  6442. return false
  6443. } else {
  6444. target[key] = value;
  6445. return true
  6446. }
  6447. }
  6448. });
  6449. }
  6450. var hasHandler = {
  6451. has: function has (target, key) {
  6452. var has = key in target;
  6453. var isAllowed = allowedGlobals(key) ||
  6454. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  6455. if (!has && !isAllowed) {
  6456. if (key in target.$data) { warnReservedPrefix(target, key); }
  6457. else { warnNonPresent(target, key); }
  6458. }
  6459. return has || !isAllowed
  6460. }
  6461. };
  6462. var getHandler = {
  6463. get: function get (target, key) {
  6464. if (typeof key === 'string' && !(key in target)) {
  6465. if (key in target.$data) { warnReservedPrefix(target, key); }
  6466. else { warnNonPresent(target, key); }
  6467. }
  6468. return target[key]
  6469. }
  6470. };
  6471. initProxy = function initProxy (vm) {
  6472. if (hasProxy) {
  6473. // determine which proxy handler to use
  6474. var options = vm.$options;
  6475. var handlers = options.render && options.render._withStripped
  6476. ? getHandler
  6477. : hasHandler;
  6478. vm._renderProxy = new Proxy(vm, handlers);
  6479. } else {
  6480. vm._renderProxy = vm;
  6481. }
  6482. };
  6483. }
  6484. /* */
  6485. var seenObjects = new _Set();
  6486. /**
  6487. * Recursively traverse an object to evoke all converted
  6488. * getters, so that every nested property inside the object
  6489. * is collected as a "deep" dependency.
  6490. */
  6491. function traverse (val) {
  6492. _traverse(val, seenObjects);
  6493. seenObjects.clear();
  6494. }
  6495. function _traverse (val, seen) {
  6496. var i, keys;
  6497. var isA = Array.isArray(val);
  6498. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  6499. return
  6500. }
  6501. if (val.__ob__) {
  6502. var depId = val.__ob__.dep.id;
  6503. if (seen.has(depId)) {
  6504. return
  6505. }
  6506. seen.add(depId);
  6507. }
  6508. if (isA) {
  6509. i = val.length;
  6510. while (i--) { _traverse(val[i], seen); }
  6511. } else {
  6512. keys = Object.keys(val);
  6513. i = keys.length;
  6514. while (i--) { _traverse(val[keys[i]], seen); }
  6515. }
  6516. }
  6517. var mark;
  6518. var measure;
  6519. if (true) {
  6520. var perf = inBrowser && window.performance;
  6521. /* istanbul ignore if */
  6522. if (
  6523. perf &&
  6524. perf.mark &&
  6525. perf.measure &&
  6526. perf.clearMarks &&
  6527. perf.clearMeasures
  6528. ) {
  6529. mark = function (tag) { return perf.mark(tag); };
  6530. measure = function (name, startTag, endTag) {
  6531. perf.measure(name, startTag, endTag);
  6532. perf.clearMarks(startTag);
  6533. perf.clearMarks(endTag);
  6534. // perf.clearMeasures(name)
  6535. };
  6536. }
  6537. }
  6538. /* */
  6539. var normalizeEvent = cached(function (name) {
  6540. var passive = name.charAt(0) === '&';
  6541. name = passive ? name.slice(1) : name;
  6542. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  6543. name = once$$1 ? name.slice(1) : name;
  6544. var capture = name.charAt(0) === '!';
  6545. name = capture ? name.slice(1) : name;
  6546. return {
  6547. name: name,
  6548. once: once$$1,
  6549. capture: capture,
  6550. passive: passive
  6551. }
  6552. });
  6553. function createFnInvoker (fns, vm) {
  6554. function invoker () {
  6555. var arguments$1 = arguments;
  6556. var fns = invoker.fns;
  6557. if (Array.isArray(fns)) {
  6558. var cloned = fns.slice();
  6559. for (var i = 0; i < cloned.length; i++) {
  6560. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  6561. }
  6562. } else {
  6563. // return handler return value for single handlers
  6564. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  6565. }
  6566. }
  6567. invoker.fns = fns;
  6568. return invoker
  6569. }
  6570. function updateListeners (
  6571. on,
  6572. oldOn,
  6573. add,
  6574. remove$$1,
  6575. createOnceHandler,
  6576. vm
  6577. ) {
  6578. var name, def$$1, cur, old, event;
  6579. for (name in on) {
  6580. def$$1 = cur = on[name];
  6581. old = oldOn[name];
  6582. event = normalizeEvent(name);
  6583. if (isUndef(cur)) {
  6584. true && warn(
  6585. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  6586. vm
  6587. );
  6588. } else if (isUndef(old)) {
  6589. if (isUndef(cur.fns)) {
  6590. cur = on[name] = createFnInvoker(cur, vm);
  6591. }
  6592. if (isTrue(event.once)) {
  6593. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  6594. }
  6595. add(event.name, cur, event.capture, event.passive, event.params);
  6596. } else if (cur !== old) {
  6597. old.fns = cur;
  6598. on[name] = old;
  6599. }
  6600. }
  6601. for (name in oldOn) {
  6602. if (isUndef(on[name])) {
  6603. event = normalizeEvent(name);
  6604. remove$$1(event.name, oldOn[name], event.capture);
  6605. }
  6606. }
  6607. }
  6608. /* */
  6609. /* */
  6610. // fixed by xxxxxx (mp properties)
  6611. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  6612. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  6613. if (isUndef(propOptions)) {
  6614. return res
  6615. }
  6616. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  6617. var attrs = data.attrs;
  6618. var props = data.props;
  6619. if (isDef(attrs) || isDef(props)) {
  6620. for (var key in propOptions) {
  6621. var altKey = hyphenate(key);
  6622. var result = checkProp(res, props, key, altKey, true) ||
  6623. checkProp(res, attrs, key, altKey, false);
  6624. // externalClass
  6625. if (
  6626. result &&
  6627. res[key] &&
  6628. externalClasses.indexOf(altKey) !== -1 &&
  6629. context[camelize(res[key])]
  6630. ) {
  6631. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  6632. res[key] = context[camelize(res[key])];
  6633. }
  6634. }
  6635. }
  6636. return res
  6637. }
  6638. function extractPropsFromVNodeData (
  6639. data,
  6640. Ctor,
  6641. tag,
  6642. context// fixed by xxxxxx
  6643. ) {
  6644. // we are only extracting raw values here.
  6645. // validation and default values are handled in the child
  6646. // component itself.
  6647. var propOptions = Ctor.options.props;
  6648. if (isUndef(propOptions)) {
  6649. // fixed by xxxxxx
  6650. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  6651. }
  6652. var res = {};
  6653. var attrs = data.attrs;
  6654. var props = data.props;
  6655. if (isDef(attrs) || isDef(props)) {
  6656. for (var key in propOptions) {
  6657. var altKey = hyphenate(key);
  6658. if (true) {
  6659. var keyInLowerCase = key.toLowerCase();
  6660. if (
  6661. key !== keyInLowerCase &&
  6662. attrs && hasOwn(attrs, keyInLowerCase)
  6663. ) {
  6664. tip(
  6665. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  6666. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  6667. " \"" + key + "\". " +
  6668. "Note that HTML attributes are case-insensitive and camelCased " +
  6669. "props need to use their kebab-case equivalents when using in-DOM " +
  6670. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  6671. );
  6672. }
  6673. }
  6674. checkProp(res, props, key, altKey, true) ||
  6675. checkProp(res, attrs, key, altKey, false);
  6676. }
  6677. }
  6678. // fixed by xxxxxx
  6679. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  6680. }
  6681. function checkProp (
  6682. res,
  6683. hash,
  6684. key,
  6685. altKey,
  6686. preserve
  6687. ) {
  6688. if (isDef(hash)) {
  6689. if (hasOwn(hash, key)) {
  6690. res[key] = hash[key];
  6691. if (!preserve) {
  6692. delete hash[key];
  6693. }
  6694. return true
  6695. } else if (hasOwn(hash, altKey)) {
  6696. res[key] = hash[altKey];
  6697. if (!preserve) {
  6698. delete hash[altKey];
  6699. }
  6700. return true
  6701. }
  6702. }
  6703. return false
  6704. }
  6705. /* */
  6706. // The template compiler attempts to minimize the need for normalization by
  6707. // statically analyzing the template at compile time.
  6708. //
  6709. // For plain HTML markup, normalization can be completely skipped because the
  6710. // generated render function is guaranteed to return Array<VNode>. There are
  6711. // two cases where extra normalization is needed:
  6712. // 1. When the children contains components - because a functional component
  6713. // may return an Array instead of a single root. In this case, just a simple
  6714. // normalization is needed - if any child is an Array, we flatten the whole
  6715. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  6716. // because functional components already normalize their own children.
  6717. function simpleNormalizeChildren (children) {
  6718. for (var i = 0; i < children.length; i++) {
  6719. if (Array.isArray(children[i])) {
  6720. return Array.prototype.concat.apply([], children)
  6721. }
  6722. }
  6723. return children
  6724. }
  6725. // 2. When the children contains constructs that always generated nested Arrays,
  6726. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  6727. // with hand-written render functions / JSX. In such cases a full normalization
  6728. // is needed to cater to all possible types of children values.
  6729. function normalizeChildren (children) {
  6730. return isPrimitive(children)
  6731. ? [createTextVNode(children)]
  6732. : Array.isArray(children)
  6733. ? normalizeArrayChildren(children)
  6734. : undefined
  6735. }
  6736. function isTextNode (node) {
  6737. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  6738. }
  6739. function normalizeArrayChildren (children, nestedIndex) {
  6740. var res = [];
  6741. var i, c, lastIndex, last;
  6742. for (i = 0; i < children.length; i++) {
  6743. c = children[i];
  6744. if (isUndef(c) || typeof c === 'boolean') { continue }
  6745. lastIndex = res.length - 1;
  6746. last = res[lastIndex];
  6747. // nested
  6748. if (Array.isArray(c)) {
  6749. if (c.length > 0) {
  6750. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  6751. // merge adjacent text nodes
  6752. if (isTextNode(c[0]) && isTextNode(last)) {
  6753. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  6754. c.shift();
  6755. }
  6756. res.push.apply(res, c);
  6757. }
  6758. } else if (isPrimitive(c)) {
  6759. if (isTextNode(last)) {
  6760. // merge adjacent text nodes
  6761. // this is necessary for SSR hydration because text nodes are
  6762. // essentially merged when rendered to HTML strings
  6763. res[lastIndex] = createTextVNode(last.text + c);
  6764. } else if (c !== '') {
  6765. // convert primitive to vnode
  6766. res.push(createTextVNode(c));
  6767. }
  6768. } else {
  6769. if (isTextNode(c) && isTextNode(last)) {
  6770. // merge adjacent text nodes
  6771. res[lastIndex] = createTextVNode(last.text + c.text);
  6772. } else {
  6773. // default key for nested array children (likely generated by v-for)
  6774. if (isTrue(children._isVList) &&
  6775. isDef(c.tag) &&
  6776. isUndef(c.key) &&
  6777. isDef(nestedIndex)) {
  6778. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  6779. }
  6780. res.push(c);
  6781. }
  6782. }
  6783. }
  6784. return res
  6785. }
  6786. /* */
  6787. function initProvide (vm) {
  6788. var provide = vm.$options.provide;
  6789. if (provide) {
  6790. vm._provided = typeof provide === 'function'
  6791. ? provide.call(vm)
  6792. : provide;
  6793. }
  6794. }
  6795. function initInjections (vm) {
  6796. var result = resolveInject(vm.$options.inject, vm);
  6797. if (result) {
  6798. toggleObserving(false);
  6799. Object.keys(result).forEach(function (key) {
  6800. /* istanbul ignore else */
  6801. if (true) {
  6802. defineReactive$$1(vm, key, result[key], function () {
  6803. warn(
  6804. "Avoid mutating an injected value directly since the changes will be " +
  6805. "overwritten whenever the provided component re-renders. " +
  6806. "injection being mutated: \"" + key + "\"",
  6807. vm
  6808. );
  6809. });
  6810. } else {}
  6811. });
  6812. toggleObserving(true);
  6813. }
  6814. }
  6815. function resolveInject (inject, vm) {
  6816. if (inject) {
  6817. // inject is :any because flow is not smart enough to figure out cached
  6818. var result = Object.create(null);
  6819. var keys = hasSymbol
  6820. ? Reflect.ownKeys(inject)
  6821. : Object.keys(inject);
  6822. for (var i = 0; i < keys.length; i++) {
  6823. var key = keys[i];
  6824. // #6574 in case the inject object is observed...
  6825. if (key === '__ob__') { continue }
  6826. var provideKey = inject[key].from;
  6827. var source = vm;
  6828. while (source) {
  6829. if (source._provided && hasOwn(source._provided, provideKey)) {
  6830. result[key] = source._provided[provideKey];
  6831. break
  6832. }
  6833. source = source.$parent;
  6834. }
  6835. if (!source) {
  6836. if ('default' in inject[key]) {
  6837. var provideDefault = inject[key].default;
  6838. result[key] = typeof provideDefault === 'function'
  6839. ? provideDefault.call(vm)
  6840. : provideDefault;
  6841. } else if (true) {
  6842. warn(("Injection \"" + key + "\" not found"), vm);
  6843. }
  6844. }
  6845. }
  6846. return result
  6847. }
  6848. }
  6849. /* */
  6850. /**
  6851. * Runtime helper for resolving raw children VNodes into a slot object.
  6852. */
  6853. function resolveSlots (
  6854. children,
  6855. context
  6856. ) {
  6857. if (!children || !children.length) {
  6858. return {}
  6859. }
  6860. var slots = {};
  6861. for (var i = 0, l = children.length; i < l; i++) {
  6862. var child = children[i];
  6863. var data = child.data;
  6864. // remove slot attribute if the node is resolved as a Vue slot node
  6865. if (data && data.attrs && data.attrs.slot) {
  6866. delete data.attrs.slot;
  6867. }
  6868. // named slots should only be respected if the vnode was rendered in the
  6869. // same context.
  6870. if ((child.context === context || child.fnContext === context) &&
  6871. data && data.slot != null
  6872. ) {
  6873. var name = data.slot;
  6874. var slot = (slots[name] || (slots[name] = []));
  6875. if (child.tag === 'template') {
  6876. slot.push.apply(slot, child.children || []);
  6877. } else {
  6878. slot.push(child);
  6879. }
  6880. } else {
  6881. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  6882. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  6883. (slots['page'] || (slots['page'] = [])).push(child);
  6884. }else{
  6885. (slots.default || (slots.default = [])).push(child);
  6886. }
  6887. }
  6888. }
  6889. // ignore slots that contains only whitespace
  6890. for (var name$1 in slots) {
  6891. if (slots[name$1].every(isWhitespace)) {
  6892. delete slots[name$1];
  6893. }
  6894. }
  6895. return slots
  6896. }
  6897. function isWhitespace (node) {
  6898. return (node.isComment && !node.asyncFactory) || node.text === ' '
  6899. }
  6900. /* */
  6901. function normalizeScopedSlots (
  6902. slots,
  6903. normalSlots,
  6904. prevSlots
  6905. ) {
  6906. var res;
  6907. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  6908. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  6909. var key = slots && slots.$key;
  6910. if (!slots) {
  6911. res = {};
  6912. } else if (slots._normalized) {
  6913. // fast path 1: child component re-render only, parent did not change
  6914. return slots._normalized
  6915. } else if (
  6916. isStable &&
  6917. prevSlots &&
  6918. prevSlots !== emptyObject &&
  6919. key === prevSlots.$key &&
  6920. !hasNormalSlots &&
  6921. !prevSlots.$hasNormal
  6922. ) {
  6923. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  6924. // only need to normalize once
  6925. return prevSlots
  6926. } else {
  6927. res = {};
  6928. for (var key$1 in slots) {
  6929. if (slots[key$1] && key$1[0] !== '$') {
  6930. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  6931. }
  6932. }
  6933. }
  6934. // expose normal slots on scopedSlots
  6935. for (var key$2 in normalSlots) {
  6936. if (!(key$2 in res)) {
  6937. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  6938. }
  6939. }
  6940. // avoriaz seems to mock a non-extensible $scopedSlots object
  6941. // and when that is passed down this would cause an error
  6942. if (slots && Object.isExtensible(slots)) {
  6943. (slots)._normalized = res;
  6944. }
  6945. def(res, '$stable', isStable);
  6946. def(res, '$key', key);
  6947. def(res, '$hasNormal', hasNormalSlots);
  6948. return res
  6949. }
  6950. function normalizeScopedSlot(normalSlots, key, fn) {
  6951. var normalized = function () {
  6952. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  6953. res = res && typeof res === 'object' && !Array.isArray(res)
  6954. ? [res] // single vnode
  6955. : normalizeChildren(res);
  6956. return res && (
  6957. res.length === 0 ||
  6958. (res.length === 1 && res[0].isComment) // #9658
  6959. ) ? undefined
  6960. : res
  6961. };
  6962. // this is a slot using the new v-slot syntax without scope. although it is
  6963. // compiled as a scoped slot, render fn users would expect it to be present
  6964. // on this.$slots because the usage is semantically a normal slot.
  6965. if (fn.proxy) {
  6966. Object.defineProperty(normalSlots, key, {
  6967. get: normalized,
  6968. enumerable: true,
  6969. configurable: true
  6970. });
  6971. }
  6972. return normalized
  6973. }
  6974. function proxyNormalSlot(slots, key) {
  6975. return function () { return slots[key]; }
  6976. }
  6977. /* */
  6978. /**
  6979. * Runtime helper for rendering v-for lists.
  6980. */
  6981. function renderList (
  6982. val,
  6983. render
  6984. ) {
  6985. var ret, i, l, keys, key;
  6986. if (Array.isArray(val) || typeof val === 'string') {
  6987. ret = new Array(val.length);
  6988. for (i = 0, l = val.length; i < l; i++) {
  6989. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  6990. }
  6991. } else if (typeof val === 'number') {
  6992. ret = new Array(val);
  6993. for (i = 0; i < val; i++) {
  6994. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  6995. }
  6996. } else if (isObject(val)) {
  6997. if (hasSymbol && val[Symbol.iterator]) {
  6998. ret = [];
  6999. var iterator = val[Symbol.iterator]();
  7000. var result = iterator.next();
  7001. while (!result.done) {
  7002. ret.push(render(result.value, ret.length, i++, i)); // fixed by xxxxxx
  7003. result = iterator.next();
  7004. }
  7005. } else {
  7006. keys = Object.keys(val);
  7007. ret = new Array(keys.length);
  7008. for (i = 0, l = keys.length; i < l; i++) {
  7009. key = keys[i];
  7010. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  7011. }
  7012. }
  7013. }
  7014. if (!isDef(ret)) {
  7015. ret = [];
  7016. }
  7017. (ret)._isVList = true;
  7018. return ret
  7019. }
  7020. /* */
  7021. /**
  7022. * Runtime helper for rendering <slot>
  7023. */
  7024. function renderSlot (
  7025. name,
  7026. fallback,
  7027. props,
  7028. bindObject
  7029. ) {
  7030. var scopedSlotFn = this.$scopedSlots[name];
  7031. var nodes;
  7032. if (scopedSlotFn) { // scoped slot
  7033. props = props || {};
  7034. if (bindObject) {
  7035. if ( true && !isObject(bindObject)) {
  7036. warn(
  7037. 'slot v-bind without argument expects an Object',
  7038. this
  7039. );
  7040. }
  7041. props = extend(extend({}, bindObject), props);
  7042. }
  7043. // fixed by xxxxxx app-plus scopedSlot
  7044. nodes = scopedSlotFn(props, this, props._i) || fallback;
  7045. } else {
  7046. nodes = this.$slots[name] || fallback;
  7047. }
  7048. var target = props && props.slot;
  7049. if (target) {
  7050. return this.$createElement('template', { slot: target }, nodes)
  7051. } else {
  7052. return nodes
  7053. }
  7054. }
  7055. /* */
  7056. /**
  7057. * Runtime helper for resolving filters
  7058. */
  7059. function resolveFilter (id) {
  7060. return resolveAsset(this.$options, 'filters', id, true) || identity
  7061. }
  7062. /* */
  7063. function isKeyNotMatch (expect, actual) {
  7064. if (Array.isArray(expect)) {
  7065. return expect.indexOf(actual) === -1
  7066. } else {
  7067. return expect !== actual
  7068. }
  7069. }
  7070. /**
  7071. * Runtime helper for checking keyCodes from config.
  7072. * exposed as Vue.prototype._k
  7073. * passing in eventKeyName as last argument separately for backwards compat
  7074. */
  7075. function checkKeyCodes (
  7076. eventKeyCode,
  7077. key,
  7078. builtInKeyCode,
  7079. eventKeyName,
  7080. builtInKeyName
  7081. ) {
  7082. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  7083. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  7084. return isKeyNotMatch(builtInKeyName, eventKeyName)
  7085. } else if (mappedKeyCode) {
  7086. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  7087. } else if (eventKeyName) {
  7088. return hyphenate(eventKeyName) !== key
  7089. }
  7090. }
  7091. /* */
  7092. /**
  7093. * Runtime helper for merging v-bind="object" into a VNode's data.
  7094. */
  7095. function bindObjectProps (
  7096. data,
  7097. tag,
  7098. value,
  7099. asProp,
  7100. isSync
  7101. ) {
  7102. if (value) {
  7103. if (!isObject(value)) {
  7104. true && warn(
  7105. 'v-bind without argument expects an Object or Array value',
  7106. this
  7107. );
  7108. } else {
  7109. if (Array.isArray(value)) {
  7110. value = toObject(value);
  7111. }
  7112. var hash;
  7113. var loop = function ( key ) {
  7114. if (
  7115. key === 'class' ||
  7116. key === 'style' ||
  7117. isReservedAttribute(key)
  7118. ) {
  7119. hash = data;
  7120. } else {
  7121. var type = data.attrs && data.attrs.type;
  7122. hash = asProp || config.mustUseProp(tag, type, key)
  7123. ? data.domProps || (data.domProps = {})
  7124. : data.attrs || (data.attrs = {});
  7125. }
  7126. var camelizedKey = camelize(key);
  7127. var hyphenatedKey = hyphenate(key);
  7128. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  7129. hash[key] = value[key];
  7130. if (isSync) {
  7131. var on = data.on || (data.on = {});
  7132. on[("update:" + key)] = function ($event) {
  7133. value[key] = $event;
  7134. };
  7135. }
  7136. }
  7137. };
  7138. for (var key in value) loop( key );
  7139. }
  7140. }
  7141. return data
  7142. }
  7143. /* */
  7144. /**
  7145. * Runtime helper for rendering static trees.
  7146. */
  7147. function renderStatic (
  7148. index,
  7149. isInFor
  7150. ) {
  7151. var cached = this._staticTrees || (this._staticTrees = []);
  7152. var tree = cached[index];
  7153. // if has already-rendered static tree and not inside v-for,
  7154. // we can reuse the same tree.
  7155. if (tree && !isInFor) {
  7156. return tree
  7157. }
  7158. // otherwise, render a fresh tree.
  7159. tree = cached[index] = this.$options.staticRenderFns[index].call(
  7160. this._renderProxy,
  7161. null,
  7162. this // for render fns generated for functional component templates
  7163. );
  7164. markStatic(tree, ("__static__" + index), false);
  7165. return tree
  7166. }
  7167. /**
  7168. * Runtime helper for v-once.
  7169. * Effectively it means marking the node as static with a unique key.
  7170. */
  7171. function markOnce (
  7172. tree,
  7173. index,
  7174. key
  7175. ) {
  7176. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  7177. return tree
  7178. }
  7179. function markStatic (
  7180. tree,
  7181. key,
  7182. isOnce
  7183. ) {
  7184. if (Array.isArray(tree)) {
  7185. for (var i = 0; i < tree.length; i++) {
  7186. if (tree[i] && typeof tree[i] !== 'string') {
  7187. markStaticNode(tree[i], (key + "_" + i), isOnce);
  7188. }
  7189. }
  7190. } else {
  7191. markStaticNode(tree, key, isOnce);
  7192. }
  7193. }
  7194. function markStaticNode (node, key, isOnce) {
  7195. node.isStatic = true;
  7196. node.key = key;
  7197. node.isOnce = isOnce;
  7198. }
  7199. /* */
  7200. function bindObjectListeners (data, value) {
  7201. if (value) {
  7202. if (!isPlainObject(value)) {
  7203. true && warn(
  7204. 'v-on without argument expects an Object value',
  7205. this
  7206. );
  7207. } else {
  7208. var on = data.on = data.on ? extend({}, data.on) : {};
  7209. for (var key in value) {
  7210. var existing = on[key];
  7211. var ours = value[key];
  7212. on[key] = existing ? [].concat(existing, ours) : ours;
  7213. }
  7214. }
  7215. }
  7216. return data
  7217. }
  7218. /* */
  7219. function resolveScopedSlots (
  7220. fns, // see flow/vnode
  7221. res,
  7222. // the following are added in 2.6
  7223. hasDynamicKeys,
  7224. contentHashKey
  7225. ) {
  7226. res = res || { $stable: !hasDynamicKeys };
  7227. for (var i = 0; i < fns.length; i++) {
  7228. var slot = fns[i];
  7229. if (Array.isArray(slot)) {
  7230. resolveScopedSlots(slot, res, hasDynamicKeys);
  7231. } else if (slot) {
  7232. // marker for reverse proxying v-slot without scope on this.$slots
  7233. if (slot.proxy) {
  7234. slot.fn.proxy = true;
  7235. }
  7236. res[slot.key] = slot.fn;
  7237. }
  7238. }
  7239. if (contentHashKey) {
  7240. (res).$key = contentHashKey;
  7241. }
  7242. return res
  7243. }
  7244. /* */
  7245. function bindDynamicKeys (baseObj, values) {
  7246. for (var i = 0; i < values.length; i += 2) {
  7247. var key = values[i];
  7248. if (typeof key === 'string' && key) {
  7249. baseObj[values[i]] = values[i + 1];
  7250. } else if ( true && key !== '' && key !== null) {
  7251. // null is a special value for explicitly removing a binding
  7252. warn(
  7253. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  7254. this
  7255. );
  7256. }
  7257. }
  7258. return baseObj
  7259. }
  7260. // helper to dynamically append modifier runtime markers to event names.
  7261. // ensure only append when value is already string, otherwise it will be cast
  7262. // to string and cause the type check to miss.
  7263. function prependModifier (value, symbol) {
  7264. return typeof value === 'string' ? symbol + value : value
  7265. }
  7266. /* */
  7267. function installRenderHelpers (target) {
  7268. target._o = markOnce;
  7269. target._n = toNumber;
  7270. target._s = toString;
  7271. target._l = renderList;
  7272. target._t = renderSlot;
  7273. target._q = looseEqual;
  7274. target._i = looseIndexOf;
  7275. target._m = renderStatic;
  7276. target._f = resolveFilter;
  7277. target._k = checkKeyCodes;
  7278. target._b = bindObjectProps;
  7279. target._v = createTextVNode;
  7280. target._e = createEmptyVNode;
  7281. target._u = resolveScopedSlots;
  7282. target._g = bindObjectListeners;
  7283. target._d = bindDynamicKeys;
  7284. target._p = prependModifier;
  7285. }
  7286. /* */
  7287. function FunctionalRenderContext (
  7288. data,
  7289. props,
  7290. children,
  7291. parent,
  7292. Ctor
  7293. ) {
  7294. var this$1 = this;
  7295. var options = Ctor.options;
  7296. // ensure the createElement function in functional components
  7297. // gets a unique context - this is necessary for correct named slot check
  7298. var contextVm;
  7299. if (hasOwn(parent, '_uid')) {
  7300. contextVm = Object.create(parent);
  7301. // $flow-disable-line
  7302. contextVm._original = parent;
  7303. } else {
  7304. // the context vm passed in is a functional context as well.
  7305. // in this case we want to make sure we are able to get a hold to the
  7306. // real context instance.
  7307. contextVm = parent;
  7308. // $flow-disable-line
  7309. parent = parent._original;
  7310. }
  7311. var isCompiled = isTrue(options._compiled);
  7312. var needNormalization = !isCompiled;
  7313. this.data = data;
  7314. this.props = props;
  7315. this.children = children;
  7316. this.parent = parent;
  7317. this.listeners = data.on || emptyObject;
  7318. this.injections = resolveInject(options.inject, parent);
  7319. this.slots = function () {
  7320. if (!this$1.$slots) {
  7321. normalizeScopedSlots(
  7322. data.scopedSlots,
  7323. this$1.$slots = resolveSlots(children, parent)
  7324. );
  7325. }
  7326. return this$1.$slots
  7327. };
  7328. Object.defineProperty(this, 'scopedSlots', ({
  7329. enumerable: true,
  7330. get: function get () {
  7331. return normalizeScopedSlots(data.scopedSlots, this.slots())
  7332. }
  7333. }));
  7334. // support for compiled functional template
  7335. if (isCompiled) {
  7336. // exposing $options for renderStatic()
  7337. this.$options = options;
  7338. // pre-resolve slots for renderSlot()
  7339. this.$slots = this.slots();
  7340. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  7341. }
  7342. if (options._scopeId) {
  7343. this._c = function (a, b, c, d) {
  7344. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  7345. if (vnode && !Array.isArray(vnode)) {
  7346. vnode.fnScopeId = options._scopeId;
  7347. vnode.fnContext = parent;
  7348. }
  7349. return vnode
  7350. };
  7351. } else {
  7352. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  7353. }
  7354. }
  7355. installRenderHelpers(FunctionalRenderContext.prototype);
  7356. function createFunctionalComponent (
  7357. Ctor,
  7358. propsData,
  7359. data,
  7360. contextVm,
  7361. children
  7362. ) {
  7363. var options = Ctor.options;
  7364. var props = {};
  7365. var propOptions = options.props;
  7366. if (isDef(propOptions)) {
  7367. for (var key in propOptions) {
  7368. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  7369. }
  7370. } else {
  7371. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  7372. if (isDef(data.props)) { mergeProps(props, data.props); }
  7373. }
  7374. var renderContext = new FunctionalRenderContext(
  7375. data,
  7376. props,
  7377. children,
  7378. contextVm,
  7379. Ctor
  7380. );
  7381. var vnode = options.render.call(null, renderContext._c, renderContext);
  7382. if (vnode instanceof VNode) {
  7383. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  7384. } else if (Array.isArray(vnode)) {
  7385. var vnodes = normalizeChildren(vnode) || [];
  7386. var res = new Array(vnodes.length);
  7387. for (var i = 0; i < vnodes.length; i++) {
  7388. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  7389. }
  7390. return res
  7391. }
  7392. }
  7393. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  7394. // #7817 clone node before setting fnContext, otherwise if the node is reused
  7395. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  7396. // that should not be matched to match.
  7397. var clone = cloneVNode(vnode);
  7398. clone.fnContext = contextVm;
  7399. clone.fnOptions = options;
  7400. if (true) {
  7401. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  7402. }
  7403. if (data.slot) {
  7404. (clone.data || (clone.data = {})).slot = data.slot;
  7405. }
  7406. return clone
  7407. }
  7408. function mergeProps (to, from) {
  7409. for (var key in from) {
  7410. to[camelize(key)] = from[key];
  7411. }
  7412. }
  7413. /* */
  7414. /* */
  7415. /* */
  7416. /* */
  7417. // inline hooks to be invoked on component VNodes during patch
  7418. var componentVNodeHooks = {
  7419. init: function init (vnode, hydrating) {
  7420. if (
  7421. vnode.componentInstance &&
  7422. !vnode.componentInstance._isDestroyed &&
  7423. vnode.data.keepAlive
  7424. ) {
  7425. // kept-alive components, treat as a patch
  7426. var mountedNode = vnode; // work around flow
  7427. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  7428. } else {
  7429. var child = vnode.componentInstance = createComponentInstanceForVnode(
  7430. vnode,
  7431. activeInstance
  7432. );
  7433. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  7434. }
  7435. },
  7436. prepatch: function prepatch (oldVnode, vnode) {
  7437. var options = vnode.componentOptions;
  7438. var child = vnode.componentInstance = oldVnode.componentInstance;
  7439. updateChildComponent(
  7440. child,
  7441. options.propsData, // updated props
  7442. options.listeners, // updated listeners
  7443. vnode, // new parent vnode
  7444. options.children // new children
  7445. );
  7446. },
  7447. insert: function insert (vnode) {
  7448. var context = vnode.context;
  7449. var componentInstance = vnode.componentInstance;
  7450. if (!componentInstance._isMounted) {
  7451. callHook(componentInstance, 'onServiceCreated');
  7452. callHook(componentInstance, 'onServiceAttached');
  7453. componentInstance._isMounted = true;
  7454. callHook(componentInstance, 'mounted');
  7455. }
  7456. if (vnode.data.keepAlive) {
  7457. if (context._isMounted) {
  7458. // vue-router#1212
  7459. // During updates, a kept-alive component's child components may
  7460. // change, so directly walking the tree here may call activated hooks
  7461. // on incorrect children. Instead we push them into a queue which will
  7462. // be processed after the whole patch process ended.
  7463. queueActivatedComponent(componentInstance);
  7464. } else {
  7465. activateChildComponent(componentInstance, true /* direct */);
  7466. }
  7467. }
  7468. },
  7469. destroy: function destroy (vnode) {
  7470. var componentInstance = vnode.componentInstance;
  7471. if (!componentInstance._isDestroyed) {
  7472. if (!vnode.data.keepAlive) {
  7473. componentInstance.$destroy();
  7474. } else {
  7475. deactivateChildComponent(componentInstance, true /* direct */);
  7476. }
  7477. }
  7478. }
  7479. };
  7480. var hooksToMerge = Object.keys(componentVNodeHooks);
  7481. function createComponent (
  7482. Ctor,
  7483. data,
  7484. context,
  7485. children,
  7486. tag
  7487. ) {
  7488. if (isUndef(Ctor)) {
  7489. return
  7490. }
  7491. var baseCtor = context.$options._base;
  7492. // plain options object: turn it into a constructor
  7493. if (isObject(Ctor)) {
  7494. Ctor = baseCtor.extend(Ctor);
  7495. }
  7496. // if at this stage it's not a constructor or an async component factory,
  7497. // reject.
  7498. if (typeof Ctor !== 'function') {
  7499. if (true) {
  7500. warn(("Invalid Component definition: " + (String(Ctor))), context);
  7501. }
  7502. return
  7503. }
  7504. // async component
  7505. var asyncFactory;
  7506. if (isUndef(Ctor.cid)) {
  7507. asyncFactory = Ctor;
  7508. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  7509. if (Ctor === undefined) {
  7510. // return a placeholder node for async component, which is rendered
  7511. // as a comment node but preserves all the raw information for the node.
  7512. // the information will be used for async server-rendering and hydration.
  7513. return createAsyncPlaceholder(
  7514. asyncFactory,
  7515. data,
  7516. context,
  7517. children,
  7518. tag
  7519. )
  7520. }
  7521. }
  7522. data = data || {};
  7523. // resolve constructor options in case global mixins are applied after
  7524. // component constructor creation
  7525. resolveConstructorOptions(Ctor);
  7526. // transform component v-model data into props & events
  7527. if (isDef(data.model)) {
  7528. transformModel(Ctor.options, data);
  7529. }
  7530. // extract props
  7531. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  7532. // functional component
  7533. if (isTrue(Ctor.options.functional)) {
  7534. return createFunctionalComponent(Ctor, propsData, data, context, children)
  7535. }
  7536. // extract listeners, since these needs to be treated as
  7537. // child component listeners instead of DOM listeners
  7538. var listeners = data.on;
  7539. // replace with listeners with .native modifier
  7540. // so it gets processed during parent component patch.
  7541. data.on = data.nativeOn;
  7542. if (isTrue(Ctor.options.abstract)) {
  7543. // abstract components do not keep anything
  7544. // other than props & listeners & slot
  7545. // work around flow
  7546. var slot = data.slot;
  7547. data = {};
  7548. if (slot) {
  7549. data.slot = slot;
  7550. }
  7551. }
  7552. // install component management hooks onto the placeholder node
  7553. installComponentHooks(data);
  7554. // return a placeholder vnode
  7555. var name = Ctor.options.name || tag;
  7556. var vnode = new VNode(
  7557. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  7558. data, undefined, undefined, undefined, context,
  7559. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  7560. asyncFactory
  7561. );
  7562. return vnode
  7563. }
  7564. function createComponentInstanceForVnode (
  7565. vnode, // we know it's MountedComponentVNode but flow doesn't
  7566. parent // activeInstance in lifecycle state
  7567. ) {
  7568. var options = {
  7569. _isComponent: true,
  7570. _parentVnode: vnode,
  7571. parent: parent
  7572. };
  7573. // check inline-template render functions
  7574. var inlineTemplate = vnode.data.inlineTemplate;
  7575. if (isDef(inlineTemplate)) {
  7576. options.render = inlineTemplate.render;
  7577. options.staticRenderFns = inlineTemplate.staticRenderFns;
  7578. }
  7579. return new vnode.componentOptions.Ctor(options)
  7580. }
  7581. function installComponentHooks (data) {
  7582. var hooks = data.hook || (data.hook = {});
  7583. for (var i = 0; i < hooksToMerge.length; i++) {
  7584. var key = hooksToMerge[i];
  7585. var existing = hooks[key];
  7586. var toMerge = componentVNodeHooks[key];
  7587. if (existing !== toMerge && !(existing && existing._merged)) {
  7588. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  7589. }
  7590. }
  7591. }
  7592. function mergeHook$1 (f1, f2) {
  7593. var merged = function (a, b) {
  7594. // flow complains about extra args which is why we use any
  7595. f1(a, b);
  7596. f2(a, b);
  7597. };
  7598. merged._merged = true;
  7599. return merged
  7600. }
  7601. // transform component v-model info (value and callback) into
  7602. // prop and event handler respectively.
  7603. function transformModel (options, data) {
  7604. var prop = (options.model && options.model.prop) || 'value';
  7605. var event = (options.model && options.model.event) || 'input'
  7606. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  7607. var on = data.on || (data.on = {});
  7608. var existing = on[event];
  7609. var callback = data.model.callback;
  7610. if (isDef(existing)) {
  7611. if (
  7612. Array.isArray(existing)
  7613. ? existing.indexOf(callback) === -1
  7614. : existing !== callback
  7615. ) {
  7616. on[event] = [callback].concat(existing);
  7617. }
  7618. } else {
  7619. on[event] = callback;
  7620. }
  7621. }
  7622. /* */
  7623. var SIMPLE_NORMALIZE = 1;
  7624. var ALWAYS_NORMALIZE = 2;
  7625. // wrapper function for providing a more flexible interface
  7626. // without getting yelled at by flow
  7627. function createElement (
  7628. context,
  7629. tag,
  7630. data,
  7631. children,
  7632. normalizationType,
  7633. alwaysNormalize
  7634. ) {
  7635. if (Array.isArray(data) || isPrimitive(data)) {
  7636. normalizationType = children;
  7637. children = data;
  7638. data = undefined;
  7639. }
  7640. if (isTrue(alwaysNormalize)) {
  7641. normalizationType = ALWAYS_NORMALIZE;
  7642. }
  7643. return _createElement(context, tag, data, children, normalizationType)
  7644. }
  7645. function _createElement (
  7646. context,
  7647. tag,
  7648. data,
  7649. children,
  7650. normalizationType
  7651. ) {
  7652. if (isDef(data) && isDef((data).__ob__)) {
  7653. true && warn(
  7654. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  7655. 'Always create fresh vnode data objects in each render!',
  7656. context
  7657. );
  7658. return createEmptyVNode()
  7659. }
  7660. // object syntax in v-bind
  7661. if (isDef(data) && isDef(data.is)) {
  7662. tag = data.is;
  7663. }
  7664. if (!tag) {
  7665. // in case of component :is set to falsy value
  7666. return createEmptyVNode()
  7667. }
  7668. // warn against non-primitive key
  7669. if ( true &&
  7670. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  7671. ) {
  7672. {
  7673. warn(
  7674. 'Avoid using non-primitive value as key, ' +
  7675. 'use string/number value instead.',
  7676. context
  7677. );
  7678. }
  7679. }
  7680. // support single function children as default scoped slot
  7681. if (Array.isArray(children) &&
  7682. typeof children[0] === 'function'
  7683. ) {
  7684. data = data || {};
  7685. data.scopedSlots = { default: children[0] };
  7686. children.length = 0;
  7687. }
  7688. if (normalizationType === ALWAYS_NORMALIZE) {
  7689. children = normalizeChildren(children);
  7690. } else if (normalizationType === SIMPLE_NORMALIZE) {
  7691. children = simpleNormalizeChildren(children);
  7692. }
  7693. var vnode, ns;
  7694. if (typeof tag === 'string') {
  7695. var Ctor;
  7696. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  7697. if (config.isReservedTag(tag)) {
  7698. // platform built-in elements
  7699. if ( true && isDef(data) && isDef(data.nativeOn)) {
  7700. warn(
  7701. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  7702. context
  7703. );
  7704. }
  7705. vnode = new VNode(
  7706. config.parsePlatformTagName(tag), data, children,
  7707. undefined, undefined, context
  7708. );
  7709. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  7710. // component
  7711. vnode = createComponent(Ctor, data, context, children, tag);
  7712. } else {
  7713. // unknown or unlisted namespaced elements
  7714. // check at runtime because it may get assigned a namespace when its
  7715. // parent normalizes children
  7716. vnode = new VNode(
  7717. tag, data, children,
  7718. undefined, undefined, context
  7719. );
  7720. }
  7721. } else {
  7722. // direct component options / constructor
  7723. vnode = createComponent(tag, data, context, children);
  7724. }
  7725. if (Array.isArray(vnode)) {
  7726. return vnode
  7727. } else if (isDef(vnode)) {
  7728. if (isDef(ns)) { applyNS(vnode, ns); }
  7729. if (isDef(data)) { registerDeepBindings(data); }
  7730. return vnode
  7731. } else {
  7732. return createEmptyVNode()
  7733. }
  7734. }
  7735. function applyNS (vnode, ns, force) {
  7736. vnode.ns = ns;
  7737. if (vnode.tag === 'foreignObject') {
  7738. // use default namespace inside foreignObject
  7739. ns = undefined;
  7740. force = true;
  7741. }
  7742. if (isDef(vnode.children)) {
  7743. for (var i = 0, l = vnode.children.length; i < l; i++) {
  7744. var child = vnode.children[i];
  7745. if (isDef(child.tag) && (
  7746. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  7747. applyNS(child, ns, force);
  7748. }
  7749. }
  7750. }
  7751. }
  7752. // ref #5318
  7753. // necessary to ensure parent re-render when deep bindings like :style and
  7754. // :class are used on slot nodes
  7755. function registerDeepBindings (data) {
  7756. if (isObject(data.style)) {
  7757. traverse(data.style);
  7758. }
  7759. if (isObject(data.class)) {
  7760. traverse(data.class);
  7761. }
  7762. }
  7763. /* */
  7764. function initRender (vm) {
  7765. vm._vnode = null; // the root of the child tree
  7766. vm._staticTrees = null; // v-once cached trees
  7767. var options = vm.$options;
  7768. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  7769. var renderContext = parentVnode && parentVnode.context;
  7770. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  7771. vm.$scopedSlots = emptyObject;
  7772. // bind the createElement fn to this instance
  7773. // so that we get proper render context inside it.
  7774. // args order: tag, data, children, normalizationType, alwaysNormalize
  7775. // internal version is used by render functions compiled from templates
  7776. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  7777. // normalization is always applied for the public version, used in
  7778. // user-written render functions.
  7779. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  7780. // $attrs & $listeners are exposed for easier HOC creation.
  7781. // they need to be reactive so that HOCs using them are always updated
  7782. var parentData = parentVnode && parentVnode.data;
  7783. /* istanbul ignore else */
  7784. if (true) {
  7785. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  7786. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  7787. }, true);
  7788. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  7789. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  7790. }, true);
  7791. } else {}
  7792. }
  7793. var currentRenderingInstance = null;
  7794. function renderMixin (Vue) {
  7795. // install runtime convenience helpers
  7796. installRenderHelpers(Vue.prototype);
  7797. Vue.prototype.$nextTick = function (fn) {
  7798. return nextTick(fn, this)
  7799. };
  7800. Vue.prototype._render = function () {
  7801. var vm = this;
  7802. var ref = vm.$options;
  7803. var render = ref.render;
  7804. var _parentVnode = ref._parentVnode;
  7805. if (_parentVnode) {
  7806. vm.$scopedSlots = normalizeScopedSlots(
  7807. _parentVnode.data.scopedSlots,
  7808. vm.$slots,
  7809. vm.$scopedSlots
  7810. );
  7811. }
  7812. // set parent vnode. this allows render functions to have access
  7813. // to the data on the placeholder node.
  7814. vm.$vnode = _parentVnode;
  7815. // render self
  7816. var vnode;
  7817. try {
  7818. // There's no need to maintain a stack because all render fns are called
  7819. // separately from one another. Nested component's render fns are called
  7820. // when parent component is patched.
  7821. currentRenderingInstance = vm;
  7822. vnode = render.call(vm._renderProxy, vm.$createElement);
  7823. } catch (e) {
  7824. handleError(e, vm, "render");
  7825. // return error render result,
  7826. // or previous vnode to prevent render error causing blank component
  7827. /* istanbul ignore else */
  7828. if ( true && vm.$options.renderError) {
  7829. try {
  7830. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  7831. } catch (e) {
  7832. handleError(e, vm, "renderError");
  7833. vnode = vm._vnode;
  7834. }
  7835. } else {
  7836. vnode = vm._vnode;
  7837. }
  7838. } finally {
  7839. currentRenderingInstance = null;
  7840. }
  7841. // if the returned array contains only a single node, allow it
  7842. if (Array.isArray(vnode) && vnode.length === 1) {
  7843. vnode = vnode[0];
  7844. }
  7845. // return empty vnode in case the render function errored out
  7846. if (!(vnode instanceof VNode)) {
  7847. if ( true && Array.isArray(vnode)) {
  7848. warn(
  7849. 'Multiple root nodes returned from render function. Render function ' +
  7850. 'should return a single root node.',
  7851. vm
  7852. );
  7853. }
  7854. vnode = createEmptyVNode();
  7855. }
  7856. // set parent
  7857. vnode.parent = _parentVnode;
  7858. return vnode
  7859. };
  7860. }
  7861. /* */
  7862. function ensureCtor (comp, base) {
  7863. if (
  7864. comp.__esModule ||
  7865. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  7866. ) {
  7867. comp = comp.default;
  7868. }
  7869. return isObject(comp)
  7870. ? base.extend(comp)
  7871. : comp
  7872. }
  7873. function createAsyncPlaceholder (
  7874. factory,
  7875. data,
  7876. context,
  7877. children,
  7878. tag
  7879. ) {
  7880. var node = createEmptyVNode();
  7881. node.asyncFactory = factory;
  7882. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  7883. return node
  7884. }
  7885. function resolveAsyncComponent (
  7886. factory,
  7887. baseCtor
  7888. ) {
  7889. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  7890. return factory.errorComp
  7891. }
  7892. if (isDef(factory.resolved)) {
  7893. return factory.resolved
  7894. }
  7895. var owner = currentRenderingInstance;
  7896. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  7897. // already pending
  7898. factory.owners.push(owner);
  7899. }
  7900. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  7901. return factory.loadingComp
  7902. }
  7903. if (owner && !isDef(factory.owners)) {
  7904. var owners = factory.owners = [owner];
  7905. var sync = true;
  7906. var timerLoading = null;
  7907. var timerTimeout = null
  7908. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  7909. var forceRender = function (renderCompleted) {
  7910. for (var i = 0, l = owners.length; i < l; i++) {
  7911. (owners[i]).$forceUpdate();
  7912. }
  7913. if (renderCompleted) {
  7914. owners.length = 0;
  7915. if (timerLoading !== null) {
  7916. clearTimeout(timerLoading);
  7917. timerLoading = null;
  7918. }
  7919. if (timerTimeout !== null) {
  7920. clearTimeout(timerTimeout);
  7921. timerTimeout = null;
  7922. }
  7923. }
  7924. };
  7925. var resolve = once(function (res) {
  7926. // cache resolved
  7927. factory.resolved = ensureCtor(res, baseCtor);
  7928. // invoke callbacks only if this is not a synchronous resolve
  7929. // (async resolves are shimmed as synchronous during SSR)
  7930. if (!sync) {
  7931. forceRender(true);
  7932. } else {
  7933. owners.length = 0;
  7934. }
  7935. });
  7936. var reject = once(function (reason) {
  7937. true && warn(
  7938. "Failed to resolve async component: " + (String(factory)) +
  7939. (reason ? ("\nReason: " + reason) : '')
  7940. );
  7941. if (isDef(factory.errorComp)) {
  7942. factory.error = true;
  7943. forceRender(true);
  7944. }
  7945. });
  7946. var res = factory(resolve, reject);
  7947. if (isObject(res)) {
  7948. if (isPromise(res)) {
  7949. // () => Promise
  7950. if (isUndef(factory.resolved)) {
  7951. res.then(resolve, reject);
  7952. }
  7953. } else if (isPromise(res.component)) {
  7954. res.component.then(resolve, reject);
  7955. if (isDef(res.error)) {
  7956. factory.errorComp = ensureCtor(res.error, baseCtor);
  7957. }
  7958. if (isDef(res.loading)) {
  7959. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  7960. if (res.delay === 0) {
  7961. factory.loading = true;
  7962. } else {
  7963. timerLoading = setTimeout(function () {
  7964. timerLoading = null;
  7965. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  7966. factory.loading = true;
  7967. forceRender(false);
  7968. }
  7969. }, res.delay || 200);
  7970. }
  7971. }
  7972. if (isDef(res.timeout)) {
  7973. timerTimeout = setTimeout(function () {
  7974. timerTimeout = null;
  7975. if (isUndef(factory.resolved)) {
  7976. reject(
  7977. true
  7978. ? ("timeout (" + (res.timeout) + "ms)")
  7979. : undefined
  7980. );
  7981. }
  7982. }, res.timeout);
  7983. }
  7984. }
  7985. }
  7986. sync = false;
  7987. // return in case resolved synchronously
  7988. return factory.loading
  7989. ? factory.loadingComp
  7990. : factory.resolved
  7991. }
  7992. }
  7993. /* */
  7994. function isAsyncPlaceholder (node) {
  7995. return node.isComment && node.asyncFactory
  7996. }
  7997. /* */
  7998. function getFirstComponentChild (children) {
  7999. if (Array.isArray(children)) {
  8000. for (var i = 0; i < children.length; i++) {
  8001. var c = children[i];
  8002. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  8003. return c
  8004. }
  8005. }
  8006. }
  8007. }
  8008. /* */
  8009. /* */
  8010. function initEvents (vm) {
  8011. vm._events = Object.create(null);
  8012. vm._hasHookEvent = false;
  8013. // init parent attached events
  8014. var listeners = vm.$options._parentListeners;
  8015. if (listeners) {
  8016. updateComponentListeners(vm, listeners);
  8017. }
  8018. }
  8019. var target;
  8020. function add (event, fn) {
  8021. target.$on(event, fn);
  8022. }
  8023. function remove$1 (event, fn) {
  8024. target.$off(event, fn);
  8025. }
  8026. function createOnceHandler (event, fn) {
  8027. var _target = target;
  8028. return function onceHandler () {
  8029. var res = fn.apply(null, arguments);
  8030. if (res !== null) {
  8031. _target.$off(event, onceHandler);
  8032. }
  8033. }
  8034. }
  8035. function updateComponentListeners (
  8036. vm,
  8037. listeners,
  8038. oldListeners
  8039. ) {
  8040. target = vm;
  8041. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  8042. target = undefined;
  8043. }
  8044. function eventsMixin (Vue) {
  8045. var hookRE = /^hook:/;
  8046. Vue.prototype.$on = function (event, fn) {
  8047. var vm = this;
  8048. if (Array.isArray(event)) {
  8049. for (var i = 0, l = event.length; i < l; i++) {
  8050. vm.$on(event[i], fn);
  8051. }
  8052. } else {
  8053. (vm._events[event] || (vm._events[event] = [])).push(fn);
  8054. // optimize hook:event cost by using a boolean flag marked at registration
  8055. // instead of a hash lookup
  8056. if (hookRE.test(event)) {
  8057. vm._hasHookEvent = true;
  8058. }
  8059. }
  8060. return vm
  8061. };
  8062. Vue.prototype.$once = function (event, fn) {
  8063. var vm = this;
  8064. function on () {
  8065. vm.$off(event, on);
  8066. fn.apply(vm, arguments);
  8067. }
  8068. on.fn = fn;
  8069. vm.$on(event, on);
  8070. return vm
  8071. };
  8072. Vue.prototype.$off = function (event, fn) {
  8073. var vm = this;
  8074. // all
  8075. if (!arguments.length) {
  8076. vm._events = Object.create(null);
  8077. return vm
  8078. }
  8079. // array of events
  8080. if (Array.isArray(event)) {
  8081. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  8082. vm.$off(event[i$1], fn);
  8083. }
  8084. return vm
  8085. }
  8086. // specific event
  8087. var cbs = vm._events[event];
  8088. if (!cbs) {
  8089. return vm
  8090. }
  8091. if (!fn) {
  8092. vm._events[event] = null;
  8093. return vm
  8094. }
  8095. // specific handler
  8096. var cb;
  8097. var i = cbs.length;
  8098. while (i--) {
  8099. cb = cbs[i];
  8100. if (cb === fn || cb.fn === fn) {
  8101. cbs.splice(i, 1);
  8102. break
  8103. }
  8104. }
  8105. return vm
  8106. };
  8107. Vue.prototype.$emit = function (event) {
  8108. var vm = this;
  8109. if (true) {
  8110. var lowerCaseEvent = event.toLowerCase();
  8111. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  8112. tip(
  8113. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  8114. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  8115. "Note that HTML attributes are case-insensitive and you cannot use " +
  8116. "v-on to listen to camelCase events when using in-DOM templates. " +
  8117. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  8118. );
  8119. }
  8120. }
  8121. var cbs = vm._events[event];
  8122. if (cbs) {
  8123. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  8124. var args = toArray(arguments, 1);
  8125. var info = "event handler for \"" + event + "\"";
  8126. for (var i = 0, l = cbs.length; i < l; i++) {
  8127. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  8128. }
  8129. }
  8130. return vm
  8131. };
  8132. }
  8133. /* */
  8134. var activeInstance = null;
  8135. var isUpdatingChildComponent = false;
  8136. function setActiveInstance(vm) {
  8137. var prevActiveInstance = activeInstance;
  8138. activeInstance = vm;
  8139. return function () {
  8140. activeInstance = prevActiveInstance;
  8141. }
  8142. }
  8143. function initLifecycle (vm) {
  8144. var options = vm.$options;
  8145. // locate first non-abstract parent
  8146. var parent = options.parent;
  8147. if (parent && !options.abstract) {
  8148. while (parent.$options.abstract && parent.$parent) {
  8149. parent = parent.$parent;
  8150. }
  8151. parent.$children.push(vm);
  8152. }
  8153. vm.$parent = parent;
  8154. vm.$root = parent ? parent.$root : vm;
  8155. vm.$children = [];
  8156. vm.$refs = {};
  8157. vm._watcher = null;
  8158. vm._inactive = null;
  8159. vm._directInactive = false;
  8160. vm._isMounted = false;
  8161. vm._isDestroyed = false;
  8162. vm._isBeingDestroyed = false;
  8163. }
  8164. function lifecycleMixin (Vue) {
  8165. Vue.prototype._update = function (vnode, hydrating) {
  8166. var vm = this;
  8167. var prevEl = vm.$el;
  8168. var prevVnode = vm._vnode;
  8169. var restoreActiveInstance = setActiveInstance(vm);
  8170. vm._vnode = vnode;
  8171. // Vue.prototype.__patch__ is injected in entry points
  8172. // based on the rendering backend used.
  8173. if (!prevVnode) {
  8174. // initial render
  8175. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  8176. } else {
  8177. // updates
  8178. vm.$el = vm.__patch__(prevVnode, vnode);
  8179. }
  8180. restoreActiveInstance();
  8181. // update __vue__ reference
  8182. if (prevEl) {
  8183. prevEl.__vue__ = null;
  8184. }
  8185. if (vm.$el) {
  8186. vm.$el.__vue__ = vm;
  8187. }
  8188. // if parent is an HOC, update its $el as well
  8189. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  8190. vm.$parent.$el = vm.$el;
  8191. }
  8192. // updated hook is called by the scheduler to ensure that children are
  8193. // updated in a parent's updated hook.
  8194. };
  8195. Vue.prototype.$forceUpdate = function () {
  8196. var vm = this;
  8197. if (vm._watcher) {
  8198. vm._watcher.update();
  8199. }
  8200. };
  8201. Vue.prototype.$destroy = function () {
  8202. var vm = this;
  8203. if (vm._isBeingDestroyed) {
  8204. return
  8205. }
  8206. callHook(vm, 'beforeDestroy');
  8207. vm._isBeingDestroyed = true;
  8208. // remove self from parent
  8209. var parent = vm.$parent;
  8210. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  8211. remove(parent.$children, vm);
  8212. }
  8213. // teardown watchers
  8214. if (vm._watcher) {
  8215. vm._watcher.teardown();
  8216. }
  8217. var i = vm._watchers.length;
  8218. while (i--) {
  8219. vm._watchers[i].teardown();
  8220. }
  8221. // remove reference from data ob
  8222. // frozen object may not have observer.
  8223. if (vm._data.__ob__) {
  8224. vm._data.__ob__.vmCount--;
  8225. }
  8226. // call the last hook...
  8227. vm._isDestroyed = true;
  8228. // invoke destroy hooks on current rendered tree
  8229. vm.__patch__(vm._vnode, null);
  8230. // fire destroyed hook
  8231. callHook(vm, 'destroyed');
  8232. // turn off all instance listeners.
  8233. vm.$off();
  8234. // remove __vue__ reference
  8235. if (vm.$el) {
  8236. vm.$el.__vue__ = null;
  8237. }
  8238. // release circular reference (#6759)
  8239. if (vm.$vnode) {
  8240. vm.$vnode.parent = null;
  8241. }
  8242. };
  8243. }
  8244. function updateChildComponent (
  8245. vm,
  8246. propsData,
  8247. listeners,
  8248. parentVnode,
  8249. renderChildren
  8250. ) {
  8251. if (true) {
  8252. isUpdatingChildComponent = true;
  8253. }
  8254. // determine whether component has slot children
  8255. // we need to do this before overwriting $options._renderChildren.
  8256. // check if there are dynamic scopedSlots (hand-written or compiled but with
  8257. // dynamic slot names). Static scoped slots compiled from template has the
  8258. // "$stable" marker.
  8259. var newScopedSlots = parentVnode.data.scopedSlots;
  8260. var oldScopedSlots = vm.$scopedSlots;
  8261. var hasDynamicScopedSlot = !!(
  8262. (newScopedSlots && !newScopedSlots.$stable) ||
  8263. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  8264. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  8265. );
  8266. // Any static slot children from the parent may have changed during parent's
  8267. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  8268. // update is necessary to ensure correctness.
  8269. var needsForceUpdate = !!(
  8270. renderChildren || // has new static slots
  8271. vm.$options._renderChildren || // has old static slots
  8272. hasDynamicScopedSlot
  8273. );
  8274. vm.$options._parentVnode = parentVnode;
  8275. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  8276. if (vm._vnode) { // update child tree's parent
  8277. vm._vnode.parent = parentVnode;
  8278. }
  8279. vm.$options._renderChildren = renderChildren;
  8280. // update $attrs and $listeners hash
  8281. // these are also reactive so they may trigger child update if the child
  8282. // used them during render
  8283. vm.$attrs = parentVnode.data.attrs || emptyObject;
  8284. vm.$listeners = listeners || emptyObject;
  8285. // update props
  8286. if (propsData && vm.$options.props) {
  8287. toggleObserving(false);
  8288. var props = vm._props;
  8289. var propKeys = vm.$options._propKeys || [];
  8290. for (var i = 0; i < propKeys.length; i++) {
  8291. var key = propKeys[i];
  8292. var propOptions = vm.$options.props; // wtf flow?
  8293. props[key] = validateProp(key, propOptions, propsData, vm);
  8294. }
  8295. toggleObserving(true);
  8296. // keep a copy of raw propsData
  8297. vm.$options.propsData = propsData;
  8298. }
  8299. // fixed by xxxxxx update properties(mp runtime)
  8300. vm._$updateProperties && vm._$updateProperties(vm);
  8301. // update listeners
  8302. listeners = listeners || emptyObject;
  8303. var oldListeners = vm.$options._parentListeners;
  8304. vm.$options._parentListeners = listeners;
  8305. updateComponentListeners(vm, listeners, oldListeners);
  8306. // resolve slots + force update if has children
  8307. if (needsForceUpdate) {
  8308. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  8309. vm.$forceUpdate();
  8310. }
  8311. if (true) {
  8312. isUpdatingChildComponent = false;
  8313. }
  8314. }
  8315. function isInInactiveTree (vm) {
  8316. while (vm && (vm = vm.$parent)) {
  8317. if (vm._inactive) { return true }
  8318. }
  8319. return false
  8320. }
  8321. function activateChildComponent (vm, direct) {
  8322. if (direct) {
  8323. vm._directInactive = false;
  8324. if (isInInactiveTree(vm)) {
  8325. return
  8326. }
  8327. } else if (vm._directInactive) {
  8328. return
  8329. }
  8330. if (vm._inactive || vm._inactive === null) {
  8331. vm._inactive = false;
  8332. for (var i = 0; i < vm.$children.length; i++) {
  8333. activateChildComponent(vm.$children[i]);
  8334. }
  8335. callHook(vm, 'activated');
  8336. }
  8337. }
  8338. function deactivateChildComponent (vm, direct) {
  8339. if (direct) {
  8340. vm._directInactive = true;
  8341. if (isInInactiveTree(vm)) {
  8342. return
  8343. }
  8344. }
  8345. if (!vm._inactive) {
  8346. vm._inactive = true;
  8347. for (var i = 0; i < vm.$children.length; i++) {
  8348. deactivateChildComponent(vm.$children[i]);
  8349. }
  8350. callHook(vm, 'deactivated');
  8351. }
  8352. }
  8353. function callHook (vm, hook) {
  8354. // #7573 disable dep collection when invoking lifecycle hooks
  8355. pushTarget();
  8356. var handlers = vm.$options[hook];
  8357. var info = hook + " hook";
  8358. if (handlers) {
  8359. for (var i = 0, j = handlers.length; i < j; i++) {
  8360. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  8361. }
  8362. }
  8363. if (vm._hasHookEvent) {
  8364. vm.$emit('hook:' + hook);
  8365. }
  8366. popTarget();
  8367. }
  8368. /* */
  8369. var MAX_UPDATE_COUNT = 100;
  8370. var queue = [];
  8371. var activatedChildren = [];
  8372. var has = {};
  8373. var circular = {};
  8374. var waiting = false;
  8375. var flushing = false;
  8376. var index = 0;
  8377. /**
  8378. * Reset the scheduler's state.
  8379. */
  8380. function resetSchedulerState () {
  8381. index = queue.length = activatedChildren.length = 0;
  8382. has = {};
  8383. if (true) {
  8384. circular = {};
  8385. }
  8386. waiting = flushing = false;
  8387. }
  8388. // Async edge case #6566 requires saving the timestamp when event listeners are
  8389. // attached. However, calling performance.now() has a perf overhead especially
  8390. // if the page has thousands of event listeners. Instead, we take a timestamp
  8391. // every time the scheduler flushes and use that for all event listeners
  8392. // attached during that flush.
  8393. var currentFlushTimestamp = 0;
  8394. // Async edge case fix requires storing an event listener's attach timestamp.
  8395. var getNow = Date.now;
  8396. // Determine what event timestamp the browser is using. Annoyingly, the
  8397. // timestamp can either be hi-res (relative to page load) or low-res
  8398. // (relative to UNIX epoch), so in order to compare time we have to use the
  8399. // same timestamp type when saving the flush timestamp.
  8400. // All IE versions use low-res event timestamps, and have problematic clock
  8401. // implementations (#9632)
  8402. if (inBrowser && !isIE) {
  8403. var performance = window.performance;
  8404. if (
  8405. performance &&
  8406. typeof performance.now === 'function' &&
  8407. getNow() > document.createEvent('Event').timeStamp
  8408. ) {
  8409. // if the event timestamp, although evaluated AFTER the Date.now(), is
  8410. // smaller than it, it means the event is using a hi-res timestamp,
  8411. // and we need to use the hi-res version for event listener timestamps as
  8412. // well.
  8413. getNow = function () { return performance.now(); };
  8414. }
  8415. }
  8416. /**
  8417. * Flush both queues and run the watchers.
  8418. */
  8419. function flushSchedulerQueue () {
  8420. currentFlushTimestamp = getNow();
  8421. flushing = true;
  8422. var watcher, id;
  8423. // Sort queue before flush.
  8424. // This ensures that:
  8425. // 1. Components are updated from parent to child. (because parent is always
  8426. // created before the child)
  8427. // 2. A component's user watchers are run before its render watcher (because
  8428. // user watchers are created before the render watcher)
  8429. // 3. If a component is destroyed during a parent component's watcher run,
  8430. // its watchers can be skipped.
  8431. queue.sort(function (a, b) { return a.id - b.id; });
  8432. // do not cache length because more watchers might be pushed
  8433. // as we run existing watchers
  8434. for (index = 0; index < queue.length; index++) {
  8435. watcher = queue[index];
  8436. if (watcher.before) {
  8437. watcher.before();
  8438. }
  8439. id = watcher.id;
  8440. has[id] = null;
  8441. watcher.run();
  8442. // in dev build, check and stop circular updates.
  8443. if ( true && has[id] != null) {
  8444. circular[id] = (circular[id] || 0) + 1;
  8445. if (circular[id] > MAX_UPDATE_COUNT) {
  8446. warn(
  8447. 'You may have an infinite update loop ' + (
  8448. watcher.user
  8449. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  8450. : "in a component render function."
  8451. ),
  8452. watcher.vm
  8453. );
  8454. break
  8455. }
  8456. }
  8457. }
  8458. // keep copies of post queues before resetting state
  8459. var activatedQueue = activatedChildren.slice();
  8460. var updatedQueue = queue.slice();
  8461. resetSchedulerState();
  8462. // call component updated and activated hooks
  8463. callActivatedHooks(activatedQueue);
  8464. callUpdatedHooks(updatedQueue);
  8465. // devtool hook
  8466. /* istanbul ignore if */
  8467. if (devtools && config.devtools) {
  8468. devtools.emit('flush');
  8469. }
  8470. }
  8471. function callUpdatedHooks (queue) {
  8472. var i = queue.length;
  8473. while (i--) {
  8474. var watcher = queue[i];
  8475. var vm = watcher.vm;
  8476. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  8477. callHook(vm, 'updated');
  8478. }
  8479. }
  8480. }
  8481. /**
  8482. * Queue a kept-alive component that was activated during patch.
  8483. * The queue will be processed after the entire tree has been patched.
  8484. */
  8485. function queueActivatedComponent (vm) {
  8486. // setting _inactive to false here so that a render function can
  8487. // rely on checking whether it's in an inactive tree (e.g. router-view)
  8488. vm._inactive = false;
  8489. activatedChildren.push(vm);
  8490. }
  8491. function callActivatedHooks (queue) {
  8492. for (var i = 0; i < queue.length; i++) {
  8493. queue[i]._inactive = true;
  8494. activateChildComponent(queue[i], true /* true */);
  8495. }
  8496. }
  8497. /**
  8498. * Push a watcher into the watcher queue.
  8499. * Jobs with duplicate IDs will be skipped unless it's
  8500. * pushed when the queue is being flushed.
  8501. */
  8502. function queueWatcher (watcher) {
  8503. var id = watcher.id;
  8504. if (has[id] == null) {
  8505. has[id] = true;
  8506. if (!flushing) {
  8507. queue.push(watcher);
  8508. } else {
  8509. // if already flushing, splice the watcher based on its id
  8510. // if already past its id, it will be run next immediately.
  8511. var i = queue.length - 1;
  8512. while (i > index && queue[i].id > watcher.id) {
  8513. i--;
  8514. }
  8515. queue.splice(i + 1, 0, watcher);
  8516. }
  8517. // queue the flush
  8518. if (!waiting) {
  8519. waiting = true;
  8520. if ( true && !config.async) {
  8521. flushSchedulerQueue();
  8522. return
  8523. }
  8524. nextTick(flushSchedulerQueue);
  8525. }
  8526. }
  8527. }
  8528. /* */
  8529. var uid$2 = 0;
  8530. /**
  8531. * A watcher parses an expression, collects dependencies,
  8532. * and fires callback when the expression value changes.
  8533. * This is used for both the $watch() api and directives.
  8534. */
  8535. var Watcher = function Watcher (
  8536. vm,
  8537. expOrFn,
  8538. cb,
  8539. options,
  8540. isRenderWatcher
  8541. ) {
  8542. this.vm = vm;
  8543. if (isRenderWatcher) {
  8544. vm._watcher = this;
  8545. }
  8546. vm._watchers.push(this);
  8547. // options
  8548. if (options) {
  8549. this.deep = !!options.deep;
  8550. this.user = !!options.user;
  8551. this.lazy = !!options.lazy;
  8552. this.sync = !!options.sync;
  8553. this.before = options.before;
  8554. } else {
  8555. this.deep = this.user = this.lazy = this.sync = false;
  8556. }
  8557. this.cb = cb;
  8558. this.id = ++uid$2; // uid for batching
  8559. this.active = true;
  8560. this.dirty = this.lazy; // for lazy watchers
  8561. this.deps = [];
  8562. this.newDeps = [];
  8563. this.depIds = new _Set();
  8564. this.newDepIds = new _Set();
  8565. this.expression = true
  8566. ? expOrFn.toString()
  8567. : undefined;
  8568. // parse expression for getter
  8569. if (typeof expOrFn === 'function') {
  8570. this.getter = expOrFn;
  8571. } else {
  8572. this.getter = parsePath(expOrFn);
  8573. if (!this.getter) {
  8574. this.getter = noop;
  8575. true && warn(
  8576. "Failed watching path: \"" + expOrFn + "\" " +
  8577. 'Watcher only accepts simple dot-delimited paths. ' +
  8578. 'For full control, use a function instead.',
  8579. vm
  8580. );
  8581. }
  8582. }
  8583. this.value = this.lazy
  8584. ? undefined
  8585. : this.get();
  8586. };
  8587. /**
  8588. * Evaluate the getter, and re-collect dependencies.
  8589. */
  8590. Watcher.prototype.get = function get () {
  8591. pushTarget(this);
  8592. var value;
  8593. var vm = this.vm;
  8594. try {
  8595. value = this.getter.call(vm, vm);
  8596. } catch (e) {
  8597. if (this.user) {
  8598. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  8599. } else {
  8600. throw e
  8601. }
  8602. } finally {
  8603. // "touch" every property so they are all tracked as
  8604. // dependencies for deep watching
  8605. if (this.deep) {
  8606. traverse(value);
  8607. }
  8608. popTarget();
  8609. this.cleanupDeps();
  8610. }
  8611. return value
  8612. };
  8613. /**
  8614. * Add a dependency to this directive.
  8615. */
  8616. Watcher.prototype.addDep = function addDep (dep) {
  8617. var id = dep.id;
  8618. if (!this.newDepIds.has(id)) {
  8619. this.newDepIds.add(id);
  8620. this.newDeps.push(dep);
  8621. if (!this.depIds.has(id)) {
  8622. dep.addSub(this);
  8623. }
  8624. }
  8625. };
  8626. /**
  8627. * Clean up for dependency collection.
  8628. */
  8629. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  8630. var i = this.deps.length;
  8631. while (i--) {
  8632. var dep = this.deps[i];
  8633. if (!this.newDepIds.has(dep.id)) {
  8634. dep.removeSub(this);
  8635. }
  8636. }
  8637. var tmp = this.depIds;
  8638. this.depIds = this.newDepIds;
  8639. this.newDepIds = tmp;
  8640. this.newDepIds.clear();
  8641. tmp = this.deps;
  8642. this.deps = this.newDeps;
  8643. this.newDeps = tmp;
  8644. this.newDeps.length = 0;
  8645. };
  8646. /**
  8647. * Subscriber interface.
  8648. * Will be called when a dependency changes.
  8649. */
  8650. Watcher.prototype.update = function update () {
  8651. /* istanbul ignore else */
  8652. if (this.lazy) {
  8653. this.dirty = true;
  8654. } else if (this.sync) {
  8655. this.run();
  8656. } else {
  8657. queueWatcher(this);
  8658. }
  8659. };
  8660. /**
  8661. * Scheduler job interface.
  8662. * Will be called by the scheduler.
  8663. */
  8664. Watcher.prototype.run = function run () {
  8665. if (this.active) {
  8666. var value = this.get();
  8667. if (
  8668. value !== this.value ||
  8669. // Deep watchers and watchers on Object/Arrays should fire even
  8670. // when the value is the same, because the value may
  8671. // have mutated.
  8672. isObject(value) ||
  8673. this.deep
  8674. ) {
  8675. // set new value
  8676. var oldValue = this.value;
  8677. this.value = value;
  8678. if (this.user) {
  8679. try {
  8680. this.cb.call(this.vm, value, oldValue);
  8681. } catch (e) {
  8682. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  8683. }
  8684. } else {
  8685. this.cb.call(this.vm, value, oldValue);
  8686. }
  8687. }
  8688. }
  8689. };
  8690. /**
  8691. * Evaluate the value of the watcher.
  8692. * This only gets called for lazy watchers.
  8693. */
  8694. Watcher.prototype.evaluate = function evaluate () {
  8695. this.value = this.get();
  8696. this.dirty = false;
  8697. };
  8698. /**
  8699. * Depend on all deps collected by this watcher.
  8700. */
  8701. Watcher.prototype.depend = function depend () {
  8702. var i = this.deps.length;
  8703. while (i--) {
  8704. this.deps[i].depend();
  8705. }
  8706. };
  8707. /**
  8708. * Remove self from all dependencies' subscriber list.
  8709. */
  8710. Watcher.prototype.teardown = function teardown () {
  8711. if (this.active) {
  8712. // remove self from vm's watcher list
  8713. // this is a somewhat expensive operation so we skip it
  8714. // if the vm is being destroyed.
  8715. if (!this.vm._isBeingDestroyed) {
  8716. remove(this.vm._watchers, this);
  8717. }
  8718. var i = this.deps.length;
  8719. while (i--) {
  8720. this.deps[i].removeSub(this);
  8721. }
  8722. this.active = false;
  8723. }
  8724. };
  8725. /* */
  8726. var sharedPropertyDefinition = {
  8727. enumerable: true,
  8728. configurable: true,
  8729. get: noop,
  8730. set: noop
  8731. };
  8732. function proxy (target, sourceKey, key) {
  8733. sharedPropertyDefinition.get = function proxyGetter () {
  8734. return this[sourceKey][key]
  8735. };
  8736. sharedPropertyDefinition.set = function proxySetter (val) {
  8737. this[sourceKey][key] = val;
  8738. };
  8739. Object.defineProperty(target, key, sharedPropertyDefinition);
  8740. }
  8741. function initState (vm) {
  8742. vm._watchers = [];
  8743. var opts = vm.$options;
  8744. if (opts.props) { initProps(vm, opts.props); }
  8745. if (opts.methods) { initMethods(vm, opts.methods); }
  8746. if (opts.data) {
  8747. initData(vm);
  8748. } else {
  8749. observe(vm._data = {}, true /* asRootData */);
  8750. }
  8751. if (opts.computed) { initComputed(vm, opts.computed); }
  8752. if (opts.watch && opts.watch !== nativeWatch) {
  8753. initWatch(vm, opts.watch);
  8754. }
  8755. }
  8756. function initProps (vm, propsOptions) {
  8757. var propsData = vm.$options.propsData || {};
  8758. var props = vm._props = {};
  8759. // cache prop keys so that future props updates can iterate using Array
  8760. // instead of dynamic object key enumeration.
  8761. var keys = vm.$options._propKeys = [];
  8762. var isRoot = !vm.$parent;
  8763. // root instance props should be converted
  8764. if (!isRoot) {
  8765. toggleObserving(false);
  8766. }
  8767. var loop = function ( key ) {
  8768. keys.push(key);
  8769. var value = validateProp(key, propsOptions, propsData, vm);
  8770. /* istanbul ignore else */
  8771. if (true) {
  8772. var hyphenatedKey = hyphenate(key);
  8773. if (isReservedAttribute(hyphenatedKey) ||
  8774. config.isReservedAttr(hyphenatedKey)) {
  8775. warn(
  8776. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  8777. vm
  8778. );
  8779. }
  8780. defineReactive$$1(props, key, value, function () {
  8781. if (!isRoot && !isUpdatingChildComponent) {
  8782. {
  8783. if(vm.mpHost === 'mp-baidu'){//百度 observer 在 setData callback 之后触发,直接忽略该 warn
  8784. return
  8785. }
  8786. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  8787. if(
  8788. key === 'value' &&
  8789. Array.isArray(vm.$options.behaviors) &&
  8790. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8791. ){
  8792. return
  8793. }
  8794. if(vm._getFormData){
  8795. return
  8796. }
  8797. var $parent = vm.$parent;
  8798. while($parent){
  8799. if($parent.__next_tick_pending){
  8800. return
  8801. }
  8802. $parent = $parent.$parent;
  8803. }
  8804. }
  8805. warn(
  8806. "Avoid mutating a prop directly since the value will be " +
  8807. "overwritten whenever the parent component re-renders. " +
  8808. "Instead, use a data or computed property based on the prop's " +
  8809. "value. Prop being mutated: \"" + key + "\"",
  8810. vm
  8811. );
  8812. }
  8813. });
  8814. } else {}
  8815. // static props are already proxied on the component's prototype
  8816. // during Vue.extend(). We only need to proxy props defined at
  8817. // instantiation here.
  8818. if (!(key in vm)) {
  8819. proxy(vm, "_props", key);
  8820. }
  8821. };
  8822. for (var key in propsOptions) loop( key );
  8823. toggleObserving(true);
  8824. }
  8825. function initData (vm) {
  8826. var data = vm.$options.data;
  8827. data = vm._data = typeof data === 'function'
  8828. ? getData(data, vm)
  8829. : data || {};
  8830. if (!isPlainObject(data)) {
  8831. data = {};
  8832. true && warn(
  8833. 'data functions should return an object:\n' +
  8834. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  8835. vm
  8836. );
  8837. }
  8838. // proxy data on instance
  8839. var keys = Object.keys(data);
  8840. var props = vm.$options.props;
  8841. var methods = vm.$options.methods;
  8842. var i = keys.length;
  8843. while (i--) {
  8844. var key = keys[i];
  8845. if (true) {
  8846. if (methods && hasOwn(methods, key)) {
  8847. warn(
  8848. ("Method \"" + key + "\" has already been defined as a data property."),
  8849. vm
  8850. );
  8851. }
  8852. }
  8853. if (props && hasOwn(props, key)) {
  8854. true && warn(
  8855. "The data property \"" + key + "\" is already declared as a prop. " +
  8856. "Use prop default value instead.",
  8857. vm
  8858. );
  8859. } else if (!isReserved(key)) {
  8860. proxy(vm, "_data", key);
  8861. }
  8862. }
  8863. // observe data
  8864. observe(data, true /* asRootData */);
  8865. }
  8866. function getData (data, vm) {
  8867. // #7573 disable dep collection when invoking data getters
  8868. pushTarget();
  8869. try {
  8870. return data.call(vm, vm)
  8871. } catch (e) {
  8872. handleError(e, vm, "data()");
  8873. return {}
  8874. } finally {
  8875. popTarget();
  8876. }
  8877. }
  8878. var computedWatcherOptions = { lazy: true };
  8879. function initComputed (vm, computed) {
  8880. // $flow-disable-line
  8881. var watchers = vm._computedWatchers = Object.create(null);
  8882. // computed properties are just getters during SSR
  8883. var isSSR = isServerRendering();
  8884. for (var key in computed) {
  8885. var userDef = computed[key];
  8886. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  8887. if ( true && getter == null) {
  8888. warn(
  8889. ("Getter is missing for computed property \"" + key + "\"."),
  8890. vm
  8891. );
  8892. }
  8893. if (!isSSR) {
  8894. // create internal watcher for the computed property.
  8895. watchers[key] = new Watcher(
  8896. vm,
  8897. getter || noop,
  8898. noop,
  8899. computedWatcherOptions
  8900. );
  8901. }
  8902. // component-defined computed properties are already defined on the
  8903. // component prototype. We only need to define computed properties defined
  8904. // at instantiation here.
  8905. if (!(key in vm)) {
  8906. defineComputed(vm, key, userDef);
  8907. } else if (true) {
  8908. if (key in vm.$data) {
  8909. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  8910. } else if (vm.$options.props && key in vm.$options.props) {
  8911. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  8912. }
  8913. }
  8914. }
  8915. }
  8916. function defineComputed (
  8917. target,
  8918. key,
  8919. userDef
  8920. ) {
  8921. var shouldCache = !isServerRendering();
  8922. if (typeof userDef === 'function') {
  8923. sharedPropertyDefinition.get = shouldCache
  8924. ? createComputedGetter(key)
  8925. : createGetterInvoker(userDef);
  8926. sharedPropertyDefinition.set = noop;
  8927. } else {
  8928. sharedPropertyDefinition.get = userDef.get
  8929. ? shouldCache && userDef.cache !== false
  8930. ? createComputedGetter(key)
  8931. : createGetterInvoker(userDef.get)
  8932. : noop;
  8933. sharedPropertyDefinition.set = userDef.set || noop;
  8934. }
  8935. if ( true &&
  8936. sharedPropertyDefinition.set === noop) {
  8937. sharedPropertyDefinition.set = function () {
  8938. warn(
  8939. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  8940. this
  8941. );
  8942. };
  8943. }
  8944. Object.defineProperty(target, key, sharedPropertyDefinition);
  8945. }
  8946. function createComputedGetter (key) {
  8947. return function computedGetter () {
  8948. var watcher = this._computedWatchers && this._computedWatchers[key];
  8949. if (watcher) {
  8950. if (watcher.dirty) {
  8951. watcher.evaluate();
  8952. }
  8953. if (Dep.SharedObject.target) {// fixed by xxxxxx
  8954. watcher.depend();
  8955. }
  8956. return watcher.value
  8957. }
  8958. }
  8959. }
  8960. function createGetterInvoker(fn) {
  8961. return function computedGetter () {
  8962. return fn.call(this, this)
  8963. }
  8964. }
  8965. function initMethods (vm, methods) {
  8966. var props = vm.$options.props;
  8967. for (var key in methods) {
  8968. if (true) {
  8969. if (typeof methods[key] !== 'function') {
  8970. warn(
  8971. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  8972. "Did you reference the function correctly?",
  8973. vm
  8974. );
  8975. }
  8976. if (props && hasOwn(props, key)) {
  8977. warn(
  8978. ("Method \"" + key + "\" has already been defined as a prop."),
  8979. vm
  8980. );
  8981. }
  8982. if ((key in vm) && isReserved(key)) {
  8983. warn(
  8984. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  8985. "Avoid defining component methods that start with _ or $."
  8986. );
  8987. }
  8988. }
  8989. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  8990. }
  8991. }
  8992. function initWatch (vm, watch) {
  8993. for (var key in watch) {
  8994. var handler = watch[key];
  8995. if (Array.isArray(handler)) {
  8996. for (var i = 0; i < handler.length; i++) {
  8997. createWatcher(vm, key, handler[i]);
  8998. }
  8999. } else {
  9000. createWatcher(vm, key, handler);
  9001. }
  9002. }
  9003. }
  9004. function createWatcher (
  9005. vm,
  9006. expOrFn,
  9007. handler,
  9008. options
  9009. ) {
  9010. if (isPlainObject(handler)) {
  9011. options = handler;
  9012. handler = handler.handler;
  9013. }
  9014. if (typeof handler === 'string') {
  9015. handler = vm[handler];
  9016. }
  9017. return vm.$watch(expOrFn, handler, options)
  9018. }
  9019. function stateMixin (Vue) {
  9020. // flow somehow has problems with directly declared definition object
  9021. // when using Object.defineProperty, so we have to procedurally build up
  9022. // the object here.
  9023. var dataDef = {};
  9024. dataDef.get = function () { return this._data };
  9025. var propsDef = {};
  9026. propsDef.get = function () { return this._props };
  9027. if (true) {
  9028. dataDef.set = function () {
  9029. warn(
  9030. 'Avoid replacing instance root $data. ' +
  9031. 'Use nested data properties instead.',
  9032. this
  9033. );
  9034. };
  9035. propsDef.set = function () {
  9036. warn("$props is readonly.", this);
  9037. };
  9038. }
  9039. Object.defineProperty(Vue.prototype, '$data', dataDef);
  9040. Object.defineProperty(Vue.prototype, '$props', propsDef);
  9041. Vue.prototype.$set = set;
  9042. Vue.prototype.$delete = del;
  9043. Vue.prototype.$watch = function (
  9044. expOrFn,
  9045. cb,
  9046. options
  9047. ) {
  9048. var vm = this;
  9049. if (isPlainObject(cb)) {
  9050. return createWatcher(vm, expOrFn, cb, options)
  9051. }
  9052. options = options || {};
  9053. options.user = true;
  9054. var watcher = new Watcher(vm, expOrFn, cb, options);
  9055. if (options.immediate) {
  9056. try {
  9057. cb.call(vm, watcher.value);
  9058. } catch (error) {
  9059. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  9060. }
  9061. }
  9062. return function unwatchFn () {
  9063. watcher.teardown();
  9064. }
  9065. };
  9066. }
  9067. /* */
  9068. var uid$3 = 0;
  9069. function initMixin (Vue) {
  9070. Vue.prototype._init = function (options) {
  9071. var vm = this;
  9072. // a uid
  9073. vm._uid = uid$3++;
  9074. var startTag, endTag;
  9075. /* istanbul ignore if */
  9076. if ( true && config.performance && mark) {
  9077. startTag = "vue-perf-start:" + (vm._uid);
  9078. endTag = "vue-perf-end:" + (vm._uid);
  9079. mark(startTag);
  9080. }
  9081. // a flag to avoid this being observed
  9082. vm._isVue = true;
  9083. // merge options
  9084. if (options && options._isComponent) {
  9085. // optimize internal component instantiation
  9086. // since dynamic options merging is pretty slow, and none of the
  9087. // internal component options needs special treatment.
  9088. initInternalComponent(vm, options);
  9089. } else {
  9090. vm.$options = mergeOptions(
  9091. resolveConstructorOptions(vm.constructor),
  9092. options || {},
  9093. vm
  9094. );
  9095. }
  9096. /* istanbul ignore else */
  9097. if (true) {
  9098. initProxy(vm);
  9099. } else {}
  9100. // expose real self
  9101. vm._self = vm;
  9102. initLifecycle(vm);
  9103. initEvents(vm);
  9104. initRender(vm);
  9105. callHook(vm, 'beforeCreate');
  9106. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  9107. initState(vm);
  9108. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  9109. !vm._$fallback && callHook(vm, 'created');
  9110. /* istanbul ignore if */
  9111. if ( true && config.performance && mark) {
  9112. vm._name = formatComponentName(vm, false);
  9113. mark(endTag);
  9114. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  9115. }
  9116. if (vm.$options.el) {
  9117. vm.$mount(vm.$options.el);
  9118. }
  9119. };
  9120. }
  9121. function initInternalComponent (vm, options) {
  9122. var opts = vm.$options = Object.create(vm.constructor.options);
  9123. // doing this because it's faster than dynamic enumeration.
  9124. var parentVnode = options._parentVnode;
  9125. opts.parent = options.parent;
  9126. opts._parentVnode = parentVnode;
  9127. var vnodeComponentOptions = parentVnode.componentOptions;
  9128. opts.propsData = vnodeComponentOptions.propsData;
  9129. opts._parentListeners = vnodeComponentOptions.listeners;
  9130. opts._renderChildren = vnodeComponentOptions.children;
  9131. opts._componentTag = vnodeComponentOptions.tag;
  9132. if (options.render) {
  9133. opts.render = options.render;
  9134. opts.staticRenderFns = options.staticRenderFns;
  9135. }
  9136. }
  9137. function resolveConstructorOptions (Ctor) {
  9138. var options = Ctor.options;
  9139. if (Ctor.super) {
  9140. var superOptions = resolveConstructorOptions(Ctor.super);
  9141. var cachedSuperOptions = Ctor.superOptions;
  9142. if (superOptions !== cachedSuperOptions) {
  9143. // super option changed,
  9144. // need to resolve new options.
  9145. Ctor.superOptions = superOptions;
  9146. // check if there are any late-modified/attached options (#4976)
  9147. var modifiedOptions = resolveModifiedOptions(Ctor);
  9148. // update base extend options
  9149. if (modifiedOptions) {
  9150. extend(Ctor.extendOptions, modifiedOptions);
  9151. }
  9152. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  9153. if (options.name) {
  9154. options.components[options.name] = Ctor;
  9155. }
  9156. }
  9157. }
  9158. return options
  9159. }
  9160. function resolveModifiedOptions (Ctor) {
  9161. var modified;
  9162. var latest = Ctor.options;
  9163. var sealed = Ctor.sealedOptions;
  9164. for (var key in latest) {
  9165. if (latest[key] !== sealed[key]) {
  9166. if (!modified) { modified = {}; }
  9167. modified[key] = latest[key];
  9168. }
  9169. }
  9170. return modified
  9171. }
  9172. function Vue (options) {
  9173. if ( true &&
  9174. !(this instanceof Vue)
  9175. ) {
  9176. warn('Vue is a constructor and should be called with the `new` keyword');
  9177. }
  9178. this._init(options);
  9179. }
  9180. initMixin(Vue);
  9181. stateMixin(Vue);
  9182. eventsMixin(Vue);
  9183. lifecycleMixin(Vue);
  9184. renderMixin(Vue);
  9185. /* */
  9186. function initUse (Vue) {
  9187. Vue.use = function (plugin) {
  9188. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  9189. if (installedPlugins.indexOf(plugin) > -1) {
  9190. return this
  9191. }
  9192. // additional parameters
  9193. var args = toArray(arguments, 1);
  9194. args.unshift(this);
  9195. if (typeof plugin.install === 'function') {
  9196. plugin.install.apply(plugin, args);
  9197. } else if (typeof plugin === 'function') {
  9198. plugin.apply(null, args);
  9199. }
  9200. installedPlugins.push(plugin);
  9201. return this
  9202. };
  9203. }
  9204. /* */
  9205. function initMixin$1 (Vue) {
  9206. Vue.mixin = function (mixin) {
  9207. this.options = mergeOptions(this.options, mixin);
  9208. return this
  9209. };
  9210. }
  9211. /* */
  9212. function initExtend (Vue) {
  9213. /**
  9214. * Each instance constructor, including Vue, has a unique
  9215. * cid. This enables us to create wrapped "child
  9216. * constructors" for prototypal inheritance and cache them.
  9217. */
  9218. Vue.cid = 0;
  9219. var cid = 1;
  9220. /**
  9221. * Class inheritance
  9222. */
  9223. Vue.extend = function (extendOptions) {
  9224. extendOptions = extendOptions || {};
  9225. var Super = this;
  9226. var SuperId = Super.cid;
  9227. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  9228. if (cachedCtors[SuperId]) {
  9229. return cachedCtors[SuperId]
  9230. }
  9231. var name = extendOptions.name || Super.options.name;
  9232. if ( true && name) {
  9233. validateComponentName(name);
  9234. }
  9235. var Sub = function VueComponent (options) {
  9236. this._init(options);
  9237. };
  9238. Sub.prototype = Object.create(Super.prototype);
  9239. Sub.prototype.constructor = Sub;
  9240. Sub.cid = cid++;
  9241. Sub.options = mergeOptions(
  9242. Super.options,
  9243. extendOptions
  9244. );
  9245. Sub['super'] = Super;
  9246. // For props and computed properties, we define the proxy getters on
  9247. // the Vue instances at extension time, on the extended prototype. This
  9248. // avoids Object.defineProperty calls for each instance created.
  9249. if (Sub.options.props) {
  9250. initProps$1(Sub);
  9251. }
  9252. if (Sub.options.computed) {
  9253. initComputed$1(Sub);
  9254. }
  9255. // allow further extension/mixin/plugin usage
  9256. Sub.extend = Super.extend;
  9257. Sub.mixin = Super.mixin;
  9258. Sub.use = Super.use;
  9259. // create asset registers, so extended classes
  9260. // can have their private assets too.
  9261. ASSET_TYPES.forEach(function (type) {
  9262. Sub[type] = Super[type];
  9263. });
  9264. // enable recursive self-lookup
  9265. if (name) {
  9266. Sub.options.components[name] = Sub;
  9267. }
  9268. // keep a reference to the super options at extension time.
  9269. // later at instantiation we can check if Super's options have
  9270. // been updated.
  9271. Sub.superOptions = Super.options;
  9272. Sub.extendOptions = extendOptions;
  9273. Sub.sealedOptions = extend({}, Sub.options);
  9274. // cache constructor
  9275. cachedCtors[SuperId] = Sub;
  9276. return Sub
  9277. };
  9278. }
  9279. function initProps$1 (Comp) {
  9280. var props = Comp.options.props;
  9281. for (var key in props) {
  9282. proxy(Comp.prototype, "_props", key);
  9283. }
  9284. }
  9285. function initComputed$1 (Comp) {
  9286. var computed = Comp.options.computed;
  9287. for (var key in computed) {
  9288. defineComputed(Comp.prototype, key, computed[key]);
  9289. }
  9290. }
  9291. /* */
  9292. function initAssetRegisters (Vue) {
  9293. /**
  9294. * Create asset registration methods.
  9295. */
  9296. ASSET_TYPES.forEach(function (type) {
  9297. Vue[type] = function (
  9298. id,
  9299. definition
  9300. ) {
  9301. if (!definition) {
  9302. return this.options[type + 's'][id]
  9303. } else {
  9304. /* istanbul ignore if */
  9305. if ( true && type === 'component') {
  9306. validateComponentName(id);
  9307. }
  9308. if (type === 'component' && isPlainObject(definition)) {
  9309. definition.name = definition.name || id;
  9310. definition = this.options._base.extend(definition);
  9311. }
  9312. if (type === 'directive' && typeof definition === 'function') {
  9313. definition = { bind: definition, update: definition };
  9314. }
  9315. this.options[type + 's'][id] = definition;
  9316. return definition
  9317. }
  9318. };
  9319. });
  9320. }
  9321. /* */
  9322. function getComponentName (opts) {
  9323. return opts && (opts.Ctor.options.name || opts.tag)
  9324. }
  9325. function matches (pattern, name) {
  9326. if (Array.isArray(pattern)) {
  9327. return pattern.indexOf(name) > -1
  9328. } else if (typeof pattern === 'string') {
  9329. return pattern.split(',').indexOf(name) > -1
  9330. } else if (isRegExp(pattern)) {
  9331. return pattern.test(name)
  9332. }
  9333. /* istanbul ignore next */
  9334. return false
  9335. }
  9336. function pruneCache (keepAliveInstance, filter) {
  9337. var cache = keepAliveInstance.cache;
  9338. var keys = keepAliveInstance.keys;
  9339. var _vnode = keepAliveInstance._vnode;
  9340. for (var key in cache) {
  9341. var cachedNode = cache[key];
  9342. if (cachedNode) {
  9343. var name = getComponentName(cachedNode.componentOptions);
  9344. if (name && !filter(name)) {
  9345. pruneCacheEntry(cache, key, keys, _vnode);
  9346. }
  9347. }
  9348. }
  9349. }
  9350. function pruneCacheEntry (
  9351. cache,
  9352. key,
  9353. keys,
  9354. current
  9355. ) {
  9356. var cached$$1 = cache[key];
  9357. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  9358. cached$$1.componentInstance.$destroy();
  9359. }
  9360. cache[key] = null;
  9361. remove(keys, key);
  9362. }
  9363. var patternTypes = [String, RegExp, Array];
  9364. var KeepAlive = {
  9365. name: 'keep-alive',
  9366. abstract: true,
  9367. props: {
  9368. include: patternTypes,
  9369. exclude: patternTypes,
  9370. max: [String, Number]
  9371. },
  9372. created: function created () {
  9373. this.cache = Object.create(null);
  9374. this.keys = [];
  9375. },
  9376. destroyed: function destroyed () {
  9377. for (var key in this.cache) {
  9378. pruneCacheEntry(this.cache, key, this.keys);
  9379. }
  9380. },
  9381. mounted: function mounted () {
  9382. var this$1 = this;
  9383. this.$watch('include', function (val) {
  9384. pruneCache(this$1, function (name) { return matches(val, name); });
  9385. });
  9386. this.$watch('exclude', function (val) {
  9387. pruneCache(this$1, function (name) { return !matches(val, name); });
  9388. });
  9389. },
  9390. render: function render () {
  9391. var slot = this.$slots.default;
  9392. var vnode = getFirstComponentChild(slot);
  9393. var componentOptions = vnode && vnode.componentOptions;
  9394. if (componentOptions) {
  9395. // check pattern
  9396. var name = getComponentName(componentOptions);
  9397. var ref = this;
  9398. var include = ref.include;
  9399. var exclude = ref.exclude;
  9400. if (
  9401. // not included
  9402. (include && (!name || !matches(include, name))) ||
  9403. // excluded
  9404. (exclude && name && matches(exclude, name))
  9405. ) {
  9406. return vnode
  9407. }
  9408. var ref$1 = this;
  9409. var cache = ref$1.cache;
  9410. var keys = ref$1.keys;
  9411. var key = vnode.key == null
  9412. // same constructor may get registered as different local components
  9413. // so cid alone is not enough (#3269)
  9414. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  9415. : vnode.key;
  9416. if (cache[key]) {
  9417. vnode.componentInstance = cache[key].componentInstance;
  9418. // make current key freshest
  9419. remove(keys, key);
  9420. keys.push(key);
  9421. } else {
  9422. cache[key] = vnode;
  9423. keys.push(key);
  9424. // prune oldest entry
  9425. if (this.max && keys.length > parseInt(this.max)) {
  9426. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  9427. }
  9428. }
  9429. vnode.data.keepAlive = true;
  9430. }
  9431. return vnode || (slot && slot[0])
  9432. }
  9433. };
  9434. var builtInComponents = {
  9435. KeepAlive: KeepAlive
  9436. };
  9437. /* */
  9438. function initGlobalAPI (Vue) {
  9439. // config
  9440. var configDef = {};
  9441. configDef.get = function () { return config; };
  9442. if (true) {
  9443. configDef.set = function () {
  9444. warn(
  9445. 'Do not replace the Vue.config object, set individual fields instead.'
  9446. );
  9447. };
  9448. }
  9449. Object.defineProperty(Vue, 'config', configDef);
  9450. // exposed util methods.
  9451. // NOTE: these are not considered part of the public API - avoid relying on
  9452. // them unless you are aware of the risk.
  9453. Vue.util = {
  9454. warn: warn,
  9455. extend: extend,
  9456. mergeOptions: mergeOptions,
  9457. defineReactive: defineReactive$$1
  9458. };
  9459. Vue.set = set;
  9460. Vue.delete = del;
  9461. Vue.nextTick = nextTick;
  9462. // 2.6 explicit observable API
  9463. Vue.observable = function (obj) {
  9464. observe(obj);
  9465. return obj
  9466. };
  9467. Vue.options = Object.create(null);
  9468. ASSET_TYPES.forEach(function (type) {
  9469. Vue.options[type + 's'] = Object.create(null);
  9470. });
  9471. // this is used to identify the "base" constructor to extend all plain-object
  9472. // components with in Weex's multi-instance scenarios.
  9473. Vue.options._base = Vue;
  9474. extend(Vue.options.components, builtInComponents);
  9475. initUse(Vue);
  9476. initMixin$1(Vue);
  9477. initExtend(Vue);
  9478. initAssetRegisters(Vue);
  9479. }
  9480. initGlobalAPI(Vue);
  9481. Object.defineProperty(Vue.prototype, '$isServer', {
  9482. get: isServerRendering
  9483. });
  9484. Object.defineProperty(Vue.prototype, '$ssrContext', {
  9485. get: function get () {
  9486. /* istanbul ignore next */
  9487. return this.$vnode && this.$vnode.ssrContext
  9488. }
  9489. });
  9490. // expose FunctionalRenderContext for ssr runtime helper installation
  9491. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  9492. value: FunctionalRenderContext
  9493. });
  9494. Vue.version = '2.6.11';
  9495. /**
  9496. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  9497. */
  9498. var ARRAYTYPE = '[object Array]';
  9499. var OBJECTTYPE = '[object Object]';
  9500. // const FUNCTIONTYPE = '[object Function]'
  9501. function diff(current, pre) {
  9502. var result = {};
  9503. syncKeys(current, pre);
  9504. _diff(current, pre, '', result);
  9505. return result
  9506. }
  9507. function syncKeys(current, pre) {
  9508. if (current === pre) { return }
  9509. var rootCurrentType = type(current);
  9510. var rootPreType = type(pre);
  9511. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  9512. if(Object.keys(current).length >= Object.keys(pre).length){
  9513. for (var key in pre) {
  9514. var currentValue = current[key];
  9515. if (currentValue === undefined) {
  9516. current[key] = null;
  9517. } else {
  9518. syncKeys(currentValue, pre[key]);
  9519. }
  9520. }
  9521. }
  9522. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  9523. if (current.length >= pre.length) {
  9524. pre.forEach(function (item, index) {
  9525. syncKeys(current[index], item);
  9526. });
  9527. }
  9528. }
  9529. }
  9530. function _diff(current, pre, path, result) {
  9531. if (current === pre) { return }
  9532. var rootCurrentType = type(current);
  9533. var rootPreType = type(pre);
  9534. if (rootCurrentType == OBJECTTYPE) {
  9535. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  9536. setResult(result, path, current);
  9537. } else {
  9538. var loop = function ( key ) {
  9539. var currentValue = current[key];
  9540. var preValue = pre[key];
  9541. var currentType = type(currentValue);
  9542. var preType = type(preValue);
  9543. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  9544. if (currentValue != pre[key]) {
  9545. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9546. }
  9547. } else if (currentType == ARRAYTYPE) {
  9548. if (preType != ARRAYTYPE) {
  9549. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9550. } else {
  9551. if (currentValue.length < preValue.length) {
  9552. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9553. } else {
  9554. currentValue.forEach(function (item, index) {
  9555. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  9556. });
  9557. }
  9558. }
  9559. } else if (currentType == OBJECTTYPE) {
  9560. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  9561. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9562. } else {
  9563. for (var subKey in currentValue) {
  9564. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  9565. }
  9566. }
  9567. }
  9568. };
  9569. for (var key in current) loop( key );
  9570. }
  9571. } else if (rootCurrentType == ARRAYTYPE) {
  9572. if (rootPreType != ARRAYTYPE) {
  9573. setResult(result, path, current);
  9574. } else {
  9575. if (current.length < pre.length) {
  9576. setResult(result, path, current);
  9577. } else {
  9578. current.forEach(function (item, index) {
  9579. _diff(item, pre[index], path + '[' + index + ']', result);
  9580. });
  9581. }
  9582. }
  9583. } else {
  9584. setResult(result, path, current);
  9585. }
  9586. }
  9587. function setResult(result, k, v) {
  9588. // if (type(v) != FUNCTIONTYPE) {
  9589. result[k] = v;
  9590. // }
  9591. }
  9592. function type(obj) {
  9593. return Object.prototype.toString.call(obj)
  9594. }
  9595. /* */
  9596. function flushCallbacks$1(vm) {
  9597. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  9598. if (Object({"VUE_APP_NAME":"cqcarbonwxapp","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9599. var mpInstance = vm.$scope;
  9600. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9601. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  9602. }
  9603. var copies = vm.__next_tick_callbacks.slice(0);
  9604. vm.__next_tick_callbacks.length = 0;
  9605. for (var i = 0; i < copies.length; i++) {
  9606. copies[i]();
  9607. }
  9608. }
  9609. }
  9610. function hasRenderWatcher(vm) {
  9611. return queue.find(function (watcher) { return vm._watcher === watcher; })
  9612. }
  9613. function nextTick$1(vm, cb) {
  9614. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  9615. //2.nextTick 之前存在 render watcher
  9616. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  9617. if(Object({"VUE_APP_NAME":"cqcarbonwxapp","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  9618. var mpInstance = vm.$scope;
  9619. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9620. ']:nextVueTick');
  9621. }
  9622. return nextTick(cb, vm)
  9623. }else{
  9624. if(Object({"VUE_APP_NAME":"cqcarbonwxapp","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  9625. var mpInstance$1 = vm.$scope;
  9626. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  9627. ']:nextMPTick');
  9628. }
  9629. }
  9630. var _resolve;
  9631. if (!vm.__next_tick_callbacks) {
  9632. vm.__next_tick_callbacks = [];
  9633. }
  9634. vm.__next_tick_callbacks.push(function () {
  9635. if (cb) {
  9636. try {
  9637. cb.call(vm);
  9638. } catch (e) {
  9639. handleError(e, vm, 'nextTick');
  9640. }
  9641. } else if (_resolve) {
  9642. _resolve(vm);
  9643. }
  9644. });
  9645. // $flow-disable-line
  9646. if (!cb && typeof Promise !== 'undefined') {
  9647. return new Promise(function (resolve) {
  9648. _resolve = resolve;
  9649. })
  9650. }
  9651. }
  9652. /* */
  9653. function cloneWithData(vm) {
  9654. // 确保当前 vm 所有数据被同步
  9655. var ret = Object.create(null);
  9656. var dataKeys = [].concat(
  9657. Object.keys(vm._data || {}),
  9658. Object.keys(vm._computedWatchers || {}));
  9659. dataKeys.reduce(function(ret, key) {
  9660. ret[key] = vm[key];
  9661. return ret
  9662. }, ret);
  9663. // vue-composition-api
  9664. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  9665. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  9666. if (rawBindings) {
  9667. Object.keys(rawBindings).forEach(function (key) {
  9668. ret[key] = vm[key];
  9669. });
  9670. }
  9671. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  9672. Object.assign(ret, vm.$mp.data || {});
  9673. if (
  9674. Array.isArray(vm.$options.behaviors) &&
  9675. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  9676. ) { //form-field
  9677. ret['name'] = vm.name;
  9678. ret['value'] = vm.value;
  9679. }
  9680. return JSON.parse(JSON.stringify(ret))
  9681. }
  9682. var patch = function(oldVnode, vnode) {
  9683. var this$1 = this;
  9684. if (vnode === null) { //destroy
  9685. return
  9686. }
  9687. if (this.mpType === 'page' || this.mpType === 'component') {
  9688. var mpInstance = this.$scope;
  9689. var data = Object.create(null);
  9690. try {
  9691. data = cloneWithData(this);
  9692. } catch (err) {
  9693. console.error(err);
  9694. }
  9695. data.__webviewId__ = mpInstance.data.__webviewId__;
  9696. var mpData = Object.create(null);
  9697. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  9698. mpData[key] = mpInstance.data[key];
  9699. });
  9700. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  9701. if (Object.keys(diffData).length) {
  9702. if (Object({"VUE_APP_NAME":"cqcarbonwxapp","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9703. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  9704. ']差量更新',
  9705. JSON.stringify(diffData));
  9706. }
  9707. this.__next_tick_pending = true;
  9708. mpInstance.setData(diffData, function () {
  9709. this$1.__next_tick_pending = false;
  9710. flushCallbacks$1(this$1);
  9711. });
  9712. } else {
  9713. flushCallbacks$1(this);
  9714. }
  9715. }
  9716. };
  9717. /* */
  9718. function createEmptyRender() {
  9719. }
  9720. function mountComponent$1(
  9721. vm,
  9722. el,
  9723. hydrating
  9724. ) {
  9725. if (!vm.mpType) {//main.js 中的 new Vue
  9726. return vm
  9727. }
  9728. if (vm.mpType === 'app') {
  9729. vm.$options.render = createEmptyRender;
  9730. }
  9731. if (!vm.$options.render) {
  9732. vm.$options.render = createEmptyRender;
  9733. if (true) {
  9734. /* istanbul ignore if */
  9735. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  9736. vm.$options.el || el) {
  9737. warn(
  9738. 'You are using the runtime-only build of Vue where the template ' +
  9739. 'compiler is not available. Either pre-compile the templates into ' +
  9740. 'render functions, or use the compiler-included build.',
  9741. vm
  9742. );
  9743. } else {
  9744. warn(
  9745. 'Failed to mount component: template or render function not defined.',
  9746. vm
  9747. );
  9748. }
  9749. }
  9750. }
  9751. !vm._$fallback && callHook(vm, 'beforeMount');
  9752. var updateComponent = function () {
  9753. vm._update(vm._render(), hydrating);
  9754. };
  9755. // we set this to vm._watcher inside the watcher's constructor
  9756. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  9757. // component's mounted hook), which relies on vm._watcher being already defined
  9758. new Watcher(vm, updateComponent, noop, {
  9759. before: function before() {
  9760. if (vm._isMounted && !vm._isDestroyed) {
  9761. callHook(vm, 'beforeUpdate');
  9762. }
  9763. }
  9764. }, true /* isRenderWatcher */);
  9765. hydrating = false;
  9766. return vm
  9767. }
  9768. /* */
  9769. function renderClass (
  9770. staticClass,
  9771. dynamicClass
  9772. ) {
  9773. if (isDef(staticClass) || isDef(dynamicClass)) {
  9774. return concat(staticClass, stringifyClass(dynamicClass))
  9775. }
  9776. /* istanbul ignore next */
  9777. return ''
  9778. }
  9779. function concat (a, b) {
  9780. return a ? b ? (a + ' ' + b) : a : (b || '')
  9781. }
  9782. function stringifyClass (value) {
  9783. if (Array.isArray(value)) {
  9784. return stringifyArray(value)
  9785. }
  9786. if (isObject(value)) {
  9787. return stringifyObject(value)
  9788. }
  9789. if (typeof value === 'string') {
  9790. return value
  9791. }
  9792. /* istanbul ignore next */
  9793. return ''
  9794. }
  9795. function stringifyArray (value) {
  9796. var res = '';
  9797. var stringified;
  9798. for (var i = 0, l = value.length; i < l; i++) {
  9799. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  9800. if (res) { res += ' '; }
  9801. res += stringified;
  9802. }
  9803. }
  9804. return res
  9805. }
  9806. function stringifyObject (value) {
  9807. var res = '';
  9808. for (var key in value) {
  9809. if (value[key]) {
  9810. if (res) { res += ' '; }
  9811. res += key;
  9812. }
  9813. }
  9814. return res
  9815. }
  9816. /* */
  9817. var parseStyleText = cached(function (cssText) {
  9818. var res = {};
  9819. var listDelimiter = /;(?![^(]*\))/g;
  9820. var propertyDelimiter = /:(.+)/;
  9821. cssText.split(listDelimiter).forEach(function (item) {
  9822. if (item) {
  9823. var tmp = item.split(propertyDelimiter);
  9824. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  9825. }
  9826. });
  9827. return res
  9828. });
  9829. // normalize possible array / string values into Object
  9830. function normalizeStyleBinding (bindingStyle) {
  9831. if (Array.isArray(bindingStyle)) {
  9832. return toObject(bindingStyle)
  9833. }
  9834. if (typeof bindingStyle === 'string') {
  9835. return parseStyleText(bindingStyle)
  9836. }
  9837. return bindingStyle
  9838. }
  9839. /* */
  9840. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  9841. function getTarget(obj, path) {
  9842. var parts = path.split('.');
  9843. var key = parts[0];
  9844. if (key.indexOf('__$n') === 0) { //number index
  9845. key = parseInt(key.replace('__$n', ''));
  9846. }
  9847. if (parts.length === 1) {
  9848. return obj[key]
  9849. }
  9850. return getTarget(obj[key], parts.slice(1).join('.'))
  9851. }
  9852. function internalMixin(Vue) {
  9853. Vue.config.errorHandler = function(err, vm, info) {
  9854. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  9855. console.error(err);
  9856. /* eslint-disable no-undef */
  9857. var app = getApp();
  9858. if (app && app.onError) {
  9859. app.onError(err);
  9860. }
  9861. };
  9862. var oldEmit = Vue.prototype.$emit;
  9863. Vue.prototype.$emit = function(event) {
  9864. if (this.$scope && event) {
  9865. this.$scope['triggerEvent'](event, {
  9866. __args__: toArray(arguments, 1)
  9867. });
  9868. }
  9869. return oldEmit.apply(this, arguments)
  9870. };
  9871. Vue.prototype.$nextTick = function(fn) {
  9872. return nextTick$1(this, fn)
  9873. };
  9874. MP_METHODS.forEach(function (method) {
  9875. Vue.prototype[method] = function(args) {
  9876. if (this.$scope && this.$scope[method]) {
  9877. return this.$scope[method](args)
  9878. }
  9879. // mp-alipay
  9880. if (typeof my === 'undefined') {
  9881. return
  9882. }
  9883. if (method === 'createSelectorQuery') {
  9884. /* eslint-disable no-undef */
  9885. return my.createSelectorQuery(args)
  9886. } else if (method === 'createIntersectionObserver') {
  9887. /* eslint-disable no-undef */
  9888. return my.createIntersectionObserver(args)
  9889. }
  9890. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  9891. };
  9892. });
  9893. Vue.prototype.__init_provide = initProvide;
  9894. Vue.prototype.__init_injections = initInjections;
  9895. Vue.prototype.__call_hook = function(hook, args) {
  9896. var vm = this;
  9897. // #7573 disable dep collection when invoking lifecycle hooks
  9898. pushTarget();
  9899. var handlers = vm.$options[hook];
  9900. var info = hook + " hook";
  9901. var ret;
  9902. if (handlers) {
  9903. for (var i = 0, j = handlers.length; i < j; i++) {
  9904. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  9905. }
  9906. }
  9907. if (vm._hasHookEvent) {
  9908. vm.$emit('hook:' + hook, args);
  9909. }
  9910. popTarget();
  9911. return ret
  9912. };
  9913. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  9914. if (Array.isArray(modifiers)) {
  9915. if (modifiers.indexOf('trim') !== -1) {
  9916. value = value.trim();
  9917. }
  9918. if (modifiers.indexOf('number') !== -1) {
  9919. value = this._n(value);
  9920. }
  9921. }
  9922. if (!target) {
  9923. target = this;
  9924. }
  9925. target[key] = value;
  9926. };
  9927. Vue.prototype.__set_sync = function(target, key, value) {
  9928. if (!target) {
  9929. target = this;
  9930. }
  9931. target[key] = value;
  9932. };
  9933. Vue.prototype.__get_orig = function(item) {
  9934. if (isPlainObject(item)) {
  9935. return item['$orig'] || item
  9936. }
  9937. return item
  9938. };
  9939. Vue.prototype.__get_value = function(dataPath, target) {
  9940. return getTarget(target || this, dataPath)
  9941. };
  9942. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  9943. return renderClass(staticClass, dynamicClass)
  9944. };
  9945. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  9946. if (!dynamicStyle && !staticStyle) {
  9947. return ''
  9948. }
  9949. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  9950. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  9951. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  9952. };
  9953. Vue.prototype.__map = function(val, iteratee) {
  9954. //TODO 暂不考虑 string
  9955. var ret, i, l, keys, key;
  9956. if (Array.isArray(val)) {
  9957. ret = new Array(val.length);
  9958. for (i = 0, l = val.length; i < l; i++) {
  9959. ret[i] = iteratee(val[i], i);
  9960. }
  9961. return ret
  9962. } else if (isObject(val)) {
  9963. keys = Object.keys(val);
  9964. ret = Object.create(null);
  9965. for (i = 0, l = keys.length; i < l; i++) {
  9966. key = keys[i];
  9967. ret[key] = iteratee(val[key], key, i);
  9968. }
  9969. return ret
  9970. } else if (typeof val === 'number') {
  9971. ret = new Array(val);
  9972. for (i = 0, l = val; i < l; i++) {
  9973. // 第一个参数暂时仍和小程序一致
  9974. ret[i] = iteratee(i, i);
  9975. }
  9976. return ret
  9977. }
  9978. return []
  9979. };
  9980. }
  9981. /* */
  9982. var LIFECYCLE_HOOKS$1 = [
  9983. //App
  9984. 'onLaunch',
  9985. 'onShow',
  9986. 'onHide',
  9987. 'onUniNViewMessage',
  9988. 'onPageNotFound',
  9989. 'onThemeChange',
  9990. 'onError',
  9991. 'onUnhandledRejection',
  9992. //Page
  9993. 'onLoad',
  9994. // 'onShow',
  9995. 'onReady',
  9996. // 'onHide',
  9997. 'onUnload',
  9998. 'onPullDownRefresh',
  9999. 'onReachBottom',
  10000. 'onTabItemTap',
  10001. 'onAddToFavorites',
  10002. 'onShareTimeline',
  10003. 'onShareAppMessage',
  10004. 'onResize',
  10005. 'onPageScroll',
  10006. 'onNavigationBarButtonTap',
  10007. 'onBackPress',
  10008. 'onNavigationBarSearchInputChanged',
  10009. 'onNavigationBarSearchInputConfirmed',
  10010. 'onNavigationBarSearchInputClicked',
  10011. //Component
  10012. // 'onReady', // 兼容旧版本,应该移除该事件
  10013. 'onPageShow',
  10014. 'onPageHide',
  10015. 'onPageResize'
  10016. ];
  10017. function lifecycleMixin$1(Vue) {
  10018. //fixed vue-class-component
  10019. var oldExtend = Vue.extend;
  10020. Vue.extend = function(extendOptions) {
  10021. extendOptions = extendOptions || {};
  10022. var methods = extendOptions.methods;
  10023. if (methods) {
  10024. Object.keys(methods).forEach(function (methodName) {
  10025. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  10026. extendOptions[methodName] = methods[methodName];
  10027. delete methods[methodName];
  10028. }
  10029. });
  10030. }
  10031. return oldExtend.call(this, extendOptions)
  10032. };
  10033. var strategies = Vue.config.optionMergeStrategies;
  10034. var mergeHook = strategies.created;
  10035. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  10036. strategies[hook] = mergeHook;
  10037. });
  10038. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  10039. }
  10040. /* */
  10041. // install platform patch function
  10042. Vue.prototype.__patch__ = patch;
  10043. // public mount method
  10044. Vue.prototype.$mount = function(
  10045. el ,
  10046. hydrating
  10047. ) {
  10048. return mountComponent$1(this, el, hydrating)
  10049. };
  10050. lifecycleMixin$1(Vue);
  10051. internalMixin(Vue);
  10052. /* */
  10053. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  10054. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  10055. /***/ }),
  10056. /***/ 20:
  10057. /*!***********************************************************************************!*\
  10058. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/adapters/index.js ***!
  10059. \***********************************************************************************/
  10060. /*! no static exports found */
  10061. /***/ (function(module, exports, __webpack_require__) {
  10062. "use strict";
  10063. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _buildURL = _interopRequireDefault(__webpack_require__(/*! ../helpers/buildURL */ 21));
  10064. var _buildFullPath = _interopRequireDefault(__webpack_require__(/*! ../core/buildFullPath */ 23));
  10065. var _settle = _interopRequireDefault(__webpack_require__(/*! ../core/settle */ 26));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;}
  10066. /**
  10067. * 返回可选值存在的配置
  10068. * @param {Array} keys - 可选值数组
  10069. * @param {Object} config2 - 配置
  10070. * @return {{}} - 存在的配置项
  10071. */
  10072. var mergeKeys = function mergeKeys(keys, config2) {
  10073. var config = {};
  10074. keys.forEach(function (prop) {
  10075. if (typeof config2[prop] !== 'undefined') {
  10076. config[prop] = config2[prop];
  10077. }
  10078. });
  10079. return config;
  10080. };var _default =
  10081. function _default(config) {
  10082. return new Promise(function (resolve, reject) {
  10083. var _config = {
  10084. url: (0, _buildURL.default)((0, _buildFullPath.default)(config.baseURL, config.url), config.params),
  10085. header: config.header,
  10086. complete: function complete(response) {
  10087. response.config = config;
  10088. try {
  10089. // 对可能字符串不是json 的情况容错
  10090. if (typeof response.data === 'string') {
  10091. response.data = JSON.parse(response.data);
  10092. }
  10093. // eslint-disable-next-line no-empty
  10094. } catch (e) {
  10095. }
  10096. (0, _settle.default)(resolve, reject, response);
  10097. } };
  10098. var requestTask;
  10099. if (config.method === 'UPLOAD') {
  10100. delete _config.header['content-type'];
  10101. delete _config.header['Content-Type'];
  10102. var otherConfig = {
  10103. filePath: config.filePath,
  10104. name: config.name };
  10105. var optionalKeys = [
  10106. 'formData'];
  10107. requestTask = uni.uploadFile(_objectSpread(_objectSpread(_objectSpread({}, _config), otherConfig), mergeKeys(optionalKeys, config)));
  10108. } else if (config.method === 'DOWNLOAD') {
  10109. requestTask = uni.downloadFile(_config);
  10110. } else {
  10111. var _optionalKeys = [
  10112. 'data',
  10113. 'method',
  10114. 'timeout',
  10115. 'dataType',
  10116. 'responseType'];
  10117. requestTask = uni.request(_objectSpread(_objectSpread({}, _config), mergeKeys(_optionalKeys, config)));
  10118. }
  10119. if (config.getTask) {
  10120. config.getTask(requestTask, config);
  10121. }
  10122. });
  10123. };exports.default = _default;
  10124. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  10125. /***/ }),
  10126. /***/ 21:
  10127. /*!*************************************************************************************!*\
  10128. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/helpers/buildURL.js ***!
  10129. \*************************************************************************************/
  10130. /*! no static exports found */
  10131. /***/ (function(module, exports, __webpack_require__) {
  10132. "use strict";
  10133. Object.defineProperty(exports, "__esModule", { value: true });exports.default = buildURL;
  10134. var utils = _interopRequireWildcard(__webpack_require__(/*! ./../utils */ 22));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;}
  10135. function encode(val) {
  10136. return encodeURIComponent(val).
  10137. replace(/%40/gi, '@').
  10138. replace(/%3A/gi, ':').
  10139. replace(/%24/g, '$').
  10140. replace(/%2C/gi, ',').
  10141. replace(/%20/g, '+').
  10142. replace(/%5B/gi, '[').
  10143. replace(/%5D/gi, ']');
  10144. }
  10145. /**
  10146. * Build a URL by appending params to the end
  10147. *
  10148. * @param {string} url The base of the url (e.g., http://www.google.com)
  10149. * @param {object} [params] The params to be appended
  10150. * @returns {string} The formatted url
  10151. */
  10152. function buildURL(url, params) {
  10153. /*eslint no-param-reassign:0*/
  10154. if (!params) {
  10155. return url;
  10156. }
  10157. var serializedParams;
  10158. if (utils.isURLSearchParams(params)) {
  10159. serializedParams = params.toString();
  10160. } else {
  10161. var parts = [];
  10162. utils.forEach(params, function serialize(val, key) {
  10163. if (val === null || typeof val === 'undefined') {
  10164. return;
  10165. }
  10166. if (utils.isArray(val)) {
  10167. key = key + '[]';
  10168. } else {
  10169. val = [val];
  10170. }
  10171. utils.forEach(val, function parseValue(v) {
  10172. if (utils.isDate(v)) {
  10173. v = v.toISOString();
  10174. } else if (utils.isObject(v)) {
  10175. v = JSON.stringify(v);
  10176. }
  10177. parts.push(encode(key) + '=' + encode(v));
  10178. });
  10179. });
  10180. serializedParams = parts.join('&');
  10181. }
  10182. if (serializedParams) {
  10183. var hashmarkIndex = url.indexOf('#');
  10184. if (hashmarkIndex !== -1) {
  10185. url = url.slice(0, hashmarkIndex);
  10186. }
  10187. url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  10188. }
  10189. return url;
  10190. }
  10191. /***/ }),
  10192. /***/ 22:
  10193. /*!**************************************************************************!*\
  10194. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/utils.js ***!
  10195. \**************************************************************************/
  10196. /*! no static exports found */
  10197. /***/ (function(module, exports, __webpack_require__) {
  10198. "use strict";
  10199. // utils is a library of generic helper functions non-specific to axios
  10200. 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;
  10201. var toString = Object.prototype.toString;
  10202. /**
  10203. * Determine if a value is an Array
  10204. *
  10205. * @param {Object} val The value to test
  10206. * @returns {boolean} True if value is an Array, otherwise false
  10207. */
  10208. function isArray(val) {
  10209. return toString.call(val) === '[object Array]';
  10210. }
  10211. /**
  10212. * Determine if a value is an Object
  10213. *
  10214. * @param {Object} val The value to test
  10215. * @returns {boolean} True if value is an Object, otherwise false
  10216. */
  10217. function isObject(val) {
  10218. return val !== null && typeof val === 'object';
  10219. }
  10220. /**
  10221. * Determine if a value is a Date
  10222. *
  10223. * @param {Object} val The value to test
  10224. * @returns {boolean} True if value is a Date, otherwise false
  10225. */
  10226. function isDate(val) {
  10227. return toString.call(val) === '[object Date]';
  10228. }
  10229. /**
  10230. * Determine if a value is a URLSearchParams object
  10231. *
  10232. * @param {Object} val The value to test
  10233. * @returns {boolean} True if value is a URLSearchParams object, otherwise false
  10234. */
  10235. function isURLSearchParams(val) {
  10236. return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
  10237. }
  10238. /**
  10239. * Iterate over an Array or an Object invoking a function for each item.
  10240. *
  10241. * If `obj` is an Array callback will be called passing
  10242. * the value, index, and complete array for each item.
  10243. *
  10244. * If 'obj' is an Object callback will be called passing
  10245. * the value, key, and complete object for each property.
  10246. *
  10247. * @param {Object|Array} obj The object to iterate
  10248. * @param {Function} fn The callback to invoke for each item
  10249. */
  10250. function forEach(obj, fn) {
  10251. // Don't bother if no value provided
  10252. if (obj === null || typeof obj === 'undefined') {
  10253. return;
  10254. }
  10255. // Force an array if not already something iterable
  10256. if (typeof obj !== 'object') {
  10257. /*eslint no-param-reassign:0*/
  10258. obj = [obj];
  10259. }
  10260. if (isArray(obj)) {
  10261. // Iterate over array values
  10262. for (var i = 0, l = obj.length; i < l; i++) {
  10263. fn.call(null, obj[i], i, obj);
  10264. }
  10265. } else {
  10266. // Iterate over object keys
  10267. for (var key in obj) {
  10268. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  10269. fn.call(null, obj[key], key, obj);
  10270. }
  10271. }
  10272. }
  10273. }
  10274. /**
  10275. * 是否为boolean 值
  10276. * @param val
  10277. * @returns {boolean}
  10278. */
  10279. function isBoolean(val) {
  10280. return typeof val === 'boolean';
  10281. }
  10282. /**
  10283. * 是否为真正的对象{} new Object
  10284. * @param {any} obj - 检测的对象
  10285. * @returns {boolean}
  10286. */
  10287. function isPlainObject(obj) {
  10288. return Object.prototype.toString.call(obj) === '[object Object]';
  10289. }
  10290. /**
  10291. * Function equal to merge with the difference being that no reference
  10292. * to original objects is kept.
  10293. *
  10294. * @see merge
  10295. * @param {Object} obj1 Object to merge
  10296. * @returns {Object} Result of all merge properties
  10297. */
  10298. function deepMerge() /* obj1, obj2, obj3, ... */{
  10299. var result = {};
  10300. function assignValue(val, key) {
  10301. if (typeof result[key] === 'object' && typeof val === 'object') {
  10302. result[key] = deepMerge(result[key], val);
  10303. } else if (typeof val === 'object') {
  10304. result[key] = deepMerge({}, val);
  10305. } else {
  10306. result[key] = val;
  10307. }
  10308. }
  10309. for (var i = 0, l = arguments.length; i < l; i++) {
  10310. forEach(arguments[i], assignValue);
  10311. }
  10312. return result;
  10313. }
  10314. /***/ }),
  10315. /***/ 23:
  10316. /*!***************************************************************************************!*\
  10317. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/core/buildFullPath.js ***!
  10318. \***************************************************************************************/
  10319. /*! no static exports found */
  10320. /***/ (function(module, exports, __webpack_require__) {
  10321. "use strict";
  10322. Object.defineProperty(exports, "__esModule", { value: true });exports.default = buildFullPath;
  10323. var _isAbsoluteURL = _interopRequireDefault(__webpack_require__(/*! ../helpers/isAbsoluteURL */ 24));
  10324. var _combineURLs = _interopRequireDefault(__webpack_require__(/*! ../helpers/combineURLs */ 25));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  10325. /**
  10326. * Creates a new URL by combining the baseURL with the requestedURL,
  10327. * only when the requestedURL is not already an absolute URL.
  10328. * If the requestURL is absolute, this function returns the requestedURL untouched.
  10329. *
  10330. * @param {string} baseURL The base URL
  10331. * @param {string} requestedURL Absolute or relative URL to combine
  10332. * @returns {string} The combined full path
  10333. */
  10334. function buildFullPath(baseURL, requestedURL) {
  10335. if (baseURL && !(0, _isAbsoluteURL.default)(requestedURL)) {
  10336. return (0, _combineURLs.default)(baseURL, requestedURL);
  10337. }
  10338. return requestedURL;
  10339. }
  10340. /***/ }),
  10341. /***/ 24:
  10342. /*!******************************************************************************************!*\
  10343. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/helpers/isAbsoluteURL.js ***!
  10344. \******************************************************************************************/
  10345. /*! no static exports found */
  10346. /***/ (function(module, exports, __webpack_require__) {
  10347. "use strict";
  10348. /**
  10349. * Determines whether the specified URL is absolute
  10350. *
  10351. * @param {string} url The URL to test
  10352. * @returns {boolean} True if the specified URL is absolute, otherwise false
  10353. */Object.defineProperty(exports, "__esModule", { value: true });exports.default = isAbsoluteURL;
  10354. function isAbsoluteURL(url) {
  10355. // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  10356. // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  10357. // by any combination of letters, digits, plus, period, or hyphen.
  10358. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
  10359. }
  10360. /***/ }),
  10361. /***/ 25:
  10362. /*!****************************************************************************************!*\
  10363. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/helpers/combineURLs.js ***!
  10364. \****************************************************************************************/
  10365. /*! no static exports found */
  10366. /***/ (function(module, exports, __webpack_require__) {
  10367. "use strict";
  10368. /**
  10369. * Creates a new URL by combining the specified URLs
  10370. *
  10371. * @param {string} baseURL The base URL
  10372. * @param {string} relativeURL The relative URL
  10373. * @returns {string} The combined URL
  10374. */Object.defineProperty(exports, "__esModule", { value: true });exports.default = combineURLs;
  10375. function combineURLs(baseURL, relativeURL) {
  10376. return relativeURL ?
  10377. baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') :
  10378. baseURL;
  10379. }
  10380. /***/ }),
  10381. /***/ 26:
  10382. /*!********************************************************************************!*\
  10383. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/core/settle.js ***!
  10384. \********************************************************************************/
  10385. /*! no static exports found */
  10386. /***/ (function(module, exports, __webpack_require__) {
  10387. "use strict";
  10388. Object.defineProperty(exports, "__esModule", { value: true });exports.default = settle; /**
  10389. * Resolve or reject a Promise based on response status.
  10390. *
  10391. * @param {Function} resolve A function that resolves the promise.
  10392. * @param {Function} reject A function that rejects the promise.
  10393. * @param {object} response The response.
  10394. */
  10395. function settle(resolve, reject, response) {
  10396. var validateStatus = response.config.validateStatus;
  10397. var status = response.statusCode;
  10398. if (status && (!validateStatus || validateStatus(status))) {
  10399. resolve(response);
  10400. } else {
  10401. reject(response);
  10402. }
  10403. }
  10404. /***/ }),
  10405. /***/ 27:
  10406. /*!********************************************************************************************!*\
  10407. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/core/InterceptorManager.js ***!
  10408. \********************************************************************************************/
  10409. /*! no static exports found */
  10410. /***/ (function(module, exports, __webpack_require__) {
  10411. "use strict";
  10412. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  10413. function InterceptorManager() {
  10414. this.handlers = [];
  10415. }
  10416. /**
  10417. * Add a new interceptor to the stack
  10418. *
  10419. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  10420. * @param {Function} rejected The function to handle `reject` for a `Promise`
  10421. *
  10422. * @return {Number} An ID used to remove interceptor later
  10423. */
  10424. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  10425. this.handlers.push({
  10426. fulfilled: fulfilled,
  10427. rejected: rejected });
  10428. return this.handlers.length - 1;
  10429. };
  10430. /**
  10431. * Remove an interceptor from the stack
  10432. *
  10433. * @param {Number} id The ID that was returned by `use`
  10434. */
  10435. InterceptorManager.prototype.eject = function eject(id) {
  10436. if (this.handlers[id]) {
  10437. this.handlers[id] = null;
  10438. }
  10439. };
  10440. /**
  10441. * Iterate over all the registered interceptors
  10442. *
  10443. * This method is particularly useful for skipping over any
  10444. * interceptors that may have become `null` calling `eject`.
  10445. *
  10446. * @param {Function} fn The function to call for each interceptor
  10447. */
  10448. InterceptorManager.prototype.forEach = function forEach(fn) {
  10449. this.handlers.forEach(function (h) {
  10450. if (h !== null) {
  10451. fn(h);
  10452. }
  10453. });
  10454. };var _default =
  10455. InterceptorManager;exports.default = _default;
  10456. /***/ }),
  10457. /***/ 28:
  10458. /*!*************************************************************************************!*\
  10459. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/core/mergeConfig.js ***!
  10460. \*************************************************************************************/
  10461. /*! no static exports found */
  10462. /***/ (function(module, exports, __webpack_require__) {
  10463. "use strict";
  10464. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _utils = __webpack_require__(/*! ../utils */ 22);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;}
  10465. /**
  10466. * 合并局部配置优先的配置,如果局部有该配置项则用局部,如果全局有该配置项则用全局
  10467. * @param {Array} keys - 配置项
  10468. * @param {Object} globalsConfig - 当前的全局配置
  10469. * @param {Object} config2 - 局部配置
  10470. * @return {{}}
  10471. */
  10472. var mergeKeys = function mergeKeys(keys, globalsConfig, config2) {
  10473. var config = {};
  10474. keys.forEach(function (prop) {
  10475. if (typeof config2[prop] !== 'undefined') {
  10476. config[prop] = config2[prop];
  10477. } else if (typeof globalsConfig[prop] !== 'undefined') {
  10478. config[prop] = globalsConfig[prop];
  10479. }
  10480. });
  10481. return config;
  10482. };
  10483. /**
  10484. *
  10485. * @param globalsConfig - 当前实例的全局配置
  10486. * @param config2 - 当前的局部配置
  10487. * @return - 合并后的配置
  10488. */var _default =
  10489. function _default(globalsConfig) {var config2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  10490. var method = config2.method || globalsConfig.method || 'GET';
  10491. var config = {
  10492. baseURL: globalsConfig.baseURL || '',
  10493. method: method,
  10494. url: config2.url || '',
  10495. params: config2.params || {},
  10496. custom: _objectSpread(_objectSpread({}, globalsConfig.custom || {}), config2.custom || {}),
  10497. header: (0, _utils.deepMerge)(globalsConfig.header || {}, config2.header || {}) };
  10498. var defaultToConfig2Keys = ['getTask', 'validateStatus'];
  10499. config = _objectSpread(_objectSpread({}, config), mergeKeys(defaultToConfig2Keys, globalsConfig, config2));
  10500. // eslint-disable-next-line no-empty
  10501. if (method === 'DOWNLOAD') {
  10502. } else if (method === 'UPLOAD') {
  10503. delete config.header['content-type'];
  10504. delete config.header['Content-Type'];
  10505. var uploadKeys = [
  10506. 'filePath',
  10507. 'name',
  10508. 'formData'];
  10509. uploadKeys.forEach(function (prop) {
  10510. if (typeof config2[prop] !== 'undefined') {
  10511. config[prop] = config2[prop];
  10512. }
  10513. });
  10514. } else {
  10515. var defaultsKeys = [
  10516. 'data',
  10517. 'timeout',
  10518. 'dataType',
  10519. 'responseType'];
  10520. config = _objectSpread(_objectSpread({}, config), mergeKeys(defaultsKeys, globalsConfig, config2));
  10521. }
  10522. return config;
  10523. };exports.default = _default;
  10524. /***/ }),
  10525. /***/ 29:
  10526. /*!**********************************************************************************!*\
  10527. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/core/defaults.js ***!
  10528. \**********************************************************************************/
  10529. /*! no static exports found */
  10530. /***/ (function(module, exports, __webpack_require__) {
  10531. "use strict";
  10532. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  10533. * 默认的全局配置
  10534. */var _default =
  10535. {
  10536. baseURL: '',
  10537. header: {},
  10538. method: 'GET',
  10539. dataType: 'json',
  10540. responseType: 'text',
  10541. custom: {},
  10542. timeout: 30000,
  10543. validateStatus: function validateStatus(status) {
  10544. return status >= 200 && status < 300;
  10545. } };exports.default = _default;
  10546. /***/ }),
  10547. /***/ 3:
  10548. /*!***********************************!*\
  10549. !*** (webpack)/buildin/global.js ***!
  10550. \***********************************/
  10551. /*! no static exports found */
  10552. /***/ (function(module, exports) {
  10553. var g;
  10554. // This works in non-strict mode
  10555. g = (function() {
  10556. return this;
  10557. })();
  10558. try {
  10559. // This works if eval is allowed (see CSP)
  10560. g = g || new Function("return this")();
  10561. } catch (e) {
  10562. // This works if the window reference is available
  10563. if (typeof window === "object") g = window;
  10564. }
  10565. // g can still be undefined, but nothing to do about it...
  10566. // We return undefined, instead of nothing here, so it's
  10567. // easier to handle this case. if(!global) { ...}
  10568. module.exports = g;
  10569. /***/ }),
  10570. /***/ 30:
  10571. /*!*********************************************************!*\
  10572. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/js-md5/md5.min.js ***!
  10573. \*********************************************************/
  10574. /*! no static exports found */
  10575. /***/ (function(module, exports, __webpack_require__) {
  10576. /* WEBPACK VAR INJECTION */(function(process, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/**
  10577. * [js-md5]{@link https://github.com/emn178/js-md5}
  10578. *
  10579. * @namespace md5
  10580. * @version 0.7.3
  10581. * @author Chen, Yi-Cyuan [emn178@gmail.com]
  10582. * @copyright Chen, Yi-Cyuan 2014-2017
  10583. * @license MIT
  10584. */
  10585. !function () {"use strict";function t(t) {if (t) d[0] = d[16] = d[1] = d[2] = d[3] = d[4] = d[5] = d[6] = d[7] = d[8] = d[9] = d[10] = d[11] = d[12] = d[13] = d[14] = d[15] = 0, this.blocks = d, this.buffer8 = l;else if (a) {var r = new ArrayBuffer(68);this.buffer8 = new Uint8Array(r), this.blocks = new Uint32Array(r);} else this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];this.h0 = this.h1 = this.h2 = this.h3 = this.start = this.bytes = this.hBytes = 0, this.finalized = this.hashed = !1, this.first = !0;}var r = "input is invalid type",e = "object" == typeof window,i = e ? window : {};i.JS_MD5_NO_WINDOW && (e = !1);var s = !e && "object" == typeof self,h = !i.JS_MD5_NO_NODE_JS && "object" == typeof process && process.versions && process.versions.node;h ? i = global : s && (i = self);var f = !i.JS_MD5_NO_COMMON_JS && "object" == typeof module && module.exports,o = true && __webpack_require__(/*! !webpack amd options */ 33),a = !i.JS_MD5_NO_ARRAY_BUFFER && "undefined" != typeof ArrayBuffer,n = "0123456789abcdef".split(""),u = [128, 32768, 8388608, -2147483648],y = [0, 8, 16, 24],c = ["hex", "array", "digest", "buffer", "arrayBuffer", "base64"],p = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),d = [],l;if (a) {var A = new ArrayBuffer(68);l = new Uint8Array(A), d = new Uint32Array(A);}!i.JS_MD5_NO_NODE_JS && Array.isArray || (Array.isArray = function (t) {return "[object Array]" === Object.prototype.toString.call(t);}), !a || !i.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW && ArrayBuffer.isView || (ArrayBuffer.isView = function (t) {return "object" == typeof t && t.buffer && t.buffer.constructor === ArrayBuffer;});var b = function b(r) {return function (e) {return new t(!0).update(e)[r]();};},v = function v() {var r = b("hex");h && (r = w(r)), r.create = function () {return new t();}, r.update = function (t) {return r.create().update(t);};for (var e = 0; e < c.length; ++e) {var i = c[e];r[i] = b(i);}return r;},w = function w(t) {var e = eval("require('crypto')"),i = eval("require('buffer').Buffer"),s = function s(_s) {if ("string" == typeof _s) return e.createHash("md5").update(_s, "utf8").digest("hex");if (null === _s || void 0 === _s) throw r;return _s.constructor === ArrayBuffer && (_s = new Uint8Array(_s)), Array.isArray(_s) || ArrayBuffer.isView(_s) || _s.constructor === i ? e.createHash("md5").update(new i(_s)).digest("hex") : t(_s);};return s;};t.prototype.update = function (t) {if (!this.finalized) {var e,i = typeof t;if ("string" !== i) {if ("object" !== i) throw r;if (null === t) throw r;if (a && t.constructor === ArrayBuffer) t = new Uint8Array(t);else if (!(Array.isArray(t) || a && ArrayBuffer.isView(t))) throw r;e = !0;}for (var s, h, f = 0, o = t.length, n = this.blocks, u = this.buffer8; f < o;) {if (this.hashed && (this.hashed = !1, n[0] = n[16], n[16] = n[1] = n[2] = n[3] = n[4] = n[5] = n[6] = n[7] = n[8] = n[9] = n[10] = n[11] = n[12] = n[13] = n[14] = n[15] = 0), e) {if (a) for (h = this.start; f < o && h < 64; ++f) {u[h++] = t[f];} else for (h = this.start; f < o && h < 64; ++f) {n[h >> 2] |= t[f] << y[3 & h++];}} else if (a) for (h = this.start; f < o && h < 64; ++f) {(s = t.charCodeAt(f)) < 128 ? u[h++] = s : s < 2048 ? (u[h++] = 192 | s >> 6, u[h++] = 128 | 63 & s) : s < 55296 || s >= 57344 ? (u[h++] = 224 | s >> 12, u[h++] = 128 | s >> 6 & 63, u[h++] = 128 | 63 & s) : (s = 65536 + ((1023 & s) << 10 | 1023 & t.charCodeAt(++f)), u[h++] = 240 | s >> 18, u[h++] = 128 | s >> 12 & 63, u[h++] = 128 | s >> 6 & 63, u[h++] = 128 | 63 & s);} else for (h = this.start; f < o && h < 64; ++f) {(s = t.charCodeAt(f)) < 128 ? n[h >> 2] |= s << y[3 & h++] : s < 2048 ? (n[h >> 2] |= (192 | s >> 6) << y[3 & h++], n[h >> 2] |= (128 | 63 & s) << y[3 & h++]) : s < 55296 || s >= 57344 ? (n[h >> 2] |= (224 | s >> 12) << y[3 & h++], n[h >> 2] |= (128 | s >> 6 & 63) << y[3 & h++], n[h >> 2] |= (128 | 63 & s) << y[3 & h++]) : (s = 65536 + ((1023 & s) << 10 | 1023 & t.charCodeAt(++f)), n[h >> 2] |= (240 | s >> 18) << y[3 & h++], n[h >> 2] |= (128 | s >> 12 & 63) << y[3 & h++], n[h >> 2] |= (128 | s >> 6 & 63) << y[3 & h++], n[h >> 2] |= (128 | 63 & s) << y[3 & h++]);}this.lastByteIndex = h, this.bytes += h - this.start, h >= 64 ? (this.start = h - 64, this.hash(), this.hashed = !0) : this.start = h;}return this.bytes > 4294967295 && (this.hBytes += this.bytes / 4294967296 << 0, this.bytes = this.bytes % 4294967296), this;}}, t.prototype.finalize = function () {if (!this.finalized) {this.finalized = !0;var t = this.blocks,r = this.lastByteIndex;t[r >> 2] |= u[3 & r], r >= 56 && (this.hashed || this.hash(), t[0] = t[16], t[16] = t[1] = t[2] = t[3] = t[4] = t[5] = t[6] = t[7] = t[8] = t[9] = t[10] = t[11] = t[12] = t[13] = t[14] = t[15] = 0), t[14] = this.bytes << 3, t[15] = this.hBytes << 3 | this.bytes >>> 29, this.hash();}}, t.prototype.hash = function () {var t,r,e,i,s,h,f = this.blocks;this.first ? r = ((r = ((t = ((t = f[0] - 680876937) << 7 | t >>> 25) - 271733879 << 0) ^ (e = ((e = (-271733879 ^ (i = ((i = (-1732584194 ^ 2004318071 & t) + f[1] - 117830708) << 12 | i >>> 20) + t << 0) & (-271733879 ^ t)) + f[2] - 1126478375) << 17 | e >>> 15) + i << 0) & (i ^ t)) + f[3] - 1316259209) << 22 | r >>> 10) + e << 0 : (t = this.h0, r = this.h1, e = this.h2, r = ((r += ((t = ((t += ((i = this.h3) ^ r & (e ^ i)) + f[0] - 680876936) << 7 | t >>> 25) + r << 0) ^ (e = ((e += (r ^ (i = ((i += (e ^ t & (r ^ e)) + f[1] - 389564586) << 12 | i >>> 20) + t << 0) & (t ^ r)) + f[2] + 606105819) << 17 | e >>> 15) + i << 0) & (i ^ t)) + f[3] - 1044525330) << 22 | r >>> 10) + e << 0), r = ((r += ((t = ((t += (i ^ r & (e ^ i)) + f[4] - 176418897) << 7 | t >>> 25) + r << 0) ^ (e = ((e += (r ^ (i = ((i += (e ^ t & (r ^ e)) + f[5] + 1200080426) << 12 | i >>> 20) + t << 0) & (t ^ r)) + f[6] - 1473231341) << 17 | e >>> 15) + i << 0) & (i ^ t)) + f[7] - 45705983) << 22 | r >>> 10) + e << 0, r = ((r += ((t = ((t += (i ^ r & (e ^ i)) + f[8] + 1770035416) << 7 | t >>> 25) + r << 0) ^ (e = ((e += (r ^ (i = ((i += (e ^ t & (r ^ e)) + f[9] - 1958414417) << 12 | i >>> 20) + t << 0) & (t ^ r)) + f[10] - 42063) << 17 | e >>> 15) + i << 0) & (i ^ t)) + f[11] - 1990404162) << 22 | r >>> 10) + e << 0, r = ((r += ((t = ((t += (i ^ r & (e ^ i)) + f[12] + 1804603682) << 7 | t >>> 25) + r << 0) ^ (e = ((e += (r ^ (i = ((i += (e ^ t & (r ^ e)) + f[13] - 40341101) << 12 | i >>> 20) + t << 0) & (t ^ r)) + f[14] - 1502002290) << 17 | e >>> 15) + i << 0) & (i ^ t)) + f[15] + 1236535329) << 22 | r >>> 10) + e << 0, r = ((r += ((i = ((i += (r ^ e & ((t = ((t += (e ^ i & (r ^ e)) + f[1] - 165796510) << 5 | t >>> 27) + r << 0) ^ r)) + f[6] - 1069501632) << 9 | i >>> 23) + t << 0) ^ t & ((e = ((e += (t ^ r & (i ^ t)) + f[11] + 643717713) << 14 | e >>> 18) + i << 0) ^ i)) + f[0] - 373897302) << 20 | r >>> 12) + e << 0, r = ((r += ((i = ((i += (r ^ e & ((t = ((t += (e ^ i & (r ^ e)) + f[5] - 701558691) << 5 | t >>> 27) + r << 0) ^ r)) + f[10] + 38016083) << 9 | i >>> 23) + t << 0) ^ t & ((e = ((e += (t ^ r & (i ^ t)) + f[15] - 660478335) << 14 | e >>> 18) + i << 0) ^ i)) + f[4] - 405537848) << 20 | r >>> 12) + e << 0, r = ((r += ((i = ((i += (r ^ e & ((t = ((t += (e ^ i & (r ^ e)) + f[9] + 568446438) << 5 | t >>> 27) + r << 0) ^ r)) + f[14] - 1019803690) << 9 | i >>> 23) + t << 0) ^ t & ((e = ((e += (t ^ r & (i ^ t)) + f[3] - 187363961) << 14 | e >>> 18) + i << 0) ^ i)) + f[8] + 1163531501) << 20 | r >>> 12) + e << 0, r = ((r += ((i = ((i += (r ^ e & ((t = ((t += (e ^ i & (r ^ e)) + f[13] - 1444681467) << 5 | t >>> 27) + r << 0) ^ r)) + f[2] - 51403784) << 9 | i >>> 23) + t << 0) ^ t & ((e = ((e += (t ^ r & (i ^ t)) + f[7] + 1735328473) << 14 | e >>> 18) + i << 0) ^ i)) + f[12] - 1926607734) << 20 | r >>> 12) + e << 0, r = ((r += ((h = (i = ((i += ((s = r ^ e) ^ (t = ((t += (s ^ i) + f[5] - 378558) << 4 | t >>> 28) + r << 0)) + f[8] - 2022574463) << 11 | i >>> 21) + t << 0) ^ t) ^ (e = ((e += (h ^ r) + f[11] + 1839030562) << 16 | e >>> 16) + i << 0)) + f[14] - 35309556) << 23 | r >>> 9) + e << 0, r = ((r += ((h = (i = ((i += ((s = r ^ e) ^ (t = ((t += (s ^ i) + f[1] - 1530992060) << 4 | t >>> 28) + r << 0)) + f[4] + 1272893353) << 11 | i >>> 21) + t << 0) ^ t) ^ (e = ((e += (h ^ r) + f[7] - 155497632) << 16 | e >>> 16) + i << 0)) + f[10] - 1094730640) << 23 | r >>> 9) + e << 0, r = ((r += ((h = (i = ((i += ((s = r ^ e) ^ (t = ((t += (s ^ i) + f[13] + 681279174) << 4 | t >>> 28) + r << 0)) + f[0] - 358537222) << 11 | i >>> 21) + t << 0) ^ t) ^ (e = ((e += (h ^ r) + f[3] - 722521979) << 16 | e >>> 16) + i << 0)) + f[6] + 76029189) << 23 | r >>> 9) + e << 0, r = ((r += ((h = (i = ((i += ((s = r ^ e) ^ (t = ((t += (s ^ i) + f[9] - 640364487) << 4 | t >>> 28) + r << 0)) + f[12] - 421815835) << 11 | i >>> 21) + t << 0) ^ t) ^ (e = ((e += (h ^ r) + f[15] + 530742520) << 16 | e >>> 16) + i << 0)) + f[2] - 995338651) << 23 | r >>> 9) + e << 0, r = ((r += ((i = ((i += (r ^ ((t = ((t += (e ^ (r | ~i)) + f[0] - 198630844) << 6 | t >>> 26) + r << 0) | ~e)) + f[7] + 1126891415) << 10 | i >>> 22) + t << 0) ^ ((e = ((e += (t ^ (i | ~r)) + f[14] - 1416354905) << 15 | e >>> 17) + i << 0) | ~t)) + f[5] - 57434055) << 21 | r >>> 11) + e << 0, r = ((r += ((i = ((i += (r ^ ((t = ((t += (e ^ (r | ~i)) + f[12] + 1700485571) << 6 | t >>> 26) + r << 0) | ~e)) + f[3] - 1894986606) << 10 | i >>> 22) + t << 0) ^ ((e = ((e += (t ^ (i | ~r)) + f[10] - 1051523) << 15 | e >>> 17) + i << 0) | ~t)) + f[1] - 2054922799) << 21 | r >>> 11) + e << 0, r = ((r += ((i = ((i += (r ^ ((t = ((t += (e ^ (r | ~i)) + f[8] + 1873313359) << 6 | t >>> 26) + r << 0) | ~e)) + f[15] - 30611744) << 10 | i >>> 22) + t << 0) ^ ((e = ((e += (t ^ (i | ~r)) + f[6] - 1560198380) << 15 | e >>> 17) + i << 0) | ~t)) + f[13] + 1309151649) << 21 | r >>> 11) + e << 0, r = ((r += ((i = ((i += (r ^ ((t = ((t += (e ^ (r | ~i)) + f[4] - 145523070) << 6 | t >>> 26) + r << 0) | ~e)) + f[11] - 1120210379) << 10 | i >>> 22) + t << 0) ^ ((e = ((e += (t ^ (i | ~r)) + f[2] + 718787259) << 15 | e >>> 17) + i << 0) | ~t)) + f[9] - 343485551) << 21 | r >>> 11) + e << 0, this.first ? (this.h0 = t + 1732584193 << 0, this.h1 = r - 271733879 << 0, this.h2 = e - 1732584194 << 0, this.h3 = i + 271733878 << 0, this.first = !1) : (this.h0 = this.h0 + t << 0, this.h1 = this.h1 + r << 0, this.h2 = this.h2 + e << 0, this.h3 = this.h3 + i << 0);}, t.prototype.hex = function () {this.finalize();var t = this.h0,r = this.h1,e = this.h2,i = this.h3;return n[t >> 4 & 15] + n[15 & t] + n[t >> 12 & 15] + n[t >> 8 & 15] + n[t >> 20 & 15] + n[t >> 16 & 15] + n[t >> 28 & 15] + n[t >> 24 & 15] + n[r >> 4 & 15] + n[15 & r] + n[r >> 12 & 15] + n[r >> 8 & 15] + n[r >> 20 & 15] + n[r >> 16 & 15] + n[r >> 28 & 15] + n[r >> 24 & 15] + n[e >> 4 & 15] + n[15 & e] + n[e >> 12 & 15] + n[e >> 8 & 15] + n[e >> 20 & 15] + n[e >> 16 & 15] + n[e >> 28 & 15] + n[e >> 24 & 15] + n[i >> 4 & 15] + n[15 & i] + n[i >> 12 & 15] + n[i >> 8 & 15] + n[i >> 20 & 15] + n[i >> 16 & 15] + n[i >> 28 & 15] + n[i >> 24 & 15];}, t.prototype.toString = t.prototype.hex, t.prototype.digest = function () {this.finalize();var t = this.h0,r = this.h1,e = this.h2,i = this.h3;return [255 & t, t >> 8 & 255, t >> 16 & 255, t >> 24 & 255, 255 & r, r >> 8 & 255, r >> 16 & 255, r >> 24 & 255, 255 & e, e >> 8 & 255, e >> 16 & 255, e >> 24 & 255, 255 & i, i >> 8 & 255, i >> 16 & 255, i >> 24 & 255];}, t.prototype.array = t.prototype.digest, t.prototype.arrayBuffer = function () {this.finalize();var t = new ArrayBuffer(16),r = new Uint32Array(t);return r[0] = this.h0, r[1] = this.h1, r[2] = this.h2, r[3] = this.h3, t;}, t.prototype.buffer = t.prototype.arrayBuffer, t.prototype.base64 = function () {for (var t, r, e, i = "", s = this.array(), h = 0; h < 15;) {t = s[h++], r = s[h++], e = s[h++], i += p[t >>> 2] + p[63 & (t << 4 | r >>> 4)] + p[63 & (r << 2 | e >>> 6)] + p[63 & e];}return t = s[h], i += p[t >>> 2] + p[t << 4 & 63] + "==";};var _ = v();f ? module.exports = _ : (i.md5 = _, o && !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {return _;}).call(exports, __webpack_require__, exports, module),
  10586. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)));}();
  10587. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../HBuilderX/plugins/uniapp-cli/node_modules/node-libs-browser/mock/process.js */ 31), __webpack_require__(/*! ./../../../../HBuilderX/plugins/uniapp-cli/node_modules/webpack/buildin/global.js */ 3)))
  10588. /***/ }),
  10589. /***/ 31:
  10590. /*!********************************************************!*\
  10591. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  10592. \********************************************************/
  10593. /*! no static exports found */
  10594. /***/ (function(module, exports, __webpack_require__) {
  10595. exports.nextTick = function nextTick(fn) {
  10596. var args = Array.prototype.slice.call(arguments);
  10597. args.shift();
  10598. setTimeout(function () {
  10599. fn.apply(null, args);
  10600. }, 0);
  10601. };
  10602. exports.platform = exports.arch =
  10603. exports.execPath = exports.title = 'browser';
  10604. exports.pid = 1;
  10605. exports.browser = true;
  10606. exports.env = {};
  10607. exports.argv = [];
  10608. exports.binding = function (name) {
  10609. throw new Error('No such module. (Possibly not yet loaded)')
  10610. };
  10611. (function () {
  10612. var cwd = '/';
  10613. var path;
  10614. exports.cwd = function () { return cwd };
  10615. exports.chdir = function (dir) {
  10616. if (!path) path = __webpack_require__(/*! path */ 32);
  10617. cwd = path.resolve(dir, cwd);
  10618. };
  10619. })();
  10620. exports.exit = exports.kill =
  10621. exports.umask = exports.dlopen =
  10622. exports.uptime = exports.memoryUsage =
  10623. exports.uvCounters = function() {};
  10624. exports.features = {};
  10625. /***/ }),
  10626. /***/ 32:
  10627. /*!***********************************************!*\
  10628. !*** ./node_modules/path-browserify/index.js ***!
  10629. \***********************************************/
  10630. /*! no static exports found */
  10631. /***/ (function(module, exports, __webpack_require__) {
  10632. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  10633. // backported and transplited with Babel, with backwards-compat fixes
  10634. // Copyright Joyent, Inc. and other Node contributors.
  10635. //
  10636. // Permission is hereby granted, free of charge, to any person obtaining a
  10637. // copy of this software and associated documentation files (the
  10638. // "Software"), to deal in the Software without restriction, including
  10639. // without limitation the rights to use, copy, modify, merge, publish,
  10640. // distribute, sublicense, and/or sell copies of the Software, and to permit
  10641. // persons to whom the Software is furnished to do so, subject to the
  10642. // following conditions:
  10643. //
  10644. // The above copyright notice and this permission notice shall be included
  10645. // in all copies or substantial portions of the Software.
  10646. //
  10647. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  10648. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  10649. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  10650. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  10651. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  10652. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  10653. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  10654. // resolves . and .. elements in a path array with directory names there
  10655. // must be no slashes, empty elements, or device names (c:\) in the array
  10656. // (so also no leading and trailing slashes - it does not distinguish
  10657. // relative and absolute paths)
  10658. function normalizeArray(parts, allowAboveRoot) {
  10659. // if the path tries to go above the root, `up` ends up > 0
  10660. var up = 0;
  10661. for (var i = parts.length - 1; i >= 0; i--) {
  10662. var last = parts[i];
  10663. if (last === '.') {
  10664. parts.splice(i, 1);
  10665. } else if (last === '..') {
  10666. parts.splice(i, 1);
  10667. up++;
  10668. } else if (up) {
  10669. parts.splice(i, 1);
  10670. up--;
  10671. }
  10672. }
  10673. // if the path is allowed to go above the root, restore leading ..s
  10674. if (allowAboveRoot) {
  10675. for (; up--; up) {
  10676. parts.unshift('..');
  10677. }
  10678. }
  10679. return parts;
  10680. }
  10681. // path.resolve([from ...], to)
  10682. // posix version
  10683. exports.resolve = function() {
  10684. var resolvedPath = '',
  10685. resolvedAbsolute = false;
  10686. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  10687. var path = (i >= 0) ? arguments[i] : process.cwd();
  10688. // Skip empty and invalid entries
  10689. if (typeof path !== 'string') {
  10690. throw new TypeError('Arguments to path.resolve must be strings');
  10691. } else if (!path) {
  10692. continue;
  10693. }
  10694. resolvedPath = path + '/' + resolvedPath;
  10695. resolvedAbsolute = path.charAt(0) === '/';
  10696. }
  10697. // At this point the path should be resolved to a full absolute path, but
  10698. // handle relative paths to be safe (might happen when process.cwd() fails)
  10699. // Normalize the path
  10700. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  10701. return !!p;
  10702. }), !resolvedAbsolute).join('/');
  10703. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  10704. };
  10705. // path.normalize(path)
  10706. // posix version
  10707. exports.normalize = function(path) {
  10708. var isAbsolute = exports.isAbsolute(path),
  10709. trailingSlash = substr(path, -1) === '/';
  10710. // Normalize the path
  10711. path = normalizeArray(filter(path.split('/'), function(p) {
  10712. return !!p;
  10713. }), !isAbsolute).join('/');
  10714. if (!path && !isAbsolute) {
  10715. path = '.';
  10716. }
  10717. if (path && trailingSlash) {
  10718. path += '/';
  10719. }
  10720. return (isAbsolute ? '/' : '') + path;
  10721. };
  10722. // posix version
  10723. exports.isAbsolute = function(path) {
  10724. return path.charAt(0) === '/';
  10725. };
  10726. // posix version
  10727. exports.join = function() {
  10728. var paths = Array.prototype.slice.call(arguments, 0);
  10729. return exports.normalize(filter(paths, function(p, index) {
  10730. if (typeof p !== 'string') {
  10731. throw new TypeError('Arguments to path.join must be strings');
  10732. }
  10733. return p;
  10734. }).join('/'));
  10735. };
  10736. // path.relative(from, to)
  10737. // posix version
  10738. exports.relative = function(from, to) {
  10739. from = exports.resolve(from).substr(1);
  10740. to = exports.resolve(to).substr(1);
  10741. function trim(arr) {
  10742. var start = 0;
  10743. for (; start < arr.length; start++) {
  10744. if (arr[start] !== '') break;
  10745. }
  10746. var end = arr.length - 1;
  10747. for (; end >= 0; end--) {
  10748. if (arr[end] !== '') break;
  10749. }
  10750. if (start > end) return [];
  10751. return arr.slice(start, end - start + 1);
  10752. }
  10753. var fromParts = trim(from.split('/'));
  10754. var toParts = trim(to.split('/'));
  10755. var length = Math.min(fromParts.length, toParts.length);
  10756. var samePartsLength = length;
  10757. for (var i = 0; i < length; i++) {
  10758. if (fromParts[i] !== toParts[i]) {
  10759. samePartsLength = i;
  10760. break;
  10761. }
  10762. }
  10763. var outputParts = [];
  10764. for (var i = samePartsLength; i < fromParts.length; i++) {
  10765. outputParts.push('..');
  10766. }
  10767. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  10768. return outputParts.join('/');
  10769. };
  10770. exports.sep = '/';
  10771. exports.delimiter = ':';
  10772. exports.dirname = function (path) {
  10773. if (typeof path !== 'string') path = path + '';
  10774. if (path.length === 0) return '.';
  10775. var code = path.charCodeAt(0);
  10776. var hasRoot = code === 47 /*/*/;
  10777. var end = -1;
  10778. var matchedSlash = true;
  10779. for (var i = path.length - 1; i >= 1; --i) {
  10780. code = path.charCodeAt(i);
  10781. if (code === 47 /*/*/) {
  10782. if (!matchedSlash) {
  10783. end = i;
  10784. break;
  10785. }
  10786. } else {
  10787. // We saw the first non-path separator
  10788. matchedSlash = false;
  10789. }
  10790. }
  10791. if (end === -1) return hasRoot ? '/' : '.';
  10792. if (hasRoot && end === 1) {
  10793. // return '//';
  10794. // Backwards-compat fix:
  10795. return '/';
  10796. }
  10797. return path.slice(0, end);
  10798. };
  10799. function basename(path) {
  10800. if (typeof path !== 'string') path = path + '';
  10801. var start = 0;
  10802. var end = -1;
  10803. var matchedSlash = true;
  10804. var i;
  10805. for (i = path.length - 1; i >= 0; --i) {
  10806. if (path.charCodeAt(i) === 47 /*/*/) {
  10807. // If we reached a path separator that was not part of a set of path
  10808. // separators at the end of the string, stop now
  10809. if (!matchedSlash) {
  10810. start = i + 1;
  10811. break;
  10812. }
  10813. } else if (end === -1) {
  10814. // We saw the first non-path separator, mark this as the end of our
  10815. // path component
  10816. matchedSlash = false;
  10817. end = i + 1;
  10818. }
  10819. }
  10820. if (end === -1) return '';
  10821. return path.slice(start, end);
  10822. }
  10823. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  10824. // in new Node.js versions, so only basename() above is backported here
  10825. exports.basename = function (path, ext) {
  10826. var f = basename(path);
  10827. if (ext && f.substr(-1 * ext.length) === ext) {
  10828. f = f.substr(0, f.length - ext.length);
  10829. }
  10830. return f;
  10831. };
  10832. exports.extname = function (path) {
  10833. if (typeof path !== 'string') path = path + '';
  10834. var startDot = -1;
  10835. var startPart = 0;
  10836. var end = -1;
  10837. var matchedSlash = true;
  10838. // Track the state of characters (if any) we see before our first dot and
  10839. // after any path separator we find
  10840. var preDotState = 0;
  10841. for (var i = path.length - 1; i >= 0; --i) {
  10842. var code = path.charCodeAt(i);
  10843. if (code === 47 /*/*/) {
  10844. // If we reached a path separator that was not part of a set of path
  10845. // separators at the end of the string, stop now
  10846. if (!matchedSlash) {
  10847. startPart = i + 1;
  10848. break;
  10849. }
  10850. continue;
  10851. }
  10852. if (end === -1) {
  10853. // We saw the first non-path separator, mark this as the end of our
  10854. // extension
  10855. matchedSlash = false;
  10856. end = i + 1;
  10857. }
  10858. if (code === 46 /*.*/) {
  10859. // If this is our first dot, mark it as the start of our extension
  10860. if (startDot === -1)
  10861. startDot = i;
  10862. else if (preDotState !== 1)
  10863. preDotState = 1;
  10864. } else if (startDot !== -1) {
  10865. // We saw a non-dot and non-path separator before our dot, so we should
  10866. // have a good chance at having a non-empty extension
  10867. preDotState = -1;
  10868. }
  10869. }
  10870. if (startDot === -1 || end === -1 ||
  10871. // We saw a non-dot character immediately before the dot
  10872. preDotState === 0 ||
  10873. // The (right-most) trimmed path component is exactly '..'
  10874. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  10875. return '';
  10876. }
  10877. return path.slice(startDot, end);
  10878. };
  10879. function filter (xs, f) {
  10880. if (xs.filter) return xs.filter(f);
  10881. var res = [];
  10882. for (var i = 0; i < xs.length; i++) {
  10883. if (f(xs[i], i, xs)) res.push(xs[i]);
  10884. }
  10885. return res;
  10886. }
  10887. // String.prototype.substr - negative index don't work in IE8
  10888. var substr = 'ab'.substr(-1) === 'b'
  10889. ? function (str, start, len) { return str.substr(start, len) }
  10890. : function (str, start, len) {
  10891. if (start < 0) start = str.length + start;
  10892. return str.substr(start, len);
  10893. }
  10894. ;
  10895. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 31)))
  10896. /***/ }),
  10897. /***/ 33:
  10898. /*!****************************************!*\
  10899. !*** (webpack)/buildin/amd-options.js ***!
  10900. \****************************************/
  10901. /*! no static exports found */
  10902. /***/ (function(module, exports) {
  10903. /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
  10904. module.exports = __webpack_amd_options__;
  10905. /* WEBPACK VAR INJECTION */}.call(this, {}))
  10906. /***/ }),
  10907. /***/ 34:
  10908. /*!************************************************!*\
  10909. !*** D:/wwwroot/cqcarbonwxapp/utils/filter.js ***!
  10910. \************************************************/
  10911. /*! no static exports found */
  10912. /***/ (function(module, exports, __webpack_require__) {
  10913. "use strict";
  10914. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  10915. var _config = __webpack_require__(/*! @/config/config */ 11);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  10916. //保留两位小数
  10917. _vue.default.filter('keepTwoNum', function (val) {
  10918. var value = Number(val);
  10919. return value.toFixed(2);
  10920. });
  10921. //链接加时间戳
  10922. _vue.default.filter("timestamp", function (link) {
  10923. return link + '?t=' + new Date().getTime();
  10924. });
  10925. //截取第一张照片且判断是否有图片,没有图片按照传递类型随机输出
  10926. _vue.default.filter("firstImg", function (arr, sizeType, imgType) {
  10927. var img;
  10928. //图片类型判断
  10929. if (arr) {
  10930. if (arr instanceof Array) {
  10931. img = arr[0];
  10932. } else {
  10933. img = arr.split(';')[0];
  10934. }
  10935. } else if (!arr) {
  10936. //如果没有图片则随机输出一张
  10937. // if(imgType === 'farmer'){
  10938. // const farmerList = ['carbon2/farmer/1.png','carbon2/farmer/2.png']
  10939. // img = farmerList[Math.floor(Math.random() * farmerList.length)];
  10940. // }
  10941. img = '/static/img/inbuild.png';
  10942. }
  10943. // return config.imgUrl + img;
  10944. return img;
  10945. });
  10946. _vue.default.filter("miniImg", function (img, quality) {
  10947. return img + '?imageMogr2/quality/' + quality;
  10948. });
  10949. // import {formatDate} from '@/utils/date';
  10950. _vue.default.filter("formatDateTime", function (time) {
  10951. if (time == null || time === '') {
  10952. return 'N/A';
  10953. }
  10954. //不足10 补0操作
  10955. var addZero = function addZero(num) {
  10956. return num < 10 ? '0' + num : num;
  10957. };
  10958. var time1 = time.replace(/T/g, ' ');
  10959. time1 = time1.replace(/\-/g, "/");
  10960. console.log(time1.substring(0, 19));
  10961. var time2 = new Date(time1).getTime();
  10962. console.log('a', time2);
  10963. var date = new Date(time2);
  10964. console.log('date', date);
  10965. var Year = date.getFullYear();
  10966. var Month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
  10967. var d = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
  10968. var Hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
  10969. var Minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
  10970. var Seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
  10971. var over_time = Year + "/" + Month + "/" + d + " " + Hours + ":" + Minutes + ":" + Seconds;
  10972. //***至此以上是将时间转为正常时间格式,以下为将时间进行增加8小时解决时区差异的操作***
  10973. var time3 = new Date(Date.parse(over_time));
  10974. // time3.setTime(time3.setHours(time3.getHours()));
  10975. time3.setTime(time3.setHours(time3.getHours() + 8));
  10976. var Y = time3.getFullYear() + '/';
  10977. var M = addZero(time3.getMonth() + 1) + '/';
  10978. var D = addZero(time3.getDate()) + ' ';
  10979. var h = addZero(time3.getHours()) + ':';
  10980. var m = addZero(time3.getMinutes()) + ':';
  10981. var s = addZero(time3.getSeconds());
  10982. return Y + M + D + " " + h + m + s;
  10983. // return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
  10984. });
  10985. /***/ }),
  10986. /***/ 4:
  10987. /*!*******************************************!*\
  10988. !*** D:/wwwroot/cqcarbonwxapp/pages.json ***!
  10989. \*******************************************/
  10990. /*! no static exports found */
  10991. /***/ (function(module, exports) {
  10992. /***/ }),
  10993. /***/ 81:
  10994. /*!**********************************************!*\
  10995. !*** D:/wwwroot/cqcarbonwxapp/utils/util.js ***!
  10996. \**********************************************/
  10997. /*! no static exports found */
  10998. /***/ (function(module, exports, __webpack_require__) {
  10999. "use strict";
  11000. Object.defineProperty(exports, "__esModule", { value: true });exports.debounce = debounce; // 防抖
  11001. function debounce(fn, wait) {
  11002. var delay = wait || 200;
  11003. var timer;
  11004. return function () {
  11005. var th = this;
  11006. var args = arguments;
  11007. if (timer) {
  11008. clearTimeout(timer);
  11009. }
  11010. timer = setTimeout(function () {
  11011. timer = null;
  11012. fn.apply(th, args);
  11013. }, delay);
  11014. };
  11015. }
  11016. /***/ })
  11017. }]);
  11018. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map