vendor.js 589 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],[
  2. /* 0 */,
  3. /* 1 */
  4. /*!*********************************************************!*\
  5. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  6. \*********************************************************/
  7. /*! no static exports found */
  8. /***/ (function(module, exports, __webpack_require__) {
  9. "use strict";
  10. Object.defineProperty(exports, "__esModule", {
  11. value: true
  12. });
  13. exports.default = void 0;
  14. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  15. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  16. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  17. return this;
  18. }();
  19. var key = ['w', 'x'].join('');
  20. var oldWx = target[key];
  21. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  22. function isWxKey(key) {
  23. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  24. return false;
  25. }
  26. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  27. }
  28. function initWx() {
  29. var newWx = {};
  30. for (var _key in oldWx) {
  31. if (isWxKey(_key)) {
  32. // TODO wrapper function
  33. newWx[_key] = oldWx[_key];
  34. }
  35. }
  36. return newWx;
  37. }
  38. target[key] = initWx();
  39. var _default = target[key];
  40. exports.default = _default;
  41. /***/ }),
  42. /* 2 */
  43. /*!************************************************************!*\
  44. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  45. \************************************************************/
  46. /*! no static exports found */
  47. /***/ (function(module, exports, __webpack_require__) {
  48. "use strict";
  49. /* WEBPACK VAR INJECTION */(function(wx, global) {
  50. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  51. Object.defineProperty(exports, "__esModule", {
  52. value: true
  53. });
  54. exports.createApp = createApp;
  55. exports.createComponent = createComponent;
  56. exports.createPage = createPage;
  57. exports.createPlugin = createPlugin;
  58. exports.createSubpackageApp = createSubpackageApp;
  59. exports.default = void 0;
  60. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  61. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  62. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  63. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  64. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  65. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  66. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  67. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  68. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  69. var realAtob;
  70. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  71. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  72. if (typeof atob !== 'function') {
  73. realAtob = function realAtob(str) {
  74. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  75. if (!b64re.test(str)) {
  76. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  77. }
  78. // Adding the padding if missing, for semplicity
  79. str += '=='.slice(2 - (str.length & 3));
  80. var bitmap;
  81. var result = '';
  82. var r1;
  83. var r2;
  84. var i = 0;
  85. for (; i < str.length;) {
  86. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  87. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  88. }
  89. return result;
  90. };
  91. } else {
  92. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  93. realAtob = atob;
  94. }
  95. function b64DecodeUnicode(str) {
  96. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  97. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  98. }).join(''));
  99. }
  100. function getCurrentUserInfo() {
  101. var token = wx.getStorageSync('uni_id_token') || '';
  102. var tokenArr = token.split('.');
  103. if (!token || tokenArr.length !== 3) {
  104. return {
  105. uid: null,
  106. role: [],
  107. permission: [],
  108. tokenExpired: 0
  109. };
  110. }
  111. var userInfo;
  112. try {
  113. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  114. } catch (error) {
  115. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  116. }
  117. userInfo.tokenExpired = userInfo.exp * 1000;
  118. delete userInfo.exp;
  119. delete userInfo.iat;
  120. return userInfo;
  121. }
  122. function uniIdMixin(Vue) {
  123. Vue.prototype.uniIDHasRole = function (roleId) {
  124. var _getCurrentUserInfo = getCurrentUserInfo(),
  125. role = _getCurrentUserInfo.role;
  126. return role.indexOf(roleId) > -1;
  127. };
  128. Vue.prototype.uniIDHasPermission = function (permissionId) {
  129. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  130. permission = _getCurrentUserInfo2.permission;
  131. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  132. };
  133. Vue.prototype.uniIDTokenValid = function () {
  134. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  135. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  136. return tokenExpired > Date.now();
  137. };
  138. }
  139. var _toString = Object.prototype.toString;
  140. var hasOwnProperty = Object.prototype.hasOwnProperty;
  141. function isFn(fn) {
  142. return typeof fn === 'function';
  143. }
  144. function isStr(str) {
  145. return typeof str === 'string';
  146. }
  147. function isObject(obj) {
  148. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  149. }
  150. function isPlainObject(obj) {
  151. return _toString.call(obj) === '[object Object]';
  152. }
  153. function hasOwn(obj, key) {
  154. return hasOwnProperty.call(obj, key);
  155. }
  156. function noop() {}
  157. /**
  158. * Create a cached version of a pure function.
  159. */
  160. function cached(fn) {
  161. var cache = Object.create(null);
  162. return function cachedFn(str) {
  163. var hit = cache[str];
  164. return hit || (cache[str] = fn(str));
  165. };
  166. }
  167. /**
  168. * Camelize a hyphen-delimited string.
  169. */
  170. var camelizeRE = /-(\w)/g;
  171. var camelize = cached(function (str) {
  172. return str.replace(camelizeRE, function (_, c) {
  173. return c ? c.toUpperCase() : '';
  174. });
  175. });
  176. function sortObject(obj) {
  177. var sortObj = {};
  178. if (isPlainObject(obj)) {
  179. Object.keys(obj).sort().forEach(function (key) {
  180. sortObj[key] = obj[key];
  181. });
  182. }
  183. return !Object.keys(sortObj) ? obj : sortObj;
  184. }
  185. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  186. var globalInterceptors = {};
  187. var scopedInterceptors = {};
  188. function mergeHook(parentVal, childVal) {
  189. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  190. return res ? dedupeHooks(res) : res;
  191. }
  192. function dedupeHooks(hooks) {
  193. var res = [];
  194. for (var i = 0; i < hooks.length; i++) {
  195. if (res.indexOf(hooks[i]) === -1) {
  196. res.push(hooks[i]);
  197. }
  198. }
  199. return res;
  200. }
  201. function removeHook(hooks, hook) {
  202. var index = hooks.indexOf(hook);
  203. if (index !== -1) {
  204. hooks.splice(index, 1);
  205. }
  206. }
  207. function mergeInterceptorHook(interceptor, option) {
  208. Object.keys(option).forEach(function (hook) {
  209. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  210. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  211. }
  212. });
  213. }
  214. function removeInterceptorHook(interceptor, option) {
  215. if (!interceptor || !option) {
  216. return;
  217. }
  218. Object.keys(option).forEach(function (hook) {
  219. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  220. removeHook(interceptor[hook], option[hook]);
  221. }
  222. });
  223. }
  224. function addInterceptor(method, option) {
  225. if (typeof method === 'string' && isPlainObject(option)) {
  226. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  227. } else if (isPlainObject(method)) {
  228. mergeInterceptorHook(globalInterceptors, method);
  229. }
  230. }
  231. function removeInterceptor(method, option) {
  232. if (typeof method === 'string') {
  233. if (isPlainObject(option)) {
  234. removeInterceptorHook(scopedInterceptors[method], option);
  235. } else {
  236. delete scopedInterceptors[method];
  237. }
  238. } else if (isPlainObject(method)) {
  239. removeInterceptorHook(globalInterceptors, method);
  240. }
  241. }
  242. function wrapperHook(hook, params) {
  243. return function (data) {
  244. return hook(data, params) || data;
  245. };
  246. }
  247. function isPromise(obj) {
  248. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  249. }
  250. function queue(hooks, data, params) {
  251. var promise = false;
  252. for (var i = 0; i < hooks.length; i++) {
  253. var hook = hooks[i];
  254. if (promise) {
  255. promise = Promise.resolve(wrapperHook(hook, params));
  256. } else {
  257. var res = hook(data, params);
  258. if (isPromise(res)) {
  259. promise = Promise.resolve(res);
  260. }
  261. if (res === false) {
  262. return {
  263. then: function then() {}
  264. };
  265. }
  266. }
  267. }
  268. return promise || {
  269. then: function then(callback) {
  270. return callback(data);
  271. }
  272. };
  273. }
  274. function wrapperOptions(interceptor) {
  275. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  276. ['success', 'fail', 'complete'].forEach(function (name) {
  277. if (Array.isArray(interceptor[name])) {
  278. var oldCallback = options[name];
  279. options[name] = function callbackInterceptor(res) {
  280. queue(interceptor[name], res, options).then(function (res) {
  281. /* eslint-disable no-mixed-operators */
  282. return isFn(oldCallback) && oldCallback(res) || res;
  283. });
  284. };
  285. }
  286. });
  287. return options;
  288. }
  289. function wrapperReturnValue(method, returnValue) {
  290. var returnValueHooks = [];
  291. if (Array.isArray(globalInterceptors.returnValue)) {
  292. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  293. }
  294. var interceptor = scopedInterceptors[method];
  295. if (interceptor && Array.isArray(interceptor.returnValue)) {
  296. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  297. }
  298. returnValueHooks.forEach(function (hook) {
  299. returnValue = hook(returnValue) || returnValue;
  300. });
  301. return returnValue;
  302. }
  303. function getApiInterceptorHooks(method) {
  304. var interceptor = Object.create(null);
  305. Object.keys(globalInterceptors).forEach(function (hook) {
  306. if (hook !== 'returnValue') {
  307. interceptor[hook] = globalInterceptors[hook].slice();
  308. }
  309. });
  310. var scopedInterceptor = scopedInterceptors[method];
  311. if (scopedInterceptor) {
  312. Object.keys(scopedInterceptor).forEach(function (hook) {
  313. if (hook !== 'returnValue') {
  314. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  315. }
  316. });
  317. }
  318. return interceptor;
  319. }
  320. function invokeApi(method, api, options) {
  321. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  322. params[_key - 3] = arguments[_key];
  323. }
  324. var interceptor = getApiInterceptorHooks(method);
  325. if (interceptor && Object.keys(interceptor).length) {
  326. if (Array.isArray(interceptor.invoke)) {
  327. var res = queue(interceptor.invoke, options);
  328. return res.then(function (options) {
  329. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  330. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  331. });
  332. } else {
  333. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  334. }
  335. }
  336. return api.apply(void 0, [options].concat(params));
  337. }
  338. var promiseInterceptor = {
  339. returnValue: function returnValue(res) {
  340. if (!isPromise(res)) {
  341. return res;
  342. }
  343. return new Promise(function (resolve, reject) {
  344. res.then(function (res) {
  345. if (res[0]) {
  346. reject(res[0]);
  347. } else {
  348. resolve(res[1]);
  349. }
  350. });
  351. });
  352. }
  353. };
  354. var SYNC_API_RE = /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo|getSystemSetting|getAppAuthorizeSetting|initUTS|requireUTS|registerUTS/;
  355. var CONTEXT_API_RE = /^create|Manager$/;
  356. // Context例外情况
  357. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  358. // 同步例外情况
  359. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  360. var CALLBACK_API_RE = /^on|^off/;
  361. function isContextApi(name) {
  362. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  363. }
  364. function isSyncApi(name) {
  365. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  366. }
  367. function isCallbackApi(name) {
  368. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  369. }
  370. function handlePromise(promise) {
  371. return promise.then(function (data) {
  372. return [null, data];
  373. }).catch(function (err) {
  374. return [err];
  375. });
  376. }
  377. function shouldPromise(name) {
  378. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  379. return false;
  380. }
  381. return true;
  382. }
  383. /* eslint-disable no-extend-native */
  384. if (!Promise.prototype.finally) {
  385. Promise.prototype.finally = function (callback) {
  386. var promise = this.constructor;
  387. return this.then(function (value) {
  388. return promise.resolve(callback()).then(function () {
  389. return value;
  390. });
  391. }, function (reason) {
  392. return promise.resolve(callback()).then(function () {
  393. throw reason;
  394. });
  395. });
  396. };
  397. }
  398. function promisify(name, api) {
  399. if (!shouldPromise(name) || !isFn(api)) {
  400. return api;
  401. }
  402. return function promiseApi() {
  403. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  404. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  405. params[_key2 - 1] = arguments[_key2];
  406. }
  407. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  408. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  409. }
  410. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  411. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  412. success: resolve,
  413. fail: reject
  414. })].concat(params));
  415. })));
  416. };
  417. }
  418. var EPS = 1e-4;
  419. var BASE_DEVICE_WIDTH = 750;
  420. var isIOS = false;
  421. var deviceWidth = 0;
  422. var deviceDPR = 0;
  423. function checkDeviceWidth() {
  424. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  425. platform = _wx$getSystemInfoSync.platform,
  426. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  427. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  428. deviceWidth = windowWidth;
  429. deviceDPR = pixelRatio;
  430. isIOS = platform === 'ios';
  431. }
  432. function upx2px(number, newDeviceWidth) {
  433. if (deviceWidth === 0) {
  434. checkDeviceWidth();
  435. }
  436. number = Number(number);
  437. if (number === 0) {
  438. return 0;
  439. }
  440. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  441. if (result < 0) {
  442. result = -result;
  443. }
  444. result = Math.floor(result + EPS);
  445. if (result === 0) {
  446. if (deviceDPR === 1 || !isIOS) {
  447. result = 1;
  448. } else {
  449. result = 0.5;
  450. }
  451. }
  452. return number < 0 ? -result : result;
  453. }
  454. var LOCALE_ZH_HANS = 'zh-Hans';
  455. var LOCALE_ZH_HANT = 'zh-Hant';
  456. var LOCALE_EN = 'en';
  457. var LOCALE_FR = 'fr';
  458. var LOCALE_ES = 'es';
  459. var messages = {};
  460. var locale;
  461. {
  462. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  463. }
  464. function initI18nMessages() {
  465. if (!isEnableLocale()) {
  466. return;
  467. }
  468. var localeKeys = Object.keys(__uniConfig.locales);
  469. if (localeKeys.length) {
  470. localeKeys.forEach(function (locale) {
  471. var curMessages = messages[locale];
  472. var userMessages = __uniConfig.locales[locale];
  473. if (curMessages) {
  474. Object.assign(curMessages, userMessages);
  475. } else {
  476. messages[locale] = userMessages;
  477. }
  478. });
  479. }
  480. }
  481. initI18nMessages();
  482. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  483. var t = i18n.t;
  484. var i18nMixin = i18n.mixin = {
  485. beforeCreate: function beforeCreate() {
  486. var _this = this;
  487. var unwatch = i18n.i18n.watchLocale(function () {
  488. _this.$forceUpdate();
  489. });
  490. this.$once('hook:beforeDestroy', function () {
  491. unwatch();
  492. });
  493. },
  494. methods: {
  495. $$t: function $$t(key, values) {
  496. return t(key, values);
  497. }
  498. }
  499. };
  500. var setLocale = i18n.setLocale;
  501. var getLocale = i18n.getLocale;
  502. function initAppLocale(Vue, appVm, locale) {
  503. var state = Vue.observable({
  504. locale: locale || i18n.getLocale()
  505. });
  506. var localeWatchers = [];
  507. appVm.$watchLocale = function (fn) {
  508. localeWatchers.push(fn);
  509. };
  510. Object.defineProperty(appVm, '$locale', {
  511. get: function get() {
  512. return state.locale;
  513. },
  514. set: function set(v) {
  515. state.locale = v;
  516. localeWatchers.forEach(function (watch) {
  517. return watch(v);
  518. });
  519. }
  520. });
  521. }
  522. function isEnableLocale() {
  523. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  524. }
  525. function include(str, parts) {
  526. return !!parts.find(function (part) {
  527. return str.indexOf(part) !== -1;
  528. });
  529. }
  530. function startsWith(str, parts) {
  531. return parts.find(function (part) {
  532. return str.indexOf(part) === 0;
  533. });
  534. }
  535. function normalizeLocale(locale, messages) {
  536. if (!locale) {
  537. return;
  538. }
  539. locale = locale.trim().replace(/_/g, '-');
  540. if (messages && messages[locale]) {
  541. return locale;
  542. }
  543. locale = locale.toLowerCase();
  544. if (locale === 'chinese') {
  545. // 支付宝
  546. return LOCALE_ZH_HANS;
  547. }
  548. if (locale.indexOf('zh') === 0) {
  549. if (locale.indexOf('-hans') > -1) {
  550. return LOCALE_ZH_HANS;
  551. }
  552. if (locale.indexOf('-hant') > -1) {
  553. return LOCALE_ZH_HANT;
  554. }
  555. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  556. return LOCALE_ZH_HANT;
  557. }
  558. return LOCALE_ZH_HANS;
  559. }
  560. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  561. if (lang) {
  562. return lang;
  563. }
  564. }
  565. // export function initI18n() {
  566. // const localeKeys = Object.keys(__uniConfig.locales || {})
  567. // if (localeKeys.length) {
  568. // localeKeys.forEach((locale) =>
  569. // i18n.add(locale, __uniConfig.locales[locale])
  570. // )
  571. // }
  572. // }
  573. function getLocale$1() {
  574. // 优先使用 $locale
  575. if (isFn(getApp)) {
  576. var app = getApp({
  577. allowDefault: true
  578. });
  579. if (app && app.$vm) {
  580. return app.$vm.$locale;
  581. }
  582. }
  583. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  584. }
  585. function setLocale$1(locale) {
  586. var app = isFn(getApp) ? getApp() : false;
  587. if (!app) {
  588. return false;
  589. }
  590. var oldLocale = app.$vm.$locale;
  591. if (oldLocale !== locale) {
  592. app.$vm.$locale = locale;
  593. onLocaleChangeCallbacks.forEach(function (fn) {
  594. return fn({
  595. locale: locale
  596. });
  597. });
  598. return true;
  599. }
  600. return false;
  601. }
  602. var onLocaleChangeCallbacks = [];
  603. function onLocaleChange(fn) {
  604. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  605. onLocaleChangeCallbacks.push(fn);
  606. }
  607. }
  608. if (typeof global !== 'undefined') {
  609. global.getLocale = getLocale$1;
  610. }
  611. var interceptors = {
  612. promiseInterceptor: promiseInterceptor
  613. };
  614. var baseApi = /*#__PURE__*/Object.freeze({
  615. __proto__: null,
  616. upx2px: upx2px,
  617. getLocale: getLocale$1,
  618. setLocale: setLocale$1,
  619. onLocaleChange: onLocaleChange,
  620. addInterceptor: addInterceptor,
  621. removeInterceptor: removeInterceptor,
  622. interceptors: interceptors
  623. });
  624. function findExistsPageIndex(url) {
  625. var pages = getCurrentPages();
  626. var len = pages.length;
  627. while (len--) {
  628. var page = pages[len];
  629. if (page.$page && page.$page.fullPath === url) {
  630. return len;
  631. }
  632. }
  633. return -1;
  634. }
  635. var redirectTo = {
  636. name: function name(fromArgs) {
  637. if (fromArgs.exists === 'back' && fromArgs.delta) {
  638. return 'navigateBack';
  639. }
  640. return 'redirectTo';
  641. },
  642. args: function args(fromArgs) {
  643. if (fromArgs.exists === 'back' && fromArgs.url) {
  644. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  645. if (existsPageIndex !== -1) {
  646. var delta = getCurrentPages().length - 1 - existsPageIndex;
  647. if (delta > 0) {
  648. fromArgs.delta = delta;
  649. }
  650. }
  651. }
  652. }
  653. };
  654. var previewImage = {
  655. args: function args(fromArgs) {
  656. var currentIndex = parseInt(fromArgs.current);
  657. if (isNaN(currentIndex)) {
  658. return;
  659. }
  660. var urls = fromArgs.urls;
  661. if (!Array.isArray(urls)) {
  662. return;
  663. }
  664. var len = urls.length;
  665. if (!len) {
  666. return;
  667. }
  668. if (currentIndex < 0) {
  669. currentIndex = 0;
  670. } else if (currentIndex >= len) {
  671. currentIndex = len - 1;
  672. }
  673. if (currentIndex > 0) {
  674. fromArgs.current = urls[currentIndex];
  675. fromArgs.urls = urls.filter(function (item, index) {
  676. return index < currentIndex ? item !== urls[currentIndex] : true;
  677. });
  678. } else {
  679. fromArgs.current = urls[0];
  680. }
  681. return {
  682. indicator: false,
  683. loop: false
  684. };
  685. }
  686. };
  687. var UUID_KEY = '__DC_STAT_UUID';
  688. var deviceId;
  689. function useDeviceId(result) {
  690. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  691. if (!deviceId) {
  692. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  693. wx.setStorage({
  694. key: UUID_KEY,
  695. data: deviceId
  696. });
  697. }
  698. result.deviceId = deviceId;
  699. }
  700. function addSafeAreaInsets(result) {
  701. if (result.safeArea) {
  702. var safeArea = result.safeArea;
  703. result.safeAreaInsets = {
  704. top: safeArea.top,
  705. left: safeArea.left,
  706. right: result.windowWidth - safeArea.right,
  707. bottom: result.screenHeight - safeArea.bottom
  708. };
  709. }
  710. }
  711. function populateParameters(result) {
  712. var _result$brand = result.brand,
  713. brand = _result$brand === void 0 ? '' : _result$brand,
  714. _result$model = result.model,
  715. model = _result$model === void 0 ? '' : _result$model,
  716. _result$system = result.system,
  717. system = _result$system === void 0 ? '' : _result$system,
  718. _result$language = result.language,
  719. language = _result$language === void 0 ? '' : _result$language,
  720. theme = result.theme,
  721. version = result.version,
  722. platform = result.platform,
  723. fontSizeSetting = result.fontSizeSetting,
  724. SDKVersion = result.SDKVersion,
  725. pixelRatio = result.pixelRatio,
  726. deviceOrientation = result.deviceOrientation;
  727. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  728. var extraParam = {};
  729. // osName osVersion
  730. var osName = '';
  731. var osVersion = '';
  732. {
  733. osName = system.split(' ')[0] || '';
  734. osVersion = system.split(' ')[1] || '';
  735. }
  736. var hostVersion = version;
  737. // deviceType
  738. var deviceType = getGetDeviceType(result, model);
  739. // deviceModel
  740. var deviceBrand = getDeviceBrand(brand);
  741. // hostName
  742. var _hostName = getHostName(result);
  743. // deviceOrientation
  744. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  745. // devicePixelRatio
  746. var _devicePixelRatio = pixelRatio;
  747. // SDKVersion
  748. var _SDKVersion = SDKVersion;
  749. // hostLanguage
  750. var hostLanguage = language.replace(/_/g, '-');
  751. // wx.getAccountInfoSync
  752. var parameters = {
  753. appId: "__UNI__F9027B9",
  754. appName: "yelaixiang-h5",
  755. appVersion: "1.0.0",
  756. appVersionCode: "100",
  757. appLanguage: getAppLanguage(hostLanguage),
  758. uniCompileVersion: "4.15",
  759. uniRuntimeVersion: "4.15",
  760. uniPlatform: undefined || "mp-weixin",
  761. deviceBrand: deviceBrand,
  762. deviceModel: model,
  763. deviceType: deviceType,
  764. devicePixelRatio: _devicePixelRatio,
  765. deviceOrientation: _deviceOrientation,
  766. osName: osName.toLocaleLowerCase(),
  767. osVersion: osVersion,
  768. hostTheme: theme,
  769. hostVersion: hostVersion,
  770. hostLanguage: hostLanguage,
  771. hostName: _hostName,
  772. hostSDKVersion: _SDKVersion,
  773. hostFontSizeSetting: fontSizeSetting,
  774. windowTop: 0,
  775. windowBottom: 0,
  776. // TODO
  777. osLanguage: undefined,
  778. osTheme: undefined,
  779. ua: undefined,
  780. hostPackageName: undefined,
  781. browserName: undefined,
  782. browserVersion: undefined
  783. };
  784. Object.assign(result, parameters, extraParam);
  785. }
  786. function getGetDeviceType(result, model) {
  787. var deviceType = result.deviceType || 'phone';
  788. {
  789. var deviceTypeMaps = {
  790. ipad: 'pad',
  791. windows: 'pc',
  792. mac: 'pc'
  793. };
  794. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  795. var _model = model.toLocaleLowerCase();
  796. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  797. var _m = deviceTypeMapsKeys[index];
  798. if (_model.indexOf(_m) !== -1) {
  799. deviceType = deviceTypeMaps[_m];
  800. break;
  801. }
  802. }
  803. }
  804. return deviceType;
  805. }
  806. function getDeviceBrand(brand) {
  807. var deviceBrand = brand;
  808. if (deviceBrand) {
  809. deviceBrand = brand.toLocaleLowerCase();
  810. }
  811. return deviceBrand;
  812. }
  813. function getAppLanguage(defaultLanguage) {
  814. return getLocale$1 ? getLocale$1() : defaultLanguage;
  815. }
  816. function getHostName(result) {
  817. var _platform = 'WeChat';
  818. var _hostName = result.hostName || _platform; // mp-jd
  819. {
  820. if (result.environment) {
  821. _hostName = result.environment;
  822. } else if (result.host && result.host.env) {
  823. _hostName = result.host.env;
  824. }
  825. }
  826. return _hostName;
  827. }
  828. var getSystemInfo = {
  829. returnValue: function returnValue(result) {
  830. useDeviceId(result);
  831. addSafeAreaInsets(result);
  832. populateParameters(result);
  833. }
  834. };
  835. var showActionSheet = {
  836. args: function args(fromArgs) {
  837. if ((0, _typeof2.default)(fromArgs) === 'object') {
  838. fromArgs.alertText = fromArgs.title;
  839. }
  840. }
  841. };
  842. var getAppBaseInfo = {
  843. returnValue: function returnValue(result) {
  844. var _result = result,
  845. version = _result.version,
  846. language = _result.language,
  847. SDKVersion = _result.SDKVersion,
  848. theme = _result.theme;
  849. var _hostName = getHostName(result);
  850. var hostLanguage = language.replace('_', '-');
  851. result = sortObject(Object.assign(result, {
  852. appId: "__UNI__F9027B9",
  853. appName: "yelaixiang-h5",
  854. appVersion: "1.0.0",
  855. appVersionCode: "100",
  856. appLanguage: getAppLanguage(hostLanguage),
  857. hostVersion: version,
  858. hostLanguage: hostLanguage,
  859. hostName: _hostName,
  860. hostSDKVersion: SDKVersion,
  861. hostTheme: theme
  862. }));
  863. }
  864. };
  865. var getDeviceInfo = {
  866. returnValue: function returnValue(result) {
  867. var _result2 = result,
  868. brand = _result2.brand,
  869. model = _result2.model;
  870. var deviceType = getGetDeviceType(result, model);
  871. var deviceBrand = getDeviceBrand(brand);
  872. useDeviceId(result);
  873. result = sortObject(Object.assign(result, {
  874. deviceType: deviceType,
  875. deviceBrand: deviceBrand,
  876. deviceModel: model
  877. }));
  878. }
  879. };
  880. var getWindowInfo = {
  881. returnValue: function returnValue(result) {
  882. addSafeAreaInsets(result);
  883. result = sortObject(Object.assign(result, {
  884. windowTop: 0,
  885. windowBottom: 0
  886. }));
  887. }
  888. };
  889. var getAppAuthorizeSetting = {
  890. returnValue: function returnValue(result) {
  891. var locationReducedAccuracy = result.locationReducedAccuracy;
  892. result.locationAccuracy = 'unsupported';
  893. if (locationReducedAccuracy === true) {
  894. result.locationAccuracy = 'reduced';
  895. } else if (locationReducedAccuracy === false) {
  896. result.locationAccuracy = 'full';
  897. }
  898. }
  899. };
  900. // import navigateTo from 'uni-helpers/navigate-to'
  901. var compressImage = {
  902. args: function args(fromArgs) {
  903. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  904. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  905. fromArgs.compressHeight = fromArgs.compressedHeight;
  906. }
  907. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  908. fromArgs.compressWidth = fromArgs.compressedWidth;
  909. }
  910. }
  911. };
  912. var protocols = {
  913. redirectTo: redirectTo,
  914. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  915. previewImage: previewImage,
  916. getSystemInfo: getSystemInfo,
  917. getSystemInfoSync: getSystemInfo,
  918. showActionSheet: showActionSheet,
  919. getAppBaseInfo: getAppBaseInfo,
  920. getDeviceInfo: getDeviceInfo,
  921. getWindowInfo: getWindowInfo,
  922. getAppAuthorizeSetting: getAppAuthorizeSetting,
  923. compressImage: compressImage
  924. };
  925. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  926. var canIUses = [];
  927. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  928. function processCallback(methodName, method, returnValue) {
  929. return function (res) {
  930. return method(processReturnValue(methodName, res, returnValue));
  931. };
  932. }
  933. function processArgs(methodName, fromArgs) {
  934. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  935. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  936. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  937. if (isPlainObject(fromArgs)) {
  938. // 一般 api 的参数解析
  939. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  940. if (isFn(argsOption)) {
  941. argsOption = argsOption(fromArgs, toArgs) || {};
  942. }
  943. for (var key in fromArgs) {
  944. if (hasOwn(argsOption, key)) {
  945. var keyOption = argsOption[key];
  946. if (isFn(keyOption)) {
  947. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  948. }
  949. if (!keyOption) {
  950. // 不支持的参数
  951. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  952. } else if (isStr(keyOption)) {
  953. // 重写参数 key
  954. toArgs[keyOption] = fromArgs[key];
  955. } else if (isPlainObject(keyOption)) {
  956. // {name:newName,value:value}可重新指定参数 key:value
  957. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  958. }
  959. } else if (CALLBACKS.indexOf(key) !== -1) {
  960. if (isFn(fromArgs[key])) {
  961. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  962. }
  963. } else {
  964. if (!keepFromArgs) {
  965. toArgs[key] = fromArgs[key];
  966. }
  967. }
  968. }
  969. return toArgs;
  970. } else if (isFn(fromArgs)) {
  971. fromArgs = processCallback(methodName, fromArgs, returnValue);
  972. }
  973. return fromArgs;
  974. }
  975. function processReturnValue(methodName, res, returnValue) {
  976. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  977. if (isFn(protocols.returnValue)) {
  978. // 处理通用 returnValue
  979. res = protocols.returnValue(methodName, res);
  980. }
  981. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  982. }
  983. function wrapper(methodName, method) {
  984. if (hasOwn(protocols, methodName)) {
  985. var protocol = protocols[methodName];
  986. if (!protocol) {
  987. // 暂不支持的 api
  988. return function () {
  989. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  990. };
  991. }
  992. return function (arg1, arg2) {
  993. // 目前 api 最多两个参数
  994. var options = protocol;
  995. if (isFn(protocol)) {
  996. options = protocol(arg1);
  997. }
  998. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  999. var args = [arg1];
  1000. if (typeof arg2 !== 'undefined') {
  1001. args.push(arg2);
  1002. }
  1003. if (isFn(options.name)) {
  1004. methodName = options.name(arg1);
  1005. } else if (isStr(options.name)) {
  1006. methodName = options.name;
  1007. }
  1008. var returnValue = wx[methodName].apply(wx, args);
  1009. if (isSyncApi(methodName)) {
  1010. // 同步 api
  1011. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1012. }
  1013. return returnValue;
  1014. };
  1015. }
  1016. return method;
  1017. }
  1018. var todoApis = Object.create(null);
  1019. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  1020. function createTodoApi(name) {
  1021. return function todoApi(_ref) {
  1022. var fail = _ref.fail,
  1023. complete = _ref.complete;
  1024. var res = {
  1025. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  1026. };
  1027. isFn(fail) && fail(res);
  1028. isFn(complete) && complete(res);
  1029. };
  1030. }
  1031. TODOS.forEach(function (name) {
  1032. todoApis[name] = createTodoApi(name);
  1033. });
  1034. var providers = {
  1035. oauth: ['weixin'],
  1036. share: ['weixin'],
  1037. payment: ['wxpay'],
  1038. push: ['weixin']
  1039. };
  1040. function getProvider(_ref2) {
  1041. var service = _ref2.service,
  1042. success = _ref2.success,
  1043. fail = _ref2.fail,
  1044. complete = _ref2.complete;
  1045. var res = false;
  1046. if (providers[service]) {
  1047. res = {
  1048. errMsg: 'getProvider:ok',
  1049. service: service,
  1050. provider: providers[service]
  1051. };
  1052. isFn(success) && success(res);
  1053. } else {
  1054. res = {
  1055. errMsg: 'getProvider:fail service not found'
  1056. };
  1057. isFn(fail) && fail(res);
  1058. }
  1059. isFn(complete) && complete(res);
  1060. }
  1061. var extraApi = /*#__PURE__*/Object.freeze({
  1062. __proto__: null,
  1063. getProvider: getProvider
  1064. });
  1065. var getEmitter = function () {
  1066. var Emitter;
  1067. return function getUniEmitter() {
  1068. if (!Emitter) {
  1069. Emitter = new _vue.default();
  1070. }
  1071. return Emitter;
  1072. };
  1073. }();
  1074. function apply(ctx, method, args) {
  1075. return ctx[method].apply(ctx, args);
  1076. }
  1077. function $on() {
  1078. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  1079. }
  1080. function $off() {
  1081. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  1082. }
  1083. function $once() {
  1084. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  1085. }
  1086. function $emit() {
  1087. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  1088. }
  1089. var eventApi = /*#__PURE__*/Object.freeze({
  1090. __proto__: null,
  1091. $on: $on,
  1092. $off: $off,
  1093. $once: $once,
  1094. $emit: $emit
  1095. });
  1096. /**
  1097. * 框架内 try-catch
  1098. */
  1099. /**
  1100. * 开发者 try-catch
  1101. */
  1102. function tryCatch(fn) {
  1103. return function () {
  1104. try {
  1105. return fn.apply(fn, arguments);
  1106. } catch (e) {
  1107. // TODO
  1108. console.error(e);
  1109. }
  1110. };
  1111. }
  1112. function getApiCallbacks(params) {
  1113. var apiCallbacks = {};
  1114. for (var name in params) {
  1115. var param = params[name];
  1116. if (isFn(param)) {
  1117. apiCallbacks[name] = tryCatch(param);
  1118. delete params[name];
  1119. }
  1120. }
  1121. return apiCallbacks;
  1122. }
  1123. var cid;
  1124. var cidErrMsg;
  1125. var enabled;
  1126. function normalizePushMessage(message) {
  1127. try {
  1128. return JSON.parse(message);
  1129. } catch (e) {}
  1130. return message;
  1131. }
  1132. function invokePushCallback(args) {
  1133. if (args.type === 'enabled') {
  1134. enabled = true;
  1135. } else if (args.type === 'clientId') {
  1136. cid = args.cid;
  1137. cidErrMsg = args.errMsg;
  1138. invokeGetPushCidCallbacks(cid, args.errMsg);
  1139. } else if (args.type === 'pushMsg') {
  1140. var message = {
  1141. type: 'receive',
  1142. data: normalizePushMessage(args.message)
  1143. };
  1144. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  1145. var callback = onPushMessageCallbacks[i];
  1146. callback(message);
  1147. // 该消息已被阻止
  1148. if (message.stopped) {
  1149. break;
  1150. }
  1151. }
  1152. } else if (args.type === 'click') {
  1153. onPushMessageCallbacks.forEach(function (callback) {
  1154. callback({
  1155. type: 'click',
  1156. data: normalizePushMessage(args.message)
  1157. });
  1158. });
  1159. }
  1160. }
  1161. var getPushCidCallbacks = [];
  1162. function invokeGetPushCidCallbacks(cid, errMsg) {
  1163. getPushCidCallbacks.forEach(function (callback) {
  1164. callback(cid, errMsg);
  1165. });
  1166. getPushCidCallbacks.length = 0;
  1167. }
  1168. function getPushClientId(args) {
  1169. if (!isPlainObject(args)) {
  1170. args = {};
  1171. }
  1172. var _getApiCallbacks = getApiCallbacks(args),
  1173. success = _getApiCallbacks.success,
  1174. fail = _getApiCallbacks.fail,
  1175. complete = _getApiCallbacks.complete;
  1176. var hasSuccess = isFn(success);
  1177. var hasFail = isFn(fail);
  1178. var hasComplete = isFn(complete);
  1179. Promise.resolve().then(function () {
  1180. if (typeof enabled === 'undefined') {
  1181. enabled = false;
  1182. cid = '';
  1183. cidErrMsg = 'uniPush is not enabled';
  1184. }
  1185. getPushCidCallbacks.push(function (cid, errMsg) {
  1186. var res;
  1187. if (cid) {
  1188. res = {
  1189. errMsg: 'getPushClientId:ok',
  1190. cid: cid
  1191. };
  1192. hasSuccess && success(res);
  1193. } else {
  1194. res = {
  1195. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  1196. };
  1197. hasFail && fail(res);
  1198. }
  1199. hasComplete && complete(res);
  1200. });
  1201. if (typeof cid !== 'undefined') {
  1202. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1203. }
  1204. });
  1205. }
  1206. var onPushMessageCallbacks = [];
  1207. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1208. var onPushMessage = function onPushMessage(fn) {
  1209. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1210. onPushMessageCallbacks.push(fn);
  1211. }
  1212. };
  1213. var offPushMessage = function offPushMessage(fn) {
  1214. if (!fn) {
  1215. onPushMessageCallbacks.length = 0;
  1216. } else {
  1217. var index = onPushMessageCallbacks.indexOf(fn);
  1218. if (index > -1) {
  1219. onPushMessageCallbacks.splice(index, 1);
  1220. }
  1221. }
  1222. };
  1223. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  1224. if (!baseInfo) {
  1225. baseInfo = wx.getSystemInfoSync();
  1226. }
  1227. var host = baseInfo ? baseInfo.host : null;
  1228. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  1229. var api = /*#__PURE__*/Object.freeze({
  1230. __proto__: null,
  1231. shareVideoMessage: shareVideoMessage,
  1232. getPushClientId: getPushClientId,
  1233. onPushMessage: onPushMessage,
  1234. offPushMessage: offPushMessage,
  1235. invokePushCallback: invokePushCallback
  1236. });
  1237. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1238. function findVmByVueId(vm, vuePid) {
  1239. var $children = vm.$children;
  1240. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1241. for (var i = $children.length - 1; i >= 0; i--) {
  1242. var childVm = $children[i];
  1243. if (childVm.$scope._$vueId === vuePid) {
  1244. return childVm;
  1245. }
  1246. }
  1247. // 反向递归查找
  1248. var parentVm;
  1249. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1250. parentVm = findVmByVueId($children[_i], vuePid);
  1251. if (parentVm) {
  1252. return parentVm;
  1253. }
  1254. }
  1255. }
  1256. function initBehavior(options) {
  1257. return Behavior(options);
  1258. }
  1259. function isPage() {
  1260. return !!this.route;
  1261. }
  1262. function initRelation(detail) {
  1263. this.triggerEvent('__l', detail);
  1264. }
  1265. function selectAllComponents(mpInstance, selector, $refs) {
  1266. var components = mpInstance.selectAllComponents(selector) || [];
  1267. components.forEach(function (component) {
  1268. var ref = component.dataset.ref;
  1269. $refs[ref] = component.$vm || toSkip(component);
  1270. {
  1271. if (component.dataset.vueGeneric === 'scoped') {
  1272. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1273. selectAllComponents(scopedComponent, selector, $refs);
  1274. });
  1275. }
  1276. }
  1277. });
  1278. }
  1279. function syncRefs(refs, newRefs) {
  1280. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  1281. var newKeys = Object.keys(newRefs);
  1282. newKeys.forEach(function (key) {
  1283. var oldValue = refs[key];
  1284. var newValue = newRefs[key];
  1285. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  1286. return oldValue.includes(value);
  1287. })) {
  1288. return;
  1289. }
  1290. refs[key] = newValue;
  1291. oldKeys.delete(key);
  1292. });
  1293. oldKeys.forEach(function (key) {
  1294. delete refs[key];
  1295. });
  1296. return refs;
  1297. }
  1298. function initRefs(vm) {
  1299. var mpInstance = vm.$scope;
  1300. var refs = {};
  1301. Object.defineProperty(vm, '$refs', {
  1302. get: function get() {
  1303. var $refs = {};
  1304. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1305. // TODO 暂不考虑 for 中的 scoped
  1306. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  1307. forComponents.forEach(function (component) {
  1308. var ref = component.dataset.ref;
  1309. if (!$refs[ref]) {
  1310. $refs[ref] = [];
  1311. }
  1312. $refs[ref].push(component.$vm || toSkip(component));
  1313. });
  1314. return syncRefs(refs, $refs);
  1315. }
  1316. });
  1317. }
  1318. function handleLink(event) {
  1319. var _ref3 = event.detail || event.value,
  1320. vuePid = _ref3.vuePid,
  1321. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  1322. var parentVm;
  1323. if (vuePid) {
  1324. parentVm = findVmByVueId(this.$vm, vuePid);
  1325. }
  1326. if (!parentVm) {
  1327. parentVm = this.$vm;
  1328. }
  1329. vueOptions.parent = parentVm;
  1330. }
  1331. function markMPComponent(component) {
  1332. // 在 Vue 中标记为小程序组件
  1333. var IS_MP = '__v_isMPComponent';
  1334. Object.defineProperty(component, IS_MP, {
  1335. configurable: true,
  1336. enumerable: false,
  1337. value: true
  1338. });
  1339. return component;
  1340. }
  1341. function toSkip(obj) {
  1342. var OB = '__ob__';
  1343. var SKIP = '__v_skip';
  1344. if (isObject(obj) && Object.isExtensible(obj)) {
  1345. // 避免被 @vue/composition-api 观测
  1346. Object.defineProperty(obj, OB, {
  1347. configurable: true,
  1348. enumerable: false,
  1349. value: (0, _defineProperty2.default)({}, SKIP, true)
  1350. });
  1351. }
  1352. return obj;
  1353. }
  1354. var WORKLET_RE = /_(.*)_worklet_factory_/;
  1355. function initWorkletMethods(mpMethods, vueMethods) {
  1356. if (vueMethods) {
  1357. Object.keys(vueMethods).forEach(function (name) {
  1358. var matches = name.match(WORKLET_RE);
  1359. if (matches) {
  1360. var workletName = matches[1];
  1361. mpMethods[name] = vueMethods[name];
  1362. mpMethods[workletName] = vueMethods[workletName];
  1363. }
  1364. });
  1365. }
  1366. }
  1367. var MPPage = Page;
  1368. var MPComponent = Component;
  1369. var customizeRE = /:/g;
  1370. var customize = cached(function (str) {
  1371. return camelize(str.replace(customizeRE, '-'));
  1372. });
  1373. function initTriggerEvent(mpInstance) {
  1374. var oldTriggerEvent = mpInstance.triggerEvent;
  1375. var newTriggerEvent = function newTriggerEvent(event) {
  1376. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  1377. args[_key3 - 1] = arguments[_key3];
  1378. }
  1379. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  1380. if (this.$vm || this.dataset && this.dataset.comType) {
  1381. event = customize(event);
  1382. } else {
  1383. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  1384. var newEvent = customize(event);
  1385. if (newEvent !== event) {
  1386. oldTriggerEvent.apply(this, [newEvent].concat(args));
  1387. }
  1388. }
  1389. return oldTriggerEvent.apply(this, [event].concat(args));
  1390. };
  1391. try {
  1392. // 京东小程序 triggerEvent 为只读
  1393. mpInstance.triggerEvent = newTriggerEvent;
  1394. } catch (error) {
  1395. mpInstance._triggerEvent = newTriggerEvent;
  1396. }
  1397. }
  1398. function initHook(name, options, isComponent) {
  1399. var oldHook = options[name];
  1400. options[name] = function () {
  1401. markMPComponent(this);
  1402. initTriggerEvent(this);
  1403. if (oldHook) {
  1404. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1405. args[_key4] = arguments[_key4];
  1406. }
  1407. return oldHook.apply(this, args);
  1408. }
  1409. };
  1410. }
  1411. if (!MPPage.__$wrappered) {
  1412. MPPage.__$wrappered = true;
  1413. Page = function Page() {
  1414. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1415. initHook('onLoad', options);
  1416. return MPPage(options);
  1417. };
  1418. Page.after = MPPage.after;
  1419. Component = function Component() {
  1420. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1421. initHook('created', options);
  1422. return MPComponent(options);
  1423. };
  1424. }
  1425. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  1426. function initMocks(vm, mocks) {
  1427. var mpInstance = vm.$mp[vm.mpType];
  1428. mocks.forEach(function (mock) {
  1429. if (hasOwn(mpInstance, mock)) {
  1430. vm[mock] = mpInstance[mock];
  1431. }
  1432. });
  1433. }
  1434. function hasHook(hook, vueOptions) {
  1435. if (!vueOptions) {
  1436. return true;
  1437. }
  1438. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1439. return true;
  1440. }
  1441. vueOptions = vueOptions.default || vueOptions;
  1442. if (isFn(vueOptions)) {
  1443. if (isFn(vueOptions.extendOptions[hook])) {
  1444. return true;
  1445. }
  1446. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  1447. return true;
  1448. }
  1449. return false;
  1450. }
  1451. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  1452. return true;
  1453. }
  1454. var mixins = vueOptions.mixins;
  1455. if (Array.isArray(mixins)) {
  1456. return !!mixins.find(function (mixin) {
  1457. return hasHook(hook, mixin);
  1458. });
  1459. }
  1460. }
  1461. function initHooks(mpOptions, hooks, vueOptions) {
  1462. hooks.forEach(function (hook) {
  1463. if (hasHook(hook, vueOptions)) {
  1464. mpOptions[hook] = function (args) {
  1465. return this.$vm && this.$vm.__call_hook(hook, args);
  1466. };
  1467. }
  1468. });
  1469. }
  1470. function initUnknownHooks(mpOptions, vueOptions) {
  1471. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1472. findHooks(vueOptions).forEach(function (hook) {
  1473. return initHook$1(mpOptions, hook, excludes);
  1474. });
  1475. }
  1476. function findHooks(vueOptions) {
  1477. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1478. if (vueOptions) {
  1479. Object.keys(vueOptions).forEach(function (name) {
  1480. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  1481. hooks.push(name);
  1482. }
  1483. });
  1484. }
  1485. return hooks;
  1486. }
  1487. function initHook$1(mpOptions, hook, excludes) {
  1488. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  1489. mpOptions[hook] = function (args) {
  1490. return this.$vm && this.$vm.__call_hook(hook, args);
  1491. };
  1492. }
  1493. }
  1494. function initVueComponent(Vue, vueOptions) {
  1495. vueOptions = vueOptions.default || vueOptions;
  1496. var VueComponent;
  1497. if (isFn(vueOptions)) {
  1498. VueComponent = vueOptions;
  1499. } else {
  1500. VueComponent = Vue.extend(vueOptions);
  1501. }
  1502. vueOptions = VueComponent.options;
  1503. return [VueComponent, vueOptions];
  1504. }
  1505. function initSlots(vm, vueSlots) {
  1506. if (Array.isArray(vueSlots) && vueSlots.length) {
  1507. var $slots = Object.create(null);
  1508. vueSlots.forEach(function (slotName) {
  1509. $slots[slotName] = true;
  1510. });
  1511. vm.$scopedSlots = vm.$slots = $slots;
  1512. }
  1513. }
  1514. function initVueIds(vueIds, mpInstance) {
  1515. vueIds = (vueIds || '').split(',');
  1516. var len = vueIds.length;
  1517. if (len === 1) {
  1518. mpInstance._$vueId = vueIds[0];
  1519. } else if (len === 2) {
  1520. mpInstance._$vueId = vueIds[0];
  1521. mpInstance._$vuePid = vueIds[1];
  1522. }
  1523. }
  1524. function initData(vueOptions, context) {
  1525. var data = vueOptions.data || {};
  1526. var methods = vueOptions.methods || {};
  1527. if (typeof data === 'function') {
  1528. try {
  1529. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1530. } catch (e) {
  1531. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"yelaixiang-h5","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1532. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1533. }
  1534. }
  1535. } else {
  1536. try {
  1537. // 对 data 格式化
  1538. data = JSON.parse(JSON.stringify(data));
  1539. } catch (e) {}
  1540. }
  1541. if (!isPlainObject(data)) {
  1542. data = {};
  1543. }
  1544. Object.keys(methods).forEach(function (methodName) {
  1545. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1546. data[methodName] = methods[methodName];
  1547. }
  1548. });
  1549. return data;
  1550. }
  1551. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1552. function createObserver(name) {
  1553. return function observer(newVal, oldVal) {
  1554. if (this.$vm) {
  1555. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1556. }
  1557. };
  1558. }
  1559. function initBehaviors(vueOptions, initBehavior) {
  1560. var vueBehaviors = vueOptions.behaviors;
  1561. var vueExtends = vueOptions.extends;
  1562. var vueMixins = vueOptions.mixins;
  1563. var vueProps = vueOptions.props;
  1564. if (!vueProps) {
  1565. vueOptions.props = vueProps = [];
  1566. }
  1567. var behaviors = [];
  1568. if (Array.isArray(vueBehaviors)) {
  1569. vueBehaviors.forEach(function (behavior) {
  1570. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  1571. if (behavior === 'uni://form-field') {
  1572. if (Array.isArray(vueProps)) {
  1573. vueProps.push('name');
  1574. vueProps.push('value');
  1575. } else {
  1576. vueProps.name = {
  1577. type: String,
  1578. default: ''
  1579. };
  1580. vueProps.value = {
  1581. type: [String, Number, Boolean, Array, Object, Date],
  1582. default: ''
  1583. };
  1584. }
  1585. }
  1586. });
  1587. }
  1588. if (isPlainObject(vueExtends) && vueExtends.props) {
  1589. behaviors.push(initBehavior({
  1590. properties: initProperties(vueExtends.props, true)
  1591. }));
  1592. }
  1593. if (Array.isArray(vueMixins)) {
  1594. vueMixins.forEach(function (vueMixin) {
  1595. if (isPlainObject(vueMixin) && vueMixin.props) {
  1596. behaviors.push(initBehavior({
  1597. properties: initProperties(vueMixin.props, true)
  1598. }));
  1599. }
  1600. });
  1601. }
  1602. return behaviors;
  1603. }
  1604. function parsePropType(key, type, defaultValue, file) {
  1605. // [String]=>String
  1606. if (Array.isArray(type) && type.length === 1) {
  1607. return type[0];
  1608. }
  1609. return type;
  1610. }
  1611. function initProperties(props) {
  1612. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1613. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  1614. var options = arguments.length > 3 ? arguments[3] : undefined;
  1615. var properties = {};
  1616. if (!isBehavior) {
  1617. properties.vueId = {
  1618. type: String,
  1619. value: ''
  1620. };
  1621. {
  1622. if (options.virtualHost) {
  1623. properties.virtualHostStyle = {
  1624. type: null,
  1625. value: ''
  1626. };
  1627. properties.virtualHostClass = {
  1628. type: null,
  1629. value: ''
  1630. };
  1631. }
  1632. }
  1633. // scopedSlotsCompiler auto
  1634. properties.scopedSlotsCompiler = {
  1635. type: String,
  1636. value: ''
  1637. };
  1638. properties.vueSlots = {
  1639. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1640. type: null,
  1641. value: [],
  1642. observer: function observer(newVal, oldVal) {
  1643. var $slots = Object.create(null);
  1644. newVal.forEach(function (slotName) {
  1645. $slots[slotName] = true;
  1646. });
  1647. this.setData({
  1648. $slots: $slots
  1649. });
  1650. }
  1651. };
  1652. }
  1653. if (Array.isArray(props)) {
  1654. // ['title']
  1655. props.forEach(function (key) {
  1656. properties[key] = {
  1657. type: null,
  1658. observer: createObserver(key)
  1659. };
  1660. });
  1661. } else if (isPlainObject(props)) {
  1662. // {title:{type:String,default:''},content:String}
  1663. Object.keys(props).forEach(function (key) {
  1664. var opts = props[key];
  1665. if (isPlainObject(opts)) {
  1666. // title:{type:String,default:''}
  1667. var value = opts.default;
  1668. if (isFn(value)) {
  1669. value = value();
  1670. }
  1671. opts.type = parsePropType(key, opts.type);
  1672. properties[key] = {
  1673. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1674. value: value,
  1675. observer: createObserver(key)
  1676. };
  1677. } else {
  1678. // content:String
  1679. var type = parsePropType(key, opts);
  1680. properties[key] = {
  1681. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1682. observer: createObserver(key)
  1683. };
  1684. }
  1685. });
  1686. }
  1687. return properties;
  1688. }
  1689. function wrapper$1(event) {
  1690. // TODO 又得兼容 mpvue 的 mp 对象
  1691. try {
  1692. event.mp = JSON.parse(JSON.stringify(event));
  1693. } catch (e) {}
  1694. event.stopPropagation = noop;
  1695. event.preventDefault = noop;
  1696. event.target = event.target || {};
  1697. if (!hasOwn(event, 'detail')) {
  1698. event.detail = {};
  1699. }
  1700. if (hasOwn(event, 'markerId')) {
  1701. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  1702. event.detail.markerId = event.markerId;
  1703. }
  1704. if (isPlainObject(event.detail)) {
  1705. event.target = Object.assign({}, event.target, event.detail);
  1706. }
  1707. return event;
  1708. }
  1709. function getExtraValue(vm, dataPathsArray) {
  1710. var context = vm;
  1711. dataPathsArray.forEach(function (dataPathArray) {
  1712. var dataPath = dataPathArray[0];
  1713. var value = dataPathArray[2];
  1714. if (dataPath || typeof value !== 'undefined') {
  1715. // ['','',index,'disable']
  1716. var propPath = dataPathArray[1];
  1717. var valuePath = dataPathArray[3];
  1718. var vFor;
  1719. if (Number.isInteger(dataPath)) {
  1720. vFor = dataPath;
  1721. } else if (!dataPath) {
  1722. vFor = context;
  1723. } else if (typeof dataPath === 'string' && dataPath) {
  1724. if (dataPath.indexOf('#s#') === 0) {
  1725. vFor = dataPath.substr(3);
  1726. } else {
  1727. vFor = vm.__get_value(dataPath, context);
  1728. }
  1729. }
  1730. if (Number.isInteger(vFor)) {
  1731. context = value;
  1732. } else if (!propPath) {
  1733. context = vFor[value];
  1734. } else {
  1735. if (Array.isArray(vFor)) {
  1736. context = vFor.find(function (vForItem) {
  1737. return vm.__get_value(propPath, vForItem) === value;
  1738. });
  1739. } else if (isPlainObject(vFor)) {
  1740. context = Object.keys(vFor).find(function (vForKey) {
  1741. return vm.__get_value(propPath, vFor[vForKey]) === value;
  1742. });
  1743. } else {
  1744. console.error('v-for 暂不支持循环数据:', vFor);
  1745. }
  1746. }
  1747. if (valuePath) {
  1748. context = vm.__get_value(valuePath, context);
  1749. }
  1750. }
  1751. });
  1752. return context;
  1753. }
  1754. function processEventExtra(vm, extra, event, __args__) {
  1755. var extraObj = {};
  1756. if (Array.isArray(extra) && extra.length) {
  1757. /**
  1758. *[
  1759. * ['data.items', 'data.id', item.data.id],
  1760. * ['metas', 'id', meta.id]
  1761. *],
  1762. *[
  1763. * ['data.items', 'data.id', item.data.id],
  1764. * ['metas', 'id', meta.id]
  1765. *],
  1766. *'test'
  1767. */
  1768. extra.forEach(function (dataPath, index) {
  1769. if (typeof dataPath === 'string') {
  1770. if (!dataPath) {
  1771. // model,prop.sync
  1772. extraObj['$' + index] = vm;
  1773. } else {
  1774. if (dataPath === '$event') {
  1775. // $event
  1776. extraObj['$' + index] = event;
  1777. } else if (dataPath === 'arguments') {
  1778. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  1779. } else if (dataPath.indexOf('$event.') === 0) {
  1780. // $event.target.value
  1781. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1782. } else {
  1783. extraObj['$' + index] = vm.__get_value(dataPath);
  1784. }
  1785. }
  1786. } else {
  1787. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1788. }
  1789. });
  1790. }
  1791. return extraObj;
  1792. }
  1793. function getObjByArray(arr) {
  1794. var obj = {};
  1795. for (var i = 1; i < arr.length; i++) {
  1796. var element = arr[i];
  1797. obj[element[0]] = element[1];
  1798. }
  1799. return obj;
  1800. }
  1801. function processEventArgs(vm, event) {
  1802. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1803. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  1804. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  1805. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1806. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1807. // fixed 用户直接触发 mpInstance.triggerEvent
  1808. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  1809. if (isCustom) {
  1810. // 自定义事件
  1811. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  1812. if (!args.length) {
  1813. // 无参数,直接传入 event 或 detail 数组
  1814. if (isCustomMPEvent) {
  1815. return [event];
  1816. }
  1817. return __args__;
  1818. }
  1819. }
  1820. var extraObj = processEventExtra(vm, extra, event, __args__);
  1821. var ret = [];
  1822. args.forEach(function (arg) {
  1823. if (arg === '$event') {
  1824. if (methodName === '__set_model' && !isCustom) {
  1825. // input v-model value
  1826. ret.push(event.target.value);
  1827. } else {
  1828. if (isCustom && !isCustomMPEvent) {
  1829. ret.push(__args__[0]);
  1830. } else {
  1831. // wxcomponent 组件或内置组件
  1832. ret.push(event);
  1833. }
  1834. }
  1835. } else {
  1836. if (Array.isArray(arg) && arg[0] === 'o') {
  1837. ret.push(getObjByArray(arg));
  1838. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1839. ret.push(extraObj[arg]);
  1840. } else {
  1841. ret.push(arg);
  1842. }
  1843. }
  1844. });
  1845. return ret;
  1846. }
  1847. var ONCE = '~';
  1848. var CUSTOM = '^';
  1849. function isMatchEventType(eventType, optType) {
  1850. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  1851. }
  1852. function getContextVm(vm) {
  1853. var $parent = vm.$parent;
  1854. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1855. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1856. $parent = $parent.$parent;
  1857. }
  1858. return $parent && $parent.$parent;
  1859. }
  1860. function handleEvent(event) {
  1861. var _this2 = this;
  1862. event = wrapper$1(event);
  1863. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1864. var dataset = (event.currentTarget || event.target).dataset;
  1865. if (!dataset) {
  1866. return console.warn('事件信息不存在');
  1867. }
  1868. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1869. if (!eventOpts) {
  1870. return console.warn('事件信息不存在');
  1871. }
  1872. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1873. var eventType = event.type;
  1874. var ret = [];
  1875. eventOpts.forEach(function (eventOpt) {
  1876. var type = eventOpt[0];
  1877. var eventsArray = eventOpt[1];
  1878. var isCustom = type.charAt(0) === CUSTOM;
  1879. type = isCustom ? type.slice(1) : type;
  1880. var isOnce = type.charAt(0) === ONCE;
  1881. type = isOnce ? type.slice(1) : type;
  1882. if (eventsArray && isMatchEventType(eventType, type)) {
  1883. eventsArray.forEach(function (eventArray) {
  1884. var methodName = eventArray[0];
  1885. if (methodName) {
  1886. var handlerCtx = _this2.$vm;
  1887. if (handlerCtx.$options.generic) {
  1888. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1889. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1890. }
  1891. if (methodName === '$emit') {
  1892. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  1893. return;
  1894. }
  1895. var handler = handlerCtx[methodName];
  1896. if (!isFn(handler)) {
  1897. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  1898. var path = _this2.route || _this2.is;
  1899. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  1900. }
  1901. if (isOnce) {
  1902. if (handler.once) {
  1903. return;
  1904. }
  1905. handler.once = true;
  1906. }
  1907. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  1908. params = Array.isArray(params) ? params : [];
  1909. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1910. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  1911. // eslint-disable-next-line no-sparse-arrays
  1912. params = params.concat([,,,,,,,,,, event]);
  1913. }
  1914. ret.push(handler.apply(handlerCtx, params));
  1915. }
  1916. });
  1917. }
  1918. });
  1919. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  1920. return ret[0];
  1921. }
  1922. }
  1923. var eventChannels = {};
  1924. function getEventChannel(id) {
  1925. var eventChannel = eventChannels[id];
  1926. delete eventChannels[id];
  1927. return eventChannel;
  1928. }
  1929. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  1930. function initEventChannel() {
  1931. _vue.default.prototype.getOpenerEventChannel = function () {
  1932. // 微信小程序使用自身getOpenerEventChannel
  1933. {
  1934. return this.$scope.getOpenerEventChannel();
  1935. }
  1936. };
  1937. var callHook = _vue.default.prototype.__call_hook;
  1938. _vue.default.prototype.__call_hook = function (hook, args) {
  1939. if (hook === 'onLoad' && args && args.__id__) {
  1940. this.__eventChannel__ = getEventChannel(args.__id__);
  1941. delete args.__id__;
  1942. }
  1943. return callHook.call(this, hook, args);
  1944. };
  1945. }
  1946. function initScopedSlotsParams() {
  1947. var center = {};
  1948. var parents = {};
  1949. function currentId(fn) {
  1950. var vueIds = this.$options.propsData.vueId;
  1951. if (vueIds) {
  1952. var vueId = vueIds.split(',')[0];
  1953. fn(vueId);
  1954. }
  1955. }
  1956. _vue.default.prototype.$hasSSP = function (vueId) {
  1957. var slot = center[vueId];
  1958. if (!slot) {
  1959. parents[vueId] = this;
  1960. this.$on('hook:destroyed', function () {
  1961. delete parents[vueId];
  1962. });
  1963. }
  1964. return slot;
  1965. };
  1966. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  1967. var slot = center[vueId];
  1968. if (slot) {
  1969. var params = slot[name] || [];
  1970. if (needAll) {
  1971. return params;
  1972. }
  1973. return params[0];
  1974. }
  1975. };
  1976. _vue.default.prototype.$setSSP = function (name, value) {
  1977. var index = 0;
  1978. currentId.call(this, function (vueId) {
  1979. var slot = center[vueId];
  1980. var params = slot[name] = slot[name] || [];
  1981. params.push(value);
  1982. index = params.length - 1;
  1983. });
  1984. return index;
  1985. };
  1986. _vue.default.prototype.$initSSP = function () {
  1987. currentId.call(this, function (vueId) {
  1988. center[vueId] = {};
  1989. });
  1990. };
  1991. _vue.default.prototype.$callSSP = function () {
  1992. currentId.call(this, function (vueId) {
  1993. if (parents[vueId]) {
  1994. parents[vueId].$forceUpdate();
  1995. }
  1996. });
  1997. };
  1998. _vue.default.mixin({
  1999. destroyed: function destroyed() {
  2000. var propsData = this.$options.propsData;
  2001. var vueId = propsData && propsData.vueId;
  2002. if (vueId) {
  2003. delete center[vueId];
  2004. delete parents[vueId];
  2005. }
  2006. }
  2007. });
  2008. }
  2009. function parseBaseApp(vm, _ref4) {
  2010. var mocks = _ref4.mocks,
  2011. initRefs = _ref4.initRefs;
  2012. initEventChannel();
  2013. {
  2014. initScopedSlotsParams();
  2015. }
  2016. if (vm.$options.store) {
  2017. _vue.default.prototype.$store = vm.$options.store;
  2018. }
  2019. uniIdMixin(_vue.default);
  2020. _vue.default.prototype.mpHost = "mp-weixin";
  2021. _vue.default.mixin({
  2022. beforeCreate: function beforeCreate() {
  2023. if (!this.$options.mpType) {
  2024. return;
  2025. }
  2026. this.mpType = this.$options.mpType;
  2027. this.$mp = (0, _defineProperty2.default)({
  2028. data: {}
  2029. }, this.mpType, this.$options.mpInstance);
  2030. this.$scope = this.$options.mpInstance;
  2031. delete this.$options.mpType;
  2032. delete this.$options.mpInstance;
  2033. if (this.mpType === 'page' && typeof getApp === 'function') {
  2034. // hack vue-i18n
  2035. var app = getApp();
  2036. if (app.$vm && app.$vm.$i18n) {
  2037. this._i18n = app.$vm.$i18n;
  2038. }
  2039. }
  2040. if (this.mpType !== 'app') {
  2041. initRefs(this);
  2042. initMocks(this, mocks);
  2043. }
  2044. }
  2045. });
  2046. var appOptions = {
  2047. onLaunch: function onLaunch(args) {
  2048. if (this.$vm) {
  2049. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  2050. return;
  2051. }
  2052. {
  2053. if (wx.canIUse && !wx.canIUse('nextTick')) {
  2054. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  2055. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  2056. }
  2057. }
  2058. this.$vm = vm;
  2059. this.$vm.$mp = {
  2060. app: this
  2061. };
  2062. this.$vm.$scope = this;
  2063. // vm 上也挂载 globalData
  2064. this.$vm.globalData = this.globalData;
  2065. this.$vm._isMounted = true;
  2066. this.$vm.__call_hook('mounted', args);
  2067. this.$vm.__call_hook('onLaunch', args);
  2068. }
  2069. };
  2070. // 兼容旧版本 globalData
  2071. appOptions.globalData = vm.$options.globalData || {};
  2072. // 将 methods 中的方法挂在 getApp() 中
  2073. var methods = vm.$options.methods;
  2074. if (methods) {
  2075. Object.keys(methods).forEach(function (name) {
  2076. appOptions[name] = methods[name];
  2077. });
  2078. }
  2079. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  2080. initHooks(appOptions, hooks);
  2081. initUnknownHooks(appOptions, vm.$options);
  2082. return appOptions;
  2083. }
  2084. function parseApp(vm) {
  2085. return parseBaseApp(vm, {
  2086. mocks: mocks,
  2087. initRefs: initRefs
  2088. });
  2089. }
  2090. function createApp(vm) {
  2091. App(parseApp(vm));
  2092. return vm;
  2093. }
  2094. var encodeReserveRE = /[!'()*]/g;
  2095. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  2096. return '%' + c.charCodeAt(0).toString(16);
  2097. };
  2098. var commaRE = /%2C/g;
  2099. // fixed encodeURIComponent which is more conformant to RFC3986:
  2100. // - escapes [!'()*]
  2101. // - preserve commas
  2102. var encode = function encode(str) {
  2103. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  2104. };
  2105. function stringifyQuery(obj) {
  2106. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  2107. var res = obj ? Object.keys(obj).map(function (key) {
  2108. var val = obj[key];
  2109. if (val === undefined) {
  2110. return '';
  2111. }
  2112. if (val === null) {
  2113. return encodeStr(key);
  2114. }
  2115. if (Array.isArray(val)) {
  2116. var result = [];
  2117. val.forEach(function (val2) {
  2118. if (val2 === undefined) {
  2119. return;
  2120. }
  2121. if (val2 === null) {
  2122. result.push(encodeStr(key));
  2123. } else {
  2124. result.push(encodeStr(key) + '=' + encodeStr(val2));
  2125. }
  2126. });
  2127. return result.join('&');
  2128. }
  2129. return encodeStr(key) + '=' + encodeStr(val);
  2130. }).filter(function (x) {
  2131. return x.length > 0;
  2132. }).join('&') : null;
  2133. return res ? "?".concat(res) : '';
  2134. }
  2135. function parseBaseComponent(vueComponentOptions) {
  2136. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  2137. isPage = _ref5.isPage,
  2138. initRelation = _ref5.initRelation;
  2139. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  2140. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  2141. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  2142. VueComponent = _initVueComponent2[0],
  2143. vueOptions = _initVueComponent2[1];
  2144. var options = _objectSpread({
  2145. multipleSlots: true,
  2146. // styleIsolation: 'apply-shared',
  2147. addGlobalClass: true
  2148. }, vueOptions.options || {});
  2149. {
  2150. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  2151. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  2152. Object.assign(options, vueOptions['mp-weixin'].options);
  2153. }
  2154. }
  2155. var componentOptions = {
  2156. options: options,
  2157. data: initData(vueOptions, _vue.default.prototype),
  2158. behaviors: initBehaviors(vueOptions, initBehavior),
  2159. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  2160. lifetimes: {
  2161. attached: function attached() {
  2162. var properties = this.properties;
  2163. var options = {
  2164. mpType: isPage.call(this) ? 'page' : 'component',
  2165. mpInstance: this,
  2166. propsData: properties
  2167. };
  2168. initVueIds(properties.vueId, this);
  2169. // 处理父子关系
  2170. initRelation.call(this, {
  2171. vuePid: this._$vuePid,
  2172. vueOptions: options
  2173. });
  2174. // 初始化 vue 实例
  2175. this.$vm = new VueComponent(options);
  2176. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  2177. initSlots(this.$vm, properties.vueSlots);
  2178. // 触发首次 setData
  2179. this.$vm.$mount();
  2180. },
  2181. ready: function ready() {
  2182. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  2183. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  2184. if (this.$vm) {
  2185. this.$vm._isMounted = true;
  2186. this.$vm.__call_hook('mounted');
  2187. this.$vm.__call_hook('onReady');
  2188. }
  2189. },
  2190. detached: function detached() {
  2191. this.$vm && this.$vm.$destroy();
  2192. }
  2193. },
  2194. pageLifetimes: {
  2195. show: function show(args) {
  2196. this.$vm && this.$vm.__call_hook('onPageShow', args);
  2197. },
  2198. hide: function hide() {
  2199. this.$vm && this.$vm.__call_hook('onPageHide');
  2200. },
  2201. resize: function resize(size) {
  2202. this.$vm && this.$vm.__call_hook('onPageResize', size);
  2203. }
  2204. },
  2205. methods: {
  2206. __l: handleLink,
  2207. __e: handleEvent
  2208. }
  2209. };
  2210. // externalClasses
  2211. if (vueOptions.externalClasses) {
  2212. componentOptions.externalClasses = vueOptions.externalClasses;
  2213. }
  2214. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2215. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2216. componentOptions.methods[callMethod] = function (args) {
  2217. return this.$vm[callMethod](args);
  2218. };
  2219. });
  2220. }
  2221. if (needVueOptions) {
  2222. return [componentOptions, vueOptions, VueComponent];
  2223. }
  2224. if (isPage) {
  2225. return componentOptions;
  2226. }
  2227. return [componentOptions, VueComponent];
  2228. }
  2229. function parseComponent(vueComponentOptions, needVueOptions) {
  2230. return parseBaseComponent(vueComponentOptions, {
  2231. isPage: isPage,
  2232. initRelation: initRelation
  2233. }, needVueOptions);
  2234. }
  2235. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  2236. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  2237. function parseBasePage(vuePageOptions) {
  2238. var _parseComponent = parseComponent(vuePageOptions, true),
  2239. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  2240. pageOptions = _parseComponent2[0],
  2241. vueOptions = _parseComponent2[1];
  2242. initHooks(pageOptions.methods, hooks$1, vueOptions);
  2243. pageOptions.methods.onLoad = function (query) {
  2244. this.options = query;
  2245. var copyQuery = Object.assign({}, query);
  2246. delete copyQuery.__id__;
  2247. this.$page = {
  2248. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  2249. };
  2250. this.$vm.$mp.query = query; // 兼容 mpvue
  2251. this.$vm.__call_hook('onLoad', query);
  2252. };
  2253. {
  2254. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  2255. }
  2256. {
  2257. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  2258. }
  2259. return pageOptions;
  2260. }
  2261. function parsePage(vuePageOptions) {
  2262. return parseBasePage(vuePageOptions);
  2263. }
  2264. function createPage(vuePageOptions) {
  2265. {
  2266. return Component(parsePage(vuePageOptions));
  2267. }
  2268. }
  2269. function createComponent(vueOptions) {
  2270. {
  2271. return Component(parseComponent(vueOptions));
  2272. }
  2273. }
  2274. function createSubpackageApp(vm) {
  2275. var appOptions = parseApp(vm);
  2276. var app = getApp({
  2277. allowDefault: true
  2278. });
  2279. vm.$scope = app;
  2280. var globalData = app.globalData;
  2281. if (globalData) {
  2282. Object.keys(appOptions.globalData).forEach(function (name) {
  2283. if (!hasOwn(globalData, name)) {
  2284. globalData[name] = appOptions.globalData[name];
  2285. }
  2286. });
  2287. }
  2288. Object.keys(appOptions).forEach(function (name) {
  2289. if (!hasOwn(app, name)) {
  2290. app[name] = appOptions[name];
  2291. }
  2292. });
  2293. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2294. wx.onAppShow(function () {
  2295. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2296. args[_key5] = arguments[_key5];
  2297. }
  2298. vm.__call_hook('onShow', args);
  2299. });
  2300. }
  2301. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2302. wx.onAppHide(function () {
  2303. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2304. args[_key6] = arguments[_key6];
  2305. }
  2306. vm.__call_hook('onHide', args);
  2307. });
  2308. }
  2309. if (isFn(appOptions.onLaunch)) {
  2310. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2311. vm.__call_hook('onLaunch', args);
  2312. }
  2313. return vm;
  2314. }
  2315. function createPlugin(vm) {
  2316. var appOptions = parseApp(vm);
  2317. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2318. wx.onAppShow(function () {
  2319. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2320. args[_key7] = arguments[_key7];
  2321. }
  2322. vm.__call_hook('onShow', args);
  2323. });
  2324. }
  2325. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2326. wx.onAppHide(function () {
  2327. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2328. args[_key8] = arguments[_key8];
  2329. }
  2330. vm.__call_hook('onHide', args);
  2331. });
  2332. }
  2333. if (isFn(appOptions.onLaunch)) {
  2334. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2335. vm.__call_hook('onLaunch', args);
  2336. }
  2337. return vm;
  2338. }
  2339. todos.forEach(function (todoApi) {
  2340. protocols[todoApi] = false;
  2341. });
  2342. canIUses.forEach(function (canIUseApi) {
  2343. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  2344. if (!wx.canIUse(apiName)) {
  2345. protocols[canIUseApi] = false;
  2346. }
  2347. });
  2348. var uni = {};
  2349. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2350. uni = new Proxy({}, {
  2351. get: function get(target, name) {
  2352. if (hasOwn(target, name)) {
  2353. return target[name];
  2354. }
  2355. if (baseApi[name]) {
  2356. return baseApi[name];
  2357. }
  2358. if (api[name]) {
  2359. return promisify(name, api[name]);
  2360. }
  2361. {
  2362. if (extraApi[name]) {
  2363. return promisify(name, extraApi[name]);
  2364. }
  2365. if (todoApis[name]) {
  2366. return promisify(name, todoApis[name]);
  2367. }
  2368. }
  2369. if (eventApi[name]) {
  2370. return eventApi[name];
  2371. }
  2372. return promisify(name, wrapper(name, wx[name]));
  2373. },
  2374. set: function set(target, name, value) {
  2375. target[name] = value;
  2376. return true;
  2377. }
  2378. });
  2379. } else {
  2380. Object.keys(baseApi).forEach(function (name) {
  2381. uni[name] = baseApi[name];
  2382. });
  2383. {
  2384. Object.keys(todoApis).forEach(function (name) {
  2385. uni[name] = promisify(name, todoApis[name]);
  2386. });
  2387. Object.keys(extraApi).forEach(function (name) {
  2388. uni[name] = promisify(name, extraApi[name]);
  2389. });
  2390. }
  2391. Object.keys(eventApi).forEach(function (name) {
  2392. uni[name] = eventApi[name];
  2393. });
  2394. Object.keys(api).forEach(function (name) {
  2395. uni[name] = promisify(name, api[name]);
  2396. });
  2397. Object.keys(wx).forEach(function (name) {
  2398. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2399. uni[name] = promisify(name, wrapper(name, wx[name]));
  2400. }
  2401. });
  2402. }
  2403. wx.createApp = createApp;
  2404. wx.createPage = createPage;
  2405. wx.createComponent = createComponent;
  2406. wx.createSubpackageApp = createSubpackageApp;
  2407. wx.createPlugin = createPlugin;
  2408. var uni$1 = uni;
  2409. var _default = uni$1;
  2410. exports.default = _default;
  2411. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  2412. /***/ }),
  2413. /* 3 */
  2414. /*!***********************************!*\
  2415. !*** (webpack)/buildin/global.js ***!
  2416. \***********************************/
  2417. /*! no static exports found */
  2418. /***/ (function(module, exports) {
  2419. var g;
  2420. // This works in non-strict mode
  2421. g = (function() {
  2422. return this;
  2423. })();
  2424. try {
  2425. // This works if eval is allowed (see CSP)
  2426. g = g || new Function("return this")();
  2427. } catch (e) {
  2428. // This works if the window reference is available
  2429. if (typeof window === "object") g = window;
  2430. }
  2431. // g can still be undefined, but nothing to do about it...
  2432. // We return undefined, instead of nothing here, so it's
  2433. // easier to handle this case. if(!global) { ...}
  2434. module.exports = g;
  2435. /***/ }),
  2436. /* 4 */
  2437. /*!**********************************************************************!*\
  2438. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  2439. \**********************************************************************/
  2440. /*! no static exports found */
  2441. /***/ (function(module, exports) {
  2442. function _interopRequireDefault(obj) {
  2443. return obj && obj.__esModule ? obj : {
  2444. "default": obj
  2445. };
  2446. }
  2447. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2448. /***/ }),
  2449. /* 5 */
  2450. /*!**************************************************************!*\
  2451. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  2452. \**************************************************************/
  2453. /*! no static exports found */
  2454. /***/ (function(module, exports, __webpack_require__) {
  2455. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  2456. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  2457. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  2458. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  2459. function _slicedToArray(arr, i) {
  2460. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  2461. }
  2462. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2463. /***/ }),
  2464. /* 6 */
  2465. /*!***************************************************************!*\
  2466. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  2467. \***************************************************************/
  2468. /*! no static exports found */
  2469. /***/ (function(module, exports) {
  2470. function _arrayWithHoles(arr) {
  2471. if (Array.isArray(arr)) return arr;
  2472. }
  2473. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2474. /***/ }),
  2475. /* 7 */
  2476. /*!*********************************************************************!*\
  2477. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  2478. \*********************************************************************/
  2479. /*! no static exports found */
  2480. /***/ (function(module, exports) {
  2481. function _iterableToArrayLimit(r, l) {
  2482. var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  2483. if (null != t) {
  2484. var e,
  2485. n,
  2486. i,
  2487. u,
  2488. a = [],
  2489. f = !0,
  2490. o = !1;
  2491. try {
  2492. if (i = (t = t.call(r)).next, 0 === l) {
  2493. if (Object(t) !== t) return;
  2494. f = !1;
  2495. } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) {
  2496. ;
  2497. }
  2498. } catch (r) {
  2499. o = !0, n = r;
  2500. } finally {
  2501. try {
  2502. if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
  2503. } finally {
  2504. if (o) throw n;
  2505. }
  2506. }
  2507. return a;
  2508. }
  2509. }
  2510. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2511. /***/ }),
  2512. /* 8 */
  2513. /*!***************************************************************************!*\
  2514. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  2515. \***************************************************************************/
  2516. /*! no static exports found */
  2517. /***/ (function(module, exports, __webpack_require__) {
  2518. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  2519. function _unsupportedIterableToArray(o, minLen) {
  2520. if (!o) return;
  2521. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  2522. var n = Object.prototype.toString.call(o).slice(8, -1);
  2523. if (n === "Object" && o.constructor) n = o.constructor.name;
  2524. if (n === "Map" || n === "Set") return Array.from(o);
  2525. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  2526. }
  2527. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2528. /***/ }),
  2529. /* 9 */
  2530. /*!*****************************************************************!*\
  2531. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  2532. \*****************************************************************/
  2533. /*! no static exports found */
  2534. /***/ (function(module, exports) {
  2535. function _arrayLikeToArray(arr, len) {
  2536. if (len == null || len > arr.length) len = arr.length;
  2537. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  2538. arr2[i] = arr[i];
  2539. }
  2540. return arr2;
  2541. }
  2542. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2543. /***/ }),
  2544. /* 10 */
  2545. /*!****************************************************************!*\
  2546. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  2547. \****************************************************************/
  2548. /*! no static exports found */
  2549. /***/ (function(module, exports) {
  2550. function _nonIterableRest() {
  2551. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2552. }
  2553. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2554. /***/ }),
  2555. /* 11 */
  2556. /*!***************************************************************!*\
  2557. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  2558. \***************************************************************/
  2559. /*! no static exports found */
  2560. /***/ (function(module, exports, __webpack_require__) {
  2561. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  2562. function _defineProperty(obj, key, value) {
  2563. key = toPropertyKey(key);
  2564. if (key in obj) {
  2565. Object.defineProperty(obj, key, {
  2566. value: value,
  2567. enumerable: true,
  2568. configurable: true,
  2569. writable: true
  2570. });
  2571. } else {
  2572. obj[key] = value;
  2573. }
  2574. return obj;
  2575. }
  2576. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2577. /***/ }),
  2578. /* 12 */
  2579. /*!**************************************************************!*\
  2580. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  2581. \**************************************************************/
  2582. /*! no static exports found */
  2583. /***/ (function(module, exports, __webpack_require__) {
  2584. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  2585. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  2586. function toPropertyKey(t) {
  2587. var i = toPrimitive(t, "string");
  2588. return "symbol" == _typeof(i) ? i : i + "";
  2589. }
  2590. module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2591. /***/ }),
  2592. /* 13 */
  2593. /*!*******************************************************!*\
  2594. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  2595. \*******************************************************/
  2596. /*! no static exports found */
  2597. /***/ (function(module, exports) {
  2598. function _typeof(o) {
  2599. "@babel/helpers - typeof";
  2600. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
  2601. return typeof o;
  2602. } : function (o) {
  2603. return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  2604. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
  2605. }
  2606. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2607. /***/ }),
  2608. /* 14 */
  2609. /*!************************************************************!*\
  2610. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  2611. \************************************************************/
  2612. /*! no static exports found */
  2613. /***/ (function(module, exports, __webpack_require__) {
  2614. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  2615. function toPrimitive(t, r) {
  2616. if ("object" != _typeof(t) || !t) return t;
  2617. var e = t[Symbol.toPrimitive];
  2618. if (void 0 !== e) {
  2619. var i = e.call(t, r || "default");
  2620. if ("object" != _typeof(i)) return i;
  2621. throw new TypeError("@@toPrimitive must return a primitive value.");
  2622. }
  2623. return ("string" === r ? String : Number)(t);
  2624. }
  2625. module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2626. /***/ }),
  2627. /* 15 */
  2628. /*!**********************************************************!*\
  2629. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  2630. \**********************************************************/
  2631. /*! no static exports found */
  2632. /***/ (function(module, exports, __webpack_require__) {
  2633. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  2634. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  2635. function _construct(t, e, r) {
  2636. if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
  2637. var o = [null];
  2638. o.push.apply(o, e);
  2639. var p = new (t.bind.apply(t, o))();
  2640. return r && setPrototypeOf(p, r.prototype), p;
  2641. }
  2642. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2643. /***/ }),
  2644. /* 16 */
  2645. /*!***************************************************************!*\
  2646. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  2647. \***************************************************************/
  2648. /*! no static exports found */
  2649. /***/ (function(module, exports) {
  2650. function _setPrototypeOf(o, p) {
  2651. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2652. o.__proto__ = p;
  2653. return o;
  2654. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2655. return _setPrototypeOf(o, p);
  2656. }
  2657. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2658. /***/ }),
  2659. /* 17 */
  2660. /*!*************************************************************************!*\
  2661. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  2662. \*************************************************************************/
  2663. /*! no static exports found */
  2664. /***/ (function(module, exports) {
  2665. function _isNativeReflectConstruct() {
  2666. try {
  2667. var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  2668. } catch (t) {}
  2669. return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() {
  2670. return !!t;
  2671. }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
  2672. }
  2673. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2674. /***/ }),
  2675. /* 18 */
  2676. /*!******************************************************************!*\
  2677. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  2678. \******************************************************************/
  2679. /*! no static exports found */
  2680. /***/ (function(module, exports, __webpack_require__) {
  2681. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  2682. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  2683. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  2684. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  2685. function _toConsumableArray(arr) {
  2686. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  2687. }
  2688. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2689. /***/ }),
  2690. /* 19 */
  2691. /*!******************************************************************!*\
  2692. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  2693. \******************************************************************/
  2694. /*! no static exports found */
  2695. /***/ (function(module, exports, __webpack_require__) {
  2696. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  2697. function _arrayWithoutHoles(arr) {
  2698. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  2699. }
  2700. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2701. /***/ }),
  2702. /* 20 */
  2703. /*!****************************************************************!*\
  2704. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  2705. \****************************************************************/
  2706. /*! no static exports found */
  2707. /***/ (function(module, exports) {
  2708. function _iterableToArray(iter) {
  2709. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  2710. }
  2711. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2712. /***/ }),
  2713. /* 21 */
  2714. /*!******************************************************************!*\
  2715. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  2716. \******************************************************************/
  2717. /*! no static exports found */
  2718. /***/ (function(module, exports) {
  2719. function _nonIterableSpread() {
  2720. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2721. }
  2722. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2723. /***/ }),
  2724. /* 22 */
  2725. /*!*************************************************************!*\
  2726. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  2727. \*************************************************************/
  2728. /*! no static exports found */
  2729. /***/ (function(module, exports, __webpack_require__) {
  2730. "use strict";
  2731. /* WEBPACK VAR INJECTION */(function(uni, global) {
  2732. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2733. Object.defineProperty(exports, "__esModule", {
  2734. value: true
  2735. });
  2736. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  2737. exports.compileI18nJsonStr = compileI18nJsonStr;
  2738. exports.hasI18nJson = hasI18nJson;
  2739. exports.initVueI18n = initVueI18n;
  2740. exports.isI18nStr = isI18nStr;
  2741. exports.isString = void 0;
  2742. exports.normalizeLocale = normalizeLocale;
  2743. exports.parseI18nJson = parseI18nJson;
  2744. exports.resolveLocale = resolveLocale;
  2745. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  2746. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  2747. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  2748. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2749. var isObject = function isObject(val) {
  2750. return val !== null && (0, _typeof2.default)(val) === 'object';
  2751. };
  2752. var defaultDelimiters = ['{', '}'];
  2753. var BaseFormatter = /*#__PURE__*/function () {
  2754. function BaseFormatter() {
  2755. (0, _classCallCheck2.default)(this, BaseFormatter);
  2756. this._caches = Object.create(null);
  2757. }
  2758. (0, _createClass2.default)(BaseFormatter, [{
  2759. key: "interpolate",
  2760. value: function interpolate(message, values) {
  2761. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  2762. if (!values) {
  2763. return [message];
  2764. }
  2765. var tokens = this._caches[message];
  2766. if (!tokens) {
  2767. tokens = parse(message, delimiters);
  2768. this._caches[message] = tokens;
  2769. }
  2770. return compile(tokens, values);
  2771. }
  2772. }]);
  2773. return BaseFormatter;
  2774. }();
  2775. exports.Formatter = BaseFormatter;
  2776. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2777. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2778. function parse(format, _ref) {
  2779. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  2780. startDelimiter = _ref2[0],
  2781. endDelimiter = _ref2[1];
  2782. var tokens = [];
  2783. var position = 0;
  2784. var text = '';
  2785. while (position < format.length) {
  2786. var char = format[position++];
  2787. if (char === startDelimiter) {
  2788. if (text) {
  2789. tokens.push({
  2790. type: 'text',
  2791. value: text
  2792. });
  2793. }
  2794. text = '';
  2795. var sub = '';
  2796. char = format[position++];
  2797. while (char !== undefined && char !== endDelimiter) {
  2798. sub += char;
  2799. char = format[position++];
  2800. }
  2801. var isClosed = char === endDelimiter;
  2802. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  2803. tokens.push({
  2804. value: sub,
  2805. type: type
  2806. });
  2807. }
  2808. // else if (char === '%') {
  2809. // // when found rails i18n syntax, skip text capture
  2810. // if (format[position] !== '{') {
  2811. // text += char
  2812. // }
  2813. // }
  2814. else {
  2815. text += char;
  2816. }
  2817. }
  2818. text && tokens.push({
  2819. type: 'text',
  2820. value: text
  2821. });
  2822. return tokens;
  2823. }
  2824. function compile(tokens, values) {
  2825. var compiled = [];
  2826. var index = 0;
  2827. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  2828. if (mode === 'unknown') {
  2829. return compiled;
  2830. }
  2831. while (index < tokens.length) {
  2832. var token = tokens[index];
  2833. switch (token.type) {
  2834. case 'text':
  2835. compiled.push(token.value);
  2836. break;
  2837. case 'list':
  2838. compiled.push(values[parseInt(token.value, 10)]);
  2839. break;
  2840. case 'named':
  2841. if (mode === 'named') {
  2842. compiled.push(values[token.value]);
  2843. } else {
  2844. if (true) {
  2845. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  2846. }
  2847. }
  2848. break;
  2849. case 'unknown':
  2850. if (true) {
  2851. console.warn("Detect 'unknown' type of token!");
  2852. }
  2853. break;
  2854. }
  2855. index++;
  2856. }
  2857. return compiled;
  2858. }
  2859. var LOCALE_ZH_HANS = 'zh-Hans';
  2860. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  2861. var LOCALE_ZH_HANT = 'zh-Hant';
  2862. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  2863. var LOCALE_EN = 'en';
  2864. exports.LOCALE_EN = LOCALE_EN;
  2865. var LOCALE_FR = 'fr';
  2866. exports.LOCALE_FR = LOCALE_FR;
  2867. var LOCALE_ES = 'es';
  2868. exports.LOCALE_ES = LOCALE_ES;
  2869. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2870. var hasOwn = function hasOwn(val, key) {
  2871. return hasOwnProperty.call(val, key);
  2872. };
  2873. var defaultFormatter = new BaseFormatter();
  2874. function include(str, parts) {
  2875. return !!parts.find(function (part) {
  2876. return str.indexOf(part) !== -1;
  2877. });
  2878. }
  2879. function startsWith(str, parts) {
  2880. return parts.find(function (part) {
  2881. return str.indexOf(part) === 0;
  2882. });
  2883. }
  2884. function normalizeLocale(locale, messages) {
  2885. if (!locale) {
  2886. return;
  2887. }
  2888. locale = locale.trim().replace(/_/g, '-');
  2889. if (messages && messages[locale]) {
  2890. return locale;
  2891. }
  2892. locale = locale.toLowerCase();
  2893. if (locale === 'chinese') {
  2894. // 支付宝
  2895. return LOCALE_ZH_HANS;
  2896. }
  2897. if (locale.indexOf('zh') === 0) {
  2898. if (locale.indexOf('-hans') > -1) {
  2899. return LOCALE_ZH_HANS;
  2900. }
  2901. if (locale.indexOf('-hant') > -1) {
  2902. return LOCALE_ZH_HANT;
  2903. }
  2904. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2905. return LOCALE_ZH_HANT;
  2906. }
  2907. return LOCALE_ZH_HANS;
  2908. }
  2909. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  2910. if (messages && Object.keys(messages).length > 0) {
  2911. locales = Object.keys(messages);
  2912. }
  2913. var lang = startsWith(locale, locales);
  2914. if (lang) {
  2915. return lang;
  2916. }
  2917. }
  2918. var I18n = /*#__PURE__*/function () {
  2919. function I18n(_ref3) {
  2920. var locale = _ref3.locale,
  2921. fallbackLocale = _ref3.fallbackLocale,
  2922. messages = _ref3.messages,
  2923. watcher = _ref3.watcher,
  2924. formater = _ref3.formater;
  2925. (0, _classCallCheck2.default)(this, I18n);
  2926. this.locale = LOCALE_EN;
  2927. this.fallbackLocale = LOCALE_EN;
  2928. this.message = {};
  2929. this.messages = {};
  2930. this.watchers = [];
  2931. if (fallbackLocale) {
  2932. this.fallbackLocale = fallbackLocale;
  2933. }
  2934. this.formater = formater || defaultFormatter;
  2935. this.messages = messages || {};
  2936. this.setLocale(locale || LOCALE_EN);
  2937. if (watcher) {
  2938. this.watchLocale(watcher);
  2939. }
  2940. }
  2941. (0, _createClass2.default)(I18n, [{
  2942. key: "setLocale",
  2943. value: function setLocale(locale) {
  2944. var _this = this;
  2945. var oldLocale = this.locale;
  2946. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  2947. if (!this.messages[this.locale]) {
  2948. // 可能初始化时不存在
  2949. this.messages[this.locale] = {};
  2950. }
  2951. this.message = this.messages[this.locale];
  2952. // 仅发生变化时,通知
  2953. if (oldLocale !== this.locale) {
  2954. this.watchers.forEach(function (watcher) {
  2955. watcher(_this.locale, oldLocale);
  2956. });
  2957. }
  2958. }
  2959. }, {
  2960. key: "getLocale",
  2961. value: function getLocale() {
  2962. return this.locale;
  2963. }
  2964. }, {
  2965. key: "watchLocale",
  2966. value: function watchLocale(fn) {
  2967. var _this2 = this;
  2968. var index = this.watchers.push(fn) - 1;
  2969. return function () {
  2970. _this2.watchers.splice(index, 1);
  2971. };
  2972. }
  2973. }, {
  2974. key: "add",
  2975. value: function add(locale, message) {
  2976. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2977. var curMessages = this.messages[locale];
  2978. if (curMessages) {
  2979. if (override) {
  2980. Object.assign(curMessages, message);
  2981. } else {
  2982. Object.keys(message).forEach(function (key) {
  2983. if (!hasOwn(curMessages, key)) {
  2984. curMessages[key] = message[key];
  2985. }
  2986. });
  2987. }
  2988. } else {
  2989. this.messages[locale] = message;
  2990. }
  2991. }
  2992. }, {
  2993. key: "f",
  2994. value: function f(message, values, delimiters) {
  2995. return this.formater.interpolate(message, values, delimiters).join('');
  2996. }
  2997. }, {
  2998. key: "t",
  2999. value: function t(key, locale, values) {
  3000. var message = this.message;
  3001. if (typeof locale === 'string') {
  3002. locale = normalizeLocale(locale, this.messages);
  3003. locale && (message = this.messages[locale]);
  3004. } else {
  3005. values = locale;
  3006. }
  3007. if (!hasOwn(message, key)) {
  3008. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  3009. return key;
  3010. }
  3011. return this.formater.interpolate(message[key], values).join('');
  3012. }
  3013. }]);
  3014. return I18n;
  3015. }();
  3016. exports.I18n = I18n;
  3017. function watchAppLocale(appVm, i18n) {
  3018. // 需要保证 watch 的触发在组件渲染之前
  3019. if (appVm.$watchLocale) {
  3020. // vue2
  3021. appVm.$watchLocale(function (newLocale) {
  3022. i18n.setLocale(newLocale);
  3023. });
  3024. } else {
  3025. appVm.$watch(function () {
  3026. return appVm.$locale;
  3027. }, function (newLocale) {
  3028. i18n.setLocale(newLocale);
  3029. });
  3030. }
  3031. }
  3032. function getDefaultLocale() {
  3033. if (typeof uni !== 'undefined' && uni.getLocale) {
  3034. return uni.getLocale();
  3035. }
  3036. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  3037. if (typeof global !== 'undefined' && global.getLocale) {
  3038. return global.getLocale();
  3039. }
  3040. return LOCALE_EN;
  3041. }
  3042. function initVueI18n(locale) {
  3043. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3044. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  3045. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  3046. // 兼容旧版本入参
  3047. if (typeof locale !== 'string') {
  3048. var _ref4 = [messages, locale];
  3049. locale = _ref4[0];
  3050. messages = _ref4[1];
  3051. }
  3052. if (typeof locale !== 'string') {
  3053. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  3054. locale = getDefaultLocale();
  3055. }
  3056. if (typeof fallbackLocale !== 'string') {
  3057. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  3058. }
  3059. var i18n = new I18n({
  3060. locale: locale,
  3061. fallbackLocale: fallbackLocale,
  3062. messages: messages,
  3063. watcher: watcher
  3064. });
  3065. var _t = function t(key, values) {
  3066. if (typeof getApp !== 'function') {
  3067. // app view
  3068. /* eslint-disable no-func-assign */
  3069. _t = function t(key, values) {
  3070. return i18n.t(key, values);
  3071. };
  3072. } else {
  3073. var isWatchedAppLocale = false;
  3074. _t = function t(key, values) {
  3075. var appVm = getApp().$vm;
  3076. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  3077. // options: {
  3078. // type: Array,
  3079. // default () {
  3080. // return [{
  3081. // icon: 'shop',
  3082. // text: t("uni-goods-nav.options.shop"),
  3083. // }, {
  3084. // icon: 'cart',
  3085. // text: t("uni-goods-nav.options.cart")
  3086. // }]
  3087. // }
  3088. // },
  3089. if (appVm) {
  3090. // 触发响应式
  3091. appVm.$locale;
  3092. if (!isWatchedAppLocale) {
  3093. isWatchedAppLocale = true;
  3094. watchAppLocale(appVm, i18n);
  3095. }
  3096. }
  3097. return i18n.t(key, values);
  3098. };
  3099. }
  3100. return _t(key, values);
  3101. };
  3102. return {
  3103. i18n: i18n,
  3104. f: function f(message, values, delimiters) {
  3105. return i18n.f(message, values, delimiters);
  3106. },
  3107. t: function t(key, values) {
  3108. return _t(key, values);
  3109. },
  3110. add: function add(locale, message) {
  3111. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  3112. return i18n.add(locale, message, override);
  3113. },
  3114. watch: function watch(fn) {
  3115. return i18n.watchLocale(fn);
  3116. },
  3117. getLocale: function getLocale() {
  3118. return i18n.getLocale();
  3119. },
  3120. setLocale: function setLocale(newLocale) {
  3121. return i18n.setLocale(newLocale);
  3122. }
  3123. };
  3124. }
  3125. var isString = function isString(val) {
  3126. return typeof val === 'string';
  3127. };
  3128. exports.isString = isString;
  3129. var formater;
  3130. function hasI18nJson(jsonObj, delimiters) {
  3131. if (!formater) {
  3132. formater = new BaseFormatter();
  3133. }
  3134. return walkJsonObj(jsonObj, function (jsonObj, key) {
  3135. var value = jsonObj[key];
  3136. if (isString(value)) {
  3137. if (isI18nStr(value, delimiters)) {
  3138. return true;
  3139. }
  3140. } else {
  3141. return hasI18nJson(value, delimiters);
  3142. }
  3143. });
  3144. }
  3145. function parseI18nJson(jsonObj, values, delimiters) {
  3146. if (!formater) {
  3147. formater = new BaseFormatter();
  3148. }
  3149. walkJsonObj(jsonObj, function (jsonObj, key) {
  3150. var value = jsonObj[key];
  3151. if (isString(value)) {
  3152. if (isI18nStr(value, delimiters)) {
  3153. jsonObj[key] = compileStr(value, values, delimiters);
  3154. }
  3155. } else {
  3156. parseI18nJson(value, values, delimiters);
  3157. }
  3158. });
  3159. return jsonObj;
  3160. }
  3161. function compileI18nJsonStr(jsonStr, _ref5) {
  3162. var locale = _ref5.locale,
  3163. locales = _ref5.locales,
  3164. delimiters = _ref5.delimiters;
  3165. if (!isI18nStr(jsonStr, delimiters)) {
  3166. return jsonStr;
  3167. }
  3168. if (!formater) {
  3169. formater = new BaseFormatter();
  3170. }
  3171. var localeValues = [];
  3172. Object.keys(locales).forEach(function (name) {
  3173. if (name !== locale) {
  3174. localeValues.push({
  3175. locale: name,
  3176. values: locales[name]
  3177. });
  3178. }
  3179. });
  3180. localeValues.unshift({
  3181. locale: locale,
  3182. values: locales[locale]
  3183. });
  3184. try {
  3185. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  3186. } catch (e) {}
  3187. return jsonStr;
  3188. }
  3189. function isI18nStr(value, delimiters) {
  3190. return value.indexOf(delimiters[0]) > -1;
  3191. }
  3192. function compileStr(value, values, delimiters) {
  3193. return formater.interpolate(value, values, delimiters).join('');
  3194. }
  3195. function compileValue(jsonObj, key, localeValues, delimiters) {
  3196. var value = jsonObj[key];
  3197. if (isString(value)) {
  3198. // 存在国际化
  3199. if (isI18nStr(value, delimiters)) {
  3200. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  3201. if (localeValues.length > 1) {
  3202. // 格式化国际化语言
  3203. var valueLocales = jsonObj[key + 'Locales'] = {};
  3204. localeValues.forEach(function (localValue) {
  3205. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  3206. });
  3207. }
  3208. }
  3209. } else {
  3210. compileJsonObj(value, localeValues, delimiters);
  3211. }
  3212. }
  3213. function compileJsonObj(jsonObj, localeValues, delimiters) {
  3214. walkJsonObj(jsonObj, function (jsonObj, key) {
  3215. compileValue(jsonObj, key, localeValues, delimiters);
  3216. });
  3217. return jsonObj;
  3218. }
  3219. function walkJsonObj(jsonObj, walk) {
  3220. if (Array.isArray(jsonObj)) {
  3221. for (var i = 0; i < jsonObj.length; i++) {
  3222. if (walk(jsonObj, i)) {
  3223. return true;
  3224. }
  3225. }
  3226. } else if (isObject(jsonObj)) {
  3227. for (var key in jsonObj) {
  3228. if (walk(jsonObj, key)) {
  3229. return true;
  3230. }
  3231. }
  3232. }
  3233. return false;
  3234. }
  3235. function resolveLocale(locales) {
  3236. return function (locale) {
  3237. if (!locale) {
  3238. return locale;
  3239. }
  3240. locale = normalizeLocale(locale) || locale;
  3241. return resolveLocaleChain(locale).find(function (locale) {
  3242. return locales.indexOf(locale) > -1;
  3243. });
  3244. };
  3245. }
  3246. function resolveLocaleChain(locale) {
  3247. var chain = [];
  3248. var tokens = locale.split('-');
  3249. while (tokens.length) {
  3250. chain.push(tokens.join('-'));
  3251. tokens.pop();
  3252. }
  3253. return chain;
  3254. }
  3255. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  3256. /***/ }),
  3257. /* 23 */
  3258. /*!***************************************************************!*\
  3259. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  3260. \***************************************************************/
  3261. /*! no static exports found */
  3262. /***/ (function(module, exports) {
  3263. function _classCallCheck(instance, Constructor) {
  3264. if (!(instance instanceof Constructor)) {
  3265. throw new TypeError("Cannot call a class as a function");
  3266. }
  3267. }
  3268. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3269. /***/ }),
  3270. /* 24 */
  3271. /*!************************************************************!*\
  3272. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  3273. \************************************************************/
  3274. /*! no static exports found */
  3275. /***/ (function(module, exports, __webpack_require__) {
  3276. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  3277. function _defineProperties(target, props) {
  3278. for (var i = 0; i < props.length; i++) {
  3279. var descriptor = props[i];
  3280. descriptor.enumerable = descriptor.enumerable || false;
  3281. descriptor.configurable = true;
  3282. if ("value" in descriptor) descriptor.writable = true;
  3283. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  3284. }
  3285. }
  3286. function _createClass(Constructor, protoProps, staticProps) {
  3287. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  3288. if (staticProps) _defineProperties(Constructor, staticProps);
  3289. Object.defineProperty(Constructor, "prototype", {
  3290. writable: false
  3291. });
  3292. return Constructor;
  3293. }
  3294. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3295. /***/ }),
  3296. /* 25 */
  3297. /*!******************************************************************************************!*\
  3298. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  3299. \******************************************************************************************/
  3300. /*! exports provided: default */
  3301. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3302. "use strict";
  3303. __webpack_require__.r(__webpack_exports__);
  3304. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3305. * Vue.js v2.6.11
  3306. * (c) 2014-2023 Evan You
  3307. * Released under the MIT License.
  3308. */
  3309. /* */
  3310. var emptyObject = Object.freeze({});
  3311. // These helpers produce better VM code in JS engines due to their
  3312. // explicitness and function inlining.
  3313. function isUndef (v) {
  3314. return v === undefined || v === null
  3315. }
  3316. function isDef (v) {
  3317. return v !== undefined && v !== null
  3318. }
  3319. function isTrue (v) {
  3320. return v === true
  3321. }
  3322. function isFalse (v) {
  3323. return v === false
  3324. }
  3325. /**
  3326. * Check if value is primitive.
  3327. */
  3328. function isPrimitive (value) {
  3329. return (
  3330. typeof value === 'string' ||
  3331. typeof value === 'number' ||
  3332. // $flow-disable-line
  3333. typeof value === 'symbol' ||
  3334. typeof value === 'boolean'
  3335. )
  3336. }
  3337. /**
  3338. * Quick object check - this is primarily used to tell
  3339. * Objects from primitive values when we know the value
  3340. * is a JSON-compliant type.
  3341. */
  3342. function isObject (obj) {
  3343. return obj !== null && typeof obj === 'object'
  3344. }
  3345. /**
  3346. * Get the raw type string of a value, e.g., [object Object].
  3347. */
  3348. var _toString = Object.prototype.toString;
  3349. function toRawType (value) {
  3350. return _toString.call(value).slice(8, -1)
  3351. }
  3352. /**
  3353. * Strict object type check. Only returns true
  3354. * for plain JavaScript objects.
  3355. */
  3356. function isPlainObject (obj) {
  3357. return _toString.call(obj) === '[object Object]'
  3358. }
  3359. function isRegExp (v) {
  3360. return _toString.call(v) === '[object RegExp]'
  3361. }
  3362. /**
  3363. * Check if val is a valid array index.
  3364. */
  3365. function isValidArrayIndex (val) {
  3366. var n = parseFloat(String(val));
  3367. return n >= 0 && Math.floor(n) === n && isFinite(val)
  3368. }
  3369. function isPromise (val) {
  3370. return (
  3371. isDef(val) &&
  3372. typeof val.then === 'function' &&
  3373. typeof val.catch === 'function'
  3374. )
  3375. }
  3376. /**
  3377. * Convert a value to a string that is actually rendered.
  3378. */
  3379. function toString (val) {
  3380. return val == null
  3381. ? ''
  3382. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  3383. ? JSON.stringify(val, null, 2)
  3384. : String(val)
  3385. }
  3386. /**
  3387. * Convert an input value to a number for persistence.
  3388. * If the conversion fails, return original string.
  3389. */
  3390. function toNumber (val) {
  3391. var n = parseFloat(val);
  3392. return isNaN(n) ? val : n
  3393. }
  3394. /**
  3395. * Make a map and return a function for checking if a key
  3396. * is in that map.
  3397. */
  3398. function makeMap (
  3399. str,
  3400. expectsLowerCase
  3401. ) {
  3402. var map = Object.create(null);
  3403. var list = str.split(',');
  3404. for (var i = 0; i < list.length; i++) {
  3405. map[list[i]] = true;
  3406. }
  3407. return expectsLowerCase
  3408. ? function (val) { return map[val.toLowerCase()]; }
  3409. : function (val) { return map[val]; }
  3410. }
  3411. /**
  3412. * Check if a tag is a built-in tag.
  3413. */
  3414. var isBuiltInTag = makeMap('slot,component', true);
  3415. /**
  3416. * Check if an attribute is a reserved attribute.
  3417. */
  3418. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  3419. /**
  3420. * Remove an item from an array.
  3421. */
  3422. function remove (arr, item) {
  3423. if (arr.length) {
  3424. var index = arr.indexOf(item);
  3425. if (index > -1) {
  3426. return arr.splice(index, 1)
  3427. }
  3428. }
  3429. }
  3430. /**
  3431. * Check whether an object has the property.
  3432. */
  3433. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3434. function hasOwn (obj, key) {
  3435. return hasOwnProperty.call(obj, key)
  3436. }
  3437. /**
  3438. * Create a cached version of a pure function.
  3439. */
  3440. function cached (fn) {
  3441. var cache = Object.create(null);
  3442. return (function cachedFn (str) {
  3443. var hit = cache[str];
  3444. return hit || (cache[str] = fn(str))
  3445. })
  3446. }
  3447. /**
  3448. * Camelize a hyphen-delimited string.
  3449. */
  3450. var camelizeRE = /-(\w)/g;
  3451. var camelize = cached(function (str) {
  3452. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  3453. });
  3454. /**
  3455. * Capitalize a string.
  3456. */
  3457. var capitalize = cached(function (str) {
  3458. return str.charAt(0).toUpperCase() + str.slice(1)
  3459. });
  3460. /**
  3461. * Hyphenate a camelCase string.
  3462. */
  3463. var hyphenateRE = /\B([A-Z])/g;
  3464. var hyphenate = cached(function (str) {
  3465. return str.replace(hyphenateRE, '-$1').toLowerCase()
  3466. });
  3467. /**
  3468. * Simple bind polyfill for environments that do not support it,
  3469. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  3470. * since native bind is now performant enough in most browsers.
  3471. * But removing it would mean breaking code that was able to run in
  3472. * PhantomJS 1.x, so this must be kept for backward compatibility.
  3473. */
  3474. /* istanbul ignore next */
  3475. function polyfillBind (fn, ctx) {
  3476. function boundFn (a) {
  3477. var l = arguments.length;
  3478. return l
  3479. ? l > 1
  3480. ? fn.apply(ctx, arguments)
  3481. : fn.call(ctx, a)
  3482. : fn.call(ctx)
  3483. }
  3484. boundFn._length = fn.length;
  3485. return boundFn
  3486. }
  3487. function nativeBind (fn, ctx) {
  3488. return fn.bind(ctx)
  3489. }
  3490. var bind = Function.prototype.bind
  3491. ? nativeBind
  3492. : polyfillBind;
  3493. /**
  3494. * Convert an Array-like object to a real Array.
  3495. */
  3496. function toArray (list, start) {
  3497. start = start || 0;
  3498. var i = list.length - start;
  3499. var ret = new Array(i);
  3500. while (i--) {
  3501. ret[i] = list[i + start];
  3502. }
  3503. return ret
  3504. }
  3505. /**
  3506. * Mix properties into target object.
  3507. */
  3508. function extend (to, _from) {
  3509. for (var key in _from) {
  3510. to[key] = _from[key];
  3511. }
  3512. return to
  3513. }
  3514. /**
  3515. * Merge an Array of Objects into a single Object.
  3516. */
  3517. function toObject (arr) {
  3518. var res = {};
  3519. for (var i = 0; i < arr.length; i++) {
  3520. if (arr[i]) {
  3521. extend(res, arr[i]);
  3522. }
  3523. }
  3524. return res
  3525. }
  3526. /* eslint-disable no-unused-vars */
  3527. /**
  3528. * Perform no operation.
  3529. * Stubbing args to make Flow happy without leaving useless transpiled code
  3530. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  3531. */
  3532. function noop (a, b, c) {}
  3533. /**
  3534. * Always return false.
  3535. */
  3536. var no = function (a, b, c) { return false; };
  3537. /* eslint-enable no-unused-vars */
  3538. /**
  3539. * Return the same value.
  3540. */
  3541. var identity = function (_) { return _; };
  3542. /**
  3543. * Check if two values are loosely equal - that is,
  3544. * if they are plain objects, do they have the same shape?
  3545. */
  3546. function looseEqual (a, b) {
  3547. if (a === b) { return true }
  3548. var isObjectA = isObject(a);
  3549. var isObjectB = isObject(b);
  3550. if (isObjectA && isObjectB) {
  3551. try {
  3552. var isArrayA = Array.isArray(a);
  3553. var isArrayB = Array.isArray(b);
  3554. if (isArrayA && isArrayB) {
  3555. return a.length === b.length && a.every(function (e, i) {
  3556. return looseEqual(e, b[i])
  3557. })
  3558. } else if (a instanceof Date && b instanceof Date) {
  3559. return a.getTime() === b.getTime()
  3560. } else if (!isArrayA && !isArrayB) {
  3561. var keysA = Object.keys(a);
  3562. var keysB = Object.keys(b);
  3563. return keysA.length === keysB.length && keysA.every(function (key) {
  3564. return looseEqual(a[key], b[key])
  3565. })
  3566. } else {
  3567. /* istanbul ignore next */
  3568. return false
  3569. }
  3570. } catch (e) {
  3571. /* istanbul ignore next */
  3572. return false
  3573. }
  3574. } else if (!isObjectA && !isObjectB) {
  3575. return String(a) === String(b)
  3576. } else {
  3577. return false
  3578. }
  3579. }
  3580. /**
  3581. * Return the first index at which a loosely equal value can be
  3582. * found in the array (if value is a plain object, the array must
  3583. * contain an object of the same shape), or -1 if it is not present.
  3584. */
  3585. function looseIndexOf (arr, val) {
  3586. for (var i = 0; i < arr.length; i++) {
  3587. if (looseEqual(arr[i], val)) { return i }
  3588. }
  3589. return -1
  3590. }
  3591. /**
  3592. * Ensure a function is called only once.
  3593. */
  3594. function once (fn) {
  3595. var called = false;
  3596. return function () {
  3597. if (!called) {
  3598. called = true;
  3599. fn.apply(this, arguments);
  3600. }
  3601. }
  3602. }
  3603. var ASSET_TYPES = [
  3604. 'component',
  3605. 'directive',
  3606. 'filter'
  3607. ];
  3608. var LIFECYCLE_HOOKS = [
  3609. 'beforeCreate',
  3610. 'created',
  3611. 'beforeMount',
  3612. 'mounted',
  3613. 'beforeUpdate',
  3614. 'updated',
  3615. 'beforeDestroy',
  3616. 'destroyed',
  3617. 'activated',
  3618. 'deactivated',
  3619. 'errorCaptured',
  3620. 'serverPrefetch'
  3621. ];
  3622. /* */
  3623. var config = ({
  3624. /**
  3625. * Option merge strategies (used in core/util/options)
  3626. */
  3627. // $flow-disable-line
  3628. optionMergeStrategies: Object.create(null),
  3629. /**
  3630. * Whether to suppress warnings.
  3631. */
  3632. silent: false,
  3633. /**
  3634. * Show production mode tip message on boot?
  3635. */
  3636. productionTip: "development" !== 'production',
  3637. /**
  3638. * Whether to enable devtools
  3639. */
  3640. devtools: "development" !== 'production',
  3641. /**
  3642. * Whether to record perf
  3643. */
  3644. performance: false,
  3645. /**
  3646. * Error handler for watcher errors
  3647. */
  3648. errorHandler: null,
  3649. /**
  3650. * Warn handler for watcher warns
  3651. */
  3652. warnHandler: null,
  3653. /**
  3654. * Ignore certain custom elements
  3655. */
  3656. ignoredElements: [],
  3657. /**
  3658. * Custom user key aliases for v-on
  3659. */
  3660. // $flow-disable-line
  3661. keyCodes: Object.create(null),
  3662. /**
  3663. * Check if a tag is reserved so that it cannot be registered as a
  3664. * component. This is platform-dependent and may be overwritten.
  3665. */
  3666. isReservedTag: no,
  3667. /**
  3668. * Check if an attribute is reserved so that it cannot be used as a component
  3669. * prop. This is platform-dependent and may be overwritten.
  3670. */
  3671. isReservedAttr: no,
  3672. /**
  3673. * Check if a tag is an unknown element.
  3674. * Platform-dependent.
  3675. */
  3676. isUnknownElement: no,
  3677. /**
  3678. * Get the namespace of an element
  3679. */
  3680. getTagNamespace: noop,
  3681. /**
  3682. * Parse the real tag name for the specific platform.
  3683. */
  3684. parsePlatformTagName: identity,
  3685. /**
  3686. * Check if an attribute must be bound using property, e.g. value
  3687. * Platform-dependent.
  3688. */
  3689. mustUseProp: no,
  3690. /**
  3691. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  3692. * This will significantly reduce performance if set to false.
  3693. */
  3694. async: true,
  3695. /**
  3696. * Exposed for legacy reasons
  3697. */
  3698. _lifecycleHooks: LIFECYCLE_HOOKS
  3699. });
  3700. /* */
  3701. /**
  3702. * unicode letters used for parsing html tags, component names and property paths.
  3703. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  3704. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  3705. */
  3706. 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/;
  3707. /**
  3708. * Check if a string starts with $ or _
  3709. */
  3710. function isReserved (str) {
  3711. var c = (str + '').charCodeAt(0);
  3712. return c === 0x24 || c === 0x5F
  3713. }
  3714. /**
  3715. * Define a property.
  3716. */
  3717. function def (obj, key, val, enumerable) {
  3718. Object.defineProperty(obj, key, {
  3719. value: val,
  3720. enumerable: !!enumerable,
  3721. writable: true,
  3722. configurable: true
  3723. });
  3724. }
  3725. /**
  3726. * Parse simple path.
  3727. */
  3728. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  3729. function parsePath (path) {
  3730. if (bailRE.test(path)) {
  3731. return
  3732. }
  3733. var segments = path.split('.');
  3734. return function (obj) {
  3735. for (var i = 0; i < segments.length; i++) {
  3736. if (!obj) { return }
  3737. obj = obj[segments[i]];
  3738. }
  3739. return obj
  3740. }
  3741. }
  3742. /* */
  3743. // can we use __proto__?
  3744. var hasProto = '__proto__' in {};
  3745. // Browser environment sniffing
  3746. var inBrowser = typeof window !== 'undefined';
  3747. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  3748. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  3749. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  3750. var isIE = UA && /msie|trident/.test(UA);
  3751. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  3752. var isEdge = UA && UA.indexOf('edge/') > 0;
  3753. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  3754. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  3755. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  3756. var isPhantomJS = UA && /phantomjs/.test(UA);
  3757. var isFF = UA && UA.match(/firefox\/(\d+)/);
  3758. // Firefox has a "watch" function on Object.prototype...
  3759. var nativeWatch = ({}).watch;
  3760. if (inBrowser) {
  3761. try {
  3762. var opts = {};
  3763. Object.defineProperty(opts, 'passive', ({
  3764. get: function get () {
  3765. }
  3766. })); // https://github.com/facebook/flow/issues/285
  3767. window.addEventListener('test-passive', null, opts);
  3768. } catch (e) {}
  3769. }
  3770. // this needs to be lazy-evaled because vue may be required before
  3771. // vue-server-renderer can set VUE_ENV
  3772. var _isServer;
  3773. var isServerRendering = function () {
  3774. if (_isServer === undefined) {
  3775. /* istanbul ignore if */
  3776. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  3777. // detect presence of vue-server-renderer and avoid
  3778. // Webpack shimming the process
  3779. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  3780. } else {
  3781. _isServer = false;
  3782. }
  3783. }
  3784. return _isServer
  3785. };
  3786. // detect devtools
  3787. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  3788. /* istanbul ignore next */
  3789. function isNative (Ctor) {
  3790. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  3791. }
  3792. var hasSymbol =
  3793. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  3794. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  3795. var _Set;
  3796. /* istanbul ignore if */ // $flow-disable-line
  3797. if (typeof Set !== 'undefined' && isNative(Set)) {
  3798. // use native Set when available.
  3799. _Set = Set;
  3800. } else {
  3801. // a non-standard Set polyfill that only works with primitive keys.
  3802. _Set = /*@__PURE__*/(function () {
  3803. function Set () {
  3804. this.set = Object.create(null);
  3805. }
  3806. Set.prototype.has = function has (key) {
  3807. return this.set[key] === true
  3808. };
  3809. Set.prototype.add = function add (key) {
  3810. this.set[key] = true;
  3811. };
  3812. Set.prototype.clear = function clear () {
  3813. this.set = Object.create(null);
  3814. };
  3815. return Set;
  3816. }());
  3817. }
  3818. /* */
  3819. var warn = noop;
  3820. var tip = noop;
  3821. var generateComponentTrace = (noop); // work around flow check
  3822. var formatComponentName = (noop);
  3823. if (true) {
  3824. var hasConsole = typeof console !== 'undefined';
  3825. var classifyRE = /(?:^|[-_])(\w)/g;
  3826. var classify = function (str) { return str
  3827. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  3828. .replace(/[-_]/g, ''); };
  3829. warn = function (msg, vm) {
  3830. var trace = vm ? generateComponentTrace(vm) : '';
  3831. if (config.warnHandler) {
  3832. config.warnHandler.call(null, msg, vm, trace);
  3833. } else if (hasConsole && (!config.silent)) {
  3834. console.error(("[Vue warn]: " + msg + trace));
  3835. }
  3836. };
  3837. tip = function (msg, vm) {
  3838. if (hasConsole && (!config.silent)) {
  3839. console.warn("[Vue tip]: " + msg + (
  3840. vm ? generateComponentTrace(vm) : ''
  3841. ));
  3842. }
  3843. };
  3844. formatComponentName = function (vm, includeFile) {
  3845. if (vm.$root === vm) {
  3846. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  3847. return ('') + vm.$options.__file
  3848. }
  3849. return '<Root>'
  3850. }
  3851. var options = typeof vm === 'function' && vm.cid != null
  3852. ? vm.options
  3853. : vm._isVue
  3854. ? vm.$options || vm.constructor.options
  3855. : vm;
  3856. var name = options.name || options._componentTag;
  3857. var file = options.__file;
  3858. if (!name && file) {
  3859. var match = file.match(/([^/\\]+)\.vue$/);
  3860. name = match && match[1];
  3861. }
  3862. return (
  3863. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  3864. (file && includeFile !== false ? (" at " + file) : '')
  3865. )
  3866. };
  3867. var repeat = function (str, n) {
  3868. var res = '';
  3869. while (n) {
  3870. if (n % 2 === 1) { res += str; }
  3871. if (n > 1) { str += str; }
  3872. n >>= 1;
  3873. }
  3874. return res
  3875. };
  3876. generateComponentTrace = function (vm) {
  3877. if (vm._isVue && vm.$parent) {
  3878. var tree = [];
  3879. var currentRecursiveSequence = 0;
  3880. while (vm && vm.$options.name !== 'PageBody') {
  3881. if (tree.length > 0) {
  3882. var last = tree[tree.length - 1];
  3883. if (last.constructor === vm.constructor) {
  3884. currentRecursiveSequence++;
  3885. vm = vm.$parent;
  3886. continue
  3887. } else if (currentRecursiveSequence > 0) {
  3888. tree[tree.length - 1] = [last, currentRecursiveSequence];
  3889. currentRecursiveSequence = 0;
  3890. }
  3891. }
  3892. !vm.$options.isReserved && tree.push(vm);
  3893. vm = vm.$parent;
  3894. }
  3895. return '\n\nfound in\n\n' + tree
  3896. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  3897. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  3898. : formatComponentName(vm))); })
  3899. .join('\n')
  3900. } else {
  3901. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  3902. }
  3903. };
  3904. }
  3905. /* */
  3906. var uid = 0;
  3907. /**
  3908. * A dep is an observable that can have multiple
  3909. * directives subscribing to it.
  3910. */
  3911. var Dep = function Dep () {
  3912. this.id = uid++;
  3913. this.subs = [];
  3914. };
  3915. Dep.prototype.addSub = function addSub (sub) {
  3916. this.subs.push(sub);
  3917. };
  3918. Dep.prototype.removeSub = function removeSub (sub) {
  3919. remove(this.subs, sub);
  3920. };
  3921. Dep.prototype.depend = function depend () {
  3922. if (Dep.SharedObject.target) {
  3923. Dep.SharedObject.target.addDep(this);
  3924. }
  3925. };
  3926. Dep.prototype.notify = function notify () {
  3927. // stabilize the subscriber list first
  3928. var subs = this.subs.slice();
  3929. if ( true && !config.async) {
  3930. // subs aren't sorted in scheduler if not running async
  3931. // we need to sort them now to make sure they fire in correct
  3932. // order
  3933. subs.sort(function (a, b) { return a.id - b.id; });
  3934. }
  3935. for (var i = 0, l = subs.length; i < l; i++) {
  3936. subs[i].update();
  3937. }
  3938. };
  3939. // The current target watcher being evaluated.
  3940. // This is globally unique because only one watcher
  3941. // can be evaluated at a time.
  3942. // fixed by xxxxxx (nvue shared vuex)
  3943. /* eslint-disable no-undef */
  3944. Dep.SharedObject = {};
  3945. Dep.SharedObject.target = null;
  3946. Dep.SharedObject.targetStack = [];
  3947. function pushTarget (target) {
  3948. Dep.SharedObject.targetStack.push(target);
  3949. Dep.SharedObject.target = target;
  3950. Dep.target = target;
  3951. }
  3952. function popTarget () {
  3953. Dep.SharedObject.targetStack.pop();
  3954. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  3955. Dep.target = Dep.SharedObject.target;
  3956. }
  3957. /* */
  3958. var VNode = function VNode (
  3959. tag,
  3960. data,
  3961. children,
  3962. text,
  3963. elm,
  3964. context,
  3965. componentOptions,
  3966. asyncFactory
  3967. ) {
  3968. this.tag = tag;
  3969. this.data = data;
  3970. this.children = children;
  3971. this.text = text;
  3972. this.elm = elm;
  3973. this.ns = undefined;
  3974. this.context = context;
  3975. this.fnContext = undefined;
  3976. this.fnOptions = undefined;
  3977. this.fnScopeId = undefined;
  3978. this.key = data && data.key;
  3979. this.componentOptions = componentOptions;
  3980. this.componentInstance = undefined;
  3981. this.parent = undefined;
  3982. this.raw = false;
  3983. this.isStatic = false;
  3984. this.isRootInsert = true;
  3985. this.isComment = false;
  3986. this.isCloned = false;
  3987. this.isOnce = false;
  3988. this.asyncFactory = asyncFactory;
  3989. this.asyncMeta = undefined;
  3990. this.isAsyncPlaceholder = false;
  3991. };
  3992. var prototypeAccessors = { child: { configurable: true } };
  3993. // DEPRECATED: alias for componentInstance for backwards compat.
  3994. /* istanbul ignore next */
  3995. prototypeAccessors.child.get = function () {
  3996. return this.componentInstance
  3997. };
  3998. Object.defineProperties( VNode.prototype, prototypeAccessors );
  3999. var createEmptyVNode = function (text) {
  4000. if ( text === void 0 ) text = '';
  4001. var node = new VNode();
  4002. node.text = text;
  4003. node.isComment = true;
  4004. return node
  4005. };
  4006. function createTextVNode (val) {
  4007. return new VNode(undefined, undefined, undefined, String(val))
  4008. }
  4009. // optimized shallow clone
  4010. // used for static nodes and slot nodes because they may be reused across
  4011. // multiple renders, cloning them avoids errors when DOM manipulations rely
  4012. // on their elm reference.
  4013. function cloneVNode (vnode) {
  4014. var cloned = new VNode(
  4015. vnode.tag,
  4016. vnode.data,
  4017. // #7975
  4018. // clone children array to avoid mutating original in case of cloning
  4019. // a child.
  4020. vnode.children && vnode.children.slice(),
  4021. vnode.text,
  4022. vnode.elm,
  4023. vnode.context,
  4024. vnode.componentOptions,
  4025. vnode.asyncFactory
  4026. );
  4027. cloned.ns = vnode.ns;
  4028. cloned.isStatic = vnode.isStatic;
  4029. cloned.key = vnode.key;
  4030. cloned.isComment = vnode.isComment;
  4031. cloned.fnContext = vnode.fnContext;
  4032. cloned.fnOptions = vnode.fnOptions;
  4033. cloned.fnScopeId = vnode.fnScopeId;
  4034. cloned.asyncMeta = vnode.asyncMeta;
  4035. cloned.isCloned = true;
  4036. return cloned
  4037. }
  4038. /*
  4039. * not type checking this file because flow doesn't play well with
  4040. * dynamically accessing methods on Array prototype
  4041. */
  4042. var arrayProto = Array.prototype;
  4043. var arrayMethods = Object.create(arrayProto);
  4044. var methodsToPatch = [
  4045. 'push',
  4046. 'pop',
  4047. 'shift',
  4048. 'unshift',
  4049. 'splice',
  4050. 'sort',
  4051. 'reverse'
  4052. ];
  4053. /**
  4054. * Intercept mutating methods and emit events
  4055. */
  4056. methodsToPatch.forEach(function (method) {
  4057. // cache original method
  4058. var original = arrayProto[method];
  4059. def(arrayMethods, method, function mutator () {
  4060. var args = [], len = arguments.length;
  4061. while ( len-- ) args[ len ] = arguments[ len ];
  4062. var result = original.apply(this, args);
  4063. var ob = this.__ob__;
  4064. var inserted;
  4065. switch (method) {
  4066. case 'push':
  4067. case 'unshift':
  4068. inserted = args;
  4069. break
  4070. case 'splice':
  4071. inserted = args.slice(2);
  4072. break
  4073. }
  4074. if (inserted) { ob.observeArray(inserted); }
  4075. // notify change
  4076. ob.dep.notify();
  4077. return result
  4078. });
  4079. });
  4080. /* */
  4081. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  4082. /**
  4083. * In some cases we may want to disable observation inside a component's
  4084. * update computation.
  4085. */
  4086. var shouldObserve = true;
  4087. function toggleObserving (value) {
  4088. shouldObserve = value;
  4089. }
  4090. /**
  4091. * Observer class that is attached to each observed
  4092. * object. Once attached, the observer converts the target
  4093. * object's property keys into getter/setters that
  4094. * collect dependencies and dispatch updates.
  4095. */
  4096. var Observer = function Observer (value) {
  4097. this.value = value;
  4098. this.dep = new Dep();
  4099. this.vmCount = 0;
  4100. def(value, '__ob__', this);
  4101. if (Array.isArray(value)) {
  4102. if (hasProto) {
  4103. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  4104. if(value.push !== value.__proto__.push){
  4105. copyAugment(value, arrayMethods, arrayKeys);
  4106. } else {
  4107. protoAugment(value, arrayMethods);
  4108. }
  4109. }
  4110. } else {
  4111. copyAugment(value, arrayMethods, arrayKeys);
  4112. }
  4113. this.observeArray(value);
  4114. } else {
  4115. this.walk(value);
  4116. }
  4117. };
  4118. /**
  4119. * Walk through all properties and convert them into
  4120. * getter/setters. This method should only be called when
  4121. * value type is Object.
  4122. */
  4123. Observer.prototype.walk = function walk (obj) {
  4124. var keys = Object.keys(obj);
  4125. for (var i = 0; i < keys.length; i++) {
  4126. defineReactive$$1(obj, keys[i]);
  4127. }
  4128. };
  4129. /**
  4130. * Observe a list of Array items.
  4131. */
  4132. Observer.prototype.observeArray = function observeArray (items) {
  4133. for (var i = 0, l = items.length; i < l; i++) {
  4134. observe(items[i]);
  4135. }
  4136. };
  4137. // helpers
  4138. /**
  4139. * Augment a target Object or Array by intercepting
  4140. * the prototype chain using __proto__
  4141. */
  4142. function protoAugment (target, src) {
  4143. /* eslint-disable no-proto */
  4144. target.__proto__ = src;
  4145. /* eslint-enable no-proto */
  4146. }
  4147. /**
  4148. * Augment a target Object or Array by defining
  4149. * hidden properties.
  4150. */
  4151. /* istanbul ignore next */
  4152. function copyAugment (target, src, keys) {
  4153. for (var i = 0, l = keys.length; i < l; i++) {
  4154. var key = keys[i];
  4155. def(target, key, src[key]);
  4156. }
  4157. }
  4158. /**
  4159. * Attempt to create an observer instance for a value,
  4160. * returns the new observer if successfully observed,
  4161. * or the existing observer if the value already has one.
  4162. */
  4163. function observe (value, asRootData) {
  4164. if (!isObject(value) || value instanceof VNode) {
  4165. return
  4166. }
  4167. var ob;
  4168. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  4169. ob = value.__ob__;
  4170. } else if (
  4171. shouldObserve &&
  4172. !isServerRendering() &&
  4173. (Array.isArray(value) || isPlainObject(value)) &&
  4174. Object.isExtensible(value) &&
  4175. !value._isVue &&
  4176. !value.__v_isMPComponent
  4177. ) {
  4178. ob = new Observer(value);
  4179. }
  4180. if (asRootData && ob) {
  4181. ob.vmCount++;
  4182. }
  4183. return ob
  4184. }
  4185. /**
  4186. * Define a reactive property on an Object.
  4187. */
  4188. function defineReactive$$1 (
  4189. obj,
  4190. key,
  4191. val,
  4192. customSetter,
  4193. shallow
  4194. ) {
  4195. var dep = new Dep();
  4196. var property = Object.getOwnPropertyDescriptor(obj, key);
  4197. if (property && property.configurable === false) {
  4198. return
  4199. }
  4200. // cater for pre-defined getter/setters
  4201. var getter = property && property.get;
  4202. var setter = property && property.set;
  4203. if ((!getter || setter) && arguments.length === 2) {
  4204. val = obj[key];
  4205. }
  4206. var childOb = !shallow && observe(val);
  4207. Object.defineProperty(obj, key, {
  4208. enumerable: true,
  4209. configurable: true,
  4210. get: function reactiveGetter () {
  4211. var value = getter ? getter.call(obj) : val;
  4212. if (Dep.SharedObject.target) { // fixed by xxxxxx
  4213. dep.depend();
  4214. if (childOb) {
  4215. childOb.dep.depend();
  4216. if (Array.isArray(value)) {
  4217. dependArray(value);
  4218. }
  4219. }
  4220. }
  4221. return value
  4222. },
  4223. set: function reactiveSetter (newVal) {
  4224. var value = getter ? getter.call(obj) : val;
  4225. /* eslint-disable no-self-compare */
  4226. if (newVal === value || (newVal !== newVal && value !== value)) {
  4227. return
  4228. }
  4229. /* eslint-enable no-self-compare */
  4230. if ( true && customSetter) {
  4231. customSetter();
  4232. }
  4233. // #7981: for accessor properties without setter
  4234. if (getter && !setter) { return }
  4235. if (setter) {
  4236. setter.call(obj, newVal);
  4237. } else {
  4238. val = newVal;
  4239. }
  4240. childOb = !shallow && observe(newVal);
  4241. dep.notify();
  4242. }
  4243. });
  4244. }
  4245. /**
  4246. * Set a property on an object. Adds the new property and
  4247. * triggers change notification if the property doesn't
  4248. * already exist.
  4249. */
  4250. function set (target, key, val) {
  4251. if ( true &&
  4252. (isUndef(target) || isPrimitive(target))
  4253. ) {
  4254. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  4255. }
  4256. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4257. target.length = Math.max(target.length, key);
  4258. target.splice(key, 1, val);
  4259. return val
  4260. }
  4261. if (key in target && !(key in Object.prototype)) {
  4262. target[key] = val;
  4263. return val
  4264. }
  4265. var ob = (target).__ob__;
  4266. if (target._isVue || (ob && ob.vmCount)) {
  4267. true && warn(
  4268. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  4269. 'at runtime - declare it upfront in the data option.'
  4270. );
  4271. return val
  4272. }
  4273. if (!ob) {
  4274. target[key] = val;
  4275. return val
  4276. }
  4277. defineReactive$$1(ob.value, key, val);
  4278. ob.dep.notify();
  4279. return val
  4280. }
  4281. /**
  4282. * Delete a property and trigger change if necessary.
  4283. */
  4284. function del (target, key) {
  4285. if ( true &&
  4286. (isUndef(target) || isPrimitive(target))
  4287. ) {
  4288. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  4289. }
  4290. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4291. target.splice(key, 1);
  4292. return
  4293. }
  4294. var ob = (target).__ob__;
  4295. if (target._isVue || (ob && ob.vmCount)) {
  4296. true && warn(
  4297. 'Avoid deleting properties on a Vue instance or its root $data ' +
  4298. '- just set it to null.'
  4299. );
  4300. return
  4301. }
  4302. if (!hasOwn(target, key)) {
  4303. return
  4304. }
  4305. delete target[key];
  4306. if (!ob) {
  4307. return
  4308. }
  4309. ob.dep.notify();
  4310. }
  4311. /**
  4312. * Collect dependencies on array elements when the array is touched, since
  4313. * we cannot intercept array element access like property getters.
  4314. */
  4315. function dependArray (value) {
  4316. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  4317. e = value[i];
  4318. e && e.__ob__ && e.__ob__.dep.depend();
  4319. if (Array.isArray(e)) {
  4320. dependArray(e);
  4321. }
  4322. }
  4323. }
  4324. /* */
  4325. /**
  4326. * Option overwriting strategies are functions that handle
  4327. * how to merge a parent option value and a child option
  4328. * value into the final value.
  4329. */
  4330. var strats = config.optionMergeStrategies;
  4331. /**
  4332. * Options with restrictions
  4333. */
  4334. if (true) {
  4335. strats.el = strats.propsData = function (parent, child, vm, key) {
  4336. if (!vm) {
  4337. warn(
  4338. "option \"" + key + "\" can only be used during instance " +
  4339. 'creation with the `new` keyword.'
  4340. );
  4341. }
  4342. return defaultStrat(parent, child)
  4343. };
  4344. }
  4345. /**
  4346. * Helper that recursively merges two data objects together.
  4347. */
  4348. function mergeData (to, from) {
  4349. if (!from) { return to }
  4350. var key, toVal, fromVal;
  4351. var keys = hasSymbol
  4352. ? Reflect.ownKeys(from)
  4353. : Object.keys(from);
  4354. for (var i = 0; i < keys.length; i++) {
  4355. key = keys[i];
  4356. // in case the object is already observed...
  4357. if (key === '__ob__') { continue }
  4358. toVal = to[key];
  4359. fromVal = from[key];
  4360. if (!hasOwn(to, key)) {
  4361. set(to, key, fromVal);
  4362. } else if (
  4363. toVal !== fromVal &&
  4364. isPlainObject(toVal) &&
  4365. isPlainObject(fromVal)
  4366. ) {
  4367. mergeData(toVal, fromVal);
  4368. }
  4369. }
  4370. return to
  4371. }
  4372. /**
  4373. * Data
  4374. */
  4375. function mergeDataOrFn (
  4376. parentVal,
  4377. childVal,
  4378. vm
  4379. ) {
  4380. if (!vm) {
  4381. // in a Vue.extend merge, both should be functions
  4382. if (!childVal) {
  4383. return parentVal
  4384. }
  4385. if (!parentVal) {
  4386. return childVal
  4387. }
  4388. // when parentVal & childVal are both present,
  4389. // we need to return a function that returns the
  4390. // merged result of both functions... no need to
  4391. // check if parentVal is a function here because
  4392. // it has to be a function to pass previous merges.
  4393. return function mergedDataFn () {
  4394. return mergeData(
  4395. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  4396. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  4397. )
  4398. }
  4399. } else {
  4400. return function mergedInstanceDataFn () {
  4401. // instance merge
  4402. var instanceData = typeof childVal === 'function'
  4403. ? childVal.call(vm, vm)
  4404. : childVal;
  4405. var defaultData = typeof parentVal === 'function'
  4406. ? parentVal.call(vm, vm)
  4407. : parentVal;
  4408. if (instanceData) {
  4409. return mergeData(instanceData, defaultData)
  4410. } else {
  4411. return defaultData
  4412. }
  4413. }
  4414. }
  4415. }
  4416. strats.data = function (
  4417. parentVal,
  4418. childVal,
  4419. vm
  4420. ) {
  4421. if (!vm) {
  4422. if (childVal && typeof childVal !== 'function') {
  4423. true && warn(
  4424. 'The "data" option should be a function ' +
  4425. 'that returns a per-instance value in component ' +
  4426. 'definitions.',
  4427. vm
  4428. );
  4429. return parentVal
  4430. }
  4431. return mergeDataOrFn(parentVal, childVal)
  4432. }
  4433. return mergeDataOrFn(parentVal, childVal, vm)
  4434. };
  4435. /**
  4436. * Hooks and props are merged as arrays.
  4437. */
  4438. function mergeHook (
  4439. parentVal,
  4440. childVal
  4441. ) {
  4442. var res = childVal
  4443. ? parentVal
  4444. ? parentVal.concat(childVal)
  4445. : Array.isArray(childVal)
  4446. ? childVal
  4447. : [childVal]
  4448. : parentVal;
  4449. return res
  4450. ? dedupeHooks(res)
  4451. : res
  4452. }
  4453. function dedupeHooks (hooks) {
  4454. var res = [];
  4455. for (var i = 0; i < hooks.length; i++) {
  4456. if (res.indexOf(hooks[i]) === -1) {
  4457. res.push(hooks[i]);
  4458. }
  4459. }
  4460. return res
  4461. }
  4462. LIFECYCLE_HOOKS.forEach(function (hook) {
  4463. strats[hook] = mergeHook;
  4464. });
  4465. /**
  4466. * Assets
  4467. *
  4468. * When a vm is present (instance creation), we need to do
  4469. * a three-way merge between constructor options, instance
  4470. * options and parent options.
  4471. */
  4472. function mergeAssets (
  4473. parentVal,
  4474. childVal,
  4475. vm,
  4476. key
  4477. ) {
  4478. var res = Object.create(parentVal || null);
  4479. if (childVal) {
  4480. true && assertObjectType(key, childVal, vm);
  4481. return extend(res, childVal)
  4482. } else {
  4483. return res
  4484. }
  4485. }
  4486. ASSET_TYPES.forEach(function (type) {
  4487. strats[type + 's'] = mergeAssets;
  4488. });
  4489. /**
  4490. * Watchers.
  4491. *
  4492. * Watchers hashes should not overwrite one
  4493. * another, so we merge them as arrays.
  4494. */
  4495. strats.watch = function (
  4496. parentVal,
  4497. childVal,
  4498. vm,
  4499. key
  4500. ) {
  4501. // work around Firefox's Object.prototype.watch...
  4502. if (parentVal === nativeWatch) { parentVal = undefined; }
  4503. if (childVal === nativeWatch) { childVal = undefined; }
  4504. /* istanbul ignore if */
  4505. if (!childVal) { return Object.create(parentVal || null) }
  4506. if (true) {
  4507. assertObjectType(key, childVal, vm);
  4508. }
  4509. if (!parentVal) { return childVal }
  4510. var ret = {};
  4511. extend(ret, parentVal);
  4512. for (var key$1 in childVal) {
  4513. var parent = ret[key$1];
  4514. var child = childVal[key$1];
  4515. if (parent && !Array.isArray(parent)) {
  4516. parent = [parent];
  4517. }
  4518. ret[key$1] = parent
  4519. ? parent.concat(child)
  4520. : Array.isArray(child) ? child : [child];
  4521. }
  4522. return ret
  4523. };
  4524. /**
  4525. * Other object hashes.
  4526. */
  4527. strats.props =
  4528. strats.methods =
  4529. strats.inject =
  4530. strats.computed = function (
  4531. parentVal,
  4532. childVal,
  4533. vm,
  4534. key
  4535. ) {
  4536. if (childVal && "development" !== 'production') {
  4537. assertObjectType(key, childVal, vm);
  4538. }
  4539. if (!parentVal) { return childVal }
  4540. var ret = Object.create(null);
  4541. extend(ret, parentVal);
  4542. if (childVal) { extend(ret, childVal); }
  4543. return ret
  4544. };
  4545. strats.provide = mergeDataOrFn;
  4546. /**
  4547. * Default strategy.
  4548. */
  4549. var defaultStrat = function (parentVal, childVal) {
  4550. return childVal === undefined
  4551. ? parentVal
  4552. : childVal
  4553. };
  4554. /**
  4555. * Validate component names
  4556. */
  4557. function checkComponents (options) {
  4558. for (var key in options.components) {
  4559. validateComponentName(key);
  4560. }
  4561. }
  4562. function validateComponentName (name) {
  4563. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  4564. warn(
  4565. 'Invalid component name: "' + name + '". Component names ' +
  4566. 'should conform to valid custom element name in html5 specification.'
  4567. );
  4568. }
  4569. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  4570. warn(
  4571. 'Do not use built-in or reserved HTML elements as component ' +
  4572. 'id: ' + name
  4573. );
  4574. }
  4575. }
  4576. /**
  4577. * Ensure all props option syntax are normalized into the
  4578. * Object-based format.
  4579. */
  4580. function normalizeProps (options, vm) {
  4581. var props = options.props;
  4582. if (!props) { return }
  4583. var res = {};
  4584. var i, val, name;
  4585. if (Array.isArray(props)) {
  4586. i = props.length;
  4587. while (i--) {
  4588. val = props[i];
  4589. if (typeof val === 'string') {
  4590. name = camelize(val);
  4591. res[name] = { type: null };
  4592. } else if (true) {
  4593. warn('props must be strings when using array syntax.');
  4594. }
  4595. }
  4596. } else if (isPlainObject(props)) {
  4597. for (var key in props) {
  4598. val = props[key];
  4599. name = camelize(key);
  4600. res[name] = isPlainObject(val)
  4601. ? val
  4602. : { type: val };
  4603. }
  4604. } else if (true) {
  4605. warn(
  4606. "Invalid value for option \"props\": expected an Array or an Object, " +
  4607. "but got " + (toRawType(props)) + ".",
  4608. vm
  4609. );
  4610. }
  4611. options.props = res;
  4612. }
  4613. /**
  4614. * Normalize all injections into Object-based format
  4615. */
  4616. function normalizeInject (options, vm) {
  4617. var inject = options.inject;
  4618. if (!inject) { return }
  4619. var normalized = options.inject = {};
  4620. if (Array.isArray(inject)) {
  4621. for (var i = 0; i < inject.length; i++) {
  4622. normalized[inject[i]] = { from: inject[i] };
  4623. }
  4624. } else if (isPlainObject(inject)) {
  4625. for (var key in inject) {
  4626. var val = inject[key];
  4627. normalized[key] = isPlainObject(val)
  4628. ? extend({ from: key }, val)
  4629. : { from: val };
  4630. }
  4631. } else if (true) {
  4632. warn(
  4633. "Invalid value for option \"inject\": expected an Array or an Object, " +
  4634. "but got " + (toRawType(inject)) + ".",
  4635. vm
  4636. );
  4637. }
  4638. }
  4639. /**
  4640. * Normalize raw function directives into object format.
  4641. */
  4642. function normalizeDirectives (options) {
  4643. var dirs = options.directives;
  4644. if (dirs) {
  4645. for (var key in dirs) {
  4646. var def$$1 = dirs[key];
  4647. if (typeof def$$1 === 'function') {
  4648. dirs[key] = { bind: def$$1, update: def$$1 };
  4649. }
  4650. }
  4651. }
  4652. }
  4653. function assertObjectType (name, value, vm) {
  4654. if (!isPlainObject(value)) {
  4655. warn(
  4656. "Invalid value for option \"" + name + "\": expected an Object, " +
  4657. "but got " + (toRawType(value)) + ".",
  4658. vm
  4659. );
  4660. }
  4661. }
  4662. /**
  4663. * Merge two option objects into a new one.
  4664. * Core utility used in both instantiation and inheritance.
  4665. */
  4666. function mergeOptions (
  4667. parent,
  4668. child,
  4669. vm
  4670. ) {
  4671. if (true) {
  4672. checkComponents(child);
  4673. }
  4674. if (typeof child === 'function') {
  4675. child = child.options;
  4676. }
  4677. normalizeProps(child, vm);
  4678. normalizeInject(child, vm);
  4679. normalizeDirectives(child);
  4680. // Apply extends and mixins on the child options,
  4681. // but only if it is a raw options object that isn't
  4682. // the result of another mergeOptions call.
  4683. // Only merged options has the _base property.
  4684. if (!child._base) {
  4685. if (child.extends) {
  4686. parent = mergeOptions(parent, child.extends, vm);
  4687. }
  4688. if (child.mixins) {
  4689. for (var i = 0, l = child.mixins.length; i < l; i++) {
  4690. parent = mergeOptions(parent, child.mixins[i], vm);
  4691. }
  4692. }
  4693. }
  4694. var options = {};
  4695. var key;
  4696. for (key in parent) {
  4697. mergeField(key);
  4698. }
  4699. for (key in child) {
  4700. if (!hasOwn(parent, key)) {
  4701. mergeField(key);
  4702. }
  4703. }
  4704. function mergeField (key) {
  4705. var strat = strats[key] || defaultStrat;
  4706. options[key] = strat(parent[key], child[key], vm, key);
  4707. }
  4708. return options
  4709. }
  4710. /**
  4711. * Resolve an asset.
  4712. * This function is used because child instances need access
  4713. * to assets defined in its ancestor chain.
  4714. */
  4715. function resolveAsset (
  4716. options,
  4717. type,
  4718. id,
  4719. warnMissing
  4720. ) {
  4721. /* istanbul ignore if */
  4722. if (typeof id !== 'string') {
  4723. return
  4724. }
  4725. var assets = options[type];
  4726. // check local registration variations first
  4727. if (hasOwn(assets, id)) { return assets[id] }
  4728. var camelizedId = camelize(id);
  4729. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  4730. var PascalCaseId = capitalize(camelizedId);
  4731. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  4732. // fallback to prototype chain
  4733. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  4734. if ( true && warnMissing && !res) {
  4735. warn(
  4736. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  4737. options
  4738. );
  4739. }
  4740. return res
  4741. }
  4742. /* */
  4743. function validateProp (
  4744. key,
  4745. propOptions,
  4746. propsData,
  4747. vm
  4748. ) {
  4749. var prop = propOptions[key];
  4750. var absent = !hasOwn(propsData, key);
  4751. var value = propsData[key];
  4752. // boolean casting
  4753. var booleanIndex = getTypeIndex(Boolean, prop.type);
  4754. if (booleanIndex > -1) {
  4755. if (absent && !hasOwn(prop, 'default')) {
  4756. value = false;
  4757. } else if (value === '' || value === hyphenate(key)) {
  4758. // only cast empty string / same name to boolean if
  4759. // boolean has higher priority
  4760. var stringIndex = getTypeIndex(String, prop.type);
  4761. if (stringIndex < 0 || booleanIndex < stringIndex) {
  4762. value = true;
  4763. }
  4764. }
  4765. }
  4766. // check default value
  4767. if (value === undefined) {
  4768. value = getPropDefaultValue(vm, prop, key);
  4769. // since the default value is a fresh copy,
  4770. // make sure to observe it.
  4771. var prevShouldObserve = shouldObserve;
  4772. toggleObserving(true);
  4773. observe(value);
  4774. toggleObserving(prevShouldObserve);
  4775. }
  4776. if (
  4777. true
  4778. ) {
  4779. assertProp(prop, key, value, vm, absent);
  4780. }
  4781. return value
  4782. }
  4783. /**
  4784. * Get the default value of a prop.
  4785. */
  4786. function getPropDefaultValue (vm, prop, key) {
  4787. // no default, return undefined
  4788. if (!hasOwn(prop, 'default')) {
  4789. return undefined
  4790. }
  4791. var def = prop.default;
  4792. // warn against non-factory defaults for Object & Array
  4793. if ( true && isObject(def)) {
  4794. warn(
  4795. 'Invalid default value for prop "' + key + '": ' +
  4796. 'Props with type Object/Array must use a factory function ' +
  4797. 'to return the default value.',
  4798. vm
  4799. );
  4800. }
  4801. // the raw prop value was also undefined from previous render,
  4802. // return previous default value to avoid unnecessary watcher trigger
  4803. if (vm && vm.$options.propsData &&
  4804. vm.$options.propsData[key] === undefined &&
  4805. vm._props[key] !== undefined
  4806. ) {
  4807. return vm._props[key]
  4808. }
  4809. // call factory function for non-Function types
  4810. // a value is Function if its prototype is function even across different execution context
  4811. return typeof def === 'function' && getType(prop.type) !== 'Function'
  4812. ? def.call(vm)
  4813. : def
  4814. }
  4815. /**
  4816. * Assert whether a prop is valid.
  4817. */
  4818. function assertProp (
  4819. prop,
  4820. name,
  4821. value,
  4822. vm,
  4823. absent
  4824. ) {
  4825. if (prop.required && absent) {
  4826. warn(
  4827. 'Missing required prop: "' + name + '"',
  4828. vm
  4829. );
  4830. return
  4831. }
  4832. if (value == null && !prop.required) {
  4833. return
  4834. }
  4835. var type = prop.type;
  4836. var valid = !type || type === true;
  4837. var expectedTypes = [];
  4838. if (type) {
  4839. if (!Array.isArray(type)) {
  4840. type = [type];
  4841. }
  4842. for (var i = 0; i < type.length && !valid; i++) {
  4843. var assertedType = assertType(value, type[i]);
  4844. expectedTypes.push(assertedType.expectedType || '');
  4845. valid = assertedType.valid;
  4846. }
  4847. }
  4848. if (!valid) {
  4849. warn(
  4850. getInvalidTypeMessage(name, value, expectedTypes),
  4851. vm
  4852. );
  4853. return
  4854. }
  4855. var validator = prop.validator;
  4856. if (validator) {
  4857. if (!validator(value)) {
  4858. warn(
  4859. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  4860. vm
  4861. );
  4862. }
  4863. }
  4864. }
  4865. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  4866. function assertType (value, type) {
  4867. var valid;
  4868. var expectedType = getType(type);
  4869. if (simpleCheckRE.test(expectedType)) {
  4870. var t = typeof value;
  4871. valid = t === expectedType.toLowerCase();
  4872. // for primitive wrapper objects
  4873. if (!valid && t === 'object') {
  4874. valid = value instanceof type;
  4875. }
  4876. } else if (expectedType === 'Object') {
  4877. valid = isPlainObject(value);
  4878. } else if (expectedType === 'Array') {
  4879. valid = Array.isArray(value);
  4880. } else {
  4881. valid = value instanceof type;
  4882. }
  4883. return {
  4884. valid: valid,
  4885. expectedType: expectedType
  4886. }
  4887. }
  4888. /**
  4889. * Use function string name to check built-in types,
  4890. * because a simple equality check will fail when running
  4891. * across different vms / iframes.
  4892. */
  4893. function getType (fn) {
  4894. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  4895. return match ? match[1] : ''
  4896. }
  4897. function isSameType (a, b) {
  4898. return getType(a) === getType(b)
  4899. }
  4900. function getTypeIndex (type, expectedTypes) {
  4901. if (!Array.isArray(expectedTypes)) {
  4902. return isSameType(expectedTypes, type) ? 0 : -1
  4903. }
  4904. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  4905. if (isSameType(expectedTypes[i], type)) {
  4906. return i
  4907. }
  4908. }
  4909. return -1
  4910. }
  4911. function getInvalidTypeMessage (name, value, expectedTypes) {
  4912. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  4913. " Expected " + (expectedTypes.map(capitalize).join(', '));
  4914. var expectedType = expectedTypes[0];
  4915. var receivedType = toRawType(value);
  4916. var expectedValue = styleValue(value, expectedType);
  4917. var receivedValue = styleValue(value, receivedType);
  4918. // check if we need to specify expected value
  4919. if (expectedTypes.length === 1 &&
  4920. isExplicable(expectedType) &&
  4921. !isBoolean(expectedType, receivedType)) {
  4922. message += " with value " + expectedValue;
  4923. }
  4924. message += ", got " + receivedType + " ";
  4925. // check if we need to specify received value
  4926. if (isExplicable(receivedType)) {
  4927. message += "with value " + receivedValue + ".";
  4928. }
  4929. return message
  4930. }
  4931. function styleValue (value, type) {
  4932. if (type === 'String') {
  4933. return ("\"" + value + "\"")
  4934. } else if (type === 'Number') {
  4935. return ("" + (Number(value)))
  4936. } else {
  4937. return ("" + value)
  4938. }
  4939. }
  4940. function isExplicable (value) {
  4941. var explicitTypes = ['string', 'number', 'boolean'];
  4942. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  4943. }
  4944. function isBoolean () {
  4945. var args = [], len = arguments.length;
  4946. while ( len-- ) args[ len ] = arguments[ len ];
  4947. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  4948. }
  4949. /* */
  4950. function handleError (err, vm, info) {
  4951. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  4952. // See: https://github.com/vuejs/vuex/issues/1505
  4953. pushTarget();
  4954. try {
  4955. if (vm) {
  4956. var cur = vm;
  4957. while ((cur = cur.$parent)) {
  4958. var hooks = cur.$options.errorCaptured;
  4959. if (hooks) {
  4960. for (var i = 0; i < hooks.length; i++) {
  4961. try {
  4962. var capture = hooks[i].call(cur, err, vm, info) === false;
  4963. if (capture) { return }
  4964. } catch (e) {
  4965. globalHandleError(e, cur, 'errorCaptured hook');
  4966. }
  4967. }
  4968. }
  4969. }
  4970. }
  4971. globalHandleError(err, vm, info);
  4972. } finally {
  4973. popTarget();
  4974. }
  4975. }
  4976. function invokeWithErrorHandling (
  4977. handler,
  4978. context,
  4979. args,
  4980. vm,
  4981. info
  4982. ) {
  4983. var res;
  4984. try {
  4985. res = args ? handler.apply(context, args) : handler.call(context);
  4986. if (res && !res._isVue && isPromise(res) && !res._handled) {
  4987. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  4988. // issue #9511
  4989. // avoid catch triggering multiple times when nested calls
  4990. res._handled = true;
  4991. }
  4992. } catch (e) {
  4993. handleError(e, vm, info);
  4994. }
  4995. return res
  4996. }
  4997. function globalHandleError (err, vm, info) {
  4998. if (config.errorHandler) {
  4999. try {
  5000. return config.errorHandler.call(null, err, vm, info)
  5001. } catch (e) {
  5002. // if the user intentionally throws the original error in the handler,
  5003. // do not log it twice
  5004. if (e !== err) {
  5005. logError(e, null, 'config.errorHandler');
  5006. }
  5007. }
  5008. }
  5009. logError(err, vm, info);
  5010. }
  5011. function logError (err, vm, info) {
  5012. if (true) {
  5013. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  5014. }
  5015. /* istanbul ignore else */
  5016. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  5017. console.error(err);
  5018. } else {
  5019. throw err
  5020. }
  5021. }
  5022. /* */
  5023. var callbacks = [];
  5024. var pending = false;
  5025. function flushCallbacks () {
  5026. pending = false;
  5027. var copies = callbacks.slice(0);
  5028. callbacks.length = 0;
  5029. for (var i = 0; i < copies.length; i++) {
  5030. copies[i]();
  5031. }
  5032. }
  5033. // Here we have async deferring wrappers using microtasks.
  5034. // In 2.5 we used (macro) tasks (in combination with microtasks).
  5035. // However, it has subtle problems when state is changed right before repaint
  5036. // (e.g. #6813, out-in transitions).
  5037. // Also, using (macro) tasks in event handler would cause some weird behaviors
  5038. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  5039. // So we now use microtasks everywhere, again.
  5040. // A major drawback of this tradeoff is that there are some scenarios
  5041. // where microtasks have too high a priority and fire in between supposedly
  5042. // sequential events (e.g. #4521, #6690, which have workarounds)
  5043. // or even between bubbling of the same event (#6566).
  5044. var timerFunc;
  5045. // The nextTick behavior leverages the microtask queue, which can be accessed
  5046. // via either native Promise.then or MutationObserver.
  5047. // MutationObserver has wider support, however it is seriously bugged in
  5048. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  5049. // completely stops working after triggering a few times... so, if native
  5050. // Promise is available, we will use it:
  5051. /* istanbul ignore next, $flow-disable-line */
  5052. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  5053. var p = Promise.resolve();
  5054. timerFunc = function () {
  5055. p.then(flushCallbacks);
  5056. // In problematic UIWebViews, Promise.then doesn't completely break, but
  5057. // it can get stuck in a weird state where callbacks are pushed into the
  5058. // microtask queue but the queue isn't being flushed, until the browser
  5059. // needs to do some other work, e.g. handle a timer. Therefore we can
  5060. // "force" the microtask queue to be flushed by adding an empty timer.
  5061. if (isIOS) { setTimeout(noop); }
  5062. };
  5063. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  5064. isNative(MutationObserver) ||
  5065. // PhantomJS and iOS 7.x
  5066. MutationObserver.toString() === '[object MutationObserverConstructor]'
  5067. )) {
  5068. // Use MutationObserver where native Promise is not available,
  5069. // e.g. PhantomJS, iOS7, Android 4.4
  5070. // (#6466 MutationObserver is unreliable in IE11)
  5071. var counter = 1;
  5072. var observer = new MutationObserver(flushCallbacks);
  5073. var textNode = document.createTextNode(String(counter));
  5074. observer.observe(textNode, {
  5075. characterData: true
  5076. });
  5077. timerFunc = function () {
  5078. counter = (counter + 1) % 2;
  5079. textNode.data = String(counter);
  5080. };
  5081. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  5082. // Fallback to setImmediate.
  5083. // Technically it leverages the (macro) task queue,
  5084. // but it is still a better choice than setTimeout.
  5085. timerFunc = function () {
  5086. setImmediate(flushCallbacks);
  5087. };
  5088. } else {
  5089. // Fallback to setTimeout.
  5090. timerFunc = function () {
  5091. setTimeout(flushCallbacks, 0);
  5092. };
  5093. }
  5094. function nextTick (cb, ctx) {
  5095. var _resolve;
  5096. callbacks.push(function () {
  5097. if (cb) {
  5098. try {
  5099. cb.call(ctx);
  5100. } catch (e) {
  5101. handleError(e, ctx, 'nextTick');
  5102. }
  5103. } else if (_resolve) {
  5104. _resolve(ctx);
  5105. }
  5106. });
  5107. if (!pending) {
  5108. pending = true;
  5109. timerFunc();
  5110. }
  5111. // $flow-disable-line
  5112. if (!cb && typeof Promise !== 'undefined') {
  5113. return new Promise(function (resolve) {
  5114. _resolve = resolve;
  5115. })
  5116. }
  5117. }
  5118. /* */
  5119. /* not type checking this file because flow doesn't play well with Proxy */
  5120. var initProxy;
  5121. if (true) {
  5122. var allowedGlobals = makeMap(
  5123. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  5124. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  5125. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  5126. 'require' // for Webpack/Browserify
  5127. );
  5128. var warnNonPresent = function (target, key) {
  5129. warn(
  5130. "Property or method \"" + key + "\" is not defined on the instance but " +
  5131. 'referenced during render. Make sure that this property is reactive, ' +
  5132. 'either in the data option, or for class-based components, by ' +
  5133. 'initializing the property. ' +
  5134. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  5135. target
  5136. );
  5137. };
  5138. var warnReservedPrefix = function (target, key) {
  5139. warn(
  5140. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  5141. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  5142. 'prevent conflicts with Vue internals. ' +
  5143. 'See: https://vuejs.org/v2/api/#data',
  5144. target
  5145. );
  5146. };
  5147. var hasProxy =
  5148. typeof Proxy !== 'undefined' && isNative(Proxy);
  5149. if (hasProxy) {
  5150. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  5151. config.keyCodes = new Proxy(config.keyCodes, {
  5152. set: function set (target, key, value) {
  5153. if (isBuiltInModifier(key)) {
  5154. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  5155. return false
  5156. } else {
  5157. target[key] = value;
  5158. return true
  5159. }
  5160. }
  5161. });
  5162. }
  5163. var hasHandler = {
  5164. has: function has (target, key) {
  5165. var has = key in target;
  5166. var isAllowed = allowedGlobals(key) ||
  5167. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  5168. if (!has && !isAllowed) {
  5169. if (key in target.$data) { warnReservedPrefix(target, key); }
  5170. else { warnNonPresent(target, key); }
  5171. }
  5172. return has || !isAllowed
  5173. }
  5174. };
  5175. var getHandler = {
  5176. get: function get (target, key) {
  5177. if (typeof key === 'string' && !(key in target)) {
  5178. if (key in target.$data) { warnReservedPrefix(target, key); }
  5179. else { warnNonPresent(target, key); }
  5180. }
  5181. return target[key]
  5182. }
  5183. };
  5184. initProxy = function initProxy (vm) {
  5185. if (hasProxy) {
  5186. // determine which proxy handler to use
  5187. var options = vm.$options;
  5188. var handlers = options.render && options.render._withStripped
  5189. ? getHandler
  5190. : hasHandler;
  5191. vm._renderProxy = new Proxy(vm, handlers);
  5192. } else {
  5193. vm._renderProxy = vm;
  5194. }
  5195. };
  5196. }
  5197. /* */
  5198. var seenObjects = new _Set();
  5199. /**
  5200. * Recursively traverse an object to evoke all converted
  5201. * getters, so that every nested property inside the object
  5202. * is collected as a "deep" dependency.
  5203. */
  5204. function traverse (val) {
  5205. _traverse(val, seenObjects);
  5206. seenObjects.clear();
  5207. }
  5208. function _traverse (val, seen) {
  5209. var i, keys;
  5210. var isA = Array.isArray(val);
  5211. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  5212. return
  5213. }
  5214. if (val.__ob__) {
  5215. var depId = val.__ob__.dep.id;
  5216. if (seen.has(depId)) {
  5217. return
  5218. }
  5219. seen.add(depId);
  5220. }
  5221. if (isA) {
  5222. i = val.length;
  5223. while (i--) { _traverse(val[i], seen); }
  5224. } else {
  5225. keys = Object.keys(val);
  5226. i = keys.length;
  5227. while (i--) { _traverse(val[keys[i]], seen); }
  5228. }
  5229. }
  5230. var mark;
  5231. var measure;
  5232. if (true) {
  5233. var perf = inBrowser && window.performance;
  5234. /* istanbul ignore if */
  5235. if (
  5236. perf &&
  5237. perf.mark &&
  5238. perf.measure &&
  5239. perf.clearMarks &&
  5240. perf.clearMeasures
  5241. ) {
  5242. mark = function (tag) { return perf.mark(tag); };
  5243. measure = function (name, startTag, endTag) {
  5244. perf.measure(name, startTag, endTag);
  5245. perf.clearMarks(startTag);
  5246. perf.clearMarks(endTag);
  5247. // perf.clearMeasures(name)
  5248. };
  5249. }
  5250. }
  5251. /* */
  5252. var normalizeEvent = cached(function (name) {
  5253. var passive = name.charAt(0) === '&';
  5254. name = passive ? name.slice(1) : name;
  5255. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  5256. name = once$$1 ? name.slice(1) : name;
  5257. var capture = name.charAt(0) === '!';
  5258. name = capture ? name.slice(1) : name;
  5259. return {
  5260. name: name,
  5261. once: once$$1,
  5262. capture: capture,
  5263. passive: passive
  5264. }
  5265. });
  5266. function createFnInvoker (fns, vm) {
  5267. function invoker () {
  5268. var arguments$1 = arguments;
  5269. var fns = invoker.fns;
  5270. if (Array.isArray(fns)) {
  5271. var cloned = fns.slice();
  5272. for (var i = 0; i < cloned.length; i++) {
  5273. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  5274. }
  5275. } else {
  5276. // return handler return value for single handlers
  5277. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  5278. }
  5279. }
  5280. invoker.fns = fns;
  5281. return invoker
  5282. }
  5283. function updateListeners (
  5284. on,
  5285. oldOn,
  5286. add,
  5287. remove$$1,
  5288. createOnceHandler,
  5289. vm
  5290. ) {
  5291. var name, def$$1, cur, old, event;
  5292. for (name in on) {
  5293. def$$1 = cur = on[name];
  5294. old = oldOn[name];
  5295. event = normalizeEvent(name);
  5296. if (isUndef(cur)) {
  5297. true && warn(
  5298. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  5299. vm
  5300. );
  5301. } else if (isUndef(old)) {
  5302. if (isUndef(cur.fns)) {
  5303. cur = on[name] = createFnInvoker(cur, vm);
  5304. }
  5305. if (isTrue(event.once)) {
  5306. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  5307. }
  5308. add(event.name, cur, event.capture, event.passive, event.params);
  5309. } else if (cur !== old) {
  5310. old.fns = cur;
  5311. on[name] = old;
  5312. }
  5313. }
  5314. for (name in oldOn) {
  5315. if (isUndef(on[name])) {
  5316. event = normalizeEvent(name);
  5317. remove$$1(event.name, oldOn[name], event.capture);
  5318. }
  5319. }
  5320. }
  5321. /* */
  5322. /* */
  5323. // fixed by xxxxxx (mp properties)
  5324. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  5325. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  5326. if (isUndef(propOptions)) {
  5327. return res
  5328. }
  5329. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  5330. var attrs = data.attrs;
  5331. var props = data.props;
  5332. if (isDef(attrs) || isDef(props)) {
  5333. for (var key in propOptions) {
  5334. var altKey = hyphenate(key);
  5335. var result = checkProp(res, props, key, altKey, true) ||
  5336. checkProp(res, attrs, key, altKey, false);
  5337. // externalClass
  5338. if (
  5339. result &&
  5340. res[key] &&
  5341. externalClasses.indexOf(altKey) !== -1 &&
  5342. context[camelize(res[key])]
  5343. ) {
  5344. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  5345. res[key] = context[camelize(res[key])];
  5346. }
  5347. }
  5348. }
  5349. return res
  5350. }
  5351. function extractPropsFromVNodeData (
  5352. data,
  5353. Ctor,
  5354. tag,
  5355. context// fixed by xxxxxx
  5356. ) {
  5357. // we are only extracting raw values here.
  5358. // validation and default values are handled in the child
  5359. // component itself.
  5360. var propOptions = Ctor.options.props;
  5361. if (isUndef(propOptions)) {
  5362. // fixed by xxxxxx
  5363. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  5364. }
  5365. var res = {};
  5366. var attrs = data.attrs;
  5367. var props = data.props;
  5368. if (isDef(attrs) || isDef(props)) {
  5369. for (var key in propOptions) {
  5370. var altKey = hyphenate(key);
  5371. if (true) {
  5372. var keyInLowerCase = key.toLowerCase();
  5373. if (
  5374. key !== keyInLowerCase &&
  5375. attrs && hasOwn(attrs, keyInLowerCase)
  5376. ) {
  5377. tip(
  5378. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  5379. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  5380. " \"" + key + "\". " +
  5381. "Note that HTML attributes are case-insensitive and camelCased " +
  5382. "props need to use their kebab-case equivalents when using in-DOM " +
  5383. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  5384. );
  5385. }
  5386. }
  5387. checkProp(res, props, key, altKey, true) ||
  5388. checkProp(res, attrs, key, altKey, false);
  5389. }
  5390. }
  5391. // fixed by xxxxxx
  5392. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  5393. }
  5394. function checkProp (
  5395. res,
  5396. hash,
  5397. key,
  5398. altKey,
  5399. preserve
  5400. ) {
  5401. if (isDef(hash)) {
  5402. if (hasOwn(hash, key)) {
  5403. res[key] = hash[key];
  5404. if (!preserve) {
  5405. delete hash[key];
  5406. }
  5407. return true
  5408. } else if (hasOwn(hash, altKey)) {
  5409. res[key] = hash[altKey];
  5410. if (!preserve) {
  5411. delete hash[altKey];
  5412. }
  5413. return true
  5414. }
  5415. }
  5416. return false
  5417. }
  5418. /* */
  5419. // The template compiler attempts to minimize the need for normalization by
  5420. // statically analyzing the template at compile time.
  5421. //
  5422. // For plain HTML markup, normalization can be completely skipped because the
  5423. // generated render function is guaranteed to return Array<VNode>. There are
  5424. // two cases where extra normalization is needed:
  5425. // 1. When the children contains components - because a functional component
  5426. // may return an Array instead of a single root. In this case, just a simple
  5427. // normalization is needed - if any child is an Array, we flatten the whole
  5428. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  5429. // because functional components already normalize their own children.
  5430. function simpleNormalizeChildren (children) {
  5431. for (var i = 0; i < children.length; i++) {
  5432. if (Array.isArray(children[i])) {
  5433. return Array.prototype.concat.apply([], children)
  5434. }
  5435. }
  5436. return children
  5437. }
  5438. // 2. When the children contains constructs that always generated nested Arrays,
  5439. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  5440. // with hand-written render functions / JSX. In such cases a full normalization
  5441. // is needed to cater to all possible types of children values.
  5442. function normalizeChildren (children) {
  5443. return isPrimitive(children)
  5444. ? [createTextVNode(children)]
  5445. : Array.isArray(children)
  5446. ? normalizeArrayChildren(children)
  5447. : undefined
  5448. }
  5449. function isTextNode (node) {
  5450. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  5451. }
  5452. function normalizeArrayChildren (children, nestedIndex) {
  5453. var res = [];
  5454. var i, c, lastIndex, last;
  5455. for (i = 0; i < children.length; i++) {
  5456. c = children[i];
  5457. if (isUndef(c) || typeof c === 'boolean') { continue }
  5458. lastIndex = res.length - 1;
  5459. last = res[lastIndex];
  5460. // nested
  5461. if (Array.isArray(c)) {
  5462. if (c.length > 0) {
  5463. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  5464. // merge adjacent text nodes
  5465. if (isTextNode(c[0]) && isTextNode(last)) {
  5466. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  5467. c.shift();
  5468. }
  5469. res.push.apply(res, c);
  5470. }
  5471. } else if (isPrimitive(c)) {
  5472. if (isTextNode(last)) {
  5473. // merge adjacent text nodes
  5474. // this is necessary for SSR hydration because text nodes are
  5475. // essentially merged when rendered to HTML strings
  5476. res[lastIndex] = createTextVNode(last.text + c);
  5477. } else if (c !== '') {
  5478. // convert primitive to vnode
  5479. res.push(createTextVNode(c));
  5480. }
  5481. } else {
  5482. if (isTextNode(c) && isTextNode(last)) {
  5483. // merge adjacent text nodes
  5484. res[lastIndex] = createTextVNode(last.text + c.text);
  5485. } else {
  5486. // default key for nested array children (likely generated by v-for)
  5487. if (isTrue(children._isVList) &&
  5488. isDef(c.tag) &&
  5489. isUndef(c.key) &&
  5490. isDef(nestedIndex)) {
  5491. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  5492. }
  5493. res.push(c);
  5494. }
  5495. }
  5496. }
  5497. return res
  5498. }
  5499. /* */
  5500. function initProvide (vm) {
  5501. var provide = vm.$options.provide;
  5502. if (provide) {
  5503. vm._provided = typeof provide === 'function'
  5504. ? provide.call(vm)
  5505. : provide;
  5506. }
  5507. }
  5508. function initInjections (vm) {
  5509. var result = resolveInject(vm.$options.inject, vm);
  5510. if (result) {
  5511. toggleObserving(false);
  5512. Object.keys(result).forEach(function (key) {
  5513. /* istanbul ignore else */
  5514. if (true) {
  5515. defineReactive$$1(vm, key, result[key], function () {
  5516. warn(
  5517. "Avoid mutating an injected value directly since the changes will be " +
  5518. "overwritten whenever the provided component re-renders. " +
  5519. "injection being mutated: \"" + key + "\"",
  5520. vm
  5521. );
  5522. });
  5523. } else {}
  5524. });
  5525. toggleObserving(true);
  5526. }
  5527. }
  5528. function resolveInject (inject, vm) {
  5529. if (inject) {
  5530. // inject is :any because flow is not smart enough to figure out cached
  5531. var result = Object.create(null);
  5532. var keys = hasSymbol
  5533. ? Reflect.ownKeys(inject)
  5534. : Object.keys(inject);
  5535. for (var i = 0; i < keys.length; i++) {
  5536. var key = keys[i];
  5537. // #6574 in case the inject object is observed...
  5538. if (key === '__ob__') { continue }
  5539. var provideKey = inject[key].from;
  5540. var source = vm;
  5541. while (source) {
  5542. if (source._provided && hasOwn(source._provided, provideKey)) {
  5543. result[key] = source._provided[provideKey];
  5544. break
  5545. }
  5546. source = source.$parent;
  5547. }
  5548. if (!source) {
  5549. if ('default' in inject[key]) {
  5550. var provideDefault = inject[key].default;
  5551. result[key] = typeof provideDefault === 'function'
  5552. ? provideDefault.call(vm)
  5553. : provideDefault;
  5554. } else if (true) {
  5555. warn(("Injection \"" + key + "\" not found"), vm);
  5556. }
  5557. }
  5558. }
  5559. return result
  5560. }
  5561. }
  5562. /* */
  5563. /**
  5564. * Runtime helper for resolving raw children VNodes into a slot object.
  5565. */
  5566. function resolveSlots (
  5567. children,
  5568. context
  5569. ) {
  5570. if (!children || !children.length) {
  5571. return {}
  5572. }
  5573. var slots = {};
  5574. for (var i = 0, l = children.length; i < l; i++) {
  5575. var child = children[i];
  5576. var data = child.data;
  5577. // remove slot attribute if the node is resolved as a Vue slot node
  5578. if (data && data.attrs && data.attrs.slot) {
  5579. delete data.attrs.slot;
  5580. }
  5581. // named slots should only be respected if the vnode was rendered in the
  5582. // same context.
  5583. if ((child.context === context || child.fnContext === context) &&
  5584. data && data.slot != null
  5585. ) {
  5586. var name = data.slot;
  5587. var slot = (slots[name] || (slots[name] = []));
  5588. if (child.tag === 'template') {
  5589. slot.push.apply(slot, child.children || []);
  5590. } else {
  5591. slot.push(child);
  5592. }
  5593. } else {
  5594. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  5595. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  5596. (slots['page'] || (slots['page'] = [])).push(child);
  5597. }else{
  5598. (slots.default || (slots.default = [])).push(child);
  5599. }
  5600. }
  5601. }
  5602. // ignore slots that contains only whitespace
  5603. for (var name$1 in slots) {
  5604. if (slots[name$1].every(isWhitespace)) {
  5605. delete slots[name$1];
  5606. }
  5607. }
  5608. return slots
  5609. }
  5610. function isWhitespace (node) {
  5611. return (node.isComment && !node.asyncFactory) || node.text === ' '
  5612. }
  5613. /* */
  5614. function normalizeScopedSlots (
  5615. slots,
  5616. normalSlots,
  5617. prevSlots
  5618. ) {
  5619. var res;
  5620. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  5621. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  5622. var key = slots && slots.$key;
  5623. if (!slots) {
  5624. res = {};
  5625. } else if (slots._normalized) {
  5626. // fast path 1: child component re-render only, parent did not change
  5627. return slots._normalized
  5628. } else if (
  5629. isStable &&
  5630. prevSlots &&
  5631. prevSlots !== emptyObject &&
  5632. key === prevSlots.$key &&
  5633. !hasNormalSlots &&
  5634. !prevSlots.$hasNormal
  5635. ) {
  5636. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  5637. // only need to normalize once
  5638. return prevSlots
  5639. } else {
  5640. res = {};
  5641. for (var key$1 in slots) {
  5642. if (slots[key$1] && key$1[0] !== '$') {
  5643. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  5644. }
  5645. }
  5646. }
  5647. // expose normal slots on scopedSlots
  5648. for (var key$2 in normalSlots) {
  5649. if (!(key$2 in res)) {
  5650. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  5651. }
  5652. }
  5653. // avoriaz seems to mock a non-extensible $scopedSlots object
  5654. // and when that is passed down this would cause an error
  5655. if (slots && Object.isExtensible(slots)) {
  5656. (slots)._normalized = res;
  5657. }
  5658. def(res, '$stable', isStable);
  5659. def(res, '$key', key);
  5660. def(res, '$hasNormal', hasNormalSlots);
  5661. return res
  5662. }
  5663. function normalizeScopedSlot(normalSlots, key, fn) {
  5664. var normalized = function () {
  5665. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  5666. res = res && typeof res === 'object' && !Array.isArray(res)
  5667. ? [res] // single vnode
  5668. : normalizeChildren(res);
  5669. return res && (
  5670. res.length === 0 ||
  5671. (res.length === 1 && res[0].isComment) // #9658
  5672. ) ? undefined
  5673. : res
  5674. };
  5675. // this is a slot using the new v-slot syntax without scope. although it is
  5676. // compiled as a scoped slot, render fn users would expect it to be present
  5677. // on this.$slots because the usage is semantically a normal slot.
  5678. if (fn.proxy) {
  5679. Object.defineProperty(normalSlots, key, {
  5680. get: normalized,
  5681. enumerable: true,
  5682. configurable: true
  5683. });
  5684. }
  5685. return normalized
  5686. }
  5687. function proxyNormalSlot(slots, key) {
  5688. return function () { return slots[key]; }
  5689. }
  5690. /* */
  5691. /**
  5692. * Runtime helper for rendering v-for lists.
  5693. */
  5694. function renderList (
  5695. val,
  5696. render
  5697. ) {
  5698. var ret, i, l, keys, key;
  5699. if (Array.isArray(val) || typeof val === 'string') {
  5700. ret = new Array(val.length);
  5701. for (i = 0, l = val.length; i < l; i++) {
  5702. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  5703. }
  5704. } else if (typeof val === 'number') {
  5705. ret = new Array(val);
  5706. for (i = 0; i < val; i++) {
  5707. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  5708. }
  5709. } else if (isObject(val)) {
  5710. if (hasSymbol && val[Symbol.iterator]) {
  5711. ret = [];
  5712. var iterator = val[Symbol.iterator]();
  5713. var result = iterator.next();
  5714. while (!result.done) {
  5715. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  5716. result = iterator.next();
  5717. }
  5718. } else {
  5719. keys = Object.keys(val);
  5720. ret = new Array(keys.length);
  5721. for (i = 0, l = keys.length; i < l; i++) {
  5722. key = keys[i];
  5723. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  5724. }
  5725. }
  5726. }
  5727. if (!isDef(ret)) {
  5728. ret = [];
  5729. }
  5730. (ret)._isVList = true;
  5731. return ret
  5732. }
  5733. /* */
  5734. /**
  5735. * Runtime helper for rendering <slot>
  5736. */
  5737. function renderSlot (
  5738. name,
  5739. fallback,
  5740. props,
  5741. bindObject
  5742. ) {
  5743. var scopedSlotFn = this.$scopedSlots[name];
  5744. var nodes;
  5745. if (scopedSlotFn) { // scoped slot
  5746. props = props || {};
  5747. if (bindObject) {
  5748. if ( true && !isObject(bindObject)) {
  5749. warn(
  5750. 'slot v-bind without argument expects an Object',
  5751. this
  5752. );
  5753. }
  5754. props = extend(extend({}, bindObject), props);
  5755. }
  5756. // fixed by xxxxxx app-plus scopedSlot
  5757. nodes = scopedSlotFn(props, this, props._i) || fallback;
  5758. } else {
  5759. nodes = this.$slots[name] || fallback;
  5760. }
  5761. var target = props && props.slot;
  5762. if (target) {
  5763. return this.$createElement('template', { slot: target }, nodes)
  5764. } else {
  5765. return nodes
  5766. }
  5767. }
  5768. /* */
  5769. /**
  5770. * Runtime helper for resolving filters
  5771. */
  5772. function resolveFilter (id) {
  5773. return resolveAsset(this.$options, 'filters', id, true) || identity
  5774. }
  5775. /* */
  5776. function isKeyNotMatch (expect, actual) {
  5777. if (Array.isArray(expect)) {
  5778. return expect.indexOf(actual) === -1
  5779. } else {
  5780. return expect !== actual
  5781. }
  5782. }
  5783. /**
  5784. * Runtime helper for checking keyCodes from config.
  5785. * exposed as Vue.prototype._k
  5786. * passing in eventKeyName as last argument separately for backwards compat
  5787. */
  5788. function checkKeyCodes (
  5789. eventKeyCode,
  5790. key,
  5791. builtInKeyCode,
  5792. eventKeyName,
  5793. builtInKeyName
  5794. ) {
  5795. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  5796. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  5797. return isKeyNotMatch(builtInKeyName, eventKeyName)
  5798. } else if (mappedKeyCode) {
  5799. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  5800. } else if (eventKeyName) {
  5801. return hyphenate(eventKeyName) !== key
  5802. }
  5803. }
  5804. /* */
  5805. /**
  5806. * Runtime helper for merging v-bind="object" into a VNode's data.
  5807. */
  5808. function bindObjectProps (
  5809. data,
  5810. tag,
  5811. value,
  5812. asProp,
  5813. isSync
  5814. ) {
  5815. if (value) {
  5816. if (!isObject(value)) {
  5817. true && warn(
  5818. 'v-bind without argument expects an Object or Array value',
  5819. this
  5820. );
  5821. } else {
  5822. if (Array.isArray(value)) {
  5823. value = toObject(value);
  5824. }
  5825. var hash;
  5826. var loop = function ( key ) {
  5827. if (
  5828. key === 'class' ||
  5829. key === 'style' ||
  5830. isReservedAttribute(key)
  5831. ) {
  5832. hash = data;
  5833. } else {
  5834. var type = data.attrs && data.attrs.type;
  5835. hash = asProp || config.mustUseProp(tag, type, key)
  5836. ? data.domProps || (data.domProps = {})
  5837. : data.attrs || (data.attrs = {});
  5838. }
  5839. var camelizedKey = camelize(key);
  5840. var hyphenatedKey = hyphenate(key);
  5841. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  5842. hash[key] = value[key];
  5843. if (isSync) {
  5844. var on = data.on || (data.on = {});
  5845. on[("update:" + key)] = function ($event) {
  5846. value[key] = $event;
  5847. };
  5848. }
  5849. }
  5850. };
  5851. for (var key in value) loop( key );
  5852. }
  5853. }
  5854. return data
  5855. }
  5856. /* */
  5857. /**
  5858. * Runtime helper for rendering static trees.
  5859. */
  5860. function renderStatic (
  5861. index,
  5862. isInFor
  5863. ) {
  5864. var cached = this._staticTrees || (this._staticTrees = []);
  5865. var tree = cached[index];
  5866. // if has already-rendered static tree and not inside v-for,
  5867. // we can reuse the same tree.
  5868. if (tree && !isInFor) {
  5869. return tree
  5870. }
  5871. // otherwise, render a fresh tree.
  5872. tree = cached[index] = this.$options.staticRenderFns[index].call(
  5873. this._renderProxy,
  5874. null,
  5875. this // for render fns generated for functional component templates
  5876. );
  5877. markStatic(tree, ("__static__" + index), false);
  5878. return tree
  5879. }
  5880. /**
  5881. * Runtime helper for v-once.
  5882. * Effectively it means marking the node as static with a unique key.
  5883. */
  5884. function markOnce (
  5885. tree,
  5886. index,
  5887. key
  5888. ) {
  5889. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  5890. return tree
  5891. }
  5892. function markStatic (
  5893. tree,
  5894. key,
  5895. isOnce
  5896. ) {
  5897. if (Array.isArray(tree)) {
  5898. for (var i = 0; i < tree.length; i++) {
  5899. if (tree[i] && typeof tree[i] !== 'string') {
  5900. markStaticNode(tree[i], (key + "_" + i), isOnce);
  5901. }
  5902. }
  5903. } else {
  5904. markStaticNode(tree, key, isOnce);
  5905. }
  5906. }
  5907. function markStaticNode (node, key, isOnce) {
  5908. node.isStatic = true;
  5909. node.key = key;
  5910. node.isOnce = isOnce;
  5911. }
  5912. /* */
  5913. function bindObjectListeners (data, value) {
  5914. if (value) {
  5915. if (!isPlainObject(value)) {
  5916. true && warn(
  5917. 'v-on without argument expects an Object value',
  5918. this
  5919. );
  5920. } else {
  5921. var on = data.on = data.on ? extend({}, data.on) : {};
  5922. for (var key in value) {
  5923. var existing = on[key];
  5924. var ours = value[key];
  5925. on[key] = existing ? [].concat(existing, ours) : ours;
  5926. }
  5927. }
  5928. }
  5929. return data
  5930. }
  5931. /* */
  5932. function resolveScopedSlots (
  5933. fns, // see flow/vnode
  5934. res,
  5935. // the following are added in 2.6
  5936. hasDynamicKeys,
  5937. contentHashKey
  5938. ) {
  5939. res = res || { $stable: !hasDynamicKeys };
  5940. for (var i = 0; i < fns.length; i++) {
  5941. var slot = fns[i];
  5942. if (Array.isArray(slot)) {
  5943. resolveScopedSlots(slot, res, hasDynamicKeys);
  5944. } else if (slot) {
  5945. // marker for reverse proxying v-slot without scope on this.$slots
  5946. if (slot.proxy) {
  5947. slot.fn.proxy = true;
  5948. }
  5949. res[slot.key] = slot.fn;
  5950. }
  5951. }
  5952. if (contentHashKey) {
  5953. (res).$key = contentHashKey;
  5954. }
  5955. return res
  5956. }
  5957. /* */
  5958. function bindDynamicKeys (baseObj, values) {
  5959. for (var i = 0; i < values.length; i += 2) {
  5960. var key = values[i];
  5961. if (typeof key === 'string' && key) {
  5962. baseObj[values[i]] = values[i + 1];
  5963. } else if ( true && key !== '' && key !== null) {
  5964. // null is a special value for explicitly removing a binding
  5965. warn(
  5966. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  5967. this
  5968. );
  5969. }
  5970. }
  5971. return baseObj
  5972. }
  5973. // helper to dynamically append modifier runtime markers to event names.
  5974. // ensure only append when value is already string, otherwise it will be cast
  5975. // to string and cause the type check to miss.
  5976. function prependModifier (value, symbol) {
  5977. return typeof value === 'string' ? symbol + value : value
  5978. }
  5979. /* */
  5980. function installRenderHelpers (target) {
  5981. target._o = markOnce;
  5982. target._n = toNumber;
  5983. target._s = toString;
  5984. target._l = renderList;
  5985. target._t = renderSlot;
  5986. target._q = looseEqual;
  5987. target._i = looseIndexOf;
  5988. target._m = renderStatic;
  5989. target._f = resolveFilter;
  5990. target._k = checkKeyCodes;
  5991. target._b = bindObjectProps;
  5992. target._v = createTextVNode;
  5993. target._e = createEmptyVNode;
  5994. target._u = resolveScopedSlots;
  5995. target._g = bindObjectListeners;
  5996. target._d = bindDynamicKeys;
  5997. target._p = prependModifier;
  5998. }
  5999. /* */
  6000. function FunctionalRenderContext (
  6001. data,
  6002. props,
  6003. children,
  6004. parent,
  6005. Ctor
  6006. ) {
  6007. var this$1 = this;
  6008. var options = Ctor.options;
  6009. // ensure the createElement function in functional components
  6010. // gets a unique context - this is necessary for correct named slot check
  6011. var contextVm;
  6012. if (hasOwn(parent, '_uid')) {
  6013. contextVm = Object.create(parent);
  6014. // $flow-disable-line
  6015. contextVm._original = parent;
  6016. } else {
  6017. // the context vm passed in is a functional context as well.
  6018. // in this case we want to make sure we are able to get a hold to the
  6019. // real context instance.
  6020. contextVm = parent;
  6021. // $flow-disable-line
  6022. parent = parent._original;
  6023. }
  6024. var isCompiled = isTrue(options._compiled);
  6025. var needNormalization = !isCompiled;
  6026. this.data = data;
  6027. this.props = props;
  6028. this.children = children;
  6029. this.parent = parent;
  6030. this.listeners = data.on || emptyObject;
  6031. this.injections = resolveInject(options.inject, parent);
  6032. this.slots = function () {
  6033. if (!this$1.$slots) {
  6034. normalizeScopedSlots(
  6035. data.scopedSlots,
  6036. this$1.$slots = resolveSlots(children, parent)
  6037. );
  6038. }
  6039. return this$1.$slots
  6040. };
  6041. Object.defineProperty(this, 'scopedSlots', ({
  6042. enumerable: true,
  6043. get: function get () {
  6044. return normalizeScopedSlots(data.scopedSlots, this.slots())
  6045. }
  6046. }));
  6047. // support for compiled functional template
  6048. if (isCompiled) {
  6049. // exposing $options for renderStatic()
  6050. this.$options = options;
  6051. // pre-resolve slots for renderSlot()
  6052. this.$slots = this.slots();
  6053. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  6054. }
  6055. if (options._scopeId) {
  6056. this._c = function (a, b, c, d) {
  6057. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  6058. if (vnode && !Array.isArray(vnode)) {
  6059. vnode.fnScopeId = options._scopeId;
  6060. vnode.fnContext = parent;
  6061. }
  6062. return vnode
  6063. };
  6064. } else {
  6065. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  6066. }
  6067. }
  6068. installRenderHelpers(FunctionalRenderContext.prototype);
  6069. function createFunctionalComponent (
  6070. Ctor,
  6071. propsData,
  6072. data,
  6073. contextVm,
  6074. children
  6075. ) {
  6076. var options = Ctor.options;
  6077. var props = {};
  6078. var propOptions = options.props;
  6079. if (isDef(propOptions)) {
  6080. for (var key in propOptions) {
  6081. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  6082. }
  6083. } else {
  6084. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  6085. if (isDef(data.props)) { mergeProps(props, data.props); }
  6086. }
  6087. var renderContext = new FunctionalRenderContext(
  6088. data,
  6089. props,
  6090. children,
  6091. contextVm,
  6092. Ctor
  6093. );
  6094. var vnode = options.render.call(null, renderContext._c, renderContext);
  6095. if (vnode instanceof VNode) {
  6096. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  6097. } else if (Array.isArray(vnode)) {
  6098. var vnodes = normalizeChildren(vnode) || [];
  6099. var res = new Array(vnodes.length);
  6100. for (var i = 0; i < vnodes.length; i++) {
  6101. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  6102. }
  6103. return res
  6104. }
  6105. }
  6106. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  6107. // #7817 clone node before setting fnContext, otherwise if the node is reused
  6108. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  6109. // that should not be matched to match.
  6110. var clone = cloneVNode(vnode);
  6111. clone.fnContext = contextVm;
  6112. clone.fnOptions = options;
  6113. if (true) {
  6114. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  6115. }
  6116. if (data.slot) {
  6117. (clone.data || (clone.data = {})).slot = data.slot;
  6118. }
  6119. return clone
  6120. }
  6121. function mergeProps (to, from) {
  6122. for (var key in from) {
  6123. to[camelize(key)] = from[key];
  6124. }
  6125. }
  6126. /* */
  6127. /* */
  6128. /* */
  6129. /* */
  6130. // inline hooks to be invoked on component VNodes during patch
  6131. var componentVNodeHooks = {
  6132. init: function init (vnode, hydrating) {
  6133. if (
  6134. vnode.componentInstance &&
  6135. !vnode.componentInstance._isDestroyed &&
  6136. vnode.data.keepAlive
  6137. ) {
  6138. // kept-alive components, treat as a patch
  6139. var mountedNode = vnode; // work around flow
  6140. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  6141. } else {
  6142. var child = vnode.componentInstance = createComponentInstanceForVnode(
  6143. vnode,
  6144. activeInstance
  6145. );
  6146. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  6147. }
  6148. },
  6149. prepatch: function prepatch (oldVnode, vnode) {
  6150. var options = vnode.componentOptions;
  6151. var child = vnode.componentInstance = oldVnode.componentInstance;
  6152. updateChildComponent(
  6153. child,
  6154. options.propsData, // updated props
  6155. options.listeners, // updated listeners
  6156. vnode, // new parent vnode
  6157. options.children // new children
  6158. );
  6159. },
  6160. insert: function insert (vnode) {
  6161. var context = vnode.context;
  6162. var componentInstance = vnode.componentInstance;
  6163. if (!componentInstance._isMounted) {
  6164. callHook(componentInstance, 'onServiceCreated');
  6165. callHook(componentInstance, 'onServiceAttached');
  6166. componentInstance._isMounted = true;
  6167. callHook(componentInstance, 'mounted');
  6168. }
  6169. if (vnode.data.keepAlive) {
  6170. if (context._isMounted) {
  6171. // vue-router#1212
  6172. // During updates, a kept-alive component's child components may
  6173. // change, so directly walking the tree here may call activated hooks
  6174. // on incorrect children. Instead we push them into a queue which will
  6175. // be processed after the whole patch process ended.
  6176. queueActivatedComponent(componentInstance);
  6177. } else {
  6178. activateChildComponent(componentInstance, true /* direct */);
  6179. }
  6180. }
  6181. },
  6182. destroy: function destroy (vnode) {
  6183. var componentInstance = vnode.componentInstance;
  6184. if (!componentInstance._isDestroyed) {
  6185. if (!vnode.data.keepAlive) {
  6186. componentInstance.$destroy();
  6187. } else {
  6188. deactivateChildComponent(componentInstance, true /* direct */);
  6189. }
  6190. }
  6191. }
  6192. };
  6193. var hooksToMerge = Object.keys(componentVNodeHooks);
  6194. function createComponent (
  6195. Ctor,
  6196. data,
  6197. context,
  6198. children,
  6199. tag
  6200. ) {
  6201. if (isUndef(Ctor)) {
  6202. return
  6203. }
  6204. var baseCtor = context.$options._base;
  6205. // plain options object: turn it into a constructor
  6206. if (isObject(Ctor)) {
  6207. Ctor = baseCtor.extend(Ctor);
  6208. }
  6209. // if at this stage it's not a constructor or an async component factory,
  6210. // reject.
  6211. if (typeof Ctor !== 'function') {
  6212. if (true) {
  6213. warn(("Invalid Component definition: " + (String(Ctor))), context);
  6214. }
  6215. return
  6216. }
  6217. // async component
  6218. var asyncFactory;
  6219. if (isUndef(Ctor.cid)) {
  6220. asyncFactory = Ctor;
  6221. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  6222. if (Ctor === undefined) {
  6223. // return a placeholder node for async component, which is rendered
  6224. // as a comment node but preserves all the raw information for the node.
  6225. // the information will be used for async server-rendering and hydration.
  6226. return createAsyncPlaceholder(
  6227. asyncFactory,
  6228. data,
  6229. context,
  6230. children,
  6231. tag
  6232. )
  6233. }
  6234. }
  6235. data = data || {};
  6236. // resolve constructor options in case global mixins are applied after
  6237. // component constructor creation
  6238. resolveConstructorOptions(Ctor);
  6239. // transform component v-model data into props & events
  6240. if (isDef(data.model)) {
  6241. transformModel(Ctor.options, data);
  6242. }
  6243. // extract props
  6244. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  6245. // functional component
  6246. if (isTrue(Ctor.options.functional)) {
  6247. return createFunctionalComponent(Ctor, propsData, data, context, children)
  6248. }
  6249. // extract listeners, since these needs to be treated as
  6250. // child component listeners instead of DOM listeners
  6251. var listeners = data.on;
  6252. // replace with listeners with .native modifier
  6253. // so it gets processed during parent component patch.
  6254. data.on = data.nativeOn;
  6255. if (isTrue(Ctor.options.abstract)) {
  6256. // abstract components do not keep anything
  6257. // other than props & listeners & slot
  6258. // work around flow
  6259. var slot = data.slot;
  6260. data = {};
  6261. if (slot) {
  6262. data.slot = slot;
  6263. }
  6264. }
  6265. // install component management hooks onto the placeholder node
  6266. installComponentHooks(data);
  6267. // return a placeholder vnode
  6268. var name = Ctor.options.name || tag;
  6269. var vnode = new VNode(
  6270. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  6271. data, undefined, undefined, undefined, context,
  6272. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  6273. asyncFactory
  6274. );
  6275. return vnode
  6276. }
  6277. function createComponentInstanceForVnode (
  6278. vnode, // we know it's MountedComponentVNode but flow doesn't
  6279. parent // activeInstance in lifecycle state
  6280. ) {
  6281. var options = {
  6282. _isComponent: true,
  6283. _parentVnode: vnode,
  6284. parent: parent
  6285. };
  6286. // check inline-template render functions
  6287. var inlineTemplate = vnode.data.inlineTemplate;
  6288. if (isDef(inlineTemplate)) {
  6289. options.render = inlineTemplate.render;
  6290. options.staticRenderFns = inlineTemplate.staticRenderFns;
  6291. }
  6292. return new vnode.componentOptions.Ctor(options)
  6293. }
  6294. function installComponentHooks (data) {
  6295. var hooks = data.hook || (data.hook = {});
  6296. for (var i = 0; i < hooksToMerge.length; i++) {
  6297. var key = hooksToMerge[i];
  6298. var existing = hooks[key];
  6299. var toMerge = componentVNodeHooks[key];
  6300. if (existing !== toMerge && !(existing && existing._merged)) {
  6301. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  6302. }
  6303. }
  6304. }
  6305. function mergeHook$1 (f1, f2) {
  6306. var merged = function (a, b) {
  6307. // flow complains about extra args which is why we use any
  6308. f1(a, b);
  6309. f2(a, b);
  6310. };
  6311. merged._merged = true;
  6312. return merged
  6313. }
  6314. // transform component v-model info (value and callback) into
  6315. // prop and event handler respectively.
  6316. function transformModel (options, data) {
  6317. var prop = (options.model && options.model.prop) || 'value';
  6318. var event = (options.model && options.model.event) || 'input'
  6319. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  6320. var on = data.on || (data.on = {});
  6321. var existing = on[event];
  6322. var callback = data.model.callback;
  6323. if (isDef(existing)) {
  6324. if (
  6325. Array.isArray(existing)
  6326. ? existing.indexOf(callback) === -1
  6327. : existing !== callback
  6328. ) {
  6329. on[event] = [callback].concat(existing);
  6330. }
  6331. } else {
  6332. on[event] = callback;
  6333. }
  6334. }
  6335. /* */
  6336. var SIMPLE_NORMALIZE = 1;
  6337. var ALWAYS_NORMALIZE = 2;
  6338. // wrapper function for providing a more flexible interface
  6339. // without getting yelled at by flow
  6340. function createElement (
  6341. context,
  6342. tag,
  6343. data,
  6344. children,
  6345. normalizationType,
  6346. alwaysNormalize
  6347. ) {
  6348. if (Array.isArray(data) || isPrimitive(data)) {
  6349. normalizationType = children;
  6350. children = data;
  6351. data = undefined;
  6352. }
  6353. if (isTrue(alwaysNormalize)) {
  6354. normalizationType = ALWAYS_NORMALIZE;
  6355. }
  6356. return _createElement(context, tag, data, children, normalizationType)
  6357. }
  6358. function _createElement (
  6359. context,
  6360. tag,
  6361. data,
  6362. children,
  6363. normalizationType
  6364. ) {
  6365. if (isDef(data) && isDef((data).__ob__)) {
  6366. true && warn(
  6367. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  6368. 'Always create fresh vnode data objects in each render!',
  6369. context
  6370. );
  6371. return createEmptyVNode()
  6372. }
  6373. // object syntax in v-bind
  6374. if (isDef(data) && isDef(data.is)) {
  6375. tag = data.is;
  6376. }
  6377. if (!tag) {
  6378. // in case of component :is set to falsy value
  6379. return createEmptyVNode()
  6380. }
  6381. // warn against non-primitive key
  6382. if ( true &&
  6383. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  6384. ) {
  6385. {
  6386. warn(
  6387. 'Avoid using non-primitive value as key, ' +
  6388. 'use string/number value instead.',
  6389. context
  6390. );
  6391. }
  6392. }
  6393. // support single function children as default scoped slot
  6394. if (Array.isArray(children) &&
  6395. typeof children[0] === 'function'
  6396. ) {
  6397. data = data || {};
  6398. data.scopedSlots = { default: children[0] };
  6399. children.length = 0;
  6400. }
  6401. if (normalizationType === ALWAYS_NORMALIZE) {
  6402. children = normalizeChildren(children);
  6403. } else if (normalizationType === SIMPLE_NORMALIZE) {
  6404. children = simpleNormalizeChildren(children);
  6405. }
  6406. var vnode, ns;
  6407. if (typeof tag === 'string') {
  6408. var Ctor;
  6409. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  6410. if (config.isReservedTag(tag)) {
  6411. // platform built-in elements
  6412. if ( true && isDef(data) && isDef(data.nativeOn)) {
  6413. warn(
  6414. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  6415. context
  6416. );
  6417. }
  6418. vnode = new VNode(
  6419. config.parsePlatformTagName(tag), data, children,
  6420. undefined, undefined, context
  6421. );
  6422. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  6423. // component
  6424. vnode = createComponent(Ctor, data, context, children, tag);
  6425. } else {
  6426. // unknown or unlisted namespaced elements
  6427. // check at runtime because it may get assigned a namespace when its
  6428. // parent normalizes children
  6429. vnode = new VNode(
  6430. tag, data, children,
  6431. undefined, undefined, context
  6432. );
  6433. }
  6434. } else {
  6435. // direct component options / constructor
  6436. vnode = createComponent(tag, data, context, children);
  6437. }
  6438. if (Array.isArray(vnode)) {
  6439. return vnode
  6440. } else if (isDef(vnode)) {
  6441. if (isDef(ns)) { applyNS(vnode, ns); }
  6442. if (isDef(data)) { registerDeepBindings(data); }
  6443. return vnode
  6444. } else {
  6445. return createEmptyVNode()
  6446. }
  6447. }
  6448. function applyNS (vnode, ns, force) {
  6449. vnode.ns = ns;
  6450. if (vnode.tag === 'foreignObject') {
  6451. // use default namespace inside foreignObject
  6452. ns = undefined;
  6453. force = true;
  6454. }
  6455. if (isDef(vnode.children)) {
  6456. for (var i = 0, l = vnode.children.length; i < l; i++) {
  6457. var child = vnode.children[i];
  6458. if (isDef(child.tag) && (
  6459. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  6460. applyNS(child, ns, force);
  6461. }
  6462. }
  6463. }
  6464. }
  6465. // ref #5318
  6466. // necessary to ensure parent re-render when deep bindings like :style and
  6467. // :class are used on slot nodes
  6468. function registerDeepBindings (data) {
  6469. if (isObject(data.style)) {
  6470. traverse(data.style);
  6471. }
  6472. if (isObject(data.class)) {
  6473. traverse(data.class);
  6474. }
  6475. }
  6476. /* */
  6477. function initRender (vm) {
  6478. vm._vnode = null; // the root of the child tree
  6479. vm._staticTrees = null; // v-once cached trees
  6480. var options = vm.$options;
  6481. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  6482. var renderContext = parentVnode && parentVnode.context;
  6483. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  6484. vm.$scopedSlots = emptyObject;
  6485. // bind the createElement fn to this instance
  6486. // so that we get proper render context inside it.
  6487. // args order: tag, data, children, normalizationType, alwaysNormalize
  6488. // internal version is used by render functions compiled from templates
  6489. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  6490. // normalization is always applied for the public version, used in
  6491. // user-written render functions.
  6492. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  6493. // $attrs & $listeners are exposed for easier HOC creation.
  6494. // they need to be reactive so that HOCs using them are always updated
  6495. var parentData = parentVnode && parentVnode.data;
  6496. /* istanbul ignore else */
  6497. if (true) {
  6498. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  6499. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  6500. }, true);
  6501. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  6502. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  6503. }, true);
  6504. } else {}
  6505. }
  6506. var currentRenderingInstance = null;
  6507. function renderMixin (Vue) {
  6508. // install runtime convenience helpers
  6509. installRenderHelpers(Vue.prototype);
  6510. Vue.prototype.$nextTick = function (fn) {
  6511. return nextTick(fn, this)
  6512. };
  6513. Vue.prototype._render = function () {
  6514. var vm = this;
  6515. var ref = vm.$options;
  6516. var render = ref.render;
  6517. var _parentVnode = ref._parentVnode;
  6518. if (_parentVnode) {
  6519. vm.$scopedSlots = normalizeScopedSlots(
  6520. _parentVnode.data.scopedSlots,
  6521. vm.$slots,
  6522. vm.$scopedSlots
  6523. );
  6524. }
  6525. // set parent vnode. this allows render functions to have access
  6526. // to the data on the placeholder node.
  6527. vm.$vnode = _parentVnode;
  6528. // render self
  6529. var vnode;
  6530. try {
  6531. // There's no need to maintain a stack because all render fns are called
  6532. // separately from one another. Nested component's render fns are called
  6533. // when parent component is patched.
  6534. currentRenderingInstance = vm;
  6535. vnode = render.call(vm._renderProxy, vm.$createElement);
  6536. } catch (e) {
  6537. handleError(e, vm, "render");
  6538. // return error render result,
  6539. // or previous vnode to prevent render error causing blank component
  6540. /* istanbul ignore else */
  6541. if ( true && vm.$options.renderError) {
  6542. try {
  6543. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  6544. } catch (e) {
  6545. handleError(e, vm, "renderError");
  6546. vnode = vm._vnode;
  6547. }
  6548. } else {
  6549. vnode = vm._vnode;
  6550. }
  6551. } finally {
  6552. currentRenderingInstance = null;
  6553. }
  6554. // if the returned array contains only a single node, allow it
  6555. if (Array.isArray(vnode) && vnode.length === 1) {
  6556. vnode = vnode[0];
  6557. }
  6558. // return empty vnode in case the render function errored out
  6559. if (!(vnode instanceof VNode)) {
  6560. if ( true && Array.isArray(vnode)) {
  6561. warn(
  6562. 'Multiple root nodes returned from render function. Render function ' +
  6563. 'should return a single root node.',
  6564. vm
  6565. );
  6566. }
  6567. vnode = createEmptyVNode();
  6568. }
  6569. // set parent
  6570. vnode.parent = _parentVnode;
  6571. return vnode
  6572. };
  6573. }
  6574. /* */
  6575. function ensureCtor (comp, base) {
  6576. if (
  6577. comp.__esModule ||
  6578. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  6579. ) {
  6580. comp = comp.default;
  6581. }
  6582. return isObject(comp)
  6583. ? base.extend(comp)
  6584. : comp
  6585. }
  6586. function createAsyncPlaceholder (
  6587. factory,
  6588. data,
  6589. context,
  6590. children,
  6591. tag
  6592. ) {
  6593. var node = createEmptyVNode();
  6594. node.asyncFactory = factory;
  6595. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  6596. return node
  6597. }
  6598. function resolveAsyncComponent (
  6599. factory,
  6600. baseCtor
  6601. ) {
  6602. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  6603. return factory.errorComp
  6604. }
  6605. if (isDef(factory.resolved)) {
  6606. return factory.resolved
  6607. }
  6608. var owner = currentRenderingInstance;
  6609. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  6610. // already pending
  6611. factory.owners.push(owner);
  6612. }
  6613. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  6614. return factory.loadingComp
  6615. }
  6616. if (owner && !isDef(factory.owners)) {
  6617. var owners = factory.owners = [owner];
  6618. var sync = true;
  6619. var timerLoading = null;
  6620. var timerTimeout = null
  6621. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  6622. var forceRender = function (renderCompleted) {
  6623. for (var i = 0, l = owners.length; i < l; i++) {
  6624. (owners[i]).$forceUpdate();
  6625. }
  6626. if (renderCompleted) {
  6627. owners.length = 0;
  6628. if (timerLoading !== null) {
  6629. clearTimeout(timerLoading);
  6630. timerLoading = null;
  6631. }
  6632. if (timerTimeout !== null) {
  6633. clearTimeout(timerTimeout);
  6634. timerTimeout = null;
  6635. }
  6636. }
  6637. };
  6638. var resolve = once(function (res) {
  6639. // cache resolved
  6640. factory.resolved = ensureCtor(res, baseCtor);
  6641. // invoke callbacks only if this is not a synchronous resolve
  6642. // (async resolves are shimmed as synchronous during SSR)
  6643. if (!sync) {
  6644. forceRender(true);
  6645. } else {
  6646. owners.length = 0;
  6647. }
  6648. });
  6649. var reject = once(function (reason) {
  6650. true && warn(
  6651. "Failed to resolve async component: " + (String(factory)) +
  6652. (reason ? ("\nReason: " + reason) : '')
  6653. );
  6654. if (isDef(factory.errorComp)) {
  6655. factory.error = true;
  6656. forceRender(true);
  6657. }
  6658. });
  6659. var res = factory(resolve, reject);
  6660. if (isObject(res)) {
  6661. if (isPromise(res)) {
  6662. // () => Promise
  6663. if (isUndef(factory.resolved)) {
  6664. res.then(resolve, reject);
  6665. }
  6666. } else if (isPromise(res.component)) {
  6667. res.component.then(resolve, reject);
  6668. if (isDef(res.error)) {
  6669. factory.errorComp = ensureCtor(res.error, baseCtor);
  6670. }
  6671. if (isDef(res.loading)) {
  6672. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  6673. if (res.delay === 0) {
  6674. factory.loading = true;
  6675. } else {
  6676. timerLoading = setTimeout(function () {
  6677. timerLoading = null;
  6678. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  6679. factory.loading = true;
  6680. forceRender(false);
  6681. }
  6682. }, res.delay || 200);
  6683. }
  6684. }
  6685. if (isDef(res.timeout)) {
  6686. timerTimeout = setTimeout(function () {
  6687. timerTimeout = null;
  6688. if (isUndef(factory.resolved)) {
  6689. reject(
  6690. true
  6691. ? ("timeout (" + (res.timeout) + "ms)")
  6692. : undefined
  6693. );
  6694. }
  6695. }, res.timeout);
  6696. }
  6697. }
  6698. }
  6699. sync = false;
  6700. // return in case resolved synchronously
  6701. return factory.loading
  6702. ? factory.loadingComp
  6703. : factory.resolved
  6704. }
  6705. }
  6706. /* */
  6707. function isAsyncPlaceholder (node) {
  6708. return node.isComment && node.asyncFactory
  6709. }
  6710. /* */
  6711. function getFirstComponentChild (children) {
  6712. if (Array.isArray(children)) {
  6713. for (var i = 0; i < children.length; i++) {
  6714. var c = children[i];
  6715. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  6716. return c
  6717. }
  6718. }
  6719. }
  6720. }
  6721. /* */
  6722. /* */
  6723. function initEvents (vm) {
  6724. vm._events = Object.create(null);
  6725. vm._hasHookEvent = false;
  6726. // init parent attached events
  6727. var listeners = vm.$options._parentListeners;
  6728. if (listeners) {
  6729. updateComponentListeners(vm, listeners);
  6730. }
  6731. }
  6732. var target;
  6733. function add (event, fn) {
  6734. target.$on(event, fn);
  6735. }
  6736. function remove$1 (event, fn) {
  6737. target.$off(event, fn);
  6738. }
  6739. function createOnceHandler (event, fn) {
  6740. var _target = target;
  6741. return function onceHandler () {
  6742. var res = fn.apply(null, arguments);
  6743. if (res !== null) {
  6744. _target.$off(event, onceHandler);
  6745. }
  6746. }
  6747. }
  6748. function updateComponentListeners (
  6749. vm,
  6750. listeners,
  6751. oldListeners
  6752. ) {
  6753. target = vm;
  6754. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  6755. target = undefined;
  6756. }
  6757. function eventsMixin (Vue) {
  6758. var hookRE = /^hook:/;
  6759. Vue.prototype.$on = function (event, fn) {
  6760. var vm = this;
  6761. if (Array.isArray(event)) {
  6762. for (var i = 0, l = event.length; i < l; i++) {
  6763. vm.$on(event[i], fn);
  6764. }
  6765. } else {
  6766. (vm._events[event] || (vm._events[event] = [])).push(fn);
  6767. // optimize hook:event cost by using a boolean flag marked at registration
  6768. // instead of a hash lookup
  6769. if (hookRE.test(event)) {
  6770. vm._hasHookEvent = true;
  6771. }
  6772. }
  6773. return vm
  6774. };
  6775. Vue.prototype.$once = function (event, fn) {
  6776. var vm = this;
  6777. function on () {
  6778. vm.$off(event, on);
  6779. fn.apply(vm, arguments);
  6780. }
  6781. on.fn = fn;
  6782. vm.$on(event, on);
  6783. return vm
  6784. };
  6785. Vue.prototype.$off = function (event, fn) {
  6786. var vm = this;
  6787. // all
  6788. if (!arguments.length) {
  6789. vm._events = Object.create(null);
  6790. return vm
  6791. }
  6792. // array of events
  6793. if (Array.isArray(event)) {
  6794. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  6795. vm.$off(event[i$1], fn);
  6796. }
  6797. return vm
  6798. }
  6799. // specific event
  6800. var cbs = vm._events[event];
  6801. if (!cbs) {
  6802. return vm
  6803. }
  6804. if (!fn) {
  6805. vm._events[event] = null;
  6806. return vm
  6807. }
  6808. // specific handler
  6809. var cb;
  6810. var i = cbs.length;
  6811. while (i--) {
  6812. cb = cbs[i];
  6813. if (cb === fn || cb.fn === fn) {
  6814. cbs.splice(i, 1);
  6815. break
  6816. }
  6817. }
  6818. return vm
  6819. };
  6820. Vue.prototype.$emit = function (event) {
  6821. var vm = this;
  6822. if (true) {
  6823. var lowerCaseEvent = event.toLowerCase();
  6824. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  6825. tip(
  6826. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  6827. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  6828. "Note that HTML attributes are case-insensitive and you cannot use " +
  6829. "v-on to listen to camelCase events when using in-DOM templates. " +
  6830. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  6831. );
  6832. }
  6833. }
  6834. var cbs = vm._events[event];
  6835. if (cbs) {
  6836. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  6837. var args = toArray(arguments, 1);
  6838. var info = "event handler for \"" + event + "\"";
  6839. for (var i = 0, l = cbs.length; i < l; i++) {
  6840. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  6841. }
  6842. }
  6843. return vm
  6844. };
  6845. }
  6846. /* */
  6847. var activeInstance = null;
  6848. var isUpdatingChildComponent = false;
  6849. function setActiveInstance(vm) {
  6850. var prevActiveInstance = activeInstance;
  6851. activeInstance = vm;
  6852. return function () {
  6853. activeInstance = prevActiveInstance;
  6854. }
  6855. }
  6856. function initLifecycle (vm) {
  6857. var options = vm.$options;
  6858. // locate first non-abstract parent
  6859. var parent = options.parent;
  6860. if (parent && !options.abstract) {
  6861. while (parent.$options.abstract && parent.$parent) {
  6862. parent = parent.$parent;
  6863. }
  6864. parent.$children.push(vm);
  6865. }
  6866. vm.$parent = parent;
  6867. vm.$root = parent ? parent.$root : vm;
  6868. vm.$children = [];
  6869. vm.$refs = {};
  6870. vm._watcher = null;
  6871. vm._inactive = null;
  6872. vm._directInactive = false;
  6873. vm._isMounted = false;
  6874. vm._isDestroyed = false;
  6875. vm._isBeingDestroyed = false;
  6876. }
  6877. function lifecycleMixin (Vue) {
  6878. Vue.prototype._update = function (vnode, hydrating) {
  6879. var vm = this;
  6880. var prevEl = vm.$el;
  6881. var prevVnode = vm._vnode;
  6882. var restoreActiveInstance = setActiveInstance(vm);
  6883. vm._vnode = vnode;
  6884. // Vue.prototype.__patch__ is injected in entry points
  6885. // based on the rendering backend used.
  6886. if (!prevVnode) {
  6887. // initial render
  6888. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  6889. } else {
  6890. // updates
  6891. vm.$el = vm.__patch__(prevVnode, vnode);
  6892. }
  6893. restoreActiveInstance();
  6894. // update __vue__ reference
  6895. if (prevEl) {
  6896. prevEl.__vue__ = null;
  6897. }
  6898. if (vm.$el) {
  6899. vm.$el.__vue__ = vm;
  6900. }
  6901. // if parent is an HOC, update its $el as well
  6902. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  6903. vm.$parent.$el = vm.$el;
  6904. }
  6905. // updated hook is called by the scheduler to ensure that children are
  6906. // updated in a parent's updated hook.
  6907. };
  6908. Vue.prototype.$forceUpdate = function () {
  6909. var vm = this;
  6910. if (vm._watcher) {
  6911. vm._watcher.update();
  6912. }
  6913. };
  6914. Vue.prototype.$destroy = function () {
  6915. var vm = this;
  6916. if (vm._isBeingDestroyed) {
  6917. return
  6918. }
  6919. callHook(vm, 'beforeDestroy');
  6920. vm._isBeingDestroyed = true;
  6921. // remove self from parent
  6922. var parent = vm.$parent;
  6923. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  6924. remove(parent.$children, vm);
  6925. }
  6926. // teardown watchers
  6927. if (vm._watcher) {
  6928. vm._watcher.teardown();
  6929. }
  6930. var i = vm._watchers.length;
  6931. while (i--) {
  6932. vm._watchers[i].teardown();
  6933. }
  6934. // remove reference from data ob
  6935. // frozen object may not have observer.
  6936. if (vm._data.__ob__) {
  6937. vm._data.__ob__.vmCount--;
  6938. }
  6939. // call the last hook...
  6940. vm._isDestroyed = true;
  6941. // invoke destroy hooks on current rendered tree
  6942. vm.__patch__(vm._vnode, null);
  6943. // fire destroyed hook
  6944. callHook(vm, 'destroyed');
  6945. // turn off all instance listeners.
  6946. vm.$off();
  6947. // remove __vue__ reference
  6948. if (vm.$el) {
  6949. vm.$el.__vue__ = null;
  6950. }
  6951. // release circular reference (#6759)
  6952. if (vm.$vnode) {
  6953. vm.$vnode.parent = null;
  6954. }
  6955. };
  6956. }
  6957. function updateChildComponent (
  6958. vm,
  6959. propsData,
  6960. listeners,
  6961. parentVnode,
  6962. renderChildren
  6963. ) {
  6964. if (true) {
  6965. isUpdatingChildComponent = true;
  6966. }
  6967. // determine whether component has slot children
  6968. // we need to do this before overwriting $options._renderChildren.
  6969. // check if there are dynamic scopedSlots (hand-written or compiled but with
  6970. // dynamic slot names). Static scoped slots compiled from template has the
  6971. // "$stable" marker.
  6972. var newScopedSlots = parentVnode.data.scopedSlots;
  6973. var oldScopedSlots = vm.$scopedSlots;
  6974. var hasDynamicScopedSlot = !!(
  6975. (newScopedSlots && !newScopedSlots.$stable) ||
  6976. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  6977. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  6978. );
  6979. // Any static slot children from the parent may have changed during parent's
  6980. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  6981. // update is necessary to ensure correctness.
  6982. var needsForceUpdate = !!(
  6983. renderChildren || // has new static slots
  6984. vm.$options._renderChildren || // has old static slots
  6985. hasDynamicScopedSlot
  6986. );
  6987. vm.$options._parentVnode = parentVnode;
  6988. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  6989. if (vm._vnode) { // update child tree's parent
  6990. vm._vnode.parent = parentVnode;
  6991. }
  6992. vm.$options._renderChildren = renderChildren;
  6993. // update $attrs and $listeners hash
  6994. // these are also reactive so they may trigger child update if the child
  6995. // used them during render
  6996. vm.$attrs = parentVnode.data.attrs || emptyObject;
  6997. vm.$listeners = listeners || emptyObject;
  6998. // update props
  6999. if (propsData && vm.$options.props) {
  7000. toggleObserving(false);
  7001. var props = vm._props;
  7002. var propKeys = vm.$options._propKeys || [];
  7003. for (var i = 0; i < propKeys.length; i++) {
  7004. var key = propKeys[i];
  7005. var propOptions = vm.$options.props; // wtf flow?
  7006. props[key] = validateProp(key, propOptions, propsData, vm);
  7007. }
  7008. toggleObserving(true);
  7009. // keep a copy of raw propsData
  7010. vm.$options.propsData = propsData;
  7011. }
  7012. // fixed by xxxxxx update properties(mp runtime)
  7013. vm._$updateProperties && vm._$updateProperties(vm);
  7014. // update listeners
  7015. listeners = listeners || emptyObject;
  7016. var oldListeners = vm.$options._parentListeners;
  7017. vm.$options._parentListeners = listeners;
  7018. updateComponentListeners(vm, listeners, oldListeners);
  7019. // resolve slots + force update if has children
  7020. if (needsForceUpdate) {
  7021. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  7022. vm.$forceUpdate();
  7023. }
  7024. if (true) {
  7025. isUpdatingChildComponent = false;
  7026. }
  7027. }
  7028. function isInInactiveTree (vm) {
  7029. while (vm && (vm = vm.$parent)) {
  7030. if (vm._inactive) { return true }
  7031. }
  7032. return false
  7033. }
  7034. function activateChildComponent (vm, direct) {
  7035. if (direct) {
  7036. vm._directInactive = false;
  7037. if (isInInactiveTree(vm)) {
  7038. return
  7039. }
  7040. } else if (vm._directInactive) {
  7041. return
  7042. }
  7043. if (vm._inactive || vm._inactive === null) {
  7044. vm._inactive = false;
  7045. for (var i = 0; i < vm.$children.length; i++) {
  7046. activateChildComponent(vm.$children[i]);
  7047. }
  7048. callHook(vm, 'activated');
  7049. }
  7050. }
  7051. function deactivateChildComponent (vm, direct) {
  7052. if (direct) {
  7053. vm._directInactive = true;
  7054. if (isInInactiveTree(vm)) {
  7055. return
  7056. }
  7057. }
  7058. if (!vm._inactive) {
  7059. vm._inactive = true;
  7060. for (var i = 0; i < vm.$children.length; i++) {
  7061. deactivateChildComponent(vm.$children[i]);
  7062. }
  7063. callHook(vm, 'deactivated');
  7064. }
  7065. }
  7066. function callHook (vm, hook) {
  7067. // #7573 disable dep collection when invoking lifecycle hooks
  7068. pushTarget();
  7069. var handlers = vm.$options[hook];
  7070. var info = hook + " hook";
  7071. if (handlers) {
  7072. for (var i = 0, j = handlers.length; i < j; i++) {
  7073. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  7074. }
  7075. }
  7076. if (vm._hasHookEvent) {
  7077. vm.$emit('hook:' + hook);
  7078. }
  7079. popTarget();
  7080. }
  7081. /* */
  7082. var MAX_UPDATE_COUNT = 100;
  7083. var queue = [];
  7084. var activatedChildren = [];
  7085. var has = {};
  7086. var circular = {};
  7087. var waiting = false;
  7088. var flushing = false;
  7089. var index = 0;
  7090. /**
  7091. * Reset the scheduler's state.
  7092. */
  7093. function resetSchedulerState () {
  7094. index = queue.length = activatedChildren.length = 0;
  7095. has = {};
  7096. if (true) {
  7097. circular = {};
  7098. }
  7099. waiting = flushing = false;
  7100. }
  7101. // Async edge case #6566 requires saving the timestamp when event listeners are
  7102. // attached. However, calling performance.now() has a perf overhead especially
  7103. // if the page has thousands of event listeners. Instead, we take a timestamp
  7104. // every time the scheduler flushes and use that for all event listeners
  7105. // attached during that flush.
  7106. var currentFlushTimestamp = 0;
  7107. // Async edge case fix requires storing an event listener's attach timestamp.
  7108. var getNow = Date.now;
  7109. // Determine what event timestamp the browser is using. Annoyingly, the
  7110. // timestamp can either be hi-res (relative to page load) or low-res
  7111. // (relative to UNIX epoch), so in order to compare time we have to use the
  7112. // same timestamp type when saving the flush timestamp.
  7113. // All IE versions use low-res event timestamps, and have problematic clock
  7114. // implementations (#9632)
  7115. if (inBrowser && !isIE) {
  7116. var performance = window.performance;
  7117. if (
  7118. performance &&
  7119. typeof performance.now === 'function' &&
  7120. getNow() > document.createEvent('Event').timeStamp
  7121. ) {
  7122. // if the event timestamp, although evaluated AFTER the Date.now(), is
  7123. // smaller than it, it means the event is using a hi-res timestamp,
  7124. // and we need to use the hi-res version for event listener timestamps as
  7125. // well.
  7126. getNow = function () { return performance.now(); };
  7127. }
  7128. }
  7129. /**
  7130. * Flush both queues and run the watchers.
  7131. */
  7132. function flushSchedulerQueue () {
  7133. currentFlushTimestamp = getNow();
  7134. flushing = true;
  7135. var watcher, id;
  7136. // Sort queue before flush.
  7137. // This ensures that:
  7138. // 1. Components are updated from parent to child. (because parent is always
  7139. // created before the child)
  7140. // 2. A component's user watchers are run before its render watcher (because
  7141. // user watchers are created before the render watcher)
  7142. // 3. If a component is destroyed during a parent component's watcher run,
  7143. // its watchers can be skipped.
  7144. queue.sort(function (a, b) { return a.id - b.id; });
  7145. // do not cache length because more watchers might be pushed
  7146. // as we run existing watchers
  7147. for (index = 0; index < queue.length; index++) {
  7148. watcher = queue[index];
  7149. if (watcher.before) {
  7150. watcher.before();
  7151. }
  7152. id = watcher.id;
  7153. has[id] = null;
  7154. watcher.run();
  7155. // in dev build, check and stop circular updates.
  7156. if ( true && has[id] != null) {
  7157. circular[id] = (circular[id] || 0) + 1;
  7158. if (circular[id] > MAX_UPDATE_COUNT) {
  7159. warn(
  7160. 'You may have an infinite update loop ' + (
  7161. watcher.user
  7162. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  7163. : "in a component render function."
  7164. ),
  7165. watcher.vm
  7166. );
  7167. break
  7168. }
  7169. }
  7170. }
  7171. // keep copies of post queues before resetting state
  7172. var activatedQueue = activatedChildren.slice();
  7173. var updatedQueue = queue.slice();
  7174. resetSchedulerState();
  7175. // call component updated and activated hooks
  7176. callActivatedHooks(activatedQueue);
  7177. callUpdatedHooks(updatedQueue);
  7178. // devtool hook
  7179. /* istanbul ignore if */
  7180. if (devtools && config.devtools) {
  7181. devtools.emit('flush');
  7182. }
  7183. }
  7184. function callUpdatedHooks (queue) {
  7185. var i = queue.length;
  7186. while (i--) {
  7187. var watcher = queue[i];
  7188. var vm = watcher.vm;
  7189. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  7190. callHook(vm, 'updated');
  7191. }
  7192. }
  7193. }
  7194. /**
  7195. * Queue a kept-alive component that was activated during patch.
  7196. * The queue will be processed after the entire tree has been patched.
  7197. */
  7198. function queueActivatedComponent (vm) {
  7199. // setting _inactive to false here so that a render function can
  7200. // rely on checking whether it's in an inactive tree (e.g. router-view)
  7201. vm._inactive = false;
  7202. activatedChildren.push(vm);
  7203. }
  7204. function callActivatedHooks (queue) {
  7205. for (var i = 0; i < queue.length; i++) {
  7206. queue[i]._inactive = true;
  7207. activateChildComponent(queue[i], true /* true */);
  7208. }
  7209. }
  7210. /**
  7211. * Push a watcher into the watcher queue.
  7212. * Jobs with duplicate IDs will be skipped unless it's
  7213. * pushed when the queue is being flushed.
  7214. */
  7215. function queueWatcher (watcher) {
  7216. var id = watcher.id;
  7217. if (has[id] == null) {
  7218. has[id] = true;
  7219. if (!flushing) {
  7220. queue.push(watcher);
  7221. } else {
  7222. // if already flushing, splice the watcher based on its id
  7223. // if already past its id, it will be run next immediately.
  7224. var i = queue.length - 1;
  7225. while (i > index && queue[i].id > watcher.id) {
  7226. i--;
  7227. }
  7228. queue.splice(i + 1, 0, watcher);
  7229. }
  7230. // queue the flush
  7231. if (!waiting) {
  7232. waiting = true;
  7233. if ( true && !config.async) {
  7234. flushSchedulerQueue();
  7235. return
  7236. }
  7237. nextTick(flushSchedulerQueue);
  7238. }
  7239. }
  7240. }
  7241. /* */
  7242. var uid$2 = 0;
  7243. /**
  7244. * A watcher parses an expression, collects dependencies,
  7245. * and fires callback when the expression value changes.
  7246. * This is used for both the $watch() api and directives.
  7247. */
  7248. var Watcher = function Watcher (
  7249. vm,
  7250. expOrFn,
  7251. cb,
  7252. options,
  7253. isRenderWatcher
  7254. ) {
  7255. this.vm = vm;
  7256. if (isRenderWatcher) {
  7257. vm._watcher = this;
  7258. }
  7259. vm._watchers.push(this);
  7260. // options
  7261. if (options) {
  7262. this.deep = !!options.deep;
  7263. this.user = !!options.user;
  7264. this.lazy = !!options.lazy;
  7265. this.sync = !!options.sync;
  7266. this.before = options.before;
  7267. } else {
  7268. this.deep = this.user = this.lazy = this.sync = false;
  7269. }
  7270. this.cb = cb;
  7271. this.id = ++uid$2; // uid for batching
  7272. this.active = true;
  7273. this.dirty = this.lazy; // for lazy watchers
  7274. this.deps = [];
  7275. this.newDeps = [];
  7276. this.depIds = new _Set();
  7277. this.newDepIds = new _Set();
  7278. this.expression = true
  7279. ? expOrFn.toString()
  7280. : undefined;
  7281. // parse expression for getter
  7282. if (typeof expOrFn === 'function') {
  7283. this.getter = expOrFn;
  7284. } else {
  7285. this.getter = parsePath(expOrFn);
  7286. if (!this.getter) {
  7287. this.getter = noop;
  7288. true && warn(
  7289. "Failed watching path: \"" + expOrFn + "\" " +
  7290. 'Watcher only accepts simple dot-delimited paths. ' +
  7291. 'For full control, use a function instead.',
  7292. vm
  7293. );
  7294. }
  7295. }
  7296. this.value = this.lazy
  7297. ? undefined
  7298. : this.get();
  7299. };
  7300. /**
  7301. * Evaluate the getter, and re-collect dependencies.
  7302. */
  7303. Watcher.prototype.get = function get () {
  7304. pushTarget(this);
  7305. var value;
  7306. var vm = this.vm;
  7307. try {
  7308. value = this.getter.call(vm, vm);
  7309. } catch (e) {
  7310. if (this.user) {
  7311. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  7312. } else {
  7313. throw e
  7314. }
  7315. } finally {
  7316. // "touch" every property so they are all tracked as
  7317. // dependencies for deep watching
  7318. if (this.deep) {
  7319. traverse(value);
  7320. }
  7321. popTarget();
  7322. this.cleanupDeps();
  7323. }
  7324. return value
  7325. };
  7326. /**
  7327. * Add a dependency to this directive.
  7328. */
  7329. Watcher.prototype.addDep = function addDep (dep) {
  7330. var id = dep.id;
  7331. if (!this.newDepIds.has(id)) {
  7332. this.newDepIds.add(id);
  7333. this.newDeps.push(dep);
  7334. if (!this.depIds.has(id)) {
  7335. dep.addSub(this);
  7336. }
  7337. }
  7338. };
  7339. /**
  7340. * Clean up for dependency collection.
  7341. */
  7342. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  7343. var i = this.deps.length;
  7344. while (i--) {
  7345. var dep = this.deps[i];
  7346. if (!this.newDepIds.has(dep.id)) {
  7347. dep.removeSub(this);
  7348. }
  7349. }
  7350. var tmp = this.depIds;
  7351. this.depIds = this.newDepIds;
  7352. this.newDepIds = tmp;
  7353. this.newDepIds.clear();
  7354. tmp = this.deps;
  7355. this.deps = this.newDeps;
  7356. this.newDeps = tmp;
  7357. this.newDeps.length = 0;
  7358. };
  7359. /**
  7360. * Subscriber interface.
  7361. * Will be called when a dependency changes.
  7362. */
  7363. Watcher.prototype.update = function update () {
  7364. /* istanbul ignore else */
  7365. if (this.lazy) {
  7366. this.dirty = true;
  7367. } else if (this.sync) {
  7368. this.run();
  7369. } else {
  7370. queueWatcher(this);
  7371. }
  7372. };
  7373. /**
  7374. * Scheduler job interface.
  7375. * Will be called by the scheduler.
  7376. */
  7377. Watcher.prototype.run = function run () {
  7378. if (this.active) {
  7379. var value = this.get();
  7380. if (
  7381. value !== this.value ||
  7382. // Deep watchers and watchers on Object/Arrays should fire even
  7383. // when the value is the same, because the value may
  7384. // have mutated.
  7385. isObject(value) ||
  7386. this.deep
  7387. ) {
  7388. // set new value
  7389. var oldValue = this.value;
  7390. this.value = value;
  7391. if (this.user) {
  7392. try {
  7393. this.cb.call(this.vm, value, oldValue);
  7394. } catch (e) {
  7395. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  7396. }
  7397. } else {
  7398. this.cb.call(this.vm, value, oldValue);
  7399. }
  7400. }
  7401. }
  7402. };
  7403. /**
  7404. * Evaluate the value of the watcher.
  7405. * This only gets called for lazy watchers.
  7406. */
  7407. Watcher.prototype.evaluate = function evaluate () {
  7408. this.value = this.get();
  7409. this.dirty = false;
  7410. };
  7411. /**
  7412. * Depend on all deps collected by this watcher.
  7413. */
  7414. Watcher.prototype.depend = function depend () {
  7415. var i = this.deps.length;
  7416. while (i--) {
  7417. this.deps[i].depend();
  7418. }
  7419. };
  7420. /**
  7421. * Remove self from all dependencies' subscriber list.
  7422. */
  7423. Watcher.prototype.teardown = function teardown () {
  7424. if (this.active) {
  7425. // remove self from vm's watcher list
  7426. // this is a somewhat expensive operation so we skip it
  7427. // if the vm is being destroyed.
  7428. if (!this.vm._isBeingDestroyed) {
  7429. remove(this.vm._watchers, this);
  7430. }
  7431. var i = this.deps.length;
  7432. while (i--) {
  7433. this.deps[i].removeSub(this);
  7434. }
  7435. this.active = false;
  7436. }
  7437. };
  7438. /* */
  7439. var sharedPropertyDefinition = {
  7440. enumerable: true,
  7441. configurable: true,
  7442. get: noop,
  7443. set: noop
  7444. };
  7445. function proxy (target, sourceKey, key) {
  7446. sharedPropertyDefinition.get = function proxyGetter () {
  7447. return this[sourceKey][key]
  7448. };
  7449. sharedPropertyDefinition.set = function proxySetter (val) {
  7450. this[sourceKey][key] = val;
  7451. };
  7452. Object.defineProperty(target, key, sharedPropertyDefinition);
  7453. }
  7454. function initState (vm) {
  7455. vm._watchers = [];
  7456. var opts = vm.$options;
  7457. if (opts.props) { initProps(vm, opts.props); }
  7458. if (opts.methods) { initMethods(vm, opts.methods); }
  7459. if (opts.data) {
  7460. initData(vm);
  7461. } else {
  7462. observe(vm._data = {}, true /* asRootData */);
  7463. }
  7464. if (opts.computed) { initComputed(vm, opts.computed); }
  7465. if (opts.watch && opts.watch !== nativeWatch) {
  7466. initWatch(vm, opts.watch);
  7467. }
  7468. }
  7469. function initProps (vm, propsOptions) {
  7470. var propsData = vm.$options.propsData || {};
  7471. var props = vm._props = {};
  7472. // cache prop keys so that future props updates can iterate using Array
  7473. // instead of dynamic object key enumeration.
  7474. var keys = vm.$options._propKeys = [];
  7475. var isRoot = !vm.$parent;
  7476. // root instance props should be converted
  7477. if (!isRoot) {
  7478. toggleObserving(false);
  7479. }
  7480. var loop = function ( key ) {
  7481. keys.push(key);
  7482. var value = validateProp(key, propsOptions, propsData, vm);
  7483. /* istanbul ignore else */
  7484. if (true) {
  7485. var hyphenatedKey = hyphenate(key);
  7486. if (isReservedAttribute(hyphenatedKey) ||
  7487. config.isReservedAttr(hyphenatedKey)) {
  7488. warn(
  7489. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  7490. vm
  7491. );
  7492. }
  7493. defineReactive$$1(props, key, value, function () {
  7494. if (!isRoot && !isUpdatingChildComponent) {
  7495. {
  7496. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  7497. return
  7498. }
  7499. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  7500. if(
  7501. key === 'value' &&
  7502. Array.isArray(vm.$options.behaviors) &&
  7503. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  7504. ){
  7505. return
  7506. }
  7507. if(vm._getFormData){
  7508. return
  7509. }
  7510. var $parent = vm.$parent;
  7511. while($parent){
  7512. if($parent.__next_tick_pending){
  7513. return
  7514. }
  7515. $parent = $parent.$parent;
  7516. }
  7517. }
  7518. warn(
  7519. "Avoid mutating a prop directly since the value will be " +
  7520. "overwritten whenever the parent component re-renders. " +
  7521. "Instead, use a data or computed property based on the prop's " +
  7522. "value. Prop being mutated: \"" + key + "\"",
  7523. vm
  7524. );
  7525. }
  7526. });
  7527. } else {}
  7528. // static props are already proxied on the component's prototype
  7529. // during Vue.extend(). We only need to proxy props defined at
  7530. // instantiation here.
  7531. if (!(key in vm)) {
  7532. proxy(vm, "_props", key);
  7533. }
  7534. };
  7535. for (var key in propsOptions) loop( key );
  7536. toggleObserving(true);
  7537. }
  7538. function initData (vm) {
  7539. var data = vm.$options.data;
  7540. data = vm._data = typeof data === 'function'
  7541. ? getData(data, vm)
  7542. : data || {};
  7543. if (!isPlainObject(data)) {
  7544. data = {};
  7545. true && warn(
  7546. 'data functions should return an object:\n' +
  7547. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  7548. vm
  7549. );
  7550. }
  7551. // proxy data on instance
  7552. var keys = Object.keys(data);
  7553. var props = vm.$options.props;
  7554. var methods = vm.$options.methods;
  7555. var i = keys.length;
  7556. while (i--) {
  7557. var key = keys[i];
  7558. if (true) {
  7559. if (methods && hasOwn(methods, key)) {
  7560. warn(
  7561. ("Method \"" + key + "\" has already been defined as a data property."),
  7562. vm
  7563. );
  7564. }
  7565. }
  7566. if (props && hasOwn(props, key)) {
  7567. true && warn(
  7568. "The data property \"" + key + "\" is already declared as a prop. " +
  7569. "Use prop default value instead.",
  7570. vm
  7571. );
  7572. } else if (!isReserved(key)) {
  7573. proxy(vm, "_data", key);
  7574. }
  7575. }
  7576. // observe data
  7577. observe(data, true /* asRootData */);
  7578. }
  7579. function getData (data, vm) {
  7580. // #7573 disable dep collection when invoking data getters
  7581. pushTarget();
  7582. try {
  7583. return data.call(vm, vm)
  7584. } catch (e) {
  7585. handleError(e, vm, "data()");
  7586. return {}
  7587. } finally {
  7588. popTarget();
  7589. }
  7590. }
  7591. var computedWatcherOptions = { lazy: true };
  7592. function initComputed (vm, computed) {
  7593. // $flow-disable-line
  7594. var watchers = vm._computedWatchers = Object.create(null);
  7595. // computed properties are just getters during SSR
  7596. var isSSR = isServerRendering();
  7597. for (var key in computed) {
  7598. var userDef = computed[key];
  7599. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  7600. if ( true && getter == null) {
  7601. warn(
  7602. ("Getter is missing for computed property \"" + key + "\"."),
  7603. vm
  7604. );
  7605. }
  7606. if (!isSSR) {
  7607. // create internal watcher for the computed property.
  7608. watchers[key] = new Watcher(
  7609. vm,
  7610. getter || noop,
  7611. noop,
  7612. computedWatcherOptions
  7613. );
  7614. }
  7615. // component-defined computed properties are already defined on the
  7616. // component prototype. We only need to define computed properties defined
  7617. // at instantiation here.
  7618. if (!(key in vm)) {
  7619. defineComputed(vm, key, userDef);
  7620. } else if (true) {
  7621. if (key in vm.$data) {
  7622. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  7623. } else if (vm.$options.props && key in vm.$options.props) {
  7624. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  7625. }
  7626. }
  7627. }
  7628. }
  7629. function defineComputed (
  7630. target,
  7631. key,
  7632. userDef
  7633. ) {
  7634. var shouldCache = !isServerRendering();
  7635. if (typeof userDef === 'function') {
  7636. sharedPropertyDefinition.get = shouldCache
  7637. ? createComputedGetter(key)
  7638. : createGetterInvoker(userDef);
  7639. sharedPropertyDefinition.set = noop;
  7640. } else {
  7641. sharedPropertyDefinition.get = userDef.get
  7642. ? shouldCache && userDef.cache !== false
  7643. ? createComputedGetter(key)
  7644. : createGetterInvoker(userDef.get)
  7645. : noop;
  7646. sharedPropertyDefinition.set = userDef.set || noop;
  7647. }
  7648. if ( true &&
  7649. sharedPropertyDefinition.set === noop) {
  7650. sharedPropertyDefinition.set = function () {
  7651. warn(
  7652. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  7653. this
  7654. );
  7655. };
  7656. }
  7657. Object.defineProperty(target, key, sharedPropertyDefinition);
  7658. }
  7659. function createComputedGetter (key) {
  7660. return function computedGetter () {
  7661. var watcher = this._computedWatchers && this._computedWatchers[key];
  7662. if (watcher) {
  7663. if (watcher.dirty) {
  7664. watcher.evaluate();
  7665. }
  7666. if (Dep.SharedObject.target) {// fixed by xxxxxx
  7667. watcher.depend();
  7668. }
  7669. return watcher.value
  7670. }
  7671. }
  7672. }
  7673. function createGetterInvoker(fn) {
  7674. return function computedGetter () {
  7675. return fn.call(this, this)
  7676. }
  7677. }
  7678. function initMethods (vm, methods) {
  7679. var props = vm.$options.props;
  7680. for (var key in methods) {
  7681. if (true) {
  7682. if (typeof methods[key] !== 'function') {
  7683. warn(
  7684. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  7685. "Did you reference the function correctly?",
  7686. vm
  7687. );
  7688. }
  7689. if (props && hasOwn(props, key)) {
  7690. warn(
  7691. ("Method \"" + key + "\" has already been defined as a prop."),
  7692. vm
  7693. );
  7694. }
  7695. if ((key in vm) && isReserved(key)) {
  7696. warn(
  7697. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  7698. "Avoid defining component methods that start with _ or $."
  7699. );
  7700. }
  7701. }
  7702. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  7703. }
  7704. }
  7705. function initWatch (vm, watch) {
  7706. for (var key in watch) {
  7707. var handler = watch[key];
  7708. if (Array.isArray(handler)) {
  7709. for (var i = 0; i < handler.length; i++) {
  7710. createWatcher(vm, key, handler[i]);
  7711. }
  7712. } else {
  7713. createWatcher(vm, key, handler);
  7714. }
  7715. }
  7716. }
  7717. function createWatcher (
  7718. vm,
  7719. expOrFn,
  7720. handler,
  7721. options
  7722. ) {
  7723. if (isPlainObject(handler)) {
  7724. options = handler;
  7725. handler = handler.handler;
  7726. }
  7727. if (typeof handler === 'string') {
  7728. handler = vm[handler];
  7729. }
  7730. return vm.$watch(expOrFn, handler, options)
  7731. }
  7732. function stateMixin (Vue) {
  7733. // flow somehow has problems with directly declared definition object
  7734. // when using Object.defineProperty, so we have to procedurally build up
  7735. // the object here.
  7736. var dataDef = {};
  7737. dataDef.get = function () { return this._data };
  7738. var propsDef = {};
  7739. propsDef.get = function () { return this._props };
  7740. if (true) {
  7741. dataDef.set = function () {
  7742. warn(
  7743. 'Avoid replacing instance root $data. ' +
  7744. 'Use nested data properties instead.',
  7745. this
  7746. );
  7747. };
  7748. propsDef.set = function () {
  7749. warn("$props is readonly.", this);
  7750. };
  7751. }
  7752. Object.defineProperty(Vue.prototype, '$data', dataDef);
  7753. Object.defineProperty(Vue.prototype, '$props', propsDef);
  7754. Vue.prototype.$set = set;
  7755. Vue.prototype.$delete = del;
  7756. Vue.prototype.$watch = function (
  7757. expOrFn,
  7758. cb,
  7759. options
  7760. ) {
  7761. var vm = this;
  7762. if (isPlainObject(cb)) {
  7763. return createWatcher(vm, expOrFn, cb, options)
  7764. }
  7765. options = options || {};
  7766. options.user = true;
  7767. var watcher = new Watcher(vm, expOrFn, cb, options);
  7768. if (options.immediate) {
  7769. try {
  7770. cb.call(vm, watcher.value);
  7771. } catch (error) {
  7772. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  7773. }
  7774. }
  7775. return function unwatchFn () {
  7776. watcher.teardown();
  7777. }
  7778. };
  7779. }
  7780. /* */
  7781. var uid$3 = 0;
  7782. function initMixin (Vue) {
  7783. Vue.prototype._init = function (options) {
  7784. var vm = this;
  7785. // a uid
  7786. vm._uid = uid$3++;
  7787. var startTag, endTag;
  7788. /* istanbul ignore if */
  7789. if ( true && config.performance && mark) {
  7790. startTag = "vue-perf-start:" + (vm._uid);
  7791. endTag = "vue-perf-end:" + (vm._uid);
  7792. mark(startTag);
  7793. }
  7794. // a flag to avoid this being observed
  7795. vm._isVue = true;
  7796. // merge options
  7797. if (options && options._isComponent) {
  7798. // optimize internal component instantiation
  7799. // since dynamic options merging is pretty slow, and none of the
  7800. // internal component options needs special treatment.
  7801. initInternalComponent(vm, options);
  7802. } else {
  7803. vm.$options = mergeOptions(
  7804. resolveConstructorOptions(vm.constructor),
  7805. options || {},
  7806. vm
  7807. );
  7808. }
  7809. /* istanbul ignore else */
  7810. if (true) {
  7811. initProxy(vm);
  7812. } else {}
  7813. // expose real self
  7814. vm._self = vm;
  7815. initLifecycle(vm);
  7816. initEvents(vm);
  7817. initRender(vm);
  7818. callHook(vm, 'beforeCreate');
  7819. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  7820. initState(vm);
  7821. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  7822. !vm._$fallback && callHook(vm, 'created');
  7823. /* istanbul ignore if */
  7824. if ( true && config.performance && mark) {
  7825. vm._name = formatComponentName(vm, false);
  7826. mark(endTag);
  7827. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  7828. }
  7829. if (vm.$options.el) {
  7830. vm.$mount(vm.$options.el);
  7831. }
  7832. };
  7833. }
  7834. function initInternalComponent (vm, options) {
  7835. var opts = vm.$options = Object.create(vm.constructor.options);
  7836. // doing this because it's faster than dynamic enumeration.
  7837. var parentVnode = options._parentVnode;
  7838. opts.parent = options.parent;
  7839. opts._parentVnode = parentVnode;
  7840. var vnodeComponentOptions = parentVnode.componentOptions;
  7841. opts.propsData = vnodeComponentOptions.propsData;
  7842. opts._parentListeners = vnodeComponentOptions.listeners;
  7843. opts._renderChildren = vnodeComponentOptions.children;
  7844. opts._componentTag = vnodeComponentOptions.tag;
  7845. if (options.render) {
  7846. opts.render = options.render;
  7847. opts.staticRenderFns = options.staticRenderFns;
  7848. }
  7849. }
  7850. function resolveConstructorOptions (Ctor) {
  7851. var options = Ctor.options;
  7852. if (Ctor.super) {
  7853. var superOptions = resolveConstructorOptions(Ctor.super);
  7854. var cachedSuperOptions = Ctor.superOptions;
  7855. if (superOptions !== cachedSuperOptions) {
  7856. // super option changed,
  7857. // need to resolve new options.
  7858. Ctor.superOptions = superOptions;
  7859. // check if there are any late-modified/attached options (#4976)
  7860. var modifiedOptions = resolveModifiedOptions(Ctor);
  7861. // update base extend options
  7862. if (modifiedOptions) {
  7863. extend(Ctor.extendOptions, modifiedOptions);
  7864. }
  7865. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  7866. if (options.name) {
  7867. options.components[options.name] = Ctor;
  7868. }
  7869. }
  7870. }
  7871. return options
  7872. }
  7873. function resolveModifiedOptions (Ctor) {
  7874. var modified;
  7875. var latest = Ctor.options;
  7876. var sealed = Ctor.sealedOptions;
  7877. for (var key in latest) {
  7878. if (latest[key] !== sealed[key]) {
  7879. if (!modified) { modified = {}; }
  7880. modified[key] = latest[key];
  7881. }
  7882. }
  7883. return modified
  7884. }
  7885. function Vue (options) {
  7886. if ( true &&
  7887. !(this instanceof Vue)
  7888. ) {
  7889. warn('Vue is a constructor and should be called with the `new` keyword');
  7890. }
  7891. this._init(options);
  7892. }
  7893. initMixin(Vue);
  7894. stateMixin(Vue);
  7895. eventsMixin(Vue);
  7896. lifecycleMixin(Vue);
  7897. renderMixin(Vue);
  7898. /* */
  7899. function initUse (Vue) {
  7900. Vue.use = function (plugin) {
  7901. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  7902. if (installedPlugins.indexOf(plugin) > -1) {
  7903. return this
  7904. }
  7905. // additional parameters
  7906. var args = toArray(arguments, 1);
  7907. args.unshift(this);
  7908. if (typeof plugin.install === 'function') {
  7909. plugin.install.apply(plugin, args);
  7910. } else if (typeof plugin === 'function') {
  7911. plugin.apply(null, args);
  7912. }
  7913. installedPlugins.push(plugin);
  7914. return this
  7915. };
  7916. }
  7917. /* */
  7918. function initMixin$1 (Vue) {
  7919. Vue.mixin = function (mixin) {
  7920. this.options = mergeOptions(this.options, mixin);
  7921. return this
  7922. };
  7923. }
  7924. /* */
  7925. function initExtend (Vue) {
  7926. /**
  7927. * Each instance constructor, including Vue, has a unique
  7928. * cid. This enables us to create wrapped "child
  7929. * constructors" for prototypal inheritance and cache them.
  7930. */
  7931. Vue.cid = 0;
  7932. var cid = 1;
  7933. /**
  7934. * Class inheritance
  7935. */
  7936. Vue.extend = function (extendOptions) {
  7937. extendOptions = extendOptions || {};
  7938. var Super = this;
  7939. var SuperId = Super.cid;
  7940. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  7941. if (cachedCtors[SuperId]) {
  7942. return cachedCtors[SuperId]
  7943. }
  7944. var name = extendOptions.name || Super.options.name;
  7945. if ( true && name) {
  7946. validateComponentName(name);
  7947. }
  7948. var Sub = function VueComponent (options) {
  7949. this._init(options);
  7950. };
  7951. Sub.prototype = Object.create(Super.prototype);
  7952. Sub.prototype.constructor = Sub;
  7953. Sub.cid = cid++;
  7954. Sub.options = mergeOptions(
  7955. Super.options,
  7956. extendOptions
  7957. );
  7958. Sub['super'] = Super;
  7959. // For props and computed properties, we define the proxy getters on
  7960. // the Vue instances at extension time, on the extended prototype. This
  7961. // avoids Object.defineProperty calls for each instance created.
  7962. if (Sub.options.props) {
  7963. initProps$1(Sub);
  7964. }
  7965. if (Sub.options.computed) {
  7966. initComputed$1(Sub);
  7967. }
  7968. // allow further extension/mixin/plugin usage
  7969. Sub.extend = Super.extend;
  7970. Sub.mixin = Super.mixin;
  7971. Sub.use = Super.use;
  7972. // create asset registers, so extended classes
  7973. // can have their private assets too.
  7974. ASSET_TYPES.forEach(function (type) {
  7975. Sub[type] = Super[type];
  7976. });
  7977. // enable recursive self-lookup
  7978. if (name) {
  7979. Sub.options.components[name] = Sub;
  7980. }
  7981. // keep a reference to the super options at extension time.
  7982. // later at instantiation we can check if Super's options have
  7983. // been updated.
  7984. Sub.superOptions = Super.options;
  7985. Sub.extendOptions = extendOptions;
  7986. Sub.sealedOptions = extend({}, Sub.options);
  7987. // cache constructor
  7988. cachedCtors[SuperId] = Sub;
  7989. return Sub
  7990. };
  7991. }
  7992. function initProps$1 (Comp) {
  7993. var props = Comp.options.props;
  7994. for (var key in props) {
  7995. proxy(Comp.prototype, "_props", key);
  7996. }
  7997. }
  7998. function initComputed$1 (Comp) {
  7999. var computed = Comp.options.computed;
  8000. for (var key in computed) {
  8001. defineComputed(Comp.prototype, key, computed[key]);
  8002. }
  8003. }
  8004. /* */
  8005. function initAssetRegisters (Vue) {
  8006. /**
  8007. * Create asset registration methods.
  8008. */
  8009. ASSET_TYPES.forEach(function (type) {
  8010. Vue[type] = function (
  8011. id,
  8012. definition
  8013. ) {
  8014. if (!definition) {
  8015. return this.options[type + 's'][id]
  8016. } else {
  8017. /* istanbul ignore if */
  8018. if ( true && type === 'component') {
  8019. validateComponentName(id);
  8020. }
  8021. if (type === 'component' && isPlainObject(definition)) {
  8022. definition.name = definition.name || id;
  8023. definition = this.options._base.extend(definition);
  8024. }
  8025. if (type === 'directive' && typeof definition === 'function') {
  8026. definition = { bind: definition, update: definition };
  8027. }
  8028. this.options[type + 's'][id] = definition;
  8029. return definition
  8030. }
  8031. };
  8032. });
  8033. }
  8034. /* */
  8035. function getComponentName (opts) {
  8036. return opts && (opts.Ctor.options.name || opts.tag)
  8037. }
  8038. function matches (pattern, name) {
  8039. if (Array.isArray(pattern)) {
  8040. return pattern.indexOf(name) > -1
  8041. } else if (typeof pattern === 'string') {
  8042. return pattern.split(',').indexOf(name) > -1
  8043. } else if (isRegExp(pattern)) {
  8044. return pattern.test(name)
  8045. }
  8046. /* istanbul ignore next */
  8047. return false
  8048. }
  8049. function pruneCache (keepAliveInstance, filter) {
  8050. var cache = keepAliveInstance.cache;
  8051. var keys = keepAliveInstance.keys;
  8052. var _vnode = keepAliveInstance._vnode;
  8053. for (var key in cache) {
  8054. var cachedNode = cache[key];
  8055. if (cachedNode) {
  8056. var name = getComponentName(cachedNode.componentOptions);
  8057. if (name && !filter(name)) {
  8058. pruneCacheEntry(cache, key, keys, _vnode);
  8059. }
  8060. }
  8061. }
  8062. }
  8063. function pruneCacheEntry (
  8064. cache,
  8065. key,
  8066. keys,
  8067. current
  8068. ) {
  8069. var cached$$1 = cache[key];
  8070. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  8071. cached$$1.componentInstance.$destroy();
  8072. }
  8073. cache[key] = null;
  8074. remove(keys, key);
  8075. }
  8076. var patternTypes = [String, RegExp, Array];
  8077. var KeepAlive = {
  8078. name: 'keep-alive',
  8079. abstract: true,
  8080. props: {
  8081. include: patternTypes,
  8082. exclude: patternTypes,
  8083. max: [String, Number]
  8084. },
  8085. created: function created () {
  8086. this.cache = Object.create(null);
  8087. this.keys = [];
  8088. },
  8089. destroyed: function destroyed () {
  8090. for (var key in this.cache) {
  8091. pruneCacheEntry(this.cache, key, this.keys);
  8092. }
  8093. },
  8094. mounted: function mounted () {
  8095. var this$1 = this;
  8096. this.$watch('include', function (val) {
  8097. pruneCache(this$1, function (name) { return matches(val, name); });
  8098. });
  8099. this.$watch('exclude', function (val) {
  8100. pruneCache(this$1, function (name) { return !matches(val, name); });
  8101. });
  8102. },
  8103. render: function render () {
  8104. var slot = this.$slots.default;
  8105. var vnode = getFirstComponentChild(slot);
  8106. var componentOptions = vnode && vnode.componentOptions;
  8107. if (componentOptions) {
  8108. // check pattern
  8109. var name = getComponentName(componentOptions);
  8110. var ref = this;
  8111. var include = ref.include;
  8112. var exclude = ref.exclude;
  8113. if (
  8114. // not included
  8115. (include && (!name || !matches(include, name))) ||
  8116. // excluded
  8117. (exclude && name && matches(exclude, name))
  8118. ) {
  8119. return vnode
  8120. }
  8121. var ref$1 = this;
  8122. var cache = ref$1.cache;
  8123. var keys = ref$1.keys;
  8124. var key = vnode.key == null
  8125. // same constructor may get registered as different local components
  8126. // so cid alone is not enough (#3269)
  8127. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  8128. : vnode.key;
  8129. if (cache[key]) {
  8130. vnode.componentInstance = cache[key].componentInstance;
  8131. // make current key freshest
  8132. remove(keys, key);
  8133. keys.push(key);
  8134. } else {
  8135. cache[key] = vnode;
  8136. keys.push(key);
  8137. // prune oldest entry
  8138. if (this.max && keys.length > parseInt(this.max)) {
  8139. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  8140. }
  8141. }
  8142. vnode.data.keepAlive = true;
  8143. }
  8144. return vnode || (slot && slot[0])
  8145. }
  8146. };
  8147. var builtInComponents = {
  8148. KeepAlive: KeepAlive
  8149. };
  8150. /* */
  8151. function initGlobalAPI (Vue) {
  8152. // config
  8153. var configDef = {};
  8154. configDef.get = function () { return config; };
  8155. if (true) {
  8156. configDef.set = function () {
  8157. warn(
  8158. 'Do not replace the Vue.config object, set individual fields instead.'
  8159. );
  8160. };
  8161. }
  8162. Object.defineProperty(Vue, 'config', configDef);
  8163. // exposed util methods.
  8164. // NOTE: these are not considered part of the public API - avoid relying on
  8165. // them unless you are aware of the risk.
  8166. Vue.util = {
  8167. warn: warn,
  8168. extend: extend,
  8169. mergeOptions: mergeOptions,
  8170. defineReactive: defineReactive$$1
  8171. };
  8172. Vue.set = set;
  8173. Vue.delete = del;
  8174. Vue.nextTick = nextTick;
  8175. // 2.6 explicit observable API
  8176. Vue.observable = function (obj) {
  8177. observe(obj);
  8178. return obj
  8179. };
  8180. Vue.options = Object.create(null);
  8181. ASSET_TYPES.forEach(function (type) {
  8182. Vue.options[type + 's'] = Object.create(null);
  8183. });
  8184. // this is used to identify the "base" constructor to extend all plain-object
  8185. // components with in Weex's multi-instance scenarios.
  8186. Vue.options._base = Vue;
  8187. extend(Vue.options.components, builtInComponents);
  8188. initUse(Vue);
  8189. initMixin$1(Vue);
  8190. initExtend(Vue);
  8191. initAssetRegisters(Vue);
  8192. }
  8193. initGlobalAPI(Vue);
  8194. Object.defineProperty(Vue.prototype, '$isServer', {
  8195. get: isServerRendering
  8196. });
  8197. Object.defineProperty(Vue.prototype, '$ssrContext', {
  8198. get: function get () {
  8199. /* istanbul ignore next */
  8200. return this.$vnode && this.$vnode.ssrContext
  8201. }
  8202. });
  8203. // expose FunctionalRenderContext for ssr runtime helper installation
  8204. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  8205. value: FunctionalRenderContext
  8206. });
  8207. Vue.version = '2.6.11';
  8208. /**
  8209. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  8210. */
  8211. var ARRAYTYPE = '[object Array]';
  8212. var OBJECTTYPE = '[object Object]';
  8213. var NULLTYPE = '[object Null]';
  8214. var UNDEFINEDTYPE = '[object Undefined]';
  8215. // const FUNCTIONTYPE = '[object Function]'
  8216. function diff(current, pre) {
  8217. var result = {};
  8218. syncKeys(current, pre);
  8219. _diff(current, pre, '', result);
  8220. return result
  8221. }
  8222. function syncKeys(current, pre) {
  8223. if (current === pre) { return }
  8224. var rootCurrentType = type(current);
  8225. var rootPreType = type(pre);
  8226. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  8227. if(Object.keys(current).length >= Object.keys(pre).length){
  8228. for (var key in pre) {
  8229. var currentValue = current[key];
  8230. if (currentValue === undefined) {
  8231. current[key] = null;
  8232. } else {
  8233. syncKeys(currentValue, pre[key]);
  8234. }
  8235. }
  8236. }
  8237. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  8238. if (current.length >= pre.length) {
  8239. pre.forEach(function (item, index) {
  8240. syncKeys(current[index], item);
  8241. });
  8242. }
  8243. }
  8244. }
  8245. function nullOrUndefined(currentType, preType) {
  8246. if(
  8247. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  8248. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  8249. ) {
  8250. return false
  8251. }
  8252. return true
  8253. }
  8254. function _diff(current, pre, path, result) {
  8255. if (current === pre) { return }
  8256. var rootCurrentType = type(current);
  8257. var rootPreType = type(pre);
  8258. if (rootCurrentType == OBJECTTYPE) {
  8259. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  8260. setResult(result, path, current);
  8261. } else {
  8262. var loop = function ( key ) {
  8263. var currentValue = current[key];
  8264. var preValue = pre[key];
  8265. var currentType = type(currentValue);
  8266. var preType = type(preValue);
  8267. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  8268. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  8269. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8270. }
  8271. } else if (currentType == ARRAYTYPE) {
  8272. if (preType != ARRAYTYPE) {
  8273. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8274. } else {
  8275. if (currentValue.length < preValue.length) {
  8276. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8277. } else {
  8278. currentValue.forEach(function (item, index) {
  8279. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  8280. });
  8281. }
  8282. }
  8283. } else if (currentType == OBJECTTYPE) {
  8284. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  8285. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8286. } else {
  8287. for (var subKey in currentValue) {
  8288. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  8289. }
  8290. }
  8291. }
  8292. };
  8293. for (var key in current) loop( key );
  8294. }
  8295. } else if (rootCurrentType == ARRAYTYPE) {
  8296. if (rootPreType != ARRAYTYPE) {
  8297. setResult(result, path, current);
  8298. } else {
  8299. if (current.length < pre.length) {
  8300. setResult(result, path, current);
  8301. } else {
  8302. current.forEach(function (item, index) {
  8303. _diff(item, pre[index], path + '[' + index + ']', result);
  8304. });
  8305. }
  8306. }
  8307. } else {
  8308. setResult(result, path, current);
  8309. }
  8310. }
  8311. function setResult(result, k, v) {
  8312. // if (type(v) != FUNCTIONTYPE) {
  8313. result[k] = v;
  8314. // }
  8315. }
  8316. function type(obj) {
  8317. return Object.prototype.toString.call(obj)
  8318. }
  8319. /* */
  8320. function flushCallbacks$1(vm) {
  8321. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  8322. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"yelaixiang-h5","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8323. var mpInstance = vm.$scope;
  8324. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8325. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  8326. }
  8327. var copies = vm.__next_tick_callbacks.slice(0);
  8328. vm.__next_tick_callbacks.length = 0;
  8329. for (var i = 0; i < copies.length; i++) {
  8330. copies[i]();
  8331. }
  8332. }
  8333. }
  8334. function hasRenderWatcher(vm) {
  8335. return queue.find(function (watcher) { return vm._watcher === watcher; })
  8336. }
  8337. function nextTick$1(vm, cb) {
  8338. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  8339. //2.nextTick 之前存在 render watcher
  8340. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  8341. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"yelaixiang-h5","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8342. var mpInstance = vm.$scope;
  8343. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8344. ']:nextVueTick');
  8345. }
  8346. return nextTick(cb, vm)
  8347. }else{
  8348. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"yelaixiang-h5","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8349. var mpInstance$1 = vm.$scope;
  8350. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  8351. ']:nextMPTick');
  8352. }
  8353. }
  8354. var _resolve;
  8355. if (!vm.__next_tick_callbacks) {
  8356. vm.__next_tick_callbacks = [];
  8357. }
  8358. vm.__next_tick_callbacks.push(function () {
  8359. if (cb) {
  8360. try {
  8361. cb.call(vm);
  8362. } catch (e) {
  8363. handleError(e, vm, 'nextTick');
  8364. }
  8365. } else if (_resolve) {
  8366. _resolve(vm);
  8367. }
  8368. });
  8369. // $flow-disable-line
  8370. if (!cb && typeof Promise !== 'undefined') {
  8371. return new Promise(function (resolve) {
  8372. _resolve = resolve;
  8373. })
  8374. }
  8375. }
  8376. /* */
  8377. function clearInstance(key, value) {
  8378. // 简易去除 Vue 和小程序组件实例
  8379. if (value) {
  8380. if (value._isVue || value.__v_isMPComponent) {
  8381. return {}
  8382. }
  8383. }
  8384. return value
  8385. }
  8386. function cloneWithData(vm) {
  8387. // 确保当前 vm 所有数据被同步
  8388. var ret = Object.create(null);
  8389. var dataKeys = [].concat(
  8390. Object.keys(vm._data || {}),
  8391. Object.keys(vm._computedWatchers || {}));
  8392. dataKeys.reduce(function(ret, key) {
  8393. ret[key] = vm[key];
  8394. return ret
  8395. }, ret);
  8396. // vue-composition-api
  8397. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  8398. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  8399. if (rawBindings) {
  8400. Object.keys(rawBindings).forEach(function (key) {
  8401. ret[key] = vm[key];
  8402. });
  8403. }
  8404. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  8405. Object.assign(ret, vm.$mp.data || {});
  8406. if (
  8407. Array.isArray(vm.$options.behaviors) &&
  8408. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8409. ) { //form-field
  8410. ret['name'] = vm.name;
  8411. ret['value'] = vm.value;
  8412. }
  8413. return JSON.parse(JSON.stringify(ret, clearInstance))
  8414. }
  8415. var patch = function(oldVnode, vnode) {
  8416. var this$1 = this;
  8417. if (vnode === null) { //destroy
  8418. return
  8419. }
  8420. if (this.mpType === 'page' || this.mpType === 'component') {
  8421. var mpInstance = this.$scope;
  8422. var data = Object.create(null);
  8423. try {
  8424. data = cloneWithData(this);
  8425. } catch (err) {
  8426. console.error(err);
  8427. }
  8428. data.__webviewId__ = mpInstance.data.__webviewId__;
  8429. var mpData = Object.create(null);
  8430. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  8431. mpData[key] = mpInstance.data[key];
  8432. });
  8433. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  8434. if (Object.keys(diffData).length) {
  8435. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"yelaixiang-h5","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8436. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  8437. ']差量更新',
  8438. JSON.stringify(diffData));
  8439. }
  8440. this.__next_tick_pending = true;
  8441. mpInstance.setData(diffData, function () {
  8442. this$1.__next_tick_pending = false;
  8443. flushCallbacks$1(this$1);
  8444. });
  8445. } else {
  8446. flushCallbacks$1(this);
  8447. }
  8448. }
  8449. };
  8450. /* */
  8451. function createEmptyRender() {
  8452. }
  8453. function mountComponent$1(
  8454. vm,
  8455. el,
  8456. hydrating
  8457. ) {
  8458. if (!vm.mpType) {//main.js 中的 new Vue
  8459. return vm
  8460. }
  8461. if (vm.mpType === 'app') {
  8462. vm.$options.render = createEmptyRender;
  8463. }
  8464. if (!vm.$options.render) {
  8465. vm.$options.render = createEmptyRender;
  8466. if (true) {
  8467. /* istanbul ignore if */
  8468. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  8469. vm.$options.el || el) {
  8470. warn(
  8471. 'You are using the runtime-only build of Vue where the template ' +
  8472. 'compiler is not available. Either pre-compile the templates into ' +
  8473. 'render functions, or use the compiler-included build.',
  8474. vm
  8475. );
  8476. } else {
  8477. warn(
  8478. 'Failed to mount component: template or render function not defined.',
  8479. vm
  8480. );
  8481. }
  8482. }
  8483. }
  8484. !vm._$fallback && callHook(vm, 'beforeMount');
  8485. var updateComponent = function () {
  8486. vm._update(vm._render(), hydrating);
  8487. };
  8488. // we set this to vm._watcher inside the watcher's constructor
  8489. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  8490. // component's mounted hook), which relies on vm._watcher being already defined
  8491. new Watcher(vm, updateComponent, noop, {
  8492. before: function before() {
  8493. if (vm._isMounted && !vm._isDestroyed) {
  8494. callHook(vm, 'beforeUpdate');
  8495. }
  8496. }
  8497. }, true /* isRenderWatcher */);
  8498. hydrating = false;
  8499. return vm
  8500. }
  8501. /* */
  8502. function renderClass (
  8503. staticClass,
  8504. dynamicClass
  8505. ) {
  8506. if (isDef(staticClass) || isDef(dynamicClass)) {
  8507. return concat(staticClass, stringifyClass(dynamicClass))
  8508. }
  8509. /* istanbul ignore next */
  8510. return ''
  8511. }
  8512. function concat (a, b) {
  8513. return a ? b ? (a + ' ' + b) : a : (b || '')
  8514. }
  8515. function stringifyClass (value) {
  8516. if (Array.isArray(value)) {
  8517. return stringifyArray(value)
  8518. }
  8519. if (isObject(value)) {
  8520. return stringifyObject(value)
  8521. }
  8522. if (typeof value === 'string') {
  8523. return value
  8524. }
  8525. /* istanbul ignore next */
  8526. return ''
  8527. }
  8528. function stringifyArray (value) {
  8529. var res = '';
  8530. var stringified;
  8531. for (var i = 0, l = value.length; i < l; i++) {
  8532. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  8533. if (res) { res += ' '; }
  8534. res += stringified;
  8535. }
  8536. }
  8537. return res
  8538. }
  8539. function stringifyObject (value) {
  8540. var res = '';
  8541. for (var key in value) {
  8542. if (value[key]) {
  8543. if (res) { res += ' '; }
  8544. res += key;
  8545. }
  8546. }
  8547. return res
  8548. }
  8549. /* */
  8550. var parseStyleText = cached(function (cssText) {
  8551. var res = {};
  8552. var listDelimiter = /;(?![^(]*\))/g;
  8553. var propertyDelimiter = /:(.+)/;
  8554. cssText.split(listDelimiter).forEach(function (item) {
  8555. if (item) {
  8556. var tmp = item.split(propertyDelimiter);
  8557. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  8558. }
  8559. });
  8560. return res
  8561. });
  8562. // normalize possible array / string values into Object
  8563. function normalizeStyleBinding (bindingStyle) {
  8564. if (Array.isArray(bindingStyle)) {
  8565. return toObject(bindingStyle)
  8566. }
  8567. if (typeof bindingStyle === 'string') {
  8568. return parseStyleText(bindingStyle)
  8569. }
  8570. return bindingStyle
  8571. }
  8572. /* */
  8573. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  8574. function getTarget(obj, path) {
  8575. var parts = path.split('.');
  8576. var key = parts[0];
  8577. if (key.indexOf('__$n') === 0) { //number index
  8578. key = parseInt(key.replace('__$n', ''));
  8579. }
  8580. if (parts.length === 1) {
  8581. return obj[key]
  8582. }
  8583. return getTarget(obj[key], parts.slice(1).join('.'))
  8584. }
  8585. function internalMixin(Vue) {
  8586. Vue.config.errorHandler = function(err, vm, info) {
  8587. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  8588. console.error(err);
  8589. /* eslint-disable no-undef */
  8590. var app = typeof getApp === 'function' && getApp();
  8591. if (app && app.onError) {
  8592. app.onError(err);
  8593. }
  8594. };
  8595. var oldEmit = Vue.prototype.$emit;
  8596. Vue.prototype.$emit = function(event) {
  8597. if (this.$scope && event) {
  8598. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  8599. if (triggerEvent) {
  8600. try {
  8601. triggerEvent.call(this.$scope, event, {
  8602. __args__: toArray(arguments, 1)
  8603. });
  8604. } catch (error) {
  8605. }
  8606. }
  8607. }
  8608. return oldEmit.apply(this, arguments)
  8609. };
  8610. Vue.prototype.$nextTick = function(fn) {
  8611. return nextTick$1(this, fn)
  8612. };
  8613. MP_METHODS.forEach(function (method) {
  8614. Vue.prototype[method] = function(args) {
  8615. if (this.$scope && this.$scope[method]) {
  8616. return this.$scope[method](args)
  8617. }
  8618. // mp-alipay
  8619. if (typeof my === 'undefined') {
  8620. return
  8621. }
  8622. if (method === 'createSelectorQuery') {
  8623. /* eslint-disable no-undef */
  8624. return my.createSelectorQuery(args)
  8625. } else if (method === 'createIntersectionObserver') {
  8626. /* eslint-disable no-undef */
  8627. return my.createIntersectionObserver(args)
  8628. }
  8629. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  8630. };
  8631. });
  8632. Vue.prototype.__init_provide = initProvide;
  8633. Vue.prototype.__init_injections = initInjections;
  8634. Vue.prototype.__call_hook = function(hook, args) {
  8635. var vm = this;
  8636. // #7573 disable dep collection when invoking lifecycle hooks
  8637. pushTarget();
  8638. var handlers = vm.$options[hook];
  8639. var info = hook + " hook";
  8640. var ret;
  8641. if (handlers) {
  8642. for (var i = 0, j = handlers.length; i < j; i++) {
  8643. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  8644. }
  8645. }
  8646. if (vm._hasHookEvent) {
  8647. vm.$emit('hook:' + hook, args);
  8648. }
  8649. popTarget();
  8650. return ret
  8651. };
  8652. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  8653. if (Array.isArray(modifiers)) {
  8654. if (modifiers.indexOf('trim') !== -1) {
  8655. value = value.trim();
  8656. }
  8657. if (modifiers.indexOf('number') !== -1) {
  8658. value = this._n(value);
  8659. }
  8660. }
  8661. if (!target) {
  8662. target = this;
  8663. }
  8664. // 解决动态属性添加
  8665. Vue.set(target, key, value);
  8666. };
  8667. Vue.prototype.__set_sync = function(target, key, value) {
  8668. if (!target) {
  8669. target = this;
  8670. }
  8671. // 解决动态属性添加
  8672. Vue.set(target, key, value);
  8673. };
  8674. Vue.prototype.__get_orig = function(item) {
  8675. if (isPlainObject(item)) {
  8676. return item['$orig'] || item
  8677. }
  8678. return item
  8679. };
  8680. Vue.prototype.__get_value = function(dataPath, target) {
  8681. return getTarget(target || this, dataPath)
  8682. };
  8683. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  8684. return renderClass(staticClass, dynamicClass)
  8685. };
  8686. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  8687. if (!dynamicStyle && !staticStyle) {
  8688. return ''
  8689. }
  8690. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  8691. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  8692. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  8693. };
  8694. Vue.prototype.__map = function(val, iteratee) {
  8695. //TODO 暂不考虑 string
  8696. var ret, i, l, keys, key;
  8697. if (Array.isArray(val)) {
  8698. ret = new Array(val.length);
  8699. for (i = 0, l = val.length; i < l; i++) {
  8700. ret[i] = iteratee(val[i], i);
  8701. }
  8702. return ret
  8703. } else if (isObject(val)) {
  8704. keys = Object.keys(val);
  8705. ret = Object.create(null);
  8706. for (i = 0, l = keys.length; i < l; i++) {
  8707. key = keys[i];
  8708. ret[key] = iteratee(val[key], key, i);
  8709. }
  8710. return ret
  8711. } else if (typeof val === 'number') {
  8712. ret = new Array(val);
  8713. for (i = 0, l = val; i < l; i++) {
  8714. // 第一个参数暂时仍和小程序一致
  8715. ret[i] = iteratee(i, i);
  8716. }
  8717. return ret
  8718. }
  8719. return []
  8720. };
  8721. }
  8722. /* */
  8723. var LIFECYCLE_HOOKS$1 = [
  8724. //App
  8725. 'onLaunch',
  8726. 'onShow',
  8727. 'onHide',
  8728. 'onUniNViewMessage',
  8729. 'onPageNotFound',
  8730. 'onThemeChange',
  8731. 'onError',
  8732. 'onUnhandledRejection',
  8733. //Page
  8734. 'onInit',
  8735. 'onLoad',
  8736. // 'onShow',
  8737. 'onReady',
  8738. // 'onHide',
  8739. 'onUnload',
  8740. 'onPullDownRefresh',
  8741. 'onReachBottom',
  8742. 'onTabItemTap',
  8743. 'onAddToFavorites',
  8744. 'onShareTimeline',
  8745. 'onShareAppMessage',
  8746. 'onResize',
  8747. 'onPageScroll',
  8748. 'onNavigationBarButtonTap',
  8749. 'onBackPress',
  8750. 'onNavigationBarSearchInputChanged',
  8751. 'onNavigationBarSearchInputConfirmed',
  8752. 'onNavigationBarSearchInputClicked',
  8753. 'onUploadDouyinVideo',
  8754. 'onNFCReadMessage',
  8755. //Component
  8756. // 'onReady', // 兼容旧版本,应该移除该事件
  8757. 'onPageShow',
  8758. 'onPageHide',
  8759. 'onPageResize'
  8760. ];
  8761. function lifecycleMixin$1(Vue) {
  8762. //fixed vue-class-component
  8763. var oldExtend = Vue.extend;
  8764. Vue.extend = function(extendOptions) {
  8765. extendOptions = extendOptions || {};
  8766. var methods = extendOptions.methods;
  8767. if (methods) {
  8768. Object.keys(methods).forEach(function (methodName) {
  8769. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  8770. extendOptions[methodName] = methods[methodName];
  8771. delete methods[methodName];
  8772. }
  8773. });
  8774. }
  8775. return oldExtend.call(this, extendOptions)
  8776. };
  8777. var strategies = Vue.config.optionMergeStrategies;
  8778. var mergeHook = strategies.created;
  8779. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  8780. strategies[hook] = mergeHook;
  8781. });
  8782. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  8783. }
  8784. /* */
  8785. // install platform patch function
  8786. Vue.prototype.__patch__ = patch;
  8787. // public mount method
  8788. Vue.prototype.$mount = function(
  8789. el ,
  8790. hydrating
  8791. ) {
  8792. return mountComponent$1(this, el, hydrating)
  8793. };
  8794. lifecycleMixin$1(Vue);
  8795. internalMixin(Vue);
  8796. /* */
  8797. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  8798. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  8799. /***/ }),
  8800. /* 26 */
  8801. /*!*********************************************************!*\
  8802. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/pages.json ***!
  8803. \*********************************************************/
  8804. /*! no static exports found */
  8805. /***/ (function(module, exports) {
  8806. /***/ }),
  8807. /* 27 */,
  8808. /* 28 */,
  8809. /* 29 */,
  8810. /* 30 */,
  8811. /* 31 */,
  8812. /* 32 */
  8813. /*!**********************************************************************************************************!*\
  8814. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  8815. \**********************************************************************************************************/
  8816. /*! exports provided: default */
  8817. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8818. "use strict";
  8819. __webpack_require__.r(__webpack_exports__);
  8820. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  8821. /* globals __VUE_SSR_CONTEXT__ */
  8822. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  8823. // This module is a runtime utility for cleaner component module output and will
  8824. // be included in the final webpack user bundle.
  8825. function normalizeComponent (
  8826. scriptExports,
  8827. render,
  8828. staticRenderFns,
  8829. functionalTemplate,
  8830. injectStyles,
  8831. scopeId,
  8832. moduleIdentifier, /* server only */
  8833. shadowMode, /* vue-cli only */
  8834. components, // fixed by xxxxxx auto components
  8835. renderjs // fixed by xxxxxx renderjs
  8836. ) {
  8837. // Vue.extend constructor export interop
  8838. var options = typeof scriptExports === 'function'
  8839. ? scriptExports.options
  8840. : scriptExports
  8841. // fixed by xxxxxx auto components
  8842. if (components) {
  8843. if (!options.components) {
  8844. options.components = {}
  8845. }
  8846. var hasOwn = Object.prototype.hasOwnProperty
  8847. for (var name in components) {
  8848. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  8849. options.components[name] = components[name]
  8850. }
  8851. }
  8852. }
  8853. // fixed by xxxxxx renderjs
  8854. if (renderjs) {
  8855. if(typeof renderjs.beforeCreate === 'function'){
  8856. renderjs.beforeCreate = [renderjs.beforeCreate]
  8857. }
  8858. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  8859. this[renderjs.__module] = this
  8860. });
  8861. (options.mixins || (options.mixins = [])).push(renderjs)
  8862. }
  8863. // render functions
  8864. if (render) {
  8865. options.render = render
  8866. options.staticRenderFns = staticRenderFns
  8867. options._compiled = true
  8868. }
  8869. // functional template
  8870. if (functionalTemplate) {
  8871. options.functional = true
  8872. }
  8873. // scopedId
  8874. if (scopeId) {
  8875. options._scopeId = 'data-v-' + scopeId
  8876. }
  8877. var hook
  8878. if (moduleIdentifier) { // server build
  8879. hook = function (context) {
  8880. // 2.3 injection
  8881. context =
  8882. context || // cached call
  8883. (this.$vnode && this.$vnode.ssrContext) || // stateful
  8884. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  8885. // 2.2 with runInNewContext: true
  8886. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  8887. context = __VUE_SSR_CONTEXT__
  8888. }
  8889. // inject component styles
  8890. if (injectStyles) {
  8891. injectStyles.call(this, context)
  8892. }
  8893. // register component module identifier for async chunk inferrence
  8894. if (context && context._registeredComponents) {
  8895. context._registeredComponents.add(moduleIdentifier)
  8896. }
  8897. }
  8898. // used by ssr in case component is cached and beforeCreate
  8899. // never gets called
  8900. options._ssrRegister = hook
  8901. } else if (injectStyles) {
  8902. hook = shadowMode
  8903. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  8904. : injectStyles
  8905. }
  8906. if (hook) {
  8907. if (options.functional) {
  8908. // for template-only hot-reload because in that case the render fn doesn't
  8909. // go through the normalizer
  8910. options._injectStyles = hook
  8911. // register for functioal component in vue file
  8912. var originalRender = options.render
  8913. options.render = function renderWithStyleInjection (h, context) {
  8914. hook.call(context)
  8915. return originalRender(h, context)
  8916. }
  8917. } else {
  8918. // inject component registration as beforeCreate hook
  8919. var existing = options.beforeCreate
  8920. options.beforeCreate = existing
  8921. ? [].concat(existing, hook)
  8922. : [hook]
  8923. }
  8924. }
  8925. return {
  8926. exports: scriptExports,
  8927. options: options
  8928. }
  8929. }
  8930. /***/ }),
  8931. /* 33 */
  8932. /*!*****************************************************************************!*\
  8933. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/index.js ***!
  8934. \*****************************************************************************/
  8935. /*! no static exports found */
  8936. /***/ (function(module, exports, __webpack_require__) {
  8937. "use strict";
  8938. /* WEBPACK VAR INJECTION */(function(uni) {
  8939. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  8940. Object.defineProperty(exports, "__esModule", {
  8941. value: true
  8942. });
  8943. exports.default = void 0;
  8944. var _mixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mixin.js */ 34));
  8945. var _request = _interopRequireDefault(__webpack_require__(/*! ./libs/request */ 35));
  8946. var _queryParams = _interopRequireDefault(__webpack_require__(/*! ./libs/function/queryParams.js */ 39));
  8947. var _route = _interopRequireDefault(__webpack_require__(/*! ./libs/function/route.js */ 40));
  8948. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFormat.js */ 44));
  8949. var _timeFrom = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFrom.js */ 45));
  8950. var _colorGradient = _interopRequireDefault(__webpack_require__(/*! ./libs/function/colorGradient.js */ 46));
  8951. var _guid = _interopRequireDefault(__webpack_require__(/*! ./libs/function/guid.js */ 47));
  8952. var _color = _interopRequireDefault(__webpack_require__(/*! ./libs/function/color.js */ 48));
  8953. var _type2icon = _interopRequireDefault(__webpack_require__(/*! ./libs/function/type2icon.js */ 49));
  8954. var _randomArray = _interopRequireDefault(__webpack_require__(/*! ./libs/function/randomArray.js */ 50));
  8955. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepClone.js */ 37));
  8956. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepMerge.js */ 36));
  8957. var _addUnit = _interopRequireDefault(__webpack_require__(/*! ./libs/function/addUnit.js */ 51));
  8958. var _test = _interopRequireDefault(__webpack_require__(/*! ./libs/function/test.js */ 38));
  8959. var _random = _interopRequireDefault(__webpack_require__(/*! ./libs/function/random.js */ 52));
  8960. var _trim = _interopRequireDefault(__webpack_require__(/*! ./libs/function/trim.js */ 53));
  8961. var _toast = _interopRequireDefault(__webpack_require__(/*! ./libs/function/toast.js */ 54));
  8962. var _getParent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/getParent.js */ 55));
  8963. var _$parent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/$parent.js */ 56));
  8964. var _sys = __webpack_require__(/*! ./libs/function/sys.js */ 57);
  8965. var _debounce = _interopRequireDefault(__webpack_require__(/*! ./libs/function/debounce.js */ 58));
  8966. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./libs/function/throttle.js */ 59));
  8967. var _config = _interopRequireDefault(__webpack_require__(/*! ./libs/config/config.js */ 60));
  8968. var _zIndex = _interopRequireDefault(__webpack_require__(/*! ./libs/config/zIndex.js */ 61));
  8969. // 引入全局mixin
  8970. // 引入关于是否mixin集成小程序分享的配置
  8971. // import wxshare from './libs/mixin/mpShare.js'
  8972. // 全局挂载引入http相关请求拦截插件
  8973. function wranning(str) {
  8974. // 开发环境进行信息输出,主要是一些报错信息
  8975. // 这个环境的来由是在程序编写时候,点击hx编辑器运行调试代码的时候,详见:
  8976. // https://uniapp.dcloud.io/frame?id=%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%92%8c%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83
  8977. if (true) {
  8978. console.warn(str);
  8979. }
  8980. }
  8981. // 尝试判断在根目录的/store中是否有$u.mixin.js,此文件uView默认为需要挂在到全局的vuex的state变量
  8982. // HX2.6.11版本,放到try中,控制台依然会警告,暂时不用此方式,
  8983. // let vuexStore = {};
  8984. // try {
  8985. // vuexStore = require("@/store/$u.mixin.js");
  8986. // } catch (e) {
  8987. // //TODO handle the exception
  8988. // }
  8989. // post类型对象参数转为get类型url参数
  8990. var $u = {
  8991. queryParams: _queryParams.default,
  8992. route: _route.default,
  8993. timeFormat: _timeFormat.default,
  8994. date: _timeFormat.default,
  8995. // 另名date
  8996. timeFrom: _timeFrom.default,
  8997. colorGradient: _colorGradient.default.colorGradient,
  8998. colorToRgba: _colorGradient.default.colorToRgba,
  8999. guid: _guid.default,
  9000. color: _color.default,
  9001. sys: _sys.sys,
  9002. os: _sys.os,
  9003. type2icon: _type2icon.default,
  9004. randomArray: _randomArray.default,
  9005. wranning: wranning,
  9006. get: _request.default.get,
  9007. post: _request.default.post,
  9008. put: _request.default.put,
  9009. 'delete': _request.default.delete,
  9010. hexToRgb: _colorGradient.default.hexToRgb,
  9011. rgbToHex: _colorGradient.default.rgbToHex,
  9012. test: _test.default,
  9013. random: _random.default,
  9014. deepClone: _deepClone.default,
  9015. deepMerge: _deepMerge.default,
  9016. getParent: _getParent.default,
  9017. $parent: _$parent.default,
  9018. addUnit: _addUnit.default,
  9019. trim: _trim.default,
  9020. type: ['primary', 'success', 'error', 'warning', 'info'],
  9021. http: _request.default,
  9022. toast: _toast.default,
  9023. config: _config.default,
  9024. // uView配置信息相关,比如版本号
  9025. zIndex: _zIndex.default,
  9026. debounce: _debounce.default,
  9027. throttle: _throttle.default
  9028. };
  9029. // $u挂载到uni对象上
  9030. uni.$u = $u;
  9031. var install = function install(Vue) {
  9032. Vue.mixin(_mixin.default);
  9033. if (Vue.prototype.openShare) {
  9034. Vue.mixin(mpShare);
  9035. }
  9036. // Vue.mixin(vuexStore);
  9037. // 时间格式化,同时两个名称,date和timeFormat
  9038. Vue.filter('timeFormat', function (timestamp, format) {
  9039. return (0, _timeFormat.default)(timestamp, format);
  9040. });
  9041. Vue.filter('date', function (timestamp, format) {
  9042. return (0, _timeFormat.default)(timestamp, format);
  9043. });
  9044. // 将多久以前的方法,注入到全局过滤器
  9045. Vue.filter('timeFrom', function (timestamp, format) {
  9046. return (0, _timeFrom.default)(timestamp, format);
  9047. });
  9048. Vue.prototype.$u = $u;
  9049. };
  9050. var _default = {
  9051. install: install
  9052. };
  9053. exports.default = _default;
  9054. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9055. /***/ }),
  9056. /* 34 */
  9057. /*!****************************************************************************************!*\
  9058. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/mixin/mixin.js ***!
  9059. \****************************************************************************************/
  9060. /*! no static exports found */
  9061. /***/ (function(module, exports, __webpack_require__) {
  9062. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  9063. data: function data() {
  9064. return {};
  9065. },
  9066. onLoad: function onLoad() {
  9067. // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
  9068. this.$u.getRect = this.$uGetRect;
  9069. },
  9070. methods: {
  9071. // 查询节点信息
  9072. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  9073. // 解决办法为在组件根部再套一个没有任何作用的view元素
  9074. $uGetRect: function $uGetRect(selector, all) {
  9075. var _this = this;
  9076. return new Promise(function (resolve) {
  9077. uni.createSelectorQuery().in(_this)[all ? 'selectAll' : 'select'](selector).boundingClientRect(function (rect) {
  9078. if (all && Array.isArray(rect) && rect.length) {
  9079. resolve(rect);
  9080. }
  9081. if (!all && rect) {
  9082. resolve(rect);
  9083. }
  9084. }).exec();
  9085. });
  9086. },
  9087. getParentData: function getParentData() {
  9088. var _this2 = this;
  9089. var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  9090. // 避免在created中去定义parent变量
  9091. if (!this.parent) this.parent = false;
  9092. // 这里的本质原理是,通过获取父组件实例(也即u-radio-group的this)
  9093. // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
  9094. // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
  9095. this.parent = this.$u.$parent.call(this, parentName);
  9096. if (this.parent) {
  9097. // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
  9098. Object.keys(this.parentData).map(function (key) {
  9099. _this2.parentData[key] = _this2.parent[key];
  9100. });
  9101. }
  9102. },
  9103. // 阻止事件冒泡
  9104. preventEvent: function preventEvent(e) {
  9105. e && e.stopPropagation && e.stopPropagation();
  9106. }
  9107. },
  9108. onReachBottom: function onReachBottom() {
  9109. uni.$emit('uOnReachBottom');
  9110. },
  9111. beforeDestroy: function beforeDestroy() {
  9112. var _this3 = this;
  9113. // 判断当前页面是否存在parent和children,一般在checkbox和checkbox-group父子联动的场景会有此情况
  9114. // 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
  9115. if (this.parent && uni.$u.test.array(this.parent.children)) {
  9116. // 组件销毁时,移除父组件中的children数组中对应的实例
  9117. var childrenList = this.parent.children;
  9118. childrenList.map(function (child, index) {
  9119. // 如果相等,则移除
  9120. if (child === _this3) {
  9121. childrenList.splice(index, 1);
  9122. }
  9123. });
  9124. }
  9125. }
  9126. };
  9127. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9128. /***/ }),
  9129. /* 35 */
  9130. /*!******************************************************************************************!*\
  9131. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/request/index.js ***!
  9132. \******************************************************************************************/
  9133. /*! no static exports found */
  9134. /***/ (function(module, exports, __webpack_require__) {
  9135. "use strict";
  9136. /* WEBPACK VAR INJECTION */(function(uni) {
  9137. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9138. Object.defineProperty(exports, "__esModule", {
  9139. value: true
  9140. });
  9141. exports.default = void 0;
  9142. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  9143. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  9144. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ../function/deepMerge */ 36));
  9145. var _test = _interopRequireDefault(__webpack_require__(/*! ../function/test */ 38));
  9146. var Request = /*#__PURE__*/function () {
  9147. function Request() {
  9148. var _this = this;
  9149. (0, _classCallCheck2.default)(this, Request);
  9150. this.config = {
  9151. baseUrl: '',
  9152. // 请求的根域名
  9153. // 默认的请求头
  9154. header: {},
  9155. method: 'POST',
  9156. // 设置为json,返回后uni.request会对数据进行一次JSON.parse
  9157. dataType: 'json',
  9158. // 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
  9159. responseType: 'text',
  9160. showLoading: true,
  9161. // 是否显示请求中的loading
  9162. loadingText: '请求中...',
  9163. loadingTime: 800,
  9164. // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
  9165. timer: null,
  9166. // 定时器
  9167. originalData: false,
  9168. // 是否在拦截器中返回服务端的原始数据,见文档说明
  9169. loadingMask: true // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
  9170. };
  9171. // 拦截器
  9172. this.interceptor = {
  9173. // 请求前的拦截
  9174. request: null,
  9175. // 请求后的拦截
  9176. response: null
  9177. };
  9178. // get请求
  9179. this.get = function (url) {
  9180. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9181. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  9182. return _this.request({
  9183. method: 'GET',
  9184. url: url,
  9185. header: header,
  9186. data: data
  9187. });
  9188. };
  9189. // post请求
  9190. this.post = function (url) {
  9191. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9192. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  9193. return _this.request({
  9194. url: url,
  9195. method: 'POST',
  9196. header: header,
  9197. data: data
  9198. });
  9199. };
  9200. // put请求,不支持支付宝小程序(HX2.6.15)
  9201. this.put = function (url) {
  9202. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9203. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  9204. return _this.request({
  9205. url: url,
  9206. method: 'PUT',
  9207. header: header,
  9208. data: data
  9209. });
  9210. };
  9211. // delete请求,不支持支付宝和头条小程序(HX2.6.15)
  9212. this.delete = function (url) {
  9213. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9214. var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  9215. return _this.request({
  9216. url: url,
  9217. method: 'DELETE',
  9218. header: header,
  9219. data: data
  9220. });
  9221. };
  9222. }
  9223. (0, _createClass2.default)(Request, [{
  9224. key: "setConfig",
  9225. value:
  9226. // 设置全局默认配置
  9227. function setConfig(customConfig) {
  9228. // 深度合并对象,否则会造成对象深层属性丢失
  9229. this.config = (0, _deepMerge.default)(this.config, customConfig);
  9230. }
  9231. // 主要请求部分
  9232. }, {
  9233. key: "request",
  9234. value: function request() {
  9235. var _this2 = this;
  9236. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  9237. // 检查请求拦截
  9238. if (this.interceptor.request && typeof this.interceptor.request === 'function') {
  9239. var tmpConfig = {};
  9240. var interceptorRequest = this.interceptor.request(options);
  9241. if (interceptorRequest === false) {
  9242. // 返回一个处于pending状态中的Promise,来取消原promise,避免进入then()回调
  9243. return new Promise(function () {});
  9244. }
  9245. this.options = interceptorRequest;
  9246. }
  9247. options.dataType = options.dataType || this.config.dataType;
  9248. options.responseType = options.responseType || this.config.responseType;
  9249. options.url = options.url || '';
  9250. options.params = options.params || {};
  9251. options.header = Object.assign({}, this.config.header, options.header);
  9252. options.method = options.method || this.config.method;
  9253. return new Promise(function (resolve, reject) {
  9254. options.complete = function (response) {
  9255. // 请求返回后,隐藏loading(如果请求返回快的话,可能会没有loading)
  9256. uni.hideLoading();
  9257. // 清除定时器,如果请求回来了,就无需loading
  9258. clearTimeout(_this2.config.timer);
  9259. _this2.config.timer = null;
  9260. // 判断用户对拦截返回数据的要求,如果originalData为true,返回所有的数据(response)到拦截器,否则只返回response.data
  9261. if (_this2.config.originalData) {
  9262. // 判断是否存在拦截器
  9263. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  9264. var resInterceptors = _this2.interceptor.response(response);
  9265. // 如果拦截器不返回false,就将拦截器返回的内容给this.$u.post的then回调
  9266. if (resInterceptors !== false) {
  9267. resolve(resInterceptors);
  9268. } else {
  9269. // 如果拦截器返回false,意味着拦截器定义者认为返回有问题,直接接入catch回调
  9270. reject(response);
  9271. }
  9272. } else {
  9273. // 如果要求返回原始数据,就算没有拦截器,也返回最原始的数据
  9274. resolve(response);
  9275. }
  9276. } else {
  9277. if (response.statusCode == 200) {
  9278. if (_this2.interceptor.response && typeof _this2.interceptor.response === 'function') {
  9279. var _resInterceptors = _this2.interceptor.response(response.data);
  9280. if (_resInterceptors !== false) {
  9281. resolve(_resInterceptors);
  9282. } else {
  9283. reject(response.data);
  9284. }
  9285. } else {
  9286. // 如果不是返回原始数据(originalData=false),且没有拦截器的情况下,返回纯数据给then回调
  9287. resolve(response.data);
  9288. }
  9289. } else {
  9290. // 不返回原始数据的情况下,服务器状态码不为200,modal弹框提示
  9291. // if(response.errMsg) {
  9292. // uni.showModal({
  9293. // title: response.errMsg
  9294. // });
  9295. // }
  9296. reject(response);
  9297. }
  9298. }
  9299. };
  9300. // 判断用户传递的URL是否/开头,如果不是,加上/,这里使用了uView的test.js验证库的url()方法
  9301. options.url = _test.default.url(options.url) ? options.url : _this2.config.baseUrl + (options.url.indexOf('/') == 0 ? options.url : '/' + options.url);
  9302. // 是否显示loading
  9303. // 加一个是否已有timer定时器的判断,否则有两个同时请求的时候,后者会清除前者的定时器id
  9304. // 而没有清除前者的定时器,导致前者超时,一直显示loading
  9305. if (_this2.config.showLoading && !_this2.config.timer) {
  9306. _this2.config.timer = setTimeout(function () {
  9307. uni.showLoading({
  9308. title: _this2.config.loadingText,
  9309. mask: _this2.config.loadingMask
  9310. });
  9311. _this2.config.timer = null;
  9312. }, _this2.config.loadingTime);
  9313. }
  9314. uni.request(options);
  9315. });
  9316. // .catch(res => {
  9317. // // 如果返回reject(),不让其进入this.$u.post().then().catch()后面的catct()
  9318. // // 因为很多人都会忘了写后面的catch(),导致报错捕获不到catch
  9319. // return new Promise(()=>{});
  9320. // })
  9321. }
  9322. }]);
  9323. return Request;
  9324. }();
  9325. var _default = new Request();
  9326. exports.default = _default;
  9327. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9328. /***/ }),
  9329. /* 36 */
  9330. /*!***********************************************************************************************!*\
  9331. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/deepMerge.js ***!
  9332. \***********************************************************************************************/
  9333. /*! no static exports found */
  9334. /***/ (function(module, exports, __webpack_require__) {
  9335. "use strict";
  9336. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9337. Object.defineProperty(exports, "__esModule", {
  9338. value: true
  9339. });
  9340. exports.default = void 0;
  9341. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  9342. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./deepClone */ 37));
  9343. // JS对象深度合并
  9344. function deepMerge() {
  9345. var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  9346. var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9347. target = (0, _deepClone.default)(target);
  9348. if ((0, _typeof2.default)(target) !== 'object' || target === null || (0, _typeof2.default)(source) !== 'object' || source === null) return target;
  9349. var merged = Array.isArray(target) ? target.slice() : Object.assign({}, target);
  9350. for (var prop in source) {
  9351. if (!source.hasOwnProperty(prop)) continue;
  9352. var sourceValue = source[prop];
  9353. var targetValue = merged[prop];
  9354. if (sourceValue instanceof Date) {
  9355. merged[prop] = new Date(sourceValue);
  9356. } else if (sourceValue instanceof RegExp) {
  9357. merged[prop] = new RegExp(sourceValue);
  9358. } else if (sourceValue instanceof Map) {
  9359. merged[prop] = new Map(sourceValue);
  9360. } else if (sourceValue instanceof Set) {
  9361. merged[prop] = new Set(sourceValue);
  9362. } else if ((0, _typeof2.default)(sourceValue) === 'object' && sourceValue !== null) {
  9363. merged[prop] = deepMerge(targetValue, sourceValue);
  9364. } else {
  9365. merged[prop] = sourceValue;
  9366. }
  9367. }
  9368. return merged;
  9369. }
  9370. var _default = deepMerge;
  9371. exports.default = _default;
  9372. /***/ }),
  9373. /* 37 */
  9374. /*!***********************************************************************************************!*\
  9375. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/deepClone.js ***!
  9376. \***********************************************************************************************/
  9377. /*! no static exports found */
  9378. /***/ (function(module, exports, __webpack_require__) {
  9379. "use strict";
  9380. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9381. Object.defineProperty(exports, "__esModule", {
  9382. value: true
  9383. });
  9384. exports.default = void 0;
  9385. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  9386. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  9387. // 判断arr是否为一个数组,返回一个bool值
  9388. function isArray(arr) {
  9389. return Object.prototype.toString.call(arr) === '[object Array]';
  9390. }
  9391. // 深度克隆
  9392. function deepClone(obj) {
  9393. var cache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new WeakMap();
  9394. if (obj === null || (0, _typeof2.default)(obj) !== 'object') return obj;
  9395. if (cache.has(obj)) return cache.get(obj);
  9396. var clone;
  9397. if (obj instanceof Date) {
  9398. clone = new Date(obj.getTime());
  9399. } else if (obj instanceof RegExp) {
  9400. clone = new RegExp(obj);
  9401. } else if (obj instanceof Map) {
  9402. clone = new Map(Array.from(obj, function (_ref) {
  9403. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  9404. key = _ref2[0],
  9405. value = _ref2[1];
  9406. return [key, deepClone(value, cache)];
  9407. }));
  9408. } else if (obj instanceof Set) {
  9409. clone = new Set(Array.from(obj, function (value) {
  9410. return deepClone(value, cache);
  9411. }));
  9412. } else if (Array.isArray(obj)) {
  9413. clone = obj.map(function (value) {
  9414. return deepClone(value, cache);
  9415. });
  9416. } else if (Object.prototype.toString.call(obj) === '[object Object]') {
  9417. clone = Object.create(Object.getPrototypeOf(obj));
  9418. cache.set(obj, clone);
  9419. for (var _i = 0, _Object$entries = Object.entries(obj); _i < _Object$entries.length; _i++) {
  9420. var _Object$entries$_i = (0, _slicedToArray2.default)(_Object$entries[_i], 2),
  9421. key = _Object$entries$_i[0],
  9422. value = _Object$entries$_i[1];
  9423. clone[key] = deepClone(value, cache);
  9424. }
  9425. } else {
  9426. clone = Object.assign({}, obj);
  9427. }
  9428. cache.set(obj, clone);
  9429. return clone;
  9430. }
  9431. var _default = deepClone;
  9432. exports.default = _default;
  9433. /***/ }),
  9434. /* 38 */
  9435. /*!******************************************************************************************!*\
  9436. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/test.js ***!
  9437. \******************************************************************************************/
  9438. /*! no static exports found */
  9439. /***/ (function(module, exports, __webpack_require__) {
  9440. "use strict";
  9441. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9442. Object.defineProperty(exports, "__esModule", {
  9443. value: true
  9444. });
  9445. exports.default = void 0;
  9446. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  9447. /**
  9448. * 验证电子邮箱格式
  9449. */
  9450. function email(value) {
  9451. return /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/.test(value);
  9452. }
  9453. /**
  9454. * 验证手机格式
  9455. */
  9456. function mobile(value) {
  9457. return /^1[3-9]\d{9}$/.test(value);
  9458. }
  9459. /**
  9460. * 验证URL格式
  9461. */
  9462. function url(value) {
  9463. return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value);
  9464. }
  9465. /**
  9466. * 验证日期格式
  9467. */
  9468. function date(value) {
  9469. return !/Invalid|NaN/.test(new Date(value).toString());
  9470. }
  9471. /**
  9472. * 验证ISO类型的日期格式
  9473. */
  9474. function dateISO(value) {
  9475. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  9476. }
  9477. /**
  9478. * 验证十进制数字
  9479. */
  9480. function number(value) {
  9481. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value);
  9482. }
  9483. /**
  9484. * 验证整数
  9485. */
  9486. function digits(value) {
  9487. return /^\d+$/.test(value);
  9488. }
  9489. /**
  9490. * 验证身份证号码
  9491. */
  9492. function idCard(value) {
  9493. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value);
  9494. }
  9495. /**
  9496. * 是否车牌号
  9497. */
  9498. function carNo(value) {
  9499. // 新能源车牌
  9500. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  9501. // 旧车牌
  9502. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  9503. if (value.length === 7) {
  9504. return creg.test(value);
  9505. } else if (value.length === 8) {
  9506. return xreg.test(value);
  9507. } else {
  9508. return false;
  9509. }
  9510. }
  9511. /**
  9512. * 金额,只允许2位小数
  9513. */
  9514. function amount(value) {
  9515. //金额,只允许保留两位小数
  9516. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  9517. }
  9518. /**
  9519. * 中文
  9520. */
  9521. function chinese(value) {
  9522. var reg = /^[\u4e00-\u9fa5]+$/gi;
  9523. return reg.test(value);
  9524. }
  9525. /**
  9526. * 只能输入字母
  9527. */
  9528. function letter(value) {
  9529. return /^[a-zA-Z]*$/.test(value);
  9530. }
  9531. /**
  9532. * 只能是字母或者数字
  9533. */
  9534. function enOrNum(value) {
  9535. //英文或者数字
  9536. var reg = /^[0-9a-zA-Z]*$/g;
  9537. return reg.test(value);
  9538. }
  9539. /**
  9540. * 验证是否包含某个值
  9541. */
  9542. function contains(value, param) {
  9543. return value.indexOf(param) >= 0;
  9544. }
  9545. /**
  9546. * 验证一个值范围[min, max]
  9547. */
  9548. function range(value, param) {
  9549. return value >= param[0] && value <= param[1];
  9550. }
  9551. /**
  9552. * 验证一个长度范围[min, max]
  9553. */
  9554. function rangeLength(value, param) {
  9555. return value.length >= param[0] && value.length <= param[1];
  9556. }
  9557. /**
  9558. * 是否固定电话
  9559. */
  9560. function landline(value) {
  9561. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  9562. return reg.test(value);
  9563. }
  9564. /**
  9565. * 判断是否为空
  9566. */
  9567. function empty(value) {
  9568. switch ((0, _typeof2.default)(value)) {
  9569. case 'undefined':
  9570. return true;
  9571. case 'string':
  9572. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  9573. break;
  9574. case 'boolean':
  9575. if (!value) return true;
  9576. break;
  9577. case 'number':
  9578. if (0 === value || isNaN(value)) return true;
  9579. break;
  9580. case 'object':
  9581. if (null === value || value.length === 0) return true;
  9582. for (var i in value) {
  9583. return false;
  9584. }
  9585. return true;
  9586. }
  9587. return false;
  9588. }
  9589. /**
  9590. * 是否json字符串
  9591. */
  9592. function jsonString(value) {
  9593. if (typeof value == 'string') {
  9594. try {
  9595. var obj = JSON.parse(value);
  9596. if ((0, _typeof2.default)(obj) == 'object' && obj) {
  9597. return true;
  9598. } else {
  9599. return false;
  9600. }
  9601. } catch (e) {
  9602. return false;
  9603. }
  9604. }
  9605. return false;
  9606. }
  9607. /**
  9608. * 是否数组
  9609. */
  9610. function array(value) {
  9611. if (typeof Array.isArray === "function") {
  9612. return Array.isArray(value);
  9613. } else {
  9614. return Object.prototype.toString.call(value) === "[object Array]";
  9615. }
  9616. }
  9617. /**
  9618. * 是否对象
  9619. */
  9620. function object(value) {
  9621. return Object.prototype.toString.call(value) === '[object Object]';
  9622. }
  9623. /**
  9624. * 是否短信验证码
  9625. */
  9626. function code(value) {
  9627. var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  9628. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  9629. }
  9630. var _default = {
  9631. email: email,
  9632. mobile: mobile,
  9633. url: url,
  9634. date: date,
  9635. dateISO: dateISO,
  9636. number: number,
  9637. digits: digits,
  9638. idCard: idCard,
  9639. carNo: carNo,
  9640. amount: amount,
  9641. chinese: chinese,
  9642. letter: letter,
  9643. enOrNum: enOrNum,
  9644. contains: contains,
  9645. range: range,
  9646. rangeLength: rangeLength,
  9647. empty: empty,
  9648. isEmpty: empty,
  9649. jsonString: jsonString,
  9650. landline: landline,
  9651. object: object,
  9652. array: array,
  9653. code: code
  9654. };
  9655. exports.default = _default;
  9656. /***/ }),
  9657. /* 39 */
  9658. /*!*************************************************************************************************!*\
  9659. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/queryParams.js ***!
  9660. \*************************************************************************************************/
  9661. /*! no static exports found */
  9662. /***/ (function(module, exports, __webpack_require__) {
  9663. "use strict";
  9664. Object.defineProperty(exports, "__esModule", {
  9665. value: true
  9666. });
  9667. exports.default = void 0;
  9668. /**
  9669. * 对象转url参数
  9670. * @param {*} data,对象
  9671. * @param {*} isPrefix,是否自动加上"?"
  9672. */
  9673. function queryParams() {
  9674. var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  9675. var isPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  9676. var arrayFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'brackets';
  9677. var prefix = isPrefix ? '?' : '';
  9678. var _result = [];
  9679. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';
  9680. var _loop = function _loop(key) {
  9681. var value = data[key];
  9682. // 去掉为空的参数
  9683. if (['', undefined, null].indexOf(value) >= 0) {
  9684. return "continue";
  9685. }
  9686. // 如果值为数组,另行处理
  9687. if (value.constructor === Array) {
  9688. // e.g. {ids: [1, 2, 3]}
  9689. switch (arrayFormat) {
  9690. case 'indices':
  9691. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  9692. for (var i = 0; i < value.length; i++) {
  9693. _result.push(key + '[' + i + ']=' + value[i]);
  9694. }
  9695. break;
  9696. case 'brackets':
  9697. // 结果: ids[]=1&ids[]=2&ids[]=3
  9698. value.forEach(function (_value) {
  9699. _result.push(key + '[]=' + _value);
  9700. });
  9701. break;
  9702. case 'repeat':
  9703. // 结果: ids=1&ids=2&ids=3
  9704. value.forEach(function (_value) {
  9705. _result.push(key + '=' + _value);
  9706. });
  9707. break;
  9708. case 'comma':
  9709. // 结果: ids=1,2,3
  9710. var commaStr = "";
  9711. value.forEach(function (_value) {
  9712. commaStr += (commaStr ? "," : "") + _value;
  9713. });
  9714. _result.push(key + '=' + commaStr);
  9715. break;
  9716. default:
  9717. value.forEach(function (_value) {
  9718. _result.push(key + '[]=' + _value);
  9719. });
  9720. }
  9721. } else {
  9722. _result.push(key + '=' + value);
  9723. }
  9724. };
  9725. for (var key in data) {
  9726. var _ret = _loop(key);
  9727. if (_ret === "continue") continue;
  9728. }
  9729. return _result.length ? prefix + _result.join('&') : '';
  9730. }
  9731. var _default = queryParams;
  9732. exports.default = _default;
  9733. /***/ }),
  9734. /* 40 */
  9735. /*!*******************************************************************************************!*\
  9736. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/route.js ***!
  9737. \*******************************************************************************************/
  9738. /*! no static exports found */
  9739. /***/ (function(module, exports, __webpack_require__) {
  9740. "use strict";
  9741. /* WEBPACK VAR INJECTION */(function(uni) {
  9742. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9743. Object.defineProperty(exports, "__esModule", {
  9744. value: true
  9745. });
  9746. exports.default = void 0;
  9747. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 41));
  9748. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 43));
  9749. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  9750. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  9751. /**
  9752. * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
  9753. * 并且带有路由拦截功能
  9754. */
  9755. var Router = /*#__PURE__*/function () {
  9756. function Router() {
  9757. (0, _classCallCheck2.default)(this, Router);
  9758. // 原始属性定义
  9759. this.config = {
  9760. type: 'navigateTo',
  9761. url: '',
  9762. delta: 1,
  9763. // navigateBack页面后退时,回退的层数
  9764. params: {},
  9765. // 传递的参数
  9766. animationType: 'pop-in',
  9767. // 窗口动画,只在APP有效
  9768. animationDuration: 300,
  9769. // 窗口动画持续时间,单位毫秒,只在APP有效
  9770. intercept: false // 是否需要拦截
  9771. };
  9772. // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
  9773. // 这里在构造函数中进行this绑定
  9774. this.route = this.route.bind(this);
  9775. }
  9776. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  9777. (0, _createClass2.default)(Router, [{
  9778. key: "addRootPath",
  9779. value: function addRootPath(url) {
  9780. return url[0] === '/' ? url : "/".concat(url);
  9781. }
  9782. // 整合路由参数
  9783. }, {
  9784. key: "mixinParam",
  9785. value: function mixinParam(url, params) {
  9786. url = url && this.addRootPath(url);
  9787. // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
  9788. // 如果有url中有get参数,转换后无需带上"?"
  9789. var query = '';
  9790. if (/.*\/.*\?.*=.*/.test(url)) {
  9791. // object对象转为get类型的参数
  9792. query = uni.$u.queryParams(params, false);
  9793. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  9794. return url += "&" + query;
  9795. } else {
  9796. // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
  9797. query = uni.$u.queryParams(params);
  9798. return url += query;
  9799. }
  9800. }
  9801. // 对外的方法名称
  9802. }, {
  9803. key: "route",
  9804. value: function () {
  9805. var _route = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  9806. var options,
  9807. params,
  9808. mergeConfig,
  9809. isNext,
  9810. _args = arguments;
  9811. return _regenerator.default.wrap(function _callee$(_context) {
  9812. while (1) {
  9813. switch (_context.prev = _context.next) {
  9814. case 0:
  9815. options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
  9816. params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
  9817. // 合并用户的配置和内部的默认配置
  9818. mergeConfig = {};
  9819. if (typeof options === 'string') {
  9820. // 如果options为字符串,则为route(url, params)的形式
  9821. mergeConfig.url = this.mixinParam(options, params);
  9822. mergeConfig.type = 'navigateTo';
  9823. } else {
  9824. mergeConfig = uni.$u.deepMerge(this.config, options);
  9825. // 否则正常使用mergeConfig中的url和params进行拼接
  9826. mergeConfig.url = this.mixinParam(options.url, options.params);
  9827. }
  9828. if (params.intercept) {
  9829. this.config.intercept = params.intercept;
  9830. }
  9831. // params参数也带给拦截器
  9832. mergeConfig.params = params;
  9833. // 合并内外部参数
  9834. mergeConfig = uni.$u.deepMerge(this.config, mergeConfig);
  9835. // 判断用户是否定义了拦截器
  9836. if (!(typeof uni.$u.routeIntercept === 'function')) {
  9837. _context.next = 14;
  9838. break;
  9839. }
  9840. _context.next = 10;
  9841. return new Promise(function (resolve, reject) {
  9842. uni.$u.routeIntercept(mergeConfig, resolve);
  9843. });
  9844. case 10:
  9845. isNext = _context.sent;
  9846. // 如果isNext为true,则执行路由跳转
  9847. isNext && this.openPage(mergeConfig);
  9848. _context.next = 15;
  9849. break;
  9850. case 14:
  9851. this.openPage(mergeConfig);
  9852. case 15:
  9853. case "end":
  9854. return _context.stop();
  9855. }
  9856. }
  9857. }, _callee, this);
  9858. }));
  9859. function route() {
  9860. return _route.apply(this, arguments);
  9861. }
  9862. return route;
  9863. }() // 执行路由跳转
  9864. }, {
  9865. key: "openPage",
  9866. value: function openPage(config) {
  9867. // 解构参数
  9868. var url = config.url,
  9869. type = config.type,
  9870. delta = config.delta,
  9871. animationType = config.animationType,
  9872. animationDuration = config.animationDuration;
  9873. if (config.type == 'navigateTo' || config.type == 'to') {
  9874. uni.navigateTo({
  9875. url: url,
  9876. animationType: animationType,
  9877. animationDuration: animationDuration
  9878. });
  9879. }
  9880. if (config.type == 'redirectTo' || config.type == 'redirect') {
  9881. uni.redirectTo({
  9882. url: url
  9883. });
  9884. }
  9885. if (config.type == 'switchTab' || config.type == 'tab') {
  9886. uni.switchTab({
  9887. url: url
  9888. });
  9889. }
  9890. if (config.type == 'reLaunch' || config.type == 'launch') {
  9891. uni.reLaunch({
  9892. url: url
  9893. });
  9894. }
  9895. if (config.type == 'navigateBack' || config.type == 'back') {
  9896. uni.navigateBack({
  9897. delta: delta
  9898. });
  9899. }
  9900. }
  9901. }]);
  9902. return Router;
  9903. }();
  9904. var _default = new Router().route;
  9905. exports.default = _default;
  9906. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9907. /***/ }),
  9908. /* 41 */
  9909. /*!************************************************************************************************!*\
  9910. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  9911. \************************************************************************************************/
  9912. /*! no static exports found */
  9913. /***/ (function(module, exports, __webpack_require__) {
  9914. // TODO(Babel 8): Remove this file.
  9915. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 42)();
  9916. module.exports = runtime;
  9917. /***/ }),
  9918. /* 42 */
  9919. /*!*******************************************************************!*\
  9920. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  9921. \*******************************************************************/
  9922. /*! no static exports found */
  9923. /***/ (function(module, exports, __webpack_require__) {
  9924. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  9925. function _regeneratorRuntime() {
  9926. "use strict";
  9927. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  9928. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  9929. return e;
  9930. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  9931. var t,
  9932. e = {},
  9933. r = Object.prototype,
  9934. n = r.hasOwnProperty,
  9935. o = Object.defineProperty || function (t, e, r) {
  9936. t[e] = r.value;
  9937. },
  9938. i = "function" == typeof Symbol ? Symbol : {},
  9939. a = i.iterator || "@@iterator",
  9940. c = i.asyncIterator || "@@asyncIterator",
  9941. u = i.toStringTag || "@@toStringTag";
  9942. function define(t, e, r) {
  9943. return Object.defineProperty(t, e, {
  9944. value: r,
  9945. enumerable: !0,
  9946. configurable: !0,
  9947. writable: !0
  9948. }), t[e];
  9949. }
  9950. try {
  9951. define({}, "");
  9952. } catch (t) {
  9953. define = function define(t, e, r) {
  9954. return t[e] = r;
  9955. };
  9956. }
  9957. function wrap(t, e, r, n) {
  9958. var i = e && e.prototype instanceof Generator ? e : Generator,
  9959. a = Object.create(i.prototype),
  9960. c = new Context(n || []);
  9961. return o(a, "_invoke", {
  9962. value: makeInvokeMethod(t, r, c)
  9963. }), a;
  9964. }
  9965. function tryCatch(t, e, r) {
  9966. try {
  9967. return {
  9968. type: "normal",
  9969. arg: t.call(e, r)
  9970. };
  9971. } catch (t) {
  9972. return {
  9973. type: "throw",
  9974. arg: t
  9975. };
  9976. }
  9977. }
  9978. e.wrap = wrap;
  9979. var h = "suspendedStart",
  9980. l = "suspendedYield",
  9981. f = "executing",
  9982. s = "completed",
  9983. y = {};
  9984. function Generator() {}
  9985. function GeneratorFunction() {}
  9986. function GeneratorFunctionPrototype() {}
  9987. var p = {};
  9988. define(p, a, function () {
  9989. return this;
  9990. });
  9991. var d = Object.getPrototypeOf,
  9992. v = d && d(d(values([])));
  9993. v && v !== r && n.call(v, a) && (p = v);
  9994. var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
  9995. function defineIteratorMethods(t) {
  9996. ["next", "throw", "return"].forEach(function (e) {
  9997. define(t, e, function (t) {
  9998. return this._invoke(e, t);
  9999. });
  10000. });
  10001. }
  10002. function AsyncIterator(t, e) {
  10003. function invoke(r, o, i, a) {
  10004. var c = tryCatch(t[r], t, o);
  10005. if ("throw" !== c.type) {
  10006. var u = c.arg,
  10007. h = u.value;
  10008. return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
  10009. invoke("next", t, i, a);
  10010. }, function (t) {
  10011. invoke("throw", t, i, a);
  10012. }) : e.resolve(h).then(function (t) {
  10013. u.value = t, i(u);
  10014. }, function (t) {
  10015. return invoke("throw", t, i, a);
  10016. });
  10017. }
  10018. a(c.arg);
  10019. }
  10020. var r;
  10021. o(this, "_invoke", {
  10022. value: function value(t, n) {
  10023. function callInvokeWithMethodAndArg() {
  10024. return new e(function (e, r) {
  10025. invoke(t, n, e, r);
  10026. });
  10027. }
  10028. return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  10029. }
  10030. });
  10031. }
  10032. function makeInvokeMethod(e, r, n) {
  10033. var o = h;
  10034. return function (i, a) {
  10035. if (o === f) throw Error("Generator is already running");
  10036. if (o === s) {
  10037. if ("throw" === i) throw a;
  10038. return {
  10039. value: t,
  10040. done: !0
  10041. };
  10042. }
  10043. for (n.method = i, n.arg = a;;) {
  10044. var c = n.delegate;
  10045. if (c) {
  10046. var u = maybeInvokeDelegate(c, n);
  10047. if (u) {
  10048. if (u === y) continue;
  10049. return u;
  10050. }
  10051. }
  10052. if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
  10053. if (o === h) throw o = s, n.arg;
  10054. n.dispatchException(n.arg);
  10055. } else "return" === n.method && n.abrupt("return", n.arg);
  10056. o = f;
  10057. var p = tryCatch(e, r, n);
  10058. if ("normal" === p.type) {
  10059. if (o = n.done ? s : l, p.arg === y) continue;
  10060. return {
  10061. value: p.arg,
  10062. done: n.done
  10063. };
  10064. }
  10065. "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
  10066. }
  10067. };
  10068. }
  10069. function maybeInvokeDelegate(e, r) {
  10070. var n = r.method,
  10071. o = e.iterator[n];
  10072. if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
  10073. var i = tryCatch(o, e.iterator, r.arg);
  10074. if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
  10075. var a = i.arg;
  10076. return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
  10077. }
  10078. function pushTryEntry(t) {
  10079. var e = {
  10080. tryLoc: t[0]
  10081. };
  10082. 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
  10083. }
  10084. function resetTryEntry(t) {
  10085. var e = t.completion || {};
  10086. e.type = "normal", delete e.arg, t.completion = e;
  10087. }
  10088. function Context(t) {
  10089. this.tryEntries = [{
  10090. tryLoc: "root"
  10091. }], t.forEach(pushTryEntry, this), this.reset(!0);
  10092. }
  10093. function values(e) {
  10094. if (e || "" === e) {
  10095. var r = e[a];
  10096. if (r) return r.call(e);
  10097. if ("function" == typeof e.next) return e;
  10098. if (!isNaN(e.length)) {
  10099. var o = -1,
  10100. i = function next() {
  10101. for (; ++o < e.length;) {
  10102. if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
  10103. }
  10104. return next.value = t, next.done = !0, next;
  10105. };
  10106. return i.next = i;
  10107. }
  10108. }
  10109. throw new TypeError(_typeof(e) + " is not iterable");
  10110. }
  10111. return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
  10112. value: GeneratorFunctionPrototype,
  10113. configurable: !0
  10114. }), o(GeneratorFunctionPrototype, "constructor", {
  10115. value: GeneratorFunction,
  10116. configurable: !0
  10117. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
  10118. var e = "function" == typeof t && t.constructor;
  10119. return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
  10120. }, e.mark = function (t) {
  10121. return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
  10122. }, e.awrap = function (t) {
  10123. return {
  10124. __await: t
  10125. };
  10126. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
  10127. return this;
  10128. }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
  10129. void 0 === i && (i = Promise);
  10130. var a = new AsyncIterator(wrap(t, r, n, o), i);
  10131. return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
  10132. return t.done ? t.value : a.next();
  10133. });
  10134. }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
  10135. return this;
  10136. }), define(g, "toString", function () {
  10137. return "[object Generator]";
  10138. }), e.keys = function (t) {
  10139. var e = Object(t),
  10140. r = [];
  10141. for (var n in e) {
  10142. r.push(n);
  10143. }
  10144. return r.reverse(), function next() {
  10145. for (; r.length;) {
  10146. var t = r.pop();
  10147. if (t in e) return next.value = t, next.done = !1, next;
  10148. }
  10149. return next.done = !0, next;
  10150. };
  10151. }, e.values = values, Context.prototype = {
  10152. constructor: Context,
  10153. reset: function reset(e) {
  10154. if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) {
  10155. "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
  10156. }
  10157. },
  10158. stop: function stop() {
  10159. this.done = !0;
  10160. var t = this.tryEntries[0].completion;
  10161. if ("throw" === t.type) throw t.arg;
  10162. return this.rval;
  10163. },
  10164. dispatchException: function dispatchException(e) {
  10165. if (this.done) throw e;
  10166. var r = this;
  10167. function handle(n, o) {
  10168. return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
  10169. }
  10170. for (var o = this.tryEntries.length - 1; o >= 0; --o) {
  10171. var i = this.tryEntries[o],
  10172. a = i.completion;
  10173. if ("root" === i.tryLoc) return handle("end");
  10174. if (i.tryLoc <= this.prev) {
  10175. var c = n.call(i, "catchLoc"),
  10176. u = n.call(i, "finallyLoc");
  10177. if (c && u) {
  10178. if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
  10179. if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
  10180. } else if (c) {
  10181. if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
  10182. } else {
  10183. if (!u) throw Error("try statement without catch or finally");
  10184. if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
  10185. }
  10186. }
  10187. }
  10188. },
  10189. abrupt: function abrupt(t, e) {
  10190. for (var r = this.tryEntries.length - 1; r >= 0; --r) {
  10191. var o = this.tryEntries[r];
  10192. if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
  10193. var i = o;
  10194. break;
  10195. }
  10196. }
  10197. i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
  10198. var a = i ? i.completion : {};
  10199. return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
  10200. },
  10201. complete: function complete(t, e) {
  10202. if ("throw" === t.type) throw t.arg;
  10203. return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
  10204. },
  10205. finish: function finish(t) {
  10206. for (var e = this.tryEntries.length - 1; e >= 0; --e) {
  10207. var r = this.tryEntries[e];
  10208. if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
  10209. }
  10210. },
  10211. "catch": function _catch(t) {
  10212. for (var e = this.tryEntries.length - 1; e >= 0; --e) {
  10213. var r = this.tryEntries[e];
  10214. if (r.tryLoc === t) {
  10215. var n = r.completion;
  10216. if ("throw" === n.type) {
  10217. var o = n.arg;
  10218. resetTryEntry(r);
  10219. }
  10220. return o;
  10221. }
  10222. }
  10223. throw Error("illegal catch attempt");
  10224. },
  10225. delegateYield: function delegateYield(e, r, n) {
  10226. return this.delegate = {
  10227. iterator: values(e),
  10228. resultName: r,
  10229. nextLoc: n
  10230. }, "next" === this.method && (this.arg = t), y;
  10231. }
  10232. }, e;
  10233. }
  10234. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  10235. /***/ }),
  10236. /* 43 */
  10237. /*!*****************************************************************!*\
  10238. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  10239. \*****************************************************************/
  10240. /*! no static exports found */
  10241. /***/ (function(module, exports) {
  10242. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  10243. try {
  10244. var info = gen[key](arg);
  10245. var value = info.value;
  10246. } catch (error) {
  10247. reject(error);
  10248. return;
  10249. }
  10250. if (info.done) {
  10251. resolve(value);
  10252. } else {
  10253. Promise.resolve(value).then(_next, _throw);
  10254. }
  10255. }
  10256. function _asyncToGenerator(fn) {
  10257. return function () {
  10258. var self = this,
  10259. args = arguments;
  10260. return new Promise(function (resolve, reject) {
  10261. var gen = fn.apply(self, args);
  10262. function _next(value) {
  10263. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  10264. }
  10265. function _throw(err) {
  10266. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  10267. }
  10268. _next(undefined);
  10269. });
  10270. };
  10271. }
  10272. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  10273. /***/ }),
  10274. /* 44 */
  10275. /*!************************************************************************************************!*\
  10276. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/timeFormat.js ***!
  10277. \************************************************************************************************/
  10278. /*! no static exports found */
  10279. /***/ (function(module, exports, __webpack_require__) {
  10280. "use strict";
  10281. Object.defineProperty(exports, "__esModule", {
  10282. value: true
  10283. });
  10284. exports.default = void 0;
  10285. // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序
  10286. // 所以这里做一个兼容polyfill的兼容处理
  10287. if (!String.prototype.padStart) {
  10288. // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解
  10289. String.prototype.padStart = function (maxLength) {
  10290. var fillString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
  10291. if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError('fillString must be String');
  10292. var str = this;
  10293. // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉
  10294. if (str.length >= maxLength) return String(str);
  10295. var fillLength = maxLength - str.length,
  10296. times = Math.ceil(fillLength / fillString.length);
  10297. while (times >>= 1) {
  10298. fillString += fillString;
  10299. if (times === 1) {
  10300. fillString += fillString;
  10301. }
  10302. }
  10303. return fillString.slice(0, fillLength) + str;
  10304. };
  10305. }
  10306. // 其他更多是格式化有如下:
  10307. // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合
  10308. function timeFormat() {
  10309. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  10310. var fmt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  10311. // 如果为null,则格式化当前时间
  10312. if (!dateTime) dateTime = Number(new Date());
  10313. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  10314. if (dateTime.toString().length == 10) dateTime *= 1000;
  10315. var date = new Date(dateTime);
  10316. var ret;
  10317. var opt = {
  10318. "y+": date.getFullYear().toString(),
  10319. // 年
  10320. "m+": (date.getMonth() + 1).toString(),
  10321. // 月
  10322. "d+": date.getDate().toString(),
  10323. // 日
  10324. "h+": date.getHours().toString(),
  10325. // 时
  10326. "M+": date.getMinutes().toString(),
  10327. // 分
  10328. "s+": date.getSeconds().toString() // 秒
  10329. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  10330. };
  10331. for (var k in opt) {
  10332. ret = new RegExp("(" + k + ")").exec(fmt);
  10333. if (ret) {
  10334. fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0"));
  10335. }
  10336. ;
  10337. }
  10338. ;
  10339. return fmt;
  10340. }
  10341. var _default = timeFormat;
  10342. exports.default = _default;
  10343. /***/ }),
  10344. /* 45 */
  10345. /*!**********************************************************************************************!*\
  10346. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/timeFrom.js ***!
  10347. \**********************************************************************************************/
  10348. /*! no static exports found */
  10349. /***/ (function(module, exports, __webpack_require__) {
  10350. "use strict";
  10351. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10352. Object.defineProperty(exports, "__esModule", {
  10353. value: true
  10354. });
  10355. exports.default = void 0;
  10356. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ../../libs/function/timeFormat.js */ 44));
  10357. /**
  10358. * 时间戳转为多久之前
  10359. * @param String timestamp 时间戳
  10360. * @param String | Boolean format 如果为时间格式字符串,超出一定时间范围,返回固定的时间格式;
  10361. * 如果为布尔值false,无论什么时间,都返回多久以前的格式
  10362. */
  10363. function timeFrom() {
  10364. var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  10365. var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  10366. // 如果为null,则格式化当前时间
  10367. if (!dateTime) dateTime = Number(new Date());
  10368. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  10369. if (dateTime.toString().length == 10) dateTime *= 1000;
  10370. var timestamp = +new Date(Number(dateTime));
  10371. var timer = (Number(new Date()) - timestamp) / 1000;
  10372. // 如果小于5分钟,则返回"刚刚",其他以此类推
  10373. var tips = '';
  10374. switch (true) {
  10375. case timer < 300:
  10376. tips = '刚刚';
  10377. break;
  10378. case timer >= 300 && timer < 3600:
  10379. tips = parseInt(timer / 60) + '分钟前';
  10380. break;
  10381. case timer >= 3600 && timer < 86400:
  10382. tips = parseInt(timer / 3600) + '小时前';
  10383. break;
  10384. case timer >= 86400 && timer < 2592000:
  10385. tips = parseInt(timer / 86400) + '天前';
  10386. break;
  10387. default:
  10388. // 如果format为false,则无论什么时间戳,都显示xx之前
  10389. if (format === false) {
  10390. if (timer >= 2592000 && timer < 365 * 86400) {
  10391. tips = parseInt(timer / (86400 * 30)) + '个月前';
  10392. } else {
  10393. tips = parseInt(timer / (86400 * 365)) + '年前';
  10394. }
  10395. } else {
  10396. tips = (0, _timeFormat.default)(timestamp, format);
  10397. }
  10398. }
  10399. return tips;
  10400. }
  10401. var _default = timeFrom;
  10402. exports.default = _default;
  10403. /***/ }),
  10404. /* 46 */
  10405. /*!***************************************************************************************************!*\
  10406. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/colorGradient.js ***!
  10407. \***************************************************************************************************/
  10408. /*! no static exports found */
  10409. /***/ (function(module, exports, __webpack_require__) {
  10410. "use strict";
  10411. Object.defineProperty(exports, "__esModule", {
  10412. value: true
  10413. });
  10414. exports.default = void 0;
  10415. /**
  10416. * 求两个颜色之间的渐变值
  10417. * @param {string} startColor 开始的颜色
  10418. * @param {string} endColor 结束的颜色
  10419. * @param {number} step 颜色等分的份额
  10420. * */
  10421. function colorGradient() {
  10422. var startColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgb(0, 0, 0)';
  10423. var endColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rgb(255, 255, 255)';
  10424. var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
  10425. var startRGB = hexToRgb(startColor, false); //转换为rgb数组模式
  10426. var startR = startRGB[0];
  10427. var startG = startRGB[1];
  10428. var startB = startRGB[2];
  10429. var endRGB = hexToRgb(endColor, false);
  10430. var endR = endRGB[0];
  10431. var endG = endRGB[1];
  10432. var endB = endRGB[2];
  10433. var sR = (endR - startR) / step; //总差值
  10434. var sG = (endG - startG) / step;
  10435. var sB = (endB - startB) / step;
  10436. var colorArr = [];
  10437. for (var i = 0; i < step; i++) {
  10438. //计算每一步的hex值
  10439. var hex = rgbToHex('rgb(' + Math.round(sR * i + startR) + ',' + Math.round(sG * i + startG) + ',' + Math.round(sB * i + startB) + ')');
  10440. colorArr.push(hex);
  10441. }
  10442. return colorArr;
  10443. }
  10444. // 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式)
  10445. function hexToRgb(sColor) {
  10446. var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  10447. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  10448. sColor = sColor.toLowerCase();
  10449. if (sColor && reg.test(sColor)) {
  10450. if (sColor.length === 4) {
  10451. var sColorNew = "#";
  10452. for (var i = 1; i < 4; i += 1) {
  10453. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  10454. }
  10455. sColor = sColorNew;
  10456. }
  10457. //处理六位的颜色值
  10458. var sColorChange = [];
  10459. for (var _i = 1; _i < 7; _i += 2) {
  10460. sColorChange.push(parseInt("0x" + sColor.slice(_i, _i + 2)));
  10461. }
  10462. if (!str) {
  10463. return sColorChange;
  10464. } else {
  10465. return "rgb(".concat(sColorChange[0], ",").concat(sColorChange[1], ",").concat(sColorChange[2], ")");
  10466. }
  10467. } else if (/^(rgb|RGB)/.test(sColor)) {
  10468. var arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  10469. return arr.map(function (val) {
  10470. return Number(val);
  10471. });
  10472. } else {
  10473. return sColor;
  10474. }
  10475. }
  10476. ;
  10477. // 将rgb表示方式转换为hex表示方式
  10478. function rgbToHex(rgb) {
  10479. var _this = rgb;
  10480. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  10481. if (/^(rgb|RGB)/.test(_this)) {
  10482. var aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  10483. var strHex = "#";
  10484. for (var i = 0; i < aColor.length; i++) {
  10485. var hex = Number(aColor[i]).toString(16);
  10486. hex = String(hex).length == 1 ? 0 + '' + hex : hex; // 保证每个rgb的值为2位
  10487. if (hex === "0") {
  10488. hex += hex;
  10489. }
  10490. strHex += hex;
  10491. }
  10492. if (strHex.length !== 7) {
  10493. strHex = _this;
  10494. }
  10495. return strHex;
  10496. } else if (reg.test(_this)) {
  10497. var aNum = _this.replace(/#/, "").split("");
  10498. if (aNum.length === 6) {
  10499. return _this;
  10500. } else if (aNum.length === 3) {
  10501. var numHex = "#";
  10502. for (var _i2 = 0; _i2 < aNum.length; _i2 += 1) {
  10503. numHex += aNum[_i2] + aNum[_i2];
  10504. }
  10505. return numHex;
  10506. }
  10507. } else {
  10508. return _this;
  10509. }
  10510. }
  10511. /**
  10512. * JS颜色十六进制转换为rgb或rgba,返回的格式为 rgba(255,255,255,0.5)字符串
  10513. * sHex为传入的十六进制的色值
  10514. * alpha为rgba的透明度
  10515. */
  10516. function colorToRgba(color) {
  10517. var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.3;
  10518. color = rgbToHex(color);
  10519. // 十六进制颜色值的正则表达式
  10520. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  10521. /* 16进制颜色转为RGB格式 */
  10522. var sColor = color.toLowerCase();
  10523. if (sColor && reg.test(sColor)) {
  10524. if (sColor.length === 4) {
  10525. var sColorNew = '#';
  10526. for (var i = 1; i < 4; i += 1) {
  10527. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  10528. }
  10529. sColor = sColorNew;
  10530. }
  10531. // 处理六位的颜色值
  10532. var sColorChange = [];
  10533. for (var _i3 = 1; _i3 < 7; _i3 += 2) {
  10534. sColorChange.push(parseInt('0x' + sColor.slice(_i3, _i3 + 2)));
  10535. }
  10536. // return sColorChange.join(',')
  10537. return 'rgba(' + sColorChange.join(',') + ',' + alpha + ')';
  10538. } else {
  10539. return sColor;
  10540. }
  10541. }
  10542. var _default = {
  10543. colorGradient: colorGradient,
  10544. hexToRgb: hexToRgb,
  10545. rgbToHex: rgbToHex,
  10546. colorToRgba: colorToRgba
  10547. };
  10548. exports.default = _default;
  10549. /***/ }),
  10550. /* 47 */
  10551. /*!******************************************************************************************!*\
  10552. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/guid.js ***!
  10553. \******************************************************************************************/
  10554. /*! no static exports found */
  10555. /***/ (function(module, exports, __webpack_require__) {
  10556. "use strict";
  10557. Object.defineProperty(exports, "__esModule", {
  10558. value: true
  10559. });
  10560. exports.default = void 0;
  10561. /**
  10562. * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85
  10563. * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier)
  10564. * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
  10565. * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
  10566. * v-for的时候,推荐使用后端返回的id而不是循环的index
  10567. * @param {Number} len uuid的长度
  10568. * @param {Boolean} firstU 将返回的首字母置为"u"
  10569. * @param {Number} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  10570. */
  10571. function guid() {
  10572. var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
  10573. var firstU = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  10574. var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  10575. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  10576. var uuid = [];
  10577. radix = radix || chars.length;
  10578. if (len) {
  10579. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  10580. for (var i = 0; i < len; i++) {
  10581. uuid[i] = chars[0 | Math.random() * radix];
  10582. }
  10583. } else {
  10584. var r;
  10585. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  10586. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  10587. uuid[14] = '4';
  10588. for (var _i = 0; _i < 36; _i++) {
  10589. if (!uuid[_i]) {
  10590. r = 0 | Math.random() * 16;
  10591. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  10592. }
  10593. }
  10594. }
  10595. // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guid不能用作id或者class
  10596. if (firstU) {
  10597. uuid.shift();
  10598. return 'u' + uuid.join('');
  10599. } else {
  10600. return uuid.join('');
  10601. }
  10602. }
  10603. var _default = guid;
  10604. exports.default = _default;
  10605. /***/ }),
  10606. /* 48 */
  10607. /*!*******************************************************************************************!*\
  10608. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/color.js ***!
  10609. \*******************************************************************************************/
  10610. /*! no static exports found */
  10611. /***/ (function(module, exports, __webpack_require__) {
  10612. "use strict";
  10613. Object.defineProperty(exports, "__esModule", {
  10614. value: true
  10615. });
  10616. exports.default = void 0;
  10617. // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
  10618. // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
  10619. var color = {
  10620. primary: "#2979ff",
  10621. primaryDark: "#2b85e4",
  10622. primaryDisabled: "#a0cfff",
  10623. primaryLight: "#ecf5ff",
  10624. bgColor: "#f3f4f6",
  10625. info: "#909399",
  10626. infoDark: "#82848a",
  10627. infoDisabled: "#c8c9cc",
  10628. infoLight: "#f4f4f5",
  10629. warning: "#ff9900",
  10630. warningDark: "#f29100",
  10631. warningDisabled: "#fcbd71",
  10632. warningLight: "#fdf6ec",
  10633. error: "#fa3534",
  10634. errorDark: "#dd6161",
  10635. errorDisabled: "#fab6b6",
  10636. errorLight: "#fef0f0",
  10637. success: "#19be6b",
  10638. successDark: "#18b566",
  10639. successDisabled: "#71d5a1",
  10640. successLight: "#dbf1e1",
  10641. mainColor: "#303133",
  10642. contentColor: "#606266",
  10643. tipsColor: "#909399",
  10644. lightColor: "#c0c4cc",
  10645. borderColor: "#e4e7ed"
  10646. };
  10647. var _default = color;
  10648. exports.default = _default;
  10649. /***/ }),
  10650. /* 49 */
  10651. /*!***********************************************************************************************!*\
  10652. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/type2icon.js ***!
  10653. \***********************************************************************************************/
  10654. /*! no static exports found */
  10655. /***/ (function(module, exports, __webpack_require__) {
  10656. "use strict";
  10657. Object.defineProperty(exports, "__esModule", {
  10658. value: true
  10659. });
  10660. exports.default = void 0;
  10661. /**
  10662. * 根据主题type值,获取对应的图标
  10663. * @param String type 主题名称,primary|info|error|warning|success
  10664. * @param String fill 是否使用fill填充实体的图标
  10665. */
  10666. function type2icon() {
  10667. var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'success';
  10668. var fill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  10669. // 如果非预置值,默认为success
  10670. if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success';
  10671. var iconName = '';
  10672. // 目前(2019-12-12),info和primary使用同一个图标
  10673. switch (type) {
  10674. case 'primary':
  10675. iconName = 'info-circle';
  10676. break;
  10677. case 'info':
  10678. iconName = 'info-circle';
  10679. break;
  10680. case 'error':
  10681. iconName = 'close-circle';
  10682. break;
  10683. case 'warning':
  10684. iconName = 'error-circle';
  10685. break;
  10686. case 'success':
  10687. iconName = 'checkmark-circle';
  10688. break;
  10689. default:
  10690. iconName = 'checkmark-circle';
  10691. }
  10692. // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的
  10693. if (fill) iconName += '-fill';
  10694. return iconName;
  10695. }
  10696. var _default = type2icon;
  10697. exports.default = _default;
  10698. /***/ }),
  10699. /* 50 */
  10700. /*!*************************************************************************************************!*\
  10701. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/randomArray.js ***!
  10702. \*************************************************************************************************/
  10703. /*! no static exports found */
  10704. /***/ (function(module, exports, __webpack_require__) {
  10705. "use strict";
  10706. Object.defineProperty(exports, "__esModule", {
  10707. value: true
  10708. });
  10709. exports.default = void 0;
  10710. // 打乱数组
  10711. function randomArray() {
  10712. var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  10713. // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
  10714. return array.sort(function () {
  10715. return Math.random() - 0.5;
  10716. });
  10717. }
  10718. var _default = randomArray;
  10719. exports.default = _default;
  10720. /***/ }),
  10721. /* 51 */
  10722. /*!*********************************************************************************************!*\
  10723. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/addUnit.js ***!
  10724. \*********************************************************************************************/
  10725. /*! no static exports found */
  10726. /***/ (function(module, exports, __webpack_require__) {
  10727. "use strict";
  10728. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10729. Object.defineProperty(exports, "__esModule", {
  10730. value: true
  10731. });
  10732. exports.default = addUnit;
  10733. var _test = _interopRequireDefault(__webpack_require__(/*! ./test.js */ 38));
  10734. // 添加单位,如果有rpx,%,px等单位结尾或者值为auto,直接返回,否则加上rpx单位结尾
  10735. function addUnit() {
  10736. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'auto';
  10737. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rpx';
  10738. value = String(value);
  10739. // 用uView内置验证规则中的number判断是否为数值
  10740. return _test.default.number(value) ? "".concat(value).concat(unit) : value;
  10741. }
  10742. /***/ }),
  10743. /* 52 */
  10744. /*!********************************************************************************************!*\
  10745. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/random.js ***!
  10746. \********************************************************************************************/
  10747. /*! no static exports found */
  10748. /***/ (function(module, exports, __webpack_require__) {
  10749. "use strict";
  10750. Object.defineProperty(exports, "__esModule", {
  10751. value: true
  10752. });
  10753. exports.default = void 0;
  10754. function random(min, max) {
  10755. if (min >= 0 && max > 0 && max >= min) {
  10756. var gab = max - min + 1;
  10757. return Math.floor(Math.random() * gab + min);
  10758. } else {
  10759. return 0;
  10760. }
  10761. }
  10762. var _default = random;
  10763. exports.default = _default;
  10764. /***/ }),
  10765. /* 53 */
  10766. /*!******************************************************************************************!*\
  10767. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/trim.js ***!
  10768. \******************************************************************************************/
  10769. /*! no static exports found */
  10770. /***/ (function(module, exports, __webpack_require__) {
  10771. "use strict";
  10772. Object.defineProperty(exports, "__esModule", {
  10773. value: true
  10774. });
  10775. exports.default = void 0;
  10776. function trim(str) {
  10777. var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  10778. if (pos == 'both') {
  10779. return str.replace(/^\s+|\s+$/g, "");
  10780. } else if (pos == "left") {
  10781. return str.replace(/^\s*/, '');
  10782. } else if (pos == 'right') {
  10783. return str.replace(/(\s*$)/g, "");
  10784. } else if (pos == 'all') {
  10785. return str.replace(/\s+/g, "");
  10786. } else {
  10787. return str;
  10788. }
  10789. }
  10790. var _default = trim;
  10791. exports.default = _default;
  10792. /***/ }),
  10793. /* 54 */
  10794. /*!*******************************************************************************************!*\
  10795. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/toast.js ***!
  10796. \*******************************************************************************************/
  10797. /*! no static exports found */
  10798. /***/ (function(module, exports, __webpack_require__) {
  10799. "use strict";
  10800. /* WEBPACK VAR INJECTION */(function(uni) {
  10801. Object.defineProperty(exports, "__esModule", {
  10802. value: true
  10803. });
  10804. exports.default = void 0;
  10805. function toast(title) {
  10806. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1500;
  10807. uni.showToast({
  10808. title: title,
  10809. icon: 'none',
  10810. duration: duration
  10811. });
  10812. }
  10813. var _default = toast;
  10814. exports.default = _default;
  10815. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  10816. /***/ }),
  10817. /* 55 */
  10818. /*!***********************************************************************************************!*\
  10819. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/getParent.js ***!
  10820. \***********************************************************************************************/
  10821. /*! no static exports found */
  10822. /***/ (function(module, exports, __webpack_require__) {
  10823. "use strict";
  10824. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10825. Object.defineProperty(exports, "__esModule", {
  10826. value: true
  10827. });
  10828. exports.default = getParent;
  10829. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  10830. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  10831. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  10832. function getParent(name, keys) {
  10833. var parent = this.$parent;
  10834. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  10835. while (parent) {
  10836. // 父组件
  10837. if (parent.$options.name !== name) {
  10838. // 如果组件的name不相等,继续上一级寻找
  10839. parent = parent.$parent;
  10840. } else {
  10841. var _ret = function () {
  10842. var data = {};
  10843. // 判断keys是否数组,如果传过来的是一个数组,那么直接使用数组元素值当做键值去父组件寻找
  10844. if (Array.isArray(keys)) {
  10845. keys.map(function (val) {
  10846. data[val] = parent[val] ? parent[val] : '';
  10847. });
  10848. } else {
  10849. // 历遍传过来的对象参数
  10850. for (var i in keys) {
  10851. // 如果子组件有此值则用,无此值则用父组件的值
  10852. // 判断是否空数组,如果是,则用父组件的值,否则用子组件的值
  10853. if (Array.isArray(keys[i])) {
  10854. if (keys[i].length) {
  10855. data[i] = keys[i];
  10856. } else {
  10857. data[i] = parent[i];
  10858. }
  10859. } else if (keys[i].constructor === Object) {
  10860. // 判断是否对象,如果是对象,且有属性,那么使用子组件的值,否则使用父组件的值
  10861. if (Object.keys(keys[i]).length) {
  10862. data[i] = keys[i];
  10863. } else {
  10864. data[i] = parent[i];
  10865. }
  10866. } else {
  10867. // 只要子组件有传值,即使是false值,也是“传值”了,也需要覆盖父组件的同名参数
  10868. data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i];
  10869. }
  10870. }
  10871. }
  10872. return {
  10873. v: data
  10874. };
  10875. }();
  10876. if ((0, _typeof2.default)(_ret) === "object") return _ret.v;
  10877. }
  10878. }
  10879. return {};
  10880. }
  10881. /***/ }),
  10882. /* 56 */
  10883. /*!*********************************************************************************************!*\
  10884. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/$parent.js ***!
  10885. \*********************************************************************************************/
  10886. /*! no static exports found */
  10887. /***/ (function(module, exports, __webpack_require__) {
  10888. "use strict";
  10889. Object.defineProperty(exports, "__esModule", {
  10890. value: true
  10891. });
  10892. exports.default = $parent;
  10893. // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  10894. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  10895. // 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name
  10896. // 值(默认为undefined),就是查找最顶层的$parent
  10897. function $parent() {
  10898. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  10899. var parent = this.$parent;
  10900. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  10901. while (parent) {
  10902. // 父组件
  10903. if (parent.$options && parent.$options.name !== name) {
  10904. // 如果组件的name不相等,继续上一级寻找
  10905. parent = parent.$parent;
  10906. } else {
  10907. return parent;
  10908. }
  10909. }
  10910. return false;
  10911. }
  10912. /***/ }),
  10913. /* 57 */
  10914. /*!*****************************************************************************************!*\
  10915. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/sys.js ***!
  10916. \*****************************************************************************************/
  10917. /*! no static exports found */
  10918. /***/ (function(module, exports, __webpack_require__) {
  10919. "use strict";
  10920. /* WEBPACK VAR INJECTION */(function(uni) {
  10921. Object.defineProperty(exports, "__esModule", {
  10922. value: true
  10923. });
  10924. exports.os = os;
  10925. exports.sys = sys;
  10926. function os() {
  10927. return uni.getSystemInfoSync().platform;
  10928. }
  10929. ;
  10930. function sys() {
  10931. return uni.getSystemInfoSync();
  10932. }
  10933. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  10934. /***/ }),
  10935. /* 58 */
  10936. /*!**********************************************************************************************!*\
  10937. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/debounce.js ***!
  10938. \**********************************************************************************************/
  10939. /*! no static exports found */
  10940. /***/ (function(module, exports, __webpack_require__) {
  10941. "use strict";
  10942. Object.defineProperty(exports, "__esModule", {
  10943. value: true
  10944. });
  10945. exports.default = void 0;
  10946. var timeout = null;
  10947. /**
  10948. * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
  10949. *
  10950. * @param {Function} func 要执行的回调函数
  10951. * @param {Number} wait 延时的时间
  10952. * @param {Boolean} immediate 是否立即执行
  10953. * @return null
  10954. */
  10955. function debounce(func) {
  10956. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  10957. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  10958. // 清除定时器
  10959. if (timeout !== null) clearTimeout(timeout);
  10960. // 立即执行,此类情况一般用不到
  10961. if (immediate) {
  10962. var callNow = !timeout;
  10963. timeout = setTimeout(function () {
  10964. timeout = null;
  10965. }, wait);
  10966. if (callNow) typeof func === 'function' && func();
  10967. } else {
  10968. // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
  10969. timeout = setTimeout(function () {
  10970. typeof func === 'function' && func();
  10971. }, wait);
  10972. }
  10973. }
  10974. var _default = debounce;
  10975. exports.default = _default;
  10976. /***/ }),
  10977. /* 59 */
  10978. /*!**********************************************************************************************!*\
  10979. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/function/throttle.js ***!
  10980. \**********************************************************************************************/
  10981. /*! no static exports found */
  10982. /***/ (function(module, exports, __webpack_require__) {
  10983. "use strict";
  10984. Object.defineProperty(exports, "__esModule", {
  10985. value: true
  10986. });
  10987. exports.default = void 0;
  10988. var timer, flag;
  10989. /**
  10990. * 节流原理:在一定时间内,只能触发一次
  10991. *
  10992. * @param {Function} func 要执行的回调函数
  10993. * @param {Number} wait 延时的时间
  10994. * @param {Boolean} immediate 是否立即执行
  10995. * @return null
  10996. */
  10997. function throttle(func) {
  10998. var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
  10999. var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  11000. if (immediate) {
  11001. if (!flag) {
  11002. flag = true;
  11003. // 如果是立即执行,则在wait毫秒内开始时执行
  11004. typeof func === 'function' && func();
  11005. timer = setTimeout(function () {
  11006. flag = false;
  11007. }, wait);
  11008. }
  11009. } else {
  11010. if (!flag) {
  11011. flag = true;
  11012. // 如果是非立即执行,则在wait毫秒内的结束处执行
  11013. timer = setTimeout(function () {
  11014. flag = false;
  11015. typeof func === 'function' && func();
  11016. }, wait);
  11017. }
  11018. }
  11019. }
  11020. ;
  11021. var _default = throttle;
  11022. exports.default = _default;
  11023. /***/ }),
  11024. /* 60 */
  11025. /*!******************************************************************************************!*\
  11026. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/config/config.js ***!
  11027. \******************************************************************************************/
  11028. /*! no static exports found */
  11029. /***/ (function(module, exports, __webpack_require__) {
  11030. "use strict";
  11031. Object.defineProperty(exports, "__esModule", {
  11032. value: true
  11033. });
  11034. exports.default = void 0;
  11035. // 此版本发布于2023-03-27
  11036. var version = '1.8.8';
  11037. var _default = {
  11038. v: version,
  11039. version: version,
  11040. // 主题名称
  11041. type: ['primary', 'success', 'info', 'error', 'warning']
  11042. };
  11043. exports.default = _default;
  11044. /***/ }),
  11045. /* 61 */
  11046. /*!******************************************************************************************!*\
  11047. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/uview-ui/libs/config/zIndex.js ***!
  11048. \******************************************************************************************/
  11049. /*! no static exports found */
  11050. /***/ (function(module, exports, __webpack_require__) {
  11051. "use strict";
  11052. Object.defineProperty(exports, "__esModule", {
  11053. value: true
  11054. });
  11055. exports.default = void 0;
  11056. // uniapp在H5中各API的z-index值如下:
  11057. /**
  11058. * actionsheet: 999
  11059. * modal: 999
  11060. * navigate: 998
  11061. * tabbar: 998
  11062. * toast: 999
  11063. */
  11064. var _default = {
  11065. toast: 10090,
  11066. noNetwork: 10080,
  11067. // popup包含popup,actionsheet,keyboard,picker的值
  11068. popup: 10075,
  11069. mask: 10070,
  11070. navbar: 980,
  11071. topTips: 975,
  11072. sticky: 970,
  11073. indexListSticky: 965
  11074. };
  11075. exports.default = _default;
  11076. /***/ }),
  11077. /* 62 */
  11078. /*!**************************************************************************!*\
  11079. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/index.js ***!
  11080. \**************************************************************************/
  11081. /*! no static exports found */
  11082. /***/ (function(module, exports, __webpack_require__) {
  11083. "use strict";
  11084. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11085. Object.defineProperty(exports, "__esModule", {
  11086. value: true
  11087. });
  11088. exports.all = exports.VERSION = exports.HttpStatusCode = exports.CanceledError = exports.CancelToken = exports.Cancel = exports.AxiosHeaders = exports.AxiosError = exports.Axios = void 0;
  11089. Object.defineProperty(exports, "default", {
  11090. enumerable: true,
  11091. get: function get() {
  11092. return _axios.default;
  11093. }
  11094. });
  11095. exports.toFormData = exports.spread = exports.mergeConfig = exports.isCancel = exports.isAxiosError = exports.getAdapter = exports.formToJSON = void 0;
  11096. var _axios = _interopRequireDefault(__webpack_require__(/*! ./lib/axios.js */ 63));
  11097. // This module is intended to unwrap Axios default export as named.
  11098. // Keep top-level export same with static properties
  11099. // so that it can keep same with es module or cjs
  11100. var Axios = _axios.default.Axios,
  11101. AxiosError = _axios.default.AxiosError,
  11102. CanceledError = _axios.default.CanceledError,
  11103. isCancel = _axios.default.isCancel,
  11104. CancelToken = _axios.default.CancelToken,
  11105. VERSION = _axios.default.VERSION,
  11106. all = _axios.default.all,
  11107. Cancel = _axios.default.Cancel,
  11108. isAxiosError = _axios.default.isAxiosError,
  11109. spread = _axios.default.spread,
  11110. toFormData = _axios.default.toFormData,
  11111. AxiosHeaders = _axios.default.AxiosHeaders,
  11112. HttpStatusCode = _axios.default.HttpStatusCode,
  11113. formToJSON = _axios.default.formToJSON,
  11114. getAdapter = _axios.default.getAdapter,
  11115. mergeConfig = _axios.default.mergeConfig;
  11116. exports.mergeConfig = mergeConfig;
  11117. exports.getAdapter = getAdapter;
  11118. exports.formToJSON = formToJSON;
  11119. exports.HttpStatusCode = HttpStatusCode;
  11120. exports.AxiosHeaders = AxiosHeaders;
  11121. exports.toFormData = toFormData;
  11122. exports.spread = spread;
  11123. exports.isAxiosError = isAxiosError;
  11124. exports.Cancel = Cancel;
  11125. exports.all = all;
  11126. exports.VERSION = VERSION;
  11127. exports.CancelToken = CancelToken;
  11128. exports.isCancel = isCancel;
  11129. exports.CanceledError = CanceledError;
  11130. exports.AxiosError = AxiosError;
  11131. exports.Axios = Axios;
  11132. /***/ }),
  11133. /* 63 */
  11134. /*!******************************************************************************!*\
  11135. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/axios.js ***!
  11136. \******************************************************************************/
  11137. /*! no static exports found */
  11138. /***/ (function(module, exports, __webpack_require__) {
  11139. "use strict";
  11140. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11141. Object.defineProperty(exports, "__esModule", {
  11142. value: true
  11143. });
  11144. exports.default = void 0;
  11145. var _utils = _interopRequireDefault(__webpack_require__(/*! ./utils.js */ 64));
  11146. var _bind = _interopRequireDefault(__webpack_require__(/*! ./helpers/bind.js */ 65));
  11147. var _Axios = _interopRequireDefault(__webpack_require__(/*! ./core/Axios.js */ 66));
  11148. var _mergeConfig = _interopRequireDefault(__webpack_require__(/*! ./core/mergeConfig.js */ 107));
  11149. var _index = _interopRequireDefault(__webpack_require__(/*! ./defaults/index.js */ 79));
  11150. var _formDataToJSON = _interopRequireDefault(__webpack_require__(/*! ./helpers/formDataToJSON.js */ 88));
  11151. var _CanceledError = _interopRequireDefault(__webpack_require__(/*! ./cancel/CanceledError.js */ 92));
  11152. var _CancelToken = _interopRequireDefault(__webpack_require__(/*! ./cancel/CancelToken.js */ 118));
  11153. var _isCancel = _interopRequireDefault(__webpack_require__(/*! ./cancel/isCancel.js */ 91));
  11154. var _data = __webpack_require__(/*! ./env/data.js */ 117);
  11155. var _toFormData = _interopRequireDefault(__webpack_require__(/*! ./helpers/toFormData.js */ 69));
  11156. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ./core/AxiosError.js */ 74));
  11157. var _spread = _interopRequireDefault(__webpack_require__(/*! ./helpers/spread.js */ 119));
  11158. var _isAxiosError = _interopRequireDefault(__webpack_require__(/*! ./helpers/isAxiosError.js */ 120));
  11159. var _AxiosHeaders = _interopRequireDefault(__webpack_require__(/*! ./core/AxiosHeaders.js */ 89));
  11160. var _adapters = _interopRequireDefault(__webpack_require__(/*! ./adapters/adapters.js */ 93));
  11161. var _HttpStatusCode = _interopRequireDefault(__webpack_require__(/*! ./helpers/HttpStatusCode.js */ 121));
  11162. /**
  11163. * Create an instance of Axios
  11164. *
  11165. * @param {Object} defaultConfig The default config for the instance
  11166. *
  11167. * @returns {Axios} A new instance of Axios
  11168. */
  11169. function createInstance(defaultConfig) {
  11170. var context = new _Axios.default(defaultConfig);
  11171. var instance = (0, _bind.default)(_Axios.default.prototype.request, context);
  11172. // Copy axios.prototype to instance
  11173. _utils.default.extend(instance, _Axios.default.prototype, context, {
  11174. allOwnKeys: true
  11175. });
  11176. // Copy context to instance
  11177. _utils.default.extend(instance, context, null, {
  11178. allOwnKeys: true
  11179. });
  11180. // Factory for creating new instances
  11181. instance.create = function create(instanceConfig) {
  11182. return createInstance((0, _mergeConfig.default)(defaultConfig, instanceConfig));
  11183. };
  11184. return instance;
  11185. }
  11186. // Create the default instance to be exported
  11187. var axios = createInstance(_index.default);
  11188. // Expose Axios class to allow class inheritance
  11189. axios.Axios = _Axios.default;
  11190. // Expose Cancel & CancelToken
  11191. axios.CanceledError = _CanceledError.default;
  11192. axios.CancelToken = _CancelToken.default;
  11193. axios.isCancel = _isCancel.default;
  11194. axios.VERSION = _data.VERSION;
  11195. axios.toFormData = _toFormData.default;
  11196. // Expose AxiosError class
  11197. axios.AxiosError = _AxiosError.default;
  11198. // alias for CanceledError for backward compatibility
  11199. axios.Cancel = axios.CanceledError;
  11200. // Expose all/spread
  11201. axios.all = function all(promises) {
  11202. return Promise.all(promises);
  11203. };
  11204. axios.spread = _spread.default;
  11205. // Expose isAxiosError
  11206. axios.isAxiosError = _isAxiosError.default;
  11207. // Expose mergeConfig
  11208. axios.mergeConfig = _mergeConfig.default;
  11209. axios.AxiosHeaders = _AxiosHeaders.default;
  11210. axios.formToJSON = function (thing) {
  11211. return (0, _formDataToJSON.default)(_utils.default.isHTMLForm(thing) ? new FormData(thing) : thing);
  11212. };
  11213. axios.getAdapter = _adapters.default.getAdapter;
  11214. axios.HttpStatusCode = _HttpStatusCode.default;
  11215. axios.default = axios;
  11216. // this module should only have a default export
  11217. var _default = axios;
  11218. exports.default = _default;
  11219. /***/ }),
  11220. /* 64 */
  11221. /*!******************************************************************************!*\
  11222. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/utils.js ***!
  11223. \******************************************************************************/
  11224. /*! no static exports found */
  11225. /***/ (function(module, exports, __webpack_require__) {
  11226. "use strict";
  11227. /* WEBPACK VAR INJECTION */(function(global) {
  11228. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11229. Object.defineProperty(exports, "__esModule", {
  11230. value: true
  11231. });
  11232. exports.default = void 0;
  11233. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  11234. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  11235. var _bind = _interopRequireDefault(__webpack_require__(/*! ./helpers/bind.js */ 65));
  11236. // utils is a library of generic helper functions non-specific to axios
  11237. var toString = Object.prototype.toString;
  11238. var getPrototypeOf = Object.getPrototypeOf;
  11239. var kindOf = function (cache) {
  11240. return function (thing) {
  11241. var str = toString.call(thing);
  11242. return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
  11243. };
  11244. }(Object.create(null));
  11245. var kindOfTest = function kindOfTest(type) {
  11246. type = type.toLowerCase();
  11247. return function (thing) {
  11248. return kindOf(thing) === type;
  11249. };
  11250. };
  11251. var typeOfTest = function typeOfTest(type) {
  11252. return function (thing) {
  11253. return (0, _typeof2.default)(thing) === type;
  11254. };
  11255. };
  11256. /**
  11257. * Determine if a value is an Array
  11258. *
  11259. * @param {Object} val The value to test
  11260. *
  11261. * @returns {boolean} True if value is an Array, otherwise false
  11262. */
  11263. var isArray = Array.isArray;
  11264. /**
  11265. * Determine if a value is undefined
  11266. *
  11267. * @param {*} val The value to test
  11268. *
  11269. * @returns {boolean} True if the value is undefined, otherwise false
  11270. */
  11271. var isUndefined = typeOfTest('undefined');
  11272. /**
  11273. * Determine if a value is a Buffer
  11274. *
  11275. * @param {*} val The value to test
  11276. *
  11277. * @returns {boolean} True if value is a Buffer, otherwise false
  11278. */
  11279. function isBuffer(val) {
  11280. return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
  11281. }
  11282. /**
  11283. * Determine if a value is an ArrayBuffer
  11284. *
  11285. * @param {*} val The value to test
  11286. *
  11287. * @returns {boolean} True if value is an ArrayBuffer, otherwise false
  11288. */
  11289. var isArrayBuffer = kindOfTest('ArrayBuffer');
  11290. /**
  11291. * Determine if a value is a view on an ArrayBuffer
  11292. *
  11293. * @param {*} val The value to test
  11294. *
  11295. * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
  11296. */
  11297. function isArrayBufferView(val) {
  11298. var result;
  11299. if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
  11300. result = ArrayBuffer.isView(val);
  11301. } else {
  11302. result = val && val.buffer && isArrayBuffer(val.buffer);
  11303. }
  11304. return result;
  11305. }
  11306. /**
  11307. * Determine if a value is a String
  11308. *
  11309. * @param {*} val The value to test
  11310. *
  11311. * @returns {boolean} True if value is a String, otherwise false
  11312. */
  11313. var isString = typeOfTest('string');
  11314. /**
  11315. * Determine if a value is a Function
  11316. *
  11317. * @param {*} val The value to test
  11318. * @returns {boolean} True if value is a Function, otherwise false
  11319. */
  11320. var isFunction = typeOfTest('function');
  11321. /**
  11322. * Determine if a value is a Number
  11323. *
  11324. * @param {*} val The value to test
  11325. *
  11326. * @returns {boolean} True if value is a Number, otherwise false
  11327. */
  11328. var isNumber = typeOfTest('number');
  11329. /**
  11330. * Determine if a value is an Object
  11331. *
  11332. * @param {*} thing The value to test
  11333. *
  11334. * @returns {boolean} True if value is an Object, otherwise false
  11335. */
  11336. var isObject = function isObject(thing) {
  11337. return thing !== null && (0, _typeof2.default)(thing) === 'object';
  11338. };
  11339. /**
  11340. * Determine if a value is a Boolean
  11341. *
  11342. * @param {*} thing The value to test
  11343. * @returns {boolean} True if value is a Boolean, otherwise false
  11344. */
  11345. var isBoolean = function isBoolean(thing) {
  11346. return thing === true || thing === false;
  11347. };
  11348. /**
  11349. * Determine if a value is a plain Object
  11350. *
  11351. * @param {*} val The value to test
  11352. *
  11353. * @returns {boolean} True if value is a plain Object, otherwise false
  11354. */
  11355. var isPlainObject = function isPlainObject(val) {
  11356. if (kindOf(val) !== 'object') {
  11357. return false;
  11358. }
  11359. var prototype = getPrototypeOf(val);
  11360. return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
  11361. };
  11362. /**
  11363. * Determine if a value is a Date
  11364. *
  11365. * @param {*} val The value to test
  11366. *
  11367. * @returns {boolean} True if value is a Date, otherwise false
  11368. */
  11369. var isDate = kindOfTest('Date');
  11370. /**
  11371. * Determine if a value is a File
  11372. *
  11373. * @param {*} val The value to test
  11374. *
  11375. * @returns {boolean} True if value is a File, otherwise false
  11376. */
  11377. var isFile = kindOfTest('File');
  11378. /**
  11379. * Determine if a value is a Blob
  11380. *
  11381. * @param {*} val The value to test
  11382. *
  11383. * @returns {boolean} True if value is a Blob, otherwise false
  11384. */
  11385. var isBlob = kindOfTest('Blob');
  11386. /**
  11387. * Determine if a value is a FileList
  11388. *
  11389. * @param {*} val The value to test
  11390. *
  11391. * @returns {boolean} True if value is a File, otherwise false
  11392. */
  11393. var isFileList = kindOfTest('FileList');
  11394. /**
  11395. * Determine if a value is a Stream
  11396. *
  11397. * @param {*} val The value to test
  11398. *
  11399. * @returns {boolean} True if value is a Stream, otherwise false
  11400. */
  11401. var isStream = function isStream(val) {
  11402. return isObject(val) && isFunction(val.pipe);
  11403. };
  11404. /**
  11405. * Determine if a value is a FormData
  11406. *
  11407. * @param {*} thing The value to test
  11408. *
  11409. * @returns {boolean} True if value is an FormData, otherwise false
  11410. */
  11411. var isFormData = function isFormData(thing) {
  11412. var kind;
  11413. return thing && (typeof FormData === 'function' && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === 'formdata' ||
  11414. // detect form-data instance
  11415. kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]'));
  11416. };
  11417. /**
  11418. * Determine if a value is a URLSearchParams object
  11419. *
  11420. * @param {*} val The value to test
  11421. *
  11422. * @returns {boolean} True if value is a URLSearchParams object, otherwise false
  11423. */
  11424. var isURLSearchParams = kindOfTest('URLSearchParams');
  11425. var _map = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest),
  11426. _map2 = (0, _slicedToArray2.default)(_map, 4),
  11427. isReadableStream = _map2[0],
  11428. isRequest = _map2[1],
  11429. isResponse = _map2[2],
  11430. isHeaders = _map2[3];
  11431. /**
  11432. * Trim excess whitespace off the beginning and end of a string
  11433. *
  11434. * @param {String} str The String to trim
  11435. *
  11436. * @returns {String} The String freed of excess whitespace
  11437. */
  11438. var trim = function trim(str) {
  11439. return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
  11440. };
  11441. /**
  11442. * Iterate over an Array or an Object invoking a function for each item.
  11443. *
  11444. * If `obj` is an Array callback will be called passing
  11445. * the value, index, and complete array for each item.
  11446. *
  11447. * If 'obj' is an Object callback will be called passing
  11448. * the value, key, and complete object for each property.
  11449. *
  11450. * @param {Object|Array} obj The object to iterate
  11451. * @param {Function} fn The callback to invoke for each item
  11452. *
  11453. * @param {Boolean} [allOwnKeys = false]
  11454. * @returns {any}
  11455. */
  11456. function forEach(obj, fn) {
  11457. var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
  11458. _ref$allOwnKeys = _ref.allOwnKeys,
  11459. allOwnKeys = _ref$allOwnKeys === void 0 ? false : _ref$allOwnKeys;
  11460. // Don't bother if no value provided
  11461. if (obj === null || typeof obj === 'undefined') {
  11462. return;
  11463. }
  11464. var i;
  11465. var l;
  11466. // Force an array if not already something iterable
  11467. if ((0, _typeof2.default)(obj) !== 'object') {
  11468. /*eslint no-param-reassign:0*/
  11469. obj = [obj];
  11470. }
  11471. if (isArray(obj)) {
  11472. // Iterate over array values
  11473. for (i = 0, l = obj.length; i < l; i++) {
  11474. fn.call(null, obj[i], i, obj);
  11475. }
  11476. } else {
  11477. // Iterate over object keys
  11478. var keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
  11479. var len = keys.length;
  11480. var key;
  11481. for (i = 0; i < len; i++) {
  11482. key = keys[i];
  11483. fn.call(null, obj[key], key, obj);
  11484. }
  11485. }
  11486. }
  11487. function findKey(obj, key) {
  11488. key = key.toLowerCase();
  11489. var keys = Object.keys(obj);
  11490. var i = keys.length;
  11491. var _key;
  11492. while (i-- > 0) {
  11493. _key = keys[i];
  11494. if (key === _key.toLowerCase()) {
  11495. return _key;
  11496. }
  11497. }
  11498. return null;
  11499. }
  11500. var _global = function () {
  11501. /*eslint no-undef:0*/
  11502. if (typeof globalThis !== "undefined") return globalThis;
  11503. return typeof self !== "undefined" ? self : typeof window !== 'undefined' ? window : global;
  11504. }();
  11505. var isContextDefined = function isContextDefined(context) {
  11506. return !isUndefined(context) && context !== _global;
  11507. };
  11508. /**
  11509. * Accepts varargs expecting each argument to be an object, then
  11510. * immutably merges the properties of each object and returns result.
  11511. *
  11512. * When multiple objects contain the same key the later object in
  11513. * the arguments list will take precedence.
  11514. *
  11515. * Example:
  11516. *
  11517. * ```js
  11518. * var result = merge({foo: 123}, {foo: 456});
  11519. * console.log(result.foo); // outputs 456
  11520. * ```
  11521. *
  11522. * @param {Object} obj1 Object to merge
  11523. *
  11524. * @returns {Object} Result of all merge properties
  11525. */
  11526. function merge( /* obj1, obj2, obj3, ... */
  11527. ) {
  11528. var _ref2 = isContextDefined(this) && this || {},
  11529. caseless = _ref2.caseless;
  11530. var result = {};
  11531. var assignValue = function assignValue(val, key) {
  11532. var targetKey = caseless && findKey(result, key) || key;
  11533. if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
  11534. result[targetKey] = merge(result[targetKey], val);
  11535. } else if (isPlainObject(val)) {
  11536. result[targetKey] = merge({}, val);
  11537. } else if (isArray(val)) {
  11538. result[targetKey] = val.slice();
  11539. } else {
  11540. result[targetKey] = val;
  11541. }
  11542. };
  11543. for (var i = 0, l = arguments.length; i < l; i++) {
  11544. arguments[i] && forEach(arguments[i], assignValue);
  11545. }
  11546. return result;
  11547. }
  11548. /**
  11549. * Extends object a by mutably adding to it the properties of object b.
  11550. *
  11551. * @param {Object} a The object to be extended
  11552. * @param {Object} b The object to copy properties from
  11553. * @param {Object} thisArg The object to bind function to
  11554. *
  11555. * @param {Boolean} [allOwnKeys]
  11556. * @returns {Object} The resulting value of object a
  11557. */
  11558. var extend = function extend(a, b, thisArg) {
  11559. var _ref3 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
  11560. allOwnKeys = _ref3.allOwnKeys;
  11561. forEach(b, function (val, key) {
  11562. if (thisArg && isFunction(val)) {
  11563. a[key] = (0, _bind.default)(val, thisArg);
  11564. } else {
  11565. a[key] = val;
  11566. }
  11567. }, {
  11568. allOwnKeys: allOwnKeys
  11569. });
  11570. return a;
  11571. };
  11572. /**
  11573. * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
  11574. *
  11575. * @param {string} content with BOM
  11576. *
  11577. * @returns {string} content value without BOM
  11578. */
  11579. var stripBOM = function stripBOM(content) {
  11580. if (content.charCodeAt(0) === 0xFEFF) {
  11581. content = content.slice(1);
  11582. }
  11583. return content;
  11584. };
  11585. /**
  11586. * Inherit the prototype methods from one constructor into another
  11587. * @param {function} constructor
  11588. * @param {function} superConstructor
  11589. * @param {object} [props]
  11590. * @param {object} [descriptors]
  11591. *
  11592. * @returns {void}
  11593. */
  11594. var inherits = function inherits(constructor, superConstructor, props, descriptors) {
  11595. constructor.prototype = Object.create(superConstructor.prototype, descriptors);
  11596. constructor.prototype.constructor = constructor;
  11597. Object.defineProperty(constructor, 'super', {
  11598. value: superConstructor.prototype
  11599. });
  11600. props && Object.assign(constructor.prototype, props);
  11601. };
  11602. /**
  11603. * Resolve object with deep prototype chain to a flat object
  11604. * @param {Object} sourceObj source object
  11605. * @param {Object} [destObj]
  11606. * @param {Function|Boolean} [filter]
  11607. * @param {Function} [propFilter]
  11608. *
  11609. * @returns {Object}
  11610. */
  11611. var toFlatObject = function toFlatObject(sourceObj, destObj, filter, propFilter) {
  11612. var props;
  11613. var i;
  11614. var prop;
  11615. var merged = {};
  11616. destObj = destObj || {};
  11617. // eslint-disable-next-line no-eq-null,eqeqeq
  11618. if (sourceObj == null) return destObj;
  11619. do {
  11620. props = Object.getOwnPropertyNames(sourceObj);
  11621. i = props.length;
  11622. while (i-- > 0) {
  11623. prop = props[i];
  11624. if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
  11625. destObj[prop] = sourceObj[prop];
  11626. merged[prop] = true;
  11627. }
  11628. }
  11629. sourceObj = filter !== false && getPrototypeOf(sourceObj);
  11630. } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
  11631. return destObj;
  11632. };
  11633. /**
  11634. * Determines whether a string ends with the characters of a specified string
  11635. *
  11636. * @param {String} str
  11637. * @param {String} searchString
  11638. * @param {Number} [position= 0]
  11639. *
  11640. * @returns {boolean}
  11641. */
  11642. var endsWith = function endsWith(str, searchString, position) {
  11643. str = String(str);
  11644. if (position === undefined || position > str.length) {
  11645. position = str.length;
  11646. }
  11647. position -= searchString.length;
  11648. var lastIndex = str.indexOf(searchString, position);
  11649. return lastIndex !== -1 && lastIndex === position;
  11650. };
  11651. /**
  11652. * Returns new array from array like object or null if failed
  11653. *
  11654. * @param {*} [thing]
  11655. *
  11656. * @returns {?Array}
  11657. */
  11658. var toArray = function toArray(thing) {
  11659. if (!thing) return null;
  11660. if (isArray(thing)) return thing;
  11661. var i = thing.length;
  11662. if (!isNumber(i)) return null;
  11663. var arr = new Array(i);
  11664. while (i-- > 0) {
  11665. arr[i] = thing[i];
  11666. }
  11667. return arr;
  11668. };
  11669. /**
  11670. * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
  11671. * thing passed in is an instance of Uint8Array
  11672. *
  11673. * @param {TypedArray}
  11674. *
  11675. * @returns {Array}
  11676. */
  11677. // eslint-disable-next-line func-names
  11678. var isTypedArray = function (TypedArray) {
  11679. // eslint-disable-next-line func-names
  11680. return function (thing) {
  11681. return TypedArray && thing instanceof TypedArray;
  11682. };
  11683. }(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
  11684. /**
  11685. * For each entry in the object, call the function with the key and value.
  11686. *
  11687. * @param {Object<any, any>} obj - The object to iterate over.
  11688. * @param {Function} fn - The function to call for each entry.
  11689. *
  11690. * @returns {void}
  11691. */
  11692. var forEachEntry = function forEachEntry(obj, fn) {
  11693. var generator = obj && obj[Symbol.iterator];
  11694. var iterator = generator.call(obj);
  11695. var result;
  11696. while ((result = iterator.next()) && !result.done) {
  11697. var pair = result.value;
  11698. fn.call(obj, pair[0], pair[1]);
  11699. }
  11700. };
  11701. /**
  11702. * It takes a regular expression and a string, and returns an array of all the matches
  11703. *
  11704. * @param {string} regExp - The regular expression to match against.
  11705. * @param {string} str - The string to search.
  11706. *
  11707. * @returns {Array<boolean>}
  11708. */
  11709. var matchAll = function matchAll(regExp, str) {
  11710. var matches;
  11711. var arr = [];
  11712. while ((matches = regExp.exec(str)) !== null) {
  11713. arr.push(matches);
  11714. }
  11715. return arr;
  11716. };
  11717. /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
  11718. var isHTMLForm = kindOfTest('HTMLFormElement');
  11719. var toCamelCase = function toCamelCase(str) {
  11720. return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
  11721. return p1.toUpperCase() + p2;
  11722. });
  11723. };
  11724. /* Creating a function that will check if an object has a property. */
  11725. var hasOwnProperty = function (_ref4) {
  11726. var hasOwnProperty = _ref4.hasOwnProperty;
  11727. return function (obj, prop) {
  11728. return hasOwnProperty.call(obj, prop);
  11729. };
  11730. }(Object.prototype);
  11731. /**
  11732. * Determine if a value is a RegExp object
  11733. *
  11734. * @param {*} val The value to test
  11735. *
  11736. * @returns {boolean} True if value is a RegExp object, otherwise false
  11737. */
  11738. var isRegExp = kindOfTest('RegExp');
  11739. var reduceDescriptors = function reduceDescriptors(obj, reducer) {
  11740. var descriptors = Object.getOwnPropertyDescriptors(obj);
  11741. var reducedDescriptors = {};
  11742. forEach(descriptors, function (descriptor, name) {
  11743. var ret;
  11744. if ((ret = reducer(descriptor, name, obj)) !== false) {
  11745. reducedDescriptors[name] = ret || descriptor;
  11746. }
  11747. });
  11748. Object.defineProperties(obj, reducedDescriptors);
  11749. };
  11750. /**
  11751. * Makes all methods read-only
  11752. * @param {Object} obj
  11753. */
  11754. var freezeMethods = function freezeMethods(obj) {
  11755. reduceDescriptors(obj, function (descriptor, name) {
  11756. // skip restricted props in strict mode
  11757. if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
  11758. return false;
  11759. }
  11760. var value = obj[name];
  11761. if (!isFunction(value)) return;
  11762. descriptor.enumerable = false;
  11763. if ('writable' in descriptor) {
  11764. descriptor.writable = false;
  11765. return;
  11766. }
  11767. if (!descriptor.set) {
  11768. descriptor.set = function () {
  11769. throw Error('Can not rewrite read-only method \'' + name + '\'');
  11770. };
  11771. }
  11772. });
  11773. };
  11774. var toObjectSet = function toObjectSet(arrayOrString, delimiter) {
  11775. var obj = {};
  11776. var define = function define(arr) {
  11777. arr.forEach(function (value) {
  11778. obj[value] = true;
  11779. });
  11780. };
  11781. isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
  11782. return obj;
  11783. };
  11784. var noop = function noop() {};
  11785. var toFiniteNumber = function toFiniteNumber(value, defaultValue) {
  11786. return value != null && Number.isFinite(value = +value) ? value : defaultValue;
  11787. };
  11788. var ALPHA = 'abcdefghijklmnopqrstuvwxyz';
  11789. var DIGIT = '0123456789';
  11790. var ALPHABET = {
  11791. DIGIT: DIGIT,
  11792. ALPHA: ALPHA,
  11793. ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
  11794. };
  11795. var generateString = function generateString() {
  11796. var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 16;
  11797. var alphabet = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ALPHABET.ALPHA_DIGIT;
  11798. var str = '';
  11799. var length = alphabet.length;
  11800. while (size--) {
  11801. str += alphabet[Math.random() * length | 0];
  11802. }
  11803. return str;
  11804. };
  11805. /**
  11806. * If the thing is a FormData object, return true, otherwise return false.
  11807. *
  11808. * @param {unknown} thing - The thing to check.
  11809. *
  11810. * @returns {boolean}
  11811. */
  11812. function isSpecCompliantForm(thing) {
  11813. return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
  11814. }
  11815. var toJSONObject = function toJSONObject(obj) {
  11816. var stack = new Array(10);
  11817. var visit = function visit(source, i) {
  11818. if (isObject(source)) {
  11819. if (stack.indexOf(source) >= 0) {
  11820. return;
  11821. }
  11822. if (!('toJSON' in source)) {
  11823. stack[i] = source;
  11824. var target = isArray(source) ? [] : {};
  11825. forEach(source, function (value, key) {
  11826. var reducedValue = visit(value, i + 1);
  11827. !isUndefined(reducedValue) && (target[key] = reducedValue);
  11828. });
  11829. stack[i] = undefined;
  11830. return target;
  11831. }
  11832. }
  11833. return source;
  11834. };
  11835. return visit(obj, 0);
  11836. };
  11837. var isAsyncFn = kindOfTest('AsyncFunction');
  11838. var isThenable = function isThenable(thing) {
  11839. return thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
  11840. };
  11841. var _default = {
  11842. isArray: isArray,
  11843. isArrayBuffer: isArrayBuffer,
  11844. isBuffer: isBuffer,
  11845. isFormData: isFormData,
  11846. isArrayBufferView: isArrayBufferView,
  11847. isString: isString,
  11848. isNumber: isNumber,
  11849. isBoolean: isBoolean,
  11850. isObject: isObject,
  11851. isPlainObject: isPlainObject,
  11852. isReadableStream: isReadableStream,
  11853. isRequest: isRequest,
  11854. isResponse: isResponse,
  11855. isHeaders: isHeaders,
  11856. isUndefined: isUndefined,
  11857. isDate: isDate,
  11858. isFile: isFile,
  11859. isBlob: isBlob,
  11860. isRegExp: isRegExp,
  11861. isFunction: isFunction,
  11862. isStream: isStream,
  11863. isURLSearchParams: isURLSearchParams,
  11864. isTypedArray: isTypedArray,
  11865. isFileList: isFileList,
  11866. forEach: forEach,
  11867. merge: merge,
  11868. extend: extend,
  11869. trim: trim,
  11870. stripBOM: stripBOM,
  11871. inherits: inherits,
  11872. toFlatObject: toFlatObject,
  11873. kindOf: kindOf,
  11874. kindOfTest: kindOfTest,
  11875. endsWith: endsWith,
  11876. toArray: toArray,
  11877. forEachEntry: forEachEntry,
  11878. matchAll: matchAll,
  11879. isHTMLForm: isHTMLForm,
  11880. hasOwnProperty: hasOwnProperty,
  11881. hasOwnProp: hasOwnProperty,
  11882. // an alias to avoid ESLint no-prototype-builtins detection
  11883. reduceDescriptors: reduceDescriptors,
  11884. freezeMethods: freezeMethods,
  11885. toObjectSet: toObjectSet,
  11886. toCamelCase: toCamelCase,
  11887. noop: noop,
  11888. toFiniteNumber: toFiniteNumber,
  11889. findKey: findKey,
  11890. global: _global,
  11891. isContextDefined: isContextDefined,
  11892. ALPHABET: ALPHABET,
  11893. generateString: generateString,
  11894. isSpecCompliantForm: isSpecCompliantForm,
  11895. toJSONObject: toJSONObject,
  11896. isAsyncFn: isAsyncFn,
  11897. isThenable: isThenable
  11898. };
  11899. exports.default = _default;
  11900. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../新建文件夹/HBuilderX/plugins/uniapp-cli/node_modules/webpack/buildin/global.js */ 3)))
  11901. /***/ }),
  11902. /* 65 */
  11903. /*!*************************************************************************************!*\
  11904. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/bind.js ***!
  11905. \*************************************************************************************/
  11906. /*! no static exports found */
  11907. /***/ (function(module, exports, __webpack_require__) {
  11908. "use strict";
  11909. Object.defineProperty(exports, "__esModule", {
  11910. value: true
  11911. });
  11912. exports.default = bind;
  11913. function bind(fn, thisArg) {
  11914. return function wrap() {
  11915. return fn.apply(thisArg, arguments);
  11916. };
  11917. }
  11918. /***/ }),
  11919. /* 66 */
  11920. /*!***********************************************************************************!*\
  11921. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/core/Axios.js ***!
  11922. \***********************************************************************************/
  11923. /*! no static exports found */
  11924. /***/ (function(module, exports, __webpack_require__) {
  11925. "use strict";
  11926. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11927. Object.defineProperty(exports, "__esModule", {
  11928. value: true
  11929. });
  11930. exports.default = void 0;
  11931. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 41));
  11932. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 43));
  11933. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  11934. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  11935. var _utils = _interopRequireDefault(__webpack_require__(/*! ./../utils.js */ 64));
  11936. var _buildURL = _interopRequireDefault(__webpack_require__(/*! ../helpers/buildURL.js */ 67));
  11937. var _InterceptorManager = _interopRequireDefault(__webpack_require__(/*! ./InterceptorManager.js */ 76));
  11938. var _dispatchRequest = _interopRequireDefault(__webpack_require__(/*! ./dispatchRequest.js */ 77));
  11939. var _mergeConfig = _interopRequireDefault(__webpack_require__(/*! ./mergeConfig.js */ 107));
  11940. var _buildFullPath = _interopRequireDefault(__webpack_require__(/*! ./buildFullPath.js */ 104));
  11941. var _validator = _interopRequireDefault(__webpack_require__(/*! ../helpers/validator.js */ 116));
  11942. var _AxiosHeaders = _interopRequireDefault(__webpack_require__(/*! ./AxiosHeaders.js */ 89));
  11943. var validators = _validator.default.validators;
  11944. /**
  11945. * Create a new instance of Axios
  11946. *
  11947. * @param {Object} instanceConfig The default config for the instance
  11948. *
  11949. * @return {Axios} A new instance of Axios
  11950. */
  11951. var Axios = /*#__PURE__*/function () {
  11952. function Axios(instanceConfig) {
  11953. (0, _classCallCheck2.default)(this, Axios);
  11954. this.defaults = instanceConfig;
  11955. this.interceptors = {
  11956. request: new _InterceptorManager.default(),
  11957. response: new _InterceptorManager.default()
  11958. };
  11959. }
  11960. /**
  11961. * Dispatch a request
  11962. *
  11963. * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
  11964. * @param {?Object} config
  11965. *
  11966. * @returns {Promise} The Promise to be fulfilled
  11967. */
  11968. (0, _createClass2.default)(Axios, [{
  11969. key: "request",
  11970. value: function () {
  11971. var _request2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(configOrUrl, config) {
  11972. var dummy, stack;
  11973. return _regenerator.default.wrap(function _callee$(_context) {
  11974. while (1) {
  11975. switch (_context.prev = _context.next) {
  11976. case 0:
  11977. _context.prev = 0;
  11978. _context.next = 3;
  11979. return this._request(configOrUrl, config);
  11980. case 3:
  11981. return _context.abrupt("return", _context.sent);
  11982. case 6:
  11983. _context.prev = 6;
  11984. _context.t0 = _context["catch"](0);
  11985. if (_context.t0 instanceof Error) {
  11986. Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
  11987. // slice off the Error: ... line
  11988. stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
  11989. try {
  11990. if (!_context.t0.stack) {
  11991. _context.t0.stack = stack;
  11992. // match without the 2 top stack lines
  11993. } else if (stack && !String(_context.t0.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
  11994. _context.t0.stack += '\n' + stack;
  11995. }
  11996. } catch (e) {
  11997. // ignore the case where "stack" is an un-writable property
  11998. }
  11999. }
  12000. throw _context.t0;
  12001. case 10:
  12002. case "end":
  12003. return _context.stop();
  12004. }
  12005. }
  12006. }, _callee, this, [[0, 6]]);
  12007. }));
  12008. function request(_x, _x2) {
  12009. return _request2.apply(this, arguments);
  12010. }
  12011. return request;
  12012. }()
  12013. }, {
  12014. key: "_request",
  12015. value: function _request(configOrUrl, config) {
  12016. /*eslint no-param-reassign:0*/
  12017. // Allow for axios('example/url'[, config]) a la fetch API
  12018. if (typeof configOrUrl === 'string') {
  12019. config = config || {};
  12020. config.url = configOrUrl;
  12021. } else {
  12022. config = configOrUrl || {};
  12023. }
  12024. config = (0, _mergeConfig.default)(this.defaults, config);
  12025. var _config = config,
  12026. transitional = _config.transitional,
  12027. paramsSerializer = _config.paramsSerializer,
  12028. headers = _config.headers;
  12029. if (transitional !== undefined) {
  12030. _validator.default.assertOptions(transitional, {
  12031. silentJSONParsing: validators.transitional(validators.boolean),
  12032. forcedJSONParsing: validators.transitional(validators.boolean),
  12033. clarifyTimeoutError: validators.transitional(validators.boolean)
  12034. }, false);
  12035. }
  12036. if (paramsSerializer != null) {
  12037. if (_utils.default.isFunction(paramsSerializer)) {
  12038. config.paramsSerializer = {
  12039. serialize: paramsSerializer
  12040. };
  12041. } else {
  12042. _validator.default.assertOptions(paramsSerializer, {
  12043. encode: validators.function,
  12044. serialize: validators.function
  12045. }, true);
  12046. }
  12047. }
  12048. // Set config.method
  12049. config.method = (config.method || this.defaults.method || 'get').toLowerCase();
  12050. // Flatten headers
  12051. var contextHeaders = headers && _utils.default.merge(headers.common, headers[config.method]);
  12052. headers && _utils.default.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function (method) {
  12053. delete headers[method];
  12054. });
  12055. config.headers = _AxiosHeaders.default.concat(contextHeaders, headers);
  12056. // filter out skipped interceptors
  12057. var requestInterceptorChain = [];
  12058. var synchronousRequestInterceptors = true;
  12059. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  12060. if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
  12061. return;
  12062. }
  12063. synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
  12064. requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
  12065. });
  12066. var responseInterceptorChain = [];
  12067. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  12068. responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
  12069. });
  12070. var promise;
  12071. var i = 0;
  12072. var len;
  12073. if (!synchronousRequestInterceptors) {
  12074. var chain = [_dispatchRequest.default.bind(this), undefined];
  12075. chain.unshift.apply(chain, requestInterceptorChain);
  12076. chain.push.apply(chain, responseInterceptorChain);
  12077. len = chain.length;
  12078. promise = Promise.resolve(config);
  12079. while (i < len) {
  12080. promise = promise.then(chain[i++], chain[i++]);
  12081. }
  12082. return promise;
  12083. }
  12084. len = requestInterceptorChain.length;
  12085. var newConfig = config;
  12086. i = 0;
  12087. while (i < len) {
  12088. var onFulfilled = requestInterceptorChain[i++];
  12089. var onRejected = requestInterceptorChain[i++];
  12090. try {
  12091. newConfig = onFulfilled(newConfig);
  12092. } catch (error) {
  12093. onRejected.call(this, error);
  12094. break;
  12095. }
  12096. }
  12097. try {
  12098. promise = _dispatchRequest.default.call(this, newConfig);
  12099. } catch (error) {
  12100. return Promise.reject(error);
  12101. }
  12102. i = 0;
  12103. len = responseInterceptorChain.length;
  12104. while (i < len) {
  12105. promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
  12106. }
  12107. return promise;
  12108. }
  12109. }, {
  12110. key: "getUri",
  12111. value: function getUri(config) {
  12112. config = (0, _mergeConfig.default)(this.defaults, config);
  12113. var fullPath = (0, _buildFullPath.default)(config.baseURL, config.url);
  12114. return (0, _buildURL.default)(fullPath, config.params, config.paramsSerializer);
  12115. }
  12116. }]);
  12117. return Axios;
  12118. }(); // Provide aliases for supported request methods
  12119. _utils.default.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
  12120. /*eslint func-names:0*/
  12121. Axios.prototype[method] = function (url, config) {
  12122. return this.request((0, _mergeConfig.default)(config || {}, {
  12123. method: method,
  12124. url: url,
  12125. data: (config || {}).data
  12126. }));
  12127. };
  12128. });
  12129. _utils.default.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  12130. /*eslint func-names:0*/
  12131. function generateHTTPMethod(isForm) {
  12132. return function httpMethod(url, data, config) {
  12133. return this.request((0, _mergeConfig.default)(config || {}, {
  12134. method: method,
  12135. headers: isForm ? {
  12136. 'Content-Type': 'multipart/form-data'
  12137. } : {},
  12138. url: url,
  12139. data: data
  12140. }));
  12141. };
  12142. }
  12143. Axios.prototype[method] = generateHTTPMethod();
  12144. Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
  12145. });
  12146. var _default = Axios;
  12147. exports.default = _default;
  12148. /***/ }),
  12149. /* 67 */
  12150. /*!*****************************************************************************************!*\
  12151. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/buildURL.js ***!
  12152. \*****************************************************************************************/
  12153. /*! no static exports found */
  12154. /***/ (function(module, exports, __webpack_require__) {
  12155. "use strict";
  12156. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  12157. Object.defineProperty(exports, "__esModule", {
  12158. value: true
  12159. });
  12160. exports.default = buildURL;
  12161. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 64));
  12162. var _AxiosURLSearchParams = _interopRequireDefault(__webpack_require__(/*! ../helpers/AxiosURLSearchParams.js */ 68));
  12163. /**
  12164. * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
  12165. * URI encoded counterparts
  12166. *
  12167. * @param {string} val The value to be encoded.
  12168. *
  12169. * @returns {string} The encoded value.
  12170. */
  12171. function encode(val) {
  12172. return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']');
  12173. }
  12174. /**
  12175. * Build a URL by appending params to the end
  12176. *
  12177. * @param {string} url The base of the url (e.g., http://www.google.com)
  12178. * @param {object} [params] The params to be appended
  12179. * @param {?object} options
  12180. *
  12181. * @returns {string} The formatted url
  12182. */
  12183. function buildURL(url, params, options) {
  12184. /*eslint no-param-reassign:0*/
  12185. if (!params) {
  12186. return url;
  12187. }
  12188. var _encode = options && options.encode || encode;
  12189. var serializeFn = options && options.serialize;
  12190. var serializedParams;
  12191. if (serializeFn) {
  12192. serializedParams = serializeFn(params, options);
  12193. } else {
  12194. serializedParams = _utils.default.isURLSearchParams(params) ? params.toString() : new _AxiosURLSearchParams.default(params, options).toString(_encode);
  12195. }
  12196. if (serializedParams) {
  12197. var hashmarkIndex = url.indexOf("#");
  12198. if (hashmarkIndex !== -1) {
  12199. url = url.slice(0, hashmarkIndex);
  12200. }
  12201. url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  12202. }
  12203. return url;
  12204. }
  12205. /***/ }),
  12206. /* 68 */
  12207. /*!*****************************************************************************************************!*\
  12208. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/AxiosURLSearchParams.js ***!
  12209. \*****************************************************************************************************/
  12210. /*! no static exports found */
  12211. /***/ (function(module, exports, __webpack_require__) {
  12212. "use strict";
  12213. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  12214. Object.defineProperty(exports, "__esModule", {
  12215. value: true
  12216. });
  12217. exports.default = void 0;
  12218. var _toFormData = _interopRequireDefault(__webpack_require__(/*! ./toFormData.js */ 69));
  12219. /**
  12220. * It encodes a string by replacing all characters that are not in the unreserved set with
  12221. * their percent-encoded equivalents
  12222. *
  12223. * @param {string} str - The string to encode.
  12224. *
  12225. * @returns {string} The encoded string.
  12226. */
  12227. function encode(str) {
  12228. var charMap = {
  12229. '!': '%21',
  12230. "'": '%27',
  12231. '(': '%28',
  12232. ')': '%29',
  12233. '~': '%7E',
  12234. '%20': '+',
  12235. '%00': '\x00'
  12236. };
  12237. return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
  12238. return charMap[match];
  12239. });
  12240. }
  12241. /**
  12242. * It takes a params object and converts it to a FormData object
  12243. *
  12244. * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
  12245. * @param {Object<string, any>} options - The options object passed to the Axios constructor.
  12246. *
  12247. * @returns {void}
  12248. */
  12249. function AxiosURLSearchParams(params, options) {
  12250. this._pairs = [];
  12251. params && (0, _toFormData.default)(params, this, options);
  12252. }
  12253. var prototype = AxiosURLSearchParams.prototype;
  12254. prototype.append = function append(name, value) {
  12255. this._pairs.push([name, value]);
  12256. };
  12257. prototype.toString = function toString(encoder) {
  12258. var _encode = encoder ? function (value) {
  12259. return encoder.call(this, value, encode);
  12260. } : encode;
  12261. return this._pairs.map(function each(pair) {
  12262. return _encode(pair[0]) + '=' + _encode(pair[1]);
  12263. }, '').join('&');
  12264. };
  12265. var _default = AxiosURLSearchParams;
  12266. exports.default = _default;
  12267. /***/ }),
  12268. /* 69 */
  12269. /*!*******************************************************************************************!*\
  12270. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/toFormData.js ***!
  12271. \*******************************************************************************************/
  12272. /*! no static exports found */
  12273. /***/ (function(module, exports, __webpack_require__) {
  12274. "use strict";
  12275. /* WEBPACK VAR INJECTION */(function(Buffer) {
  12276. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  12277. Object.defineProperty(exports, "__esModule", {
  12278. value: true
  12279. });
  12280. exports.default = void 0;
  12281. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  12282. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 64));
  12283. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosError.js */ 74));
  12284. var _FormData = _interopRequireDefault(__webpack_require__(/*! ../platform/node/classes/FormData.js */ 75));
  12285. // temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
  12286. /**
  12287. * Determines if the given thing is a array or js object.
  12288. *
  12289. * @param {string} thing - The object or array to be visited.
  12290. *
  12291. * @returns {boolean}
  12292. */
  12293. function isVisitable(thing) {
  12294. return _utils.default.isPlainObject(thing) || _utils.default.isArray(thing);
  12295. }
  12296. /**
  12297. * It removes the brackets from the end of a string
  12298. *
  12299. * @param {string} key - The key of the parameter.
  12300. *
  12301. * @returns {string} the key without the brackets.
  12302. */
  12303. function removeBrackets(key) {
  12304. return _utils.default.endsWith(key, '[]') ? key.slice(0, -2) : key;
  12305. }
  12306. /**
  12307. * It takes a path, a key, and a boolean, and returns a string
  12308. *
  12309. * @param {string} path - The path to the current key.
  12310. * @param {string} key - The key of the current object being iterated over.
  12311. * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
  12312. *
  12313. * @returns {string} The path to the current key.
  12314. */
  12315. function renderKey(path, key, dots) {
  12316. if (!path) return key;
  12317. return path.concat(key).map(function each(token, i) {
  12318. // eslint-disable-next-line no-param-reassign
  12319. token = removeBrackets(token);
  12320. return !dots && i ? '[' + token + ']' : token;
  12321. }).join(dots ? '.' : '');
  12322. }
  12323. /**
  12324. * If the array is an array and none of its elements are visitable, then it's a flat array.
  12325. *
  12326. * @param {Array<any>} arr - The array to check
  12327. *
  12328. * @returns {boolean}
  12329. */
  12330. function isFlatArray(arr) {
  12331. return _utils.default.isArray(arr) && !arr.some(isVisitable);
  12332. }
  12333. var predicates = _utils.default.toFlatObject(_utils.default, {}, null, function filter(prop) {
  12334. return /^is[A-Z]/.test(prop);
  12335. });
  12336. /**
  12337. * Convert a data object to FormData
  12338. *
  12339. * @param {Object} obj
  12340. * @param {?Object} [formData]
  12341. * @param {?Object} [options]
  12342. * @param {Function} [options.visitor]
  12343. * @param {Boolean} [options.metaTokens = true]
  12344. * @param {Boolean} [options.dots = false]
  12345. * @param {?Boolean} [options.indexes = false]
  12346. *
  12347. * @returns {Object}
  12348. **/
  12349. /**
  12350. * It converts an object into a FormData object
  12351. *
  12352. * @param {Object<any, any>} obj - The object to convert to form data.
  12353. * @param {string} formData - The FormData object to append to.
  12354. * @param {Object<string, any>} options
  12355. *
  12356. * @returns
  12357. */
  12358. function toFormData(obj, formData, options) {
  12359. if (!_utils.default.isObject(obj)) {
  12360. throw new TypeError('target must be an object');
  12361. }
  12362. // eslint-disable-next-line no-param-reassign
  12363. formData = formData || new (_FormData.default || FormData)();
  12364. // eslint-disable-next-line no-param-reassign
  12365. options = _utils.default.toFlatObject(options, {
  12366. metaTokens: true,
  12367. dots: false,
  12368. indexes: false
  12369. }, false, function defined(option, source) {
  12370. // eslint-disable-next-line no-eq-null,eqeqeq
  12371. return !_utils.default.isUndefined(source[option]);
  12372. });
  12373. var metaTokens = options.metaTokens;
  12374. // eslint-disable-next-line no-use-before-define
  12375. var visitor = options.visitor || defaultVisitor;
  12376. var dots = options.dots;
  12377. var indexes = options.indexes;
  12378. var _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
  12379. var useBlob = _Blob && _utils.default.isSpecCompliantForm(formData);
  12380. if (!_utils.default.isFunction(visitor)) {
  12381. throw new TypeError('visitor must be a function');
  12382. }
  12383. function convertValue(value) {
  12384. if (value === null) return '';
  12385. if (_utils.default.isDate(value)) {
  12386. return value.toISOString();
  12387. }
  12388. if (!useBlob && _utils.default.isBlob(value)) {
  12389. throw new _AxiosError.default('Blob is not supported. Use a Buffer instead.');
  12390. }
  12391. if (_utils.default.isArrayBuffer(value) || _utils.default.isTypedArray(value)) {
  12392. return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
  12393. }
  12394. return value;
  12395. }
  12396. /**
  12397. * Default visitor.
  12398. *
  12399. * @param {*} value
  12400. * @param {String|Number} key
  12401. * @param {Array<String|Number>} path
  12402. * @this {FormData}
  12403. *
  12404. * @returns {boolean} return true to visit the each prop of the value recursively
  12405. */
  12406. function defaultVisitor(value, key, path) {
  12407. var arr = value;
  12408. if (value && !path && (0, _typeof2.default)(value) === 'object') {
  12409. if (_utils.default.endsWith(key, '{}')) {
  12410. // eslint-disable-next-line no-param-reassign
  12411. key = metaTokens ? key : key.slice(0, -2);
  12412. // eslint-disable-next-line no-param-reassign
  12413. value = JSON.stringify(value);
  12414. } else if (_utils.default.isArray(value) && isFlatArray(value) || (_utils.default.isFileList(value) || _utils.default.endsWith(key, '[]')) && (arr = _utils.default.toArray(value))) {
  12415. // eslint-disable-next-line no-param-reassign
  12416. key = removeBrackets(key);
  12417. arr.forEach(function each(el, index) {
  12418. !(_utils.default.isUndefined(el) || el === null) && formData.append(
  12419. // eslint-disable-next-line no-nested-ternary
  12420. indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + '[]', convertValue(el));
  12421. });
  12422. return false;
  12423. }
  12424. }
  12425. if (isVisitable(value)) {
  12426. return true;
  12427. }
  12428. formData.append(renderKey(path, key, dots), convertValue(value));
  12429. return false;
  12430. }
  12431. var stack = [];
  12432. var exposedHelpers = Object.assign(predicates, {
  12433. defaultVisitor: defaultVisitor,
  12434. convertValue: convertValue,
  12435. isVisitable: isVisitable
  12436. });
  12437. function build(value, path) {
  12438. if (_utils.default.isUndefined(value)) return;
  12439. if (stack.indexOf(value) !== -1) {
  12440. throw Error('Circular reference detected in ' + path.join('.'));
  12441. }
  12442. stack.push(value);
  12443. _utils.default.forEach(value, function each(el, key) {
  12444. var result = !(_utils.default.isUndefined(el) || el === null) && visitor.call(formData, el, _utils.default.isString(key) ? key.trim() : key, path, exposedHelpers);
  12445. if (result === true) {
  12446. build(el, path ? path.concat(key) : [key]);
  12447. }
  12448. });
  12449. stack.pop();
  12450. }
  12451. if (!_utils.default.isObject(obj)) {
  12452. throw new TypeError('data must be an object');
  12453. }
  12454. build(obj);
  12455. return formData;
  12456. }
  12457. var _default = toFormData;
  12458. exports.default = _default;
  12459. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../新建文件夹/HBuilderX/plugins/uniapp-cli/node_modules/buffer/index.js */ 70).Buffer))
  12460. /***/ }),
  12461. /* 70 */
  12462. /*!**************************************!*\
  12463. !*** ./node_modules/buffer/index.js ***!
  12464. \**************************************/
  12465. /*! no static exports found */
  12466. /***/ (function(module, exports, __webpack_require__) {
  12467. "use strict";
  12468. /* WEBPACK VAR INJECTION */(function(global) {/*!
  12469. * The buffer module from node.js, for the browser.
  12470. *
  12471. * @author Feross Aboukhadijeh <http://feross.org>
  12472. * @license MIT
  12473. */
  12474. /* eslint-disable no-proto */
  12475. var base64 = __webpack_require__(/*! base64-js */ 71)
  12476. var ieee754 = __webpack_require__(/*! ieee754 */ 72)
  12477. var isArray = __webpack_require__(/*! isarray */ 73)
  12478. exports.Buffer = Buffer
  12479. exports.SlowBuffer = SlowBuffer
  12480. exports.INSPECT_MAX_BYTES = 50
  12481. /**
  12482. * If `Buffer.TYPED_ARRAY_SUPPORT`:
  12483. * === true Use Uint8Array implementation (fastest)
  12484. * === false Use Object implementation (most compatible, even IE6)
  12485. *
  12486. * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
  12487. * Opera 11.6+, iOS 4.2+.
  12488. *
  12489. * Due to various browser bugs, sometimes the Object implementation will be used even
  12490. * when the browser supports typed arrays.
  12491. *
  12492. * Note:
  12493. *
  12494. * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
  12495. * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
  12496. *
  12497. * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
  12498. *
  12499. * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
  12500. * incorrect length in some situations.
  12501. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
  12502. * get the Object implementation, which is slower but behaves correctly.
  12503. */
  12504. Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
  12505. ? global.TYPED_ARRAY_SUPPORT
  12506. : typedArraySupport()
  12507. /*
  12508. * Export kMaxLength after typed array support is determined.
  12509. */
  12510. exports.kMaxLength = kMaxLength()
  12511. function typedArraySupport () {
  12512. try {
  12513. var arr = new Uint8Array(1)
  12514. arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
  12515. return arr.foo() === 42 && // typed array instances can be augmented
  12516. typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
  12517. arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
  12518. } catch (e) {
  12519. return false
  12520. }
  12521. }
  12522. function kMaxLength () {
  12523. return Buffer.TYPED_ARRAY_SUPPORT
  12524. ? 0x7fffffff
  12525. : 0x3fffffff
  12526. }
  12527. function createBuffer (that, length) {
  12528. if (kMaxLength() < length) {
  12529. throw new RangeError('Invalid typed array length')
  12530. }
  12531. if (Buffer.TYPED_ARRAY_SUPPORT) {
  12532. // Return an augmented `Uint8Array` instance, for best performance
  12533. that = new Uint8Array(length)
  12534. that.__proto__ = Buffer.prototype
  12535. } else {
  12536. // Fallback: Return an object instance of the Buffer class
  12537. if (that === null) {
  12538. that = new Buffer(length)
  12539. }
  12540. that.length = length
  12541. }
  12542. return that
  12543. }
  12544. /**
  12545. * The Buffer constructor returns instances of `Uint8Array` that have their
  12546. * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
  12547. * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
  12548. * and the `Uint8Array` methods. Square bracket notation works as expected -- it
  12549. * returns a single octet.
  12550. *
  12551. * The `Uint8Array` prototype remains unmodified.
  12552. */
  12553. function Buffer (arg, encodingOrOffset, length) {
  12554. if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
  12555. return new Buffer(arg, encodingOrOffset, length)
  12556. }
  12557. // Common case.
  12558. if (typeof arg === 'number') {
  12559. if (typeof encodingOrOffset === 'string') {
  12560. throw new Error(
  12561. 'If encoding is specified then the first argument must be a string'
  12562. )
  12563. }
  12564. return allocUnsafe(this, arg)
  12565. }
  12566. return from(this, arg, encodingOrOffset, length)
  12567. }
  12568. Buffer.poolSize = 8192 // not used by this implementation
  12569. // TODO: Legacy, not needed anymore. Remove in next major version.
  12570. Buffer._augment = function (arr) {
  12571. arr.__proto__ = Buffer.prototype
  12572. return arr
  12573. }
  12574. function from (that, value, encodingOrOffset, length) {
  12575. if (typeof value === 'number') {
  12576. throw new TypeError('"value" argument must not be a number')
  12577. }
  12578. if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
  12579. return fromArrayBuffer(that, value, encodingOrOffset, length)
  12580. }
  12581. if (typeof value === 'string') {
  12582. return fromString(that, value, encodingOrOffset)
  12583. }
  12584. return fromObject(that, value)
  12585. }
  12586. /**
  12587. * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
  12588. * if value is a number.
  12589. * Buffer.from(str[, encoding])
  12590. * Buffer.from(array)
  12591. * Buffer.from(buffer)
  12592. * Buffer.from(arrayBuffer[, byteOffset[, length]])
  12593. **/
  12594. Buffer.from = function (value, encodingOrOffset, length) {
  12595. return from(null, value, encodingOrOffset, length)
  12596. }
  12597. if (Buffer.TYPED_ARRAY_SUPPORT) {
  12598. Buffer.prototype.__proto__ = Uint8Array.prototype
  12599. Buffer.__proto__ = Uint8Array
  12600. if (typeof Symbol !== 'undefined' && Symbol.species &&
  12601. Buffer[Symbol.species] === Buffer) {
  12602. // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
  12603. Object.defineProperty(Buffer, Symbol.species, {
  12604. value: null,
  12605. configurable: true
  12606. })
  12607. }
  12608. }
  12609. function assertSize (size) {
  12610. if (typeof size !== 'number') {
  12611. throw new TypeError('"size" argument must be a number')
  12612. } else if (size < 0) {
  12613. throw new RangeError('"size" argument must not be negative')
  12614. }
  12615. }
  12616. function alloc (that, size, fill, encoding) {
  12617. assertSize(size)
  12618. if (size <= 0) {
  12619. return createBuffer(that, size)
  12620. }
  12621. if (fill !== undefined) {
  12622. // Only pay attention to encoding if it's a string. This
  12623. // prevents accidentally sending in a number that would
  12624. // be interpretted as a start offset.
  12625. return typeof encoding === 'string'
  12626. ? createBuffer(that, size).fill(fill, encoding)
  12627. : createBuffer(that, size).fill(fill)
  12628. }
  12629. return createBuffer(that, size)
  12630. }
  12631. /**
  12632. * Creates a new filled Buffer instance.
  12633. * alloc(size[, fill[, encoding]])
  12634. **/
  12635. Buffer.alloc = function (size, fill, encoding) {
  12636. return alloc(null, size, fill, encoding)
  12637. }
  12638. function allocUnsafe (that, size) {
  12639. assertSize(size)
  12640. that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
  12641. if (!Buffer.TYPED_ARRAY_SUPPORT) {
  12642. for (var i = 0; i < size; ++i) {
  12643. that[i] = 0
  12644. }
  12645. }
  12646. return that
  12647. }
  12648. /**
  12649. * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
  12650. * */
  12651. Buffer.allocUnsafe = function (size) {
  12652. return allocUnsafe(null, size)
  12653. }
  12654. /**
  12655. * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
  12656. */
  12657. Buffer.allocUnsafeSlow = function (size) {
  12658. return allocUnsafe(null, size)
  12659. }
  12660. function fromString (that, string, encoding) {
  12661. if (typeof encoding !== 'string' || encoding === '') {
  12662. encoding = 'utf8'
  12663. }
  12664. if (!Buffer.isEncoding(encoding)) {
  12665. throw new TypeError('"encoding" must be a valid string encoding')
  12666. }
  12667. var length = byteLength(string, encoding) | 0
  12668. that = createBuffer(that, length)
  12669. var actual = that.write(string, encoding)
  12670. if (actual !== length) {
  12671. // Writing a hex string, for example, that contains invalid characters will
  12672. // cause everything after the first invalid character to be ignored. (e.g.
  12673. // 'abxxcd' will be treated as 'ab')
  12674. that = that.slice(0, actual)
  12675. }
  12676. return that
  12677. }
  12678. function fromArrayLike (that, array) {
  12679. var length = array.length < 0 ? 0 : checked(array.length) | 0
  12680. that = createBuffer(that, length)
  12681. for (var i = 0; i < length; i += 1) {
  12682. that[i] = array[i] & 255
  12683. }
  12684. return that
  12685. }
  12686. function fromArrayBuffer (that, array, byteOffset, length) {
  12687. array.byteLength // this throws if `array` is not a valid ArrayBuffer
  12688. if (byteOffset < 0 || array.byteLength < byteOffset) {
  12689. throw new RangeError('\'offset\' is out of bounds')
  12690. }
  12691. if (array.byteLength < byteOffset + (length || 0)) {
  12692. throw new RangeError('\'length\' is out of bounds')
  12693. }
  12694. if (byteOffset === undefined && length === undefined) {
  12695. array = new Uint8Array(array)
  12696. } else if (length === undefined) {
  12697. array = new Uint8Array(array, byteOffset)
  12698. } else {
  12699. array = new Uint8Array(array, byteOffset, length)
  12700. }
  12701. if (Buffer.TYPED_ARRAY_SUPPORT) {
  12702. // Return an augmented `Uint8Array` instance, for best performance
  12703. that = array
  12704. that.__proto__ = Buffer.prototype
  12705. } else {
  12706. // Fallback: Return an object instance of the Buffer class
  12707. that = fromArrayLike(that, array)
  12708. }
  12709. return that
  12710. }
  12711. function fromObject (that, obj) {
  12712. if (Buffer.isBuffer(obj)) {
  12713. var len = checked(obj.length) | 0
  12714. that = createBuffer(that, len)
  12715. if (that.length === 0) {
  12716. return that
  12717. }
  12718. obj.copy(that, 0, 0, len)
  12719. return that
  12720. }
  12721. if (obj) {
  12722. if ((typeof ArrayBuffer !== 'undefined' &&
  12723. obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
  12724. if (typeof obj.length !== 'number' || isnan(obj.length)) {
  12725. return createBuffer(that, 0)
  12726. }
  12727. return fromArrayLike(that, obj)
  12728. }
  12729. if (obj.type === 'Buffer' && isArray(obj.data)) {
  12730. return fromArrayLike(that, obj.data)
  12731. }
  12732. }
  12733. throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
  12734. }
  12735. function checked (length) {
  12736. // Note: cannot use `length < kMaxLength()` here because that fails when
  12737. // length is NaN (which is otherwise coerced to zero.)
  12738. if (length >= kMaxLength()) {
  12739. throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
  12740. 'size: 0x' + kMaxLength().toString(16) + ' bytes')
  12741. }
  12742. return length | 0
  12743. }
  12744. function SlowBuffer (length) {
  12745. if (+length != length) { // eslint-disable-line eqeqeq
  12746. length = 0
  12747. }
  12748. return Buffer.alloc(+length)
  12749. }
  12750. Buffer.isBuffer = function isBuffer (b) {
  12751. return !!(b != null && b._isBuffer)
  12752. }
  12753. Buffer.compare = function compare (a, b) {
  12754. if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
  12755. throw new TypeError('Arguments must be Buffers')
  12756. }
  12757. if (a === b) return 0
  12758. var x = a.length
  12759. var y = b.length
  12760. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  12761. if (a[i] !== b[i]) {
  12762. x = a[i]
  12763. y = b[i]
  12764. break
  12765. }
  12766. }
  12767. if (x < y) return -1
  12768. if (y < x) return 1
  12769. return 0
  12770. }
  12771. Buffer.isEncoding = function isEncoding (encoding) {
  12772. switch (String(encoding).toLowerCase()) {
  12773. case 'hex':
  12774. case 'utf8':
  12775. case 'utf-8':
  12776. case 'ascii':
  12777. case 'latin1':
  12778. case 'binary':
  12779. case 'base64':
  12780. case 'ucs2':
  12781. case 'ucs-2':
  12782. case 'utf16le':
  12783. case 'utf-16le':
  12784. return true
  12785. default:
  12786. return false
  12787. }
  12788. }
  12789. Buffer.concat = function concat (list, length) {
  12790. if (!isArray(list)) {
  12791. throw new TypeError('"list" argument must be an Array of Buffers')
  12792. }
  12793. if (list.length === 0) {
  12794. return Buffer.alloc(0)
  12795. }
  12796. var i
  12797. if (length === undefined) {
  12798. length = 0
  12799. for (i = 0; i < list.length; ++i) {
  12800. length += list[i].length
  12801. }
  12802. }
  12803. var buffer = Buffer.allocUnsafe(length)
  12804. var pos = 0
  12805. for (i = 0; i < list.length; ++i) {
  12806. var buf = list[i]
  12807. if (!Buffer.isBuffer(buf)) {
  12808. throw new TypeError('"list" argument must be an Array of Buffers')
  12809. }
  12810. buf.copy(buffer, pos)
  12811. pos += buf.length
  12812. }
  12813. return buffer
  12814. }
  12815. function byteLength (string, encoding) {
  12816. if (Buffer.isBuffer(string)) {
  12817. return string.length
  12818. }
  12819. if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
  12820. (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
  12821. return string.byteLength
  12822. }
  12823. if (typeof string !== 'string') {
  12824. string = '' + string
  12825. }
  12826. var len = string.length
  12827. if (len === 0) return 0
  12828. // Use a for loop to avoid recursion
  12829. var loweredCase = false
  12830. for (;;) {
  12831. switch (encoding) {
  12832. case 'ascii':
  12833. case 'latin1':
  12834. case 'binary':
  12835. return len
  12836. case 'utf8':
  12837. case 'utf-8':
  12838. case undefined:
  12839. return utf8ToBytes(string).length
  12840. case 'ucs2':
  12841. case 'ucs-2':
  12842. case 'utf16le':
  12843. case 'utf-16le':
  12844. return len * 2
  12845. case 'hex':
  12846. return len >>> 1
  12847. case 'base64':
  12848. return base64ToBytes(string).length
  12849. default:
  12850. if (loweredCase) return utf8ToBytes(string).length // assume utf8
  12851. encoding = ('' + encoding).toLowerCase()
  12852. loweredCase = true
  12853. }
  12854. }
  12855. }
  12856. Buffer.byteLength = byteLength
  12857. function slowToString (encoding, start, end) {
  12858. var loweredCase = false
  12859. // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
  12860. // property of a typed array.
  12861. // This behaves neither like String nor Uint8Array in that we set start/end
  12862. // to their upper/lower bounds if the value passed is out of range.
  12863. // undefined is handled specially as per ECMA-262 6th Edition,
  12864. // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
  12865. if (start === undefined || start < 0) {
  12866. start = 0
  12867. }
  12868. // Return early if start > this.length. Done here to prevent potential uint32
  12869. // coercion fail below.
  12870. if (start > this.length) {
  12871. return ''
  12872. }
  12873. if (end === undefined || end > this.length) {
  12874. end = this.length
  12875. }
  12876. if (end <= 0) {
  12877. return ''
  12878. }
  12879. // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
  12880. end >>>= 0
  12881. start >>>= 0
  12882. if (end <= start) {
  12883. return ''
  12884. }
  12885. if (!encoding) encoding = 'utf8'
  12886. while (true) {
  12887. switch (encoding) {
  12888. case 'hex':
  12889. return hexSlice(this, start, end)
  12890. case 'utf8':
  12891. case 'utf-8':
  12892. return utf8Slice(this, start, end)
  12893. case 'ascii':
  12894. return asciiSlice(this, start, end)
  12895. case 'latin1':
  12896. case 'binary':
  12897. return latin1Slice(this, start, end)
  12898. case 'base64':
  12899. return base64Slice(this, start, end)
  12900. case 'ucs2':
  12901. case 'ucs-2':
  12902. case 'utf16le':
  12903. case 'utf-16le':
  12904. return utf16leSlice(this, start, end)
  12905. default:
  12906. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  12907. encoding = (encoding + '').toLowerCase()
  12908. loweredCase = true
  12909. }
  12910. }
  12911. }
  12912. // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
  12913. // Buffer instances.
  12914. Buffer.prototype._isBuffer = true
  12915. function swap (b, n, m) {
  12916. var i = b[n]
  12917. b[n] = b[m]
  12918. b[m] = i
  12919. }
  12920. Buffer.prototype.swap16 = function swap16 () {
  12921. var len = this.length
  12922. if (len % 2 !== 0) {
  12923. throw new RangeError('Buffer size must be a multiple of 16-bits')
  12924. }
  12925. for (var i = 0; i < len; i += 2) {
  12926. swap(this, i, i + 1)
  12927. }
  12928. return this
  12929. }
  12930. Buffer.prototype.swap32 = function swap32 () {
  12931. var len = this.length
  12932. if (len % 4 !== 0) {
  12933. throw new RangeError('Buffer size must be a multiple of 32-bits')
  12934. }
  12935. for (var i = 0; i < len; i += 4) {
  12936. swap(this, i, i + 3)
  12937. swap(this, i + 1, i + 2)
  12938. }
  12939. return this
  12940. }
  12941. Buffer.prototype.swap64 = function swap64 () {
  12942. var len = this.length
  12943. if (len % 8 !== 0) {
  12944. throw new RangeError('Buffer size must be a multiple of 64-bits')
  12945. }
  12946. for (var i = 0; i < len; i += 8) {
  12947. swap(this, i, i + 7)
  12948. swap(this, i + 1, i + 6)
  12949. swap(this, i + 2, i + 5)
  12950. swap(this, i + 3, i + 4)
  12951. }
  12952. return this
  12953. }
  12954. Buffer.prototype.toString = function toString () {
  12955. var length = this.length | 0
  12956. if (length === 0) return ''
  12957. if (arguments.length === 0) return utf8Slice(this, 0, length)
  12958. return slowToString.apply(this, arguments)
  12959. }
  12960. Buffer.prototype.equals = function equals (b) {
  12961. if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
  12962. if (this === b) return true
  12963. return Buffer.compare(this, b) === 0
  12964. }
  12965. Buffer.prototype.inspect = function inspect () {
  12966. var str = ''
  12967. var max = exports.INSPECT_MAX_BYTES
  12968. if (this.length > 0) {
  12969. str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
  12970. if (this.length > max) str += ' ... '
  12971. }
  12972. return '<Buffer ' + str + '>'
  12973. }
  12974. Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
  12975. if (!Buffer.isBuffer(target)) {
  12976. throw new TypeError('Argument must be a Buffer')
  12977. }
  12978. if (start === undefined) {
  12979. start = 0
  12980. }
  12981. if (end === undefined) {
  12982. end = target ? target.length : 0
  12983. }
  12984. if (thisStart === undefined) {
  12985. thisStart = 0
  12986. }
  12987. if (thisEnd === undefined) {
  12988. thisEnd = this.length
  12989. }
  12990. if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
  12991. throw new RangeError('out of range index')
  12992. }
  12993. if (thisStart >= thisEnd && start >= end) {
  12994. return 0
  12995. }
  12996. if (thisStart >= thisEnd) {
  12997. return -1
  12998. }
  12999. if (start >= end) {
  13000. return 1
  13001. }
  13002. start >>>= 0
  13003. end >>>= 0
  13004. thisStart >>>= 0
  13005. thisEnd >>>= 0
  13006. if (this === target) return 0
  13007. var x = thisEnd - thisStart
  13008. var y = end - start
  13009. var len = Math.min(x, y)
  13010. var thisCopy = this.slice(thisStart, thisEnd)
  13011. var targetCopy = target.slice(start, end)
  13012. for (var i = 0; i < len; ++i) {
  13013. if (thisCopy[i] !== targetCopy[i]) {
  13014. x = thisCopy[i]
  13015. y = targetCopy[i]
  13016. break
  13017. }
  13018. }
  13019. if (x < y) return -1
  13020. if (y < x) return 1
  13021. return 0
  13022. }
  13023. // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
  13024. // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
  13025. //
  13026. // Arguments:
  13027. // - buffer - a Buffer to search
  13028. // - val - a string, Buffer, or number
  13029. // - byteOffset - an index into `buffer`; will be clamped to an int32
  13030. // - encoding - an optional encoding, relevant is val is a string
  13031. // - dir - true for indexOf, false for lastIndexOf
  13032. function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
  13033. // Empty buffer means no match
  13034. if (buffer.length === 0) return -1
  13035. // Normalize byteOffset
  13036. if (typeof byteOffset === 'string') {
  13037. encoding = byteOffset
  13038. byteOffset = 0
  13039. } else if (byteOffset > 0x7fffffff) {
  13040. byteOffset = 0x7fffffff
  13041. } else if (byteOffset < -0x80000000) {
  13042. byteOffset = -0x80000000
  13043. }
  13044. byteOffset = +byteOffset // Coerce to Number.
  13045. if (isNaN(byteOffset)) {
  13046. // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
  13047. byteOffset = dir ? 0 : (buffer.length - 1)
  13048. }
  13049. // Normalize byteOffset: negative offsets start from the end of the buffer
  13050. if (byteOffset < 0) byteOffset = buffer.length + byteOffset
  13051. if (byteOffset >= buffer.length) {
  13052. if (dir) return -1
  13053. else byteOffset = buffer.length - 1
  13054. } else if (byteOffset < 0) {
  13055. if (dir) byteOffset = 0
  13056. else return -1
  13057. }
  13058. // Normalize val
  13059. if (typeof val === 'string') {
  13060. val = Buffer.from(val, encoding)
  13061. }
  13062. // Finally, search either indexOf (if dir is true) or lastIndexOf
  13063. if (Buffer.isBuffer(val)) {
  13064. // Special case: looking for empty string/buffer always fails
  13065. if (val.length === 0) {
  13066. return -1
  13067. }
  13068. return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
  13069. } else if (typeof val === 'number') {
  13070. val = val & 0xFF // Search for a byte value [0-255]
  13071. if (Buffer.TYPED_ARRAY_SUPPORT &&
  13072. typeof Uint8Array.prototype.indexOf === 'function') {
  13073. if (dir) {
  13074. return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
  13075. } else {
  13076. return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
  13077. }
  13078. }
  13079. return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
  13080. }
  13081. throw new TypeError('val must be string, number or Buffer')
  13082. }
  13083. function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
  13084. var indexSize = 1
  13085. var arrLength = arr.length
  13086. var valLength = val.length
  13087. if (encoding !== undefined) {
  13088. encoding = String(encoding).toLowerCase()
  13089. if (encoding === 'ucs2' || encoding === 'ucs-2' ||
  13090. encoding === 'utf16le' || encoding === 'utf-16le') {
  13091. if (arr.length < 2 || val.length < 2) {
  13092. return -1
  13093. }
  13094. indexSize = 2
  13095. arrLength /= 2
  13096. valLength /= 2
  13097. byteOffset /= 2
  13098. }
  13099. }
  13100. function read (buf, i) {
  13101. if (indexSize === 1) {
  13102. return buf[i]
  13103. } else {
  13104. return buf.readUInt16BE(i * indexSize)
  13105. }
  13106. }
  13107. var i
  13108. if (dir) {
  13109. var foundIndex = -1
  13110. for (i = byteOffset; i < arrLength; i++) {
  13111. if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
  13112. if (foundIndex === -1) foundIndex = i
  13113. if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
  13114. } else {
  13115. if (foundIndex !== -1) i -= i - foundIndex
  13116. foundIndex = -1
  13117. }
  13118. }
  13119. } else {
  13120. if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
  13121. for (i = byteOffset; i >= 0; i--) {
  13122. var found = true
  13123. for (var j = 0; j < valLength; j++) {
  13124. if (read(arr, i + j) !== read(val, j)) {
  13125. found = false
  13126. break
  13127. }
  13128. }
  13129. if (found) return i
  13130. }
  13131. }
  13132. return -1
  13133. }
  13134. Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
  13135. return this.indexOf(val, byteOffset, encoding) !== -1
  13136. }
  13137. Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
  13138. return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
  13139. }
  13140. Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
  13141. return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
  13142. }
  13143. function hexWrite (buf, string, offset, length) {
  13144. offset = Number(offset) || 0
  13145. var remaining = buf.length - offset
  13146. if (!length) {
  13147. length = remaining
  13148. } else {
  13149. length = Number(length)
  13150. if (length > remaining) {
  13151. length = remaining
  13152. }
  13153. }
  13154. // must be an even number of digits
  13155. var strLen = string.length
  13156. if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
  13157. if (length > strLen / 2) {
  13158. length = strLen / 2
  13159. }
  13160. for (var i = 0; i < length; ++i) {
  13161. var parsed = parseInt(string.substr(i * 2, 2), 16)
  13162. if (isNaN(parsed)) return i
  13163. buf[offset + i] = parsed
  13164. }
  13165. return i
  13166. }
  13167. function utf8Write (buf, string, offset, length) {
  13168. return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
  13169. }
  13170. function asciiWrite (buf, string, offset, length) {
  13171. return blitBuffer(asciiToBytes(string), buf, offset, length)
  13172. }
  13173. function latin1Write (buf, string, offset, length) {
  13174. return asciiWrite(buf, string, offset, length)
  13175. }
  13176. function base64Write (buf, string, offset, length) {
  13177. return blitBuffer(base64ToBytes(string), buf, offset, length)
  13178. }
  13179. function ucs2Write (buf, string, offset, length) {
  13180. return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
  13181. }
  13182. Buffer.prototype.write = function write (string, offset, length, encoding) {
  13183. // Buffer#write(string)
  13184. if (offset === undefined) {
  13185. encoding = 'utf8'
  13186. length = this.length
  13187. offset = 0
  13188. // Buffer#write(string, encoding)
  13189. } else if (length === undefined && typeof offset === 'string') {
  13190. encoding = offset
  13191. length = this.length
  13192. offset = 0
  13193. // Buffer#write(string, offset[, length][, encoding])
  13194. } else if (isFinite(offset)) {
  13195. offset = offset | 0
  13196. if (isFinite(length)) {
  13197. length = length | 0
  13198. if (encoding === undefined) encoding = 'utf8'
  13199. } else {
  13200. encoding = length
  13201. length = undefined
  13202. }
  13203. // legacy write(string, encoding, offset, length) - remove in v0.13
  13204. } else {
  13205. throw new Error(
  13206. 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
  13207. )
  13208. }
  13209. var remaining = this.length - offset
  13210. if (length === undefined || length > remaining) length = remaining
  13211. if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
  13212. throw new RangeError('Attempt to write outside buffer bounds')
  13213. }
  13214. if (!encoding) encoding = 'utf8'
  13215. var loweredCase = false
  13216. for (;;) {
  13217. switch (encoding) {
  13218. case 'hex':
  13219. return hexWrite(this, string, offset, length)
  13220. case 'utf8':
  13221. case 'utf-8':
  13222. return utf8Write(this, string, offset, length)
  13223. case 'ascii':
  13224. return asciiWrite(this, string, offset, length)
  13225. case 'latin1':
  13226. case 'binary':
  13227. return latin1Write(this, string, offset, length)
  13228. case 'base64':
  13229. // Warning: maxLength not taken into account in base64Write
  13230. return base64Write(this, string, offset, length)
  13231. case 'ucs2':
  13232. case 'ucs-2':
  13233. case 'utf16le':
  13234. case 'utf-16le':
  13235. return ucs2Write(this, string, offset, length)
  13236. default:
  13237. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  13238. encoding = ('' + encoding).toLowerCase()
  13239. loweredCase = true
  13240. }
  13241. }
  13242. }
  13243. Buffer.prototype.toJSON = function toJSON () {
  13244. return {
  13245. type: 'Buffer',
  13246. data: Array.prototype.slice.call(this._arr || this, 0)
  13247. }
  13248. }
  13249. function base64Slice (buf, start, end) {
  13250. if (start === 0 && end === buf.length) {
  13251. return base64.fromByteArray(buf)
  13252. } else {
  13253. return base64.fromByteArray(buf.slice(start, end))
  13254. }
  13255. }
  13256. function utf8Slice (buf, start, end) {
  13257. end = Math.min(buf.length, end)
  13258. var res = []
  13259. var i = start
  13260. while (i < end) {
  13261. var firstByte = buf[i]
  13262. var codePoint = null
  13263. var bytesPerSequence = (firstByte > 0xEF) ? 4
  13264. : (firstByte > 0xDF) ? 3
  13265. : (firstByte > 0xBF) ? 2
  13266. : 1
  13267. if (i + bytesPerSequence <= end) {
  13268. var secondByte, thirdByte, fourthByte, tempCodePoint
  13269. switch (bytesPerSequence) {
  13270. case 1:
  13271. if (firstByte < 0x80) {
  13272. codePoint = firstByte
  13273. }
  13274. break
  13275. case 2:
  13276. secondByte = buf[i + 1]
  13277. if ((secondByte & 0xC0) === 0x80) {
  13278. tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
  13279. if (tempCodePoint > 0x7F) {
  13280. codePoint = tempCodePoint
  13281. }
  13282. }
  13283. break
  13284. case 3:
  13285. secondByte = buf[i + 1]
  13286. thirdByte = buf[i + 2]
  13287. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
  13288. tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
  13289. if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
  13290. codePoint = tempCodePoint
  13291. }
  13292. }
  13293. break
  13294. case 4:
  13295. secondByte = buf[i + 1]
  13296. thirdByte = buf[i + 2]
  13297. fourthByte = buf[i + 3]
  13298. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
  13299. tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
  13300. if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
  13301. codePoint = tempCodePoint
  13302. }
  13303. }
  13304. }
  13305. }
  13306. if (codePoint === null) {
  13307. // we did not generate a valid codePoint so insert a
  13308. // replacement char (U+FFFD) and advance only 1 byte
  13309. codePoint = 0xFFFD
  13310. bytesPerSequence = 1
  13311. } else if (codePoint > 0xFFFF) {
  13312. // encode to utf16 (surrogate pair dance)
  13313. codePoint -= 0x10000
  13314. res.push(codePoint >>> 10 & 0x3FF | 0xD800)
  13315. codePoint = 0xDC00 | codePoint & 0x3FF
  13316. }
  13317. res.push(codePoint)
  13318. i += bytesPerSequence
  13319. }
  13320. return decodeCodePointsArray(res)
  13321. }
  13322. // Based on http://stackoverflow.com/a/22747272/680742, the browser with
  13323. // the lowest limit is Chrome, with 0x10000 args.
  13324. // We go 1 magnitude less, for safety
  13325. var MAX_ARGUMENTS_LENGTH = 0x1000
  13326. function decodeCodePointsArray (codePoints) {
  13327. var len = codePoints.length
  13328. if (len <= MAX_ARGUMENTS_LENGTH) {
  13329. return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
  13330. }
  13331. // Decode in chunks to avoid "call stack size exceeded".
  13332. var res = ''
  13333. var i = 0
  13334. while (i < len) {
  13335. res += String.fromCharCode.apply(
  13336. String,
  13337. codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
  13338. )
  13339. }
  13340. return res
  13341. }
  13342. function asciiSlice (buf, start, end) {
  13343. var ret = ''
  13344. end = Math.min(buf.length, end)
  13345. for (var i = start; i < end; ++i) {
  13346. ret += String.fromCharCode(buf[i] & 0x7F)
  13347. }
  13348. return ret
  13349. }
  13350. function latin1Slice (buf, start, end) {
  13351. var ret = ''
  13352. end = Math.min(buf.length, end)
  13353. for (var i = start; i < end; ++i) {
  13354. ret += String.fromCharCode(buf[i])
  13355. }
  13356. return ret
  13357. }
  13358. function hexSlice (buf, start, end) {
  13359. var len = buf.length
  13360. if (!start || start < 0) start = 0
  13361. if (!end || end < 0 || end > len) end = len
  13362. var out = ''
  13363. for (var i = start; i < end; ++i) {
  13364. out += toHex(buf[i])
  13365. }
  13366. return out
  13367. }
  13368. function utf16leSlice (buf, start, end) {
  13369. var bytes = buf.slice(start, end)
  13370. var res = ''
  13371. for (var i = 0; i < bytes.length; i += 2) {
  13372. res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
  13373. }
  13374. return res
  13375. }
  13376. Buffer.prototype.slice = function slice (start, end) {
  13377. var len = this.length
  13378. start = ~~start
  13379. end = end === undefined ? len : ~~end
  13380. if (start < 0) {
  13381. start += len
  13382. if (start < 0) start = 0
  13383. } else if (start > len) {
  13384. start = len
  13385. }
  13386. if (end < 0) {
  13387. end += len
  13388. if (end < 0) end = 0
  13389. } else if (end > len) {
  13390. end = len
  13391. }
  13392. if (end < start) end = start
  13393. var newBuf
  13394. if (Buffer.TYPED_ARRAY_SUPPORT) {
  13395. newBuf = this.subarray(start, end)
  13396. newBuf.__proto__ = Buffer.prototype
  13397. } else {
  13398. var sliceLen = end - start
  13399. newBuf = new Buffer(sliceLen, undefined)
  13400. for (var i = 0; i < sliceLen; ++i) {
  13401. newBuf[i] = this[i + start]
  13402. }
  13403. }
  13404. return newBuf
  13405. }
  13406. /*
  13407. * Need to make sure that buffer isn't trying to write out of bounds.
  13408. */
  13409. function checkOffset (offset, ext, length) {
  13410. if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
  13411. if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
  13412. }
  13413. Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
  13414. offset = offset | 0
  13415. byteLength = byteLength | 0
  13416. if (!noAssert) checkOffset(offset, byteLength, this.length)
  13417. var val = this[offset]
  13418. var mul = 1
  13419. var i = 0
  13420. while (++i < byteLength && (mul *= 0x100)) {
  13421. val += this[offset + i] * mul
  13422. }
  13423. return val
  13424. }
  13425. Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
  13426. offset = offset | 0
  13427. byteLength = byteLength | 0
  13428. if (!noAssert) {
  13429. checkOffset(offset, byteLength, this.length)
  13430. }
  13431. var val = this[offset + --byteLength]
  13432. var mul = 1
  13433. while (byteLength > 0 && (mul *= 0x100)) {
  13434. val += this[offset + --byteLength] * mul
  13435. }
  13436. return val
  13437. }
  13438. Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
  13439. if (!noAssert) checkOffset(offset, 1, this.length)
  13440. return this[offset]
  13441. }
  13442. Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
  13443. if (!noAssert) checkOffset(offset, 2, this.length)
  13444. return this[offset] | (this[offset + 1] << 8)
  13445. }
  13446. Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
  13447. if (!noAssert) checkOffset(offset, 2, this.length)
  13448. return (this[offset] << 8) | this[offset + 1]
  13449. }
  13450. Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
  13451. if (!noAssert) checkOffset(offset, 4, this.length)
  13452. return ((this[offset]) |
  13453. (this[offset + 1] << 8) |
  13454. (this[offset + 2] << 16)) +
  13455. (this[offset + 3] * 0x1000000)
  13456. }
  13457. Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
  13458. if (!noAssert) checkOffset(offset, 4, this.length)
  13459. return (this[offset] * 0x1000000) +
  13460. ((this[offset + 1] << 16) |
  13461. (this[offset + 2] << 8) |
  13462. this[offset + 3])
  13463. }
  13464. Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
  13465. offset = offset | 0
  13466. byteLength = byteLength | 0
  13467. if (!noAssert) checkOffset(offset, byteLength, this.length)
  13468. var val = this[offset]
  13469. var mul = 1
  13470. var i = 0
  13471. while (++i < byteLength && (mul *= 0x100)) {
  13472. val += this[offset + i] * mul
  13473. }
  13474. mul *= 0x80
  13475. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  13476. return val
  13477. }
  13478. Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
  13479. offset = offset | 0
  13480. byteLength = byteLength | 0
  13481. if (!noAssert) checkOffset(offset, byteLength, this.length)
  13482. var i = byteLength
  13483. var mul = 1
  13484. var val = this[offset + --i]
  13485. while (i > 0 && (mul *= 0x100)) {
  13486. val += this[offset + --i] * mul
  13487. }
  13488. mul *= 0x80
  13489. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  13490. return val
  13491. }
  13492. Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
  13493. if (!noAssert) checkOffset(offset, 1, this.length)
  13494. if (!(this[offset] & 0x80)) return (this[offset])
  13495. return ((0xff - this[offset] + 1) * -1)
  13496. }
  13497. Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
  13498. if (!noAssert) checkOffset(offset, 2, this.length)
  13499. var val = this[offset] | (this[offset + 1] << 8)
  13500. return (val & 0x8000) ? val | 0xFFFF0000 : val
  13501. }
  13502. Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
  13503. if (!noAssert) checkOffset(offset, 2, this.length)
  13504. var val = this[offset + 1] | (this[offset] << 8)
  13505. return (val & 0x8000) ? val | 0xFFFF0000 : val
  13506. }
  13507. Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
  13508. if (!noAssert) checkOffset(offset, 4, this.length)
  13509. return (this[offset]) |
  13510. (this[offset + 1] << 8) |
  13511. (this[offset + 2] << 16) |
  13512. (this[offset + 3] << 24)
  13513. }
  13514. Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
  13515. if (!noAssert) checkOffset(offset, 4, this.length)
  13516. return (this[offset] << 24) |
  13517. (this[offset + 1] << 16) |
  13518. (this[offset + 2] << 8) |
  13519. (this[offset + 3])
  13520. }
  13521. Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
  13522. if (!noAssert) checkOffset(offset, 4, this.length)
  13523. return ieee754.read(this, offset, true, 23, 4)
  13524. }
  13525. Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
  13526. if (!noAssert) checkOffset(offset, 4, this.length)
  13527. return ieee754.read(this, offset, false, 23, 4)
  13528. }
  13529. Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
  13530. if (!noAssert) checkOffset(offset, 8, this.length)
  13531. return ieee754.read(this, offset, true, 52, 8)
  13532. }
  13533. Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
  13534. if (!noAssert) checkOffset(offset, 8, this.length)
  13535. return ieee754.read(this, offset, false, 52, 8)
  13536. }
  13537. function checkInt (buf, value, offset, ext, max, min) {
  13538. if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
  13539. if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
  13540. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  13541. }
  13542. Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
  13543. value = +value
  13544. offset = offset | 0
  13545. byteLength = byteLength | 0
  13546. if (!noAssert) {
  13547. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  13548. checkInt(this, value, offset, byteLength, maxBytes, 0)
  13549. }
  13550. var mul = 1
  13551. var i = 0
  13552. this[offset] = value & 0xFF
  13553. while (++i < byteLength && (mul *= 0x100)) {
  13554. this[offset + i] = (value / mul) & 0xFF
  13555. }
  13556. return offset + byteLength
  13557. }
  13558. Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
  13559. value = +value
  13560. offset = offset | 0
  13561. byteLength = byteLength | 0
  13562. if (!noAssert) {
  13563. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  13564. checkInt(this, value, offset, byteLength, maxBytes, 0)
  13565. }
  13566. var i = byteLength - 1
  13567. var mul = 1
  13568. this[offset + i] = value & 0xFF
  13569. while (--i >= 0 && (mul *= 0x100)) {
  13570. this[offset + i] = (value / mul) & 0xFF
  13571. }
  13572. return offset + byteLength
  13573. }
  13574. Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
  13575. value = +value
  13576. offset = offset | 0
  13577. if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
  13578. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  13579. this[offset] = (value & 0xff)
  13580. return offset + 1
  13581. }
  13582. function objectWriteUInt16 (buf, value, offset, littleEndian) {
  13583. if (value < 0) value = 0xffff + value + 1
  13584. for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
  13585. buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
  13586. (littleEndian ? i : 1 - i) * 8
  13587. }
  13588. }
  13589. Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
  13590. value = +value
  13591. offset = offset | 0
  13592. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  13593. if (Buffer.TYPED_ARRAY_SUPPORT) {
  13594. this[offset] = (value & 0xff)
  13595. this[offset + 1] = (value >>> 8)
  13596. } else {
  13597. objectWriteUInt16(this, value, offset, true)
  13598. }
  13599. return offset + 2
  13600. }
  13601. Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
  13602. value = +value
  13603. offset = offset | 0
  13604. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  13605. if (Buffer.TYPED_ARRAY_SUPPORT) {
  13606. this[offset] = (value >>> 8)
  13607. this[offset + 1] = (value & 0xff)
  13608. } else {
  13609. objectWriteUInt16(this, value, offset, false)
  13610. }
  13611. return offset + 2
  13612. }
  13613. function objectWriteUInt32 (buf, value, offset, littleEndian) {
  13614. if (value < 0) value = 0xffffffff + value + 1
  13615. for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
  13616. buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
  13617. }
  13618. }
  13619. Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
  13620. value = +value
  13621. offset = offset | 0
  13622. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  13623. if (Buffer.TYPED_ARRAY_SUPPORT) {
  13624. this[offset + 3] = (value >>> 24)
  13625. this[offset + 2] = (value >>> 16)
  13626. this[offset + 1] = (value >>> 8)
  13627. this[offset] = (value & 0xff)
  13628. } else {
  13629. objectWriteUInt32(this, value, offset, true)
  13630. }
  13631. return offset + 4
  13632. }
  13633. Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
  13634. value = +value
  13635. offset = offset | 0
  13636. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  13637. if (Buffer.TYPED_ARRAY_SUPPORT) {
  13638. this[offset] = (value >>> 24)
  13639. this[offset + 1] = (value >>> 16)
  13640. this[offset + 2] = (value >>> 8)
  13641. this[offset + 3] = (value & 0xff)
  13642. } else {
  13643. objectWriteUInt32(this, value, offset, false)
  13644. }
  13645. return offset + 4
  13646. }
  13647. Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
  13648. value = +value
  13649. offset = offset | 0
  13650. if (!noAssert) {
  13651. var limit = Math.pow(2, 8 * byteLength - 1)
  13652. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  13653. }
  13654. var i = 0
  13655. var mul = 1
  13656. var sub = 0
  13657. this[offset] = value & 0xFF
  13658. while (++i < byteLength && (mul *= 0x100)) {
  13659. if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
  13660. sub = 1
  13661. }
  13662. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  13663. }
  13664. return offset + byteLength
  13665. }
  13666. Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
  13667. value = +value
  13668. offset = offset | 0
  13669. if (!noAssert) {
  13670. var limit = Math.pow(2, 8 * byteLength - 1)
  13671. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  13672. }
  13673. var i = byteLength - 1
  13674. var mul = 1
  13675. var sub = 0
  13676. this[offset + i] = value & 0xFF
  13677. while (--i >= 0 && (mul *= 0x100)) {
  13678. if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
  13679. sub = 1
  13680. }
  13681. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  13682. }
  13683. return offset + byteLength
  13684. }
  13685. Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
  13686. value = +value
  13687. offset = offset | 0
  13688. if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
  13689. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  13690. if (value < 0) value = 0xff + value + 1
  13691. this[offset] = (value & 0xff)
  13692. return offset + 1
  13693. }
  13694. Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
  13695. value = +value
  13696. offset = offset | 0
  13697. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  13698. if (Buffer.TYPED_ARRAY_SUPPORT) {
  13699. this[offset] = (value & 0xff)
  13700. this[offset + 1] = (value >>> 8)
  13701. } else {
  13702. objectWriteUInt16(this, value, offset, true)
  13703. }
  13704. return offset + 2
  13705. }
  13706. Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
  13707. value = +value
  13708. offset = offset | 0
  13709. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  13710. if (Buffer.TYPED_ARRAY_SUPPORT) {
  13711. this[offset] = (value >>> 8)
  13712. this[offset + 1] = (value & 0xff)
  13713. } else {
  13714. objectWriteUInt16(this, value, offset, false)
  13715. }
  13716. return offset + 2
  13717. }
  13718. Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
  13719. value = +value
  13720. offset = offset | 0
  13721. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  13722. if (Buffer.TYPED_ARRAY_SUPPORT) {
  13723. this[offset] = (value & 0xff)
  13724. this[offset + 1] = (value >>> 8)
  13725. this[offset + 2] = (value >>> 16)
  13726. this[offset + 3] = (value >>> 24)
  13727. } else {
  13728. objectWriteUInt32(this, value, offset, true)
  13729. }
  13730. return offset + 4
  13731. }
  13732. Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
  13733. value = +value
  13734. offset = offset | 0
  13735. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  13736. if (value < 0) value = 0xffffffff + value + 1
  13737. if (Buffer.TYPED_ARRAY_SUPPORT) {
  13738. this[offset] = (value >>> 24)
  13739. this[offset + 1] = (value >>> 16)
  13740. this[offset + 2] = (value >>> 8)
  13741. this[offset + 3] = (value & 0xff)
  13742. } else {
  13743. objectWriteUInt32(this, value, offset, false)
  13744. }
  13745. return offset + 4
  13746. }
  13747. function checkIEEE754 (buf, value, offset, ext, max, min) {
  13748. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  13749. if (offset < 0) throw new RangeError('Index out of range')
  13750. }
  13751. function writeFloat (buf, value, offset, littleEndian, noAssert) {
  13752. if (!noAssert) {
  13753. checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
  13754. }
  13755. ieee754.write(buf, value, offset, littleEndian, 23, 4)
  13756. return offset + 4
  13757. }
  13758. Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
  13759. return writeFloat(this, value, offset, true, noAssert)
  13760. }
  13761. Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
  13762. return writeFloat(this, value, offset, false, noAssert)
  13763. }
  13764. function writeDouble (buf, value, offset, littleEndian, noAssert) {
  13765. if (!noAssert) {
  13766. checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
  13767. }
  13768. ieee754.write(buf, value, offset, littleEndian, 52, 8)
  13769. return offset + 8
  13770. }
  13771. Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
  13772. return writeDouble(this, value, offset, true, noAssert)
  13773. }
  13774. Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
  13775. return writeDouble(this, value, offset, false, noAssert)
  13776. }
  13777. // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
  13778. Buffer.prototype.copy = function copy (target, targetStart, start, end) {
  13779. if (!start) start = 0
  13780. if (!end && end !== 0) end = this.length
  13781. if (targetStart >= target.length) targetStart = target.length
  13782. if (!targetStart) targetStart = 0
  13783. if (end > 0 && end < start) end = start
  13784. // Copy 0 bytes; we're done
  13785. if (end === start) return 0
  13786. if (target.length === 0 || this.length === 0) return 0
  13787. // Fatal error conditions
  13788. if (targetStart < 0) {
  13789. throw new RangeError('targetStart out of bounds')
  13790. }
  13791. if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
  13792. if (end < 0) throw new RangeError('sourceEnd out of bounds')
  13793. // Are we oob?
  13794. if (end > this.length) end = this.length
  13795. if (target.length - targetStart < end - start) {
  13796. end = target.length - targetStart + start
  13797. }
  13798. var len = end - start
  13799. var i
  13800. if (this === target && start < targetStart && targetStart < end) {
  13801. // descending copy from end
  13802. for (i = len - 1; i >= 0; --i) {
  13803. target[i + targetStart] = this[i + start]
  13804. }
  13805. } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
  13806. // ascending copy from start
  13807. for (i = 0; i < len; ++i) {
  13808. target[i + targetStart] = this[i + start]
  13809. }
  13810. } else {
  13811. Uint8Array.prototype.set.call(
  13812. target,
  13813. this.subarray(start, start + len),
  13814. targetStart
  13815. )
  13816. }
  13817. return len
  13818. }
  13819. // Usage:
  13820. // buffer.fill(number[, offset[, end]])
  13821. // buffer.fill(buffer[, offset[, end]])
  13822. // buffer.fill(string[, offset[, end]][, encoding])
  13823. Buffer.prototype.fill = function fill (val, start, end, encoding) {
  13824. // Handle string cases:
  13825. if (typeof val === 'string') {
  13826. if (typeof start === 'string') {
  13827. encoding = start
  13828. start = 0
  13829. end = this.length
  13830. } else if (typeof end === 'string') {
  13831. encoding = end
  13832. end = this.length
  13833. }
  13834. if (val.length === 1) {
  13835. var code = val.charCodeAt(0)
  13836. if (code < 256) {
  13837. val = code
  13838. }
  13839. }
  13840. if (encoding !== undefined && typeof encoding !== 'string') {
  13841. throw new TypeError('encoding must be a string')
  13842. }
  13843. if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
  13844. throw new TypeError('Unknown encoding: ' + encoding)
  13845. }
  13846. } else if (typeof val === 'number') {
  13847. val = val & 255
  13848. }
  13849. // Invalid ranges are not set to a default, so can range check early.
  13850. if (start < 0 || this.length < start || this.length < end) {
  13851. throw new RangeError('Out of range index')
  13852. }
  13853. if (end <= start) {
  13854. return this
  13855. }
  13856. start = start >>> 0
  13857. end = end === undefined ? this.length : end >>> 0
  13858. if (!val) val = 0
  13859. var i
  13860. if (typeof val === 'number') {
  13861. for (i = start; i < end; ++i) {
  13862. this[i] = val
  13863. }
  13864. } else {
  13865. var bytes = Buffer.isBuffer(val)
  13866. ? val
  13867. : utf8ToBytes(new Buffer(val, encoding).toString())
  13868. var len = bytes.length
  13869. for (i = 0; i < end - start; ++i) {
  13870. this[i + start] = bytes[i % len]
  13871. }
  13872. }
  13873. return this
  13874. }
  13875. // HELPER FUNCTIONS
  13876. // ================
  13877. var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
  13878. function base64clean (str) {
  13879. // Node strips out invalid characters like \n and \t from the string, base64-js does not
  13880. str = stringtrim(str).replace(INVALID_BASE64_RE, '')
  13881. // Node converts strings with length < 2 to ''
  13882. if (str.length < 2) return ''
  13883. // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
  13884. while (str.length % 4 !== 0) {
  13885. str = str + '='
  13886. }
  13887. return str
  13888. }
  13889. function stringtrim (str) {
  13890. if (str.trim) return str.trim()
  13891. return str.replace(/^\s+|\s+$/g, '')
  13892. }
  13893. function toHex (n) {
  13894. if (n < 16) return '0' + n.toString(16)
  13895. return n.toString(16)
  13896. }
  13897. function utf8ToBytes (string, units) {
  13898. units = units || Infinity
  13899. var codePoint
  13900. var length = string.length
  13901. var leadSurrogate = null
  13902. var bytes = []
  13903. for (var i = 0; i < length; ++i) {
  13904. codePoint = string.charCodeAt(i)
  13905. // is surrogate component
  13906. if (codePoint > 0xD7FF && codePoint < 0xE000) {
  13907. // last char was a lead
  13908. if (!leadSurrogate) {
  13909. // no lead yet
  13910. if (codePoint > 0xDBFF) {
  13911. // unexpected trail
  13912. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  13913. continue
  13914. } else if (i + 1 === length) {
  13915. // unpaired lead
  13916. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  13917. continue
  13918. }
  13919. // valid lead
  13920. leadSurrogate = codePoint
  13921. continue
  13922. }
  13923. // 2 leads in a row
  13924. if (codePoint < 0xDC00) {
  13925. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  13926. leadSurrogate = codePoint
  13927. continue
  13928. }
  13929. // valid surrogate pair
  13930. codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
  13931. } else if (leadSurrogate) {
  13932. // valid bmp char, but last char was a lead
  13933. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  13934. }
  13935. leadSurrogate = null
  13936. // encode utf8
  13937. if (codePoint < 0x80) {
  13938. if ((units -= 1) < 0) break
  13939. bytes.push(codePoint)
  13940. } else if (codePoint < 0x800) {
  13941. if ((units -= 2) < 0) break
  13942. bytes.push(
  13943. codePoint >> 0x6 | 0xC0,
  13944. codePoint & 0x3F | 0x80
  13945. )
  13946. } else if (codePoint < 0x10000) {
  13947. if ((units -= 3) < 0) break
  13948. bytes.push(
  13949. codePoint >> 0xC | 0xE0,
  13950. codePoint >> 0x6 & 0x3F | 0x80,
  13951. codePoint & 0x3F | 0x80
  13952. )
  13953. } else if (codePoint < 0x110000) {
  13954. if ((units -= 4) < 0) break
  13955. bytes.push(
  13956. codePoint >> 0x12 | 0xF0,
  13957. codePoint >> 0xC & 0x3F | 0x80,
  13958. codePoint >> 0x6 & 0x3F | 0x80,
  13959. codePoint & 0x3F | 0x80
  13960. )
  13961. } else {
  13962. throw new Error('Invalid code point')
  13963. }
  13964. }
  13965. return bytes
  13966. }
  13967. function asciiToBytes (str) {
  13968. var byteArray = []
  13969. for (var i = 0; i < str.length; ++i) {
  13970. // Node's code seems to be doing this and not & 0x7F..
  13971. byteArray.push(str.charCodeAt(i) & 0xFF)
  13972. }
  13973. return byteArray
  13974. }
  13975. function utf16leToBytes (str, units) {
  13976. var c, hi, lo
  13977. var byteArray = []
  13978. for (var i = 0; i < str.length; ++i) {
  13979. if ((units -= 2) < 0) break
  13980. c = str.charCodeAt(i)
  13981. hi = c >> 8
  13982. lo = c % 256
  13983. byteArray.push(lo)
  13984. byteArray.push(hi)
  13985. }
  13986. return byteArray
  13987. }
  13988. function base64ToBytes (str) {
  13989. return base64.toByteArray(base64clean(str))
  13990. }
  13991. function blitBuffer (src, dst, offset, length) {
  13992. for (var i = 0; i < length; ++i) {
  13993. if ((i + offset >= dst.length) || (i >= src.length)) break
  13994. dst[i + offset] = src[i]
  13995. }
  13996. return i
  13997. }
  13998. function isnan (val) {
  13999. return val !== val // eslint-disable-line no-self-compare
  14000. }
  14001. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 3)))
  14002. /***/ }),
  14003. /* 71 */
  14004. /*!*****************************************!*\
  14005. !*** ./node_modules/base64-js/index.js ***!
  14006. \*****************************************/
  14007. /*! no static exports found */
  14008. /***/ (function(module, exports, __webpack_require__) {
  14009. "use strict";
  14010. exports.byteLength = byteLength
  14011. exports.toByteArray = toByteArray
  14012. exports.fromByteArray = fromByteArray
  14013. var lookup = []
  14014. var revLookup = []
  14015. var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
  14016. var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  14017. for (var i = 0, len = code.length; i < len; ++i) {
  14018. lookup[i] = code[i]
  14019. revLookup[code.charCodeAt(i)] = i
  14020. }
  14021. // Support decoding URL-safe base64 strings, as Node.js does.
  14022. // See: https://en.wikipedia.org/wiki/Base64#URL_applications
  14023. revLookup['-'.charCodeAt(0)] = 62
  14024. revLookup['_'.charCodeAt(0)] = 63
  14025. function getLens (b64) {
  14026. var len = b64.length
  14027. if (len % 4 > 0) {
  14028. throw new Error('Invalid string. Length must be a multiple of 4')
  14029. }
  14030. // Trim off extra bytes after placeholder bytes are found
  14031. // See: https://github.com/beatgammit/base64-js/issues/42
  14032. var validLen = b64.indexOf('=')
  14033. if (validLen === -1) validLen = len
  14034. var placeHoldersLen = validLen === len
  14035. ? 0
  14036. : 4 - (validLen % 4)
  14037. return [validLen, placeHoldersLen]
  14038. }
  14039. // base64 is 4/3 + up to two characters of the original data
  14040. function byteLength (b64) {
  14041. var lens = getLens(b64)
  14042. var validLen = lens[0]
  14043. var placeHoldersLen = lens[1]
  14044. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  14045. }
  14046. function _byteLength (b64, validLen, placeHoldersLen) {
  14047. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  14048. }
  14049. function toByteArray (b64) {
  14050. var tmp
  14051. var lens = getLens(b64)
  14052. var validLen = lens[0]
  14053. var placeHoldersLen = lens[1]
  14054. var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
  14055. var curByte = 0
  14056. // if there are placeholders, only get up to the last complete 4 chars
  14057. var len = placeHoldersLen > 0
  14058. ? validLen - 4
  14059. : validLen
  14060. var i
  14061. for (i = 0; i < len; i += 4) {
  14062. tmp =
  14063. (revLookup[b64.charCodeAt(i)] << 18) |
  14064. (revLookup[b64.charCodeAt(i + 1)] << 12) |
  14065. (revLookup[b64.charCodeAt(i + 2)] << 6) |
  14066. revLookup[b64.charCodeAt(i + 3)]
  14067. arr[curByte++] = (tmp >> 16) & 0xFF
  14068. arr[curByte++] = (tmp >> 8) & 0xFF
  14069. arr[curByte++] = tmp & 0xFF
  14070. }
  14071. if (placeHoldersLen === 2) {
  14072. tmp =
  14073. (revLookup[b64.charCodeAt(i)] << 2) |
  14074. (revLookup[b64.charCodeAt(i + 1)] >> 4)
  14075. arr[curByte++] = tmp & 0xFF
  14076. }
  14077. if (placeHoldersLen === 1) {
  14078. tmp =
  14079. (revLookup[b64.charCodeAt(i)] << 10) |
  14080. (revLookup[b64.charCodeAt(i + 1)] << 4) |
  14081. (revLookup[b64.charCodeAt(i + 2)] >> 2)
  14082. arr[curByte++] = (tmp >> 8) & 0xFF
  14083. arr[curByte++] = tmp & 0xFF
  14084. }
  14085. return arr
  14086. }
  14087. function tripletToBase64 (num) {
  14088. return lookup[num >> 18 & 0x3F] +
  14089. lookup[num >> 12 & 0x3F] +
  14090. lookup[num >> 6 & 0x3F] +
  14091. lookup[num & 0x3F]
  14092. }
  14093. function encodeChunk (uint8, start, end) {
  14094. var tmp
  14095. var output = []
  14096. for (var i = start; i < end; i += 3) {
  14097. tmp =
  14098. ((uint8[i] << 16) & 0xFF0000) +
  14099. ((uint8[i + 1] << 8) & 0xFF00) +
  14100. (uint8[i + 2] & 0xFF)
  14101. output.push(tripletToBase64(tmp))
  14102. }
  14103. return output.join('')
  14104. }
  14105. function fromByteArray (uint8) {
  14106. var tmp
  14107. var len = uint8.length
  14108. var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
  14109. var parts = []
  14110. var maxChunkLength = 16383 // must be multiple of 3
  14111. // go through the array every three bytes, we'll deal with trailing stuff later
  14112. for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
  14113. parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
  14114. }
  14115. // pad the end with zeros, but make sure to not forget the extra bytes
  14116. if (extraBytes === 1) {
  14117. tmp = uint8[len - 1]
  14118. parts.push(
  14119. lookup[tmp >> 2] +
  14120. lookup[(tmp << 4) & 0x3F] +
  14121. '=='
  14122. )
  14123. } else if (extraBytes === 2) {
  14124. tmp = (uint8[len - 2] << 8) + uint8[len - 1]
  14125. parts.push(
  14126. lookup[tmp >> 10] +
  14127. lookup[(tmp >> 4) & 0x3F] +
  14128. lookup[(tmp << 2) & 0x3F] +
  14129. '='
  14130. )
  14131. }
  14132. return parts.join('')
  14133. }
  14134. /***/ }),
  14135. /* 72 */
  14136. /*!***************************************!*\
  14137. !*** ./node_modules/ieee754/index.js ***!
  14138. \***************************************/
  14139. /*! no static exports found */
  14140. /***/ (function(module, exports) {
  14141. /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
  14142. exports.read = function (buffer, offset, isLE, mLen, nBytes) {
  14143. var e, m
  14144. var eLen = (nBytes * 8) - mLen - 1
  14145. var eMax = (1 << eLen) - 1
  14146. var eBias = eMax >> 1
  14147. var nBits = -7
  14148. var i = isLE ? (nBytes - 1) : 0
  14149. var d = isLE ? -1 : 1
  14150. var s = buffer[offset + i]
  14151. i += d
  14152. e = s & ((1 << (-nBits)) - 1)
  14153. s >>= (-nBits)
  14154. nBits += eLen
  14155. for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  14156. m = e & ((1 << (-nBits)) - 1)
  14157. e >>= (-nBits)
  14158. nBits += mLen
  14159. for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  14160. if (e === 0) {
  14161. e = 1 - eBias
  14162. } else if (e === eMax) {
  14163. return m ? NaN : ((s ? -1 : 1) * Infinity)
  14164. } else {
  14165. m = m + Math.pow(2, mLen)
  14166. e = e - eBias
  14167. }
  14168. return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
  14169. }
  14170. exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
  14171. var e, m, c
  14172. var eLen = (nBytes * 8) - mLen - 1
  14173. var eMax = (1 << eLen) - 1
  14174. var eBias = eMax >> 1
  14175. var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
  14176. var i = isLE ? 0 : (nBytes - 1)
  14177. var d = isLE ? 1 : -1
  14178. var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
  14179. value = Math.abs(value)
  14180. if (isNaN(value) || value === Infinity) {
  14181. m = isNaN(value) ? 1 : 0
  14182. e = eMax
  14183. } else {
  14184. e = Math.floor(Math.log(value) / Math.LN2)
  14185. if (value * (c = Math.pow(2, -e)) < 1) {
  14186. e--
  14187. c *= 2
  14188. }
  14189. if (e + eBias >= 1) {
  14190. value += rt / c
  14191. } else {
  14192. value += rt * Math.pow(2, 1 - eBias)
  14193. }
  14194. if (value * c >= 2) {
  14195. e++
  14196. c /= 2
  14197. }
  14198. if (e + eBias >= eMax) {
  14199. m = 0
  14200. e = eMax
  14201. } else if (e + eBias >= 1) {
  14202. m = ((value * c) - 1) * Math.pow(2, mLen)
  14203. e = e + eBias
  14204. } else {
  14205. m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
  14206. e = 0
  14207. }
  14208. }
  14209. for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
  14210. e = (e << mLen) | m
  14211. eLen += mLen
  14212. for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
  14213. buffer[offset + i - d] |= s * 128
  14214. }
  14215. /***/ }),
  14216. /* 73 */
  14217. /*!***************************************!*\
  14218. !*** ./node_modules/isarray/index.js ***!
  14219. \***************************************/
  14220. /*! no static exports found */
  14221. /***/ (function(module, exports) {
  14222. var toString = {}.toString;
  14223. module.exports = Array.isArray || function (arr) {
  14224. return toString.call(arr) == '[object Array]';
  14225. };
  14226. /***/ }),
  14227. /* 74 */
  14228. /*!****************************************************************************************!*\
  14229. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/core/AxiosError.js ***!
  14230. \****************************************************************************************/
  14231. /*! no static exports found */
  14232. /***/ (function(module, exports, __webpack_require__) {
  14233. "use strict";
  14234. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14235. Object.defineProperty(exports, "__esModule", {
  14236. value: true
  14237. });
  14238. exports.default = void 0;
  14239. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 64));
  14240. /**
  14241. * Create an Error with the specified message, config, error code, request and response.
  14242. *
  14243. * @param {string} message The error message.
  14244. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  14245. * @param {Object} [config] The config.
  14246. * @param {Object} [request] The request.
  14247. * @param {Object} [response] The response.
  14248. *
  14249. * @returns {Error} The created error.
  14250. */
  14251. function AxiosError(message, code, config, request, response) {
  14252. Error.call(this);
  14253. if (Error.captureStackTrace) {
  14254. Error.captureStackTrace(this, this.constructor);
  14255. } else {
  14256. this.stack = new Error().stack;
  14257. }
  14258. this.message = message;
  14259. this.name = 'AxiosError';
  14260. code && (this.code = code);
  14261. config && (this.config = config);
  14262. request && (this.request = request);
  14263. response && (this.response = response);
  14264. }
  14265. _utils.default.inherits(AxiosError, Error, {
  14266. toJSON: function toJSON() {
  14267. return {
  14268. // Standard
  14269. message: this.message,
  14270. name: this.name,
  14271. // Microsoft
  14272. description: this.description,
  14273. number: this.number,
  14274. // Mozilla
  14275. fileName: this.fileName,
  14276. lineNumber: this.lineNumber,
  14277. columnNumber: this.columnNumber,
  14278. stack: this.stack,
  14279. // Axios
  14280. config: _utils.default.toJSONObject(this.config),
  14281. code: this.code,
  14282. status: this.response && this.response.status ? this.response.status : null
  14283. };
  14284. }
  14285. });
  14286. var prototype = AxiosError.prototype;
  14287. var descriptors = {};
  14288. ['ERR_BAD_OPTION_VALUE', 'ERR_BAD_OPTION', 'ECONNABORTED', 'ETIMEDOUT', 'ERR_NETWORK', 'ERR_FR_TOO_MANY_REDIRECTS', 'ERR_DEPRECATED', 'ERR_BAD_RESPONSE', 'ERR_BAD_REQUEST', 'ERR_CANCELED', 'ERR_NOT_SUPPORT', 'ERR_INVALID_URL'
  14289. // eslint-disable-next-line func-names
  14290. ].forEach(function (code) {
  14291. descriptors[code] = {
  14292. value: code
  14293. };
  14294. });
  14295. Object.defineProperties(AxiosError, descriptors);
  14296. Object.defineProperty(prototype, 'isAxiosError', {
  14297. value: true
  14298. });
  14299. // eslint-disable-next-line func-names
  14300. AxiosError.from = function (error, code, config, request, response, customProps) {
  14301. var axiosError = Object.create(prototype);
  14302. _utils.default.toFlatObject(error, axiosError, function filter(obj) {
  14303. return obj !== Error.prototype;
  14304. }, function (prop) {
  14305. return prop !== 'isAxiosError';
  14306. });
  14307. AxiosError.call(axiosError, error.message, code, config, request, response);
  14308. axiosError.cause = error;
  14309. axiosError.name = error.name;
  14310. customProps && Object.assign(axiosError, customProps);
  14311. return axiosError;
  14312. };
  14313. var _default = AxiosError;
  14314. exports.default = _default;
  14315. /***/ }),
  14316. /* 75 */
  14317. /*!*************************************************************************************!*\
  14318. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/null.js ***!
  14319. \*************************************************************************************/
  14320. /*! no static exports found */
  14321. /***/ (function(module, exports, __webpack_require__) {
  14322. "use strict";
  14323. Object.defineProperty(exports, "__esModule", {
  14324. value: true
  14325. });
  14326. exports.default = void 0;
  14327. // eslint-disable-next-line strict
  14328. var _default = null;
  14329. exports.default = _default;
  14330. /***/ }),
  14331. /* 76 */
  14332. /*!************************************************************************************************!*\
  14333. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/core/InterceptorManager.js ***!
  14334. \************************************************************************************************/
  14335. /*! no static exports found */
  14336. /***/ (function(module, exports, __webpack_require__) {
  14337. "use strict";
  14338. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14339. Object.defineProperty(exports, "__esModule", {
  14340. value: true
  14341. });
  14342. exports.default = void 0;
  14343. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  14344. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  14345. var _utils = _interopRequireDefault(__webpack_require__(/*! ./../utils.js */ 64));
  14346. var InterceptorManager = /*#__PURE__*/function () {
  14347. function InterceptorManager() {
  14348. (0, _classCallCheck2.default)(this, InterceptorManager);
  14349. this.handlers = [];
  14350. }
  14351. /**
  14352. * Add a new interceptor to the stack
  14353. *
  14354. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  14355. * @param {Function} rejected The function to handle `reject` for a `Promise`
  14356. *
  14357. * @return {Number} An ID used to remove interceptor later
  14358. */
  14359. (0, _createClass2.default)(InterceptorManager, [{
  14360. key: "use",
  14361. value: function use(fulfilled, rejected, options) {
  14362. this.handlers.push({
  14363. fulfilled: fulfilled,
  14364. rejected: rejected,
  14365. synchronous: options ? options.synchronous : false,
  14366. runWhen: options ? options.runWhen : null
  14367. });
  14368. return this.handlers.length - 1;
  14369. }
  14370. /**
  14371. * Remove an interceptor from the stack
  14372. *
  14373. * @param {Number} id The ID that was returned by `use`
  14374. *
  14375. * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
  14376. */
  14377. }, {
  14378. key: "eject",
  14379. value: function eject(id) {
  14380. if (this.handlers[id]) {
  14381. this.handlers[id] = null;
  14382. }
  14383. }
  14384. /**
  14385. * Clear all interceptors from the stack
  14386. *
  14387. * @returns {void}
  14388. */
  14389. }, {
  14390. key: "clear",
  14391. value: function clear() {
  14392. if (this.handlers) {
  14393. this.handlers = [];
  14394. }
  14395. }
  14396. /**
  14397. * Iterate over all the registered interceptors
  14398. *
  14399. * This method is particularly useful for skipping over any
  14400. * interceptors that may have become `null` calling `eject`.
  14401. *
  14402. * @param {Function} fn The function to call for each interceptor
  14403. *
  14404. * @returns {void}
  14405. */
  14406. }, {
  14407. key: "forEach",
  14408. value: function forEach(fn) {
  14409. _utils.default.forEach(this.handlers, function forEachHandler(h) {
  14410. if (h !== null) {
  14411. fn(h);
  14412. }
  14413. });
  14414. }
  14415. }]);
  14416. return InterceptorManager;
  14417. }();
  14418. var _default = InterceptorManager;
  14419. exports.default = _default;
  14420. /***/ }),
  14421. /* 77 */
  14422. /*!*********************************************************************************************!*\
  14423. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/core/dispatchRequest.js ***!
  14424. \*********************************************************************************************/
  14425. /*! no static exports found */
  14426. /***/ (function(module, exports, __webpack_require__) {
  14427. "use strict";
  14428. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14429. Object.defineProperty(exports, "__esModule", {
  14430. value: true
  14431. });
  14432. exports.default = dispatchRequest;
  14433. var _transformData = _interopRequireDefault(__webpack_require__(/*! ./transformData.js */ 78));
  14434. var _isCancel = _interopRequireDefault(__webpack_require__(/*! ../cancel/isCancel.js */ 91));
  14435. var _index = _interopRequireDefault(__webpack_require__(/*! ../defaults/index.js */ 79));
  14436. var _CanceledError = _interopRequireDefault(__webpack_require__(/*! ../cancel/CanceledError.js */ 92));
  14437. var _AxiosHeaders = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosHeaders.js */ 89));
  14438. var _adapters = _interopRequireDefault(__webpack_require__(/*! ../adapters/adapters.js */ 93));
  14439. /**
  14440. * Throws a `CanceledError` if cancellation has been requested.
  14441. *
  14442. * @param {Object} config The config that is to be used for the request
  14443. *
  14444. * @returns {void}
  14445. */
  14446. function throwIfCancellationRequested(config) {
  14447. if (config.cancelToken) {
  14448. config.cancelToken.throwIfRequested();
  14449. }
  14450. if (config.signal && config.signal.aborted) {
  14451. throw new _CanceledError.default(null, config);
  14452. }
  14453. }
  14454. /**
  14455. * Dispatch a request to the server using the configured adapter.
  14456. *
  14457. * @param {object} config The config that is to be used for the request
  14458. *
  14459. * @returns {Promise} The Promise to be fulfilled
  14460. */
  14461. function dispatchRequest(config) {
  14462. throwIfCancellationRequested(config);
  14463. config.headers = _AxiosHeaders.default.from(config.headers);
  14464. // Transform request data
  14465. config.data = _transformData.default.call(config, config.transformRequest);
  14466. if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
  14467. config.headers.setContentType('application/x-www-form-urlencoded', false);
  14468. }
  14469. var adapter = _adapters.default.getAdapter(config.adapter || _index.default.adapter);
  14470. return adapter(config).then(function onAdapterResolution(response) {
  14471. throwIfCancellationRequested(config);
  14472. // Transform response data
  14473. response.data = _transformData.default.call(config, config.transformResponse, response);
  14474. response.headers = _AxiosHeaders.default.from(response.headers);
  14475. return response;
  14476. }, function onAdapterRejection(reason) {
  14477. if (!(0, _isCancel.default)(reason)) {
  14478. throwIfCancellationRequested(config);
  14479. // Transform response data
  14480. if (reason && reason.response) {
  14481. reason.response.data = _transformData.default.call(config, config.transformResponse, reason.response);
  14482. reason.response.headers = _AxiosHeaders.default.from(reason.response.headers);
  14483. }
  14484. }
  14485. return Promise.reject(reason);
  14486. });
  14487. }
  14488. /***/ }),
  14489. /* 78 */
  14490. /*!*******************************************************************************************!*\
  14491. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/core/transformData.js ***!
  14492. \*******************************************************************************************/
  14493. /*! no static exports found */
  14494. /***/ (function(module, exports, __webpack_require__) {
  14495. "use strict";
  14496. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14497. Object.defineProperty(exports, "__esModule", {
  14498. value: true
  14499. });
  14500. exports.default = transformData;
  14501. var _utils = _interopRequireDefault(__webpack_require__(/*! ./../utils.js */ 64));
  14502. var _index = _interopRequireDefault(__webpack_require__(/*! ../defaults/index.js */ 79));
  14503. var _AxiosHeaders = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosHeaders.js */ 89));
  14504. /**
  14505. * Transform the data for a request or a response
  14506. *
  14507. * @param {Array|Function} fns A single function or Array of functions
  14508. * @param {?Object} response The response object
  14509. *
  14510. * @returns {*} The resulting transformed data
  14511. */
  14512. function transformData(fns, response) {
  14513. var config = this || _index.default;
  14514. var context = response || config;
  14515. var headers = _AxiosHeaders.default.from(context.headers);
  14516. var data = context.data;
  14517. _utils.default.forEach(fns, function transform(fn) {
  14518. data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
  14519. });
  14520. headers.normalize();
  14521. return data;
  14522. }
  14523. /***/ }),
  14524. /* 79 */
  14525. /*!***************************************************************************************!*\
  14526. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/defaults/index.js ***!
  14527. \***************************************************************************************/
  14528. /*! no static exports found */
  14529. /***/ (function(module, exports, __webpack_require__) {
  14530. "use strict";
  14531. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14532. Object.defineProperty(exports, "__esModule", {
  14533. value: true
  14534. });
  14535. exports.default = void 0;
  14536. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 64));
  14537. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosError.js */ 74));
  14538. var _transitional = _interopRequireDefault(__webpack_require__(/*! ./transitional.js */ 80));
  14539. var _toFormData = _interopRequireDefault(__webpack_require__(/*! ../helpers/toFormData.js */ 69));
  14540. var _toURLEncodedForm = _interopRequireDefault(__webpack_require__(/*! ../helpers/toURLEncodedForm.js */ 81));
  14541. var _index = _interopRequireDefault(__webpack_require__(/*! ../platform/index.js */ 82));
  14542. var _formDataToJSON = _interopRequireDefault(__webpack_require__(/*! ../helpers/formDataToJSON.js */ 88));
  14543. /**
  14544. * It takes a string, tries to parse it, and if it fails, it returns the stringified version
  14545. * of the input
  14546. *
  14547. * @param {any} rawValue - The value to be stringified.
  14548. * @param {Function} parser - A function that parses a string into a JavaScript object.
  14549. * @param {Function} encoder - A function that takes a value and returns a string.
  14550. *
  14551. * @returns {string} A stringified version of the rawValue.
  14552. */
  14553. function stringifySafely(rawValue, parser, encoder) {
  14554. if (_utils.default.isString(rawValue)) {
  14555. try {
  14556. (parser || JSON.parse)(rawValue);
  14557. return _utils.default.trim(rawValue);
  14558. } catch (e) {
  14559. if (e.name !== 'SyntaxError') {
  14560. throw e;
  14561. }
  14562. }
  14563. }
  14564. return (encoder || JSON.stringify)(rawValue);
  14565. }
  14566. var defaults = {
  14567. transitional: _transitional.default,
  14568. adapter: ['xhr', 'http', 'fetch'],
  14569. transformRequest: [function transformRequest(data, headers) {
  14570. var contentType = headers.getContentType() || '';
  14571. var hasJSONContentType = contentType.indexOf('application/json') > -1;
  14572. var isObjectPayload = _utils.default.isObject(data);
  14573. if (isObjectPayload && _utils.default.isHTMLForm(data)) {
  14574. data = new FormData(data);
  14575. }
  14576. var isFormData = _utils.default.isFormData(data);
  14577. if (isFormData) {
  14578. return hasJSONContentType ? JSON.stringify((0, _formDataToJSON.default)(data)) : data;
  14579. }
  14580. if (_utils.default.isArrayBuffer(data) || _utils.default.isBuffer(data) || _utils.default.isStream(data) || _utils.default.isFile(data) || _utils.default.isBlob(data) || _utils.default.isReadableStream(data)) {
  14581. return data;
  14582. }
  14583. if (_utils.default.isArrayBufferView(data)) {
  14584. return data.buffer;
  14585. }
  14586. if (_utils.default.isURLSearchParams(data)) {
  14587. headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
  14588. return data.toString();
  14589. }
  14590. var isFileList;
  14591. if (isObjectPayload) {
  14592. if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
  14593. return (0, _toURLEncodedForm.default)(data, this.formSerializer).toString();
  14594. }
  14595. if ((isFileList = _utils.default.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
  14596. var _FormData = this.env && this.env.FormData;
  14597. return (0, _toFormData.default)(isFileList ? {
  14598. 'files[]': data
  14599. } : data, _FormData && new _FormData(), this.formSerializer);
  14600. }
  14601. }
  14602. if (isObjectPayload || hasJSONContentType) {
  14603. headers.setContentType('application/json', false);
  14604. return stringifySafely(data);
  14605. }
  14606. return data;
  14607. }],
  14608. transformResponse: [function transformResponse(data) {
  14609. var transitional = this.transitional || defaults.transitional;
  14610. var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
  14611. var JSONRequested = this.responseType === 'json';
  14612. if (_utils.default.isResponse(data) || _utils.default.isReadableStream(data)) {
  14613. return data;
  14614. }
  14615. if (data && _utils.default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
  14616. var silentJSONParsing = transitional && transitional.silentJSONParsing;
  14617. var strictJSONParsing = !silentJSONParsing && JSONRequested;
  14618. try {
  14619. return JSON.parse(data);
  14620. } catch (e) {
  14621. if (strictJSONParsing) {
  14622. if (e.name === 'SyntaxError') {
  14623. throw _AxiosError.default.from(e, _AxiosError.default.ERR_BAD_RESPONSE, this, null, this.response);
  14624. }
  14625. throw e;
  14626. }
  14627. }
  14628. }
  14629. return data;
  14630. }],
  14631. /**
  14632. * A timeout in milliseconds to abort a request. If set to 0 (default) a
  14633. * timeout is not created.
  14634. */
  14635. timeout: 0,
  14636. xsrfCookieName: 'XSRF-TOKEN',
  14637. xsrfHeaderName: 'X-XSRF-TOKEN',
  14638. maxContentLength: -1,
  14639. maxBodyLength: -1,
  14640. env: {
  14641. FormData: _index.default.classes.FormData,
  14642. Blob: _index.default.classes.Blob
  14643. },
  14644. validateStatus: function validateStatus(status) {
  14645. return status >= 200 && status < 300;
  14646. },
  14647. headers: {
  14648. common: {
  14649. 'Accept': 'application/json, text/plain, */*',
  14650. 'Content-Type': undefined
  14651. }
  14652. }
  14653. };
  14654. _utils.default.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], function (method) {
  14655. defaults.headers[method] = {};
  14656. });
  14657. var _default = defaults;
  14658. exports.default = _default;
  14659. /***/ }),
  14660. /* 80 */
  14661. /*!**********************************************************************************************!*\
  14662. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/defaults/transitional.js ***!
  14663. \**********************************************************************************************/
  14664. /*! no static exports found */
  14665. /***/ (function(module, exports, __webpack_require__) {
  14666. "use strict";
  14667. Object.defineProperty(exports, "__esModule", {
  14668. value: true
  14669. });
  14670. exports.default = void 0;
  14671. var _default = {
  14672. silentJSONParsing: true,
  14673. forcedJSONParsing: true,
  14674. clarifyTimeoutError: false
  14675. };
  14676. exports.default = _default;
  14677. /***/ }),
  14678. /* 81 */
  14679. /*!*************************************************************************************************!*\
  14680. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/toURLEncodedForm.js ***!
  14681. \*************************************************************************************************/
  14682. /*! no static exports found */
  14683. /***/ (function(module, exports, __webpack_require__) {
  14684. "use strict";
  14685. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14686. Object.defineProperty(exports, "__esModule", {
  14687. value: true
  14688. });
  14689. exports.default = toURLEncodedForm;
  14690. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 64));
  14691. var _toFormData = _interopRequireDefault(__webpack_require__(/*! ./toFormData.js */ 69));
  14692. var _index = _interopRequireDefault(__webpack_require__(/*! ../platform/index.js */ 82));
  14693. function toURLEncodedForm(data, options) {
  14694. return (0, _toFormData.default)(data, new _index.default.classes.URLSearchParams(), Object.assign({
  14695. visitor: function visitor(value, key, path, helpers) {
  14696. if (_index.default.isNode && _utils.default.isBuffer(value)) {
  14697. this.append(key, value.toString('base64'));
  14698. return false;
  14699. }
  14700. return helpers.defaultVisitor.apply(this, arguments);
  14701. }
  14702. }, options));
  14703. }
  14704. /***/ }),
  14705. /* 82 */
  14706. /*!***************************************************************************************!*\
  14707. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/platform/index.js ***!
  14708. \***************************************************************************************/
  14709. /*! no static exports found */
  14710. /***/ (function(module, exports, __webpack_require__) {
  14711. "use strict";
  14712. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14713. var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  14714. Object.defineProperty(exports, "__esModule", {
  14715. value: true
  14716. });
  14717. exports.default = void 0;
  14718. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  14719. var _index = _interopRequireDefault(__webpack_require__(/*! ./node/index.js */ 83));
  14720. var utils = _interopRequireWildcard(__webpack_require__(/*! ./common/utils.js */ 87));
  14721. function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
  14722. function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
  14723. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  14724. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  14725. var _default = _objectSpread(_objectSpread({}, utils), _index.default);
  14726. exports.default = _default;
  14727. /***/ }),
  14728. /* 83 */
  14729. /*!***********************************************************************************************!*\
  14730. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/platform/browser/index.js ***!
  14731. \***********************************************************************************************/
  14732. /*! no static exports found */
  14733. /***/ (function(module, exports, __webpack_require__) {
  14734. "use strict";
  14735. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14736. Object.defineProperty(exports, "__esModule", {
  14737. value: true
  14738. });
  14739. exports.default = void 0;
  14740. var _URLSearchParams = _interopRequireDefault(__webpack_require__(/*! ./classes/URLSearchParams.js */ 84));
  14741. var _FormData = _interopRequireDefault(__webpack_require__(/*! ./classes/FormData.js */ 85));
  14742. var _Blob = _interopRequireDefault(__webpack_require__(/*! ./classes/Blob.js */ 86));
  14743. var _default = {
  14744. isBrowser: true,
  14745. classes: {
  14746. URLSearchParams: _URLSearchParams.default,
  14747. FormData: _FormData.default,
  14748. Blob: _Blob.default
  14749. },
  14750. protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
  14751. };
  14752. exports.default = _default;
  14753. /***/ }),
  14754. /* 84 */
  14755. /*!*****************************************************************************************************************!*\
  14756. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js ***!
  14757. \*****************************************************************************************************************/
  14758. /*! no static exports found */
  14759. /***/ (function(module, exports, __webpack_require__) {
  14760. "use strict";
  14761. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14762. Object.defineProperty(exports, "__esModule", {
  14763. value: true
  14764. });
  14765. exports.default = void 0;
  14766. var _AxiosURLSearchParams = _interopRequireDefault(__webpack_require__(/*! ../../../helpers/AxiosURLSearchParams.js */ 68));
  14767. var _default = typeof URLSearchParams !== 'undefined' ? URLSearchParams : _AxiosURLSearchParams.default;
  14768. exports.default = _default;
  14769. /***/ }),
  14770. /* 85 */
  14771. /*!**********************************************************************************************************!*\
  14772. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/platform/browser/classes/FormData.js ***!
  14773. \**********************************************************************************************************/
  14774. /*! no static exports found */
  14775. /***/ (function(module, exports, __webpack_require__) {
  14776. "use strict";
  14777. Object.defineProperty(exports, "__esModule", {
  14778. value: true
  14779. });
  14780. exports.default = void 0;
  14781. var _default = typeof FormData !== 'undefined' ? FormData : null;
  14782. exports.default = _default;
  14783. /***/ }),
  14784. /* 86 */
  14785. /*!******************************************************************************************************!*\
  14786. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/platform/browser/classes/Blob.js ***!
  14787. \******************************************************************************************************/
  14788. /*! no static exports found */
  14789. /***/ (function(module, exports, __webpack_require__) {
  14790. "use strict";
  14791. Object.defineProperty(exports, "__esModule", {
  14792. value: true
  14793. });
  14794. exports.default = void 0;
  14795. var _default = typeof Blob !== 'undefined' ? Blob : null;
  14796. exports.default = _default;
  14797. /***/ }),
  14798. /* 87 */
  14799. /*!**********************************************************************************************!*\
  14800. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/platform/common/utils.js ***!
  14801. \**********************************************************************************************/
  14802. /*! no static exports found */
  14803. /***/ (function(module, exports, __webpack_require__) {
  14804. "use strict";
  14805. Object.defineProperty(exports, "__esModule", {
  14806. value: true
  14807. });
  14808. exports.origin = exports.hasStandardBrowserWebWorkerEnv = exports.hasStandardBrowserEnv = exports.hasBrowserEnv = void 0;
  14809. var hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
  14810. /**
  14811. * Determine if we're running in a standard browser environment
  14812. *
  14813. * This allows axios to run in a web worker, and react-native.
  14814. * Both environments support XMLHttpRequest, but not fully standard globals.
  14815. *
  14816. * web workers:
  14817. * typeof window -> undefined
  14818. * typeof document -> undefined
  14819. *
  14820. * react-native:
  14821. * navigator.product -> 'ReactNative'
  14822. * nativescript
  14823. * navigator.product -> 'NativeScript' or 'NS'
  14824. *
  14825. * @returns {boolean}
  14826. */
  14827. exports.hasBrowserEnv = hasBrowserEnv;
  14828. var hasStandardBrowserEnv = function (product) {
  14829. return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0;
  14830. }(typeof navigator !== 'undefined' && navigator.product);
  14831. /**
  14832. * Determine if we're running in a standard browser webWorker environment
  14833. *
  14834. * Although the `isStandardBrowserEnv` method indicates that
  14835. * `allows axios to run in a web worker`, the WebWorker will still be
  14836. * filtered out due to its judgment standard
  14837. * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
  14838. * This leads to a problem when axios post `FormData` in webWorker
  14839. */
  14840. exports.hasStandardBrowserEnv = hasStandardBrowserEnv;
  14841. var hasStandardBrowserWebWorkerEnv = function () {
  14842. return typeof WorkerGlobalScope !== 'undefined' &&
  14843. // eslint-disable-next-line no-undef
  14844. self instanceof WorkerGlobalScope && typeof self.importScripts === 'function';
  14845. }();
  14846. exports.hasStandardBrowserWebWorkerEnv = hasStandardBrowserWebWorkerEnv;
  14847. var origin = hasBrowserEnv && window.location.href || 'http://localhost';
  14848. exports.origin = origin;
  14849. /***/ }),
  14850. /* 88 */
  14851. /*!***********************************************************************************************!*\
  14852. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/formDataToJSON.js ***!
  14853. \***********************************************************************************************/
  14854. /*! no static exports found */
  14855. /***/ (function(module, exports, __webpack_require__) {
  14856. "use strict";
  14857. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14858. Object.defineProperty(exports, "__esModule", {
  14859. value: true
  14860. });
  14861. exports.default = void 0;
  14862. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 64));
  14863. /**
  14864. * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
  14865. *
  14866. * @param {string} name - The name of the property to get.
  14867. *
  14868. * @returns An array of strings.
  14869. */
  14870. function parsePropPath(name) {
  14871. // foo[x][y][z]
  14872. // foo.x.y.z
  14873. // foo-x-y-z
  14874. // foo x y z
  14875. return _utils.default.matchAll(/\w+|\[(\w*)]/g, name).map(function (match) {
  14876. return match[0] === '[]' ? '' : match[1] || match[0];
  14877. });
  14878. }
  14879. /**
  14880. * Convert an array to an object.
  14881. *
  14882. * @param {Array<any>} arr - The array to convert to an object.
  14883. *
  14884. * @returns An object with the same keys and values as the array.
  14885. */
  14886. function arrayToObject(arr) {
  14887. var obj = {};
  14888. var keys = Object.keys(arr);
  14889. var i;
  14890. var len = keys.length;
  14891. var key;
  14892. for (i = 0; i < len; i++) {
  14893. key = keys[i];
  14894. obj[key] = arr[key];
  14895. }
  14896. return obj;
  14897. }
  14898. /**
  14899. * It takes a FormData object and returns a JavaScript object
  14900. *
  14901. * @param {string} formData The FormData object to convert to JSON.
  14902. *
  14903. * @returns {Object<string, any> | null} The converted object.
  14904. */
  14905. function formDataToJSON(formData) {
  14906. function buildPath(path, value, target, index) {
  14907. var name = path[index++];
  14908. if (name === '__proto__') return true;
  14909. var isNumericKey = Number.isFinite(+name);
  14910. var isLast = index >= path.length;
  14911. name = !name && _utils.default.isArray(target) ? target.length : name;
  14912. if (isLast) {
  14913. if (_utils.default.hasOwnProp(target, name)) {
  14914. target[name] = [target[name], value];
  14915. } else {
  14916. target[name] = value;
  14917. }
  14918. return !isNumericKey;
  14919. }
  14920. if (!target[name] || !_utils.default.isObject(target[name])) {
  14921. target[name] = [];
  14922. }
  14923. var result = buildPath(path, value, target[name], index);
  14924. if (result && _utils.default.isArray(target[name])) {
  14925. target[name] = arrayToObject(target[name]);
  14926. }
  14927. return !isNumericKey;
  14928. }
  14929. if (_utils.default.isFormData(formData) && _utils.default.isFunction(formData.entries)) {
  14930. var obj = {};
  14931. _utils.default.forEachEntry(formData, function (name, value) {
  14932. buildPath(parsePropPath(name), value, obj, 0);
  14933. });
  14934. return obj;
  14935. }
  14936. return null;
  14937. }
  14938. var _default = formDataToJSON;
  14939. exports.default = _default;
  14940. /***/ }),
  14941. /* 89 */
  14942. /*!******************************************************************************************!*\
  14943. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/core/AxiosHeaders.js ***!
  14944. \******************************************************************************************/
  14945. /*! no static exports found */
  14946. /***/ (function(module, exports, __webpack_require__) {
  14947. "use strict";
  14948. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14949. Object.defineProperty(exports, "__esModule", {
  14950. value: true
  14951. });
  14952. exports.default = void 0;
  14953. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  14954. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  14955. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  14956. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 64));
  14957. var _parseHeaders = _interopRequireDefault(__webpack_require__(/*! ../helpers/parseHeaders.js */ 90));
  14958. function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  14959. 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); }
  14960. 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; }
  14961. var $internals = Symbol('internals');
  14962. function normalizeHeader(header) {
  14963. return header && String(header).trim().toLowerCase();
  14964. }
  14965. function normalizeValue(value) {
  14966. if (value === false || value == null) {
  14967. return value;
  14968. }
  14969. return _utils.default.isArray(value) ? value.map(normalizeValue) : String(value);
  14970. }
  14971. function parseTokens(str) {
  14972. var tokens = Object.create(null);
  14973. var tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
  14974. var match;
  14975. while (match = tokensRE.exec(str)) {
  14976. tokens[match[1]] = match[2];
  14977. }
  14978. return tokens;
  14979. }
  14980. var isValidHeaderName = function isValidHeaderName(str) {
  14981. return /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
  14982. };
  14983. function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
  14984. if (_utils.default.isFunction(filter)) {
  14985. return filter.call(this, value, header);
  14986. }
  14987. if (isHeaderNameFilter) {
  14988. value = header;
  14989. }
  14990. if (!_utils.default.isString(value)) return;
  14991. if (_utils.default.isString(filter)) {
  14992. return value.indexOf(filter) !== -1;
  14993. }
  14994. if (_utils.default.isRegExp(filter)) {
  14995. return filter.test(value);
  14996. }
  14997. }
  14998. function formatHeader(header) {
  14999. return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, function (w, char, str) {
  15000. return char.toUpperCase() + str;
  15001. });
  15002. }
  15003. function buildAccessors(obj, header) {
  15004. var accessorName = _utils.default.toCamelCase(' ' + header);
  15005. ['get', 'set', 'has'].forEach(function (methodName) {
  15006. Object.defineProperty(obj, methodName + accessorName, {
  15007. value: function value(arg1, arg2, arg3) {
  15008. return this[methodName].call(this, header, arg1, arg2, arg3);
  15009. },
  15010. configurable: true
  15011. });
  15012. });
  15013. }
  15014. var AxiosHeaders = /*#__PURE__*/function (_Symbol$iterator, _Symbol$toStringTag) {
  15015. function AxiosHeaders(headers) {
  15016. (0, _classCallCheck2.default)(this, AxiosHeaders);
  15017. headers && this.set(headers);
  15018. }
  15019. (0, _createClass2.default)(AxiosHeaders, [{
  15020. key: "set",
  15021. value: function set(header, valueOrRewrite, rewrite) {
  15022. var self = this;
  15023. function setHeader(_value, _header, _rewrite) {
  15024. var lHeader = normalizeHeader(_header);
  15025. if (!lHeader) {
  15026. throw new Error('header name must be a non-empty string');
  15027. }
  15028. var key = _utils.default.findKey(self, lHeader);
  15029. if (!key || self[key] === undefined || _rewrite === true || _rewrite === undefined && self[key] !== false) {
  15030. self[key || _header] = normalizeValue(_value);
  15031. }
  15032. }
  15033. var setHeaders = function setHeaders(headers, _rewrite) {
  15034. return _utils.default.forEach(headers, function (_value, _header) {
  15035. return setHeader(_value, _header, _rewrite);
  15036. });
  15037. };
  15038. if (_utils.default.isPlainObject(header) || header instanceof this.constructor) {
  15039. setHeaders(header, valueOrRewrite);
  15040. } else if (_utils.default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
  15041. setHeaders((0, _parseHeaders.default)(header), valueOrRewrite);
  15042. } else if (_utils.default.isHeaders(header)) {
  15043. var _iterator = _createForOfIteratorHelper(header.entries()),
  15044. _step;
  15045. try {
  15046. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  15047. var _step$value = (0, _slicedToArray2.default)(_step.value, 2),
  15048. key = _step$value[0],
  15049. value = _step$value[1];
  15050. setHeader(value, key, rewrite);
  15051. }
  15052. } catch (err) {
  15053. _iterator.e(err);
  15054. } finally {
  15055. _iterator.f();
  15056. }
  15057. } else {
  15058. header != null && setHeader(valueOrRewrite, header, rewrite);
  15059. }
  15060. return this;
  15061. }
  15062. }, {
  15063. key: "get",
  15064. value: function get(header, parser) {
  15065. header = normalizeHeader(header);
  15066. if (header) {
  15067. var key = _utils.default.findKey(this, header);
  15068. if (key) {
  15069. var value = this[key];
  15070. if (!parser) {
  15071. return value;
  15072. }
  15073. if (parser === true) {
  15074. return parseTokens(value);
  15075. }
  15076. if (_utils.default.isFunction(parser)) {
  15077. return parser.call(this, value, key);
  15078. }
  15079. if (_utils.default.isRegExp(parser)) {
  15080. return parser.exec(value);
  15081. }
  15082. throw new TypeError('parser must be boolean|regexp|function');
  15083. }
  15084. }
  15085. }
  15086. }, {
  15087. key: "has",
  15088. value: function has(header, matcher) {
  15089. header = normalizeHeader(header);
  15090. if (header) {
  15091. var key = _utils.default.findKey(this, header);
  15092. return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
  15093. }
  15094. return false;
  15095. }
  15096. }, {
  15097. key: "delete",
  15098. value: function _delete(header, matcher) {
  15099. var self = this;
  15100. var deleted = false;
  15101. function deleteHeader(_header) {
  15102. _header = normalizeHeader(_header);
  15103. if (_header) {
  15104. var key = _utils.default.findKey(self, _header);
  15105. if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
  15106. delete self[key];
  15107. deleted = true;
  15108. }
  15109. }
  15110. }
  15111. if (_utils.default.isArray(header)) {
  15112. header.forEach(deleteHeader);
  15113. } else {
  15114. deleteHeader(header);
  15115. }
  15116. return deleted;
  15117. }
  15118. }, {
  15119. key: "clear",
  15120. value: function clear(matcher) {
  15121. var keys = Object.keys(this);
  15122. var i = keys.length;
  15123. var deleted = false;
  15124. while (i--) {
  15125. var key = keys[i];
  15126. if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
  15127. delete this[key];
  15128. deleted = true;
  15129. }
  15130. }
  15131. return deleted;
  15132. }
  15133. }, {
  15134. key: "normalize",
  15135. value: function normalize(format) {
  15136. var self = this;
  15137. var headers = {};
  15138. _utils.default.forEach(this, function (value, header) {
  15139. var key = _utils.default.findKey(headers, header);
  15140. if (key) {
  15141. self[key] = normalizeValue(value);
  15142. delete self[header];
  15143. return;
  15144. }
  15145. var normalized = format ? formatHeader(header) : String(header).trim();
  15146. if (normalized !== header) {
  15147. delete self[header];
  15148. }
  15149. self[normalized] = normalizeValue(value);
  15150. headers[normalized] = true;
  15151. });
  15152. return this;
  15153. }
  15154. }, {
  15155. key: "concat",
  15156. value: function concat() {
  15157. var _this$constructor;
  15158. for (var _len = arguments.length, targets = new Array(_len), _key = 0; _key < _len; _key++) {
  15159. targets[_key] = arguments[_key];
  15160. }
  15161. return (_this$constructor = this.constructor).concat.apply(_this$constructor, [this].concat(targets));
  15162. }
  15163. }, {
  15164. key: "toJSON",
  15165. value: function toJSON(asStrings) {
  15166. var obj = Object.create(null);
  15167. _utils.default.forEach(this, function (value, header) {
  15168. value != null && value !== false && (obj[header] = asStrings && _utils.default.isArray(value) ? value.join(', ') : value);
  15169. });
  15170. return obj;
  15171. }
  15172. }, {
  15173. key: _Symbol$iterator,
  15174. value: function value() {
  15175. return Object.entries(this.toJSON())[Symbol.iterator]();
  15176. }
  15177. }, {
  15178. key: "toString",
  15179. value: function toString() {
  15180. return Object.entries(this.toJSON()).map(function (_ref) {
  15181. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  15182. header = _ref2[0],
  15183. value = _ref2[1];
  15184. return header + ': ' + value;
  15185. }).join('\n');
  15186. }
  15187. }, {
  15188. key: _Symbol$toStringTag,
  15189. get: function get() {
  15190. return 'AxiosHeaders';
  15191. }
  15192. }], [{
  15193. key: "from",
  15194. value: function from(thing) {
  15195. return thing instanceof this ? thing : new this(thing);
  15196. }
  15197. }, {
  15198. key: "concat",
  15199. value: function concat(first) {
  15200. var computed = new this(first);
  15201. for (var _len2 = arguments.length, targets = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  15202. targets[_key2 - 1] = arguments[_key2];
  15203. }
  15204. targets.forEach(function (target) {
  15205. return computed.set(target);
  15206. });
  15207. return computed;
  15208. }
  15209. }, {
  15210. key: "accessor",
  15211. value: function accessor(header) {
  15212. var internals = this[$internals] = this[$internals] = {
  15213. accessors: {}
  15214. };
  15215. var accessors = internals.accessors;
  15216. var prototype = this.prototype;
  15217. function defineAccessor(_header) {
  15218. var lHeader = normalizeHeader(_header);
  15219. if (!accessors[lHeader]) {
  15220. buildAccessors(prototype, _header);
  15221. accessors[lHeader] = true;
  15222. }
  15223. }
  15224. _utils.default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
  15225. return this;
  15226. }
  15227. }]);
  15228. return AxiosHeaders;
  15229. }(Symbol.iterator, Symbol.toStringTag);
  15230. AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
  15231. // reserved names hotfix
  15232. _utils.default.reduceDescriptors(AxiosHeaders.prototype, function (_ref3, key) {
  15233. var value = _ref3.value;
  15234. var mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
  15235. return {
  15236. get: function get() {
  15237. return value;
  15238. },
  15239. set: function set(headerValue) {
  15240. this[mapped] = headerValue;
  15241. }
  15242. };
  15243. });
  15244. _utils.default.freezeMethods(AxiosHeaders);
  15245. var _default = AxiosHeaders;
  15246. exports.default = _default;
  15247. /***/ }),
  15248. /* 90 */
  15249. /*!*********************************************************************************************!*\
  15250. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/parseHeaders.js ***!
  15251. \*********************************************************************************************/
  15252. /*! no static exports found */
  15253. /***/ (function(module, exports, __webpack_require__) {
  15254. "use strict";
  15255. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15256. Object.defineProperty(exports, "__esModule", {
  15257. value: true
  15258. });
  15259. exports.default = void 0;
  15260. var _utils = _interopRequireDefault(__webpack_require__(/*! ./../utils.js */ 64));
  15261. // RawAxiosHeaders whose duplicates are ignored by node
  15262. // c.f. https://nodejs.org/api/http.html#http_message_headers
  15263. var ignoreDuplicateOf = _utils.default.toObjectSet(['age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent']);
  15264. /**
  15265. * Parse headers into an object
  15266. *
  15267. * ```
  15268. * Date: Wed, 27 Aug 2014 08:58:49 GMT
  15269. * Content-Type: application/json
  15270. * Connection: keep-alive
  15271. * Transfer-Encoding: chunked
  15272. * ```
  15273. *
  15274. * @param {String} rawHeaders Headers needing to be parsed
  15275. *
  15276. * @returns {Object} Headers parsed into an object
  15277. */
  15278. var _default = function _default(rawHeaders) {
  15279. var parsed = {};
  15280. var key;
  15281. var val;
  15282. var i;
  15283. rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
  15284. i = line.indexOf(':');
  15285. key = line.substring(0, i).trim().toLowerCase();
  15286. val = line.substring(i + 1).trim();
  15287. if (!key || parsed[key] && ignoreDuplicateOf[key]) {
  15288. return;
  15289. }
  15290. if (key === 'set-cookie') {
  15291. if (parsed[key]) {
  15292. parsed[key].push(val);
  15293. } else {
  15294. parsed[key] = [val];
  15295. }
  15296. } else {
  15297. parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
  15298. }
  15299. });
  15300. return parsed;
  15301. };
  15302. exports.default = _default;
  15303. /***/ }),
  15304. /* 91 */
  15305. /*!****************************************************************************************!*\
  15306. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/cancel/isCancel.js ***!
  15307. \****************************************************************************************/
  15308. /*! no static exports found */
  15309. /***/ (function(module, exports, __webpack_require__) {
  15310. "use strict";
  15311. Object.defineProperty(exports, "__esModule", {
  15312. value: true
  15313. });
  15314. exports.default = isCancel;
  15315. function isCancel(value) {
  15316. return !!(value && value.__CANCEL__);
  15317. }
  15318. /***/ }),
  15319. /* 92 */
  15320. /*!*********************************************************************************************!*\
  15321. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/cancel/CanceledError.js ***!
  15322. \*********************************************************************************************/
  15323. /*! no static exports found */
  15324. /***/ (function(module, exports, __webpack_require__) {
  15325. "use strict";
  15326. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15327. Object.defineProperty(exports, "__esModule", {
  15328. value: true
  15329. });
  15330. exports.default = void 0;
  15331. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosError.js */ 74));
  15332. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 64));
  15333. /**
  15334. * A `CanceledError` is an object that is thrown when an operation is canceled.
  15335. *
  15336. * @param {string=} message The message.
  15337. * @param {Object=} config The config.
  15338. * @param {Object=} request The request.
  15339. *
  15340. * @returns {CanceledError} The created error.
  15341. */
  15342. function CanceledError(message, config, request) {
  15343. // eslint-disable-next-line no-eq-null,eqeqeq
  15344. _AxiosError.default.call(this, message == null ? 'canceled' : message, _AxiosError.default.ERR_CANCELED, config, request);
  15345. this.name = 'CanceledError';
  15346. }
  15347. _utils.default.inherits(CanceledError, _AxiosError.default, {
  15348. __CANCEL__: true
  15349. });
  15350. var _default = CanceledError;
  15351. exports.default = _default;
  15352. /***/ }),
  15353. /* 93 */
  15354. /*!******************************************************************************************!*\
  15355. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/adapters/adapters.js ***!
  15356. \******************************************************************************************/
  15357. /*! no static exports found */
  15358. /***/ (function(module, exports, __webpack_require__) {
  15359. "use strict";
  15360. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15361. Object.defineProperty(exports, "__esModule", {
  15362. value: true
  15363. });
  15364. exports.default = void 0;
  15365. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  15366. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 64));
  15367. var _http = _interopRequireDefault(__webpack_require__(/*! ./http.js */ 75));
  15368. var _xhr = _interopRequireDefault(__webpack_require__(/*! ./xhr.js */ 94));
  15369. var _fetch = _interopRequireDefault(__webpack_require__(/*! ./fetch.js */ 108));
  15370. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosError.js */ 74));
  15371. var knownAdapters = {
  15372. http: _http.default,
  15373. xhr: _xhr.default,
  15374. fetch: _fetch.default
  15375. };
  15376. _utils.default.forEach(knownAdapters, function (fn, value) {
  15377. if (fn) {
  15378. try {
  15379. Object.defineProperty(fn, 'name', {
  15380. value: value
  15381. });
  15382. } catch (e) {
  15383. // eslint-disable-next-line no-empty
  15384. }
  15385. Object.defineProperty(fn, 'adapterName', {
  15386. value: value
  15387. });
  15388. }
  15389. });
  15390. var renderReason = function renderReason(reason) {
  15391. return "- ".concat(reason);
  15392. };
  15393. var isResolvedHandle = function isResolvedHandle(adapter) {
  15394. return _utils.default.isFunction(adapter) || adapter === null || adapter === false;
  15395. };
  15396. var _default = {
  15397. getAdapter: function getAdapter(adapters) {
  15398. adapters = _utils.default.isArray(adapters) ? adapters : [adapters];
  15399. var _adapters = adapters,
  15400. length = _adapters.length;
  15401. var nameOrAdapter;
  15402. var adapter;
  15403. var rejectedReasons = {};
  15404. for (var i = 0; i < length; i++) {
  15405. nameOrAdapter = adapters[i];
  15406. var id = void 0;
  15407. adapter = nameOrAdapter;
  15408. if (!isResolvedHandle(nameOrAdapter)) {
  15409. adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
  15410. if (adapter === undefined) {
  15411. throw new _AxiosError.default("Unknown adapter '".concat(id, "'"));
  15412. }
  15413. }
  15414. if (adapter) {
  15415. break;
  15416. }
  15417. rejectedReasons[id || '#' + i] = adapter;
  15418. }
  15419. if (!adapter) {
  15420. var reasons = Object.entries(rejectedReasons).map(function (_ref) {
  15421. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  15422. id = _ref2[0],
  15423. state = _ref2[1];
  15424. return "adapter ".concat(id, " ") + (state === false ? 'is not supported by the environment' : 'is not available in the build');
  15425. });
  15426. var s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
  15427. throw new _AxiosError.default("There is no suitable adapter to dispatch the request " + s, 'ERR_NOT_SUPPORT');
  15428. }
  15429. return adapter;
  15430. },
  15431. adapters: knownAdapters
  15432. };
  15433. exports.default = _default;
  15434. /***/ }),
  15435. /* 94 */
  15436. /*!*************************************************************************************!*\
  15437. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/adapters/xhr.js ***!
  15438. \*************************************************************************************/
  15439. /*! no static exports found */
  15440. /***/ (function(module, exports, __webpack_require__) {
  15441. "use strict";
  15442. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15443. Object.defineProperty(exports, "__esModule", {
  15444. value: true
  15445. });
  15446. exports.default = void 0;
  15447. var _utils = _interopRequireDefault(__webpack_require__(/*! ./../utils.js */ 64));
  15448. var _settle = _interopRequireDefault(__webpack_require__(/*! ./../core/settle.js */ 95));
  15449. var _transitional = _interopRequireDefault(__webpack_require__(/*! ../defaults/transitional.js */ 80));
  15450. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosError.js */ 74));
  15451. var _CanceledError = _interopRequireDefault(__webpack_require__(/*! ../cancel/CanceledError.js */ 92));
  15452. var _parseProtocol = _interopRequireDefault(__webpack_require__(/*! ../helpers/parseProtocol.js */ 96));
  15453. var _index = _interopRequireDefault(__webpack_require__(/*! ../platform/index.js */ 82));
  15454. var _AxiosHeaders = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosHeaders.js */ 89));
  15455. var _progressEventReducer = _interopRequireDefault(__webpack_require__(/*! ../helpers/progressEventReducer.js */ 97));
  15456. var _resolveConfig = _interopRequireDefault(__webpack_require__(/*! ../helpers/resolveConfig.js */ 100));
  15457. var isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
  15458. var _default = isXHRAdapterSupported && function (config) {
  15459. return new Promise(function dispatchXhrRequest(resolve, reject) {
  15460. var _config = (0, _resolveConfig.default)(config);
  15461. var requestData = _config.data;
  15462. var requestHeaders = _AxiosHeaders.default.from(_config.headers).normalize();
  15463. var responseType = _config.responseType;
  15464. var onCanceled;
  15465. function done() {
  15466. if (_config.cancelToken) {
  15467. _config.cancelToken.unsubscribe(onCanceled);
  15468. }
  15469. if (_config.signal) {
  15470. _config.signal.removeEventListener('abort', onCanceled);
  15471. }
  15472. }
  15473. var request = new XMLHttpRequest();
  15474. request.open(_config.method.toUpperCase(), _config.url, true);
  15475. // Set the request timeout in MS
  15476. request.timeout = _config.timeout;
  15477. function onloadend() {
  15478. if (!request) {
  15479. return;
  15480. }
  15481. // Prepare the response
  15482. var responseHeaders = _AxiosHeaders.default.from('getAllResponseHeaders' in request && request.getAllResponseHeaders());
  15483. var responseData = !responseType || responseType === 'text' || responseType === 'json' ? request.responseText : request.response;
  15484. var response = {
  15485. data: responseData,
  15486. status: request.status,
  15487. statusText: request.statusText,
  15488. headers: responseHeaders,
  15489. config: config,
  15490. request: request
  15491. };
  15492. (0, _settle.default)(function _resolve(value) {
  15493. resolve(value);
  15494. done();
  15495. }, function _reject(err) {
  15496. reject(err);
  15497. done();
  15498. }, response);
  15499. // Clean up request
  15500. request = null;
  15501. }
  15502. if ('onloadend' in request) {
  15503. // Use onloadend if available
  15504. request.onloadend = onloadend;
  15505. } else {
  15506. // Listen for ready state to emulate onloadend
  15507. request.onreadystatechange = function handleLoad() {
  15508. if (!request || request.readyState !== 4) {
  15509. return;
  15510. }
  15511. // The request errored out and we didn't get a response, this will be
  15512. // handled by onerror instead
  15513. // With one exception: request that using file: protocol, most browsers
  15514. // will return status as 0 even though it's a successful request
  15515. if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
  15516. return;
  15517. }
  15518. // readystate handler is calling before onerror or ontimeout handlers,
  15519. // so we should call onloadend on the next 'tick'
  15520. setTimeout(onloadend);
  15521. };
  15522. }
  15523. // Handle browser request cancellation (as opposed to a manual cancellation)
  15524. request.onabort = function handleAbort() {
  15525. if (!request) {
  15526. return;
  15527. }
  15528. reject(new _AxiosError.default('Request aborted', _AxiosError.default.ECONNABORTED, _config, request));
  15529. // Clean up request
  15530. request = null;
  15531. };
  15532. // Handle low level network errors
  15533. request.onerror = function handleError() {
  15534. // Real errors are hidden from us by the browser
  15535. // onerror should only fire if it's a network error
  15536. reject(new _AxiosError.default('Network Error', _AxiosError.default.ERR_NETWORK, _config, request));
  15537. // Clean up request
  15538. request = null;
  15539. };
  15540. // Handle timeout
  15541. request.ontimeout = function handleTimeout() {
  15542. var timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
  15543. var transitional = _config.transitional || _transitional.default;
  15544. if (_config.timeoutErrorMessage) {
  15545. timeoutErrorMessage = _config.timeoutErrorMessage;
  15546. }
  15547. reject(new _AxiosError.default(timeoutErrorMessage, transitional.clarifyTimeoutError ? _AxiosError.default.ETIMEDOUT : _AxiosError.default.ECONNABORTED, _config, request));
  15548. // Clean up request
  15549. request = null;
  15550. };
  15551. // Remove Content-Type if data is undefined
  15552. requestData === undefined && requestHeaders.setContentType(null);
  15553. // Add headers to the request
  15554. if ('setRequestHeader' in request) {
  15555. _utils.default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
  15556. request.setRequestHeader(key, val);
  15557. });
  15558. }
  15559. // Add withCredentials to request if needed
  15560. if (!_utils.default.isUndefined(_config.withCredentials)) {
  15561. request.withCredentials = !!_config.withCredentials;
  15562. }
  15563. // Add responseType to request if needed
  15564. if (responseType && responseType !== 'json') {
  15565. request.responseType = _config.responseType;
  15566. }
  15567. // Handle progress if needed
  15568. if (typeof _config.onDownloadProgress === 'function') {
  15569. request.addEventListener('progress', (0, _progressEventReducer.default)(_config.onDownloadProgress, true));
  15570. }
  15571. // Not all browsers support upload events
  15572. if (typeof _config.onUploadProgress === 'function' && request.upload) {
  15573. request.upload.addEventListener('progress', (0, _progressEventReducer.default)(_config.onUploadProgress));
  15574. }
  15575. if (_config.cancelToken || _config.signal) {
  15576. // Handle cancellation
  15577. // eslint-disable-next-line func-names
  15578. onCanceled = function onCanceled(cancel) {
  15579. if (!request) {
  15580. return;
  15581. }
  15582. reject(!cancel || cancel.type ? new _CanceledError.default(null, config, request) : cancel);
  15583. request.abort();
  15584. request = null;
  15585. };
  15586. _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
  15587. if (_config.signal) {
  15588. _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
  15589. }
  15590. }
  15591. var protocol = (0, _parseProtocol.default)(_config.url);
  15592. if (protocol && _index.default.protocols.indexOf(protocol) === -1) {
  15593. reject(new _AxiosError.default('Unsupported protocol ' + protocol + ':', _AxiosError.default.ERR_BAD_REQUEST, config));
  15594. return;
  15595. }
  15596. // Send the request
  15597. request.send(requestData || null);
  15598. });
  15599. };
  15600. exports.default = _default;
  15601. /***/ }),
  15602. /* 95 */
  15603. /*!************************************************************************************!*\
  15604. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/core/settle.js ***!
  15605. \************************************************************************************/
  15606. /*! no static exports found */
  15607. /***/ (function(module, exports, __webpack_require__) {
  15608. "use strict";
  15609. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15610. Object.defineProperty(exports, "__esModule", {
  15611. value: true
  15612. });
  15613. exports.default = settle;
  15614. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ./AxiosError.js */ 74));
  15615. /**
  15616. * Resolve or reject a Promise based on response status.
  15617. *
  15618. * @param {Function} resolve A function that resolves the promise.
  15619. * @param {Function} reject A function that rejects the promise.
  15620. * @param {object} response The response.
  15621. *
  15622. * @returns {object} The response.
  15623. */
  15624. function settle(resolve, reject, response) {
  15625. var validateStatus = response.config.validateStatus;
  15626. if (!response.status || !validateStatus || validateStatus(response.status)) {
  15627. resolve(response);
  15628. } else {
  15629. reject(new _AxiosError.default('Request failed with status code ' + response.status, [_AxiosError.default.ERR_BAD_REQUEST, _AxiosError.default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
  15630. }
  15631. }
  15632. /***/ }),
  15633. /* 96 */
  15634. /*!**********************************************************************************************!*\
  15635. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/parseProtocol.js ***!
  15636. \**********************************************************************************************/
  15637. /*! no static exports found */
  15638. /***/ (function(module, exports, __webpack_require__) {
  15639. "use strict";
  15640. Object.defineProperty(exports, "__esModule", {
  15641. value: true
  15642. });
  15643. exports.default = parseProtocol;
  15644. function parseProtocol(url) {
  15645. var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
  15646. return match && match[1] || '';
  15647. }
  15648. /***/ }),
  15649. /* 97 */
  15650. /*!*****************************************************************************************************!*\
  15651. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/progressEventReducer.js ***!
  15652. \*****************************************************************************************************/
  15653. /*! no static exports found */
  15654. /***/ (function(module, exports, __webpack_require__) {
  15655. "use strict";
  15656. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15657. Object.defineProperty(exports, "__esModule", {
  15658. value: true
  15659. });
  15660. exports.default = void 0;
  15661. var _speedometer2 = _interopRequireDefault(__webpack_require__(/*! ./speedometer.js */ 98));
  15662. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./throttle.js */ 99));
  15663. var _default = function _default(listener, isDownloadStream) {
  15664. var freq = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
  15665. var bytesNotified = 0;
  15666. var _speedometer = (0, _speedometer2.default)(50, 250);
  15667. return (0, _throttle.default)(function (e) {
  15668. var loaded = e.loaded;
  15669. var total = e.lengthComputable ? e.total : undefined;
  15670. var progressBytes = loaded - bytesNotified;
  15671. var rate = _speedometer(progressBytes);
  15672. var inRange = loaded <= total;
  15673. bytesNotified = loaded;
  15674. var data = {
  15675. loaded: loaded,
  15676. total: total,
  15677. progress: total ? loaded / total : undefined,
  15678. bytes: progressBytes,
  15679. rate: rate ? rate : undefined,
  15680. estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
  15681. event: e,
  15682. lengthComputable: total != null
  15683. };
  15684. data[isDownloadStream ? 'download' : 'upload'] = true;
  15685. listener(data);
  15686. }, freq);
  15687. };
  15688. exports.default = _default;
  15689. /***/ }),
  15690. /* 98 */
  15691. /*!********************************************************************************************!*\
  15692. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/speedometer.js ***!
  15693. \********************************************************************************************/
  15694. /*! no static exports found */
  15695. /***/ (function(module, exports, __webpack_require__) {
  15696. "use strict";
  15697. /**
  15698. * Calculate data maxRate
  15699. * @param {Number} [samplesCount= 10]
  15700. * @param {Number} [min= 1000]
  15701. * @returns {Function}
  15702. */
  15703. Object.defineProperty(exports, "__esModule", {
  15704. value: true
  15705. });
  15706. exports.default = void 0;
  15707. function speedometer(samplesCount, min) {
  15708. samplesCount = samplesCount || 10;
  15709. var bytes = new Array(samplesCount);
  15710. var timestamps = new Array(samplesCount);
  15711. var head = 0;
  15712. var tail = 0;
  15713. var firstSampleTS;
  15714. min = min !== undefined ? min : 1000;
  15715. return function push(chunkLength) {
  15716. var now = Date.now();
  15717. var startedAt = timestamps[tail];
  15718. if (!firstSampleTS) {
  15719. firstSampleTS = now;
  15720. }
  15721. bytes[head] = chunkLength;
  15722. timestamps[head] = now;
  15723. var i = tail;
  15724. var bytesCount = 0;
  15725. while (i !== head) {
  15726. bytesCount += bytes[i++];
  15727. i = i % samplesCount;
  15728. }
  15729. head = (head + 1) % samplesCount;
  15730. if (head === tail) {
  15731. tail = (tail + 1) % samplesCount;
  15732. }
  15733. if (now - firstSampleTS < min) {
  15734. return;
  15735. }
  15736. var passed = startedAt && now - startedAt;
  15737. return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
  15738. };
  15739. }
  15740. var _default = speedometer;
  15741. exports.default = _default;
  15742. /***/ }),
  15743. /* 99 */
  15744. /*!*****************************************************************************************!*\
  15745. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/throttle.js ***!
  15746. \*****************************************************************************************/
  15747. /*! no static exports found */
  15748. /***/ (function(module, exports, __webpack_require__) {
  15749. "use strict";
  15750. /**
  15751. * Throttle decorator
  15752. * @param {Function} fn
  15753. * @param {Number} freq
  15754. * @return {Function}
  15755. */
  15756. Object.defineProperty(exports, "__esModule", {
  15757. value: true
  15758. });
  15759. exports.default = void 0;
  15760. function throttle(fn, freq) {
  15761. var timestamp = 0;
  15762. var threshold = 1000 / freq;
  15763. var timer = null;
  15764. return function throttled() {
  15765. var _arguments = arguments;
  15766. var force = this === true;
  15767. var now = Date.now();
  15768. if (force || now - timestamp > threshold) {
  15769. if (timer) {
  15770. clearTimeout(timer);
  15771. timer = null;
  15772. }
  15773. timestamp = now;
  15774. return fn.apply(null, arguments);
  15775. }
  15776. if (!timer) {
  15777. timer = setTimeout(function () {
  15778. timer = null;
  15779. timestamp = Date.now();
  15780. return fn.apply(null, _arguments);
  15781. }, threshold - (now - timestamp));
  15782. }
  15783. };
  15784. }
  15785. var _default = throttle;
  15786. exports.default = _default;
  15787. /***/ }),
  15788. /* 100 */
  15789. /*!**********************************************************************************************!*\
  15790. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/resolveConfig.js ***!
  15791. \**********************************************************************************************/
  15792. /*! no static exports found */
  15793. /***/ (function(module, exports, __webpack_require__) {
  15794. "use strict";
  15795. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15796. Object.defineProperty(exports, "__esModule", {
  15797. value: true
  15798. });
  15799. exports.default = void 0;
  15800. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  15801. var _toArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toArray */ 101));
  15802. var _index = _interopRequireDefault(__webpack_require__(/*! ../platform/index.js */ 82));
  15803. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 64));
  15804. var _isURLSameOrigin = _interopRequireDefault(__webpack_require__(/*! ./isURLSameOrigin.js */ 102));
  15805. var _cookies = _interopRequireDefault(__webpack_require__(/*! ./cookies.js */ 103));
  15806. var _buildFullPath = _interopRequireDefault(__webpack_require__(/*! ../core/buildFullPath.js */ 104));
  15807. var _mergeConfig = _interopRequireDefault(__webpack_require__(/*! ../core/mergeConfig.js */ 107));
  15808. var _AxiosHeaders = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosHeaders.js */ 89));
  15809. var _buildURL = _interopRequireDefault(__webpack_require__(/*! ./buildURL.js */ 67));
  15810. var _default = function _default(config) {
  15811. var newConfig = (0, _mergeConfig.default)({}, config);
  15812. var data = newConfig.data,
  15813. withXSRFToken = newConfig.withXSRFToken,
  15814. xsrfHeaderName = newConfig.xsrfHeaderName,
  15815. xsrfCookieName = newConfig.xsrfCookieName,
  15816. headers = newConfig.headers,
  15817. auth = newConfig.auth;
  15818. newConfig.headers = headers = _AxiosHeaders.default.from(headers);
  15819. newConfig.url = (0, _buildURL.default)((0, _buildFullPath.default)(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
  15820. // HTTP basic authentication
  15821. if (auth) {
  15822. headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')));
  15823. }
  15824. var contentType;
  15825. if (_utils.default.isFormData(data)) {
  15826. if (_index.default.hasStandardBrowserEnv || _index.default.hasStandardBrowserWebWorkerEnv) {
  15827. headers.setContentType(undefined); // Let the browser set it
  15828. } else if ((contentType = headers.getContentType()) !== false) {
  15829. // fix semicolon duplication issue for ReactNative FormData implementation
  15830. var _ref = contentType ? contentType.split(';').map(function (token) {
  15831. return token.trim();
  15832. }).filter(Boolean) : [],
  15833. _ref2 = (0, _toArray2.default)(_ref),
  15834. type = _ref2[0],
  15835. tokens = _ref2.slice(1);
  15836. headers.setContentType([type || 'multipart/form-data'].concat((0, _toConsumableArray2.default)(tokens)).join('; '));
  15837. }
  15838. }
  15839. // Add xsrf header
  15840. // This is only done if running in a standard browser environment.
  15841. // Specifically not if we're in a web worker, or react-native.
  15842. if (_index.default.hasStandardBrowserEnv) {
  15843. withXSRFToken && _utils.default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
  15844. if (withXSRFToken || withXSRFToken !== false && (0, _isURLSameOrigin.default)(newConfig.url)) {
  15845. // Add xsrf header
  15846. var xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies.default.read(xsrfCookieName);
  15847. if (xsrfValue) {
  15848. headers.set(xsrfHeaderName, xsrfValue);
  15849. }
  15850. }
  15851. }
  15852. return newConfig;
  15853. };
  15854. exports.default = _default;
  15855. /***/ }),
  15856. /* 101 */
  15857. /*!********************************************************!*\
  15858. !*** ./node_modules/@babel/runtime/helpers/toArray.js ***!
  15859. \********************************************************/
  15860. /*! no static exports found */
  15861. /***/ (function(module, exports, __webpack_require__) {
  15862. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  15863. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  15864. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  15865. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  15866. function _toArray(arr) {
  15867. return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();
  15868. }
  15869. module.exports = _toArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  15870. /***/ }),
  15871. /* 102 */
  15872. /*!************************************************************************************************!*\
  15873. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/isURLSameOrigin.js ***!
  15874. \************************************************************************************************/
  15875. /*! no static exports found */
  15876. /***/ (function(module, exports, __webpack_require__) {
  15877. "use strict";
  15878. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15879. Object.defineProperty(exports, "__esModule", {
  15880. value: true
  15881. });
  15882. exports.default = void 0;
  15883. var _utils = _interopRequireDefault(__webpack_require__(/*! ./../utils.js */ 64));
  15884. var _index = _interopRequireDefault(__webpack_require__(/*! ../platform/index.js */ 82));
  15885. var _default = _index.default.hasStandardBrowserEnv ?
  15886. // Standard browser envs have full support of the APIs needed to test
  15887. // whether the request URL is of the same origin as current location.
  15888. function standardBrowserEnv() {
  15889. var msie = /(msie|trident)/i.test(navigator.userAgent);
  15890. var urlParsingNode = document.createElement('a');
  15891. var originURL;
  15892. /**
  15893. * Parse a URL to discover its components
  15894. *
  15895. * @param {String} url The URL to be parsed
  15896. * @returns {Object}
  15897. */
  15898. function resolveURL(url) {
  15899. var href = url;
  15900. if (msie) {
  15901. // IE needs attribute set twice to normalize properties
  15902. urlParsingNode.setAttribute('href', href);
  15903. href = urlParsingNode.href;
  15904. }
  15905. urlParsingNode.setAttribute('href', href);
  15906. // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
  15907. return {
  15908. href: urlParsingNode.href,
  15909. protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
  15910. host: urlParsingNode.host,
  15911. search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
  15912. hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
  15913. hostname: urlParsingNode.hostname,
  15914. port: urlParsingNode.port,
  15915. pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname
  15916. };
  15917. }
  15918. originURL = resolveURL(window.location.href);
  15919. /**
  15920. * Determine if a URL shares the same origin as the current location
  15921. *
  15922. * @param {String} requestURL The URL to test
  15923. * @returns {boolean} True if URL shares the same origin, otherwise false
  15924. */
  15925. return function isURLSameOrigin(requestURL) {
  15926. var parsed = _utils.default.isString(requestURL) ? resolveURL(requestURL) : requestURL;
  15927. return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
  15928. };
  15929. }() :
  15930. // Non standard browser envs (web workers, react-native) lack needed support.
  15931. function nonStandardBrowserEnv() {
  15932. return function isURLSameOrigin() {
  15933. return true;
  15934. };
  15935. }();
  15936. exports.default = _default;
  15937. /***/ }),
  15938. /* 103 */
  15939. /*!****************************************************************************************!*\
  15940. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/cookies.js ***!
  15941. \****************************************************************************************/
  15942. /*! no static exports found */
  15943. /***/ (function(module, exports, __webpack_require__) {
  15944. "use strict";
  15945. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15946. Object.defineProperty(exports, "__esModule", {
  15947. value: true
  15948. });
  15949. exports.default = void 0;
  15950. var _utils = _interopRequireDefault(__webpack_require__(/*! ./../utils.js */ 64));
  15951. var _index = _interopRequireDefault(__webpack_require__(/*! ../platform/index.js */ 82));
  15952. var _default = _index.default.hasStandardBrowserEnv ?
  15953. // Standard browser envs support document.cookie
  15954. {
  15955. write: function write(name, value, expires, path, domain, secure) {
  15956. var cookie = [name + '=' + encodeURIComponent(value)];
  15957. _utils.default.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
  15958. _utils.default.isString(path) && cookie.push('path=' + path);
  15959. _utils.default.isString(domain) && cookie.push('domain=' + domain);
  15960. secure === true && cookie.push('secure');
  15961. document.cookie = cookie.join('; ');
  15962. },
  15963. read: function read(name) {
  15964. var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
  15965. return match ? decodeURIComponent(match[3]) : null;
  15966. },
  15967. remove: function remove(name) {
  15968. this.write(name, '', Date.now() - 86400000);
  15969. }
  15970. } :
  15971. // Non-standard browser env (web workers, react-native) lack needed support.
  15972. {
  15973. write: function write() {},
  15974. read: function read() {
  15975. return null;
  15976. },
  15977. remove: function remove() {}
  15978. };
  15979. exports.default = _default;
  15980. /***/ }),
  15981. /* 104 */
  15982. /*!*******************************************************************************************!*\
  15983. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/core/buildFullPath.js ***!
  15984. \*******************************************************************************************/
  15985. /*! no static exports found */
  15986. /***/ (function(module, exports, __webpack_require__) {
  15987. "use strict";
  15988. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15989. Object.defineProperty(exports, "__esModule", {
  15990. value: true
  15991. });
  15992. exports.default = buildFullPath;
  15993. var _isAbsoluteURL = _interopRequireDefault(__webpack_require__(/*! ../helpers/isAbsoluteURL.js */ 105));
  15994. var _combineURLs = _interopRequireDefault(__webpack_require__(/*! ../helpers/combineURLs.js */ 106));
  15995. /**
  15996. * Creates a new URL by combining the baseURL with the requestedURL,
  15997. * only when the requestedURL is not already an absolute URL.
  15998. * If the requestURL is absolute, this function returns the requestedURL untouched.
  15999. *
  16000. * @param {string} baseURL The base URL
  16001. * @param {string} requestedURL Absolute or relative URL to combine
  16002. *
  16003. * @returns {string} The combined full path
  16004. */
  16005. function buildFullPath(baseURL, requestedURL) {
  16006. if (baseURL && !(0, _isAbsoluteURL.default)(requestedURL)) {
  16007. return (0, _combineURLs.default)(baseURL, requestedURL);
  16008. }
  16009. return requestedURL;
  16010. }
  16011. /***/ }),
  16012. /* 105 */
  16013. /*!**********************************************************************************************!*\
  16014. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/isAbsoluteURL.js ***!
  16015. \**********************************************************************************************/
  16016. /*! no static exports found */
  16017. /***/ (function(module, exports, __webpack_require__) {
  16018. "use strict";
  16019. /**
  16020. * Determines whether the specified URL is absolute
  16021. *
  16022. * @param {string} url The URL to test
  16023. *
  16024. * @returns {boolean} True if the specified URL is absolute, otherwise false
  16025. */
  16026. Object.defineProperty(exports, "__esModule", {
  16027. value: true
  16028. });
  16029. exports.default = isAbsoluteURL;
  16030. function isAbsoluteURL(url) {
  16031. // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  16032. // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  16033. // by any combination of letters, digits, plus, period, or hyphen.
  16034. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
  16035. }
  16036. /***/ }),
  16037. /* 106 */
  16038. /*!********************************************************************************************!*\
  16039. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/combineURLs.js ***!
  16040. \********************************************************************************************/
  16041. /*! no static exports found */
  16042. /***/ (function(module, exports, __webpack_require__) {
  16043. "use strict";
  16044. /**
  16045. * Creates a new URL by combining the specified URLs
  16046. *
  16047. * @param {string} baseURL The base URL
  16048. * @param {string} relativeURL The relative URL
  16049. *
  16050. * @returns {string} The combined URL
  16051. */
  16052. Object.defineProperty(exports, "__esModule", {
  16053. value: true
  16054. });
  16055. exports.default = combineURLs;
  16056. function combineURLs(baseURL, relativeURL) {
  16057. return relativeURL ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL;
  16058. }
  16059. /***/ }),
  16060. /* 107 */
  16061. /*!*****************************************************************************************!*\
  16062. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/core/mergeConfig.js ***!
  16063. \*****************************************************************************************/
  16064. /*! no static exports found */
  16065. /***/ (function(module, exports, __webpack_require__) {
  16066. "use strict";
  16067. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  16068. Object.defineProperty(exports, "__esModule", {
  16069. value: true
  16070. });
  16071. exports.default = mergeConfig;
  16072. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  16073. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 64));
  16074. var _AxiosHeaders = _interopRequireDefault(__webpack_require__(/*! ./AxiosHeaders.js */ 89));
  16075. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  16076. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  16077. var headersToObject = function headersToObject(thing) {
  16078. return thing instanceof _AxiosHeaders.default ? _objectSpread({}, thing) : thing;
  16079. };
  16080. /**
  16081. * Config-specific merge-function which creates a new config-object
  16082. * by merging two configuration objects together.
  16083. *
  16084. * @param {Object} config1
  16085. * @param {Object} config2
  16086. *
  16087. * @returns {Object} New object resulting from merging config2 to config1
  16088. */
  16089. function mergeConfig(config1, config2) {
  16090. // eslint-disable-next-line no-param-reassign
  16091. config2 = config2 || {};
  16092. var config = {};
  16093. function getMergedValue(target, source, caseless) {
  16094. if (_utils.default.isPlainObject(target) && _utils.default.isPlainObject(source)) {
  16095. return _utils.default.merge.call({
  16096. caseless: caseless
  16097. }, target, source);
  16098. } else if (_utils.default.isPlainObject(source)) {
  16099. return _utils.default.merge({}, source);
  16100. } else if (_utils.default.isArray(source)) {
  16101. return source.slice();
  16102. }
  16103. return source;
  16104. }
  16105. // eslint-disable-next-line consistent-return
  16106. function mergeDeepProperties(a, b, caseless) {
  16107. if (!_utils.default.isUndefined(b)) {
  16108. return getMergedValue(a, b, caseless);
  16109. } else if (!_utils.default.isUndefined(a)) {
  16110. return getMergedValue(undefined, a, caseless);
  16111. }
  16112. }
  16113. // eslint-disable-next-line consistent-return
  16114. function valueFromConfig2(a, b) {
  16115. if (!_utils.default.isUndefined(b)) {
  16116. return getMergedValue(undefined, b);
  16117. }
  16118. }
  16119. // eslint-disable-next-line consistent-return
  16120. function defaultToConfig2(a, b) {
  16121. if (!_utils.default.isUndefined(b)) {
  16122. return getMergedValue(undefined, b);
  16123. } else if (!_utils.default.isUndefined(a)) {
  16124. return getMergedValue(undefined, a);
  16125. }
  16126. }
  16127. // eslint-disable-next-line consistent-return
  16128. function mergeDirectKeys(a, b, prop) {
  16129. if (prop in config2) {
  16130. return getMergedValue(a, b);
  16131. } else if (prop in config1) {
  16132. return getMergedValue(undefined, a);
  16133. }
  16134. }
  16135. var mergeMap = {
  16136. url: valueFromConfig2,
  16137. method: valueFromConfig2,
  16138. data: valueFromConfig2,
  16139. baseURL: defaultToConfig2,
  16140. transformRequest: defaultToConfig2,
  16141. transformResponse: defaultToConfig2,
  16142. paramsSerializer: defaultToConfig2,
  16143. timeout: defaultToConfig2,
  16144. timeoutMessage: defaultToConfig2,
  16145. withCredentials: defaultToConfig2,
  16146. withXSRFToken: defaultToConfig2,
  16147. adapter: defaultToConfig2,
  16148. responseType: defaultToConfig2,
  16149. xsrfCookieName: defaultToConfig2,
  16150. xsrfHeaderName: defaultToConfig2,
  16151. onUploadProgress: defaultToConfig2,
  16152. onDownloadProgress: defaultToConfig2,
  16153. decompress: defaultToConfig2,
  16154. maxContentLength: defaultToConfig2,
  16155. maxBodyLength: defaultToConfig2,
  16156. beforeRedirect: defaultToConfig2,
  16157. transport: defaultToConfig2,
  16158. httpAgent: defaultToConfig2,
  16159. httpsAgent: defaultToConfig2,
  16160. cancelToken: defaultToConfig2,
  16161. socketPath: defaultToConfig2,
  16162. responseEncoding: defaultToConfig2,
  16163. validateStatus: mergeDirectKeys,
  16164. headers: function headers(a, b) {
  16165. return mergeDeepProperties(headersToObject(a), headersToObject(b), true);
  16166. }
  16167. };
  16168. _utils.default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
  16169. var merge = mergeMap[prop] || mergeDeepProperties;
  16170. var configValue = merge(config1[prop], config2[prop], prop);
  16171. _utils.default.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
  16172. });
  16173. return config;
  16174. }
  16175. /***/ }),
  16176. /* 108 */
  16177. /*!***************************************************************************************!*\
  16178. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/adapters/fetch.js ***!
  16179. \***************************************************************************************/
  16180. /*! no static exports found */
  16181. /***/ (function(module, exports, __webpack_require__) {
  16182. "use strict";
  16183. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  16184. Object.defineProperty(exports, "__esModule", {
  16185. value: true
  16186. });
  16187. exports.default = void 0;
  16188. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 41));
  16189. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  16190. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  16191. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 43));
  16192. var _index = _interopRequireDefault(__webpack_require__(/*! ../platform/index.js */ 82));
  16193. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 64));
  16194. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosError.js */ 74));
  16195. var _composeSignals = _interopRequireDefault(__webpack_require__(/*! ../helpers/composeSignals.js */ 109));
  16196. var _trackStream = __webpack_require__(/*! ../helpers/trackStream.js */ 110);
  16197. var _AxiosHeaders = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosHeaders.js */ 89));
  16198. var _progressEventReducer = _interopRequireDefault(__webpack_require__(/*! ../helpers/progressEventReducer.js */ 97));
  16199. var _resolveConfig2 = _interopRequireDefault(__webpack_require__(/*! ../helpers/resolveConfig.js */ 100));
  16200. var _settle = _interopRequireDefault(__webpack_require__(/*! ../core/settle.js */ 95));
  16201. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  16202. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  16203. var fetchProgressDecorator = function fetchProgressDecorator(total, fn) {
  16204. var lengthComputable = total != null;
  16205. return function (loaded) {
  16206. return setTimeout(function () {
  16207. return fn({
  16208. lengthComputable: lengthComputable,
  16209. total: total,
  16210. loaded: loaded
  16211. });
  16212. });
  16213. };
  16214. };
  16215. var isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
  16216. var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
  16217. // used only inside the fetch adapter
  16218. var encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? function (encoder) {
  16219. return function (str) {
  16220. return encoder.encode(str);
  16221. };
  16222. }(new TextEncoder()) : /*#__PURE__*/function () {
  16223. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(str) {
  16224. return _regenerator.default.wrap(function _callee$(_context) {
  16225. while (1) {
  16226. switch (_context.prev = _context.next) {
  16227. case 0:
  16228. _context.t0 = Uint8Array;
  16229. _context.next = 3;
  16230. return new Response(str).arrayBuffer();
  16231. case 3:
  16232. _context.t1 = _context.sent;
  16233. return _context.abrupt("return", new _context.t0(_context.t1));
  16234. case 5:
  16235. case "end":
  16236. return _context.stop();
  16237. }
  16238. }
  16239. }, _callee);
  16240. }));
  16241. return function (_x) {
  16242. return _ref.apply(this, arguments);
  16243. };
  16244. }());
  16245. var supportsRequestStream = isReadableStreamSupported && function () {
  16246. var duplexAccessed = false;
  16247. var hasContentType = new Request(_index.default.origin, {
  16248. body: new ReadableStream(),
  16249. method: 'POST',
  16250. get duplex() {
  16251. duplexAccessed = true;
  16252. return 'half';
  16253. }
  16254. }).headers.has('Content-Type');
  16255. return duplexAccessed && !hasContentType;
  16256. }();
  16257. var DEFAULT_CHUNK_SIZE = 64 * 1024;
  16258. var supportsResponseStream = isReadableStreamSupported && !!function () {
  16259. try {
  16260. return _utils.default.isReadableStream(new Response('').body);
  16261. } catch (err) {
  16262. // return undefined
  16263. }
  16264. }();
  16265. var resolvers = {
  16266. stream: supportsResponseStream && function (res) {
  16267. return res.body;
  16268. }
  16269. };
  16270. isFetchSupported && function (res) {
  16271. ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(function (type) {
  16272. !resolvers[type] && (resolvers[type] = _utils.default.isFunction(res[type]) ? function (res) {
  16273. return res[type]();
  16274. } : function (_, config) {
  16275. throw new _AxiosError.default("Response type '".concat(type, "' is not supported"), _AxiosError.default.ERR_NOT_SUPPORT, config);
  16276. });
  16277. });
  16278. }(new Response());
  16279. var getBodyLength = /*#__PURE__*/function () {
  16280. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(body) {
  16281. return _regenerator.default.wrap(function _callee2$(_context2) {
  16282. while (1) {
  16283. switch (_context2.prev = _context2.next) {
  16284. case 0:
  16285. if (!(body == null)) {
  16286. _context2.next = 2;
  16287. break;
  16288. }
  16289. return _context2.abrupt("return", 0);
  16290. case 2:
  16291. if (!_utils.default.isBlob(body)) {
  16292. _context2.next = 4;
  16293. break;
  16294. }
  16295. return _context2.abrupt("return", body.size);
  16296. case 4:
  16297. if (!_utils.default.isSpecCompliantForm(body)) {
  16298. _context2.next = 8;
  16299. break;
  16300. }
  16301. _context2.next = 7;
  16302. return new Request(body).arrayBuffer();
  16303. case 7:
  16304. return _context2.abrupt("return", _context2.sent.byteLength);
  16305. case 8:
  16306. if (!_utils.default.isArrayBufferView(body)) {
  16307. _context2.next = 10;
  16308. break;
  16309. }
  16310. return _context2.abrupt("return", body.byteLength);
  16311. case 10:
  16312. if (_utils.default.isURLSearchParams(body)) {
  16313. body = body + '';
  16314. }
  16315. if (!_utils.default.isString(body)) {
  16316. _context2.next = 15;
  16317. break;
  16318. }
  16319. _context2.next = 14;
  16320. return encodeText(body);
  16321. case 14:
  16322. return _context2.abrupt("return", _context2.sent.byteLength);
  16323. case 15:
  16324. case "end":
  16325. return _context2.stop();
  16326. }
  16327. }
  16328. }, _callee2);
  16329. }));
  16330. return function getBodyLength(_x2) {
  16331. return _ref2.apply(this, arguments);
  16332. };
  16333. }();
  16334. var resolveBodyLength = /*#__PURE__*/function () {
  16335. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(headers, body) {
  16336. var length;
  16337. return _regenerator.default.wrap(function _callee3$(_context3) {
  16338. while (1) {
  16339. switch (_context3.prev = _context3.next) {
  16340. case 0:
  16341. length = _utils.default.toFiniteNumber(headers.getContentLength());
  16342. return _context3.abrupt("return", length == null ? getBodyLength(body) : length);
  16343. case 2:
  16344. case "end":
  16345. return _context3.stop();
  16346. }
  16347. }
  16348. }, _callee3);
  16349. }));
  16350. return function resolveBodyLength(_x3, _x4) {
  16351. return _ref3.apply(this, arguments);
  16352. };
  16353. }();
  16354. var _default = isFetchSupported && /*#__PURE__*/function () {
  16355. var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(config) {
  16356. var _resolveConfig, url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, _resolveConfig$withCr, withCredentials, fetchOptions, _ref5, _ref6, composedSignal, stopTimeout, finished, request, onFinish, requestContentLength, _request, contentTypeHeader, response, isStreamResponse, options, responseContentLength, responseData;
  16357. return _regenerator.default.wrap(function _callee4$(_context4) {
  16358. while (1) {
  16359. switch (_context4.prev = _context4.next) {
  16360. case 0:
  16361. _resolveConfig = (0, _resolveConfig2.default)(config), url = _resolveConfig.url, method = _resolveConfig.method, data = _resolveConfig.data, signal = _resolveConfig.signal, cancelToken = _resolveConfig.cancelToken, timeout = _resolveConfig.timeout, onDownloadProgress = _resolveConfig.onDownloadProgress, onUploadProgress = _resolveConfig.onUploadProgress, responseType = _resolveConfig.responseType, headers = _resolveConfig.headers, _resolveConfig$withCr = _resolveConfig.withCredentials, withCredentials = _resolveConfig$withCr === void 0 ? 'same-origin' : _resolveConfig$withCr, fetchOptions = _resolveConfig.fetchOptions;
  16362. responseType = responseType ? (responseType + '').toLowerCase() : 'text';
  16363. _ref5 = signal || cancelToken || timeout ? (0, _composeSignals.default)([signal, cancelToken], timeout) : [], _ref6 = (0, _slicedToArray2.default)(_ref5, 2), composedSignal = _ref6[0], stopTimeout = _ref6[1];
  16364. onFinish = function onFinish() {
  16365. !finished && setTimeout(function () {
  16366. composedSignal && composedSignal.unsubscribe();
  16367. });
  16368. finished = true;
  16369. };
  16370. _context4.prev = 4;
  16371. _context4.t0 = onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head';
  16372. if (!_context4.t0) {
  16373. _context4.next = 11;
  16374. break;
  16375. }
  16376. _context4.next = 9;
  16377. return resolveBodyLength(headers, data);
  16378. case 9:
  16379. _context4.t1 = requestContentLength = _context4.sent;
  16380. _context4.t0 = _context4.t1 !== 0;
  16381. case 11:
  16382. if (!_context4.t0) {
  16383. _context4.next = 15;
  16384. break;
  16385. }
  16386. _request = new Request(url, {
  16387. method: 'POST',
  16388. body: data,
  16389. duplex: "half"
  16390. });
  16391. if (_utils.default.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
  16392. headers.setContentType(contentTypeHeader);
  16393. }
  16394. if (_request.body) {
  16395. data = (0, _trackStream.trackStream)(_request.body, DEFAULT_CHUNK_SIZE, fetchProgressDecorator(requestContentLength, (0, _progressEventReducer.default)(onUploadProgress)), null, encodeText);
  16396. }
  16397. case 15:
  16398. if (!_utils.default.isString(withCredentials)) {
  16399. withCredentials = withCredentials ? 'cors' : 'omit';
  16400. }
  16401. request = new Request(url, _objectSpread(_objectSpread({}, fetchOptions), {}, {
  16402. signal: composedSignal,
  16403. method: method.toUpperCase(),
  16404. headers: headers.normalize().toJSON(),
  16405. body: data,
  16406. duplex: "half",
  16407. withCredentials: withCredentials
  16408. }));
  16409. _context4.next = 19;
  16410. return fetch(request);
  16411. case 19:
  16412. response = _context4.sent;
  16413. isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
  16414. if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) {
  16415. options = {};
  16416. ['status', 'statusText', 'headers'].forEach(function (prop) {
  16417. options[prop] = response[prop];
  16418. });
  16419. responseContentLength = _utils.default.toFiniteNumber(response.headers.get('content-length'));
  16420. response = new Response((0, _trackStream.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onDownloadProgress && fetchProgressDecorator(responseContentLength, (0, _progressEventReducer.default)(onDownloadProgress, true)), isStreamResponse && onFinish, encodeText), options);
  16421. }
  16422. responseType = responseType || 'text';
  16423. _context4.next = 25;
  16424. return resolvers[_utils.default.findKey(resolvers, responseType) || 'text'](response, config);
  16425. case 25:
  16426. responseData = _context4.sent;
  16427. !isStreamResponse && onFinish();
  16428. stopTimeout && stopTimeout();
  16429. _context4.next = 30;
  16430. return new Promise(function (resolve, reject) {
  16431. (0, _settle.default)(resolve, reject, {
  16432. data: responseData,
  16433. headers: _AxiosHeaders.default.from(response.headers),
  16434. status: response.status,
  16435. statusText: response.statusText,
  16436. config: config,
  16437. request: request
  16438. });
  16439. });
  16440. case 30:
  16441. return _context4.abrupt("return", _context4.sent);
  16442. case 33:
  16443. _context4.prev = 33;
  16444. _context4.t2 = _context4["catch"](4);
  16445. onFinish();
  16446. if (!(_context4.t2 && _context4.t2.name === 'TypeError' && /fetch/i.test(_context4.t2.message))) {
  16447. _context4.next = 38;
  16448. break;
  16449. }
  16450. throw Object.assign(new _AxiosError.default('Network Error', _AxiosError.default.ERR_NETWORK, config, request), {
  16451. cause: _context4.t2.cause || _context4.t2
  16452. });
  16453. case 38:
  16454. throw _AxiosError.default.from(_context4.t2, _context4.t2 && _context4.t2.code, config, request);
  16455. case 39:
  16456. case "end":
  16457. return _context4.stop();
  16458. }
  16459. }
  16460. }, _callee4, null, [[4, 33]]);
  16461. }));
  16462. return function (_x5) {
  16463. return _ref4.apply(this, arguments);
  16464. };
  16465. }();
  16466. exports.default = _default;
  16467. /***/ }),
  16468. /* 109 */
  16469. /*!***********************************************************************************************!*\
  16470. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/composeSignals.js ***!
  16471. \***********************************************************************************************/
  16472. /*! no static exports found */
  16473. /***/ (function(module, exports, __webpack_require__) {
  16474. "use strict";
  16475. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  16476. Object.defineProperty(exports, "__esModule", {
  16477. value: true
  16478. });
  16479. exports.default = void 0;
  16480. var _CanceledError = _interopRequireDefault(__webpack_require__(/*! ../cancel/CanceledError.js */ 92));
  16481. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosError.js */ 74));
  16482. var composeSignals = function composeSignals(signals, timeout) {
  16483. var controller = new AbortController();
  16484. var aborted;
  16485. var onabort = function onabort(cancel) {
  16486. if (!aborted) {
  16487. aborted = true;
  16488. unsubscribe();
  16489. var err = cancel instanceof Error ? cancel : this.reason;
  16490. controller.abort(err instanceof _AxiosError.default ? err : new _CanceledError.default(err instanceof Error ? err.message : err));
  16491. }
  16492. };
  16493. var timer = timeout && setTimeout(function () {
  16494. onabort(new _AxiosError.default("timeout ".concat(timeout, " of ms exceeded"), _AxiosError.default.ETIMEDOUT));
  16495. }, timeout);
  16496. var unsubscribe = function unsubscribe() {
  16497. if (signals) {
  16498. timer && clearTimeout(timer);
  16499. timer = null;
  16500. signals.forEach(function (signal) {
  16501. signal && (signal.removeEventListener ? signal.removeEventListener('abort', onabort) : signal.unsubscribe(onabort));
  16502. });
  16503. signals = null;
  16504. }
  16505. };
  16506. signals.forEach(function (signal) {
  16507. return signal && signal.addEventListener && signal.addEventListener('abort', onabort);
  16508. });
  16509. var signal = controller.signal;
  16510. signal.unsubscribe = unsubscribe;
  16511. return [signal, function () {
  16512. timer && clearTimeout(timer);
  16513. timer = null;
  16514. }];
  16515. };
  16516. var _default = composeSignals;
  16517. exports.default = _default;
  16518. /***/ }),
  16519. /* 110 */
  16520. /*!********************************************************************************************!*\
  16521. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/trackStream.js ***!
  16522. \********************************************************************************************/
  16523. /*! no static exports found */
  16524. /***/ (function(module, exports, __webpack_require__) {
  16525. "use strict";
  16526. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  16527. Object.defineProperty(exports, "__esModule", {
  16528. value: true
  16529. });
  16530. exports.trackStream = exports.streamChunk = exports.readBytes = void 0;
  16531. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 41));
  16532. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 43));
  16533. var _wrapAsyncGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapAsyncGenerator */ 111));
  16534. var _awaitAsyncGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/awaitAsyncGenerator */ 114));
  16535. var _asyncGeneratorDelegate2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncGeneratorDelegate */ 115));
  16536. function _asyncIterator(iterable) { var method, async, sync, retry = 2; for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) { if (async && null != (method = iterable[async])) return method.call(iterable); if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable)); async = "@@asyncIterator", sync = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
  16537. function AsyncFromSyncIterator(s) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var done = r.done; return Promise.resolve(r.value).then(function (value) { return { value: value, done: done }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(s) { this.s = s, this.n = s.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, return: function _return(value) { var ret = this.s.return; return void 0 === ret ? Promise.resolve({ value: value, done: !0 }) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments)); }, throw: function _throw(value) { var thr = this.s.return; return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(s); }
  16538. var streamChunk = /*#__PURE__*/_regenerator.default.mark(function streamChunk(chunk, chunkSize) {
  16539. var len, pos, end;
  16540. return _regenerator.default.wrap(function streamChunk$(_context) {
  16541. while (1) {
  16542. switch (_context.prev = _context.next) {
  16543. case 0:
  16544. len = chunk.byteLength;
  16545. if (!(!chunkSize || len < chunkSize)) {
  16546. _context.next = 5;
  16547. break;
  16548. }
  16549. _context.next = 4;
  16550. return chunk;
  16551. case 4:
  16552. return _context.abrupt("return");
  16553. case 5:
  16554. pos = 0;
  16555. case 6:
  16556. if (!(pos < len)) {
  16557. _context.next = 13;
  16558. break;
  16559. }
  16560. end = pos + chunkSize;
  16561. _context.next = 10;
  16562. return chunk.slice(pos, end);
  16563. case 10:
  16564. pos = end;
  16565. _context.next = 6;
  16566. break;
  16567. case 13:
  16568. case "end":
  16569. return _context.stop();
  16570. }
  16571. }
  16572. }, streamChunk);
  16573. });
  16574. exports.streamChunk = streamChunk;
  16575. var readBytes = /*#__PURE__*/function () {
  16576. var _ref = (0, _wrapAsyncGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(iterable, chunkSize, encode) {
  16577. var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, chunk;
  16578. return _regenerator.default.wrap(function _callee$(_context2) {
  16579. while (1) {
  16580. switch (_context2.prev = _context2.next) {
  16581. case 0:
  16582. _iteratorAbruptCompletion = false;
  16583. _didIteratorError = false;
  16584. _context2.prev = 2;
  16585. _iterator = _asyncIterator(iterable);
  16586. case 4:
  16587. _context2.next = 6;
  16588. return (0, _awaitAsyncGenerator2.default)(_iterator.next());
  16589. case 6:
  16590. if (!(_iteratorAbruptCompletion = !(_step = _context2.sent).done)) {
  16591. _context2.next = 27;
  16592. break;
  16593. }
  16594. chunk = _step.value;
  16595. _context2.t0 = _asyncGeneratorDelegate2.default;
  16596. _context2.t1 = _asyncIterator;
  16597. _context2.t2 = streamChunk;
  16598. if (!ArrayBuffer.isView(chunk)) {
  16599. _context2.next = 15;
  16600. break;
  16601. }
  16602. _context2.t3 = chunk;
  16603. _context2.next = 18;
  16604. break;
  16605. case 15:
  16606. _context2.next = 17;
  16607. return (0, _awaitAsyncGenerator2.default)(encode(String(chunk)));
  16608. case 17:
  16609. _context2.t3 = _context2.sent;
  16610. case 18:
  16611. _context2.t4 = _context2.t3;
  16612. _context2.t5 = chunkSize;
  16613. _context2.t6 = (0, _context2.t2)(_context2.t4, _context2.t5);
  16614. _context2.t7 = (0, _context2.t1)(_context2.t6);
  16615. _context2.t8 = _awaitAsyncGenerator2.default;
  16616. return _context2.delegateYield((0, _context2.t0)(_context2.t7, _context2.t8), "t9", 24);
  16617. case 24:
  16618. _iteratorAbruptCompletion = false;
  16619. _context2.next = 4;
  16620. break;
  16621. case 27:
  16622. _context2.next = 33;
  16623. break;
  16624. case 29:
  16625. _context2.prev = 29;
  16626. _context2.t10 = _context2["catch"](2);
  16627. _didIteratorError = true;
  16628. _iteratorError = _context2.t10;
  16629. case 33:
  16630. _context2.prev = 33;
  16631. _context2.prev = 34;
  16632. if (!(_iteratorAbruptCompletion && _iterator.return != null)) {
  16633. _context2.next = 38;
  16634. break;
  16635. }
  16636. _context2.next = 38;
  16637. return (0, _awaitAsyncGenerator2.default)(_iterator.return());
  16638. case 38:
  16639. _context2.prev = 38;
  16640. if (!_didIteratorError) {
  16641. _context2.next = 41;
  16642. break;
  16643. }
  16644. throw _iteratorError;
  16645. case 41:
  16646. return _context2.finish(38);
  16647. case 42:
  16648. return _context2.finish(33);
  16649. case 43:
  16650. case "end":
  16651. return _context2.stop();
  16652. }
  16653. }
  16654. }, _callee, null, [[2, 29, 33, 43], [34,, 38, 42]]);
  16655. }));
  16656. return function readBytes(_x, _x2, _x3) {
  16657. return _ref.apply(this, arguments);
  16658. };
  16659. }();
  16660. exports.readBytes = readBytes;
  16661. var trackStream = function trackStream(stream, chunkSize, onProgress, onFinish, encode) {
  16662. var iterator = readBytes(stream, chunkSize, encode);
  16663. var bytes = 0;
  16664. return new ReadableStream({
  16665. type: 'bytes',
  16666. pull: function pull(controller) {
  16667. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
  16668. var _yield$iterator$next, done, value, len;
  16669. return _regenerator.default.wrap(function _callee2$(_context3) {
  16670. while (1) {
  16671. switch (_context3.prev = _context3.next) {
  16672. case 0:
  16673. _context3.next = 2;
  16674. return iterator.next();
  16675. case 2:
  16676. _yield$iterator$next = _context3.sent;
  16677. done = _yield$iterator$next.done;
  16678. value = _yield$iterator$next.value;
  16679. if (!done) {
  16680. _context3.next = 9;
  16681. break;
  16682. }
  16683. controller.close();
  16684. onFinish();
  16685. return _context3.abrupt("return");
  16686. case 9:
  16687. len = value.byteLength;
  16688. onProgress && onProgress(bytes += len);
  16689. controller.enqueue(new Uint8Array(value));
  16690. case 12:
  16691. case "end":
  16692. return _context3.stop();
  16693. }
  16694. }
  16695. }, _callee2);
  16696. }))();
  16697. },
  16698. cancel: function cancel(reason) {
  16699. onFinish(reason);
  16700. return iterator.return();
  16701. }
  16702. }, {
  16703. highWaterMark: 2
  16704. });
  16705. };
  16706. exports.trackStream = trackStream;
  16707. /***/ }),
  16708. /* 111 */
  16709. /*!*******************************************************************!*\
  16710. !*** ./node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js ***!
  16711. \*******************************************************************/
  16712. /*! no static exports found */
  16713. /***/ (function(module, exports, __webpack_require__) {
  16714. var AsyncGenerator = __webpack_require__(/*! ./AsyncGenerator.js */ 112);
  16715. function _wrapAsyncGenerator(fn) {
  16716. return function () {
  16717. return new AsyncGenerator(fn.apply(this, arguments));
  16718. };
  16719. }
  16720. module.exports = _wrapAsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  16721. /***/ }),
  16722. /* 112 */
  16723. /*!***************************************************************!*\
  16724. !*** ./node_modules/@babel/runtime/helpers/AsyncGenerator.js ***!
  16725. \***************************************************************/
  16726. /*! no static exports found */
  16727. /***/ (function(module, exports, __webpack_require__) {
  16728. var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ 113);
  16729. function AsyncGenerator(e) {
  16730. var r, t;
  16731. function resume(r, t) {
  16732. try {
  16733. var n = e[r](t),
  16734. o = n.value,
  16735. u = o instanceof OverloadYield;
  16736. Promise.resolve(u ? o.v : o).then(function (t) {
  16737. if (u) {
  16738. var i = "return" === r ? "return" : "next";
  16739. if (!o.k || t.done) return resume(i, t);
  16740. t = e[i](t).value;
  16741. }
  16742. settle(n.done ? "return" : "normal", t);
  16743. }, function (e) {
  16744. resume("throw", e);
  16745. });
  16746. } catch (e) {
  16747. settle("throw", e);
  16748. }
  16749. }
  16750. function settle(e, n) {
  16751. switch (e) {
  16752. case "return":
  16753. r.resolve({
  16754. value: n,
  16755. done: !0
  16756. });
  16757. break;
  16758. case "throw":
  16759. r.reject(n);
  16760. break;
  16761. default:
  16762. r.resolve({
  16763. value: n,
  16764. done: !1
  16765. });
  16766. }
  16767. (r = r.next) ? resume(r.key, r.arg) : t = null;
  16768. }
  16769. this._invoke = function (e, n) {
  16770. return new Promise(function (o, u) {
  16771. var i = {
  16772. key: e,
  16773. arg: n,
  16774. resolve: o,
  16775. reject: u,
  16776. next: null
  16777. };
  16778. t ? t = t.next = i : (r = t = i, resume(e, n));
  16779. });
  16780. }, "function" != typeof e["return"] && (this["return"] = void 0);
  16781. }
  16782. AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () {
  16783. return this;
  16784. }, AsyncGenerator.prototype.next = function (e) {
  16785. return this._invoke("next", e);
  16786. }, AsyncGenerator.prototype["throw"] = function (e) {
  16787. return this._invoke("throw", e);
  16788. }, AsyncGenerator.prototype["return"] = function (e) {
  16789. return this._invoke("return", e);
  16790. };
  16791. module.exports = AsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  16792. /***/ }),
  16793. /* 113 */
  16794. /*!**************************************************************!*\
  16795. !*** ./node_modules/@babel/runtime/helpers/OverloadYield.js ***!
  16796. \**************************************************************/
  16797. /*! no static exports found */
  16798. /***/ (function(module, exports) {
  16799. function _OverloadYield(t, e) {
  16800. this.v = t, this.k = e;
  16801. }
  16802. module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports;
  16803. /***/ }),
  16804. /* 114 */
  16805. /*!********************************************************************!*\
  16806. !*** ./node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js ***!
  16807. \********************************************************************/
  16808. /*! no static exports found */
  16809. /***/ (function(module, exports, __webpack_require__) {
  16810. var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ 113);
  16811. function _awaitAsyncGenerator(e) {
  16812. return new OverloadYield(e, 0);
  16813. }
  16814. module.exports = _awaitAsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  16815. /***/ }),
  16816. /* 115 */
  16817. /*!***********************************************************************!*\
  16818. !*** ./node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js ***!
  16819. \***********************************************************************/
  16820. /*! no static exports found */
  16821. /***/ (function(module, exports, __webpack_require__) {
  16822. var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ 113);
  16823. function _asyncGeneratorDelegate(t) {
  16824. var e = {},
  16825. n = !1;
  16826. function pump(e, r) {
  16827. return n = !0, r = new Promise(function (n) {
  16828. n(t[e](r));
  16829. }), {
  16830. done: !1,
  16831. value: new OverloadYield(r, 1)
  16832. };
  16833. }
  16834. return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () {
  16835. return this;
  16836. }, e.next = function (t) {
  16837. return n ? (n = !1, t) : pump("next", t);
  16838. }, "function" == typeof t["throw"] && (e["throw"] = function (t) {
  16839. if (n) throw n = !1, t;
  16840. return pump("throw", t);
  16841. }), "function" == typeof t["return"] && (e["return"] = function (t) {
  16842. return n ? (n = !1, t) : pump("return", t);
  16843. }), e;
  16844. }
  16845. module.exports = _asyncGeneratorDelegate, module.exports.__esModule = true, module.exports["default"] = module.exports;
  16846. /***/ }),
  16847. /* 116 */
  16848. /*!******************************************************************************************!*\
  16849. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/validator.js ***!
  16850. \******************************************************************************************/
  16851. /*! no static exports found */
  16852. /***/ (function(module, exports, __webpack_require__) {
  16853. "use strict";
  16854. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  16855. Object.defineProperty(exports, "__esModule", {
  16856. value: true
  16857. });
  16858. exports.default = void 0;
  16859. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  16860. var _data = __webpack_require__(/*! ../env/data.js */ 117);
  16861. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosError.js */ 74));
  16862. var validators = {};
  16863. // eslint-disable-next-line func-names
  16864. ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function (type, i) {
  16865. validators[type] = function validator(thing) {
  16866. return (0, _typeof2.default)(thing) === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
  16867. };
  16868. });
  16869. var deprecatedWarnings = {};
  16870. /**
  16871. * Transitional option validator
  16872. *
  16873. * @param {function|boolean?} validator - set to false if the transitional option has been removed
  16874. * @param {string?} version - deprecated version / removed since version
  16875. * @param {string?} message - some message with additional info
  16876. *
  16877. * @returns {function}
  16878. */
  16879. validators.transitional = function transitional(validator, version, message) {
  16880. function formatMessage(opt, desc) {
  16881. return '[Axios v' + _data.VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
  16882. }
  16883. // eslint-disable-next-line func-names
  16884. return function (value, opt, opts) {
  16885. if (validator === false) {
  16886. throw new _AxiosError.default(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), _AxiosError.default.ERR_DEPRECATED);
  16887. }
  16888. if (version && !deprecatedWarnings[opt]) {
  16889. deprecatedWarnings[opt] = true;
  16890. // eslint-disable-next-line no-console
  16891. console.warn(formatMessage(opt, ' has been deprecated since v' + version + ' and will be removed in the near future'));
  16892. }
  16893. return validator ? validator(value, opt, opts) : true;
  16894. };
  16895. };
  16896. /**
  16897. * Assert object's properties type
  16898. *
  16899. * @param {object} options
  16900. * @param {object} schema
  16901. * @param {boolean?} allowUnknown
  16902. *
  16903. * @returns {object}
  16904. */
  16905. function assertOptions(options, schema, allowUnknown) {
  16906. if ((0, _typeof2.default)(options) !== 'object') {
  16907. throw new _AxiosError.default('options must be an object', _AxiosError.default.ERR_BAD_OPTION_VALUE);
  16908. }
  16909. var keys = Object.keys(options);
  16910. var i = keys.length;
  16911. while (i-- > 0) {
  16912. var opt = keys[i];
  16913. var validator = schema[opt];
  16914. if (validator) {
  16915. var value = options[opt];
  16916. var result = value === undefined || validator(value, opt, options);
  16917. if (result !== true) {
  16918. throw new _AxiosError.default('option ' + opt + ' must be ' + result, _AxiosError.default.ERR_BAD_OPTION_VALUE);
  16919. }
  16920. continue;
  16921. }
  16922. if (allowUnknown !== true) {
  16923. throw new _AxiosError.default('Unknown option ' + opt, _AxiosError.default.ERR_BAD_OPTION);
  16924. }
  16925. }
  16926. }
  16927. var _default = {
  16928. assertOptions: assertOptions,
  16929. validators: validators
  16930. };
  16931. exports.default = _default;
  16932. /***/ }),
  16933. /* 117 */
  16934. /*!*********************************************************************************!*\
  16935. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/env/data.js ***!
  16936. \*********************************************************************************/
  16937. /*! no static exports found */
  16938. /***/ (function(module, exports, __webpack_require__) {
  16939. "use strict";
  16940. Object.defineProperty(exports, "__esModule", {
  16941. value: true
  16942. });
  16943. exports.VERSION = void 0;
  16944. var VERSION = "1.7.2";
  16945. exports.VERSION = VERSION;
  16946. /***/ }),
  16947. /* 118 */
  16948. /*!*******************************************************************************************!*\
  16949. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/cancel/CancelToken.js ***!
  16950. \*******************************************************************************************/
  16951. /*! no static exports found */
  16952. /***/ (function(module, exports, __webpack_require__) {
  16953. "use strict";
  16954. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  16955. Object.defineProperty(exports, "__esModule", {
  16956. value: true
  16957. });
  16958. exports.default = void 0;
  16959. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  16960. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  16961. var _CanceledError = _interopRequireDefault(__webpack_require__(/*! ./CanceledError.js */ 92));
  16962. /**
  16963. * A `CancelToken` is an object that can be used to request cancellation of an operation.
  16964. *
  16965. * @param {Function} executor The executor function.
  16966. *
  16967. * @returns {CancelToken}
  16968. */
  16969. var CancelToken = /*#__PURE__*/function () {
  16970. function CancelToken(executor) {
  16971. (0, _classCallCheck2.default)(this, CancelToken);
  16972. if (typeof executor !== 'function') {
  16973. throw new TypeError('executor must be a function.');
  16974. }
  16975. var resolvePromise;
  16976. this.promise = new Promise(function promiseExecutor(resolve) {
  16977. resolvePromise = resolve;
  16978. });
  16979. var token = this;
  16980. // eslint-disable-next-line func-names
  16981. this.promise.then(function (cancel) {
  16982. if (!token._listeners) return;
  16983. var i = token._listeners.length;
  16984. while (i-- > 0) {
  16985. token._listeners[i](cancel);
  16986. }
  16987. token._listeners = null;
  16988. });
  16989. // eslint-disable-next-line func-names
  16990. this.promise.then = function (onfulfilled) {
  16991. var _resolve;
  16992. // eslint-disable-next-line func-names
  16993. var promise = new Promise(function (resolve) {
  16994. token.subscribe(resolve);
  16995. _resolve = resolve;
  16996. }).then(onfulfilled);
  16997. promise.cancel = function reject() {
  16998. token.unsubscribe(_resolve);
  16999. };
  17000. return promise;
  17001. };
  17002. executor(function cancel(message, config, request) {
  17003. if (token.reason) {
  17004. // Cancellation has already been requested
  17005. return;
  17006. }
  17007. token.reason = new _CanceledError.default(message, config, request);
  17008. resolvePromise(token.reason);
  17009. });
  17010. }
  17011. /**
  17012. * Throws a `CanceledError` if cancellation has been requested.
  17013. */
  17014. (0, _createClass2.default)(CancelToken, [{
  17015. key: "throwIfRequested",
  17016. value: function throwIfRequested() {
  17017. if (this.reason) {
  17018. throw this.reason;
  17019. }
  17020. }
  17021. /**
  17022. * Subscribe to the cancel signal
  17023. */
  17024. }, {
  17025. key: "subscribe",
  17026. value: function subscribe(listener) {
  17027. if (this.reason) {
  17028. listener(this.reason);
  17029. return;
  17030. }
  17031. if (this._listeners) {
  17032. this._listeners.push(listener);
  17033. } else {
  17034. this._listeners = [listener];
  17035. }
  17036. }
  17037. /**
  17038. * Unsubscribe from the cancel signal
  17039. */
  17040. }, {
  17041. key: "unsubscribe",
  17042. value: function unsubscribe(listener) {
  17043. if (!this._listeners) {
  17044. return;
  17045. }
  17046. var index = this._listeners.indexOf(listener);
  17047. if (index !== -1) {
  17048. this._listeners.splice(index, 1);
  17049. }
  17050. }
  17051. /**
  17052. * Returns an object that contains a new `CancelToken` and a function that, when called,
  17053. * cancels the `CancelToken`.
  17054. */
  17055. }], [{
  17056. key: "source",
  17057. value: function source() {
  17058. var cancel;
  17059. var token = new CancelToken(function executor(c) {
  17060. cancel = c;
  17061. });
  17062. return {
  17063. token: token,
  17064. cancel: cancel
  17065. };
  17066. }
  17067. }]);
  17068. return CancelToken;
  17069. }();
  17070. var _default = CancelToken;
  17071. exports.default = _default;
  17072. /***/ }),
  17073. /* 119 */
  17074. /*!***************************************************************************************!*\
  17075. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/spread.js ***!
  17076. \***************************************************************************************/
  17077. /*! no static exports found */
  17078. /***/ (function(module, exports, __webpack_require__) {
  17079. "use strict";
  17080. /**
  17081. * Syntactic sugar for invoking a function and expanding an array for arguments.
  17082. *
  17083. * Common use case would be to use `Function.prototype.apply`.
  17084. *
  17085. * ```js
  17086. * function f(x, y, z) {}
  17087. * var args = [1, 2, 3];
  17088. * f.apply(null, args);
  17089. * ```
  17090. *
  17091. * With `spread` this example can be re-written.
  17092. *
  17093. * ```js
  17094. * spread(function(x, y, z) {})([1, 2, 3]);
  17095. * ```
  17096. *
  17097. * @param {Function} callback
  17098. *
  17099. * @returns {Function}
  17100. */
  17101. Object.defineProperty(exports, "__esModule", {
  17102. value: true
  17103. });
  17104. exports.default = spread;
  17105. function spread(callback) {
  17106. return function wrap(arr) {
  17107. return callback.apply(null, arr);
  17108. };
  17109. }
  17110. /***/ }),
  17111. /* 120 */
  17112. /*!*********************************************************************************************!*\
  17113. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/isAxiosError.js ***!
  17114. \*********************************************************************************************/
  17115. /*! no static exports found */
  17116. /***/ (function(module, exports, __webpack_require__) {
  17117. "use strict";
  17118. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  17119. Object.defineProperty(exports, "__esModule", {
  17120. value: true
  17121. });
  17122. exports.default = isAxiosError;
  17123. var _utils = _interopRequireDefault(__webpack_require__(/*! ./../utils.js */ 64));
  17124. /**
  17125. * Determines whether the payload is an error thrown by Axios
  17126. *
  17127. * @param {*} payload The value to test
  17128. *
  17129. * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
  17130. */
  17131. function isAxiosError(payload) {
  17132. return _utils.default.isObject(payload) && payload.isAxiosError === true;
  17133. }
  17134. /***/ }),
  17135. /* 121 */
  17136. /*!***********************************************************************************************!*\
  17137. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/node_modules/axios/lib/helpers/HttpStatusCode.js ***!
  17138. \***********************************************************************************************/
  17139. /*! no static exports found */
  17140. /***/ (function(module, exports, __webpack_require__) {
  17141. "use strict";
  17142. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  17143. Object.defineProperty(exports, "__esModule", {
  17144. value: true
  17145. });
  17146. exports.default = void 0;
  17147. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  17148. var HttpStatusCode = {
  17149. Continue: 100,
  17150. SwitchingProtocols: 101,
  17151. Processing: 102,
  17152. EarlyHints: 103,
  17153. Ok: 200,
  17154. Created: 201,
  17155. Accepted: 202,
  17156. NonAuthoritativeInformation: 203,
  17157. NoContent: 204,
  17158. ResetContent: 205,
  17159. PartialContent: 206,
  17160. MultiStatus: 207,
  17161. AlreadyReported: 208,
  17162. ImUsed: 226,
  17163. MultipleChoices: 300,
  17164. MovedPermanently: 301,
  17165. Found: 302,
  17166. SeeOther: 303,
  17167. NotModified: 304,
  17168. UseProxy: 305,
  17169. Unused: 306,
  17170. TemporaryRedirect: 307,
  17171. PermanentRedirect: 308,
  17172. BadRequest: 400,
  17173. Unauthorized: 401,
  17174. PaymentRequired: 402,
  17175. Forbidden: 403,
  17176. NotFound: 404,
  17177. MethodNotAllowed: 405,
  17178. NotAcceptable: 406,
  17179. ProxyAuthenticationRequired: 407,
  17180. RequestTimeout: 408,
  17181. Conflict: 409,
  17182. Gone: 410,
  17183. LengthRequired: 411,
  17184. PreconditionFailed: 412,
  17185. PayloadTooLarge: 413,
  17186. UriTooLong: 414,
  17187. UnsupportedMediaType: 415,
  17188. RangeNotSatisfiable: 416,
  17189. ExpectationFailed: 417,
  17190. ImATeapot: 418,
  17191. MisdirectedRequest: 421,
  17192. UnprocessableEntity: 422,
  17193. Locked: 423,
  17194. FailedDependency: 424,
  17195. TooEarly: 425,
  17196. UpgradeRequired: 426,
  17197. PreconditionRequired: 428,
  17198. TooManyRequests: 429,
  17199. RequestHeaderFieldsTooLarge: 431,
  17200. UnavailableForLegalReasons: 451,
  17201. InternalServerError: 500,
  17202. NotImplemented: 501,
  17203. BadGateway: 502,
  17204. ServiceUnavailable: 503,
  17205. GatewayTimeout: 504,
  17206. HttpVersionNotSupported: 505,
  17207. VariantAlsoNegotiates: 506,
  17208. InsufficientStorage: 507,
  17209. LoopDetected: 508,
  17210. NotExtended: 510,
  17211. NetworkAuthenticationRequired: 511
  17212. };
  17213. Object.entries(HttpStatusCode).forEach(function (_ref) {
  17214. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  17215. key = _ref2[0],
  17216. value = _ref2[1];
  17217. HttpStatusCode[value] = key;
  17218. });
  17219. var _default = HttpStatusCode;
  17220. exports.default = _default;
  17221. /***/ }),
  17222. /* 122 */
  17223. /*!***********************************************************************!*\
  17224. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/uni.promisify.adaptor.js ***!
  17225. \***********************************************************************/
  17226. /*! no static exports found */
  17227. /***/ (function(module, exports, __webpack_require__) {
  17228. /* WEBPACK VAR INJECTION */(function(uni) {var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  17229. uni.addInterceptor({
  17230. returnValue: function returnValue(res) {
  17231. if (!(!!res && (_typeof(res) === "object" || typeof res === "function") && typeof res.then === "function")) {
  17232. return res;
  17233. }
  17234. return new Promise(function (resolve, reject) {
  17235. res.then(function (res) {
  17236. return res[0] ? reject(res[0]) : resolve(res[1]);
  17237. });
  17238. });
  17239. }
  17240. });
  17241. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  17242. /***/ }),
  17243. /* 123 */,
  17244. /* 124 */,
  17245. /* 125 */,
  17246. /* 126 */,
  17247. /* 127 */,
  17248. /* 128 */,
  17249. /* 129 */
  17250. /*!***********************************************************!*\
  17251. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/api/index.js ***!
  17252. \***********************************************************/
  17253. /*! no static exports found */
  17254. /***/ (function(module, exports, __webpack_require__) {
  17255. "use strict";
  17256. Object.defineProperty(exports, "__esModule", {
  17257. value: true
  17258. });
  17259. exports.withdraw = exports.updateOrder = exports.updateAdd = exports.takeOrder = exports.statusList = exports.speedOrder = exports.slideshow = exports.requst_post_login = exports.projectDetails = exports.project = exports.payoff = exports.pay = exports.orderList = exports.orderDeatails = exports.infoUpdate = exports.imgUpload = exports.getwxQrCode = exports.getJsLocation = exports.getInfo = exports.getCoupon = exports.getCollect = exports.enterService = exports.engineerDetails = exports.engineer = exports.engineDetail = exports.delOrder = exports.delAdd = exports.defaultAdd = exports.confirmOrder = exports.commentOrder = exports.cancleOrder = exports.cancleCollect = exports.arriveOderLocation = exports.alertOrder = exports.addUpdate = exports.addOrder = exports.addList = exports.addEngineer = exports.addDetails = exports.addCollect = exports.UpdateEngine = void 0;
  17260. var _request = __webpack_require__(/*! ./request */ 130);
  17261. var base = '';
  17262. // 登陆接口
  17263. var requst_post_login = function requst_post_login(data) {
  17264. return (0, _request.postParamsRequest)("/wx/login", data);
  17265. };
  17266. // 图片上传
  17267. exports.requst_post_login = requst_post_login;
  17268. var imgUpload = function imgUpload(data) {
  17269. return (0, _request.postParamsRequest)("/common/upload", data);
  17270. };
  17271. // 轮播图
  17272. exports.imgUpload = imgUpload;
  17273. var slideshow = function slideshow(data) {
  17274. return (0, _request.getRequest)("/api/lbt/v1/getAll", data);
  17275. };
  17276. // 项目
  17277. exports.slideshow = slideshow;
  17278. var project = function project(data) {
  17279. return (0, _request.postRequest)("/api/xiangmu/v1/wx/getAll", data);
  17280. };
  17281. // 项目详情
  17282. exports.project = project;
  17283. var projectDetails = function projectDetails(data) {
  17284. return (0, _request.postRequest)("/api/xiangmu/v1/getByid", data);
  17285. };
  17286. // 理疗师------列表
  17287. exports.projectDetails = projectDetails;
  17288. var engineer = function engineer(data) {
  17289. return (0, _request.getRequest)("/api/js/v1/wx/select", data);
  17290. };
  17291. // 理疗师信息
  17292. exports.engineer = engineer;
  17293. var engineerDetails = function engineerDetails(data) {
  17294. return (0, _request.postRequest)("/api/js/v1/wx/getByid", data);
  17295. };
  17296. //登录 -------用户信息更新
  17297. exports.engineerDetails = engineerDetails;
  17298. var infoUpdate = function infoUpdate(data) {
  17299. return (0, _request.postRequest)("/wx/update", data);
  17300. };
  17301. // 获取用户信息
  17302. exports.infoUpdate = infoUpdate;
  17303. var getInfo = function getInfo(data) {
  17304. return (0, _request.getRequest)("/wx/getUserInfo", data);
  17305. };
  17306. // 添加地址
  17307. exports.getInfo = getInfo;
  17308. var addUpdate = function addUpdate(data) {
  17309. return (0, _request.postRequest)("/tAddress/save", data);
  17310. };
  17311. //修改地址
  17312. exports.addUpdate = addUpdate;
  17313. var updateAdd = function updateAdd(data) {
  17314. return (0, _request.postRequest)("/tAddress/update", data);
  17315. };
  17316. // 地址列表
  17317. exports.updateAdd = updateAdd;
  17318. var addList = function addList(data) {
  17319. return (0, _request.getRequest)("/tAddress/getByOpenId", data);
  17320. };
  17321. // 地址详情
  17322. exports.addList = addList;
  17323. var addDetails = function addDetails(data) {
  17324. return (0, _request.getRequest)("/tAddress/getById", data);
  17325. };
  17326. // 删除地址
  17327. exports.addDetails = addDetails;
  17328. var delAdd = function delAdd(data) {
  17329. return (0, _request.deleteRequest)("/tAddress/delete", data);
  17330. };
  17331. // 设置默认地址
  17332. exports.delAdd = delAdd;
  17333. var defaultAdd = function defaultAdd(data) {
  17334. return (0, _request.postRequest)("/tAddress/defaultAddress", data);
  17335. };
  17336. // 添加技师
  17337. exports.defaultAdd = defaultAdd;
  17338. var addEngineer = function addEngineer(data) {
  17339. return (0, _request.postRequest)("/api/js/v1/wx/add", data);
  17340. };
  17341. // 技师详情
  17342. exports.addEngineer = addEngineer;
  17343. var engineDetail = function engineDetail(data) {
  17344. return (0, _request.postRequest)("/api/js/v1/wx/getByOpenId", data);
  17345. };
  17346. // 修改技师信息
  17347. exports.engineDetail = engineDetail;
  17348. var UpdateEngine = function UpdateEngine(data) {
  17349. return (0, _request.postRequest)("/api/js/v1/wx/update", data);
  17350. };
  17351. // 订单---------分类
  17352. exports.UpdateEngine = UpdateEngine;
  17353. var statusList = function statusList(data) {
  17354. return (0, _request.getRequest)("/api/order/v1/getStatus", data);
  17355. };
  17356. // 订单列表
  17357. exports.statusList = statusList;
  17358. var orderList = function orderList(data) {
  17359. return (0, _request.getRequest)("/api/order/v1/select", data);
  17360. };
  17361. // 创建订单
  17362. exports.orderList = orderList;
  17363. var addOrder = function addOrder(data) {
  17364. return (0, _request.postRequest)("/api/order/v1/wx/add", data);
  17365. };
  17366. // 修改订单
  17367. exports.addOrder = addOrder;
  17368. var updateOrder = function updateOrder(data) {
  17369. return (0, _request.postRequest)("/api/order/v1/update", data);
  17370. };
  17371. // 订单详情
  17372. exports.updateOrder = updateOrder;
  17373. var orderDeatails = function orderDeatails(data) {
  17374. return (0, _request.getRequest)("/api/order/v1/wx/getOrder", data);
  17375. };
  17376. // 取消订单
  17377. exports.orderDeatails = orderDeatails;
  17378. var cancleOrder = function cancleOrder(data) {
  17379. return (0, _request.postRequest)("/api/order/v1/wx/cancle", data);
  17380. };
  17381. // 删除订单
  17382. exports.cancleOrder = cancleOrder;
  17383. var delOrder = function delOrder(data) {
  17384. return (0, _request.postRequest)("/api/order/v1/del", data);
  17385. };
  17386. // 确认服务完成订单
  17387. exports.delOrder = delOrder;
  17388. var confirmOrder = function confirmOrder(data) {
  17389. return (0, _request.postRequest)("/api/order/v1/wx/confirm", data);
  17390. };
  17391. // 评论订单
  17392. exports.confirmOrder = confirmOrder;
  17393. var commentOrder = function commentOrder(data) {
  17394. return (0, _request.postRequest)("/api/comment/v1/wx/add", data);
  17395. };
  17396. // 充值
  17397. exports.commentOrder = commentOrder;
  17398. var pay = function pay(data) {
  17399. return (0, _request.postRequest)("/wx/pay/pay", data);
  17400. };
  17401. // 支付
  17402. exports.pay = pay;
  17403. var payoff = function payoff(data) {
  17404. return (0, _request.postRequest)("/api/order/v1/wx/pay", data);
  17405. };
  17406. // 提现
  17407. exports.payoff = payoff;
  17408. var withdraw = function withdraw(data) {
  17409. return (0, _request.postRequest)("/api/tx/record/wx/applicationCash", data);
  17410. };
  17411. // 添加收藏
  17412. exports.withdraw = withdraw;
  17413. var addCollect = function addCollect(data) {
  17414. return (0, _request.postRequest)("/api/collect/v1/wx/addCollect", data);
  17415. };
  17416. // 取消收藏
  17417. exports.addCollect = addCollect;
  17418. var cancleCollect = function cancleCollect(data) {
  17419. return (0, _request.postRequest)("/api/collect/v1/wx/delCollect", data);
  17420. };
  17421. // 获取收藏列表
  17422. exports.cancleCollect = cancleCollect;
  17423. var getCollect = function getCollect(data) {
  17424. return (0, _request.postRequest)("/api/collect/v1/wx/getCollect", data);
  17425. };
  17426. // 实时更新技师的位置
  17427. exports.getCollect = getCollect;
  17428. var getJsLocation = function getJsLocation(data) {
  17429. return (0, _request.postRequest)("/api/js/v1/wx/updateLocation", data);
  17430. };
  17431. // 接受订单
  17432. exports.getJsLocation = getJsLocation;
  17433. var takeOrder = function takeOrder(data) {
  17434. return (0, _request.postRequest)("/api/order/v1/wx/takingOrders", data);
  17435. };
  17436. // 到达服务订单位置
  17437. exports.takeOrder = takeOrder;
  17438. var arriveOderLocation = function arriveOderLocation(data) {
  17439. return (0, _request.postRequest)("/api/order/v1/wx/reach", data);
  17440. };
  17441. // 开始服务
  17442. exports.arriveOderLocation = arriveOderLocation;
  17443. var enterService = function enterService(data) {
  17444. return (0, _request.postRequest)("/api/order/v1/wx/service", data);
  17445. };
  17446. // 报警
  17447. exports.enterService = enterService;
  17448. var alertOrder = function alertOrder(data) {
  17449. return (0, _request.postRequest)("/ylxAlarm/addAlarm", data);
  17450. };
  17451. //加单
  17452. exports.alertOrder = alertOrder;
  17453. var speedOrder = function speedOrder(data) {
  17454. return (0, _request.postRequest)("/api/order/v1/wx/add", data);
  17455. };
  17456. //获取优惠券v
  17457. exports.speedOrder = speedOrder;
  17458. var getCoupon = function getCoupon(data) {
  17459. return (0, _request.postRequest)("/couponReceive/myCoupon", data);
  17460. };
  17461. //获取二维码
  17462. exports.getCoupon = getCoupon;
  17463. var getwxQrCode = function getwxQrCode(data) {
  17464. return (0, _request.postParamsRequest)("/wx/getwxQrCode", data);
  17465. };
  17466. exports.getwxQrCode = getwxQrCode;
  17467. /***/ }),
  17468. /* 130 */
  17469. /*!*************************************************************!*\
  17470. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/api/request.js ***!
  17471. \*************************************************************/
  17472. /*! no static exports found */
  17473. /***/ (function(module, exports, __webpack_require__) {
  17474. "use strict";
  17475. /* WEBPACK VAR INJECTION */(function(uni, wx) {
  17476. var _index = __webpack_require__(/*! ../api/index */ 129);
  17477. var tokenKey = "access-token";
  17478. var serverUrl = "https://1910ca70.r6.cpolar.top";
  17479. // var serverUrl = "https://test.baoxianzhanggui.com/nightFragrance"; //测试环境
  17480. // 例外不用token的地址
  17481. var exceptionAddrArr = ['/wx/login'
  17482. // '/api/lbt/v1/getAll',
  17483. // '/api/xiangmu/v1/wx/getAll',
  17484. // '/api/js/v1/select',
  17485. // '/api/order/v1/getStatus',
  17486. // '/api/xiangmu/v1/getByid',
  17487. // '/api/js/v1/wx/getByid',
  17488. ];
  17489. /* --------------------------------------------无需登录的接口---------------------------------*/
  17490. /* --------------------------------------------无需登录的接口---------------------------------*/
  17491. //请求头处理函数
  17492. function CreateHeader(url, type) {
  17493. var header = {};
  17494. if (type == 'POST_PARAMS') {
  17495. header = {
  17496. 'content-type': 'application/x-www-form-urlencoded'
  17497. };
  17498. } else if (type == 'FormData') {
  17499. header = {
  17500. 'content-type': 'multipart/form-data'
  17501. };
  17502. } else {
  17503. header = {
  17504. 'content-type': 'application/json'
  17505. };
  17506. }
  17507. if (exceptionAddrArr.indexOf(url) == -1) {
  17508. //排除请求的地址不须要token的地址
  17509. var token = uni.getStorageSync(tokenKey);
  17510. header.Authorization = 'tf:' + token;
  17511. }
  17512. return header;
  17513. console.log(header, 'header');
  17514. }
  17515. //post请求,fomData
  17516. function postRequestFormData(url, data) {
  17517. var header = CreateHeader(url, 'FormData');
  17518. return new Promise(function (resolve, reject) {
  17519. wx.request({
  17520. url: serverUrl + url,
  17521. data: data,
  17522. header: header,
  17523. method: 'POST',
  17524. success: function success(res) {
  17525. if (res.statusCode === 200) {
  17526. if (res.data.code == 401) {
  17527. // 重新登陆
  17528. wx.login({
  17529. success: function success(res) {
  17530. var code = res.code;
  17531. if (code) {
  17532. //将code发送到开发者服务器
  17533. wx.getUserInfo({
  17534. success: function success(res) {
  17535. var encryptedData = res.encryptedData;
  17536. var iv = res.iv;
  17537. (0, _index.requst_post_login)({
  17538. encryptedData: encryptedData,
  17539. iv: iv,
  17540. code: code
  17541. }).then(function (res) {
  17542. if (res.data.data) {
  17543. wx.setStorage({
  17544. key: 'access-token',
  17545. data: res.data.data
  17546. });
  17547. } else {}
  17548. }).catch(function (err) {
  17549. console.log('ajax_err', err);
  17550. });
  17551. }
  17552. });
  17553. }
  17554. }
  17555. });
  17556. // 重新登陆
  17557. } else {
  17558. resolve(res);
  17559. }
  17560. } else {
  17561. reject(res);
  17562. }
  17563. },
  17564. fail: function fail(res) {
  17565. reject(res);
  17566. }
  17567. });
  17568. });
  17569. }
  17570. //post请求,数据在body中
  17571. function postRequest(url, data) {
  17572. var header = CreateHeader(url, 'POST');
  17573. // console.log(header,'header')
  17574. return new Promise(function (resolve, reject) {
  17575. wx.request({
  17576. url: serverUrl + url,
  17577. data: data,
  17578. header: header,
  17579. method: 'POST',
  17580. success: function success(res) {
  17581. if (res.statusCode === 200) {
  17582. if (res.data.code == 401) {
  17583. // 重新登陆
  17584. wx.login({
  17585. success: function success(res) {
  17586. var code = res.code;
  17587. if (code) {
  17588. //将code发送到开发者服务器
  17589. wx.getUserInfo({
  17590. success: function success(res) {
  17591. var encryptedData = res.encryptedData;
  17592. var iv = res.iv;
  17593. (0, _index.requst_post_login)({
  17594. encryptedData: encryptedData,
  17595. iv: iv,
  17596. code: code
  17597. }).then(function (res) {
  17598. if (res.data.data) {
  17599. wx.setStorage({
  17600. key: 'access-token',
  17601. data: res.data.data
  17602. });
  17603. } else {}
  17604. }).catch(function (err) {
  17605. console.log('ajax_err', err);
  17606. });
  17607. }
  17608. });
  17609. }
  17610. }
  17611. });
  17612. // 重新登陆
  17613. } else {
  17614. resolve(res);
  17615. }
  17616. } else {
  17617. reject(res);
  17618. }
  17619. },
  17620. fail: function fail(res) {
  17621. reject(res);
  17622. }
  17623. });
  17624. });
  17625. }
  17626. //post请求,数据按照query方式传给后端
  17627. function postParamsRequest(url, data) {
  17628. var header = CreateHeader(url, 'POST_PARAMS');
  17629. var useurl = url;
  17630. return new Promise(function (resolve, reject) {
  17631. wx.request({
  17632. url: serverUrl + useurl,
  17633. data: data,
  17634. header: header,
  17635. method: 'POST',
  17636. success: function success(res) {
  17637. // console.log(res, '1212')
  17638. if (res.statusCode === 200) {
  17639. if (res.data.code == 401) {
  17640. // 重新登陆
  17641. wx.login({
  17642. success: function success(res) {
  17643. var code = res.code;
  17644. if (code) {
  17645. //将code发送到开发者服务器
  17646. wx.getUserInfo({
  17647. success: function success(res) {
  17648. var encryptedData = res.encryptedData;
  17649. var iv = res.iv;
  17650. (0, _index.requst_post_login)({
  17651. encryptedData: encryptedData,
  17652. iv: iv,
  17653. code: code
  17654. }).then(function (res) {
  17655. if (res.data.data) {
  17656. wx.setStorage({
  17657. key: 'access-token',
  17658. data: res.data.data
  17659. });
  17660. } else {}
  17661. }).catch(function (err) {
  17662. console.log('ajax_err', err);
  17663. });
  17664. }
  17665. });
  17666. }
  17667. }
  17668. });
  17669. // 重新登陆
  17670. } else {
  17671. resolve(res);
  17672. }
  17673. } else {
  17674. reject(res);
  17675. }
  17676. },
  17677. fail: function fail(res) {
  17678. reject(res);
  17679. }
  17680. });
  17681. });
  17682. }
  17683. //get 请求
  17684. function getRequest(url, data) {
  17685. var header = CreateHeader(url, 'GET');
  17686. // console.log(header,'exceptionAddrArr')
  17687. return new Promise(function (resolve, reject) {
  17688. wx.request({
  17689. url: serverUrl + url,
  17690. data: data,
  17691. header: header,
  17692. method: 'GET',
  17693. success: function success(res) {
  17694. if (res.statusCode === 200) {
  17695. if (res.data.code == 401) {
  17696. // 重新登陆
  17697. wx.login({
  17698. success: function success(res) {
  17699. var code = res.code;
  17700. if (code) {
  17701. //将code发送到开发者服务器
  17702. wx.getUserInfo({
  17703. success: function success(res) {
  17704. var encryptedData = res.encryptedData;
  17705. var iv = res.iv;
  17706. (0, _index.requst_post_login)({
  17707. encryptedData: encryptedData,
  17708. iv: iv,
  17709. code: code
  17710. }).then(function (res) {
  17711. if (res.data.data) {
  17712. wx.setStorage({
  17713. key: 'access-token',
  17714. data: res.data.data.token
  17715. });
  17716. } else {}
  17717. }).catch(function (err) {
  17718. console.log('ajax_err', err);
  17719. });
  17720. }
  17721. });
  17722. }
  17723. }
  17724. });
  17725. // 重新登陆
  17726. } else {
  17727. resolve(res);
  17728. }
  17729. } else {
  17730. reject(res);
  17731. }
  17732. },
  17733. fail: function fail(res) {
  17734. reject(res);
  17735. }
  17736. });
  17737. });
  17738. }
  17739. //put请求
  17740. function putRequest(url, data) {
  17741. var header = CreateHeader(url, 'PUT');
  17742. return new Promise(function (resolve, reject) {
  17743. wx.request({
  17744. url: serverUrl + url,
  17745. data: data,
  17746. header: header,
  17747. method: 'PUT',
  17748. success: function success(res) {
  17749. if (res.statusCode === 200) {
  17750. if (res.data.code == 401) {
  17751. // 重新登陆
  17752. wx.login({
  17753. success: function success(res) {
  17754. var code = res.code;
  17755. if (code) {
  17756. //将code发送到开发者服务器
  17757. wx.getUserInfo({
  17758. success: function success(res) {
  17759. var encryptedData = res.encryptedData;
  17760. var iv = res.iv;
  17761. (0, _index.requst_post_login)({
  17762. encryptedData: encryptedData,
  17763. iv: iv,
  17764. code: code
  17765. }).then(function (res) {
  17766. if (res.data.data) {
  17767. wx.setStorage({
  17768. key: 'access-token',
  17769. data: res.data.data
  17770. });
  17771. } else {}
  17772. }).catch(function (err) {
  17773. console.log('ajax_err', err);
  17774. });
  17775. }
  17776. });
  17777. }
  17778. }
  17779. });
  17780. // 重新登陆
  17781. } else {
  17782. resolve(res);
  17783. }
  17784. } else {
  17785. reject(res);
  17786. }
  17787. },
  17788. fail: function fail(res) {
  17789. reject(res);
  17790. }
  17791. });
  17792. });
  17793. }
  17794. //delete请求
  17795. function deleteRequest(url, data) {
  17796. var header = CreateHeader(url, 'POST_PARAMS');
  17797. console.log(header, "delete");
  17798. return new Promise(function (resolve, reject) {
  17799. wx.request({
  17800. url: serverUrl + url,
  17801. data: data,
  17802. header: header,
  17803. method: 'DELETE',
  17804. success: function success(res) {
  17805. if (res.statusCode === 200) {
  17806. //200: 服务端业务处理正常结束
  17807. resolve(res);
  17808. } else {
  17809. reject(res);
  17810. }
  17811. },
  17812. fail: function fail(res) {
  17813. reject(res);
  17814. }
  17815. });
  17816. });
  17817. }
  17818. module.exports.getRequest = getRequest;
  17819. module.exports.postRequest = postRequest;
  17820. module.exports.postRequestFormData = postRequestFormData;
  17821. module.exports.postParamsRequest = postParamsRequest;
  17822. module.exports.putRequest = putRequest;
  17823. module.exports.deleteRequest = deleteRequest;
  17824. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  17825. /***/ }),
  17826. /* 131 */,
  17827. /* 132 */,
  17828. /* 133 */,
  17829. /* 134 */,
  17830. /* 135 */,
  17831. /* 136 */,
  17832. /* 137 */,
  17833. /* 138 */,
  17834. /* 139 */,
  17835. /* 140 */,
  17836. /* 141 */,
  17837. /* 142 */,
  17838. /* 143 */,
  17839. /* 144 */,
  17840. /* 145 */,
  17841. /* 146 */,
  17842. /* 147 */,
  17843. /* 148 */,
  17844. /* 149 */,
  17845. /* 150 */,
  17846. /* 151 */,
  17847. /* 152 */,
  17848. /* 153 */,
  17849. /* 154 */,
  17850. /* 155 */
  17851. /*!********************************************************!*\
  17852. !*** D:/Desktop/yelaixiangApp/yelaixiang-h5/api/my.js ***!
  17853. \********************************************************/
  17854. /*! no static exports found */
  17855. /***/ (function(module, exports, __webpack_require__) {
  17856. "use strict";
  17857. Object.defineProperty(exports, "__esModule", {
  17858. value: true
  17859. });
  17860. exports.wxGetCode = void 0;
  17861. var _request = __webpack_require__(/*! ./request */ 130);
  17862. var base = '';
  17863. // 登陆接口
  17864. var wxGetCode = function wxGetCode(data) {
  17865. return (0, _request.getRequest)("/weChat/getCode", data);
  17866. };
  17867. exports.wxGetCode = wxGetCode;
  17868. /***/ })
  17869. ]]);
  17870. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map