vendor.js 581 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!*********************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  5. \*********************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", {
  10. value: true
  11. });
  12. exports.default = void 0;
  13. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  14. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  15. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  16. return this;
  17. }();
  18. var key = ['w', 'x'].join('');
  19. var oldWx = target[key];
  20. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  21. function isWxKey(key) {
  22. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  23. return false;
  24. }
  25. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  26. }
  27. function initWx() {
  28. var newWx = {};
  29. for (var _key in oldWx) {
  30. if (isWxKey(_key)) {
  31. // TODO wrapper function
  32. newWx[_key] = oldWx[_key];
  33. }
  34. }
  35. return newWx;
  36. }
  37. target[key] = initWx();
  38. var _default = target[key];
  39. exports.default = _default;
  40. /***/ }),
  41. /***/ 10:
  42. /*!****************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  44. \****************************************************************/
  45. /*! no static exports found */
  46. /***/ (function(module, exports) {
  47. function _nonIterableRest() {
  48. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  49. }
  50. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  51. /***/ }),
  52. /***/ 108:
  53. /*!**********************************************!*\
  54. !*** E:/项目/2023-8/xyl/utils/wxMinProgram.js ***!
  55. \**********************************************/
  56. /*! no static exports found */
  57. /***/ (function(module, exports, __webpack_require__) {
  58. "use strict";
  59. /* WEBPACK VAR INJECTION */(function(uni, wx) {
  60. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  61. Object.defineProperty(exports, "__esModule", {
  62. value: true
  63. });
  64. exports.loginWinxinMp = loginWinxinMp;
  65. var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 27));
  66. //微信登录
  67. /**
  68. * @param {string} 当前页面地址信息
  69. */
  70. function loginWinxinMp() {
  71. var pages = getCurrentPages();
  72. // 获取跳转前页面
  73. var page = pages[pages.length - 2];
  74. var queryUrl = '';
  75. for (var key in page.options) {
  76. queryUrl += key + '=' + page.options[key] + "&";
  77. }
  78. // 获取当页面路由地址
  79. var path = '/' + page.route + '?' + queryUrl;
  80. // 保存跳转前页面
  81. uni.setStorageSync('present', path);
  82. return new Promise(function (resolve, reject) {
  83. wx.login({
  84. success: function success(e) {
  85. // uni.showModal({
  86. // title:'zhi1',
  87. // content:JSON.stringify(e)
  88. // })
  89. console.log(e);
  90. resolve(e);
  91. },
  92. fill: function fill(e) {
  93. reject(e);
  94. }
  95. });
  96. });
  97. }
  98. ;
  99. /* 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"]))
  100. /***/ }),
  101. /***/ 109:
  102. /*!**********************************!*\
  103. !*** E:/项目/2023-8/xyl/api/wx.js ***!
  104. \**********************************/
  105. /*! no static exports found */
  106. /***/ (function(module, exports, __webpack_require__) {
  107. "use strict";
  108. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  109. Object.defineProperty(exports, "__esModule", {
  110. value: true
  111. });
  112. exports.wechatMpAuth = wechatMpAuth;
  113. var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 46));
  114. // 微信code地址
  115. function wechatMpAuth(data) {
  116. return (0, _request.default)({
  117. url: '/api/wechat/mp_auth',
  118. method: 'post',
  119. data: data
  120. });
  121. }
  122. /***/ }),
  123. /***/ 11:
  124. /*!***************************************************************!*\
  125. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  126. \***************************************************************/
  127. /*! no static exports found */
  128. /***/ (function(module, exports, __webpack_require__) {
  129. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  130. function _defineProperty(obj, key, value) {
  131. key = toPropertyKey(key);
  132. if (key in obj) {
  133. Object.defineProperty(obj, key, {
  134. value: value,
  135. enumerable: true,
  136. configurable: true,
  137. writable: true
  138. });
  139. } else {
  140. obj[key] = value;
  141. }
  142. return obj;
  143. }
  144. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  145. /***/ }),
  146. /***/ 12:
  147. /*!**************************************************************!*\
  148. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  149. \**************************************************************/
  150. /*! no static exports found */
  151. /***/ (function(module, exports, __webpack_require__) {
  152. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  153. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  154. function _toPropertyKey(arg) {
  155. var key = toPrimitive(arg, "string");
  156. return _typeof(key) === "symbol" ? key : String(key);
  157. }
  158. module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  159. /***/ }),
  160. /***/ 13:
  161. /*!*******************************************************!*\
  162. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  163. \*******************************************************/
  164. /*! no static exports found */
  165. /***/ (function(module, exports) {
  166. function _typeof(obj) {
  167. "@babel/helpers - typeof";
  168. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  169. return typeof obj;
  170. } : function (obj) {
  171. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  172. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
  173. }
  174. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  175. /***/ }),
  176. /***/ 14:
  177. /*!************************************************************!*\
  178. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  179. \************************************************************/
  180. /*! no static exports found */
  181. /***/ (function(module, exports, __webpack_require__) {
  182. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  183. function _toPrimitive(input, hint) {
  184. if (_typeof(input) !== "object" || input === null) return input;
  185. var prim = input[Symbol.toPrimitive];
  186. if (prim !== undefined) {
  187. var res = prim.call(input, hint || "default");
  188. if (_typeof(res) !== "object") return res;
  189. throw new TypeError("@@toPrimitive must return a primitive value.");
  190. }
  191. return (hint === "string" ? String : Number)(input);
  192. }
  193. module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  194. /***/ }),
  195. /***/ 15:
  196. /*!**********************************************************!*\
  197. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  198. \**********************************************************/
  199. /*! no static exports found */
  200. /***/ (function(module, exports, __webpack_require__) {
  201. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  202. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  203. function _construct(Parent, args, Class) {
  204. if (isNativeReflectConstruct()) {
  205. module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
  206. } else {
  207. module.exports = _construct = function _construct(Parent, args, Class) {
  208. var a = [null];
  209. a.push.apply(a, args);
  210. var Constructor = Function.bind.apply(Parent, a);
  211. var instance = new Constructor();
  212. if (Class) setPrototypeOf(instance, Class.prototype);
  213. return instance;
  214. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  215. }
  216. return _construct.apply(null, arguments);
  217. }
  218. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  219. /***/ }),
  220. /***/ 158:
  221. /*!***********************************!*\
  222. !*** E:/项目/2023-8/xyl/api/set.js ***!
  223. \***********************************/
  224. /*! no static exports found */
  225. /***/ (function(module, exports, __webpack_require__) {
  226. "use strict";
  227. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  228. Object.defineProperty(exports, "__esModule", {
  229. value: true
  230. });
  231. exports.binding = binding;
  232. exports.logout = logout;
  233. exports.registerReset = registerReset;
  234. exports.userEdit = userEdit;
  235. var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 46));
  236. // 修改用户信息
  237. function userEdit(data) {
  238. return (0, _request.default)({
  239. url: '/api/user/edit',
  240. method: 'post',
  241. data: data
  242. });
  243. }
  244. //退出登录
  245. function logout(data) {
  246. return (0, _request.default)({
  247. url: '/api/logout',
  248. method: 'get',
  249. data: data
  250. });
  251. }
  252. //修改密码
  253. function registerReset(data) {
  254. return (0, _request.default)({
  255. url: '/api/register/reset',
  256. method: 'post',
  257. data: data
  258. });
  259. }
  260. //绑定手机
  261. function binding(data) {
  262. return (0, _request.default)({
  263. url: '/api/binding',
  264. method: 'post',
  265. data: data
  266. });
  267. }
  268. /***/ }),
  269. /***/ 16:
  270. /*!***************************************************************!*\
  271. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  272. \***************************************************************/
  273. /*! no static exports found */
  274. /***/ (function(module, exports) {
  275. function _setPrototypeOf(o, p) {
  276. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  277. o.__proto__ = p;
  278. return o;
  279. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  280. return _setPrototypeOf(o, p);
  281. }
  282. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  283. /***/ }),
  284. /***/ 17:
  285. /*!*************************************************************************!*\
  286. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  287. \*************************************************************************/
  288. /*! no static exports found */
  289. /***/ (function(module, exports) {
  290. function _isNativeReflectConstruct() {
  291. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  292. if (Reflect.construct.sham) return false;
  293. if (typeof Proxy === "function") return true;
  294. try {
  295. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  296. return true;
  297. } catch (e) {
  298. return false;
  299. }
  300. }
  301. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  302. /***/ }),
  303. /***/ 18:
  304. /*!******************************************************************!*\
  305. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  306. \******************************************************************/
  307. /*! no static exports found */
  308. /***/ (function(module, exports, __webpack_require__) {
  309. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  310. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  311. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  312. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  313. function _toConsumableArray(arr) {
  314. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  315. }
  316. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  317. /***/ }),
  318. /***/ 19:
  319. /*!******************************************************************!*\
  320. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  321. \******************************************************************/
  322. /*! no static exports found */
  323. /***/ (function(module, exports, __webpack_require__) {
  324. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  325. function _arrayWithoutHoles(arr) {
  326. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  327. }
  328. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  329. /***/ }),
  330. /***/ 2:
  331. /*!************************************************************!*\
  332. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  333. \************************************************************/
  334. /*! no static exports found */
  335. /***/ (function(module, exports, __webpack_require__) {
  336. "use strict";
  337. /* WEBPACK VAR INJECTION */(function(wx, global) {
  338. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  339. Object.defineProperty(exports, "__esModule", {
  340. value: true
  341. });
  342. exports.createApp = createApp;
  343. exports.createComponent = createComponent;
  344. exports.createPage = createPage;
  345. exports.createPlugin = createPlugin;
  346. exports.createSubpackageApp = createSubpackageApp;
  347. exports.default = void 0;
  348. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  349. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  350. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  351. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  352. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  353. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  354. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  355. 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; }
  356. 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; }
  357. var realAtob;
  358. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  359. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  360. if (typeof atob !== 'function') {
  361. realAtob = function realAtob(str) {
  362. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  363. if (!b64re.test(str)) {
  364. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  365. }
  366. // Adding the padding if missing, for semplicity
  367. str += '=='.slice(2 - (str.length & 3));
  368. var bitmap;
  369. var result = '';
  370. var r1;
  371. var r2;
  372. var i = 0;
  373. for (; i < str.length;) {
  374. 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++)));
  375. 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);
  376. }
  377. return result;
  378. };
  379. } else {
  380. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  381. realAtob = atob;
  382. }
  383. function b64DecodeUnicode(str) {
  384. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  385. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  386. }).join(''));
  387. }
  388. function getCurrentUserInfo() {
  389. var token = wx.getStorageSync('uni_id_token') || '';
  390. var tokenArr = token.split('.');
  391. if (!token || tokenArr.length !== 3) {
  392. return {
  393. uid: null,
  394. role: [],
  395. permission: [],
  396. tokenExpired: 0
  397. };
  398. }
  399. var userInfo;
  400. try {
  401. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  402. } catch (error) {
  403. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  404. }
  405. userInfo.tokenExpired = userInfo.exp * 1000;
  406. delete userInfo.exp;
  407. delete userInfo.iat;
  408. return userInfo;
  409. }
  410. function uniIdMixin(Vue) {
  411. Vue.prototype.uniIDHasRole = function (roleId) {
  412. var _getCurrentUserInfo = getCurrentUserInfo(),
  413. role = _getCurrentUserInfo.role;
  414. return role.indexOf(roleId) > -1;
  415. };
  416. Vue.prototype.uniIDHasPermission = function (permissionId) {
  417. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  418. permission = _getCurrentUserInfo2.permission;
  419. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  420. };
  421. Vue.prototype.uniIDTokenValid = function () {
  422. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  423. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  424. return tokenExpired > Date.now();
  425. };
  426. }
  427. var _toString = Object.prototype.toString;
  428. var hasOwnProperty = Object.prototype.hasOwnProperty;
  429. function isFn(fn) {
  430. return typeof fn === 'function';
  431. }
  432. function isStr(str) {
  433. return typeof str === 'string';
  434. }
  435. function isObject(obj) {
  436. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  437. }
  438. function isPlainObject(obj) {
  439. return _toString.call(obj) === '[object Object]';
  440. }
  441. function hasOwn(obj, key) {
  442. return hasOwnProperty.call(obj, key);
  443. }
  444. function noop() {}
  445. /**
  446. * Create a cached version of a pure function.
  447. */
  448. function cached(fn) {
  449. var cache = Object.create(null);
  450. return function cachedFn(str) {
  451. var hit = cache[str];
  452. return hit || (cache[str] = fn(str));
  453. };
  454. }
  455. /**
  456. * Camelize a hyphen-delimited string.
  457. */
  458. var camelizeRE = /-(\w)/g;
  459. var camelize = cached(function (str) {
  460. return str.replace(camelizeRE, function (_, c) {
  461. return c ? c.toUpperCase() : '';
  462. });
  463. });
  464. function sortObject(obj) {
  465. var sortObj = {};
  466. if (isPlainObject(obj)) {
  467. Object.keys(obj).sort().forEach(function (key) {
  468. sortObj[key] = obj[key];
  469. });
  470. }
  471. return !Object.keys(sortObj) ? obj : sortObj;
  472. }
  473. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  474. var globalInterceptors = {};
  475. var scopedInterceptors = {};
  476. function mergeHook(parentVal, childVal) {
  477. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  478. return res ? dedupeHooks(res) : res;
  479. }
  480. function dedupeHooks(hooks) {
  481. var res = [];
  482. for (var i = 0; i < hooks.length; i++) {
  483. if (res.indexOf(hooks[i]) === -1) {
  484. res.push(hooks[i]);
  485. }
  486. }
  487. return res;
  488. }
  489. function removeHook(hooks, hook) {
  490. var index = hooks.indexOf(hook);
  491. if (index !== -1) {
  492. hooks.splice(index, 1);
  493. }
  494. }
  495. function mergeInterceptorHook(interceptor, option) {
  496. Object.keys(option).forEach(function (hook) {
  497. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  498. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  499. }
  500. });
  501. }
  502. function removeInterceptorHook(interceptor, option) {
  503. if (!interceptor || !option) {
  504. return;
  505. }
  506. Object.keys(option).forEach(function (hook) {
  507. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  508. removeHook(interceptor[hook], option[hook]);
  509. }
  510. });
  511. }
  512. function addInterceptor(method, option) {
  513. if (typeof method === 'string' && isPlainObject(option)) {
  514. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  515. } else if (isPlainObject(method)) {
  516. mergeInterceptorHook(globalInterceptors, method);
  517. }
  518. }
  519. function removeInterceptor(method, option) {
  520. if (typeof method === 'string') {
  521. if (isPlainObject(option)) {
  522. removeInterceptorHook(scopedInterceptors[method], option);
  523. } else {
  524. delete scopedInterceptors[method];
  525. }
  526. } else if (isPlainObject(method)) {
  527. removeInterceptorHook(globalInterceptors, method);
  528. }
  529. }
  530. function wrapperHook(hook, params) {
  531. return function (data) {
  532. return hook(data, params) || data;
  533. };
  534. }
  535. function isPromise(obj) {
  536. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  537. }
  538. function queue(hooks, data, params) {
  539. var promise = false;
  540. for (var i = 0; i < hooks.length; i++) {
  541. var hook = hooks[i];
  542. if (promise) {
  543. promise = Promise.resolve(wrapperHook(hook, params));
  544. } else {
  545. var res = hook(data, params);
  546. if (isPromise(res)) {
  547. promise = Promise.resolve(res);
  548. }
  549. if (res === false) {
  550. return {
  551. then: function then() {}
  552. };
  553. }
  554. }
  555. }
  556. return promise || {
  557. then: function then(callback) {
  558. return callback(data);
  559. }
  560. };
  561. }
  562. function wrapperOptions(interceptor) {
  563. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  564. ['success', 'fail', 'complete'].forEach(function (name) {
  565. if (Array.isArray(interceptor[name])) {
  566. var oldCallback = options[name];
  567. options[name] = function callbackInterceptor(res) {
  568. queue(interceptor[name], res, options).then(function (res) {
  569. /* eslint-disable no-mixed-operators */
  570. return isFn(oldCallback) && oldCallback(res) || res;
  571. });
  572. };
  573. }
  574. });
  575. return options;
  576. }
  577. function wrapperReturnValue(method, returnValue) {
  578. var returnValueHooks = [];
  579. if (Array.isArray(globalInterceptors.returnValue)) {
  580. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  581. }
  582. var interceptor = scopedInterceptors[method];
  583. if (interceptor && Array.isArray(interceptor.returnValue)) {
  584. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  585. }
  586. returnValueHooks.forEach(function (hook) {
  587. returnValue = hook(returnValue) || returnValue;
  588. });
  589. return returnValue;
  590. }
  591. function getApiInterceptorHooks(method) {
  592. var interceptor = Object.create(null);
  593. Object.keys(globalInterceptors).forEach(function (hook) {
  594. if (hook !== 'returnValue') {
  595. interceptor[hook] = globalInterceptors[hook].slice();
  596. }
  597. });
  598. var scopedInterceptor = scopedInterceptors[method];
  599. if (scopedInterceptor) {
  600. Object.keys(scopedInterceptor).forEach(function (hook) {
  601. if (hook !== 'returnValue') {
  602. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  603. }
  604. });
  605. }
  606. return interceptor;
  607. }
  608. function invokeApi(method, api, options) {
  609. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  610. params[_key - 3] = arguments[_key];
  611. }
  612. var interceptor = getApiInterceptorHooks(method);
  613. if (interceptor && Object.keys(interceptor).length) {
  614. if (Array.isArray(interceptor.invoke)) {
  615. var res = queue(interceptor.invoke, options);
  616. return res.then(function (options) {
  617. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  618. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  619. });
  620. } else {
  621. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  622. }
  623. }
  624. return api.apply(void 0, [options].concat(params));
  625. }
  626. var promiseInterceptor = {
  627. returnValue: function returnValue(res) {
  628. if (!isPromise(res)) {
  629. return res;
  630. }
  631. return new Promise(function (resolve, reject) {
  632. res.then(function (res) {
  633. if (res[0]) {
  634. reject(res[0]);
  635. } else {
  636. resolve(res[1]);
  637. }
  638. });
  639. });
  640. }
  641. };
  642. 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/;
  643. var CONTEXT_API_RE = /^create|Manager$/;
  644. // Context例外情况
  645. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  646. // 同步例外情况
  647. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  648. var CALLBACK_API_RE = /^on|^off/;
  649. function isContextApi(name) {
  650. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  651. }
  652. function isSyncApi(name) {
  653. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  654. }
  655. function isCallbackApi(name) {
  656. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  657. }
  658. function handlePromise(promise) {
  659. return promise.then(function (data) {
  660. return [null, data];
  661. }).catch(function (err) {
  662. return [err];
  663. });
  664. }
  665. function shouldPromise(name) {
  666. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  667. return false;
  668. }
  669. return true;
  670. }
  671. /* eslint-disable no-extend-native */
  672. if (!Promise.prototype.finally) {
  673. Promise.prototype.finally = function (callback) {
  674. var promise = this.constructor;
  675. return this.then(function (value) {
  676. return promise.resolve(callback()).then(function () {
  677. return value;
  678. });
  679. }, function (reason) {
  680. return promise.resolve(callback()).then(function () {
  681. throw reason;
  682. });
  683. });
  684. };
  685. }
  686. function promisify(name, api) {
  687. if (!shouldPromise(name) || !isFn(api)) {
  688. return api;
  689. }
  690. return function promiseApi() {
  691. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  692. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  693. params[_key2 - 1] = arguments[_key2];
  694. }
  695. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  696. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  697. }
  698. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  699. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  700. success: resolve,
  701. fail: reject
  702. })].concat(params));
  703. })));
  704. };
  705. }
  706. var EPS = 1e-4;
  707. var BASE_DEVICE_WIDTH = 750;
  708. var isIOS = false;
  709. var deviceWidth = 0;
  710. var deviceDPR = 0;
  711. function checkDeviceWidth() {
  712. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  713. platform = _wx$getSystemInfoSync.platform,
  714. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  715. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  716. deviceWidth = windowWidth;
  717. deviceDPR = pixelRatio;
  718. isIOS = platform === 'ios';
  719. }
  720. function upx2px(number, newDeviceWidth) {
  721. if (deviceWidth === 0) {
  722. checkDeviceWidth();
  723. }
  724. number = Number(number);
  725. if (number === 0) {
  726. return 0;
  727. }
  728. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  729. if (result < 0) {
  730. result = -result;
  731. }
  732. result = Math.floor(result + EPS);
  733. if (result === 0) {
  734. if (deviceDPR === 1 || !isIOS) {
  735. result = 1;
  736. } else {
  737. result = 0.5;
  738. }
  739. }
  740. return number < 0 ? -result : result;
  741. }
  742. var LOCALE_ZH_HANS = 'zh-Hans';
  743. var LOCALE_ZH_HANT = 'zh-Hant';
  744. var LOCALE_EN = 'en';
  745. var LOCALE_FR = 'fr';
  746. var LOCALE_ES = 'es';
  747. var messages = {};
  748. var locale;
  749. {
  750. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  751. }
  752. function initI18nMessages() {
  753. if (!isEnableLocale()) {
  754. return;
  755. }
  756. var localeKeys = Object.keys(__uniConfig.locales);
  757. if (localeKeys.length) {
  758. localeKeys.forEach(function (locale) {
  759. var curMessages = messages[locale];
  760. var userMessages = __uniConfig.locales[locale];
  761. if (curMessages) {
  762. Object.assign(curMessages, userMessages);
  763. } else {
  764. messages[locale] = userMessages;
  765. }
  766. });
  767. }
  768. }
  769. initI18nMessages();
  770. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  771. var t = i18n.t;
  772. var i18nMixin = i18n.mixin = {
  773. beforeCreate: function beforeCreate() {
  774. var _this = this;
  775. var unwatch = i18n.i18n.watchLocale(function () {
  776. _this.$forceUpdate();
  777. });
  778. this.$once('hook:beforeDestroy', function () {
  779. unwatch();
  780. });
  781. },
  782. methods: {
  783. $$t: function $$t(key, values) {
  784. return t(key, values);
  785. }
  786. }
  787. };
  788. var setLocale = i18n.setLocale;
  789. var getLocale = i18n.getLocale;
  790. function initAppLocale(Vue, appVm, locale) {
  791. var state = Vue.observable({
  792. locale: locale || i18n.getLocale()
  793. });
  794. var localeWatchers = [];
  795. appVm.$watchLocale = function (fn) {
  796. localeWatchers.push(fn);
  797. };
  798. Object.defineProperty(appVm, '$locale', {
  799. get: function get() {
  800. return state.locale;
  801. },
  802. set: function set(v) {
  803. state.locale = v;
  804. localeWatchers.forEach(function (watch) {
  805. return watch(v);
  806. });
  807. }
  808. });
  809. }
  810. function isEnableLocale() {
  811. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  812. }
  813. function include(str, parts) {
  814. return !!parts.find(function (part) {
  815. return str.indexOf(part) !== -1;
  816. });
  817. }
  818. function startsWith(str, parts) {
  819. return parts.find(function (part) {
  820. return str.indexOf(part) === 0;
  821. });
  822. }
  823. function normalizeLocale(locale, messages) {
  824. if (!locale) {
  825. return;
  826. }
  827. locale = locale.trim().replace(/_/g, '-');
  828. if (messages && messages[locale]) {
  829. return locale;
  830. }
  831. locale = locale.toLowerCase();
  832. if (locale === 'chinese') {
  833. // 支付宝
  834. return LOCALE_ZH_HANS;
  835. }
  836. if (locale.indexOf('zh') === 0) {
  837. if (locale.indexOf('-hans') > -1) {
  838. return LOCALE_ZH_HANS;
  839. }
  840. if (locale.indexOf('-hant') > -1) {
  841. return LOCALE_ZH_HANT;
  842. }
  843. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  844. return LOCALE_ZH_HANT;
  845. }
  846. return LOCALE_ZH_HANS;
  847. }
  848. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  849. if (lang) {
  850. return lang;
  851. }
  852. }
  853. // export function initI18n() {
  854. // const localeKeys = Object.keys(__uniConfig.locales || {})
  855. // if (localeKeys.length) {
  856. // localeKeys.forEach((locale) =>
  857. // i18n.add(locale, __uniConfig.locales[locale])
  858. // )
  859. // }
  860. // }
  861. function getLocale$1() {
  862. // 优先使用 $locale
  863. if (isFn(getApp)) {
  864. var app = getApp({
  865. allowDefault: true
  866. });
  867. if (app && app.$vm) {
  868. return app.$vm.$locale;
  869. }
  870. }
  871. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  872. }
  873. function setLocale$1(locale) {
  874. var app = isFn(getApp) ? getApp() : false;
  875. if (!app) {
  876. return false;
  877. }
  878. var oldLocale = app.$vm.$locale;
  879. if (oldLocale !== locale) {
  880. app.$vm.$locale = locale;
  881. onLocaleChangeCallbacks.forEach(function (fn) {
  882. return fn({
  883. locale: locale
  884. });
  885. });
  886. return true;
  887. }
  888. return false;
  889. }
  890. var onLocaleChangeCallbacks = [];
  891. function onLocaleChange(fn) {
  892. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  893. onLocaleChangeCallbacks.push(fn);
  894. }
  895. }
  896. if (typeof global !== 'undefined') {
  897. global.getLocale = getLocale$1;
  898. }
  899. var interceptors = {
  900. promiseInterceptor: promiseInterceptor
  901. };
  902. var baseApi = /*#__PURE__*/Object.freeze({
  903. __proto__: null,
  904. upx2px: upx2px,
  905. getLocale: getLocale$1,
  906. setLocale: setLocale$1,
  907. onLocaleChange: onLocaleChange,
  908. addInterceptor: addInterceptor,
  909. removeInterceptor: removeInterceptor,
  910. interceptors: interceptors
  911. });
  912. function findExistsPageIndex(url) {
  913. var pages = getCurrentPages();
  914. var len = pages.length;
  915. while (len--) {
  916. var page = pages[len];
  917. if (page.$page && page.$page.fullPath === url) {
  918. return len;
  919. }
  920. }
  921. return -1;
  922. }
  923. var redirectTo = {
  924. name: function name(fromArgs) {
  925. if (fromArgs.exists === 'back' && fromArgs.delta) {
  926. return 'navigateBack';
  927. }
  928. return 'redirectTo';
  929. },
  930. args: function args(fromArgs) {
  931. if (fromArgs.exists === 'back' && fromArgs.url) {
  932. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  933. if (existsPageIndex !== -1) {
  934. var delta = getCurrentPages().length - 1 - existsPageIndex;
  935. if (delta > 0) {
  936. fromArgs.delta = delta;
  937. }
  938. }
  939. }
  940. }
  941. };
  942. var previewImage = {
  943. args: function args(fromArgs) {
  944. var currentIndex = parseInt(fromArgs.current);
  945. if (isNaN(currentIndex)) {
  946. return;
  947. }
  948. var urls = fromArgs.urls;
  949. if (!Array.isArray(urls)) {
  950. return;
  951. }
  952. var len = urls.length;
  953. if (!len) {
  954. return;
  955. }
  956. if (currentIndex < 0) {
  957. currentIndex = 0;
  958. } else if (currentIndex >= len) {
  959. currentIndex = len - 1;
  960. }
  961. if (currentIndex > 0) {
  962. fromArgs.current = urls[currentIndex];
  963. fromArgs.urls = urls.filter(function (item, index) {
  964. return index < currentIndex ? item !== urls[currentIndex] : true;
  965. });
  966. } else {
  967. fromArgs.current = urls[0];
  968. }
  969. return {
  970. indicator: false,
  971. loop: false
  972. };
  973. }
  974. };
  975. var UUID_KEY = '__DC_STAT_UUID';
  976. var deviceId;
  977. function useDeviceId(result) {
  978. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  979. if (!deviceId) {
  980. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  981. wx.setStorage({
  982. key: UUID_KEY,
  983. data: deviceId
  984. });
  985. }
  986. result.deviceId = deviceId;
  987. }
  988. function addSafeAreaInsets(result) {
  989. if (result.safeArea) {
  990. var safeArea = result.safeArea;
  991. result.safeAreaInsets = {
  992. top: safeArea.top,
  993. left: safeArea.left,
  994. right: result.windowWidth - safeArea.right,
  995. bottom: result.screenHeight - safeArea.bottom
  996. };
  997. }
  998. }
  999. function populateParameters(result) {
  1000. var _result$brand = result.brand,
  1001. brand = _result$brand === void 0 ? '' : _result$brand,
  1002. _result$model = result.model,
  1003. model = _result$model === void 0 ? '' : _result$model,
  1004. _result$system = result.system,
  1005. system = _result$system === void 0 ? '' : _result$system,
  1006. _result$language = result.language,
  1007. language = _result$language === void 0 ? '' : _result$language,
  1008. theme = result.theme,
  1009. version = result.version,
  1010. platform = result.platform,
  1011. fontSizeSetting = result.fontSizeSetting,
  1012. SDKVersion = result.SDKVersion,
  1013. pixelRatio = result.pixelRatio,
  1014. deviceOrientation = result.deviceOrientation;
  1015. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  1016. var extraParam = {};
  1017. // osName osVersion
  1018. var osName = '';
  1019. var osVersion = '';
  1020. {
  1021. osName = system.split(' ')[0] || '';
  1022. osVersion = system.split(' ')[1] || '';
  1023. }
  1024. var hostVersion = version;
  1025. // deviceType
  1026. var deviceType = getGetDeviceType(result, model);
  1027. // deviceModel
  1028. var deviceBrand = getDeviceBrand(brand);
  1029. // hostName
  1030. var _hostName = getHostName(result);
  1031. // deviceOrientation
  1032. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  1033. // devicePixelRatio
  1034. var _devicePixelRatio = pixelRatio;
  1035. // SDKVersion
  1036. var _SDKVersion = SDKVersion;
  1037. // hostLanguage
  1038. var hostLanguage = language.replace(/_/g, '-');
  1039. // wx.getAccountInfoSync
  1040. var parameters = {
  1041. appId: "__UNI__E203329",
  1042. appName: "芯悦澜",
  1043. appVersion: "1.0.0",
  1044. appVersionCode: "100",
  1045. appLanguage: getAppLanguage(hostLanguage),
  1046. uniCompileVersion: "3.8.12",
  1047. uniRuntimeVersion: "3.8.12",
  1048. uniPlatform: undefined || "mp-weixin",
  1049. deviceBrand: deviceBrand,
  1050. deviceModel: model,
  1051. deviceType: deviceType,
  1052. devicePixelRatio: _devicePixelRatio,
  1053. deviceOrientation: _deviceOrientation,
  1054. osName: osName.toLocaleLowerCase(),
  1055. osVersion: osVersion,
  1056. hostTheme: theme,
  1057. hostVersion: hostVersion,
  1058. hostLanguage: hostLanguage,
  1059. hostName: _hostName,
  1060. hostSDKVersion: _SDKVersion,
  1061. hostFontSizeSetting: fontSizeSetting,
  1062. windowTop: 0,
  1063. windowBottom: 0,
  1064. // TODO
  1065. osLanguage: undefined,
  1066. osTheme: undefined,
  1067. ua: undefined,
  1068. hostPackageName: undefined,
  1069. browserName: undefined,
  1070. browserVersion: undefined
  1071. };
  1072. Object.assign(result, parameters, extraParam);
  1073. }
  1074. function getGetDeviceType(result, model) {
  1075. var deviceType = result.deviceType || 'phone';
  1076. {
  1077. var deviceTypeMaps = {
  1078. ipad: 'pad',
  1079. windows: 'pc',
  1080. mac: 'pc'
  1081. };
  1082. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  1083. var _model = model.toLocaleLowerCase();
  1084. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  1085. var _m = deviceTypeMapsKeys[index];
  1086. if (_model.indexOf(_m) !== -1) {
  1087. deviceType = deviceTypeMaps[_m];
  1088. break;
  1089. }
  1090. }
  1091. }
  1092. return deviceType;
  1093. }
  1094. function getDeviceBrand(brand) {
  1095. var deviceBrand = brand;
  1096. if (deviceBrand) {
  1097. deviceBrand = brand.toLocaleLowerCase();
  1098. }
  1099. return deviceBrand;
  1100. }
  1101. function getAppLanguage(defaultLanguage) {
  1102. return getLocale$1 ? getLocale$1() : defaultLanguage;
  1103. }
  1104. function getHostName(result) {
  1105. var _platform = 'WeChat';
  1106. var _hostName = result.hostName || _platform; // mp-jd
  1107. {
  1108. if (result.environment) {
  1109. _hostName = result.environment;
  1110. } else if (result.host && result.host.env) {
  1111. _hostName = result.host.env;
  1112. }
  1113. }
  1114. return _hostName;
  1115. }
  1116. var getSystemInfo = {
  1117. returnValue: function returnValue(result) {
  1118. useDeviceId(result);
  1119. addSafeAreaInsets(result);
  1120. populateParameters(result);
  1121. }
  1122. };
  1123. var showActionSheet = {
  1124. args: function args(fromArgs) {
  1125. if ((0, _typeof2.default)(fromArgs) === 'object') {
  1126. fromArgs.alertText = fromArgs.title;
  1127. }
  1128. }
  1129. };
  1130. var getAppBaseInfo = {
  1131. returnValue: function returnValue(result) {
  1132. var _result = result,
  1133. version = _result.version,
  1134. language = _result.language,
  1135. SDKVersion = _result.SDKVersion,
  1136. theme = _result.theme;
  1137. var _hostName = getHostName(result);
  1138. var hostLanguage = language.replace('_', '-');
  1139. result = sortObject(Object.assign(result, {
  1140. appId: "__UNI__E203329",
  1141. appName: "芯悦澜",
  1142. appVersion: "1.0.0",
  1143. appVersionCode: "100",
  1144. appLanguage: getAppLanguage(hostLanguage),
  1145. hostVersion: version,
  1146. hostLanguage: hostLanguage,
  1147. hostName: _hostName,
  1148. hostSDKVersion: SDKVersion,
  1149. hostTheme: theme
  1150. }));
  1151. }
  1152. };
  1153. var getDeviceInfo = {
  1154. returnValue: function returnValue(result) {
  1155. var _result2 = result,
  1156. brand = _result2.brand,
  1157. model = _result2.model;
  1158. var deviceType = getGetDeviceType(result, model);
  1159. var deviceBrand = getDeviceBrand(brand);
  1160. useDeviceId(result);
  1161. result = sortObject(Object.assign(result, {
  1162. deviceType: deviceType,
  1163. deviceBrand: deviceBrand,
  1164. deviceModel: model
  1165. }));
  1166. }
  1167. };
  1168. var getWindowInfo = {
  1169. returnValue: function returnValue(result) {
  1170. addSafeAreaInsets(result);
  1171. result = sortObject(Object.assign(result, {
  1172. windowTop: 0,
  1173. windowBottom: 0
  1174. }));
  1175. }
  1176. };
  1177. var getAppAuthorizeSetting = {
  1178. returnValue: function returnValue(result) {
  1179. var locationReducedAccuracy = result.locationReducedAccuracy;
  1180. result.locationAccuracy = 'unsupported';
  1181. if (locationReducedAccuracy === true) {
  1182. result.locationAccuracy = 'reduced';
  1183. } else if (locationReducedAccuracy === false) {
  1184. result.locationAccuracy = 'full';
  1185. }
  1186. }
  1187. };
  1188. // import navigateTo from 'uni-helpers/navigate-to'
  1189. var compressImage = {
  1190. args: function args(fromArgs) {
  1191. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  1192. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  1193. fromArgs.compressHeight = fromArgs.compressedHeight;
  1194. }
  1195. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  1196. fromArgs.compressWidth = fromArgs.compressedWidth;
  1197. }
  1198. }
  1199. };
  1200. var protocols = {
  1201. redirectTo: redirectTo,
  1202. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  1203. previewImage: previewImage,
  1204. getSystemInfo: getSystemInfo,
  1205. getSystemInfoSync: getSystemInfo,
  1206. showActionSheet: showActionSheet,
  1207. getAppBaseInfo: getAppBaseInfo,
  1208. getDeviceInfo: getDeviceInfo,
  1209. getWindowInfo: getWindowInfo,
  1210. getAppAuthorizeSetting: getAppAuthorizeSetting,
  1211. compressImage: compressImage
  1212. };
  1213. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  1214. var canIUses = [];
  1215. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  1216. function processCallback(methodName, method, returnValue) {
  1217. return function (res) {
  1218. return method(processReturnValue(methodName, res, returnValue));
  1219. };
  1220. }
  1221. function processArgs(methodName, fromArgs) {
  1222. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  1223. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  1224. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  1225. if (isPlainObject(fromArgs)) {
  1226. // 一般 api 的参数解析
  1227. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  1228. if (isFn(argsOption)) {
  1229. argsOption = argsOption(fromArgs, toArgs) || {};
  1230. }
  1231. for (var key in fromArgs) {
  1232. if (hasOwn(argsOption, key)) {
  1233. var keyOption = argsOption[key];
  1234. if (isFn(keyOption)) {
  1235. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  1236. }
  1237. if (!keyOption) {
  1238. // 不支持的参数
  1239. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  1240. } else if (isStr(keyOption)) {
  1241. // 重写参数 key
  1242. toArgs[keyOption] = fromArgs[key];
  1243. } else if (isPlainObject(keyOption)) {
  1244. // {name:newName,value:value}可重新指定参数 key:value
  1245. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  1246. }
  1247. } else if (CALLBACKS.indexOf(key) !== -1) {
  1248. if (isFn(fromArgs[key])) {
  1249. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  1250. }
  1251. } else {
  1252. if (!keepFromArgs) {
  1253. toArgs[key] = fromArgs[key];
  1254. }
  1255. }
  1256. }
  1257. return toArgs;
  1258. } else if (isFn(fromArgs)) {
  1259. fromArgs = processCallback(methodName, fromArgs, returnValue);
  1260. }
  1261. return fromArgs;
  1262. }
  1263. function processReturnValue(methodName, res, returnValue) {
  1264. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  1265. if (isFn(protocols.returnValue)) {
  1266. // 处理通用 returnValue
  1267. res = protocols.returnValue(methodName, res);
  1268. }
  1269. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  1270. }
  1271. function wrapper(methodName, method) {
  1272. if (hasOwn(protocols, methodName)) {
  1273. var protocol = protocols[methodName];
  1274. if (!protocol) {
  1275. // 暂不支持的 api
  1276. return function () {
  1277. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  1278. };
  1279. }
  1280. return function (arg1, arg2) {
  1281. // 目前 api 最多两个参数
  1282. var options = protocol;
  1283. if (isFn(protocol)) {
  1284. options = protocol(arg1);
  1285. }
  1286. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  1287. var args = [arg1];
  1288. if (typeof arg2 !== 'undefined') {
  1289. args.push(arg2);
  1290. }
  1291. if (isFn(options.name)) {
  1292. methodName = options.name(arg1);
  1293. } else if (isStr(options.name)) {
  1294. methodName = options.name;
  1295. }
  1296. var returnValue = wx[methodName].apply(wx, args);
  1297. if (isSyncApi(methodName)) {
  1298. // 同步 api
  1299. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1300. }
  1301. return returnValue;
  1302. };
  1303. }
  1304. return method;
  1305. }
  1306. var todoApis = Object.create(null);
  1307. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  1308. function createTodoApi(name) {
  1309. return function todoApi(_ref) {
  1310. var fail = _ref.fail,
  1311. complete = _ref.complete;
  1312. var res = {
  1313. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  1314. };
  1315. isFn(fail) && fail(res);
  1316. isFn(complete) && complete(res);
  1317. };
  1318. }
  1319. TODOS.forEach(function (name) {
  1320. todoApis[name] = createTodoApi(name);
  1321. });
  1322. var providers = {
  1323. oauth: ['weixin'],
  1324. share: ['weixin'],
  1325. payment: ['wxpay'],
  1326. push: ['weixin']
  1327. };
  1328. function getProvider(_ref2) {
  1329. var service = _ref2.service,
  1330. success = _ref2.success,
  1331. fail = _ref2.fail,
  1332. complete = _ref2.complete;
  1333. var res = false;
  1334. if (providers[service]) {
  1335. res = {
  1336. errMsg: 'getProvider:ok',
  1337. service: service,
  1338. provider: providers[service]
  1339. };
  1340. isFn(success) && success(res);
  1341. } else {
  1342. res = {
  1343. errMsg: 'getProvider:fail service not found'
  1344. };
  1345. isFn(fail) && fail(res);
  1346. }
  1347. isFn(complete) && complete(res);
  1348. }
  1349. var extraApi = /*#__PURE__*/Object.freeze({
  1350. __proto__: null,
  1351. getProvider: getProvider
  1352. });
  1353. var getEmitter = function () {
  1354. var Emitter;
  1355. return function getUniEmitter() {
  1356. if (!Emitter) {
  1357. Emitter = new _vue.default();
  1358. }
  1359. return Emitter;
  1360. };
  1361. }();
  1362. function apply(ctx, method, args) {
  1363. return ctx[method].apply(ctx, args);
  1364. }
  1365. function $on() {
  1366. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  1367. }
  1368. function $off() {
  1369. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  1370. }
  1371. function $once() {
  1372. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  1373. }
  1374. function $emit() {
  1375. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  1376. }
  1377. var eventApi = /*#__PURE__*/Object.freeze({
  1378. __proto__: null,
  1379. $on: $on,
  1380. $off: $off,
  1381. $once: $once,
  1382. $emit: $emit
  1383. });
  1384. /**
  1385. * 框架内 try-catch
  1386. */
  1387. /**
  1388. * 开发者 try-catch
  1389. */
  1390. function tryCatch(fn) {
  1391. return function () {
  1392. try {
  1393. return fn.apply(fn, arguments);
  1394. } catch (e) {
  1395. // TODO
  1396. console.error(e);
  1397. }
  1398. };
  1399. }
  1400. function getApiCallbacks(params) {
  1401. var apiCallbacks = {};
  1402. for (var name in params) {
  1403. var param = params[name];
  1404. if (isFn(param)) {
  1405. apiCallbacks[name] = tryCatch(param);
  1406. delete params[name];
  1407. }
  1408. }
  1409. return apiCallbacks;
  1410. }
  1411. var cid;
  1412. var cidErrMsg;
  1413. var enabled;
  1414. function normalizePushMessage(message) {
  1415. try {
  1416. return JSON.parse(message);
  1417. } catch (e) {}
  1418. return message;
  1419. }
  1420. function invokePushCallback(args) {
  1421. if (args.type === 'enabled') {
  1422. enabled = true;
  1423. } else if (args.type === 'clientId') {
  1424. cid = args.cid;
  1425. cidErrMsg = args.errMsg;
  1426. invokeGetPushCidCallbacks(cid, args.errMsg);
  1427. } else if (args.type === 'pushMsg') {
  1428. var message = {
  1429. type: 'receive',
  1430. data: normalizePushMessage(args.message)
  1431. };
  1432. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  1433. var callback = onPushMessageCallbacks[i];
  1434. callback(message);
  1435. // 该消息已被阻止
  1436. if (message.stopped) {
  1437. break;
  1438. }
  1439. }
  1440. } else if (args.type === 'click') {
  1441. onPushMessageCallbacks.forEach(function (callback) {
  1442. callback({
  1443. type: 'click',
  1444. data: normalizePushMessage(args.message)
  1445. });
  1446. });
  1447. }
  1448. }
  1449. var getPushCidCallbacks = [];
  1450. function invokeGetPushCidCallbacks(cid, errMsg) {
  1451. getPushCidCallbacks.forEach(function (callback) {
  1452. callback(cid, errMsg);
  1453. });
  1454. getPushCidCallbacks.length = 0;
  1455. }
  1456. function getPushClientId(args) {
  1457. if (!isPlainObject(args)) {
  1458. args = {};
  1459. }
  1460. var _getApiCallbacks = getApiCallbacks(args),
  1461. success = _getApiCallbacks.success,
  1462. fail = _getApiCallbacks.fail,
  1463. complete = _getApiCallbacks.complete;
  1464. var hasSuccess = isFn(success);
  1465. var hasFail = isFn(fail);
  1466. var hasComplete = isFn(complete);
  1467. Promise.resolve().then(function () {
  1468. if (typeof enabled === 'undefined') {
  1469. enabled = false;
  1470. cid = '';
  1471. cidErrMsg = 'uniPush is not enabled';
  1472. }
  1473. getPushCidCallbacks.push(function (cid, errMsg) {
  1474. var res;
  1475. if (cid) {
  1476. res = {
  1477. errMsg: 'getPushClientId:ok',
  1478. cid: cid
  1479. };
  1480. hasSuccess && success(res);
  1481. } else {
  1482. res = {
  1483. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  1484. };
  1485. hasFail && fail(res);
  1486. }
  1487. hasComplete && complete(res);
  1488. });
  1489. if (typeof cid !== 'undefined') {
  1490. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1491. }
  1492. });
  1493. }
  1494. var onPushMessageCallbacks = [];
  1495. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1496. var onPushMessage = function onPushMessage(fn) {
  1497. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1498. onPushMessageCallbacks.push(fn);
  1499. }
  1500. };
  1501. var offPushMessage = function offPushMessage(fn) {
  1502. if (!fn) {
  1503. onPushMessageCallbacks.length = 0;
  1504. } else {
  1505. var index = onPushMessageCallbacks.indexOf(fn);
  1506. if (index > -1) {
  1507. onPushMessageCallbacks.splice(index, 1);
  1508. }
  1509. }
  1510. };
  1511. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  1512. if (!baseInfo) {
  1513. baseInfo = wx.getSystemInfoSync();
  1514. }
  1515. var host = baseInfo ? baseInfo.host : null;
  1516. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  1517. var api = /*#__PURE__*/Object.freeze({
  1518. __proto__: null,
  1519. shareVideoMessage: shareVideoMessage,
  1520. getPushClientId: getPushClientId,
  1521. onPushMessage: onPushMessage,
  1522. offPushMessage: offPushMessage,
  1523. invokePushCallback: invokePushCallback
  1524. });
  1525. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1526. function findVmByVueId(vm, vuePid) {
  1527. var $children = vm.$children;
  1528. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1529. for (var i = $children.length - 1; i >= 0; i--) {
  1530. var childVm = $children[i];
  1531. if (childVm.$scope._$vueId === vuePid) {
  1532. return childVm;
  1533. }
  1534. }
  1535. // 反向递归查找
  1536. var parentVm;
  1537. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1538. parentVm = findVmByVueId($children[_i], vuePid);
  1539. if (parentVm) {
  1540. return parentVm;
  1541. }
  1542. }
  1543. }
  1544. function initBehavior(options) {
  1545. return Behavior(options);
  1546. }
  1547. function isPage() {
  1548. return !!this.route;
  1549. }
  1550. function initRelation(detail) {
  1551. this.triggerEvent('__l', detail);
  1552. }
  1553. function selectAllComponents(mpInstance, selector, $refs) {
  1554. var components = mpInstance.selectAllComponents(selector) || [];
  1555. components.forEach(function (component) {
  1556. var ref = component.dataset.ref;
  1557. $refs[ref] = component.$vm || toSkip(component);
  1558. {
  1559. if (component.dataset.vueGeneric === 'scoped') {
  1560. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1561. selectAllComponents(scopedComponent, selector, $refs);
  1562. });
  1563. }
  1564. }
  1565. });
  1566. }
  1567. function syncRefs(refs, newRefs) {
  1568. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  1569. var newKeys = Object.keys(newRefs);
  1570. newKeys.forEach(function (key) {
  1571. var oldValue = refs[key];
  1572. var newValue = newRefs[key];
  1573. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  1574. return oldValue.includes(value);
  1575. })) {
  1576. return;
  1577. }
  1578. refs[key] = newValue;
  1579. oldKeys.delete(key);
  1580. });
  1581. oldKeys.forEach(function (key) {
  1582. delete refs[key];
  1583. });
  1584. return refs;
  1585. }
  1586. function initRefs(vm) {
  1587. var mpInstance = vm.$scope;
  1588. var refs = {};
  1589. Object.defineProperty(vm, '$refs', {
  1590. get: function get() {
  1591. var $refs = {};
  1592. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1593. // TODO 暂不考虑 for 中的 scoped
  1594. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  1595. forComponents.forEach(function (component) {
  1596. var ref = component.dataset.ref;
  1597. if (!$refs[ref]) {
  1598. $refs[ref] = [];
  1599. }
  1600. $refs[ref].push(component.$vm || toSkip(component));
  1601. });
  1602. return syncRefs(refs, $refs);
  1603. }
  1604. });
  1605. }
  1606. function handleLink(event) {
  1607. var _ref3 = event.detail || event.value,
  1608. vuePid = _ref3.vuePid,
  1609. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  1610. var parentVm;
  1611. if (vuePid) {
  1612. parentVm = findVmByVueId(this.$vm, vuePid);
  1613. }
  1614. if (!parentVm) {
  1615. parentVm = this.$vm;
  1616. }
  1617. vueOptions.parent = parentVm;
  1618. }
  1619. function markMPComponent(component) {
  1620. // 在 Vue 中标记为小程序组件
  1621. var IS_MP = '__v_isMPComponent';
  1622. Object.defineProperty(component, IS_MP, {
  1623. configurable: true,
  1624. enumerable: false,
  1625. value: true
  1626. });
  1627. return component;
  1628. }
  1629. function toSkip(obj) {
  1630. var OB = '__ob__';
  1631. var SKIP = '__v_skip';
  1632. if (isObject(obj) && Object.isExtensible(obj)) {
  1633. // 避免被 @vue/composition-api 观测
  1634. Object.defineProperty(obj, OB, {
  1635. configurable: true,
  1636. enumerable: false,
  1637. value: (0, _defineProperty2.default)({}, SKIP, true)
  1638. });
  1639. }
  1640. return obj;
  1641. }
  1642. var WORKLET_RE = /_(.*)_worklet_factory_/;
  1643. function initWorkletMethods(mpMethods, vueMethods) {
  1644. if (vueMethods) {
  1645. Object.keys(vueMethods).forEach(function (name) {
  1646. var matches = name.match(WORKLET_RE);
  1647. if (matches) {
  1648. var workletName = matches[1];
  1649. mpMethods[name] = vueMethods[name];
  1650. mpMethods[workletName] = vueMethods[workletName];
  1651. }
  1652. });
  1653. }
  1654. }
  1655. var MPPage = Page;
  1656. var MPComponent = Component;
  1657. var customizeRE = /:/g;
  1658. var customize = cached(function (str) {
  1659. return camelize(str.replace(customizeRE, '-'));
  1660. });
  1661. function initTriggerEvent(mpInstance) {
  1662. var oldTriggerEvent = mpInstance.triggerEvent;
  1663. var newTriggerEvent = function newTriggerEvent(event) {
  1664. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  1665. args[_key3 - 1] = arguments[_key3];
  1666. }
  1667. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  1668. if (this.$vm || this.dataset && this.dataset.comType) {
  1669. event = customize(event);
  1670. } else {
  1671. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  1672. var newEvent = customize(event);
  1673. if (newEvent !== event) {
  1674. oldTriggerEvent.apply(this, [newEvent].concat(args));
  1675. }
  1676. }
  1677. return oldTriggerEvent.apply(this, [event].concat(args));
  1678. };
  1679. try {
  1680. // 京东小程序 triggerEvent 为只读
  1681. mpInstance.triggerEvent = newTriggerEvent;
  1682. } catch (error) {
  1683. mpInstance._triggerEvent = newTriggerEvent;
  1684. }
  1685. }
  1686. function initHook(name, options, isComponent) {
  1687. var oldHook = options[name];
  1688. options[name] = function () {
  1689. markMPComponent(this);
  1690. initTriggerEvent(this);
  1691. if (oldHook) {
  1692. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1693. args[_key4] = arguments[_key4];
  1694. }
  1695. return oldHook.apply(this, args);
  1696. }
  1697. };
  1698. }
  1699. if (!MPPage.__$wrappered) {
  1700. MPPage.__$wrappered = true;
  1701. Page = function Page() {
  1702. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1703. initHook('onLoad', options);
  1704. return MPPage(options);
  1705. };
  1706. Page.after = MPPage.after;
  1707. Component = function Component() {
  1708. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1709. initHook('created', options);
  1710. return MPComponent(options);
  1711. };
  1712. }
  1713. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  1714. function initMocks(vm, mocks) {
  1715. var mpInstance = vm.$mp[vm.mpType];
  1716. mocks.forEach(function (mock) {
  1717. if (hasOwn(mpInstance, mock)) {
  1718. vm[mock] = mpInstance[mock];
  1719. }
  1720. });
  1721. }
  1722. function hasHook(hook, vueOptions) {
  1723. if (!vueOptions) {
  1724. return true;
  1725. }
  1726. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1727. return true;
  1728. }
  1729. vueOptions = vueOptions.default || vueOptions;
  1730. if (isFn(vueOptions)) {
  1731. if (isFn(vueOptions.extendOptions[hook])) {
  1732. return true;
  1733. }
  1734. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  1735. return true;
  1736. }
  1737. return false;
  1738. }
  1739. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  1740. return true;
  1741. }
  1742. var mixins = vueOptions.mixins;
  1743. if (Array.isArray(mixins)) {
  1744. return !!mixins.find(function (mixin) {
  1745. return hasHook(hook, mixin);
  1746. });
  1747. }
  1748. }
  1749. function initHooks(mpOptions, hooks, vueOptions) {
  1750. hooks.forEach(function (hook) {
  1751. if (hasHook(hook, vueOptions)) {
  1752. mpOptions[hook] = function (args) {
  1753. return this.$vm && this.$vm.__call_hook(hook, args);
  1754. };
  1755. }
  1756. });
  1757. }
  1758. function initUnknownHooks(mpOptions, vueOptions) {
  1759. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1760. findHooks(vueOptions).forEach(function (hook) {
  1761. return initHook$1(mpOptions, hook, excludes);
  1762. });
  1763. }
  1764. function findHooks(vueOptions) {
  1765. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1766. if (vueOptions) {
  1767. Object.keys(vueOptions).forEach(function (name) {
  1768. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  1769. hooks.push(name);
  1770. }
  1771. });
  1772. }
  1773. return hooks;
  1774. }
  1775. function initHook$1(mpOptions, hook, excludes) {
  1776. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  1777. mpOptions[hook] = function (args) {
  1778. return this.$vm && this.$vm.__call_hook(hook, args);
  1779. };
  1780. }
  1781. }
  1782. function initVueComponent(Vue, vueOptions) {
  1783. vueOptions = vueOptions.default || vueOptions;
  1784. var VueComponent;
  1785. if (isFn(vueOptions)) {
  1786. VueComponent = vueOptions;
  1787. } else {
  1788. VueComponent = Vue.extend(vueOptions);
  1789. }
  1790. vueOptions = VueComponent.options;
  1791. return [VueComponent, vueOptions];
  1792. }
  1793. function initSlots(vm, vueSlots) {
  1794. if (Array.isArray(vueSlots) && vueSlots.length) {
  1795. var $slots = Object.create(null);
  1796. vueSlots.forEach(function (slotName) {
  1797. $slots[slotName] = true;
  1798. });
  1799. vm.$scopedSlots = vm.$slots = $slots;
  1800. }
  1801. }
  1802. function initVueIds(vueIds, mpInstance) {
  1803. vueIds = (vueIds || '').split(',');
  1804. var len = vueIds.length;
  1805. if (len === 1) {
  1806. mpInstance._$vueId = vueIds[0];
  1807. } else if (len === 2) {
  1808. mpInstance._$vueId = vueIds[0];
  1809. mpInstance._$vuePid = vueIds[1];
  1810. }
  1811. }
  1812. function initData(vueOptions, context) {
  1813. var data = vueOptions.data || {};
  1814. var methods = vueOptions.methods || {};
  1815. if (typeof data === 'function') {
  1816. try {
  1817. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1818. } catch (e) {
  1819. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"芯悦澜","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1820. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1821. }
  1822. }
  1823. } else {
  1824. try {
  1825. // 对 data 格式化
  1826. data = JSON.parse(JSON.stringify(data));
  1827. } catch (e) {}
  1828. }
  1829. if (!isPlainObject(data)) {
  1830. data = {};
  1831. }
  1832. Object.keys(methods).forEach(function (methodName) {
  1833. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1834. data[methodName] = methods[methodName];
  1835. }
  1836. });
  1837. return data;
  1838. }
  1839. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1840. function createObserver(name) {
  1841. return function observer(newVal, oldVal) {
  1842. if (this.$vm) {
  1843. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1844. }
  1845. };
  1846. }
  1847. function initBehaviors(vueOptions, initBehavior) {
  1848. var vueBehaviors = vueOptions.behaviors;
  1849. var vueExtends = vueOptions.extends;
  1850. var vueMixins = vueOptions.mixins;
  1851. var vueProps = vueOptions.props;
  1852. if (!vueProps) {
  1853. vueOptions.props = vueProps = [];
  1854. }
  1855. var behaviors = [];
  1856. if (Array.isArray(vueBehaviors)) {
  1857. vueBehaviors.forEach(function (behavior) {
  1858. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  1859. if (behavior === 'uni://form-field') {
  1860. if (Array.isArray(vueProps)) {
  1861. vueProps.push('name');
  1862. vueProps.push('value');
  1863. } else {
  1864. vueProps.name = {
  1865. type: String,
  1866. default: ''
  1867. };
  1868. vueProps.value = {
  1869. type: [String, Number, Boolean, Array, Object, Date],
  1870. default: ''
  1871. };
  1872. }
  1873. }
  1874. });
  1875. }
  1876. if (isPlainObject(vueExtends) && vueExtends.props) {
  1877. behaviors.push(initBehavior({
  1878. properties: initProperties(vueExtends.props, true)
  1879. }));
  1880. }
  1881. if (Array.isArray(vueMixins)) {
  1882. vueMixins.forEach(function (vueMixin) {
  1883. if (isPlainObject(vueMixin) && vueMixin.props) {
  1884. behaviors.push(initBehavior({
  1885. properties: initProperties(vueMixin.props, true)
  1886. }));
  1887. }
  1888. });
  1889. }
  1890. return behaviors;
  1891. }
  1892. function parsePropType(key, type, defaultValue, file) {
  1893. // [String]=>String
  1894. if (Array.isArray(type) && type.length === 1) {
  1895. return type[0];
  1896. }
  1897. return type;
  1898. }
  1899. function initProperties(props) {
  1900. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1901. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  1902. var options = arguments.length > 3 ? arguments[3] : undefined;
  1903. var properties = {};
  1904. if (!isBehavior) {
  1905. properties.vueId = {
  1906. type: String,
  1907. value: ''
  1908. };
  1909. {
  1910. if (options.virtualHost) {
  1911. properties.virtualHostStyle = {
  1912. type: null,
  1913. value: ''
  1914. };
  1915. properties.virtualHostClass = {
  1916. type: null,
  1917. value: ''
  1918. };
  1919. }
  1920. }
  1921. // scopedSlotsCompiler auto
  1922. properties.scopedSlotsCompiler = {
  1923. type: String,
  1924. value: ''
  1925. };
  1926. properties.vueSlots = {
  1927. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1928. type: null,
  1929. value: [],
  1930. observer: function observer(newVal, oldVal) {
  1931. var $slots = Object.create(null);
  1932. newVal.forEach(function (slotName) {
  1933. $slots[slotName] = true;
  1934. });
  1935. this.setData({
  1936. $slots: $slots
  1937. });
  1938. }
  1939. };
  1940. }
  1941. if (Array.isArray(props)) {
  1942. // ['title']
  1943. props.forEach(function (key) {
  1944. properties[key] = {
  1945. type: null,
  1946. observer: createObserver(key)
  1947. };
  1948. });
  1949. } else if (isPlainObject(props)) {
  1950. // {title:{type:String,default:''},content:String}
  1951. Object.keys(props).forEach(function (key) {
  1952. var opts = props[key];
  1953. if (isPlainObject(opts)) {
  1954. // title:{type:String,default:''}
  1955. var value = opts.default;
  1956. if (isFn(value)) {
  1957. value = value();
  1958. }
  1959. opts.type = parsePropType(key, opts.type);
  1960. properties[key] = {
  1961. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1962. value: value,
  1963. observer: createObserver(key)
  1964. };
  1965. } else {
  1966. // content:String
  1967. var type = parsePropType(key, opts);
  1968. properties[key] = {
  1969. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1970. observer: createObserver(key)
  1971. };
  1972. }
  1973. });
  1974. }
  1975. return properties;
  1976. }
  1977. function wrapper$1(event) {
  1978. // TODO 又得兼容 mpvue 的 mp 对象
  1979. try {
  1980. event.mp = JSON.parse(JSON.stringify(event));
  1981. } catch (e) {}
  1982. event.stopPropagation = noop;
  1983. event.preventDefault = noop;
  1984. event.target = event.target || {};
  1985. if (!hasOwn(event, 'detail')) {
  1986. event.detail = {};
  1987. }
  1988. if (hasOwn(event, 'markerId')) {
  1989. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  1990. event.detail.markerId = event.markerId;
  1991. }
  1992. if (isPlainObject(event.detail)) {
  1993. event.target = Object.assign({}, event.target, event.detail);
  1994. }
  1995. return event;
  1996. }
  1997. function getExtraValue(vm, dataPathsArray) {
  1998. var context = vm;
  1999. dataPathsArray.forEach(function (dataPathArray) {
  2000. var dataPath = dataPathArray[0];
  2001. var value = dataPathArray[2];
  2002. if (dataPath || typeof value !== 'undefined') {
  2003. // ['','',index,'disable']
  2004. var propPath = dataPathArray[1];
  2005. var valuePath = dataPathArray[3];
  2006. var vFor;
  2007. if (Number.isInteger(dataPath)) {
  2008. vFor = dataPath;
  2009. } else if (!dataPath) {
  2010. vFor = context;
  2011. } else if (typeof dataPath === 'string' && dataPath) {
  2012. if (dataPath.indexOf('#s#') === 0) {
  2013. vFor = dataPath.substr(3);
  2014. } else {
  2015. vFor = vm.__get_value(dataPath, context);
  2016. }
  2017. }
  2018. if (Number.isInteger(vFor)) {
  2019. context = value;
  2020. } else if (!propPath) {
  2021. context = vFor[value];
  2022. } else {
  2023. if (Array.isArray(vFor)) {
  2024. context = vFor.find(function (vForItem) {
  2025. return vm.__get_value(propPath, vForItem) === value;
  2026. });
  2027. } else if (isPlainObject(vFor)) {
  2028. context = Object.keys(vFor).find(function (vForKey) {
  2029. return vm.__get_value(propPath, vFor[vForKey]) === value;
  2030. });
  2031. } else {
  2032. console.error('v-for 暂不支持循环数据:', vFor);
  2033. }
  2034. }
  2035. if (valuePath) {
  2036. context = vm.__get_value(valuePath, context);
  2037. }
  2038. }
  2039. });
  2040. return context;
  2041. }
  2042. function processEventExtra(vm, extra, event, __args__) {
  2043. var extraObj = {};
  2044. if (Array.isArray(extra) && extra.length) {
  2045. /**
  2046. *[
  2047. * ['data.items', 'data.id', item.data.id],
  2048. * ['metas', 'id', meta.id]
  2049. *],
  2050. *[
  2051. * ['data.items', 'data.id', item.data.id],
  2052. * ['metas', 'id', meta.id]
  2053. *],
  2054. *'test'
  2055. */
  2056. extra.forEach(function (dataPath, index) {
  2057. if (typeof dataPath === 'string') {
  2058. if (!dataPath) {
  2059. // model,prop.sync
  2060. extraObj['$' + index] = vm;
  2061. } else {
  2062. if (dataPath === '$event') {
  2063. // $event
  2064. extraObj['$' + index] = event;
  2065. } else if (dataPath === 'arguments') {
  2066. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  2067. } else if (dataPath.indexOf('$event.') === 0) {
  2068. // $event.target.value
  2069. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  2070. } else {
  2071. extraObj['$' + index] = vm.__get_value(dataPath);
  2072. }
  2073. }
  2074. } else {
  2075. extraObj['$' + index] = getExtraValue(vm, dataPath);
  2076. }
  2077. });
  2078. }
  2079. return extraObj;
  2080. }
  2081. function getObjByArray(arr) {
  2082. var obj = {};
  2083. for (var i = 1; i < arr.length; i++) {
  2084. var element = arr[i];
  2085. obj[element[0]] = element[1];
  2086. }
  2087. return obj;
  2088. }
  2089. function processEventArgs(vm, event) {
  2090. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  2091. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  2092. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  2093. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  2094. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  2095. // fixed 用户直接触发 mpInstance.triggerEvent
  2096. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  2097. if (isCustom) {
  2098. // 自定义事件
  2099. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  2100. if (!args.length) {
  2101. // 无参数,直接传入 event 或 detail 数组
  2102. if (isCustomMPEvent) {
  2103. return [event];
  2104. }
  2105. return __args__;
  2106. }
  2107. }
  2108. var extraObj = processEventExtra(vm, extra, event, __args__);
  2109. var ret = [];
  2110. args.forEach(function (arg) {
  2111. if (arg === '$event') {
  2112. if (methodName === '__set_model' && !isCustom) {
  2113. // input v-model value
  2114. ret.push(event.target.value);
  2115. } else {
  2116. if (isCustom && !isCustomMPEvent) {
  2117. ret.push(__args__[0]);
  2118. } else {
  2119. // wxcomponent 组件或内置组件
  2120. ret.push(event);
  2121. }
  2122. }
  2123. } else {
  2124. if (Array.isArray(arg) && arg[0] === 'o') {
  2125. ret.push(getObjByArray(arg));
  2126. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  2127. ret.push(extraObj[arg]);
  2128. } else {
  2129. ret.push(arg);
  2130. }
  2131. }
  2132. });
  2133. return ret;
  2134. }
  2135. var ONCE = '~';
  2136. var CUSTOM = '^';
  2137. function isMatchEventType(eventType, optType) {
  2138. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  2139. }
  2140. function getContextVm(vm) {
  2141. var $parent = vm.$parent;
  2142. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  2143. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  2144. $parent = $parent.$parent;
  2145. }
  2146. return $parent && $parent.$parent;
  2147. }
  2148. function handleEvent(event) {
  2149. var _this2 = this;
  2150. event = wrapper$1(event);
  2151. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  2152. var dataset = (event.currentTarget || event.target).dataset;
  2153. if (!dataset) {
  2154. return console.warn('事件信息不存在');
  2155. }
  2156. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  2157. if (!eventOpts) {
  2158. return console.warn('事件信息不存在');
  2159. }
  2160. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  2161. var eventType = event.type;
  2162. var ret = [];
  2163. eventOpts.forEach(function (eventOpt) {
  2164. var type = eventOpt[0];
  2165. var eventsArray = eventOpt[1];
  2166. var isCustom = type.charAt(0) === CUSTOM;
  2167. type = isCustom ? type.slice(1) : type;
  2168. var isOnce = type.charAt(0) === ONCE;
  2169. type = isOnce ? type.slice(1) : type;
  2170. if (eventsArray && isMatchEventType(eventType, type)) {
  2171. eventsArray.forEach(function (eventArray) {
  2172. var methodName = eventArray[0];
  2173. if (methodName) {
  2174. var handlerCtx = _this2.$vm;
  2175. if (handlerCtx.$options.generic) {
  2176. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  2177. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  2178. }
  2179. if (methodName === '$emit') {
  2180. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  2181. return;
  2182. }
  2183. var handler = handlerCtx[methodName];
  2184. if (!isFn(handler)) {
  2185. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  2186. var path = _this2.route || _this2.is;
  2187. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  2188. }
  2189. if (isOnce) {
  2190. if (handler.once) {
  2191. return;
  2192. }
  2193. handler.once = true;
  2194. }
  2195. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  2196. params = Array.isArray(params) ? params : [];
  2197. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  2198. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  2199. // eslint-disable-next-line no-sparse-arrays
  2200. params = params.concat([,,,,,,,,,, event]);
  2201. }
  2202. ret.push(handler.apply(handlerCtx, params));
  2203. }
  2204. });
  2205. }
  2206. });
  2207. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  2208. return ret[0];
  2209. }
  2210. }
  2211. var eventChannels = {};
  2212. function getEventChannel(id) {
  2213. var eventChannel = eventChannels[id];
  2214. delete eventChannels[id];
  2215. return eventChannel;
  2216. }
  2217. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  2218. function initEventChannel() {
  2219. _vue.default.prototype.getOpenerEventChannel = function () {
  2220. // 微信小程序使用自身getOpenerEventChannel
  2221. {
  2222. return this.$scope.getOpenerEventChannel();
  2223. }
  2224. };
  2225. var callHook = _vue.default.prototype.__call_hook;
  2226. _vue.default.prototype.__call_hook = function (hook, args) {
  2227. if (hook === 'onLoad' && args && args.__id__) {
  2228. this.__eventChannel__ = getEventChannel(args.__id__);
  2229. delete args.__id__;
  2230. }
  2231. return callHook.call(this, hook, args);
  2232. };
  2233. }
  2234. function initScopedSlotsParams() {
  2235. var center = {};
  2236. var parents = {};
  2237. function currentId(fn) {
  2238. var vueIds = this.$options.propsData.vueId;
  2239. if (vueIds) {
  2240. var vueId = vueIds.split(',')[0];
  2241. fn(vueId);
  2242. }
  2243. }
  2244. _vue.default.prototype.$hasSSP = function (vueId) {
  2245. var slot = center[vueId];
  2246. if (!slot) {
  2247. parents[vueId] = this;
  2248. this.$on('hook:destroyed', function () {
  2249. delete parents[vueId];
  2250. });
  2251. }
  2252. return slot;
  2253. };
  2254. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  2255. var slot = center[vueId];
  2256. if (slot) {
  2257. var params = slot[name] || [];
  2258. if (needAll) {
  2259. return params;
  2260. }
  2261. return params[0];
  2262. }
  2263. };
  2264. _vue.default.prototype.$setSSP = function (name, value) {
  2265. var index = 0;
  2266. currentId.call(this, function (vueId) {
  2267. var slot = center[vueId];
  2268. var params = slot[name] = slot[name] || [];
  2269. params.push(value);
  2270. index = params.length - 1;
  2271. });
  2272. return index;
  2273. };
  2274. _vue.default.prototype.$initSSP = function () {
  2275. currentId.call(this, function (vueId) {
  2276. center[vueId] = {};
  2277. });
  2278. };
  2279. _vue.default.prototype.$callSSP = function () {
  2280. currentId.call(this, function (vueId) {
  2281. if (parents[vueId]) {
  2282. parents[vueId].$forceUpdate();
  2283. }
  2284. });
  2285. };
  2286. _vue.default.mixin({
  2287. destroyed: function destroyed() {
  2288. var propsData = this.$options.propsData;
  2289. var vueId = propsData && propsData.vueId;
  2290. if (vueId) {
  2291. delete center[vueId];
  2292. delete parents[vueId];
  2293. }
  2294. }
  2295. });
  2296. }
  2297. function parseBaseApp(vm, _ref4) {
  2298. var mocks = _ref4.mocks,
  2299. initRefs = _ref4.initRefs;
  2300. initEventChannel();
  2301. {
  2302. initScopedSlotsParams();
  2303. }
  2304. if (vm.$options.store) {
  2305. _vue.default.prototype.$store = vm.$options.store;
  2306. }
  2307. uniIdMixin(_vue.default);
  2308. _vue.default.prototype.mpHost = "mp-weixin";
  2309. _vue.default.mixin({
  2310. beforeCreate: function beforeCreate() {
  2311. if (!this.$options.mpType) {
  2312. return;
  2313. }
  2314. this.mpType = this.$options.mpType;
  2315. this.$mp = (0, _defineProperty2.default)({
  2316. data: {}
  2317. }, this.mpType, this.$options.mpInstance);
  2318. this.$scope = this.$options.mpInstance;
  2319. delete this.$options.mpType;
  2320. delete this.$options.mpInstance;
  2321. if (this.mpType === 'page' && typeof getApp === 'function') {
  2322. // hack vue-i18n
  2323. var app = getApp();
  2324. if (app.$vm && app.$vm.$i18n) {
  2325. this._i18n = app.$vm.$i18n;
  2326. }
  2327. }
  2328. if (this.mpType !== 'app') {
  2329. initRefs(this);
  2330. initMocks(this, mocks);
  2331. }
  2332. }
  2333. });
  2334. var appOptions = {
  2335. onLaunch: function onLaunch(args) {
  2336. if (this.$vm) {
  2337. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  2338. return;
  2339. }
  2340. {
  2341. if (wx.canIUse && !wx.canIUse('nextTick')) {
  2342. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  2343. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  2344. }
  2345. }
  2346. this.$vm = vm;
  2347. this.$vm.$mp = {
  2348. app: this
  2349. };
  2350. this.$vm.$scope = this;
  2351. // vm 上也挂载 globalData
  2352. this.$vm.globalData = this.globalData;
  2353. this.$vm._isMounted = true;
  2354. this.$vm.__call_hook('mounted', args);
  2355. this.$vm.__call_hook('onLaunch', args);
  2356. }
  2357. };
  2358. // 兼容旧版本 globalData
  2359. appOptions.globalData = vm.$options.globalData || {};
  2360. // 将 methods 中的方法挂在 getApp() 中
  2361. var methods = vm.$options.methods;
  2362. if (methods) {
  2363. Object.keys(methods).forEach(function (name) {
  2364. appOptions[name] = methods[name];
  2365. });
  2366. }
  2367. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  2368. initHooks(appOptions, hooks);
  2369. initUnknownHooks(appOptions, vm.$options);
  2370. return appOptions;
  2371. }
  2372. function parseApp(vm) {
  2373. return parseBaseApp(vm, {
  2374. mocks: mocks,
  2375. initRefs: initRefs
  2376. });
  2377. }
  2378. function createApp(vm) {
  2379. App(parseApp(vm));
  2380. return vm;
  2381. }
  2382. var encodeReserveRE = /[!'()*]/g;
  2383. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  2384. return '%' + c.charCodeAt(0).toString(16);
  2385. };
  2386. var commaRE = /%2C/g;
  2387. // fixed encodeURIComponent which is more conformant to RFC3986:
  2388. // - escapes [!'()*]
  2389. // - preserve commas
  2390. var encode = function encode(str) {
  2391. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  2392. };
  2393. function stringifyQuery(obj) {
  2394. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  2395. var res = obj ? Object.keys(obj).map(function (key) {
  2396. var val = obj[key];
  2397. if (val === undefined) {
  2398. return '';
  2399. }
  2400. if (val === null) {
  2401. return encodeStr(key);
  2402. }
  2403. if (Array.isArray(val)) {
  2404. var result = [];
  2405. val.forEach(function (val2) {
  2406. if (val2 === undefined) {
  2407. return;
  2408. }
  2409. if (val2 === null) {
  2410. result.push(encodeStr(key));
  2411. } else {
  2412. result.push(encodeStr(key) + '=' + encodeStr(val2));
  2413. }
  2414. });
  2415. return result.join('&');
  2416. }
  2417. return encodeStr(key) + '=' + encodeStr(val);
  2418. }).filter(function (x) {
  2419. return x.length > 0;
  2420. }).join('&') : null;
  2421. return res ? "?".concat(res) : '';
  2422. }
  2423. function parseBaseComponent(vueComponentOptions) {
  2424. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  2425. isPage = _ref5.isPage,
  2426. initRelation = _ref5.initRelation;
  2427. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  2428. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  2429. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  2430. VueComponent = _initVueComponent2[0],
  2431. vueOptions = _initVueComponent2[1];
  2432. var options = _objectSpread({
  2433. multipleSlots: true,
  2434. // styleIsolation: 'apply-shared',
  2435. addGlobalClass: true
  2436. }, vueOptions.options || {});
  2437. {
  2438. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  2439. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  2440. Object.assign(options, vueOptions['mp-weixin'].options);
  2441. }
  2442. }
  2443. var componentOptions = {
  2444. options: options,
  2445. data: initData(vueOptions, _vue.default.prototype),
  2446. behaviors: initBehaviors(vueOptions, initBehavior),
  2447. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  2448. lifetimes: {
  2449. attached: function attached() {
  2450. var properties = this.properties;
  2451. var options = {
  2452. mpType: isPage.call(this) ? 'page' : 'component',
  2453. mpInstance: this,
  2454. propsData: properties
  2455. };
  2456. initVueIds(properties.vueId, this);
  2457. // 处理父子关系
  2458. initRelation.call(this, {
  2459. vuePid: this._$vuePid,
  2460. vueOptions: options
  2461. });
  2462. // 初始化 vue 实例
  2463. this.$vm = new VueComponent(options);
  2464. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  2465. initSlots(this.$vm, properties.vueSlots);
  2466. // 触发首次 setData
  2467. this.$vm.$mount();
  2468. },
  2469. ready: function ready() {
  2470. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  2471. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  2472. if (this.$vm) {
  2473. this.$vm._isMounted = true;
  2474. this.$vm.__call_hook('mounted');
  2475. this.$vm.__call_hook('onReady');
  2476. }
  2477. },
  2478. detached: function detached() {
  2479. this.$vm && this.$vm.$destroy();
  2480. }
  2481. },
  2482. pageLifetimes: {
  2483. show: function show(args) {
  2484. this.$vm && this.$vm.__call_hook('onPageShow', args);
  2485. },
  2486. hide: function hide() {
  2487. this.$vm && this.$vm.__call_hook('onPageHide');
  2488. },
  2489. resize: function resize(size) {
  2490. this.$vm && this.$vm.__call_hook('onPageResize', size);
  2491. }
  2492. },
  2493. methods: {
  2494. __l: handleLink,
  2495. __e: handleEvent
  2496. }
  2497. };
  2498. // externalClasses
  2499. if (vueOptions.externalClasses) {
  2500. componentOptions.externalClasses = vueOptions.externalClasses;
  2501. }
  2502. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2503. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2504. componentOptions.methods[callMethod] = function (args) {
  2505. return this.$vm[callMethod](args);
  2506. };
  2507. });
  2508. }
  2509. if (needVueOptions) {
  2510. return [componentOptions, vueOptions, VueComponent];
  2511. }
  2512. if (isPage) {
  2513. return componentOptions;
  2514. }
  2515. return [componentOptions, VueComponent];
  2516. }
  2517. function parseComponent(vueComponentOptions, needVueOptions) {
  2518. return parseBaseComponent(vueComponentOptions, {
  2519. isPage: isPage,
  2520. initRelation: initRelation
  2521. }, needVueOptions);
  2522. }
  2523. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  2524. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  2525. function parseBasePage(vuePageOptions) {
  2526. var _parseComponent = parseComponent(vuePageOptions, true),
  2527. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  2528. pageOptions = _parseComponent2[0],
  2529. vueOptions = _parseComponent2[1];
  2530. initHooks(pageOptions.methods, hooks$1, vueOptions);
  2531. pageOptions.methods.onLoad = function (query) {
  2532. this.options = query;
  2533. var copyQuery = Object.assign({}, query);
  2534. delete copyQuery.__id__;
  2535. this.$page = {
  2536. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  2537. };
  2538. this.$vm.$mp.query = query; // 兼容 mpvue
  2539. this.$vm.__call_hook('onLoad', query);
  2540. };
  2541. {
  2542. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  2543. }
  2544. {
  2545. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  2546. }
  2547. return pageOptions;
  2548. }
  2549. function parsePage(vuePageOptions) {
  2550. return parseBasePage(vuePageOptions);
  2551. }
  2552. function createPage(vuePageOptions) {
  2553. {
  2554. return Component(parsePage(vuePageOptions));
  2555. }
  2556. }
  2557. function createComponent(vueOptions) {
  2558. {
  2559. return Component(parseComponent(vueOptions));
  2560. }
  2561. }
  2562. function createSubpackageApp(vm) {
  2563. var appOptions = parseApp(vm);
  2564. var app = getApp({
  2565. allowDefault: true
  2566. });
  2567. vm.$scope = app;
  2568. var globalData = app.globalData;
  2569. if (globalData) {
  2570. Object.keys(appOptions.globalData).forEach(function (name) {
  2571. if (!hasOwn(globalData, name)) {
  2572. globalData[name] = appOptions.globalData[name];
  2573. }
  2574. });
  2575. }
  2576. Object.keys(appOptions).forEach(function (name) {
  2577. if (!hasOwn(app, name)) {
  2578. app[name] = appOptions[name];
  2579. }
  2580. });
  2581. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2582. wx.onAppShow(function () {
  2583. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2584. args[_key5] = arguments[_key5];
  2585. }
  2586. vm.__call_hook('onShow', args);
  2587. });
  2588. }
  2589. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2590. wx.onAppHide(function () {
  2591. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2592. args[_key6] = arguments[_key6];
  2593. }
  2594. vm.__call_hook('onHide', args);
  2595. });
  2596. }
  2597. if (isFn(appOptions.onLaunch)) {
  2598. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2599. vm.__call_hook('onLaunch', args);
  2600. }
  2601. return vm;
  2602. }
  2603. function createPlugin(vm) {
  2604. var appOptions = parseApp(vm);
  2605. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2606. wx.onAppShow(function () {
  2607. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2608. args[_key7] = arguments[_key7];
  2609. }
  2610. vm.__call_hook('onShow', args);
  2611. });
  2612. }
  2613. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2614. wx.onAppHide(function () {
  2615. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2616. args[_key8] = arguments[_key8];
  2617. }
  2618. vm.__call_hook('onHide', args);
  2619. });
  2620. }
  2621. if (isFn(appOptions.onLaunch)) {
  2622. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2623. vm.__call_hook('onLaunch', args);
  2624. }
  2625. return vm;
  2626. }
  2627. todos.forEach(function (todoApi) {
  2628. protocols[todoApi] = false;
  2629. });
  2630. canIUses.forEach(function (canIUseApi) {
  2631. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  2632. if (!wx.canIUse(apiName)) {
  2633. protocols[canIUseApi] = false;
  2634. }
  2635. });
  2636. var uni = {};
  2637. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2638. uni = new Proxy({}, {
  2639. get: function get(target, name) {
  2640. if (hasOwn(target, name)) {
  2641. return target[name];
  2642. }
  2643. if (baseApi[name]) {
  2644. return baseApi[name];
  2645. }
  2646. if (api[name]) {
  2647. return promisify(name, api[name]);
  2648. }
  2649. {
  2650. if (extraApi[name]) {
  2651. return promisify(name, extraApi[name]);
  2652. }
  2653. if (todoApis[name]) {
  2654. return promisify(name, todoApis[name]);
  2655. }
  2656. }
  2657. if (eventApi[name]) {
  2658. return eventApi[name];
  2659. }
  2660. return promisify(name, wrapper(name, wx[name]));
  2661. },
  2662. set: function set(target, name, value) {
  2663. target[name] = value;
  2664. return true;
  2665. }
  2666. });
  2667. } else {
  2668. Object.keys(baseApi).forEach(function (name) {
  2669. uni[name] = baseApi[name];
  2670. });
  2671. {
  2672. Object.keys(todoApis).forEach(function (name) {
  2673. uni[name] = promisify(name, todoApis[name]);
  2674. });
  2675. Object.keys(extraApi).forEach(function (name) {
  2676. uni[name] = promisify(name, extraApi[name]);
  2677. });
  2678. }
  2679. Object.keys(eventApi).forEach(function (name) {
  2680. uni[name] = eventApi[name];
  2681. });
  2682. Object.keys(api).forEach(function (name) {
  2683. uni[name] = promisify(name, api[name]);
  2684. });
  2685. Object.keys(wx).forEach(function (name) {
  2686. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2687. uni[name] = promisify(name, wrapper(name, wx[name]));
  2688. }
  2689. });
  2690. }
  2691. wx.createApp = createApp;
  2692. wx.createPage = createPage;
  2693. wx.createComponent = createComponent;
  2694. wx.createSubpackageApp = createSubpackageApp;
  2695. wx.createPlugin = createPlugin;
  2696. var uni$1 = uni;
  2697. var _default = uni$1;
  2698. exports.default = _default;
  2699. /* 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)))
  2700. /***/ }),
  2701. /***/ 20:
  2702. /*!****************************************************************!*\
  2703. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  2704. \****************************************************************/
  2705. /*! no static exports found */
  2706. /***/ (function(module, exports) {
  2707. function _iterableToArray(iter) {
  2708. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  2709. }
  2710. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2711. /***/ }),
  2712. /***/ 21:
  2713. /*!******************************************************************!*\
  2714. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  2715. \******************************************************************/
  2716. /*! no static exports found */
  2717. /***/ (function(module, exports) {
  2718. function _nonIterableSpread() {
  2719. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2720. }
  2721. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2722. /***/ }),
  2723. /***/ 22:
  2724. /*!*************************************************************!*\
  2725. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  2726. \*************************************************************/
  2727. /*! no static exports found */
  2728. /***/ (function(module, exports, __webpack_require__) {
  2729. "use strict";
  2730. /* WEBPACK VAR INJECTION */(function(uni, global) {
  2731. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2732. Object.defineProperty(exports, "__esModule", {
  2733. value: true
  2734. });
  2735. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  2736. exports.compileI18nJsonStr = compileI18nJsonStr;
  2737. exports.hasI18nJson = hasI18nJson;
  2738. exports.initVueI18n = initVueI18n;
  2739. exports.isI18nStr = isI18nStr;
  2740. exports.isString = void 0;
  2741. exports.normalizeLocale = normalizeLocale;
  2742. exports.parseI18nJson = parseI18nJson;
  2743. exports.resolveLocale = resolveLocale;
  2744. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  2745. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  2746. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  2747. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2748. var isObject = function isObject(val) {
  2749. return val !== null && (0, _typeof2.default)(val) === 'object';
  2750. };
  2751. var defaultDelimiters = ['{', '}'];
  2752. var BaseFormatter = /*#__PURE__*/function () {
  2753. function BaseFormatter() {
  2754. (0, _classCallCheck2.default)(this, BaseFormatter);
  2755. this._caches = Object.create(null);
  2756. }
  2757. (0, _createClass2.default)(BaseFormatter, [{
  2758. key: "interpolate",
  2759. value: function interpolate(message, values) {
  2760. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  2761. if (!values) {
  2762. return [message];
  2763. }
  2764. var tokens = this._caches[message];
  2765. if (!tokens) {
  2766. tokens = parse(message, delimiters);
  2767. this._caches[message] = tokens;
  2768. }
  2769. return compile(tokens, values);
  2770. }
  2771. }]);
  2772. return BaseFormatter;
  2773. }();
  2774. exports.Formatter = BaseFormatter;
  2775. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2776. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2777. function parse(format, _ref) {
  2778. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  2779. startDelimiter = _ref2[0],
  2780. endDelimiter = _ref2[1];
  2781. var tokens = [];
  2782. var position = 0;
  2783. var text = '';
  2784. while (position < format.length) {
  2785. var char = format[position++];
  2786. if (char === startDelimiter) {
  2787. if (text) {
  2788. tokens.push({
  2789. type: 'text',
  2790. value: text
  2791. });
  2792. }
  2793. text = '';
  2794. var sub = '';
  2795. char = format[position++];
  2796. while (char !== undefined && char !== endDelimiter) {
  2797. sub += char;
  2798. char = format[position++];
  2799. }
  2800. var isClosed = char === endDelimiter;
  2801. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  2802. tokens.push({
  2803. value: sub,
  2804. type: type
  2805. });
  2806. }
  2807. // else if (char === '%') {
  2808. // // when found rails i18n syntax, skip text capture
  2809. // if (format[position] !== '{') {
  2810. // text += char
  2811. // }
  2812. // }
  2813. else {
  2814. text += char;
  2815. }
  2816. }
  2817. text && tokens.push({
  2818. type: 'text',
  2819. value: text
  2820. });
  2821. return tokens;
  2822. }
  2823. function compile(tokens, values) {
  2824. var compiled = [];
  2825. var index = 0;
  2826. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  2827. if (mode === 'unknown') {
  2828. return compiled;
  2829. }
  2830. while (index < tokens.length) {
  2831. var token = tokens[index];
  2832. switch (token.type) {
  2833. case 'text':
  2834. compiled.push(token.value);
  2835. break;
  2836. case 'list':
  2837. compiled.push(values[parseInt(token.value, 10)]);
  2838. break;
  2839. case 'named':
  2840. if (mode === 'named') {
  2841. compiled.push(values[token.value]);
  2842. } else {
  2843. if (true) {
  2844. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  2845. }
  2846. }
  2847. break;
  2848. case 'unknown':
  2849. if (true) {
  2850. console.warn("Detect 'unknown' type of token!");
  2851. }
  2852. break;
  2853. }
  2854. index++;
  2855. }
  2856. return compiled;
  2857. }
  2858. var LOCALE_ZH_HANS = 'zh-Hans';
  2859. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  2860. var LOCALE_ZH_HANT = 'zh-Hant';
  2861. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  2862. var LOCALE_EN = 'en';
  2863. exports.LOCALE_EN = LOCALE_EN;
  2864. var LOCALE_FR = 'fr';
  2865. exports.LOCALE_FR = LOCALE_FR;
  2866. var LOCALE_ES = 'es';
  2867. exports.LOCALE_ES = LOCALE_ES;
  2868. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2869. var hasOwn = function hasOwn(val, key) {
  2870. return hasOwnProperty.call(val, key);
  2871. };
  2872. var defaultFormatter = new BaseFormatter();
  2873. function include(str, parts) {
  2874. return !!parts.find(function (part) {
  2875. return str.indexOf(part) !== -1;
  2876. });
  2877. }
  2878. function startsWith(str, parts) {
  2879. return parts.find(function (part) {
  2880. return str.indexOf(part) === 0;
  2881. });
  2882. }
  2883. function normalizeLocale(locale, messages) {
  2884. if (!locale) {
  2885. return;
  2886. }
  2887. locale = locale.trim().replace(/_/g, '-');
  2888. if (messages && messages[locale]) {
  2889. return locale;
  2890. }
  2891. locale = locale.toLowerCase();
  2892. if (locale === 'chinese') {
  2893. // 支付宝
  2894. return LOCALE_ZH_HANS;
  2895. }
  2896. if (locale.indexOf('zh') === 0) {
  2897. if (locale.indexOf('-hans') > -1) {
  2898. return LOCALE_ZH_HANS;
  2899. }
  2900. if (locale.indexOf('-hant') > -1) {
  2901. return LOCALE_ZH_HANT;
  2902. }
  2903. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2904. return LOCALE_ZH_HANT;
  2905. }
  2906. return LOCALE_ZH_HANS;
  2907. }
  2908. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  2909. if (messages && Object.keys(messages).length > 0) {
  2910. locales = Object.keys(messages);
  2911. }
  2912. var lang = startsWith(locale, locales);
  2913. if (lang) {
  2914. return lang;
  2915. }
  2916. }
  2917. var I18n = /*#__PURE__*/function () {
  2918. function I18n(_ref3) {
  2919. var locale = _ref3.locale,
  2920. fallbackLocale = _ref3.fallbackLocale,
  2921. messages = _ref3.messages,
  2922. watcher = _ref3.watcher,
  2923. formater = _ref3.formater;
  2924. (0, _classCallCheck2.default)(this, I18n);
  2925. this.locale = LOCALE_EN;
  2926. this.fallbackLocale = LOCALE_EN;
  2927. this.message = {};
  2928. this.messages = {};
  2929. this.watchers = [];
  2930. if (fallbackLocale) {
  2931. this.fallbackLocale = fallbackLocale;
  2932. }
  2933. this.formater = formater || defaultFormatter;
  2934. this.messages = messages || {};
  2935. this.setLocale(locale || LOCALE_EN);
  2936. if (watcher) {
  2937. this.watchLocale(watcher);
  2938. }
  2939. }
  2940. (0, _createClass2.default)(I18n, [{
  2941. key: "setLocale",
  2942. value: function setLocale(locale) {
  2943. var _this = this;
  2944. var oldLocale = this.locale;
  2945. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  2946. if (!this.messages[this.locale]) {
  2947. // 可能初始化时不存在
  2948. this.messages[this.locale] = {};
  2949. }
  2950. this.message = this.messages[this.locale];
  2951. // 仅发生变化时,通知
  2952. if (oldLocale !== this.locale) {
  2953. this.watchers.forEach(function (watcher) {
  2954. watcher(_this.locale, oldLocale);
  2955. });
  2956. }
  2957. }
  2958. }, {
  2959. key: "getLocale",
  2960. value: function getLocale() {
  2961. return this.locale;
  2962. }
  2963. }, {
  2964. key: "watchLocale",
  2965. value: function watchLocale(fn) {
  2966. var _this2 = this;
  2967. var index = this.watchers.push(fn) - 1;
  2968. return function () {
  2969. _this2.watchers.splice(index, 1);
  2970. };
  2971. }
  2972. }, {
  2973. key: "add",
  2974. value: function add(locale, message) {
  2975. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2976. var curMessages = this.messages[locale];
  2977. if (curMessages) {
  2978. if (override) {
  2979. Object.assign(curMessages, message);
  2980. } else {
  2981. Object.keys(message).forEach(function (key) {
  2982. if (!hasOwn(curMessages, key)) {
  2983. curMessages[key] = message[key];
  2984. }
  2985. });
  2986. }
  2987. } else {
  2988. this.messages[locale] = message;
  2989. }
  2990. }
  2991. }, {
  2992. key: "f",
  2993. value: function f(message, values, delimiters) {
  2994. return this.formater.interpolate(message, values, delimiters).join('');
  2995. }
  2996. }, {
  2997. key: "t",
  2998. value: function t(key, locale, values) {
  2999. var message = this.message;
  3000. if (typeof locale === 'string') {
  3001. locale = normalizeLocale(locale, this.messages);
  3002. locale && (message = this.messages[locale]);
  3003. } else {
  3004. values = locale;
  3005. }
  3006. if (!hasOwn(message, key)) {
  3007. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  3008. return key;
  3009. }
  3010. return this.formater.interpolate(message[key], values).join('');
  3011. }
  3012. }]);
  3013. return I18n;
  3014. }();
  3015. exports.I18n = I18n;
  3016. function watchAppLocale(appVm, i18n) {
  3017. // 需要保证 watch 的触发在组件渲染之前
  3018. if (appVm.$watchLocale) {
  3019. // vue2
  3020. appVm.$watchLocale(function (newLocale) {
  3021. i18n.setLocale(newLocale);
  3022. });
  3023. } else {
  3024. appVm.$watch(function () {
  3025. return appVm.$locale;
  3026. }, function (newLocale) {
  3027. i18n.setLocale(newLocale);
  3028. });
  3029. }
  3030. }
  3031. function getDefaultLocale() {
  3032. if (typeof uni !== 'undefined' && uni.getLocale) {
  3033. return uni.getLocale();
  3034. }
  3035. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  3036. if (typeof global !== 'undefined' && global.getLocale) {
  3037. return global.getLocale();
  3038. }
  3039. return LOCALE_EN;
  3040. }
  3041. function initVueI18n(locale) {
  3042. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3043. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  3044. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  3045. // 兼容旧版本入参
  3046. if (typeof locale !== 'string') {
  3047. var _ref4 = [messages, locale];
  3048. locale = _ref4[0];
  3049. messages = _ref4[1];
  3050. }
  3051. if (typeof locale !== 'string') {
  3052. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  3053. locale = getDefaultLocale();
  3054. }
  3055. if (typeof fallbackLocale !== 'string') {
  3056. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  3057. }
  3058. var i18n = new I18n({
  3059. locale: locale,
  3060. fallbackLocale: fallbackLocale,
  3061. messages: messages,
  3062. watcher: watcher
  3063. });
  3064. var _t = function t(key, values) {
  3065. if (typeof getApp !== 'function') {
  3066. // app view
  3067. /* eslint-disable no-func-assign */
  3068. _t = function t(key, values) {
  3069. return i18n.t(key, values);
  3070. };
  3071. } else {
  3072. var isWatchedAppLocale = false;
  3073. _t = function t(key, values) {
  3074. var appVm = getApp().$vm;
  3075. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  3076. // options: {
  3077. // type: Array,
  3078. // default () {
  3079. // return [{
  3080. // icon: 'shop',
  3081. // text: t("uni-goods-nav.options.shop"),
  3082. // }, {
  3083. // icon: 'cart',
  3084. // text: t("uni-goods-nav.options.cart")
  3085. // }]
  3086. // }
  3087. // },
  3088. if (appVm) {
  3089. // 触发响应式
  3090. appVm.$locale;
  3091. if (!isWatchedAppLocale) {
  3092. isWatchedAppLocale = true;
  3093. watchAppLocale(appVm, i18n);
  3094. }
  3095. }
  3096. return i18n.t(key, values);
  3097. };
  3098. }
  3099. return _t(key, values);
  3100. };
  3101. return {
  3102. i18n: i18n,
  3103. f: function f(message, values, delimiters) {
  3104. return i18n.f(message, values, delimiters);
  3105. },
  3106. t: function t(key, values) {
  3107. return _t(key, values);
  3108. },
  3109. add: function add(locale, message) {
  3110. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  3111. return i18n.add(locale, message, override);
  3112. },
  3113. watch: function watch(fn) {
  3114. return i18n.watchLocale(fn);
  3115. },
  3116. getLocale: function getLocale() {
  3117. return i18n.getLocale();
  3118. },
  3119. setLocale: function setLocale(newLocale) {
  3120. return i18n.setLocale(newLocale);
  3121. }
  3122. };
  3123. }
  3124. var isString = function isString(val) {
  3125. return typeof val === 'string';
  3126. };
  3127. exports.isString = isString;
  3128. var formater;
  3129. function hasI18nJson(jsonObj, delimiters) {
  3130. if (!formater) {
  3131. formater = new BaseFormatter();
  3132. }
  3133. return walkJsonObj(jsonObj, function (jsonObj, key) {
  3134. var value = jsonObj[key];
  3135. if (isString(value)) {
  3136. if (isI18nStr(value, delimiters)) {
  3137. return true;
  3138. }
  3139. } else {
  3140. return hasI18nJson(value, delimiters);
  3141. }
  3142. });
  3143. }
  3144. function parseI18nJson(jsonObj, values, delimiters) {
  3145. if (!formater) {
  3146. formater = new BaseFormatter();
  3147. }
  3148. walkJsonObj(jsonObj, function (jsonObj, key) {
  3149. var value = jsonObj[key];
  3150. if (isString(value)) {
  3151. if (isI18nStr(value, delimiters)) {
  3152. jsonObj[key] = compileStr(value, values, delimiters);
  3153. }
  3154. } else {
  3155. parseI18nJson(value, values, delimiters);
  3156. }
  3157. });
  3158. return jsonObj;
  3159. }
  3160. function compileI18nJsonStr(jsonStr, _ref5) {
  3161. var locale = _ref5.locale,
  3162. locales = _ref5.locales,
  3163. delimiters = _ref5.delimiters;
  3164. if (!isI18nStr(jsonStr, delimiters)) {
  3165. return jsonStr;
  3166. }
  3167. if (!formater) {
  3168. formater = new BaseFormatter();
  3169. }
  3170. var localeValues = [];
  3171. Object.keys(locales).forEach(function (name) {
  3172. if (name !== locale) {
  3173. localeValues.push({
  3174. locale: name,
  3175. values: locales[name]
  3176. });
  3177. }
  3178. });
  3179. localeValues.unshift({
  3180. locale: locale,
  3181. values: locales[locale]
  3182. });
  3183. try {
  3184. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  3185. } catch (e) {}
  3186. return jsonStr;
  3187. }
  3188. function isI18nStr(value, delimiters) {
  3189. return value.indexOf(delimiters[0]) > -1;
  3190. }
  3191. function compileStr(value, values, delimiters) {
  3192. return formater.interpolate(value, values, delimiters).join('');
  3193. }
  3194. function compileValue(jsonObj, key, localeValues, delimiters) {
  3195. var value = jsonObj[key];
  3196. if (isString(value)) {
  3197. // 存在国际化
  3198. if (isI18nStr(value, delimiters)) {
  3199. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  3200. if (localeValues.length > 1) {
  3201. // 格式化国际化语言
  3202. var valueLocales = jsonObj[key + 'Locales'] = {};
  3203. localeValues.forEach(function (localValue) {
  3204. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  3205. });
  3206. }
  3207. }
  3208. } else {
  3209. compileJsonObj(value, localeValues, delimiters);
  3210. }
  3211. }
  3212. function compileJsonObj(jsonObj, localeValues, delimiters) {
  3213. walkJsonObj(jsonObj, function (jsonObj, key) {
  3214. compileValue(jsonObj, key, localeValues, delimiters);
  3215. });
  3216. return jsonObj;
  3217. }
  3218. function walkJsonObj(jsonObj, walk) {
  3219. if (Array.isArray(jsonObj)) {
  3220. for (var i = 0; i < jsonObj.length; i++) {
  3221. if (walk(jsonObj, i)) {
  3222. return true;
  3223. }
  3224. }
  3225. } else if (isObject(jsonObj)) {
  3226. for (var key in jsonObj) {
  3227. if (walk(jsonObj, key)) {
  3228. return true;
  3229. }
  3230. }
  3231. }
  3232. return false;
  3233. }
  3234. function resolveLocale(locales) {
  3235. return function (locale) {
  3236. if (!locale) {
  3237. return locale;
  3238. }
  3239. locale = normalizeLocale(locale) || locale;
  3240. return resolveLocaleChain(locale).find(function (locale) {
  3241. return locales.indexOf(locale) > -1;
  3242. });
  3243. };
  3244. }
  3245. function resolveLocaleChain(locale) {
  3246. var chain = [];
  3247. var tokens = locale.split('-');
  3248. while (tokens.length) {
  3249. chain.push(tokens.join('-'));
  3250. tokens.pop();
  3251. }
  3252. return chain;
  3253. }
  3254. /* 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)))
  3255. /***/ }),
  3256. /***/ 222:
  3257. /*!*************************************!*\
  3258. !*** E:/项目/2023-8/xyl/api/order.js ***!
  3259. \*************************************/
  3260. /*! no static exports found */
  3261. /***/ (function(module, exports, __webpack_require__) {
  3262. "use strict";
  3263. var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  3264. Object.defineProperty(exports, "__esModule", {
  3265. value: true
  3266. });
  3267. exports.computedOrderkey = computedOrderkey;
  3268. exports.confirm = confirm;
  3269. exports.couponsOrder = couponsOrder;
  3270. exports.createOrderkey = createOrderkey;
  3271. exports.express_query = express_query;
  3272. exports.getCouponsList = getCouponsList;
  3273. exports.orderCancel = orderCancel;
  3274. exports.orderDel = orderDel;
  3275. exports.orderDetail = orderDetail;
  3276. exports.orderList = orderList;
  3277. exports.orderPay = orderPay;
  3278. exports.orderTake = orderTake;
  3279. exports.order_comment = order_comment;
  3280. exports.product = product;
  3281. exports.refund = refund;
  3282. exports.refundReason = refundReason;
  3283. exports.storeList = storeList;
  3284. exports.upload = upload;
  3285. var _request = _interopRequireWildcard(__webpack_require__(/*! @/utils/request */ 46));
  3286. 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); }
  3287. 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; }
  3288. // 订单确认
  3289. function confirm(data) {
  3290. return (0, _request.default)({
  3291. url: '/api/order/confirm',
  3292. method: 'post',
  3293. data: data
  3294. });
  3295. }
  3296. //获取可使用优惠券
  3297. function couponsOrder(data, price) {
  3298. return (0, _request.default)({
  3299. url: '/api/coupons/order/' + price,
  3300. method: 'get',
  3301. data: data
  3302. });
  3303. }
  3304. //获取优惠券列表
  3305. function getCouponsList(data, types) {
  3306. //优惠券状态 0全部 1未使用 2已使用
  3307. return (0, _request.default)({
  3308. url: '/api/coupons/user/' + types,
  3309. method: 'get',
  3310. data: data
  3311. });
  3312. }
  3313. //提交评论
  3314. function order_comment(data) {
  3315. return (0, _request.default)({
  3316. url: '/api/order/comment',
  3317. method: 'post',
  3318. data: data
  3319. });
  3320. }
  3321. //订单产品信息
  3322. function product(data) {
  3323. return (0, _request.default)({
  3324. url: '/api/order/product',
  3325. method: 'post',
  3326. data: data
  3327. });
  3328. }
  3329. // 快递查询
  3330. function express_query(data) {
  3331. return (0, _request.default)({
  3332. url: '/api/order/express_query',
  3333. method: 'get',
  3334. data: data
  3335. });
  3336. }
  3337. //上传图片
  3338. function upload(data) {
  3339. return (0, _request.upFilse)({
  3340. url: '/api/upload/image',
  3341. method: 'post',
  3342. data: data
  3343. });
  3344. }
  3345. // 订单列表
  3346. function orderList(data) {
  3347. return (0, _request.default)({
  3348. url: '/api/order/list',
  3349. method: 'get',
  3350. data: data
  3351. });
  3352. }
  3353. // 订单详细
  3354. function orderDetail(data, orderid) {
  3355. return (0, _request.default)({
  3356. url: '/api/order/detail/' + orderid,
  3357. method: 'get',
  3358. data: data
  3359. });
  3360. }
  3361. // 取消订单
  3362. function orderCancel(data) {
  3363. return (0, _request.default)({
  3364. url: '/api/order/cancel',
  3365. method: 'post',
  3366. data: data
  3367. });
  3368. }
  3369. // 删除订单
  3370. function orderDel(data) {
  3371. return (0, _request.default)({
  3372. url: '/api/order/del',
  3373. method: 'get',
  3374. data: data
  3375. });
  3376. }
  3377. // 申请退款
  3378. function refund(data) {
  3379. return (0, _request.default)({
  3380. url: '/api/order/refund/verify',
  3381. method: 'post',
  3382. data: data
  3383. });
  3384. }
  3385. // 退款理由列表
  3386. function refundReason(data) {
  3387. return (0, _request.default)({
  3388. url: '/api/order/refund/reason',
  3389. method: 'get',
  3390. data: data
  3391. });
  3392. }
  3393. // 确认收货
  3394. function orderTake(data) {
  3395. return (0, _request.default)({
  3396. url: '/api/order/take',
  3397. method: 'post',
  3398. data: data
  3399. });
  3400. }
  3401. // 订单支付
  3402. function orderPay(data) {
  3403. return (0, _request.default)({
  3404. url: '/api/order/pay',
  3405. method: 'post',
  3406. data: data
  3407. });
  3408. }
  3409. // 创建订单
  3410. function createOrderkey(data, key) {
  3411. return (0, _request.default)({
  3412. url: '/api/order/create/' + key,
  3413. method: 'post',
  3414. data: data
  3415. });
  3416. }
  3417. // 统计订单金额
  3418. function computedOrderkey(data) {
  3419. return (0, _request.default)({
  3420. url: '/api/order/computed/' + data.orderkey,
  3421. method: 'post',
  3422. data: data
  3423. });
  3424. }
  3425. function storeList(data) {
  3426. return (0, _request.default)({
  3427. url: '/api/store_list',
  3428. method: 'get',
  3429. data: data
  3430. });
  3431. }
  3432. /***/ }),
  3433. /***/ 223:
  3434. /*!*********************************!*\
  3435. !*** ./node_modules/url/url.js ***!
  3436. \*********************************/
  3437. /*! no static exports found */
  3438. /***/ (function(module, exports, __webpack_require__) {
  3439. "use strict";
  3440. // Copyright Joyent, Inc. and other Node contributors.
  3441. //
  3442. // Permission is hereby granted, free of charge, to any person obtaining a
  3443. // copy of this software and associated documentation files (the
  3444. // "Software"), to deal in the Software without restriction, including
  3445. // without limitation the rights to use, copy, modify, merge, publish,
  3446. // distribute, sublicense, and/or sell copies of the Software, and to permit
  3447. // persons to whom the Software is furnished to do so, subject to the
  3448. // following conditions:
  3449. //
  3450. // The above copyright notice and this permission notice shall be included
  3451. // in all copies or substantial portions of the Software.
  3452. //
  3453. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  3454. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  3455. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  3456. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  3457. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  3458. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  3459. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  3460. var punycode = __webpack_require__(/*! punycode */ 224);
  3461. var util = __webpack_require__(/*! ./util */ 226);
  3462. exports.parse = urlParse;
  3463. exports.resolve = urlResolve;
  3464. exports.resolveObject = urlResolveObject;
  3465. exports.format = urlFormat;
  3466. exports.Url = Url;
  3467. function Url() {
  3468. this.protocol = null;
  3469. this.slashes = null;
  3470. this.auth = null;
  3471. this.host = null;
  3472. this.port = null;
  3473. this.hostname = null;
  3474. this.hash = null;
  3475. this.search = null;
  3476. this.query = null;
  3477. this.pathname = null;
  3478. this.path = null;
  3479. this.href = null;
  3480. }
  3481. // Reference: RFC 3986, RFC 1808, RFC 2396
  3482. // define these here so at least they only have to be
  3483. // compiled once on the first module load.
  3484. var protocolPattern = /^([a-z0-9.+-]+:)/i,
  3485. portPattern = /:[0-9]*$/,
  3486. // Special case for a simple path URL
  3487. simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
  3488. // RFC 2396: characters reserved for delimiting URLs.
  3489. // We actually just auto-escape these.
  3490. delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'],
  3491. // RFC 2396: characters not allowed for various reasons.
  3492. unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims),
  3493. // Allowed by RFCs, but cause of XSS attacks. Always escape these.
  3494. autoEscape = ['\''].concat(unwise),
  3495. // Characters that are never ever allowed in a hostname.
  3496. // Note that any invalid chars are also handled, but these
  3497. // are the ones that are *expected* to be seen, so we fast-path
  3498. // them.
  3499. nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),
  3500. hostEndingChars = ['/', '?', '#'],
  3501. hostnameMaxLen = 255,
  3502. hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,
  3503. hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
  3504. // protocols that can allow "unsafe" and "unwise" chars.
  3505. unsafeProtocol = {
  3506. 'javascript': true,
  3507. 'javascript:': true
  3508. },
  3509. // protocols that never have a hostname.
  3510. hostlessProtocol = {
  3511. 'javascript': true,
  3512. 'javascript:': true
  3513. },
  3514. // protocols that always contain a // bit.
  3515. slashedProtocol = {
  3516. 'http': true,
  3517. 'https': true,
  3518. 'ftp': true,
  3519. 'gopher': true,
  3520. 'file': true,
  3521. 'http:': true,
  3522. 'https:': true,
  3523. 'ftp:': true,
  3524. 'gopher:': true,
  3525. 'file:': true
  3526. },
  3527. querystring = __webpack_require__(/*! querystring */ 227);
  3528. function urlParse(url, parseQueryString, slashesDenoteHost) {
  3529. if (url && util.isObject(url) && url instanceof Url) return url;
  3530. var u = new Url;
  3531. u.parse(url, parseQueryString, slashesDenoteHost);
  3532. return u;
  3533. }
  3534. Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
  3535. if (!util.isString(url)) {
  3536. throw new TypeError("Parameter 'url' must be a string, not " + typeof url);
  3537. }
  3538. // Copy chrome, IE, opera backslash-handling behavior.
  3539. // Back slashes before the query string get converted to forward slashes
  3540. // See: https://code.google.com/p/chromium/issues/detail?id=25916
  3541. var queryIndex = url.indexOf('?'),
  3542. splitter =
  3543. (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',
  3544. uSplit = url.split(splitter),
  3545. slashRegex = /\\/g;
  3546. uSplit[0] = uSplit[0].replace(slashRegex, '/');
  3547. url = uSplit.join(splitter);
  3548. var rest = url;
  3549. // trim before proceeding.
  3550. // This is to support parse stuff like " http://foo.com \n"
  3551. rest = rest.trim();
  3552. if (!slashesDenoteHost && url.split('#').length === 1) {
  3553. // Try fast path regexp
  3554. var simplePath = simplePathPattern.exec(rest);
  3555. if (simplePath) {
  3556. this.path = rest;
  3557. this.href = rest;
  3558. this.pathname = simplePath[1];
  3559. if (simplePath[2]) {
  3560. this.search = simplePath[2];
  3561. if (parseQueryString) {
  3562. this.query = querystring.parse(this.search.substr(1));
  3563. } else {
  3564. this.query = this.search.substr(1);
  3565. }
  3566. } else if (parseQueryString) {
  3567. this.search = '';
  3568. this.query = {};
  3569. }
  3570. return this;
  3571. }
  3572. }
  3573. var proto = protocolPattern.exec(rest);
  3574. if (proto) {
  3575. proto = proto[0];
  3576. var lowerProto = proto.toLowerCase();
  3577. this.protocol = lowerProto;
  3578. rest = rest.substr(proto.length);
  3579. }
  3580. // figure out if it's got a host
  3581. // user@server is *always* interpreted as a hostname, and url
  3582. // resolution will treat //foo/bar as host=foo,path=bar because that's
  3583. // how the browser resolves relative URLs.
  3584. if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
  3585. var slashes = rest.substr(0, 2) === '//';
  3586. if (slashes && !(proto && hostlessProtocol[proto])) {
  3587. rest = rest.substr(2);
  3588. this.slashes = true;
  3589. }
  3590. }
  3591. if (!hostlessProtocol[proto] &&
  3592. (slashes || (proto && !slashedProtocol[proto]))) {
  3593. // there's a hostname.
  3594. // the first instance of /, ?, ;, or # ends the host.
  3595. //
  3596. // If there is an @ in the hostname, then non-host chars *are* allowed
  3597. // to the left of the last @ sign, unless some host-ending character
  3598. // comes *before* the @-sign.
  3599. // URLs are obnoxious.
  3600. //
  3601. // ex:
  3602. // http://a@b@c/ => user:a@b host:c
  3603. // http://a@b?@c => user:a host:c path:/?@c
  3604. // v0.12 TODO(isaacs): This is not quite how Chrome does things.
  3605. // Review our test case against browsers more comprehensively.
  3606. // find the first instance of any hostEndingChars
  3607. var hostEnd = -1;
  3608. for (var i = 0; i < hostEndingChars.length; i++) {
  3609. var hec = rest.indexOf(hostEndingChars[i]);
  3610. if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
  3611. hostEnd = hec;
  3612. }
  3613. // at this point, either we have an explicit point where the
  3614. // auth portion cannot go past, or the last @ char is the decider.
  3615. var auth, atSign;
  3616. if (hostEnd === -1) {
  3617. // atSign can be anywhere.
  3618. atSign = rest.lastIndexOf('@');
  3619. } else {
  3620. // atSign must be in auth portion.
  3621. // http://a@b/c@d => host:b auth:a path:/c@d
  3622. atSign = rest.lastIndexOf('@', hostEnd);
  3623. }
  3624. // Now we have a portion which is definitely the auth.
  3625. // Pull that off.
  3626. if (atSign !== -1) {
  3627. auth = rest.slice(0, atSign);
  3628. rest = rest.slice(atSign + 1);
  3629. this.auth = decodeURIComponent(auth);
  3630. }
  3631. // the host is the remaining to the left of the first non-host char
  3632. hostEnd = -1;
  3633. for (var i = 0; i < nonHostChars.length; i++) {
  3634. var hec = rest.indexOf(nonHostChars[i]);
  3635. if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
  3636. hostEnd = hec;
  3637. }
  3638. // if we still have not hit it, then the entire thing is a host.
  3639. if (hostEnd === -1)
  3640. hostEnd = rest.length;
  3641. this.host = rest.slice(0, hostEnd);
  3642. rest = rest.slice(hostEnd);
  3643. // pull out port.
  3644. this.parseHost();
  3645. // we've indicated that there is a hostname,
  3646. // so even if it's empty, it has to be present.
  3647. this.hostname = this.hostname || '';
  3648. // if hostname begins with [ and ends with ]
  3649. // assume that it's an IPv6 address.
  3650. var ipv6Hostname = this.hostname[0] === '[' &&
  3651. this.hostname[this.hostname.length - 1] === ']';
  3652. // validate a little.
  3653. if (!ipv6Hostname) {
  3654. var hostparts = this.hostname.split(/\./);
  3655. for (var i = 0, l = hostparts.length; i < l; i++) {
  3656. var part = hostparts[i];
  3657. if (!part) continue;
  3658. if (!part.match(hostnamePartPattern)) {
  3659. var newpart = '';
  3660. for (var j = 0, k = part.length; j < k; j++) {
  3661. if (part.charCodeAt(j) > 127) {
  3662. // we replace non-ASCII char with a temporary placeholder
  3663. // we need this to make sure size of hostname is not
  3664. // broken by replacing non-ASCII by nothing
  3665. newpart += 'x';
  3666. } else {
  3667. newpart += part[j];
  3668. }
  3669. }
  3670. // we test again with ASCII char only
  3671. if (!newpart.match(hostnamePartPattern)) {
  3672. var validParts = hostparts.slice(0, i);
  3673. var notHost = hostparts.slice(i + 1);
  3674. var bit = part.match(hostnamePartStart);
  3675. if (bit) {
  3676. validParts.push(bit[1]);
  3677. notHost.unshift(bit[2]);
  3678. }
  3679. if (notHost.length) {
  3680. rest = '/' + notHost.join('.') + rest;
  3681. }
  3682. this.hostname = validParts.join('.');
  3683. break;
  3684. }
  3685. }
  3686. }
  3687. }
  3688. if (this.hostname.length > hostnameMaxLen) {
  3689. this.hostname = '';
  3690. } else {
  3691. // hostnames are always lower case.
  3692. this.hostname = this.hostname.toLowerCase();
  3693. }
  3694. if (!ipv6Hostname) {
  3695. // IDNA Support: Returns a punycoded representation of "domain".
  3696. // It only converts parts of the domain name that
  3697. // have non-ASCII characters, i.e. it doesn't matter if
  3698. // you call it with a domain that already is ASCII-only.
  3699. this.hostname = punycode.toASCII(this.hostname);
  3700. }
  3701. var p = this.port ? ':' + this.port : '';
  3702. var h = this.hostname || '';
  3703. this.host = h + p;
  3704. this.href += this.host;
  3705. // strip [ and ] from the hostname
  3706. // the host field still retains them, though
  3707. if (ipv6Hostname) {
  3708. this.hostname = this.hostname.substr(1, this.hostname.length - 2);
  3709. if (rest[0] !== '/') {
  3710. rest = '/' + rest;
  3711. }
  3712. }
  3713. }
  3714. // now rest is set to the post-host stuff.
  3715. // chop off any delim chars.
  3716. if (!unsafeProtocol[lowerProto]) {
  3717. // First, make 100% sure that any "autoEscape" chars get
  3718. // escaped, even if encodeURIComponent doesn't think they
  3719. // need to be.
  3720. for (var i = 0, l = autoEscape.length; i < l; i++) {
  3721. var ae = autoEscape[i];
  3722. if (rest.indexOf(ae) === -1)
  3723. continue;
  3724. var esc = encodeURIComponent(ae);
  3725. if (esc === ae) {
  3726. esc = escape(ae);
  3727. }
  3728. rest = rest.split(ae).join(esc);
  3729. }
  3730. }
  3731. // chop off from the tail first.
  3732. var hash = rest.indexOf('#');
  3733. if (hash !== -1) {
  3734. // got a fragment string.
  3735. this.hash = rest.substr(hash);
  3736. rest = rest.slice(0, hash);
  3737. }
  3738. var qm = rest.indexOf('?');
  3739. if (qm !== -1) {
  3740. this.search = rest.substr(qm);
  3741. this.query = rest.substr(qm + 1);
  3742. if (parseQueryString) {
  3743. this.query = querystring.parse(this.query);
  3744. }
  3745. rest = rest.slice(0, qm);
  3746. } else if (parseQueryString) {
  3747. // no query string, but parseQueryString still requested
  3748. this.search = '';
  3749. this.query = {};
  3750. }
  3751. if (rest) this.pathname = rest;
  3752. if (slashedProtocol[lowerProto] &&
  3753. this.hostname && !this.pathname) {
  3754. this.pathname = '/';
  3755. }
  3756. //to support http.request
  3757. if (this.pathname || this.search) {
  3758. var p = this.pathname || '';
  3759. var s = this.search || '';
  3760. this.path = p + s;
  3761. }
  3762. // finally, reconstruct the href based on what has been validated.
  3763. this.href = this.format();
  3764. return this;
  3765. };
  3766. // format a parsed object into a url string
  3767. function urlFormat(obj) {
  3768. // ensure it's an object, and not a string url.
  3769. // If it's an obj, this is a no-op.
  3770. // this way, you can call url_format() on strings
  3771. // to clean up potentially wonky urls.
  3772. if (util.isString(obj)) obj = urlParse(obj);
  3773. if (!(obj instanceof Url)) return Url.prototype.format.call(obj);
  3774. return obj.format();
  3775. }
  3776. Url.prototype.format = function() {
  3777. var auth = this.auth || '';
  3778. if (auth) {
  3779. auth = encodeURIComponent(auth);
  3780. auth = auth.replace(/%3A/i, ':');
  3781. auth += '@';
  3782. }
  3783. var protocol = this.protocol || '',
  3784. pathname = this.pathname || '',
  3785. hash = this.hash || '',
  3786. host = false,
  3787. query = '';
  3788. if (this.host) {
  3789. host = auth + this.host;
  3790. } else if (this.hostname) {
  3791. host = auth + (this.hostname.indexOf(':') === -1 ?
  3792. this.hostname :
  3793. '[' + this.hostname + ']');
  3794. if (this.port) {
  3795. host += ':' + this.port;
  3796. }
  3797. }
  3798. if (this.query &&
  3799. util.isObject(this.query) &&
  3800. Object.keys(this.query).length) {
  3801. query = querystring.stringify(this.query);
  3802. }
  3803. var search = this.search || (query && ('?' + query)) || '';
  3804. if (protocol && protocol.substr(-1) !== ':') protocol += ':';
  3805. // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.
  3806. // unless they had them to begin with.
  3807. if (this.slashes ||
  3808. (!protocol || slashedProtocol[protocol]) && host !== false) {
  3809. host = '//' + (host || '');
  3810. if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;
  3811. } else if (!host) {
  3812. host = '';
  3813. }
  3814. if (hash && hash.charAt(0) !== '#') hash = '#' + hash;
  3815. if (search && search.charAt(0) !== '?') search = '?' + search;
  3816. pathname = pathname.replace(/[?#]/g, function(match) {
  3817. return encodeURIComponent(match);
  3818. });
  3819. search = search.replace('#', '%23');
  3820. return protocol + host + pathname + search + hash;
  3821. };
  3822. function urlResolve(source, relative) {
  3823. return urlParse(source, false, true).resolve(relative);
  3824. }
  3825. Url.prototype.resolve = function(relative) {
  3826. return this.resolveObject(urlParse(relative, false, true)).format();
  3827. };
  3828. function urlResolveObject(source, relative) {
  3829. if (!source) return relative;
  3830. return urlParse(source, false, true).resolveObject(relative);
  3831. }
  3832. Url.prototype.resolveObject = function(relative) {
  3833. if (util.isString(relative)) {
  3834. var rel = new Url();
  3835. rel.parse(relative, false, true);
  3836. relative = rel;
  3837. }
  3838. var result = new Url();
  3839. var tkeys = Object.keys(this);
  3840. for (var tk = 0; tk < tkeys.length; tk++) {
  3841. var tkey = tkeys[tk];
  3842. result[tkey] = this[tkey];
  3843. }
  3844. // hash is always overridden, no matter what.
  3845. // even href="" will remove it.
  3846. result.hash = relative.hash;
  3847. // if the relative url is empty, then there's nothing left to do here.
  3848. if (relative.href === '') {
  3849. result.href = result.format();
  3850. return result;
  3851. }
  3852. // hrefs like //foo/bar always cut to the protocol.
  3853. if (relative.slashes && !relative.protocol) {
  3854. // take everything except the protocol from relative
  3855. var rkeys = Object.keys(relative);
  3856. for (var rk = 0; rk < rkeys.length; rk++) {
  3857. var rkey = rkeys[rk];
  3858. if (rkey !== 'protocol')
  3859. result[rkey] = relative[rkey];
  3860. }
  3861. //urlParse appends trailing / to urls like http://www.example.com
  3862. if (slashedProtocol[result.protocol] &&
  3863. result.hostname && !result.pathname) {
  3864. result.path = result.pathname = '/';
  3865. }
  3866. result.href = result.format();
  3867. return result;
  3868. }
  3869. if (relative.protocol && relative.protocol !== result.protocol) {
  3870. // if it's a known url protocol, then changing
  3871. // the protocol does weird things
  3872. // first, if it's not file:, then we MUST have a host,
  3873. // and if there was a path
  3874. // to begin with, then we MUST have a path.
  3875. // if it is file:, then the host is dropped,
  3876. // because that's known to be hostless.
  3877. // anything else is assumed to be absolute.
  3878. if (!slashedProtocol[relative.protocol]) {
  3879. var keys = Object.keys(relative);
  3880. for (var v = 0; v < keys.length; v++) {
  3881. var k = keys[v];
  3882. result[k] = relative[k];
  3883. }
  3884. result.href = result.format();
  3885. return result;
  3886. }
  3887. result.protocol = relative.protocol;
  3888. if (!relative.host && !hostlessProtocol[relative.protocol]) {
  3889. var relPath = (relative.pathname || '').split('/');
  3890. while (relPath.length && !(relative.host = relPath.shift()));
  3891. if (!relative.host) relative.host = '';
  3892. if (!relative.hostname) relative.hostname = '';
  3893. if (relPath[0] !== '') relPath.unshift('');
  3894. if (relPath.length < 2) relPath.unshift('');
  3895. result.pathname = relPath.join('/');
  3896. } else {
  3897. result.pathname = relative.pathname;
  3898. }
  3899. result.search = relative.search;
  3900. result.query = relative.query;
  3901. result.host = relative.host || '';
  3902. result.auth = relative.auth;
  3903. result.hostname = relative.hostname || relative.host;
  3904. result.port = relative.port;
  3905. // to support http.request
  3906. if (result.pathname || result.search) {
  3907. var p = result.pathname || '';
  3908. var s = result.search || '';
  3909. result.path = p + s;
  3910. }
  3911. result.slashes = result.slashes || relative.slashes;
  3912. result.href = result.format();
  3913. return result;
  3914. }
  3915. var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),
  3916. isRelAbs = (
  3917. relative.host ||
  3918. relative.pathname && relative.pathname.charAt(0) === '/'
  3919. ),
  3920. mustEndAbs = (isRelAbs || isSourceAbs ||
  3921. (result.host && relative.pathname)),
  3922. removeAllDots = mustEndAbs,
  3923. srcPath = result.pathname && result.pathname.split('/') || [],
  3924. relPath = relative.pathname && relative.pathname.split('/') || [],
  3925. psychotic = result.protocol && !slashedProtocol[result.protocol];
  3926. // if the url is a non-slashed url, then relative
  3927. // links like ../.. should be able
  3928. // to crawl up to the hostname, as well. This is strange.
  3929. // result.protocol has already been set by now.
  3930. // Later on, put the first path part into the host field.
  3931. if (psychotic) {
  3932. result.hostname = '';
  3933. result.port = null;
  3934. if (result.host) {
  3935. if (srcPath[0] === '') srcPath[0] = result.host;
  3936. else srcPath.unshift(result.host);
  3937. }
  3938. result.host = '';
  3939. if (relative.protocol) {
  3940. relative.hostname = null;
  3941. relative.port = null;
  3942. if (relative.host) {
  3943. if (relPath[0] === '') relPath[0] = relative.host;
  3944. else relPath.unshift(relative.host);
  3945. }
  3946. relative.host = null;
  3947. }
  3948. mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');
  3949. }
  3950. if (isRelAbs) {
  3951. // it's absolute.
  3952. result.host = (relative.host || relative.host === '') ?
  3953. relative.host : result.host;
  3954. result.hostname = (relative.hostname || relative.hostname === '') ?
  3955. relative.hostname : result.hostname;
  3956. result.search = relative.search;
  3957. result.query = relative.query;
  3958. srcPath = relPath;
  3959. // fall through to the dot-handling below.
  3960. } else if (relPath.length) {
  3961. // it's relative
  3962. // throw away the existing file, and take the new path instead.
  3963. if (!srcPath) srcPath = [];
  3964. srcPath.pop();
  3965. srcPath = srcPath.concat(relPath);
  3966. result.search = relative.search;
  3967. result.query = relative.query;
  3968. } else if (!util.isNullOrUndefined(relative.search)) {
  3969. // just pull out the search.
  3970. // like href='?foo'.
  3971. // Put this after the other two cases because it simplifies the booleans
  3972. if (psychotic) {
  3973. result.hostname = result.host = srcPath.shift();
  3974. //occationaly the auth can get stuck only in host
  3975. //this especially happens in cases like
  3976. //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
  3977. var authInHost = result.host && result.host.indexOf('@') > 0 ?
  3978. result.host.split('@') : false;
  3979. if (authInHost) {
  3980. result.auth = authInHost.shift();
  3981. result.host = result.hostname = authInHost.shift();
  3982. }
  3983. }
  3984. result.search = relative.search;
  3985. result.query = relative.query;
  3986. //to support http.request
  3987. if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
  3988. result.path = (result.pathname ? result.pathname : '') +
  3989. (result.search ? result.search : '');
  3990. }
  3991. result.href = result.format();
  3992. return result;
  3993. }
  3994. if (!srcPath.length) {
  3995. // no path at all. easy.
  3996. // we've already handled the other stuff above.
  3997. result.pathname = null;
  3998. //to support http.request
  3999. if (result.search) {
  4000. result.path = '/' + result.search;
  4001. } else {
  4002. result.path = null;
  4003. }
  4004. result.href = result.format();
  4005. return result;
  4006. }
  4007. // if a url ENDs in . or .., then it must get a trailing slash.
  4008. // however, if it ends in anything else non-slashy,
  4009. // then it must NOT get a trailing slash.
  4010. var last = srcPath.slice(-1)[0];
  4011. var hasTrailingSlash = (
  4012. (result.host || relative.host || srcPath.length > 1) &&
  4013. (last === '.' || last === '..') || last === '');
  4014. // strip single dots, resolve double dots to parent dir
  4015. // if the path tries to go above the root, `up` ends up > 0
  4016. var up = 0;
  4017. for (var i = srcPath.length; i >= 0; i--) {
  4018. last = srcPath[i];
  4019. if (last === '.') {
  4020. srcPath.splice(i, 1);
  4021. } else if (last === '..') {
  4022. srcPath.splice(i, 1);
  4023. up++;
  4024. } else if (up) {
  4025. srcPath.splice(i, 1);
  4026. up--;
  4027. }
  4028. }
  4029. // if the path is allowed to go above the root, restore leading ..s
  4030. if (!mustEndAbs && !removeAllDots) {
  4031. for (; up--; up) {
  4032. srcPath.unshift('..');
  4033. }
  4034. }
  4035. if (mustEndAbs && srcPath[0] !== '' &&
  4036. (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {
  4037. srcPath.unshift('');
  4038. }
  4039. if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {
  4040. srcPath.push('');
  4041. }
  4042. var isAbsolute = srcPath[0] === '' ||
  4043. (srcPath[0] && srcPath[0].charAt(0) === '/');
  4044. // put the host back
  4045. if (psychotic) {
  4046. result.hostname = result.host = isAbsolute ? '' :
  4047. srcPath.length ? srcPath.shift() : '';
  4048. //occationaly the auth can get stuck only in host
  4049. //this especially happens in cases like
  4050. //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
  4051. var authInHost = result.host && result.host.indexOf('@') > 0 ?
  4052. result.host.split('@') : false;
  4053. if (authInHost) {
  4054. result.auth = authInHost.shift();
  4055. result.host = result.hostname = authInHost.shift();
  4056. }
  4057. }
  4058. mustEndAbs = mustEndAbs || (result.host && srcPath.length);
  4059. if (mustEndAbs && !isAbsolute) {
  4060. srcPath.unshift('');
  4061. }
  4062. if (!srcPath.length) {
  4063. result.pathname = null;
  4064. result.path = null;
  4065. } else {
  4066. result.pathname = srcPath.join('/');
  4067. }
  4068. //to support request.http
  4069. if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
  4070. result.path = (result.pathname ? result.pathname : '') +
  4071. (result.search ? result.search : '');
  4072. }
  4073. result.auth = relative.auth || result.auth;
  4074. result.slashes = result.slashes || relative.slashes;
  4075. result.href = result.format();
  4076. return result;
  4077. };
  4078. Url.prototype.parseHost = function() {
  4079. var host = this.host;
  4080. var port = portPattern.exec(host);
  4081. if (port) {
  4082. port = port[0];
  4083. if (port !== ':') {
  4084. this.port = port.substr(1);
  4085. }
  4086. host = host.substr(0, host.length - port.length);
  4087. }
  4088. if (host) this.hostname = host;
  4089. };
  4090. /***/ }),
  4091. /***/ 224:
  4092. /*!**************************************************************************!*\
  4093. !*** ./node_modules/node-libs-browser/node_modules/punycode/punycode.js ***!
  4094. \**************************************************************************/
  4095. /*! no static exports found */
  4096. /***/ (function(module, exports, __webpack_require__) {
  4097. /* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */
  4098. ;(function(root) {
  4099. /** Detect free variables */
  4100. var freeExports = true && exports &&
  4101. !exports.nodeType && exports;
  4102. var freeModule = true && module &&
  4103. !module.nodeType && module;
  4104. var freeGlobal = typeof global == 'object' && global;
  4105. if (
  4106. freeGlobal.global === freeGlobal ||
  4107. freeGlobal.window === freeGlobal ||
  4108. freeGlobal.self === freeGlobal
  4109. ) {
  4110. root = freeGlobal;
  4111. }
  4112. /**
  4113. * The `punycode` object.
  4114. * @name punycode
  4115. * @type Object
  4116. */
  4117. var punycode,
  4118. /** Highest positive signed 32-bit float value */
  4119. maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
  4120. /** Bootstring parameters */
  4121. base = 36,
  4122. tMin = 1,
  4123. tMax = 26,
  4124. skew = 38,
  4125. damp = 700,
  4126. initialBias = 72,
  4127. initialN = 128, // 0x80
  4128. delimiter = '-', // '\x2D'
  4129. /** Regular expressions */
  4130. regexPunycode = /^xn--/,
  4131. regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
  4132. regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
  4133. /** Error messages */
  4134. errors = {
  4135. 'overflow': 'Overflow: input needs wider integers to process',
  4136. 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
  4137. 'invalid-input': 'Invalid input'
  4138. },
  4139. /** Convenience shortcuts */
  4140. baseMinusTMin = base - tMin,
  4141. floor = Math.floor,
  4142. stringFromCharCode = String.fromCharCode,
  4143. /** Temporary variable */
  4144. key;
  4145. /*--------------------------------------------------------------------------*/
  4146. /**
  4147. * A generic error utility function.
  4148. * @private
  4149. * @param {String} type The error type.
  4150. * @returns {Error} Throws a `RangeError` with the applicable error message.
  4151. */
  4152. function error(type) {
  4153. throw new RangeError(errors[type]);
  4154. }
  4155. /**
  4156. * A generic `Array#map` utility function.
  4157. * @private
  4158. * @param {Array} array The array to iterate over.
  4159. * @param {Function} callback The function that gets called for every array
  4160. * item.
  4161. * @returns {Array} A new array of values returned by the callback function.
  4162. */
  4163. function map(array, fn) {
  4164. var length = array.length;
  4165. var result = [];
  4166. while (length--) {
  4167. result[length] = fn(array[length]);
  4168. }
  4169. return result;
  4170. }
  4171. /**
  4172. * A simple `Array#map`-like wrapper to work with domain name strings or email
  4173. * addresses.
  4174. * @private
  4175. * @param {String} domain The domain name or email address.
  4176. * @param {Function} callback The function that gets called for every
  4177. * character.
  4178. * @returns {Array} A new string of characters returned by the callback
  4179. * function.
  4180. */
  4181. function mapDomain(string, fn) {
  4182. var parts = string.split('@');
  4183. var result = '';
  4184. if (parts.length > 1) {
  4185. // In email addresses, only the domain name should be punycoded. Leave
  4186. // the local part (i.e. everything up to `@`) intact.
  4187. result = parts[0] + '@';
  4188. string = parts[1];
  4189. }
  4190. // Avoid `split(regex)` for IE8 compatibility. See #17.
  4191. string = string.replace(regexSeparators, '\x2E');
  4192. var labels = string.split('.');
  4193. var encoded = map(labels, fn).join('.');
  4194. return result + encoded;
  4195. }
  4196. /**
  4197. * Creates an array containing the numeric code points of each Unicode
  4198. * character in the string. While JavaScript uses UCS-2 internally,
  4199. * this function will convert a pair of surrogate halves (each of which
  4200. * UCS-2 exposes as separate characters) into a single code point,
  4201. * matching UTF-16.
  4202. * @see `punycode.ucs2.encode`
  4203. * @see <https://mathiasbynens.be/notes/javascript-encoding>
  4204. * @memberOf punycode.ucs2
  4205. * @name decode
  4206. * @param {String} string The Unicode input string (UCS-2).
  4207. * @returns {Array} The new array of code points.
  4208. */
  4209. function ucs2decode(string) {
  4210. var output = [],
  4211. counter = 0,
  4212. length = string.length,
  4213. value,
  4214. extra;
  4215. while (counter < length) {
  4216. value = string.charCodeAt(counter++);
  4217. if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
  4218. // high surrogate, and there is a next character
  4219. extra = string.charCodeAt(counter++);
  4220. if ((extra & 0xFC00) == 0xDC00) { // low surrogate
  4221. output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
  4222. } else {
  4223. // unmatched surrogate; only append this code unit, in case the next
  4224. // code unit is the high surrogate of a surrogate pair
  4225. output.push(value);
  4226. counter--;
  4227. }
  4228. } else {
  4229. output.push(value);
  4230. }
  4231. }
  4232. return output;
  4233. }
  4234. /**
  4235. * Creates a string based on an array of numeric code points.
  4236. * @see `punycode.ucs2.decode`
  4237. * @memberOf punycode.ucs2
  4238. * @name encode
  4239. * @param {Array} codePoints The array of numeric code points.
  4240. * @returns {String} The new Unicode string (UCS-2).
  4241. */
  4242. function ucs2encode(array) {
  4243. return map(array, function(value) {
  4244. var output = '';
  4245. if (value > 0xFFFF) {
  4246. value -= 0x10000;
  4247. output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
  4248. value = 0xDC00 | value & 0x3FF;
  4249. }
  4250. output += stringFromCharCode(value);
  4251. return output;
  4252. }).join('');
  4253. }
  4254. /**
  4255. * Converts a basic code point into a digit/integer.
  4256. * @see `digitToBasic()`
  4257. * @private
  4258. * @param {Number} codePoint The basic numeric code point value.
  4259. * @returns {Number} The numeric value of a basic code point (for use in
  4260. * representing integers) in the range `0` to `base - 1`, or `base` if
  4261. * the code point does not represent a value.
  4262. */
  4263. function basicToDigit(codePoint) {
  4264. if (codePoint - 48 < 10) {
  4265. return codePoint - 22;
  4266. }
  4267. if (codePoint - 65 < 26) {
  4268. return codePoint - 65;
  4269. }
  4270. if (codePoint - 97 < 26) {
  4271. return codePoint - 97;
  4272. }
  4273. return base;
  4274. }
  4275. /**
  4276. * Converts a digit/integer into a basic code point.
  4277. * @see `basicToDigit()`
  4278. * @private
  4279. * @param {Number} digit The numeric value of a basic code point.
  4280. * @returns {Number} The basic code point whose value (when used for
  4281. * representing integers) is `digit`, which needs to be in the range
  4282. * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
  4283. * used; else, the lowercase form is used. The behavior is undefined
  4284. * if `flag` is non-zero and `digit` has no uppercase form.
  4285. */
  4286. function digitToBasic(digit, flag) {
  4287. // 0..25 map to ASCII a..z or A..Z
  4288. // 26..35 map to ASCII 0..9
  4289. return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
  4290. }
  4291. /**
  4292. * Bias adaptation function as per section 3.4 of RFC 3492.
  4293. * https://tools.ietf.org/html/rfc3492#section-3.4
  4294. * @private
  4295. */
  4296. function adapt(delta, numPoints, firstTime) {
  4297. var k = 0;
  4298. delta = firstTime ? floor(delta / damp) : delta >> 1;
  4299. delta += floor(delta / numPoints);
  4300. for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
  4301. delta = floor(delta / baseMinusTMin);
  4302. }
  4303. return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
  4304. }
  4305. /**
  4306. * Converts a Punycode string of ASCII-only symbols to a string of Unicode
  4307. * symbols.
  4308. * @memberOf punycode
  4309. * @param {String} input The Punycode string of ASCII-only symbols.
  4310. * @returns {String} The resulting string of Unicode symbols.
  4311. */
  4312. function decode(input) {
  4313. // Don't use UCS-2
  4314. var output = [],
  4315. inputLength = input.length,
  4316. out,
  4317. i = 0,
  4318. n = initialN,
  4319. bias = initialBias,
  4320. basic,
  4321. j,
  4322. index,
  4323. oldi,
  4324. w,
  4325. k,
  4326. digit,
  4327. t,
  4328. /** Cached calculation results */
  4329. baseMinusT;
  4330. // Handle the basic code points: let `basic` be the number of input code
  4331. // points before the last delimiter, or `0` if there is none, then copy
  4332. // the first basic code points to the output.
  4333. basic = input.lastIndexOf(delimiter);
  4334. if (basic < 0) {
  4335. basic = 0;
  4336. }
  4337. for (j = 0; j < basic; ++j) {
  4338. // if it's not a basic code point
  4339. if (input.charCodeAt(j) >= 0x80) {
  4340. error('not-basic');
  4341. }
  4342. output.push(input.charCodeAt(j));
  4343. }
  4344. // Main decoding loop: start just after the last delimiter if any basic code
  4345. // points were copied; start at the beginning otherwise.
  4346. for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
  4347. // `index` is the index of the next character to be consumed.
  4348. // Decode a generalized variable-length integer into `delta`,
  4349. // which gets added to `i`. The overflow checking is easier
  4350. // if we increase `i` as we go, then subtract off its starting
  4351. // value at the end to obtain `delta`.
  4352. for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
  4353. if (index >= inputLength) {
  4354. error('invalid-input');
  4355. }
  4356. digit = basicToDigit(input.charCodeAt(index++));
  4357. if (digit >= base || digit > floor((maxInt - i) / w)) {
  4358. error('overflow');
  4359. }
  4360. i += digit * w;
  4361. t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
  4362. if (digit < t) {
  4363. break;
  4364. }
  4365. baseMinusT = base - t;
  4366. if (w > floor(maxInt / baseMinusT)) {
  4367. error('overflow');
  4368. }
  4369. w *= baseMinusT;
  4370. }
  4371. out = output.length + 1;
  4372. bias = adapt(i - oldi, out, oldi == 0);
  4373. // `i` was supposed to wrap around from `out` to `0`,
  4374. // incrementing `n` each time, so we'll fix that now:
  4375. if (floor(i / out) > maxInt - n) {
  4376. error('overflow');
  4377. }
  4378. n += floor(i / out);
  4379. i %= out;
  4380. // Insert `n` at position `i` of the output
  4381. output.splice(i++, 0, n);
  4382. }
  4383. return ucs2encode(output);
  4384. }
  4385. /**
  4386. * Converts a string of Unicode symbols (e.g. a domain name label) to a
  4387. * Punycode string of ASCII-only symbols.
  4388. * @memberOf punycode
  4389. * @param {String} input The string of Unicode symbols.
  4390. * @returns {String} The resulting Punycode string of ASCII-only symbols.
  4391. */
  4392. function encode(input) {
  4393. var n,
  4394. delta,
  4395. handledCPCount,
  4396. basicLength,
  4397. bias,
  4398. j,
  4399. m,
  4400. q,
  4401. k,
  4402. t,
  4403. currentValue,
  4404. output = [],
  4405. /** `inputLength` will hold the number of code points in `input`. */
  4406. inputLength,
  4407. /** Cached calculation results */
  4408. handledCPCountPlusOne,
  4409. baseMinusT,
  4410. qMinusT;
  4411. // Convert the input in UCS-2 to Unicode
  4412. input = ucs2decode(input);
  4413. // Cache the length
  4414. inputLength = input.length;
  4415. // Initialize the state
  4416. n = initialN;
  4417. delta = 0;
  4418. bias = initialBias;
  4419. // Handle the basic code points
  4420. for (j = 0; j < inputLength; ++j) {
  4421. currentValue = input[j];
  4422. if (currentValue < 0x80) {
  4423. output.push(stringFromCharCode(currentValue));
  4424. }
  4425. }
  4426. handledCPCount = basicLength = output.length;
  4427. // `handledCPCount` is the number of code points that have been handled;
  4428. // `basicLength` is the number of basic code points.
  4429. // Finish the basic string - if it is not empty - with a delimiter
  4430. if (basicLength) {
  4431. output.push(delimiter);
  4432. }
  4433. // Main encoding loop:
  4434. while (handledCPCount < inputLength) {
  4435. // All non-basic code points < n have been handled already. Find the next
  4436. // larger one:
  4437. for (m = maxInt, j = 0; j < inputLength; ++j) {
  4438. currentValue = input[j];
  4439. if (currentValue >= n && currentValue < m) {
  4440. m = currentValue;
  4441. }
  4442. }
  4443. // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
  4444. // but guard against overflow
  4445. handledCPCountPlusOne = handledCPCount + 1;
  4446. if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
  4447. error('overflow');
  4448. }
  4449. delta += (m - n) * handledCPCountPlusOne;
  4450. n = m;
  4451. for (j = 0; j < inputLength; ++j) {
  4452. currentValue = input[j];
  4453. if (currentValue < n && ++delta > maxInt) {
  4454. error('overflow');
  4455. }
  4456. if (currentValue == n) {
  4457. // Represent delta as a generalized variable-length integer
  4458. for (q = delta, k = base; /* no condition */; k += base) {
  4459. t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
  4460. if (q < t) {
  4461. break;
  4462. }
  4463. qMinusT = q - t;
  4464. baseMinusT = base - t;
  4465. output.push(
  4466. stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
  4467. );
  4468. q = floor(qMinusT / baseMinusT);
  4469. }
  4470. output.push(stringFromCharCode(digitToBasic(q, 0)));
  4471. bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
  4472. delta = 0;
  4473. ++handledCPCount;
  4474. }
  4475. }
  4476. ++delta;
  4477. ++n;
  4478. }
  4479. return output.join('');
  4480. }
  4481. /**
  4482. * Converts a Punycode string representing a domain name or an email address
  4483. * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
  4484. * it doesn't matter if you call it on a string that has already been
  4485. * converted to Unicode.
  4486. * @memberOf punycode
  4487. * @param {String} input The Punycoded domain name or email address to
  4488. * convert to Unicode.
  4489. * @returns {String} The Unicode representation of the given Punycode
  4490. * string.
  4491. */
  4492. function toUnicode(input) {
  4493. return mapDomain(input, function(string) {
  4494. return regexPunycode.test(string)
  4495. ? decode(string.slice(4).toLowerCase())
  4496. : string;
  4497. });
  4498. }
  4499. /**
  4500. * Converts a Unicode string representing a domain name or an email address to
  4501. * Punycode. Only the non-ASCII parts of the domain name will be converted,
  4502. * i.e. it doesn't matter if you call it with a domain that's already in
  4503. * ASCII.
  4504. * @memberOf punycode
  4505. * @param {String} input The domain name or email address to convert, as a
  4506. * Unicode string.
  4507. * @returns {String} The Punycode representation of the given domain name or
  4508. * email address.
  4509. */
  4510. function toASCII(input) {
  4511. return mapDomain(input, function(string) {
  4512. return regexNonASCII.test(string)
  4513. ? 'xn--' + encode(string)
  4514. : string;
  4515. });
  4516. }
  4517. /*--------------------------------------------------------------------------*/
  4518. /** Define the public API */
  4519. punycode = {
  4520. /**
  4521. * A string representing the current Punycode.js version number.
  4522. * @memberOf punycode
  4523. * @type String
  4524. */
  4525. 'version': '1.4.1',
  4526. /**
  4527. * An object of methods to convert from JavaScript's internal character
  4528. * representation (UCS-2) to Unicode code points, and back.
  4529. * @see <https://mathiasbynens.be/notes/javascript-encoding>
  4530. * @memberOf punycode
  4531. * @type Object
  4532. */
  4533. 'ucs2': {
  4534. 'decode': ucs2decode,
  4535. 'encode': ucs2encode
  4536. },
  4537. 'decode': decode,
  4538. 'encode': encode,
  4539. 'toASCII': toASCII,
  4540. 'toUnicode': toUnicode
  4541. };
  4542. /** Expose `punycode` */
  4543. // Some AMD build optimizers, like r.js, check for specific condition patterns
  4544. // like the following:
  4545. if (
  4546. true
  4547. ) {
  4548. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
  4549. return punycode;
  4550. }).call(exports, __webpack_require__, exports, module),
  4551. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  4552. } else {}
  4553. }(this));
  4554. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/module.js */ 225)(module), __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  4555. /***/ }),
  4556. /***/ 225:
  4557. /*!***********************************!*\
  4558. !*** (webpack)/buildin/module.js ***!
  4559. \***********************************/
  4560. /*! no static exports found */
  4561. /***/ (function(module, exports) {
  4562. module.exports = function(module) {
  4563. if (!module.webpackPolyfill) {
  4564. module.deprecate = function() {};
  4565. module.paths = [];
  4566. // module.parent = undefined by default
  4567. if (!module.children) module.children = [];
  4568. Object.defineProperty(module, "loaded", {
  4569. enumerable: true,
  4570. get: function() {
  4571. return module.l;
  4572. }
  4573. });
  4574. Object.defineProperty(module, "id", {
  4575. enumerable: true,
  4576. get: function() {
  4577. return module.i;
  4578. }
  4579. });
  4580. module.webpackPolyfill = 1;
  4581. }
  4582. return module;
  4583. };
  4584. /***/ }),
  4585. /***/ 226:
  4586. /*!**********************************!*\
  4587. !*** ./node_modules/url/util.js ***!
  4588. \**********************************/
  4589. /*! no static exports found */
  4590. /***/ (function(module, exports, __webpack_require__) {
  4591. "use strict";
  4592. module.exports = {
  4593. isString: function(arg) {
  4594. return typeof(arg) === 'string';
  4595. },
  4596. isObject: function(arg) {
  4597. return typeof(arg) === 'object' && arg !== null;
  4598. },
  4599. isNull: function(arg) {
  4600. return arg === null;
  4601. },
  4602. isNullOrUndefined: function(arg) {
  4603. return arg == null;
  4604. }
  4605. };
  4606. /***/ }),
  4607. /***/ 227:
  4608. /*!***********************************************!*\
  4609. !*** ./node_modules/querystring-es3/index.js ***!
  4610. \***********************************************/
  4611. /*! no static exports found */
  4612. /***/ (function(module, exports, __webpack_require__) {
  4613. "use strict";
  4614. exports.decode = exports.parse = __webpack_require__(/*! ./decode */ 228);
  4615. exports.encode = exports.stringify = __webpack_require__(/*! ./encode */ 229);
  4616. /***/ }),
  4617. /***/ 228:
  4618. /*!************************************************!*\
  4619. !*** ./node_modules/querystring-es3/decode.js ***!
  4620. \************************************************/
  4621. /*! no static exports found */
  4622. /***/ (function(module, exports, __webpack_require__) {
  4623. "use strict";
  4624. // Copyright Joyent, Inc. and other Node contributors.
  4625. //
  4626. // Permission is hereby granted, free of charge, to any person obtaining a
  4627. // copy of this software and associated documentation files (the
  4628. // "Software"), to deal in the Software without restriction, including
  4629. // without limitation the rights to use, copy, modify, merge, publish,
  4630. // distribute, sublicense, and/or sell copies of the Software, and to permit
  4631. // persons to whom the Software is furnished to do so, subject to the
  4632. // following conditions:
  4633. //
  4634. // The above copyright notice and this permission notice shall be included
  4635. // in all copies or substantial portions of the Software.
  4636. //
  4637. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  4638. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  4639. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  4640. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  4641. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  4642. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  4643. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  4644. // If obj.hasOwnProperty has been overridden, then calling
  4645. // obj.hasOwnProperty(prop) will break.
  4646. // See: https://github.com/joyent/node/issues/1707
  4647. function hasOwnProperty(obj, prop) {
  4648. return Object.prototype.hasOwnProperty.call(obj, prop);
  4649. }
  4650. module.exports = function(qs, sep, eq, options) {
  4651. sep = sep || '&';
  4652. eq = eq || '=';
  4653. var obj = {};
  4654. if (typeof qs !== 'string' || qs.length === 0) {
  4655. return obj;
  4656. }
  4657. var regexp = /\+/g;
  4658. qs = qs.split(sep);
  4659. var maxKeys = 1000;
  4660. if (options && typeof options.maxKeys === 'number') {
  4661. maxKeys = options.maxKeys;
  4662. }
  4663. var len = qs.length;
  4664. // maxKeys <= 0 means that we should not limit keys count
  4665. if (maxKeys > 0 && len > maxKeys) {
  4666. len = maxKeys;
  4667. }
  4668. for (var i = 0; i < len; ++i) {
  4669. var x = qs[i].replace(regexp, '%20'),
  4670. idx = x.indexOf(eq),
  4671. kstr, vstr, k, v;
  4672. if (idx >= 0) {
  4673. kstr = x.substr(0, idx);
  4674. vstr = x.substr(idx + 1);
  4675. } else {
  4676. kstr = x;
  4677. vstr = '';
  4678. }
  4679. k = decodeURIComponent(kstr);
  4680. v = decodeURIComponent(vstr);
  4681. if (!hasOwnProperty(obj, k)) {
  4682. obj[k] = v;
  4683. } else if (isArray(obj[k])) {
  4684. obj[k].push(v);
  4685. } else {
  4686. obj[k] = [obj[k], v];
  4687. }
  4688. }
  4689. return obj;
  4690. };
  4691. var isArray = Array.isArray || function (xs) {
  4692. return Object.prototype.toString.call(xs) === '[object Array]';
  4693. };
  4694. /***/ }),
  4695. /***/ 229:
  4696. /*!************************************************!*\
  4697. !*** ./node_modules/querystring-es3/encode.js ***!
  4698. \************************************************/
  4699. /*! no static exports found */
  4700. /***/ (function(module, exports, __webpack_require__) {
  4701. "use strict";
  4702. // Copyright Joyent, Inc. and other Node contributors.
  4703. //
  4704. // Permission is hereby granted, free of charge, to any person obtaining a
  4705. // copy of this software and associated documentation files (the
  4706. // "Software"), to deal in the Software without restriction, including
  4707. // without limitation the rights to use, copy, modify, merge, publish,
  4708. // distribute, sublicense, and/or sell copies of the Software, and to permit
  4709. // persons to whom the Software is furnished to do so, subject to the
  4710. // following conditions:
  4711. //
  4712. // The above copyright notice and this permission notice shall be included
  4713. // in all copies or substantial portions of the Software.
  4714. //
  4715. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  4716. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  4717. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  4718. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  4719. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  4720. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  4721. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  4722. var stringifyPrimitive = function(v) {
  4723. switch (typeof v) {
  4724. case 'string':
  4725. return v;
  4726. case 'boolean':
  4727. return v ? 'true' : 'false';
  4728. case 'number':
  4729. return isFinite(v) ? v : '';
  4730. default:
  4731. return '';
  4732. }
  4733. };
  4734. module.exports = function(obj, sep, eq, name) {
  4735. sep = sep || '&';
  4736. eq = eq || '=';
  4737. if (obj === null) {
  4738. obj = undefined;
  4739. }
  4740. if (typeof obj === 'object') {
  4741. return map(objectKeys(obj), function(k) {
  4742. var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
  4743. if (isArray(obj[k])) {
  4744. return map(obj[k], function(v) {
  4745. return ks + encodeURIComponent(stringifyPrimitive(v));
  4746. }).join(sep);
  4747. } else {
  4748. return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
  4749. }
  4750. }).join(sep);
  4751. }
  4752. if (!name) return '';
  4753. return encodeURIComponent(stringifyPrimitive(name)) + eq +
  4754. encodeURIComponent(stringifyPrimitive(obj));
  4755. };
  4756. var isArray = Array.isArray || function (xs) {
  4757. return Object.prototype.toString.call(xs) === '[object Array]';
  4758. };
  4759. function map (xs, f) {
  4760. if (xs.map) return xs.map(f);
  4761. var res = [];
  4762. for (var i = 0; i < xs.length; i++) {
  4763. res.push(f(xs[i], i));
  4764. }
  4765. return res;
  4766. }
  4767. var objectKeys = Object.keys || function (obj) {
  4768. var res = [];
  4769. for (var key in obj) {
  4770. if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);
  4771. }
  4772. return res;
  4773. };
  4774. /***/ }),
  4775. /***/ 23:
  4776. /*!***************************************************************!*\
  4777. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  4778. \***************************************************************/
  4779. /*! no static exports found */
  4780. /***/ (function(module, exports) {
  4781. function _classCallCheck(instance, Constructor) {
  4782. if (!(instance instanceof Constructor)) {
  4783. throw new TypeError("Cannot call a class as a function");
  4784. }
  4785. }
  4786. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4787. /***/ }),
  4788. /***/ 230:
  4789. /*!***************************************!*\
  4790. !*** ./node_modules/assert/assert.js ***!
  4791. \***************************************/
  4792. /*! no static exports found */
  4793. /***/ (function(module, exports, __webpack_require__) {
  4794. "use strict";
  4795. /* WEBPACK VAR INJECTION */(function(global) {
  4796. var objectAssign = __webpack_require__(/*! object-assign */ 231);
  4797. // compare and isBuffer taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js
  4798. // original notice:
  4799. /*!
  4800. * The buffer module from node.js, for the browser.
  4801. *
  4802. * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
  4803. * @license MIT
  4804. */
  4805. function compare(a, b) {
  4806. if (a === b) {
  4807. return 0;
  4808. }
  4809. var x = a.length;
  4810. var y = b.length;
  4811. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  4812. if (a[i] !== b[i]) {
  4813. x = a[i];
  4814. y = b[i];
  4815. break;
  4816. }
  4817. }
  4818. if (x < y) {
  4819. return -1;
  4820. }
  4821. if (y < x) {
  4822. return 1;
  4823. }
  4824. return 0;
  4825. }
  4826. function isBuffer(b) {
  4827. if (global.Buffer && typeof global.Buffer.isBuffer === 'function') {
  4828. return global.Buffer.isBuffer(b);
  4829. }
  4830. return !!(b != null && b._isBuffer);
  4831. }
  4832. // based on node assert, original notice:
  4833. // NB: The URL to the CommonJS spec is kept just for tradition.
  4834. // node-assert has evolved a lot since then, both in API and behavior.
  4835. // http://wiki.commonjs.org/wiki/Unit_Testing/1.0
  4836. //
  4837. // THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!
  4838. //
  4839. // Originally from narwhal.js (http://narwhaljs.org)
  4840. // Copyright (c) 2009 Thomas Robinson <280north.com>
  4841. //
  4842. // Permission is hereby granted, free of charge, to any person obtaining a copy
  4843. // of this software and associated documentation files (the 'Software'), to
  4844. // deal in the Software without restriction, including without limitation the
  4845. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  4846. // sell copies of the Software, and to permit persons to whom the Software is
  4847. // furnished to do so, subject to the following conditions:
  4848. //
  4849. // The above copyright notice and this permission notice shall be included in
  4850. // all copies or substantial portions of the Software.
  4851. //
  4852. // THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  4853. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  4854. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  4855. // AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  4856. // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  4857. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  4858. var util = __webpack_require__(/*! util/ */ 232);
  4859. var hasOwn = Object.prototype.hasOwnProperty;
  4860. var pSlice = Array.prototype.slice;
  4861. var functionsHaveNames = (function () {
  4862. return function foo() {}.name === 'foo';
  4863. }());
  4864. function pToString (obj) {
  4865. return Object.prototype.toString.call(obj);
  4866. }
  4867. function isView(arrbuf) {
  4868. if (isBuffer(arrbuf)) {
  4869. return false;
  4870. }
  4871. if (typeof global.ArrayBuffer !== 'function') {
  4872. return false;
  4873. }
  4874. if (typeof ArrayBuffer.isView === 'function') {
  4875. return ArrayBuffer.isView(arrbuf);
  4876. }
  4877. if (!arrbuf) {
  4878. return false;
  4879. }
  4880. if (arrbuf instanceof DataView) {
  4881. return true;
  4882. }
  4883. if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) {
  4884. return true;
  4885. }
  4886. return false;
  4887. }
  4888. // 1. The assert module provides functions that throw
  4889. // AssertionError's when particular conditions are not met. The
  4890. // assert module must conform to the following interface.
  4891. var assert = module.exports = ok;
  4892. // 2. The AssertionError is defined in assert.
  4893. // new assert.AssertionError({ message: message,
  4894. // actual: actual,
  4895. // expected: expected })
  4896. var regex = /\s*function\s+([^\(\s]*)\s*/;
  4897. // based on https://github.com/ljharb/function.prototype.name/blob/adeeeec8bfcc6068b187d7d9fb3d5bb1d3a30899/implementation.js
  4898. function getName(func) {
  4899. if (!util.isFunction(func)) {
  4900. return;
  4901. }
  4902. if (functionsHaveNames) {
  4903. return func.name;
  4904. }
  4905. var str = func.toString();
  4906. var match = str.match(regex);
  4907. return match && match[1];
  4908. }
  4909. assert.AssertionError = function AssertionError(options) {
  4910. this.name = 'AssertionError';
  4911. this.actual = options.actual;
  4912. this.expected = options.expected;
  4913. this.operator = options.operator;
  4914. if (options.message) {
  4915. this.message = options.message;
  4916. this.generatedMessage = false;
  4917. } else {
  4918. this.message = getMessage(this);
  4919. this.generatedMessage = true;
  4920. }
  4921. var stackStartFunction = options.stackStartFunction || fail;
  4922. if (Error.captureStackTrace) {
  4923. Error.captureStackTrace(this, stackStartFunction);
  4924. } else {
  4925. // non v8 browsers so we can have a stacktrace
  4926. var err = new Error();
  4927. if (err.stack) {
  4928. var out = err.stack;
  4929. // try to strip useless frames
  4930. var fn_name = getName(stackStartFunction);
  4931. var idx = out.indexOf('\n' + fn_name);
  4932. if (idx >= 0) {
  4933. // once we have located the function frame
  4934. // we need to strip out everything before it (and its line)
  4935. var next_line = out.indexOf('\n', idx + 1);
  4936. out = out.substring(next_line + 1);
  4937. }
  4938. this.stack = out;
  4939. }
  4940. }
  4941. };
  4942. // assert.AssertionError instanceof Error
  4943. util.inherits(assert.AssertionError, Error);
  4944. function truncate(s, n) {
  4945. if (typeof s === 'string') {
  4946. return s.length < n ? s : s.slice(0, n);
  4947. } else {
  4948. return s;
  4949. }
  4950. }
  4951. function inspect(something) {
  4952. if (functionsHaveNames || !util.isFunction(something)) {
  4953. return util.inspect(something);
  4954. }
  4955. var rawname = getName(something);
  4956. var name = rawname ? ': ' + rawname : '';
  4957. return '[Function' + name + ']';
  4958. }
  4959. function getMessage(self) {
  4960. return truncate(inspect(self.actual), 128) + ' ' +
  4961. self.operator + ' ' +
  4962. truncate(inspect(self.expected), 128);
  4963. }
  4964. // At present only the three keys mentioned above are used and
  4965. // understood by the spec. Implementations or sub modules can pass
  4966. // other keys to the AssertionError's constructor - they will be
  4967. // ignored.
  4968. // 3. All of the following functions must throw an AssertionError
  4969. // when a corresponding condition is not met, with a message that
  4970. // may be undefined if not provided. All assertion methods provide
  4971. // both the actual and expected values to the assertion error for
  4972. // display purposes.
  4973. function fail(actual, expected, message, operator, stackStartFunction) {
  4974. throw new assert.AssertionError({
  4975. message: message,
  4976. actual: actual,
  4977. expected: expected,
  4978. operator: operator,
  4979. stackStartFunction: stackStartFunction
  4980. });
  4981. }
  4982. // EXTENSION! allows for well behaved errors defined elsewhere.
  4983. assert.fail = fail;
  4984. // 4. Pure assertion tests whether a value is truthy, as determined
  4985. // by !!guard.
  4986. // assert.ok(guard, message_opt);
  4987. // This statement is equivalent to assert.equal(true, !!guard,
  4988. // message_opt);. To test strictly for the value true, use
  4989. // assert.strictEqual(true, guard, message_opt);.
  4990. function ok(value, message) {
  4991. if (!value) fail(value, true, message, '==', assert.ok);
  4992. }
  4993. assert.ok = ok;
  4994. // 5. The equality assertion tests shallow, coercive equality with
  4995. // ==.
  4996. // assert.equal(actual, expected, message_opt);
  4997. assert.equal = function equal(actual, expected, message) {
  4998. if (actual != expected) fail(actual, expected, message, '==', assert.equal);
  4999. };
  5000. // 6. The non-equality assertion tests for whether two objects are not equal
  5001. // with != assert.notEqual(actual, expected, message_opt);
  5002. assert.notEqual = function notEqual(actual, expected, message) {
  5003. if (actual == expected) {
  5004. fail(actual, expected, message, '!=', assert.notEqual);
  5005. }
  5006. };
  5007. // 7. The equivalence assertion tests a deep equality relation.
  5008. // assert.deepEqual(actual, expected, message_opt);
  5009. assert.deepEqual = function deepEqual(actual, expected, message) {
  5010. if (!_deepEqual(actual, expected, false)) {
  5011. fail(actual, expected, message, 'deepEqual', assert.deepEqual);
  5012. }
  5013. };
  5014. assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {
  5015. if (!_deepEqual(actual, expected, true)) {
  5016. fail(actual, expected, message, 'deepStrictEqual', assert.deepStrictEqual);
  5017. }
  5018. };
  5019. function _deepEqual(actual, expected, strict, memos) {
  5020. // 7.1. All identical values are equivalent, as determined by ===.
  5021. if (actual === expected) {
  5022. return true;
  5023. } else if (isBuffer(actual) && isBuffer(expected)) {
  5024. return compare(actual, expected) === 0;
  5025. // 7.2. If the expected value is a Date object, the actual value is
  5026. // equivalent if it is also a Date object that refers to the same time.
  5027. } else if (util.isDate(actual) && util.isDate(expected)) {
  5028. return actual.getTime() === expected.getTime();
  5029. // 7.3 If the expected value is a RegExp object, the actual value is
  5030. // equivalent if it is also a RegExp object with the same source and
  5031. // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).
  5032. } else if (util.isRegExp(actual) && util.isRegExp(expected)) {
  5033. return actual.source === expected.source &&
  5034. actual.global === expected.global &&
  5035. actual.multiline === expected.multiline &&
  5036. actual.lastIndex === expected.lastIndex &&
  5037. actual.ignoreCase === expected.ignoreCase;
  5038. // 7.4. Other pairs that do not both pass typeof value == 'object',
  5039. // equivalence is determined by ==.
  5040. } else if ((actual === null || typeof actual !== 'object') &&
  5041. (expected === null || typeof expected !== 'object')) {
  5042. return strict ? actual === expected : actual == expected;
  5043. // If both values are instances of typed arrays, wrap their underlying
  5044. // ArrayBuffers in a Buffer each to increase performance
  5045. // This optimization requires the arrays to have the same type as checked by
  5046. // Object.prototype.toString (aka pToString). Never perform binary
  5047. // comparisons for Float*Arrays, though, since e.g. +0 === -0 but their
  5048. // bit patterns are not identical.
  5049. } else if (isView(actual) && isView(expected) &&
  5050. pToString(actual) === pToString(expected) &&
  5051. !(actual instanceof Float32Array ||
  5052. actual instanceof Float64Array)) {
  5053. return compare(new Uint8Array(actual.buffer),
  5054. new Uint8Array(expected.buffer)) === 0;
  5055. // 7.5 For all other Object pairs, including Array objects, equivalence is
  5056. // determined by having the same number of owned properties (as verified
  5057. // with Object.prototype.hasOwnProperty.call), the same set of keys
  5058. // (although not necessarily the same order), equivalent values for every
  5059. // corresponding key, and an identical 'prototype' property. Note: this
  5060. // accounts for both named and indexed properties on Arrays.
  5061. } else if (isBuffer(actual) !== isBuffer(expected)) {
  5062. return false;
  5063. } else {
  5064. memos = memos || {actual: [], expected: []};
  5065. var actualIndex = memos.actual.indexOf(actual);
  5066. if (actualIndex !== -1) {
  5067. if (actualIndex === memos.expected.indexOf(expected)) {
  5068. return true;
  5069. }
  5070. }
  5071. memos.actual.push(actual);
  5072. memos.expected.push(expected);
  5073. return objEquiv(actual, expected, strict, memos);
  5074. }
  5075. }
  5076. function isArguments(object) {
  5077. return Object.prototype.toString.call(object) == '[object Arguments]';
  5078. }
  5079. function objEquiv(a, b, strict, actualVisitedObjects) {
  5080. if (a === null || a === undefined || b === null || b === undefined)
  5081. return false;
  5082. // if one is a primitive, the other must be same
  5083. if (util.isPrimitive(a) || util.isPrimitive(b))
  5084. return a === b;
  5085. if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b))
  5086. return false;
  5087. var aIsArgs = isArguments(a);
  5088. var bIsArgs = isArguments(b);
  5089. if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs))
  5090. return false;
  5091. if (aIsArgs) {
  5092. a = pSlice.call(a);
  5093. b = pSlice.call(b);
  5094. return _deepEqual(a, b, strict);
  5095. }
  5096. var ka = objectKeys(a);
  5097. var kb = objectKeys(b);
  5098. var key, i;
  5099. // having the same number of owned properties (keys incorporates
  5100. // hasOwnProperty)
  5101. if (ka.length !== kb.length)
  5102. return false;
  5103. //the same set of keys (although not necessarily the same order),
  5104. ka.sort();
  5105. kb.sort();
  5106. //~~~cheap key test
  5107. for (i = ka.length - 1; i >= 0; i--) {
  5108. if (ka[i] !== kb[i])
  5109. return false;
  5110. }
  5111. //equivalent values for every corresponding key, and
  5112. //~~~possibly expensive deep test
  5113. for (i = ka.length - 1; i >= 0; i--) {
  5114. key = ka[i];
  5115. if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects))
  5116. return false;
  5117. }
  5118. return true;
  5119. }
  5120. // 8. The non-equivalence assertion tests for any deep inequality.
  5121. // assert.notDeepEqual(actual, expected, message_opt);
  5122. assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
  5123. if (_deepEqual(actual, expected, false)) {
  5124. fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);
  5125. }
  5126. };
  5127. assert.notDeepStrictEqual = notDeepStrictEqual;
  5128. function notDeepStrictEqual(actual, expected, message) {
  5129. if (_deepEqual(actual, expected, true)) {
  5130. fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual);
  5131. }
  5132. }
  5133. // 9. The strict equality assertion tests strict equality, as determined by ===.
  5134. // assert.strictEqual(actual, expected, message_opt);
  5135. assert.strictEqual = function strictEqual(actual, expected, message) {
  5136. if (actual !== expected) {
  5137. fail(actual, expected, message, '===', assert.strictEqual);
  5138. }
  5139. };
  5140. // 10. The strict non-equality assertion tests for strict inequality, as
  5141. // determined by !==. assert.notStrictEqual(actual, expected, message_opt);
  5142. assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
  5143. if (actual === expected) {
  5144. fail(actual, expected, message, '!==', assert.notStrictEqual);
  5145. }
  5146. };
  5147. function expectedException(actual, expected) {
  5148. if (!actual || !expected) {
  5149. return false;
  5150. }
  5151. if (Object.prototype.toString.call(expected) == '[object RegExp]') {
  5152. return expected.test(actual);
  5153. }
  5154. try {
  5155. if (actual instanceof expected) {
  5156. return true;
  5157. }
  5158. } catch (e) {
  5159. // Ignore. The instanceof check doesn't work for arrow functions.
  5160. }
  5161. if (Error.isPrototypeOf(expected)) {
  5162. return false;
  5163. }
  5164. return expected.call({}, actual) === true;
  5165. }
  5166. function _tryBlock(block) {
  5167. var error;
  5168. try {
  5169. block();
  5170. } catch (e) {
  5171. error = e;
  5172. }
  5173. return error;
  5174. }
  5175. function _throws(shouldThrow, block, expected, message) {
  5176. var actual;
  5177. if (typeof block !== 'function') {
  5178. throw new TypeError('"block" argument must be a function');
  5179. }
  5180. if (typeof expected === 'string') {
  5181. message = expected;
  5182. expected = null;
  5183. }
  5184. actual = _tryBlock(block);
  5185. message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +
  5186. (message ? ' ' + message : '.');
  5187. if (shouldThrow && !actual) {
  5188. fail(actual, expected, 'Missing expected exception' + message);
  5189. }
  5190. var userProvidedMessage = typeof message === 'string';
  5191. var isUnwantedException = !shouldThrow && util.isError(actual);
  5192. var isUnexpectedException = !shouldThrow && actual && !expected;
  5193. if ((isUnwantedException &&
  5194. userProvidedMessage &&
  5195. expectedException(actual, expected)) ||
  5196. isUnexpectedException) {
  5197. fail(actual, expected, 'Got unwanted exception' + message);
  5198. }
  5199. if ((shouldThrow && actual && expected &&
  5200. !expectedException(actual, expected)) || (!shouldThrow && actual)) {
  5201. throw actual;
  5202. }
  5203. }
  5204. // 11. Expected to throw an error:
  5205. // assert.throws(block, Error_opt, message_opt);
  5206. assert.throws = function(block, /*optional*/error, /*optional*/message) {
  5207. _throws(true, block, error, message);
  5208. };
  5209. // EXTENSION! This is annoying to write outside this module.
  5210. assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) {
  5211. _throws(false, block, error, message);
  5212. };
  5213. assert.ifError = function(err) { if (err) throw err; };
  5214. // Expose a strict only variant of assert
  5215. function strict(value, message) {
  5216. if (!value) fail(value, true, message, '==', strict);
  5217. }
  5218. assert.strict = objectAssign(strict, assert, {
  5219. equal: assert.strictEqual,
  5220. deepEqual: assert.deepStrictEqual,
  5221. notEqual: assert.notStrictEqual,
  5222. notDeepEqual: assert.notDeepStrictEqual
  5223. });
  5224. assert.strict.strict = assert.strict;
  5225. var objectKeys = Object.keys || function (obj) {
  5226. var keys = [];
  5227. for (var key in obj) {
  5228. if (hasOwn.call(obj, key)) keys.push(key);
  5229. }
  5230. return keys;
  5231. };
  5232. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 3)))
  5233. /***/ }),
  5234. /***/ 231:
  5235. /*!*********************************************!*\
  5236. !*** ./node_modules/object-assign/index.js ***!
  5237. \*********************************************/
  5238. /*! no static exports found */
  5239. /***/ (function(module, exports, __webpack_require__) {
  5240. "use strict";
  5241. /*
  5242. object-assign
  5243. (c) Sindre Sorhus
  5244. @license MIT
  5245. */
  5246. /* eslint-disable no-unused-vars */
  5247. var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  5248. var hasOwnProperty = Object.prototype.hasOwnProperty;
  5249. var propIsEnumerable = Object.prototype.propertyIsEnumerable;
  5250. function toObject(val) {
  5251. if (val === null || val === undefined) {
  5252. throw new TypeError('Object.assign cannot be called with null or undefined');
  5253. }
  5254. return Object(val);
  5255. }
  5256. function shouldUseNative() {
  5257. try {
  5258. if (!Object.assign) {
  5259. return false;
  5260. }
  5261. // Detect buggy property enumeration order in older V8 versions.
  5262. // https://bugs.chromium.org/p/v8/issues/detail?id=4118
  5263. var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
  5264. test1[5] = 'de';
  5265. if (Object.getOwnPropertyNames(test1)[0] === '5') {
  5266. return false;
  5267. }
  5268. // https://bugs.chromium.org/p/v8/issues/detail?id=3056
  5269. var test2 = {};
  5270. for (var i = 0; i < 10; i++) {
  5271. test2['_' + String.fromCharCode(i)] = i;
  5272. }
  5273. var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
  5274. return test2[n];
  5275. });
  5276. if (order2.join('') !== '0123456789') {
  5277. return false;
  5278. }
  5279. // https://bugs.chromium.org/p/v8/issues/detail?id=3056
  5280. var test3 = {};
  5281. 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
  5282. test3[letter] = letter;
  5283. });
  5284. if (Object.keys(Object.assign({}, test3)).join('') !==
  5285. 'abcdefghijklmnopqrst') {
  5286. return false;
  5287. }
  5288. return true;
  5289. } catch (err) {
  5290. // We don't expect any of the above to throw, but better to be safe.
  5291. return false;
  5292. }
  5293. }
  5294. module.exports = shouldUseNative() ? Object.assign : function (target, source) {
  5295. var from;
  5296. var to = toObject(target);
  5297. var symbols;
  5298. for (var s = 1; s < arguments.length; s++) {
  5299. from = Object(arguments[s]);
  5300. for (var key in from) {
  5301. if (hasOwnProperty.call(from, key)) {
  5302. to[key] = from[key];
  5303. }
  5304. }
  5305. if (getOwnPropertySymbols) {
  5306. symbols = getOwnPropertySymbols(from);
  5307. for (var i = 0; i < symbols.length; i++) {
  5308. if (propIsEnumerable.call(from, symbols[i])) {
  5309. to[symbols[i]] = from[symbols[i]];
  5310. }
  5311. }
  5312. }
  5313. }
  5314. return to;
  5315. };
  5316. /***/ }),
  5317. /***/ 232:
  5318. /*!***********************************!*\
  5319. !*** ./node_modules/util/util.js ***!
  5320. \***********************************/
  5321. /*! no static exports found */
  5322. /***/ (function(module, exports, __webpack_require__) {
  5323. /* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
  5324. //
  5325. // Permission is hereby granted, free of charge, to any person obtaining a
  5326. // copy of this software and associated documentation files (the
  5327. // "Software"), to deal in the Software without restriction, including
  5328. // without limitation the rights to use, copy, modify, merge, publish,
  5329. // distribute, sublicense, and/or sell copies of the Software, and to permit
  5330. // persons to whom the Software is furnished to do so, subject to the
  5331. // following conditions:
  5332. //
  5333. // The above copyright notice and this permission notice shall be included
  5334. // in all copies or substantial portions of the Software.
  5335. //
  5336. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  5337. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  5338. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  5339. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  5340. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  5341. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  5342. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  5343. var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||
  5344. function getOwnPropertyDescriptors(obj) {
  5345. var keys = Object.keys(obj);
  5346. var descriptors = {};
  5347. for (var i = 0; i < keys.length; i++) {
  5348. descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);
  5349. }
  5350. return descriptors;
  5351. };
  5352. var formatRegExp = /%[sdj%]/g;
  5353. exports.format = function(f) {
  5354. if (!isString(f)) {
  5355. var objects = [];
  5356. for (var i = 0; i < arguments.length; i++) {
  5357. objects.push(inspect(arguments[i]));
  5358. }
  5359. return objects.join(' ');
  5360. }
  5361. var i = 1;
  5362. var args = arguments;
  5363. var len = args.length;
  5364. var str = String(f).replace(formatRegExp, function(x) {
  5365. if (x === '%%') return '%';
  5366. if (i >= len) return x;
  5367. switch (x) {
  5368. case '%s': return String(args[i++]);
  5369. case '%d': return Number(args[i++]);
  5370. case '%j':
  5371. try {
  5372. return JSON.stringify(args[i++]);
  5373. } catch (_) {
  5374. return '[Circular]';
  5375. }
  5376. default:
  5377. return x;
  5378. }
  5379. });
  5380. for (var x = args[i]; i < len; x = args[++i]) {
  5381. if (isNull(x) || !isObject(x)) {
  5382. str += ' ' + x;
  5383. } else {
  5384. str += ' ' + inspect(x);
  5385. }
  5386. }
  5387. return str;
  5388. };
  5389. // Mark that a method should not be used.
  5390. // Returns a modified function which warns once by default.
  5391. // If --no-deprecation is set, then it is a no-op.
  5392. exports.deprecate = function(fn, msg) {
  5393. if (typeof process !== 'undefined' && process.noDeprecation === true) {
  5394. return fn;
  5395. }
  5396. // Allow for deprecating things in the process of starting up.
  5397. if (typeof process === 'undefined') {
  5398. return function() {
  5399. return exports.deprecate(fn, msg).apply(this, arguments);
  5400. };
  5401. }
  5402. var warned = false;
  5403. function deprecated() {
  5404. if (!warned) {
  5405. if (process.throwDeprecation) {
  5406. throw new Error(msg);
  5407. } else if (process.traceDeprecation) {
  5408. console.trace(msg);
  5409. } else {
  5410. console.error(msg);
  5411. }
  5412. warned = true;
  5413. }
  5414. return fn.apply(this, arguments);
  5415. }
  5416. return deprecated;
  5417. };
  5418. var debugs = {};
  5419. var debugEnviron;
  5420. exports.debuglog = function(set) {
  5421. if (isUndefined(debugEnviron))
  5422. debugEnviron = Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"芯悦澜","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).NODE_DEBUG || '';
  5423. set = set.toUpperCase();
  5424. if (!debugs[set]) {
  5425. if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
  5426. var pid = process.pid;
  5427. debugs[set] = function() {
  5428. var msg = exports.format.apply(exports, arguments);
  5429. console.error('%s %d: %s', set, pid, msg);
  5430. };
  5431. } else {
  5432. debugs[set] = function() {};
  5433. }
  5434. }
  5435. return debugs[set];
  5436. };
  5437. /**
  5438. * Echos the value of a value. Trys to print the value out
  5439. * in the best way possible given the different types.
  5440. *
  5441. * @param {Object} obj The object to print out.
  5442. * @param {Object} opts Optional options object that alters the output.
  5443. */
  5444. /* legacy: obj, showHidden, depth, colors*/
  5445. function inspect(obj, opts) {
  5446. // default options
  5447. var ctx = {
  5448. seen: [],
  5449. stylize: stylizeNoColor
  5450. };
  5451. // legacy...
  5452. if (arguments.length >= 3) ctx.depth = arguments[2];
  5453. if (arguments.length >= 4) ctx.colors = arguments[3];
  5454. if (isBoolean(opts)) {
  5455. // legacy...
  5456. ctx.showHidden = opts;
  5457. } else if (opts) {
  5458. // got an "options" object
  5459. exports._extend(ctx, opts);
  5460. }
  5461. // set default options
  5462. if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
  5463. if (isUndefined(ctx.depth)) ctx.depth = 2;
  5464. if (isUndefined(ctx.colors)) ctx.colors = false;
  5465. if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
  5466. if (ctx.colors) ctx.stylize = stylizeWithColor;
  5467. return formatValue(ctx, obj, ctx.depth);
  5468. }
  5469. exports.inspect = inspect;
  5470. // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
  5471. inspect.colors = {
  5472. 'bold' : [1, 22],
  5473. 'italic' : [3, 23],
  5474. 'underline' : [4, 24],
  5475. 'inverse' : [7, 27],
  5476. 'white' : [37, 39],
  5477. 'grey' : [90, 39],
  5478. 'black' : [30, 39],
  5479. 'blue' : [34, 39],
  5480. 'cyan' : [36, 39],
  5481. 'green' : [32, 39],
  5482. 'magenta' : [35, 39],
  5483. 'red' : [31, 39],
  5484. 'yellow' : [33, 39]
  5485. };
  5486. // Don't use 'blue' not visible on cmd.exe
  5487. inspect.styles = {
  5488. 'special': 'cyan',
  5489. 'number': 'yellow',
  5490. 'boolean': 'yellow',
  5491. 'undefined': 'grey',
  5492. 'null': 'bold',
  5493. 'string': 'green',
  5494. 'date': 'magenta',
  5495. // "name": intentionally not styling
  5496. 'regexp': 'red'
  5497. };
  5498. function stylizeWithColor(str, styleType) {
  5499. var style = inspect.styles[styleType];
  5500. if (style) {
  5501. return '\u001b[' + inspect.colors[style][0] + 'm' + str +
  5502. '\u001b[' + inspect.colors[style][1] + 'm';
  5503. } else {
  5504. return str;
  5505. }
  5506. }
  5507. function stylizeNoColor(str, styleType) {
  5508. return str;
  5509. }
  5510. function arrayToHash(array) {
  5511. var hash = {};
  5512. array.forEach(function(val, idx) {
  5513. hash[val] = true;
  5514. });
  5515. return hash;
  5516. }
  5517. function formatValue(ctx, value, recurseTimes) {
  5518. // Provide a hook for user-specified inspect functions.
  5519. // Check that value is an object with an inspect function on it
  5520. if (ctx.customInspect &&
  5521. value &&
  5522. isFunction(value.inspect) &&
  5523. // Filter out the util module, it's inspect function is special
  5524. value.inspect !== exports.inspect &&
  5525. // Also filter out any prototype objects using the circular check.
  5526. !(value.constructor && value.constructor.prototype === value)) {
  5527. var ret = value.inspect(recurseTimes, ctx);
  5528. if (!isString(ret)) {
  5529. ret = formatValue(ctx, ret, recurseTimes);
  5530. }
  5531. return ret;
  5532. }
  5533. // Primitive types cannot have properties
  5534. var primitive = formatPrimitive(ctx, value);
  5535. if (primitive) {
  5536. return primitive;
  5537. }
  5538. // Look up the keys of the object.
  5539. var keys = Object.keys(value);
  5540. var visibleKeys = arrayToHash(keys);
  5541. if (ctx.showHidden) {
  5542. keys = Object.getOwnPropertyNames(value);
  5543. }
  5544. // IE doesn't make error fields non-enumerable
  5545. // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
  5546. if (isError(value)
  5547. && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
  5548. return formatError(value);
  5549. }
  5550. // Some type of object without properties can be shortcutted.
  5551. if (keys.length === 0) {
  5552. if (isFunction(value)) {
  5553. var name = value.name ? ': ' + value.name : '';
  5554. return ctx.stylize('[Function' + name + ']', 'special');
  5555. }
  5556. if (isRegExp(value)) {
  5557. return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
  5558. }
  5559. if (isDate(value)) {
  5560. return ctx.stylize(Date.prototype.toString.call(value), 'date');
  5561. }
  5562. if (isError(value)) {
  5563. return formatError(value);
  5564. }
  5565. }
  5566. var base = '', array = false, braces = ['{', '}'];
  5567. // Make Array say that they are Array
  5568. if (isArray(value)) {
  5569. array = true;
  5570. braces = ['[', ']'];
  5571. }
  5572. // Make functions say that they are functions
  5573. if (isFunction(value)) {
  5574. var n = value.name ? ': ' + value.name : '';
  5575. base = ' [Function' + n + ']';
  5576. }
  5577. // Make RegExps say that they are RegExps
  5578. if (isRegExp(value)) {
  5579. base = ' ' + RegExp.prototype.toString.call(value);
  5580. }
  5581. // Make dates with properties first say the date
  5582. if (isDate(value)) {
  5583. base = ' ' + Date.prototype.toUTCString.call(value);
  5584. }
  5585. // Make error with message first say the error
  5586. if (isError(value)) {
  5587. base = ' ' + formatError(value);
  5588. }
  5589. if (keys.length === 0 && (!array || value.length == 0)) {
  5590. return braces[0] + base + braces[1];
  5591. }
  5592. if (recurseTimes < 0) {
  5593. if (isRegExp(value)) {
  5594. return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
  5595. } else {
  5596. return ctx.stylize('[Object]', 'special');
  5597. }
  5598. }
  5599. ctx.seen.push(value);
  5600. var output;
  5601. if (array) {
  5602. output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
  5603. } else {
  5604. output = keys.map(function(key) {
  5605. return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
  5606. });
  5607. }
  5608. ctx.seen.pop();
  5609. return reduceToSingleString(output, base, braces);
  5610. }
  5611. function formatPrimitive(ctx, value) {
  5612. if (isUndefined(value))
  5613. return ctx.stylize('undefined', 'undefined');
  5614. if (isString(value)) {
  5615. var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
  5616. .replace(/'/g, "\\'")
  5617. .replace(/\\"/g, '"') + '\'';
  5618. return ctx.stylize(simple, 'string');
  5619. }
  5620. if (isNumber(value))
  5621. return ctx.stylize('' + value, 'number');
  5622. if (isBoolean(value))
  5623. return ctx.stylize('' + value, 'boolean');
  5624. // For some reason typeof null is "object", so special case here.
  5625. if (isNull(value))
  5626. return ctx.stylize('null', 'null');
  5627. }
  5628. function formatError(value) {
  5629. return '[' + Error.prototype.toString.call(value) + ']';
  5630. }
  5631. function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
  5632. var output = [];
  5633. for (var i = 0, l = value.length; i < l; ++i) {
  5634. if (hasOwnProperty(value, String(i))) {
  5635. output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
  5636. String(i), true));
  5637. } else {
  5638. output.push('');
  5639. }
  5640. }
  5641. keys.forEach(function(key) {
  5642. if (!key.match(/^\d+$/)) {
  5643. output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
  5644. key, true));
  5645. }
  5646. });
  5647. return output;
  5648. }
  5649. function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
  5650. var name, str, desc;
  5651. desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
  5652. if (desc.get) {
  5653. if (desc.set) {
  5654. str = ctx.stylize('[Getter/Setter]', 'special');
  5655. } else {
  5656. str = ctx.stylize('[Getter]', 'special');
  5657. }
  5658. } else {
  5659. if (desc.set) {
  5660. str = ctx.stylize('[Setter]', 'special');
  5661. }
  5662. }
  5663. if (!hasOwnProperty(visibleKeys, key)) {
  5664. name = '[' + key + ']';
  5665. }
  5666. if (!str) {
  5667. if (ctx.seen.indexOf(desc.value) < 0) {
  5668. if (isNull(recurseTimes)) {
  5669. str = formatValue(ctx, desc.value, null);
  5670. } else {
  5671. str = formatValue(ctx, desc.value, recurseTimes - 1);
  5672. }
  5673. if (str.indexOf('\n') > -1) {
  5674. if (array) {
  5675. str = str.split('\n').map(function(line) {
  5676. return ' ' + line;
  5677. }).join('\n').substr(2);
  5678. } else {
  5679. str = '\n' + str.split('\n').map(function(line) {
  5680. return ' ' + line;
  5681. }).join('\n');
  5682. }
  5683. }
  5684. } else {
  5685. str = ctx.stylize('[Circular]', 'special');
  5686. }
  5687. }
  5688. if (isUndefined(name)) {
  5689. if (array && key.match(/^\d+$/)) {
  5690. return str;
  5691. }
  5692. name = JSON.stringify('' + key);
  5693. if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
  5694. name = name.substr(1, name.length - 2);
  5695. name = ctx.stylize(name, 'name');
  5696. } else {
  5697. name = name.replace(/'/g, "\\'")
  5698. .replace(/\\"/g, '"')
  5699. .replace(/(^"|"$)/g, "'");
  5700. name = ctx.stylize(name, 'string');
  5701. }
  5702. }
  5703. return name + ': ' + str;
  5704. }
  5705. function reduceToSingleString(output, base, braces) {
  5706. var numLinesEst = 0;
  5707. var length = output.reduce(function(prev, cur) {
  5708. numLinesEst++;
  5709. if (cur.indexOf('\n') >= 0) numLinesEst++;
  5710. return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
  5711. }, 0);
  5712. if (length > 60) {
  5713. return braces[0] +
  5714. (base === '' ? '' : base + '\n ') +
  5715. ' ' +
  5716. output.join(',\n ') +
  5717. ' ' +
  5718. braces[1];
  5719. }
  5720. return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
  5721. }
  5722. // NOTE: These type checking functions intentionally don't use `instanceof`
  5723. // because it is fragile and can be easily faked with `Object.create()`.
  5724. function isArray(ar) {
  5725. return Array.isArray(ar);
  5726. }
  5727. exports.isArray = isArray;
  5728. function isBoolean(arg) {
  5729. return typeof arg === 'boolean';
  5730. }
  5731. exports.isBoolean = isBoolean;
  5732. function isNull(arg) {
  5733. return arg === null;
  5734. }
  5735. exports.isNull = isNull;
  5736. function isNullOrUndefined(arg) {
  5737. return arg == null;
  5738. }
  5739. exports.isNullOrUndefined = isNullOrUndefined;
  5740. function isNumber(arg) {
  5741. return typeof arg === 'number';
  5742. }
  5743. exports.isNumber = isNumber;
  5744. function isString(arg) {
  5745. return typeof arg === 'string';
  5746. }
  5747. exports.isString = isString;
  5748. function isSymbol(arg) {
  5749. return typeof arg === 'symbol';
  5750. }
  5751. exports.isSymbol = isSymbol;
  5752. function isUndefined(arg) {
  5753. return arg === void 0;
  5754. }
  5755. exports.isUndefined = isUndefined;
  5756. function isRegExp(re) {
  5757. return isObject(re) && objectToString(re) === '[object RegExp]';
  5758. }
  5759. exports.isRegExp = isRegExp;
  5760. function isObject(arg) {
  5761. return typeof arg === 'object' && arg !== null;
  5762. }
  5763. exports.isObject = isObject;
  5764. function isDate(d) {
  5765. return isObject(d) && objectToString(d) === '[object Date]';
  5766. }
  5767. exports.isDate = isDate;
  5768. function isError(e) {
  5769. return isObject(e) &&
  5770. (objectToString(e) === '[object Error]' || e instanceof Error);
  5771. }
  5772. exports.isError = isError;
  5773. function isFunction(arg) {
  5774. return typeof arg === 'function';
  5775. }
  5776. exports.isFunction = isFunction;
  5777. function isPrimitive(arg) {
  5778. return arg === null ||
  5779. typeof arg === 'boolean' ||
  5780. typeof arg === 'number' ||
  5781. typeof arg === 'string' ||
  5782. typeof arg === 'symbol' || // ES6 symbol
  5783. typeof arg === 'undefined';
  5784. }
  5785. exports.isPrimitive = isPrimitive;
  5786. exports.isBuffer = __webpack_require__(/*! ./support/isBuffer */ 235);
  5787. function objectToString(o) {
  5788. return Object.prototype.toString.call(o);
  5789. }
  5790. function pad(n) {
  5791. return n < 10 ? '0' + n.toString(10) : n.toString(10);
  5792. }
  5793. var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
  5794. 'Oct', 'Nov', 'Dec'];
  5795. // 26 Feb 16:19:34
  5796. function timestamp() {
  5797. var d = new Date();
  5798. var time = [pad(d.getHours()),
  5799. pad(d.getMinutes()),
  5800. pad(d.getSeconds())].join(':');
  5801. return [d.getDate(), months[d.getMonth()], time].join(' ');
  5802. }
  5803. // log is just a thin wrapper to console.log that prepends a timestamp
  5804. exports.log = function() {
  5805. console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
  5806. };
  5807. /**
  5808. * Inherit the prototype methods from one constructor into another.
  5809. *
  5810. * The Function.prototype.inherits from lang.js rewritten as a standalone
  5811. * function (not on Function.prototype). NOTE: If this file is to be loaded
  5812. * during bootstrapping this function needs to be rewritten using some native
  5813. * functions as prototype setup using normal JavaScript does not work as
  5814. * expected during bootstrapping (see mirror.js in r114903).
  5815. *
  5816. * @param {function} ctor Constructor function which needs to inherit the
  5817. * prototype.
  5818. * @param {function} superCtor Constructor function to inherit prototype from.
  5819. */
  5820. exports.inherits = __webpack_require__(/*! inherits */ 236);
  5821. exports._extend = function(origin, add) {
  5822. // Don't do anything if add isn't an object
  5823. if (!add || !isObject(add)) return origin;
  5824. var keys = Object.keys(add);
  5825. var i = keys.length;
  5826. while (i--) {
  5827. origin[keys[i]] = add[keys[i]];
  5828. }
  5829. return origin;
  5830. };
  5831. function hasOwnProperty(obj, prop) {
  5832. return Object.prototype.hasOwnProperty.call(obj, prop);
  5833. }
  5834. var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;
  5835. exports.promisify = function promisify(original) {
  5836. if (typeof original !== 'function')
  5837. throw new TypeError('The "original" argument must be of type Function');
  5838. if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
  5839. var fn = original[kCustomPromisifiedSymbol];
  5840. if (typeof fn !== 'function') {
  5841. throw new TypeError('The "util.promisify.custom" argument must be of type Function');
  5842. }
  5843. Object.defineProperty(fn, kCustomPromisifiedSymbol, {
  5844. value: fn, enumerable: false, writable: false, configurable: true
  5845. });
  5846. return fn;
  5847. }
  5848. function fn() {
  5849. var promiseResolve, promiseReject;
  5850. var promise = new Promise(function (resolve, reject) {
  5851. promiseResolve = resolve;
  5852. promiseReject = reject;
  5853. });
  5854. var args = [];
  5855. for (var i = 0; i < arguments.length; i++) {
  5856. args.push(arguments[i]);
  5857. }
  5858. args.push(function (err, value) {
  5859. if (err) {
  5860. promiseReject(err);
  5861. } else {
  5862. promiseResolve(value);
  5863. }
  5864. });
  5865. try {
  5866. original.apply(this, args);
  5867. } catch (err) {
  5868. promiseReject(err);
  5869. }
  5870. return promise;
  5871. }
  5872. Object.setPrototypeOf(fn, Object.getPrototypeOf(original));
  5873. if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {
  5874. value: fn, enumerable: false, writable: false, configurable: true
  5875. });
  5876. return Object.defineProperties(
  5877. fn,
  5878. getOwnPropertyDescriptors(original)
  5879. );
  5880. }
  5881. exports.promisify.custom = kCustomPromisifiedSymbol
  5882. function callbackifyOnRejected(reason, cb) {
  5883. // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).
  5884. // Because `null` is a special error value in callbacks which means "no error
  5885. // occurred", we error-wrap so the callback consumer can distinguish between
  5886. // "the promise rejected with null" or "the promise fulfilled with undefined".
  5887. if (!reason) {
  5888. var newReason = new Error('Promise was rejected with a falsy value');
  5889. newReason.reason = reason;
  5890. reason = newReason;
  5891. }
  5892. return cb(reason);
  5893. }
  5894. function callbackify(original) {
  5895. if (typeof original !== 'function') {
  5896. throw new TypeError('The "original" argument must be of type Function');
  5897. }
  5898. // We DO NOT return the promise as it gives the user a false sense that
  5899. // the promise is actually somehow related to the callback's execution
  5900. // and that the callback throwing will reject the promise.
  5901. function callbackified() {
  5902. var args = [];
  5903. for (var i = 0; i < arguments.length; i++) {
  5904. args.push(arguments[i]);
  5905. }
  5906. var maybeCb = args.pop();
  5907. if (typeof maybeCb !== 'function') {
  5908. throw new TypeError('The last argument must be of type Function');
  5909. }
  5910. var self = this;
  5911. var cb = function() {
  5912. return maybeCb.apply(self, arguments);
  5913. };
  5914. // In true node style we process the callback on `nextTick` with all the
  5915. // implications (stack, `uncaughtException`, `async_hooks`)
  5916. original.apply(this, args)
  5917. .then(function(ret) { process.nextTick(cb, null, ret) },
  5918. function(rej) { process.nextTick(callbackifyOnRejected, rej, cb) });
  5919. }
  5920. Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
  5921. Object.defineProperties(callbackified,
  5922. getOwnPropertyDescriptors(original));
  5923. return callbackified;
  5924. }
  5925. exports.callbackify = callbackify;
  5926. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 233)))
  5927. /***/ }),
  5928. /***/ 233:
  5929. /*!********************************************************!*\
  5930. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  5931. \********************************************************/
  5932. /*! no static exports found */
  5933. /***/ (function(module, exports, __webpack_require__) {
  5934. exports.nextTick = function nextTick(fn) {
  5935. var args = Array.prototype.slice.call(arguments);
  5936. args.shift();
  5937. setTimeout(function () {
  5938. fn.apply(null, args);
  5939. }, 0);
  5940. };
  5941. exports.platform = exports.arch =
  5942. exports.execPath = exports.title = 'browser';
  5943. exports.pid = 1;
  5944. exports.browser = true;
  5945. exports.env = {};
  5946. exports.argv = [];
  5947. exports.binding = function (name) {
  5948. throw new Error('No such module. (Possibly not yet loaded)')
  5949. };
  5950. (function () {
  5951. var cwd = '/';
  5952. var path;
  5953. exports.cwd = function () { return cwd };
  5954. exports.chdir = function (dir) {
  5955. if (!path) path = __webpack_require__(/*! path */ 234);
  5956. cwd = path.resolve(dir, cwd);
  5957. };
  5958. })();
  5959. exports.exit = exports.kill =
  5960. exports.umask = exports.dlopen =
  5961. exports.uptime = exports.memoryUsage =
  5962. exports.uvCounters = function() {};
  5963. exports.features = {};
  5964. /***/ }),
  5965. /***/ 234:
  5966. /*!***********************************************!*\
  5967. !*** ./node_modules/path-browserify/index.js ***!
  5968. \***********************************************/
  5969. /*! no static exports found */
  5970. /***/ (function(module, exports, __webpack_require__) {
  5971. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  5972. // backported and transplited with Babel, with backwards-compat fixes
  5973. // Copyright Joyent, Inc. and other Node contributors.
  5974. //
  5975. // Permission is hereby granted, free of charge, to any person obtaining a
  5976. // copy of this software and associated documentation files (the
  5977. // "Software"), to deal in the Software without restriction, including
  5978. // without limitation the rights to use, copy, modify, merge, publish,
  5979. // distribute, sublicense, and/or sell copies of the Software, and to permit
  5980. // persons to whom the Software is furnished to do so, subject to the
  5981. // following conditions:
  5982. //
  5983. // The above copyright notice and this permission notice shall be included
  5984. // in all copies or substantial portions of the Software.
  5985. //
  5986. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  5987. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  5988. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  5989. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  5990. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  5991. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  5992. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  5993. // resolves . and .. elements in a path array with directory names there
  5994. // must be no slashes, empty elements, or device names (c:\) in the array
  5995. // (so also no leading and trailing slashes - it does not distinguish
  5996. // relative and absolute paths)
  5997. function normalizeArray(parts, allowAboveRoot) {
  5998. // if the path tries to go above the root, `up` ends up > 0
  5999. var up = 0;
  6000. for (var i = parts.length - 1; i >= 0; i--) {
  6001. var last = parts[i];
  6002. if (last === '.') {
  6003. parts.splice(i, 1);
  6004. } else if (last === '..') {
  6005. parts.splice(i, 1);
  6006. up++;
  6007. } else if (up) {
  6008. parts.splice(i, 1);
  6009. up--;
  6010. }
  6011. }
  6012. // if the path is allowed to go above the root, restore leading ..s
  6013. if (allowAboveRoot) {
  6014. for (; up--; up) {
  6015. parts.unshift('..');
  6016. }
  6017. }
  6018. return parts;
  6019. }
  6020. // path.resolve([from ...], to)
  6021. // posix version
  6022. exports.resolve = function() {
  6023. var resolvedPath = '',
  6024. resolvedAbsolute = false;
  6025. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  6026. var path = (i >= 0) ? arguments[i] : process.cwd();
  6027. // Skip empty and invalid entries
  6028. if (typeof path !== 'string') {
  6029. throw new TypeError('Arguments to path.resolve must be strings');
  6030. } else if (!path) {
  6031. continue;
  6032. }
  6033. resolvedPath = path + '/' + resolvedPath;
  6034. resolvedAbsolute = path.charAt(0) === '/';
  6035. }
  6036. // At this point the path should be resolved to a full absolute path, but
  6037. // handle relative paths to be safe (might happen when process.cwd() fails)
  6038. // Normalize the path
  6039. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  6040. return !!p;
  6041. }), !resolvedAbsolute).join('/');
  6042. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  6043. };
  6044. // path.normalize(path)
  6045. // posix version
  6046. exports.normalize = function(path) {
  6047. var isAbsolute = exports.isAbsolute(path),
  6048. trailingSlash = substr(path, -1) === '/';
  6049. // Normalize the path
  6050. path = normalizeArray(filter(path.split('/'), function(p) {
  6051. return !!p;
  6052. }), !isAbsolute).join('/');
  6053. if (!path && !isAbsolute) {
  6054. path = '.';
  6055. }
  6056. if (path && trailingSlash) {
  6057. path += '/';
  6058. }
  6059. return (isAbsolute ? '/' : '') + path;
  6060. };
  6061. // posix version
  6062. exports.isAbsolute = function(path) {
  6063. return path.charAt(0) === '/';
  6064. };
  6065. // posix version
  6066. exports.join = function() {
  6067. var paths = Array.prototype.slice.call(arguments, 0);
  6068. return exports.normalize(filter(paths, function(p, index) {
  6069. if (typeof p !== 'string') {
  6070. throw new TypeError('Arguments to path.join must be strings');
  6071. }
  6072. return p;
  6073. }).join('/'));
  6074. };
  6075. // path.relative(from, to)
  6076. // posix version
  6077. exports.relative = function(from, to) {
  6078. from = exports.resolve(from).substr(1);
  6079. to = exports.resolve(to).substr(1);
  6080. function trim(arr) {
  6081. var start = 0;
  6082. for (; start < arr.length; start++) {
  6083. if (arr[start] !== '') break;
  6084. }
  6085. var end = arr.length - 1;
  6086. for (; end >= 0; end--) {
  6087. if (arr[end] !== '') break;
  6088. }
  6089. if (start > end) return [];
  6090. return arr.slice(start, end - start + 1);
  6091. }
  6092. var fromParts = trim(from.split('/'));
  6093. var toParts = trim(to.split('/'));
  6094. var length = Math.min(fromParts.length, toParts.length);
  6095. var samePartsLength = length;
  6096. for (var i = 0; i < length; i++) {
  6097. if (fromParts[i] !== toParts[i]) {
  6098. samePartsLength = i;
  6099. break;
  6100. }
  6101. }
  6102. var outputParts = [];
  6103. for (var i = samePartsLength; i < fromParts.length; i++) {
  6104. outputParts.push('..');
  6105. }
  6106. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  6107. return outputParts.join('/');
  6108. };
  6109. exports.sep = '/';
  6110. exports.delimiter = ':';
  6111. exports.dirname = function (path) {
  6112. if (typeof path !== 'string') path = path + '';
  6113. if (path.length === 0) return '.';
  6114. var code = path.charCodeAt(0);
  6115. var hasRoot = code === 47 /*/*/;
  6116. var end = -1;
  6117. var matchedSlash = true;
  6118. for (var i = path.length - 1; i >= 1; --i) {
  6119. code = path.charCodeAt(i);
  6120. if (code === 47 /*/*/) {
  6121. if (!matchedSlash) {
  6122. end = i;
  6123. break;
  6124. }
  6125. } else {
  6126. // We saw the first non-path separator
  6127. matchedSlash = false;
  6128. }
  6129. }
  6130. if (end === -1) return hasRoot ? '/' : '.';
  6131. if (hasRoot && end === 1) {
  6132. // return '//';
  6133. // Backwards-compat fix:
  6134. return '/';
  6135. }
  6136. return path.slice(0, end);
  6137. };
  6138. function basename(path) {
  6139. if (typeof path !== 'string') path = path + '';
  6140. var start = 0;
  6141. var end = -1;
  6142. var matchedSlash = true;
  6143. var i;
  6144. for (i = path.length - 1; i >= 0; --i) {
  6145. if (path.charCodeAt(i) === 47 /*/*/) {
  6146. // If we reached a path separator that was not part of a set of path
  6147. // separators at the end of the string, stop now
  6148. if (!matchedSlash) {
  6149. start = i + 1;
  6150. break;
  6151. }
  6152. } else if (end === -1) {
  6153. // We saw the first non-path separator, mark this as the end of our
  6154. // path component
  6155. matchedSlash = false;
  6156. end = i + 1;
  6157. }
  6158. }
  6159. if (end === -1) return '';
  6160. return path.slice(start, end);
  6161. }
  6162. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  6163. // in new Node.js versions, so only basename() above is backported here
  6164. exports.basename = function (path, ext) {
  6165. var f = basename(path);
  6166. if (ext && f.substr(-1 * ext.length) === ext) {
  6167. f = f.substr(0, f.length - ext.length);
  6168. }
  6169. return f;
  6170. };
  6171. exports.extname = function (path) {
  6172. if (typeof path !== 'string') path = path + '';
  6173. var startDot = -1;
  6174. var startPart = 0;
  6175. var end = -1;
  6176. var matchedSlash = true;
  6177. // Track the state of characters (if any) we see before our first dot and
  6178. // after any path separator we find
  6179. var preDotState = 0;
  6180. for (var i = path.length - 1; i >= 0; --i) {
  6181. var code = path.charCodeAt(i);
  6182. if (code === 47 /*/*/) {
  6183. // If we reached a path separator that was not part of a set of path
  6184. // separators at the end of the string, stop now
  6185. if (!matchedSlash) {
  6186. startPart = i + 1;
  6187. break;
  6188. }
  6189. continue;
  6190. }
  6191. if (end === -1) {
  6192. // We saw the first non-path separator, mark this as the end of our
  6193. // extension
  6194. matchedSlash = false;
  6195. end = i + 1;
  6196. }
  6197. if (code === 46 /*.*/) {
  6198. // If this is our first dot, mark it as the start of our extension
  6199. if (startDot === -1)
  6200. startDot = i;
  6201. else if (preDotState !== 1)
  6202. preDotState = 1;
  6203. } else if (startDot !== -1) {
  6204. // We saw a non-dot and non-path separator before our dot, so we should
  6205. // have a good chance at having a non-empty extension
  6206. preDotState = -1;
  6207. }
  6208. }
  6209. if (startDot === -1 || end === -1 ||
  6210. // We saw a non-dot character immediately before the dot
  6211. preDotState === 0 ||
  6212. // The (right-most) trimmed path component is exactly '..'
  6213. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  6214. return '';
  6215. }
  6216. return path.slice(startDot, end);
  6217. };
  6218. function filter (xs, f) {
  6219. if (xs.filter) return xs.filter(f);
  6220. var res = [];
  6221. for (var i = 0; i < xs.length; i++) {
  6222. if (f(xs[i], i, xs)) res.push(xs[i]);
  6223. }
  6224. return res;
  6225. }
  6226. // String.prototype.substr - negative index don't work in IE8
  6227. var substr = 'ab'.substr(-1) === 'b'
  6228. ? function (str, start, len) { return str.substr(start, len) }
  6229. : function (str, start, len) {
  6230. if (start < 0) start = str.length + start;
  6231. return str.substr(start, len);
  6232. }
  6233. ;
  6234. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 233)))
  6235. /***/ }),
  6236. /***/ 235:
  6237. /*!******************************************************!*\
  6238. !*** ./node_modules/util/support/isBufferBrowser.js ***!
  6239. \******************************************************/
  6240. /*! no static exports found */
  6241. /***/ (function(module, exports) {
  6242. module.exports = function isBuffer(arg) {
  6243. return arg && typeof arg === 'object'
  6244. && typeof arg.copy === 'function'
  6245. && typeof arg.fill === 'function'
  6246. && typeof arg.readUInt8 === 'function';
  6247. }
  6248. /***/ }),
  6249. /***/ 236:
  6250. /*!***************************************************!*\
  6251. !*** ./node_modules/inherits/inherits_browser.js ***!
  6252. \***************************************************/
  6253. /*! no static exports found */
  6254. /***/ (function(module, exports) {
  6255. if (typeof Object.create === 'function') {
  6256. // implementation from standard node.js 'util' module
  6257. module.exports = function inherits(ctor, superCtor) {
  6258. if (superCtor) {
  6259. ctor.super_ = superCtor
  6260. ctor.prototype = Object.create(superCtor.prototype, {
  6261. constructor: {
  6262. value: ctor,
  6263. enumerable: false,
  6264. writable: true,
  6265. configurable: true
  6266. }
  6267. })
  6268. }
  6269. };
  6270. } else {
  6271. // old school shim for old browsers
  6272. module.exports = function inherits(ctor, superCtor) {
  6273. if (superCtor) {
  6274. ctor.super_ = superCtor
  6275. var TempCtor = function () {}
  6276. TempCtor.prototype = superCtor.prototype
  6277. ctor.prototype = new TempCtor()
  6278. ctor.prototype.constructor = ctor
  6279. }
  6280. }
  6281. }
  6282. /***/ }),
  6283. /***/ 24:
  6284. /*!************************************************************!*\
  6285. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  6286. \************************************************************/
  6287. /*! no static exports found */
  6288. /***/ (function(module, exports, __webpack_require__) {
  6289. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  6290. function _defineProperties(target, props) {
  6291. for (var i = 0; i < props.length; i++) {
  6292. var descriptor = props[i];
  6293. descriptor.enumerable = descriptor.enumerable || false;
  6294. descriptor.configurable = true;
  6295. if ("value" in descriptor) descriptor.writable = true;
  6296. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  6297. }
  6298. }
  6299. function _createClass(Constructor, protoProps, staticProps) {
  6300. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  6301. if (staticProps) _defineProperties(Constructor, staticProps);
  6302. Object.defineProperty(Constructor, "prototype", {
  6303. writable: false
  6304. });
  6305. return Constructor;
  6306. }
  6307. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  6308. /***/ }),
  6309. /***/ 25:
  6310. /*!******************************************************************************************!*\
  6311. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  6312. \******************************************************************************************/
  6313. /*! exports provided: default */
  6314. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  6315. "use strict";
  6316. __webpack_require__.r(__webpack_exports__);
  6317. /* WEBPACK VAR INJECTION */(function(global) {/*!
  6318. * Vue.js v2.6.11
  6319. * (c) 2014-2023 Evan You
  6320. * Released under the MIT License.
  6321. */
  6322. /* */
  6323. var emptyObject = Object.freeze({});
  6324. // These helpers produce better VM code in JS engines due to their
  6325. // explicitness and function inlining.
  6326. function isUndef (v) {
  6327. return v === undefined || v === null
  6328. }
  6329. function isDef (v) {
  6330. return v !== undefined && v !== null
  6331. }
  6332. function isTrue (v) {
  6333. return v === true
  6334. }
  6335. function isFalse (v) {
  6336. return v === false
  6337. }
  6338. /**
  6339. * Check if value is primitive.
  6340. */
  6341. function isPrimitive (value) {
  6342. return (
  6343. typeof value === 'string' ||
  6344. typeof value === 'number' ||
  6345. // $flow-disable-line
  6346. typeof value === 'symbol' ||
  6347. typeof value === 'boolean'
  6348. )
  6349. }
  6350. /**
  6351. * Quick object check - this is primarily used to tell
  6352. * Objects from primitive values when we know the value
  6353. * is a JSON-compliant type.
  6354. */
  6355. function isObject (obj) {
  6356. return obj !== null && typeof obj === 'object'
  6357. }
  6358. /**
  6359. * Get the raw type string of a value, e.g., [object Object].
  6360. */
  6361. var _toString = Object.prototype.toString;
  6362. function toRawType (value) {
  6363. return _toString.call(value).slice(8, -1)
  6364. }
  6365. /**
  6366. * Strict object type check. Only returns true
  6367. * for plain JavaScript objects.
  6368. */
  6369. function isPlainObject (obj) {
  6370. return _toString.call(obj) === '[object Object]'
  6371. }
  6372. function isRegExp (v) {
  6373. return _toString.call(v) === '[object RegExp]'
  6374. }
  6375. /**
  6376. * Check if val is a valid array index.
  6377. */
  6378. function isValidArrayIndex (val) {
  6379. var n = parseFloat(String(val));
  6380. return n >= 0 && Math.floor(n) === n && isFinite(val)
  6381. }
  6382. function isPromise (val) {
  6383. return (
  6384. isDef(val) &&
  6385. typeof val.then === 'function' &&
  6386. typeof val.catch === 'function'
  6387. )
  6388. }
  6389. /**
  6390. * Convert a value to a string that is actually rendered.
  6391. */
  6392. function toString (val) {
  6393. return val == null
  6394. ? ''
  6395. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  6396. ? JSON.stringify(val, null, 2)
  6397. : String(val)
  6398. }
  6399. /**
  6400. * Convert an input value to a number for persistence.
  6401. * If the conversion fails, return original string.
  6402. */
  6403. function toNumber (val) {
  6404. var n = parseFloat(val);
  6405. return isNaN(n) ? val : n
  6406. }
  6407. /**
  6408. * Make a map and return a function for checking if a key
  6409. * is in that map.
  6410. */
  6411. function makeMap (
  6412. str,
  6413. expectsLowerCase
  6414. ) {
  6415. var map = Object.create(null);
  6416. var list = str.split(',');
  6417. for (var i = 0; i < list.length; i++) {
  6418. map[list[i]] = true;
  6419. }
  6420. return expectsLowerCase
  6421. ? function (val) { return map[val.toLowerCase()]; }
  6422. : function (val) { return map[val]; }
  6423. }
  6424. /**
  6425. * Check if a tag is a built-in tag.
  6426. */
  6427. var isBuiltInTag = makeMap('slot,component', true);
  6428. /**
  6429. * Check if an attribute is a reserved attribute.
  6430. */
  6431. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  6432. /**
  6433. * Remove an item from an array.
  6434. */
  6435. function remove (arr, item) {
  6436. if (arr.length) {
  6437. var index = arr.indexOf(item);
  6438. if (index > -1) {
  6439. return arr.splice(index, 1)
  6440. }
  6441. }
  6442. }
  6443. /**
  6444. * Check whether an object has the property.
  6445. */
  6446. var hasOwnProperty = Object.prototype.hasOwnProperty;
  6447. function hasOwn (obj, key) {
  6448. return hasOwnProperty.call(obj, key)
  6449. }
  6450. /**
  6451. * Create a cached version of a pure function.
  6452. */
  6453. function cached (fn) {
  6454. var cache = Object.create(null);
  6455. return (function cachedFn (str) {
  6456. var hit = cache[str];
  6457. return hit || (cache[str] = fn(str))
  6458. })
  6459. }
  6460. /**
  6461. * Camelize a hyphen-delimited string.
  6462. */
  6463. var camelizeRE = /-(\w)/g;
  6464. var camelize = cached(function (str) {
  6465. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  6466. });
  6467. /**
  6468. * Capitalize a string.
  6469. */
  6470. var capitalize = cached(function (str) {
  6471. return str.charAt(0).toUpperCase() + str.slice(1)
  6472. });
  6473. /**
  6474. * Hyphenate a camelCase string.
  6475. */
  6476. var hyphenateRE = /\B([A-Z])/g;
  6477. var hyphenate = cached(function (str) {
  6478. return str.replace(hyphenateRE, '-$1').toLowerCase()
  6479. });
  6480. /**
  6481. * Simple bind polyfill for environments that do not support it,
  6482. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  6483. * since native bind is now performant enough in most browsers.
  6484. * But removing it would mean breaking code that was able to run in
  6485. * PhantomJS 1.x, so this must be kept for backward compatibility.
  6486. */
  6487. /* istanbul ignore next */
  6488. function polyfillBind (fn, ctx) {
  6489. function boundFn (a) {
  6490. var l = arguments.length;
  6491. return l
  6492. ? l > 1
  6493. ? fn.apply(ctx, arguments)
  6494. : fn.call(ctx, a)
  6495. : fn.call(ctx)
  6496. }
  6497. boundFn._length = fn.length;
  6498. return boundFn
  6499. }
  6500. function nativeBind (fn, ctx) {
  6501. return fn.bind(ctx)
  6502. }
  6503. var bind = Function.prototype.bind
  6504. ? nativeBind
  6505. : polyfillBind;
  6506. /**
  6507. * Convert an Array-like object to a real Array.
  6508. */
  6509. function toArray (list, start) {
  6510. start = start || 0;
  6511. var i = list.length - start;
  6512. var ret = new Array(i);
  6513. while (i--) {
  6514. ret[i] = list[i + start];
  6515. }
  6516. return ret
  6517. }
  6518. /**
  6519. * Mix properties into target object.
  6520. */
  6521. function extend (to, _from) {
  6522. for (var key in _from) {
  6523. to[key] = _from[key];
  6524. }
  6525. return to
  6526. }
  6527. /**
  6528. * Merge an Array of Objects into a single Object.
  6529. */
  6530. function toObject (arr) {
  6531. var res = {};
  6532. for (var i = 0; i < arr.length; i++) {
  6533. if (arr[i]) {
  6534. extend(res, arr[i]);
  6535. }
  6536. }
  6537. return res
  6538. }
  6539. /* eslint-disable no-unused-vars */
  6540. /**
  6541. * Perform no operation.
  6542. * Stubbing args to make Flow happy without leaving useless transpiled code
  6543. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  6544. */
  6545. function noop (a, b, c) {}
  6546. /**
  6547. * Always return false.
  6548. */
  6549. var no = function (a, b, c) { return false; };
  6550. /* eslint-enable no-unused-vars */
  6551. /**
  6552. * Return the same value.
  6553. */
  6554. var identity = function (_) { return _; };
  6555. /**
  6556. * Check if two values are loosely equal - that is,
  6557. * if they are plain objects, do they have the same shape?
  6558. */
  6559. function looseEqual (a, b) {
  6560. if (a === b) { return true }
  6561. var isObjectA = isObject(a);
  6562. var isObjectB = isObject(b);
  6563. if (isObjectA && isObjectB) {
  6564. try {
  6565. var isArrayA = Array.isArray(a);
  6566. var isArrayB = Array.isArray(b);
  6567. if (isArrayA && isArrayB) {
  6568. return a.length === b.length && a.every(function (e, i) {
  6569. return looseEqual(e, b[i])
  6570. })
  6571. } else if (a instanceof Date && b instanceof Date) {
  6572. return a.getTime() === b.getTime()
  6573. } else if (!isArrayA && !isArrayB) {
  6574. var keysA = Object.keys(a);
  6575. var keysB = Object.keys(b);
  6576. return keysA.length === keysB.length && keysA.every(function (key) {
  6577. return looseEqual(a[key], b[key])
  6578. })
  6579. } else {
  6580. /* istanbul ignore next */
  6581. return false
  6582. }
  6583. } catch (e) {
  6584. /* istanbul ignore next */
  6585. return false
  6586. }
  6587. } else if (!isObjectA && !isObjectB) {
  6588. return String(a) === String(b)
  6589. } else {
  6590. return false
  6591. }
  6592. }
  6593. /**
  6594. * Return the first index at which a loosely equal value can be
  6595. * found in the array (if value is a plain object, the array must
  6596. * contain an object of the same shape), or -1 if it is not present.
  6597. */
  6598. function looseIndexOf (arr, val) {
  6599. for (var i = 0; i < arr.length; i++) {
  6600. if (looseEqual(arr[i], val)) { return i }
  6601. }
  6602. return -1
  6603. }
  6604. /**
  6605. * Ensure a function is called only once.
  6606. */
  6607. function once (fn) {
  6608. var called = false;
  6609. return function () {
  6610. if (!called) {
  6611. called = true;
  6612. fn.apply(this, arguments);
  6613. }
  6614. }
  6615. }
  6616. var ASSET_TYPES = [
  6617. 'component',
  6618. 'directive',
  6619. 'filter'
  6620. ];
  6621. var LIFECYCLE_HOOKS = [
  6622. 'beforeCreate',
  6623. 'created',
  6624. 'beforeMount',
  6625. 'mounted',
  6626. 'beforeUpdate',
  6627. 'updated',
  6628. 'beforeDestroy',
  6629. 'destroyed',
  6630. 'activated',
  6631. 'deactivated',
  6632. 'errorCaptured',
  6633. 'serverPrefetch'
  6634. ];
  6635. /* */
  6636. var config = ({
  6637. /**
  6638. * Option merge strategies (used in core/util/options)
  6639. */
  6640. // $flow-disable-line
  6641. optionMergeStrategies: Object.create(null),
  6642. /**
  6643. * Whether to suppress warnings.
  6644. */
  6645. silent: false,
  6646. /**
  6647. * Show production mode tip message on boot?
  6648. */
  6649. productionTip: "development" !== 'production',
  6650. /**
  6651. * Whether to enable devtools
  6652. */
  6653. devtools: "development" !== 'production',
  6654. /**
  6655. * Whether to record perf
  6656. */
  6657. performance: false,
  6658. /**
  6659. * Error handler for watcher errors
  6660. */
  6661. errorHandler: null,
  6662. /**
  6663. * Warn handler for watcher warns
  6664. */
  6665. warnHandler: null,
  6666. /**
  6667. * Ignore certain custom elements
  6668. */
  6669. ignoredElements: [],
  6670. /**
  6671. * Custom user key aliases for v-on
  6672. */
  6673. // $flow-disable-line
  6674. keyCodes: Object.create(null),
  6675. /**
  6676. * Check if a tag is reserved so that it cannot be registered as a
  6677. * component. This is platform-dependent and may be overwritten.
  6678. */
  6679. isReservedTag: no,
  6680. /**
  6681. * Check if an attribute is reserved so that it cannot be used as a component
  6682. * prop. This is platform-dependent and may be overwritten.
  6683. */
  6684. isReservedAttr: no,
  6685. /**
  6686. * Check if a tag is an unknown element.
  6687. * Platform-dependent.
  6688. */
  6689. isUnknownElement: no,
  6690. /**
  6691. * Get the namespace of an element
  6692. */
  6693. getTagNamespace: noop,
  6694. /**
  6695. * Parse the real tag name for the specific platform.
  6696. */
  6697. parsePlatformTagName: identity,
  6698. /**
  6699. * Check if an attribute must be bound using property, e.g. value
  6700. * Platform-dependent.
  6701. */
  6702. mustUseProp: no,
  6703. /**
  6704. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  6705. * This will significantly reduce performance if set to false.
  6706. */
  6707. async: true,
  6708. /**
  6709. * Exposed for legacy reasons
  6710. */
  6711. _lifecycleHooks: LIFECYCLE_HOOKS
  6712. });
  6713. /* */
  6714. /**
  6715. * unicode letters used for parsing html tags, component names and property paths.
  6716. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  6717. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  6718. */
  6719. 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/;
  6720. /**
  6721. * Check if a string starts with $ or _
  6722. */
  6723. function isReserved (str) {
  6724. var c = (str + '').charCodeAt(0);
  6725. return c === 0x24 || c === 0x5F
  6726. }
  6727. /**
  6728. * Define a property.
  6729. */
  6730. function def (obj, key, val, enumerable) {
  6731. Object.defineProperty(obj, key, {
  6732. value: val,
  6733. enumerable: !!enumerable,
  6734. writable: true,
  6735. configurable: true
  6736. });
  6737. }
  6738. /**
  6739. * Parse simple path.
  6740. */
  6741. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  6742. function parsePath (path) {
  6743. if (bailRE.test(path)) {
  6744. return
  6745. }
  6746. var segments = path.split('.');
  6747. return function (obj) {
  6748. for (var i = 0; i < segments.length; i++) {
  6749. if (!obj) { return }
  6750. obj = obj[segments[i]];
  6751. }
  6752. return obj
  6753. }
  6754. }
  6755. /* */
  6756. // can we use __proto__?
  6757. var hasProto = '__proto__' in {};
  6758. // Browser environment sniffing
  6759. var inBrowser = typeof window !== 'undefined';
  6760. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  6761. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  6762. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  6763. var isIE = UA && /msie|trident/.test(UA);
  6764. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  6765. var isEdge = UA && UA.indexOf('edge/') > 0;
  6766. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  6767. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  6768. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  6769. var isPhantomJS = UA && /phantomjs/.test(UA);
  6770. var isFF = UA && UA.match(/firefox\/(\d+)/);
  6771. // Firefox has a "watch" function on Object.prototype...
  6772. var nativeWatch = ({}).watch;
  6773. if (inBrowser) {
  6774. try {
  6775. var opts = {};
  6776. Object.defineProperty(opts, 'passive', ({
  6777. get: function get () {
  6778. }
  6779. })); // https://github.com/facebook/flow/issues/285
  6780. window.addEventListener('test-passive', null, opts);
  6781. } catch (e) {}
  6782. }
  6783. // this needs to be lazy-evaled because vue may be required before
  6784. // vue-server-renderer can set VUE_ENV
  6785. var _isServer;
  6786. var isServerRendering = function () {
  6787. if (_isServer === undefined) {
  6788. /* istanbul ignore if */
  6789. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  6790. // detect presence of vue-server-renderer and avoid
  6791. // Webpack shimming the process
  6792. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  6793. } else {
  6794. _isServer = false;
  6795. }
  6796. }
  6797. return _isServer
  6798. };
  6799. // detect devtools
  6800. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  6801. /* istanbul ignore next */
  6802. function isNative (Ctor) {
  6803. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  6804. }
  6805. var hasSymbol =
  6806. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  6807. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  6808. var _Set;
  6809. /* istanbul ignore if */ // $flow-disable-line
  6810. if (typeof Set !== 'undefined' && isNative(Set)) {
  6811. // use native Set when available.
  6812. _Set = Set;
  6813. } else {
  6814. // a non-standard Set polyfill that only works with primitive keys.
  6815. _Set = /*@__PURE__*/(function () {
  6816. function Set () {
  6817. this.set = Object.create(null);
  6818. }
  6819. Set.prototype.has = function has (key) {
  6820. return this.set[key] === true
  6821. };
  6822. Set.prototype.add = function add (key) {
  6823. this.set[key] = true;
  6824. };
  6825. Set.prototype.clear = function clear () {
  6826. this.set = Object.create(null);
  6827. };
  6828. return Set;
  6829. }());
  6830. }
  6831. /* */
  6832. var warn = noop;
  6833. var tip = noop;
  6834. var generateComponentTrace = (noop); // work around flow check
  6835. var formatComponentName = (noop);
  6836. if (true) {
  6837. var hasConsole = typeof console !== 'undefined';
  6838. var classifyRE = /(?:^|[-_])(\w)/g;
  6839. var classify = function (str) { return str
  6840. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  6841. .replace(/[-_]/g, ''); };
  6842. warn = function (msg, vm) {
  6843. var trace = vm ? generateComponentTrace(vm) : '';
  6844. if (config.warnHandler) {
  6845. config.warnHandler.call(null, msg, vm, trace);
  6846. } else if (hasConsole && (!config.silent)) {
  6847. console.error(("[Vue warn]: " + msg + trace));
  6848. }
  6849. };
  6850. tip = function (msg, vm) {
  6851. if (hasConsole && (!config.silent)) {
  6852. console.warn("[Vue tip]: " + msg + (
  6853. vm ? generateComponentTrace(vm) : ''
  6854. ));
  6855. }
  6856. };
  6857. formatComponentName = function (vm, includeFile) {
  6858. if (vm.$root === vm) {
  6859. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  6860. return ('') + vm.$options.__file
  6861. }
  6862. return '<Root>'
  6863. }
  6864. var options = typeof vm === 'function' && vm.cid != null
  6865. ? vm.options
  6866. : vm._isVue
  6867. ? vm.$options || vm.constructor.options
  6868. : vm;
  6869. var name = options.name || options._componentTag;
  6870. var file = options.__file;
  6871. if (!name && file) {
  6872. var match = file.match(/([^/\\]+)\.vue$/);
  6873. name = match && match[1];
  6874. }
  6875. return (
  6876. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  6877. (file && includeFile !== false ? (" at " + file) : '')
  6878. )
  6879. };
  6880. var repeat = function (str, n) {
  6881. var res = '';
  6882. while (n) {
  6883. if (n % 2 === 1) { res += str; }
  6884. if (n > 1) { str += str; }
  6885. n >>= 1;
  6886. }
  6887. return res
  6888. };
  6889. generateComponentTrace = function (vm) {
  6890. if (vm._isVue && vm.$parent) {
  6891. var tree = [];
  6892. var currentRecursiveSequence = 0;
  6893. while (vm && vm.$options.name !== 'PageBody') {
  6894. if (tree.length > 0) {
  6895. var last = tree[tree.length - 1];
  6896. if (last.constructor === vm.constructor) {
  6897. currentRecursiveSequence++;
  6898. vm = vm.$parent;
  6899. continue
  6900. } else if (currentRecursiveSequence > 0) {
  6901. tree[tree.length - 1] = [last, currentRecursiveSequence];
  6902. currentRecursiveSequence = 0;
  6903. }
  6904. }
  6905. !vm.$options.isReserved && tree.push(vm);
  6906. vm = vm.$parent;
  6907. }
  6908. return '\n\nfound in\n\n' + tree
  6909. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  6910. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  6911. : formatComponentName(vm))); })
  6912. .join('\n')
  6913. } else {
  6914. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  6915. }
  6916. };
  6917. }
  6918. /* */
  6919. var uid = 0;
  6920. /**
  6921. * A dep is an observable that can have multiple
  6922. * directives subscribing to it.
  6923. */
  6924. var Dep = function Dep () {
  6925. this.id = uid++;
  6926. this.subs = [];
  6927. };
  6928. Dep.prototype.addSub = function addSub (sub) {
  6929. this.subs.push(sub);
  6930. };
  6931. Dep.prototype.removeSub = function removeSub (sub) {
  6932. remove(this.subs, sub);
  6933. };
  6934. Dep.prototype.depend = function depend () {
  6935. if (Dep.SharedObject.target) {
  6936. Dep.SharedObject.target.addDep(this);
  6937. }
  6938. };
  6939. Dep.prototype.notify = function notify () {
  6940. // stabilize the subscriber list first
  6941. var subs = this.subs.slice();
  6942. if ( true && !config.async) {
  6943. // subs aren't sorted in scheduler if not running async
  6944. // we need to sort them now to make sure they fire in correct
  6945. // order
  6946. subs.sort(function (a, b) { return a.id - b.id; });
  6947. }
  6948. for (var i = 0, l = subs.length; i < l; i++) {
  6949. subs[i].update();
  6950. }
  6951. };
  6952. // The current target watcher being evaluated.
  6953. // This is globally unique because only one watcher
  6954. // can be evaluated at a time.
  6955. // fixed by xxxxxx (nvue shared vuex)
  6956. /* eslint-disable no-undef */
  6957. Dep.SharedObject = {};
  6958. Dep.SharedObject.target = null;
  6959. Dep.SharedObject.targetStack = [];
  6960. function pushTarget (target) {
  6961. Dep.SharedObject.targetStack.push(target);
  6962. Dep.SharedObject.target = target;
  6963. Dep.target = target;
  6964. }
  6965. function popTarget () {
  6966. Dep.SharedObject.targetStack.pop();
  6967. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  6968. Dep.target = Dep.SharedObject.target;
  6969. }
  6970. /* */
  6971. var VNode = function VNode (
  6972. tag,
  6973. data,
  6974. children,
  6975. text,
  6976. elm,
  6977. context,
  6978. componentOptions,
  6979. asyncFactory
  6980. ) {
  6981. this.tag = tag;
  6982. this.data = data;
  6983. this.children = children;
  6984. this.text = text;
  6985. this.elm = elm;
  6986. this.ns = undefined;
  6987. this.context = context;
  6988. this.fnContext = undefined;
  6989. this.fnOptions = undefined;
  6990. this.fnScopeId = undefined;
  6991. this.key = data && data.key;
  6992. this.componentOptions = componentOptions;
  6993. this.componentInstance = undefined;
  6994. this.parent = undefined;
  6995. this.raw = false;
  6996. this.isStatic = false;
  6997. this.isRootInsert = true;
  6998. this.isComment = false;
  6999. this.isCloned = false;
  7000. this.isOnce = false;
  7001. this.asyncFactory = asyncFactory;
  7002. this.asyncMeta = undefined;
  7003. this.isAsyncPlaceholder = false;
  7004. };
  7005. var prototypeAccessors = { child: { configurable: true } };
  7006. // DEPRECATED: alias for componentInstance for backwards compat.
  7007. /* istanbul ignore next */
  7008. prototypeAccessors.child.get = function () {
  7009. return this.componentInstance
  7010. };
  7011. Object.defineProperties( VNode.prototype, prototypeAccessors );
  7012. var createEmptyVNode = function (text) {
  7013. if ( text === void 0 ) text = '';
  7014. var node = new VNode();
  7015. node.text = text;
  7016. node.isComment = true;
  7017. return node
  7018. };
  7019. function createTextVNode (val) {
  7020. return new VNode(undefined, undefined, undefined, String(val))
  7021. }
  7022. // optimized shallow clone
  7023. // used for static nodes and slot nodes because they may be reused across
  7024. // multiple renders, cloning them avoids errors when DOM manipulations rely
  7025. // on their elm reference.
  7026. function cloneVNode (vnode) {
  7027. var cloned = new VNode(
  7028. vnode.tag,
  7029. vnode.data,
  7030. // #7975
  7031. // clone children array to avoid mutating original in case of cloning
  7032. // a child.
  7033. vnode.children && vnode.children.slice(),
  7034. vnode.text,
  7035. vnode.elm,
  7036. vnode.context,
  7037. vnode.componentOptions,
  7038. vnode.asyncFactory
  7039. );
  7040. cloned.ns = vnode.ns;
  7041. cloned.isStatic = vnode.isStatic;
  7042. cloned.key = vnode.key;
  7043. cloned.isComment = vnode.isComment;
  7044. cloned.fnContext = vnode.fnContext;
  7045. cloned.fnOptions = vnode.fnOptions;
  7046. cloned.fnScopeId = vnode.fnScopeId;
  7047. cloned.asyncMeta = vnode.asyncMeta;
  7048. cloned.isCloned = true;
  7049. return cloned
  7050. }
  7051. /*
  7052. * not type checking this file because flow doesn't play well with
  7053. * dynamically accessing methods on Array prototype
  7054. */
  7055. var arrayProto = Array.prototype;
  7056. var arrayMethods = Object.create(arrayProto);
  7057. var methodsToPatch = [
  7058. 'push',
  7059. 'pop',
  7060. 'shift',
  7061. 'unshift',
  7062. 'splice',
  7063. 'sort',
  7064. 'reverse'
  7065. ];
  7066. /**
  7067. * Intercept mutating methods and emit events
  7068. */
  7069. methodsToPatch.forEach(function (method) {
  7070. // cache original method
  7071. var original = arrayProto[method];
  7072. def(arrayMethods, method, function mutator () {
  7073. var args = [], len = arguments.length;
  7074. while ( len-- ) args[ len ] = arguments[ len ];
  7075. var result = original.apply(this, args);
  7076. var ob = this.__ob__;
  7077. var inserted;
  7078. switch (method) {
  7079. case 'push':
  7080. case 'unshift':
  7081. inserted = args;
  7082. break
  7083. case 'splice':
  7084. inserted = args.slice(2);
  7085. break
  7086. }
  7087. if (inserted) { ob.observeArray(inserted); }
  7088. // notify change
  7089. ob.dep.notify();
  7090. return result
  7091. });
  7092. });
  7093. /* */
  7094. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  7095. /**
  7096. * In some cases we may want to disable observation inside a component's
  7097. * update computation.
  7098. */
  7099. var shouldObserve = true;
  7100. function toggleObserving (value) {
  7101. shouldObserve = value;
  7102. }
  7103. /**
  7104. * Observer class that is attached to each observed
  7105. * object. Once attached, the observer converts the target
  7106. * object's property keys into getter/setters that
  7107. * collect dependencies and dispatch updates.
  7108. */
  7109. var Observer = function Observer (value) {
  7110. this.value = value;
  7111. this.dep = new Dep();
  7112. this.vmCount = 0;
  7113. def(value, '__ob__', this);
  7114. if (Array.isArray(value)) {
  7115. if (hasProto) {
  7116. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  7117. if(value.push !== value.__proto__.push){
  7118. copyAugment(value, arrayMethods, arrayKeys);
  7119. } else {
  7120. protoAugment(value, arrayMethods);
  7121. }
  7122. }
  7123. } else {
  7124. copyAugment(value, arrayMethods, arrayKeys);
  7125. }
  7126. this.observeArray(value);
  7127. } else {
  7128. this.walk(value);
  7129. }
  7130. };
  7131. /**
  7132. * Walk through all properties and convert them into
  7133. * getter/setters. This method should only be called when
  7134. * value type is Object.
  7135. */
  7136. Observer.prototype.walk = function walk (obj) {
  7137. var keys = Object.keys(obj);
  7138. for (var i = 0; i < keys.length; i++) {
  7139. defineReactive$$1(obj, keys[i]);
  7140. }
  7141. };
  7142. /**
  7143. * Observe a list of Array items.
  7144. */
  7145. Observer.prototype.observeArray = function observeArray (items) {
  7146. for (var i = 0, l = items.length; i < l; i++) {
  7147. observe(items[i]);
  7148. }
  7149. };
  7150. // helpers
  7151. /**
  7152. * Augment a target Object or Array by intercepting
  7153. * the prototype chain using __proto__
  7154. */
  7155. function protoAugment (target, src) {
  7156. /* eslint-disable no-proto */
  7157. target.__proto__ = src;
  7158. /* eslint-enable no-proto */
  7159. }
  7160. /**
  7161. * Augment a target Object or Array by defining
  7162. * hidden properties.
  7163. */
  7164. /* istanbul ignore next */
  7165. function copyAugment (target, src, keys) {
  7166. for (var i = 0, l = keys.length; i < l; i++) {
  7167. var key = keys[i];
  7168. def(target, key, src[key]);
  7169. }
  7170. }
  7171. /**
  7172. * Attempt to create an observer instance for a value,
  7173. * returns the new observer if successfully observed,
  7174. * or the existing observer if the value already has one.
  7175. */
  7176. function observe (value, asRootData) {
  7177. if (!isObject(value) || value instanceof VNode) {
  7178. return
  7179. }
  7180. var ob;
  7181. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  7182. ob = value.__ob__;
  7183. } else if (
  7184. shouldObserve &&
  7185. !isServerRendering() &&
  7186. (Array.isArray(value) || isPlainObject(value)) &&
  7187. Object.isExtensible(value) &&
  7188. !value._isVue &&
  7189. !value.__v_isMPComponent
  7190. ) {
  7191. ob = new Observer(value);
  7192. }
  7193. if (asRootData && ob) {
  7194. ob.vmCount++;
  7195. }
  7196. return ob
  7197. }
  7198. /**
  7199. * Define a reactive property on an Object.
  7200. */
  7201. function defineReactive$$1 (
  7202. obj,
  7203. key,
  7204. val,
  7205. customSetter,
  7206. shallow
  7207. ) {
  7208. var dep = new Dep();
  7209. var property = Object.getOwnPropertyDescriptor(obj, key);
  7210. if (property && property.configurable === false) {
  7211. return
  7212. }
  7213. // cater for pre-defined getter/setters
  7214. var getter = property && property.get;
  7215. var setter = property && property.set;
  7216. if ((!getter || setter) && arguments.length === 2) {
  7217. val = obj[key];
  7218. }
  7219. var childOb = !shallow && observe(val);
  7220. Object.defineProperty(obj, key, {
  7221. enumerable: true,
  7222. configurable: true,
  7223. get: function reactiveGetter () {
  7224. var value = getter ? getter.call(obj) : val;
  7225. if (Dep.SharedObject.target) { // fixed by xxxxxx
  7226. dep.depend();
  7227. if (childOb) {
  7228. childOb.dep.depend();
  7229. if (Array.isArray(value)) {
  7230. dependArray(value);
  7231. }
  7232. }
  7233. }
  7234. return value
  7235. },
  7236. set: function reactiveSetter (newVal) {
  7237. var value = getter ? getter.call(obj) : val;
  7238. /* eslint-disable no-self-compare */
  7239. if (newVal === value || (newVal !== newVal && value !== value)) {
  7240. return
  7241. }
  7242. /* eslint-enable no-self-compare */
  7243. if ( true && customSetter) {
  7244. customSetter();
  7245. }
  7246. // #7981: for accessor properties without setter
  7247. if (getter && !setter) { return }
  7248. if (setter) {
  7249. setter.call(obj, newVal);
  7250. } else {
  7251. val = newVal;
  7252. }
  7253. childOb = !shallow && observe(newVal);
  7254. dep.notify();
  7255. }
  7256. });
  7257. }
  7258. /**
  7259. * Set a property on an object. Adds the new property and
  7260. * triggers change notification if the property doesn't
  7261. * already exist.
  7262. */
  7263. function set (target, key, val) {
  7264. if ( true &&
  7265. (isUndef(target) || isPrimitive(target))
  7266. ) {
  7267. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  7268. }
  7269. if (Array.isArray(target) && isValidArrayIndex(key)) {
  7270. target.length = Math.max(target.length, key);
  7271. target.splice(key, 1, val);
  7272. return val
  7273. }
  7274. if (key in target && !(key in Object.prototype)) {
  7275. target[key] = val;
  7276. return val
  7277. }
  7278. var ob = (target).__ob__;
  7279. if (target._isVue || (ob && ob.vmCount)) {
  7280. true && warn(
  7281. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  7282. 'at runtime - declare it upfront in the data option.'
  7283. );
  7284. return val
  7285. }
  7286. if (!ob) {
  7287. target[key] = val;
  7288. return val
  7289. }
  7290. defineReactive$$1(ob.value, key, val);
  7291. ob.dep.notify();
  7292. return val
  7293. }
  7294. /**
  7295. * Delete a property and trigger change if necessary.
  7296. */
  7297. function del (target, key) {
  7298. if ( true &&
  7299. (isUndef(target) || isPrimitive(target))
  7300. ) {
  7301. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  7302. }
  7303. if (Array.isArray(target) && isValidArrayIndex(key)) {
  7304. target.splice(key, 1);
  7305. return
  7306. }
  7307. var ob = (target).__ob__;
  7308. if (target._isVue || (ob && ob.vmCount)) {
  7309. true && warn(
  7310. 'Avoid deleting properties on a Vue instance or its root $data ' +
  7311. '- just set it to null.'
  7312. );
  7313. return
  7314. }
  7315. if (!hasOwn(target, key)) {
  7316. return
  7317. }
  7318. delete target[key];
  7319. if (!ob) {
  7320. return
  7321. }
  7322. ob.dep.notify();
  7323. }
  7324. /**
  7325. * Collect dependencies on array elements when the array is touched, since
  7326. * we cannot intercept array element access like property getters.
  7327. */
  7328. function dependArray (value) {
  7329. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  7330. e = value[i];
  7331. e && e.__ob__ && e.__ob__.dep.depend();
  7332. if (Array.isArray(e)) {
  7333. dependArray(e);
  7334. }
  7335. }
  7336. }
  7337. /* */
  7338. /**
  7339. * Option overwriting strategies are functions that handle
  7340. * how to merge a parent option value and a child option
  7341. * value into the final value.
  7342. */
  7343. var strats = config.optionMergeStrategies;
  7344. /**
  7345. * Options with restrictions
  7346. */
  7347. if (true) {
  7348. strats.el = strats.propsData = function (parent, child, vm, key) {
  7349. if (!vm) {
  7350. warn(
  7351. "option \"" + key + "\" can only be used during instance " +
  7352. 'creation with the `new` keyword.'
  7353. );
  7354. }
  7355. return defaultStrat(parent, child)
  7356. };
  7357. }
  7358. /**
  7359. * Helper that recursively merges two data objects together.
  7360. */
  7361. function mergeData (to, from) {
  7362. if (!from) { return to }
  7363. var key, toVal, fromVal;
  7364. var keys = hasSymbol
  7365. ? Reflect.ownKeys(from)
  7366. : Object.keys(from);
  7367. for (var i = 0; i < keys.length; i++) {
  7368. key = keys[i];
  7369. // in case the object is already observed...
  7370. if (key === '__ob__') { continue }
  7371. toVal = to[key];
  7372. fromVal = from[key];
  7373. if (!hasOwn(to, key)) {
  7374. set(to, key, fromVal);
  7375. } else if (
  7376. toVal !== fromVal &&
  7377. isPlainObject(toVal) &&
  7378. isPlainObject(fromVal)
  7379. ) {
  7380. mergeData(toVal, fromVal);
  7381. }
  7382. }
  7383. return to
  7384. }
  7385. /**
  7386. * Data
  7387. */
  7388. function mergeDataOrFn (
  7389. parentVal,
  7390. childVal,
  7391. vm
  7392. ) {
  7393. if (!vm) {
  7394. // in a Vue.extend merge, both should be functions
  7395. if (!childVal) {
  7396. return parentVal
  7397. }
  7398. if (!parentVal) {
  7399. return childVal
  7400. }
  7401. // when parentVal & childVal are both present,
  7402. // we need to return a function that returns the
  7403. // merged result of both functions... no need to
  7404. // check if parentVal is a function here because
  7405. // it has to be a function to pass previous merges.
  7406. return function mergedDataFn () {
  7407. return mergeData(
  7408. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  7409. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  7410. )
  7411. }
  7412. } else {
  7413. return function mergedInstanceDataFn () {
  7414. // instance merge
  7415. var instanceData = typeof childVal === 'function'
  7416. ? childVal.call(vm, vm)
  7417. : childVal;
  7418. var defaultData = typeof parentVal === 'function'
  7419. ? parentVal.call(vm, vm)
  7420. : parentVal;
  7421. if (instanceData) {
  7422. return mergeData(instanceData, defaultData)
  7423. } else {
  7424. return defaultData
  7425. }
  7426. }
  7427. }
  7428. }
  7429. strats.data = function (
  7430. parentVal,
  7431. childVal,
  7432. vm
  7433. ) {
  7434. if (!vm) {
  7435. if (childVal && typeof childVal !== 'function') {
  7436. true && warn(
  7437. 'The "data" option should be a function ' +
  7438. 'that returns a per-instance value in component ' +
  7439. 'definitions.',
  7440. vm
  7441. );
  7442. return parentVal
  7443. }
  7444. return mergeDataOrFn(parentVal, childVal)
  7445. }
  7446. return mergeDataOrFn(parentVal, childVal, vm)
  7447. };
  7448. /**
  7449. * Hooks and props are merged as arrays.
  7450. */
  7451. function mergeHook (
  7452. parentVal,
  7453. childVal
  7454. ) {
  7455. var res = childVal
  7456. ? parentVal
  7457. ? parentVal.concat(childVal)
  7458. : Array.isArray(childVal)
  7459. ? childVal
  7460. : [childVal]
  7461. : parentVal;
  7462. return res
  7463. ? dedupeHooks(res)
  7464. : res
  7465. }
  7466. function dedupeHooks (hooks) {
  7467. var res = [];
  7468. for (var i = 0; i < hooks.length; i++) {
  7469. if (res.indexOf(hooks[i]) === -1) {
  7470. res.push(hooks[i]);
  7471. }
  7472. }
  7473. return res
  7474. }
  7475. LIFECYCLE_HOOKS.forEach(function (hook) {
  7476. strats[hook] = mergeHook;
  7477. });
  7478. /**
  7479. * Assets
  7480. *
  7481. * When a vm is present (instance creation), we need to do
  7482. * a three-way merge between constructor options, instance
  7483. * options and parent options.
  7484. */
  7485. function mergeAssets (
  7486. parentVal,
  7487. childVal,
  7488. vm,
  7489. key
  7490. ) {
  7491. var res = Object.create(parentVal || null);
  7492. if (childVal) {
  7493. true && assertObjectType(key, childVal, vm);
  7494. return extend(res, childVal)
  7495. } else {
  7496. return res
  7497. }
  7498. }
  7499. ASSET_TYPES.forEach(function (type) {
  7500. strats[type + 's'] = mergeAssets;
  7501. });
  7502. /**
  7503. * Watchers.
  7504. *
  7505. * Watchers hashes should not overwrite one
  7506. * another, so we merge them as arrays.
  7507. */
  7508. strats.watch = function (
  7509. parentVal,
  7510. childVal,
  7511. vm,
  7512. key
  7513. ) {
  7514. // work around Firefox's Object.prototype.watch...
  7515. if (parentVal === nativeWatch) { parentVal = undefined; }
  7516. if (childVal === nativeWatch) { childVal = undefined; }
  7517. /* istanbul ignore if */
  7518. if (!childVal) { return Object.create(parentVal || null) }
  7519. if (true) {
  7520. assertObjectType(key, childVal, vm);
  7521. }
  7522. if (!parentVal) { return childVal }
  7523. var ret = {};
  7524. extend(ret, parentVal);
  7525. for (var key$1 in childVal) {
  7526. var parent = ret[key$1];
  7527. var child = childVal[key$1];
  7528. if (parent && !Array.isArray(parent)) {
  7529. parent = [parent];
  7530. }
  7531. ret[key$1] = parent
  7532. ? parent.concat(child)
  7533. : Array.isArray(child) ? child : [child];
  7534. }
  7535. return ret
  7536. };
  7537. /**
  7538. * Other object hashes.
  7539. */
  7540. strats.props =
  7541. strats.methods =
  7542. strats.inject =
  7543. strats.computed = function (
  7544. parentVal,
  7545. childVal,
  7546. vm,
  7547. key
  7548. ) {
  7549. if (childVal && "development" !== 'production') {
  7550. assertObjectType(key, childVal, vm);
  7551. }
  7552. if (!parentVal) { return childVal }
  7553. var ret = Object.create(null);
  7554. extend(ret, parentVal);
  7555. if (childVal) { extend(ret, childVal); }
  7556. return ret
  7557. };
  7558. strats.provide = mergeDataOrFn;
  7559. /**
  7560. * Default strategy.
  7561. */
  7562. var defaultStrat = function (parentVal, childVal) {
  7563. return childVal === undefined
  7564. ? parentVal
  7565. : childVal
  7566. };
  7567. /**
  7568. * Validate component names
  7569. */
  7570. function checkComponents (options) {
  7571. for (var key in options.components) {
  7572. validateComponentName(key);
  7573. }
  7574. }
  7575. function validateComponentName (name) {
  7576. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  7577. warn(
  7578. 'Invalid component name: "' + name + '". Component names ' +
  7579. 'should conform to valid custom element name in html5 specification.'
  7580. );
  7581. }
  7582. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  7583. warn(
  7584. 'Do not use built-in or reserved HTML elements as component ' +
  7585. 'id: ' + name
  7586. );
  7587. }
  7588. }
  7589. /**
  7590. * Ensure all props option syntax are normalized into the
  7591. * Object-based format.
  7592. */
  7593. function normalizeProps (options, vm) {
  7594. var props = options.props;
  7595. if (!props) { return }
  7596. var res = {};
  7597. var i, val, name;
  7598. if (Array.isArray(props)) {
  7599. i = props.length;
  7600. while (i--) {
  7601. val = props[i];
  7602. if (typeof val === 'string') {
  7603. name = camelize(val);
  7604. res[name] = { type: null };
  7605. } else if (true) {
  7606. warn('props must be strings when using array syntax.');
  7607. }
  7608. }
  7609. } else if (isPlainObject(props)) {
  7610. for (var key in props) {
  7611. val = props[key];
  7612. name = camelize(key);
  7613. res[name] = isPlainObject(val)
  7614. ? val
  7615. : { type: val };
  7616. }
  7617. } else if (true) {
  7618. warn(
  7619. "Invalid value for option \"props\": expected an Array or an Object, " +
  7620. "but got " + (toRawType(props)) + ".",
  7621. vm
  7622. );
  7623. }
  7624. options.props = res;
  7625. }
  7626. /**
  7627. * Normalize all injections into Object-based format
  7628. */
  7629. function normalizeInject (options, vm) {
  7630. var inject = options.inject;
  7631. if (!inject) { return }
  7632. var normalized = options.inject = {};
  7633. if (Array.isArray(inject)) {
  7634. for (var i = 0; i < inject.length; i++) {
  7635. normalized[inject[i]] = { from: inject[i] };
  7636. }
  7637. } else if (isPlainObject(inject)) {
  7638. for (var key in inject) {
  7639. var val = inject[key];
  7640. normalized[key] = isPlainObject(val)
  7641. ? extend({ from: key }, val)
  7642. : { from: val };
  7643. }
  7644. } else if (true) {
  7645. warn(
  7646. "Invalid value for option \"inject\": expected an Array or an Object, " +
  7647. "but got " + (toRawType(inject)) + ".",
  7648. vm
  7649. );
  7650. }
  7651. }
  7652. /**
  7653. * Normalize raw function directives into object format.
  7654. */
  7655. function normalizeDirectives (options) {
  7656. var dirs = options.directives;
  7657. if (dirs) {
  7658. for (var key in dirs) {
  7659. var def$$1 = dirs[key];
  7660. if (typeof def$$1 === 'function') {
  7661. dirs[key] = { bind: def$$1, update: def$$1 };
  7662. }
  7663. }
  7664. }
  7665. }
  7666. function assertObjectType (name, value, vm) {
  7667. if (!isPlainObject(value)) {
  7668. warn(
  7669. "Invalid value for option \"" + name + "\": expected an Object, " +
  7670. "but got " + (toRawType(value)) + ".",
  7671. vm
  7672. );
  7673. }
  7674. }
  7675. /**
  7676. * Merge two option objects into a new one.
  7677. * Core utility used in both instantiation and inheritance.
  7678. */
  7679. function mergeOptions (
  7680. parent,
  7681. child,
  7682. vm
  7683. ) {
  7684. if (true) {
  7685. checkComponents(child);
  7686. }
  7687. if (typeof child === 'function') {
  7688. child = child.options;
  7689. }
  7690. normalizeProps(child, vm);
  7691. normalizeInject(child, vm);
  7692. normalizeDirectives(child);
  7693. // Apply extends and mixins on the child options,
  7694. // but only if it is a raw options object that isn't
  7695. // the result of another mergeOptions call.
  7696. // Only merged options has the _base property.
  7697. if (!child._base) {
  7698. if (child.extends) {
  7699. parent = mergeOptions(parent, child.extends, vm);
  7700. }
  7701. if (child.mixins) {
  7702. for (var i = 0, l = child.mixins.length; i < l; i++) {
  7703. parent = mergeOptions(parent, child.mixins[i], vm);
  7704. }
  7705. }
  7706. }
  7707. var options = {};
  7708. var key;
  7709. for (key in parent) {
  7710. mergeField(key);
  7711. }
  7712. for (key in child) {
  7713. if (!hasOwn(parent, key)) {
  7714. mergeField(key);
  7715. }
  7716. }
  7717. function mergeField (key) {
  7718. var strat = strats[key] || defaultStrat;
  7719. options[key] = strat(parent[key], child[key], vm, key);
  7720. }
  7721. return options
  7722. }
  7723. /**
  7724. * Resolve an asset.
  7725. * This function is used because child instances need access
  7726. * to assets defined in its ancestor chain.
  7727. */
  7728. function resolveAsset (
  7729. options,
  7730. type,
  7731. id,
  7732. warnMissing
  7733. ) {
  7734. /* istanbul ignore if */
  7735. if (typeof id !== 'string') {
  7736. return
  7737. }
  7738. var assets = options[type];
  7739. // check local registration variations first
  7740. if (hasOwn(assets, id)) { return assets[id] }
  7741. var camelizedId = camelize(id);
  7742. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  7743. var PascalCaseId = capitalize(camelizedId);
  7744. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  7745. // fallback to prototype chain
  7746. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  7747. if ( true && warnMissing && !res) {
  7748. warn(
  7749. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  7750. options
  7751. );
  7752. }
  7753. return res
  7754. }
  7755. /* */
  7756. function validateProp (
  7757. key,
  7758. propOptions,
  7759. propsData,
  7760. vm
  7761. ) {
  7762. var prop = propOptions[key];
  7763. var absent = !hasOwn(propsData, key);
  7764. var value = propsData[key];
  7765. // boolean casting
  7766. var booleanIndex = getTypeIndex(Boolean, prop.type);
  7767. if (booleanIndex > -1) {
  7768. if (absent && !hasOwn(prop, 'default')) {
  7769. value = false;
  7770. } else if (value === '' || value === hyphenate(key)) {
  7771. // only cast empty string / same name to boolean if
  7772. // boolean has higher priority
  7773. var stringIndex = getTypeIndex(String, prop.type);
  7774. if (stringIndex < 0 || booleanIndex < stringIndex) {
  7775. value = true;
  7776. }
  7777. }
  7778. }
  7779. // check default value
  7780. if (value === undefined) {
  7781. value = getPropDefaultValue(vm, prop, key);
  7782. // since the default value is a fresh copy,
  7783. // make sure to observe it.
  7784. var prevShouldObserve = shouldObserve;
  7785. toggleObserving(true);
  7786. observe(value);
  7787. toggleObserving(prevShouldObserve);
  7788. }
  7789. if (
  7790. true
  7791. ) {
  7792. assertProp(prop, key, value, vm, absent);
  7793. }
  7794. return value
  7795. }
  7796. /**
  7797. * Get the default value of a prop.
  7798. */
  7799. function getPropDefaultValue (vm, prop, key) {
  7800. // no default, return undefined
  7801. if (!hasOwn(prop, 'default')) {
  7802. return undefined
  7803. }
  7804. var def = prop.default;
  7805. // warn against non-factory defaults for Object & Array
  7806. if ( true && isObject(def)) {
  7807. warn(
  7808. 'Invalid default value for prop "' + key + '": ' +
  7809. 'Props with type Object/Array must use a factory function ' +
  7810. 'to return the default value.',
  7811. vm
  7812. );
  7813. }
  7814. // the raw prop value was also undefined from previous render,
  7815. // return previous default value to avoid unnecessary watcher trigger
  7816. if (vm && vm.$options.propsData &&
  7817. vm.$options.propsData[key] === undefined &&
  7818. vm._props[key] !== undefined
  7819. ) {
  7820. return vm._props[key]
  7821. }
  7822. // call factory function for non-Function types
  7823. // a value is Function if its prototype is function even across different execution context
  7824. return typeof def === 'function' && getType(prop.type) !== 'Function'
  7825. ? def.call(vm)
  7826. : def
  7827. }
  7828. /**
  7829. * Assert whether a prop is valid.
  7830. */
  7831. function assertProp (
  7832. prop,
  7833. name,
  7834. value,
  7835. vm,
  7836. absent
  7837. ) {
  7838. if (prop.required && absent) {
  7839. warn(
  7840. 'Missing required prop: "' + name + '"',
  7841. vm
  7842. );
  7843. return
  7844. }
  7845. if (value == null && !prop.required) {
  7846. return
  7847. }
  7848. var type = prop.type;
  7849. var valid = !type || type === true;
  7850. var expectedTypes = [];
  7851. if (type) {
  7852. if (!Array.isArray(type)) {
  7853. type = [type];
  7854. }
  7855. for (var i = 0; i < type.length && !valid; i++) {
  7856. var assertedType = assertType(value, type[i]);
  7857. expectedTypes.push(assertedType.expectedType || '');
  7858. valid = assertedType.valid;
  7859. }
  7860. }
  7861. if (!valid) {
  7862. warn(
  7863. getInvalidTypeMessage(name, value, expectedTypes),
  7864. vm
  7865. );
  7866. return
  7867. }
  7868. var validator = prop.validator;
  7869. if (validator) {
  7870. if (!validator(value)) {
  7871. warn(
  7872. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  7873. vm
  7874. );
  7875. }
  7876. }
  7877. }
  7878. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  7879. function assertType (value, type) {
  7880. var valid;
  7881. var expectedType = getType(type);
  7882. if (simpleCheckRE.test(expectedType)) {
  7883. var t = typeof value;
  7884. valid = t === expectedType.toLowerCase();
  7885. // for primitive wrapper objects
  7886. if (!valid && t === 'object') {
  7887. valid = value instanceof type;
  7888. }
  7889. } else if (expectedType === 'Object') {
  7890. valid = isPlainObject(value);
  7891. } else if (expectedType === 'Array') {
  7892. valid = Array.isArray(value);
  7893. } else {
  7894. valid = value instanceof type;
  7895. }
  7896. return {
  7897. valid: valid,
  7898. expectedType: expectedType
  7899. }
  7900. }
  7901. /**
  7902. * Use function string name to check built-in types,
  7903. * because a simple equality check will fail when running
  7904. * across different vms / iframes.
  7905. */
  7906. function getType (fn) {
  7907. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  7908. return match ? match[1] : ''
  7909. }
  7910. function isSameType (a, b) {
  7911. return getType(a) === getType(b)
  7912. }
  7913. function getTypeIndex (type, expectedTypes) {
  7914. if (!Array.isArray(expectedTypes)) {
  7915. return isSameType(expectedTypes, type) ? 0 : -1
  7916. }
  7917. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  7918. if (isSameType(expectedTypes[i], type)) {
  7919. return i
  7920. }
  7921. }
  7922. return -1
  7923. }
  7924. function getInvalidTypeMessage (name, value, expectedTypes) {
  7925. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  7926. " Expected " + (expectedTypes.map(capitalize).join(', '));
  7927. var expectedType = expectedTypes[0];
  7928. var receivedType = toRawType(value);
  7929. var expectedValue = styleValue(value, expectedType);
  7930. var receivedValue = styleValue(value, receivedType);
  7931. // check if we need to specify expected value
  7932. if (expectedTypes.length === 1 &&
  7933. isExplicable(expectedType) &&
  7934. !isBoolean(expectedType, receivedType)) {
  7935. message += " with value " + expectedValue;
  7936. }
  7937. message += ", got " + receivedType + " ";
  7938. // check if we need to specify received value
  7939. if (isExplicable(receivedType)) {
  7940. message += "with value " + receivedValue + ".";
  7941. }
  7942. return message
  7943. }
  7944. function styleValue (value, type) {
  7945. if (type === 'String') {
  7946. return ("\"" + value + "\"")
  7947. } else if (type === 'Number') {
  7948. return ("" + (Number(value)))
  7949. } else {
  7950. return ("" + value)
  7951. }
  7952. }
  7953. function isExplicable (value) {
  7954. var explicitTypes = ['string', 'number', 'boolean'];
  7955. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  7956. }
  7957. function isBoolean () {
  7958. var args = [], len = arguments.length;
  7959. while ( len-- ) args[ len ] = arguments[ len ];
  7960. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  7961. }
  7962. /* */
  7963. function handleError (err, vm, info) {
  7964. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  7965. // See: https://github.com/vuejs/vuex/issues/1505
  7966. pushTarget();
  7967. try {
  7968. if (vm) {
  7969. var cur = vm;
  7970. while ((cur = cur.$parent)) {
  7971. var hooks = cur.$options.errorCaptured;
  7972. if (hooks) {
  7973. for (var i = 0; i < hooks.length; i++) {
  7974. try {
  7975. var capture = hooks[i].call(cur, err, vm, info) === false;
  7976. if (capture) { return }
  7977. } catch (e) {
  7978. globalHandleError(e, cur, 'errorCaptured hook');
  7979. }
  7980. }
  7981. }
  7982. }
  7983. }
  7984. globalHandleError(err, vm, info);
  7985. } finally {
  7986. popTarget();
  7987. }
  7988. }
  7989. function invokeWithErrorHandling (
  7990. handler,
  7991. context,
  7992. args,
  7993. vm,
  7994. info
  7995. ) {
  7996. var res;
  7997. try {
  7998. res = args ? handler.apply(context, args) : handler.call(context);
  7999. if (res && !res._isVue && isPromise(res) && !res._handled) {
  8000. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  8001. // issue #9511
  8002. // avoid catch triggering multiple times when nested calls
  8003. res._handled = true;
  8004. }
  8005. } catch (e) {
  8006. handleError(e, vm, info);
  8007. }
  8008. return res
  8009. }
  8010. function globalHandleError (err, vm, info) {
  8011. if (config.errorHandler) {
  8012. try {
  8013. return config.errorHandler.call(null, err, vm, info)
  8014. } catch (e) {
  8015. // if the user intentionally throws the original error in the handler,
  8016. // do not log it twice
  8017. if (e !== err) {
  8018. logError(e, null, 'config.errorHandler');
  8019. }
  8020. }
  8021. }
  8022. logError(err, vm, info);
  8023. }
  8024. function logError (err, vm, info) {
  8025. if (true) {
  8026. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  8027. }
  8028. /* istanbul ignore else */
  8029. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  8030. console.error(err);
  8031. } else {
  8032. throw err
  8033. }
  8034. }
  8035. /* */
  8036. var callbacks = [];
  8037. var pending = false;
  8038. function flushCallbacks () {
  8039. pending = false;
  8040. var copies = callbacks.slice(0);
  8041. callbacks.length = 0;
  8042. for (var i = 0; i < copies.length; i++) {
  8043. copies[i]();
  8044. }
  8045. }
  8046. // Here we have async deferring wrappers using microtasks.
  8047. // In 2.5 we used (macro) tasks (in combination with microtasks).
  8048. // However, it has subtle problems when state is changed right before repaint
  8049. // (e.g. #6813, out-in transitions).
  8050. // Also, using (macro) tasks in event handler would cause some weird behaviors
  8051. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  8052. // So we now use microtasks everywhere, again.
  8053. // A major drawback of this tradeoff is that there are some scenarios
  8054. // where microtasks have too high a priority and fire in between supposedly
  8055. // sequential events (e.g. #4521, #6690, which have workarounds)
  8056. // or even between bubbling of the same event (#6566).
  8057. var timerFunc;
  8058. // The nextTick behavior leverages the microtask queue, which can be accessed
  8059. // via either native Promise.then or MutationObserver.
  8060. // MutationObserver has wider support, however it is seriously bugged in
  8061. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  8062. // completely stops working after triggering a few times... so, if native
  8063. // Promise is available, we will use it:
  8064. /* istanbul ignore next, $flow-disable-line */
  8065. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  8066. var p = Promise.resolve();
  8067. timerFunc = function () {
  8068. p.then(flushCallbacks);
  8069. // In problematic UIWebViews, Promise.then doesn't completely break, but
  8070. // it can get stuck in a weird state where callbacks are pushed into the
  8071. // microtask queue but the queue isn't being flushed, until the browser
  8072. // needs to do some other work, e.g. handle a timer. Therefore we can
  8073. // "force" the microtask queue to be flushed by adding an empty timer.
  8074. if (isIOS) { setTimeout(noop); }
  8075. };
  8076. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  8077. isNative(MutationObserver) ||
  8078. // PhantomJS and iOS 7.x
  8079. MutationObserver.toString() === '[object MutationObserverConstructor]'
  8080. )) {
  8081. // Use MutationObserver where native Promise is not available,
  8082. // e.g. PhantomJS, iOS7, Android 4.4
  8083. // (#6466 MutationObserver is unreliable in IE11)
  8084. var counter = 1;
  8085. var observer = new MutationObserver(flushCallbacks);
  8086. var textNode = document.createTextNode(String(counter));
  8087. observer.observe(textNode, {
  8088. characterData: true
  8089. });
  8090. timerFunc = function () {
  8091. counter = (counter + 1) % 2;
  8092. textNode.data = String(counter);
  8093. };
  8094. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  8095. // Fallback to setImmediate.
  8096. // Technically it leverages the (macro) task queue,
  8097. // but it is still a better choice than setTimeout.
  8098. timerFunc = function () {
  8099. setImmediate(flushCallbacks);
  8100. };
  8101. } else {
  8102. // Fallback to setTimeout.
  8103. timerFunc = function () {
  8104. setTimeout(flushCallbacks, 0);
  8105. };
  8106. }
  8107. function nextTick (cb, ctx) {
  8108. var _resolve;
  8109. callbacks.push(function () {
  8110. if (cb) {
  8111. try {
  8112. cb.call(ctx);
  8113. } catch (e) {
  8114. handleError(e, ctx, 'nextTick');
  8115. }
  8116. } else if (_resolve) {
  8117. _resolve(ctx);
  8118. }
  8119. });
  8120. if (!pending) {
  8121. pending = true;
  8122. timerFunc();
  8123. }
  8124. // $flow-disable-line
  8125. if (!cb && typeof Promise !== 'undefined') {
  8126. return new Promise(function (resolve) {
  8127. _resolve = resolve;
  8128. })
  8129. }
  8130. }
  8131. /* */
  8132. /* not type checking this file because flow doesn't play well with Proxy */
  8133. var initProxy;
  8134. if (true) {
  8135. var allowedGlobals = makeMap(
  8136. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  8137. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  8138. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  8139. 'require' // for Webpack/Browserify
  8140. );
  8141. var warnNonPresent = function (target, key) {
  8142. warn(
  8143. "Property or method \"" + key + "\" is not defined on the instance but " +
  8144. 'referenced during render. Make sure that this property is reactive, ' +
  8145. 'either in the data option, or for class-based components, by ' +
  8146. 'initializing the property. ' +
  8147. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  8148. target
  8149. );
  8150. };
  8151. var warnReservedPrefix = function (target, key) {
  8152. warn(
  8153. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  8154. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  8155. 'prevent conflicts with Vue internals. ' +
  8156. 'See: https://vuejs.org/v2/api/#data',
  8157. target
  8158. );
  8159. };
  8160. var hasProxy =
  8161. typeof Proxy !== 'undefined' && isNative(Proxy);
  8162. if (hasProxy) {
  8163. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  8164. config.keyCodes = new Proxy(config.keyCodes, {
  8165. set: function set (target, key, value) {
  8166. if (isBuiltInModifier(key)) {
  8167. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  8168. return false
  8169. } else {
  8170. target[key] = value;
  8171. return true
  8172. }
  8173. }
  8174. });
  8175. }
  8176. var hasHandler = {
  8177. has: function has (target, key) {
  8178. var has = key in target;
  8179. var isAllowed = allowedGlobals(key) ||
  8180. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  8181. if (!has && !isAllowed) {
  8182. if (key in target.$data) { warnReservedPrefix(target, key); }
  8183. else { warnNonPresent(target, key); }
  8184. }
  8185. return has || !isAllowed
  8186. }
  8187. };
  8188. var getHandler = {
  8189. get: function get (target, key) {
  8190. if (typeof key === 'string' && !(key in target)) {
  8191. if (key in target.$data) { warnReservedPrefix(target, key); }
  8192. else { warnNonPresent(target, key); }
  8193. }
  8194. return target[key]
  8195. }
  8196. };
  8197. initProxy = function initProxy (vm) {
  8198. if (hasProxy) {
  8199. // determine which proxy handler to use
  8200. var options = vm.$options;
  8201. var handlers = options.render && options.render._withStripped
  8202. ? getHandler
  8203. : hasHandler;
  8204. vm._renderProxy = new Proxy(vm, handlers);
  8205. } else {
  8206. vm._renderProxy = vm;
  8207. }
  8208. };
  8209. }
  8210. /* */
  8211. var seenObjects = new _Set();
  8212. /**
  8213. * Recursively traverse an object to evoke all converted
  8214. * getters, so that every nested property inside the object
  8215. * is collected as a "deep" dependency.
  8216. */
  8217. function traverse (val) {
  8218. _traverse(val, seenObjects);
  8219. seenObjects.clear();
  8220. }
  8221. function _traverse (val, seen) {
  8222. var i, keys;
  8223. var isA = Array.isArray(val);
  8224. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  8225. return
  8226. }
  8227. if (val.__ob__) {
  8228. var depId = val.__ob__.dep.id;
  8229. if (seen.has(depId)) {
  8230. return
  8231. }
  8232. seen.add(depId);
  8233. }
  8234. if (isA) {
  8235. i = val.length;
  8236. while (i--) { _traverse(val[i], seen); }
  8237. } else {
  8238. keys = Object.keys(val);
  8239. i = keys.length;
  8240. while (i--) { _traverse(val[keys[i]], seen); }
  8241. }
  8242. }
  8243. var mark;
  8244. var measure;
  8245. if (true) {
  8246. var perf = inBrowser && window.performance;
  8247. /* istanbul ignore if */
  8248. if (
  8249. perf &&
  8250. perf.mark &&
  8251. perf.measure &&
  8252. perf.clearMarks &&
  8253. perf.clearMeasures
  8254. ) {
  8255. mark = function (tag) { return perf.mark(tag); };
  8256. measure = function (name, startTag, endTag) {
  8257. perf.measure(name, startTag, endTag);
  8258. perf.clearMarks(startTag);
  8259. perf.clearMarks(endTag);
  8260. // perf.clearMeasures(name)
  8261. };
  8262. }
  8263. }
  8264. /* */
  8265. var normalizeEvent = cached(function (name) {
  8266. var passive = name.charAt(0) === '&';
  8267. name = passive ? name.slice(1) : name;
  8268. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  8269. name = once$$1 ? name.slice(1) : name;
  8270. var capture = name.charAt(0) === '!';
  8271. name = capture ? name.slice(1) : name;
  8272. return {
  8273. name: name,
  8274. once: once$$1,
  8275. capture: capture,
  8276. passive: passive
  8277. }
  8278. });
  8279. function createFnInvoker (fns, vm) {
  8280. function invoker () {
  8281. var arguments$1 = arguments;
  8282. var fns = invoker.fns;
  8283. if (Array.isArray(fns)) {
  8284. var cloned = fns.slice();
  8285. for (var i = 0; i < cloned.length; i++) {
  8286. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  8287. }
  8288. } else {
  8289. // return handler return value for single handlers
  8290. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  8291. }
  8292. }
  8293. invoker.fns = fns;
  8294. return invoker
  8295. }
  8296. function updateListeners (
  8297. on,
  8298. oldOn,
  8299. add,
  8300. remove$$1,
  8301. createOnceHandler,
  8302. vm
  8303. ) {
  8304. var name, def$$1, cur, old, event;
  8305. for (name in on) {
  8306. def$$1 = cur = on[name];
  8307. old = oldOn[name];
  8308. event = normalizeEvent(name);
  8309. if (isUndef(cur)) {
  8310. true && warn(
  8311. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  8312. vm
  8313. );
  8314. } else if (isUndef(old)) {
  8315. if (isUndef(cur.fns)) {
  8316. cur = on[name] = createFnInvoker(cur, vm);
  8317. }
  8318. if (isTrue(event.once)) {
  8319. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  8320. }
  8321. add(event.name, cur, event.capture, event.passive, event.params);
  8322. } else if (cur !== old) {
  8323. old.fns = cur;
  8324. on[name] = old;
  8325. }
  8326. }
  8327. for (name in oldOn) {
  8328. if (isUndef(on[name])) {
  8329. event = normalizeEvent(name);
  8330. remove$$1(event.name, oldOn[name], event.capture);
  8331. }
  8332. }
  8333. }
  8334. /* */
  8335. /* */
  8336. // fixed by xxxxxx (mp properties)
  8337. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  8338. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  8339. if (isUndef(propOptions)) {
  8340. return res
  8341. }
  8342. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  8343. var attrs = data.attrs;
  8344. var props = data.props;
  8345. if (isDef(attrs) || isDef(props)) {
  8346. for (var key in propOptions) {
  8347. var altKey = hyphenate(key);
  8348. var result = checkProp(res, props, key, altKey, true) ||
  8349. checkProp(res, attrs, key, altKey, false);
  8350. // externalClass
  8351. if (
  8352. result &&
  8353. res[key] &&
  8354. externalClasses.indexOf(altKey) !== -1 &&
  8355. context[camelize(res[key])]
  8356. ) {
  8357. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  8358. res[key] = context[camelize(res[key])];
  8359. }
  8360. }
  8361. }
  8362. return res
  8363. }
  8364. function extractPropsFromVNodeData (
  8365. data,
  8366. Ctor,
  8367. tag,
  8368. context// fixed by xxxxxx
  8369. ) {
  8370. // we are only extracting raw values here.
  8371. // validation and default values are handled in the child
  8372. // component itself.
  8373. var propOptions = Ctor.options.props;
  8374. if (isUndef(propOptions)) {
  8375. // fixed by xxxxxx
  8376. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  8377. }
  8378. var res = {};
  8379. var attrs = data.attrs;
  8380. var props = data.props;
  8381. if (isDef(attrs) || isDef(props)) {
  8382. for (var key in propOptions) {
  8383. var altKey = hyphenate(key);
  8384. if (true) {
  8385. var keyInLowerCase = key.toLowerCase();
  8386. if (
  8387. key !== keyInLowerCase &&
  8388. attrs && hasOwn(attrs, keyInLowerCase)
  8389. ) {
  8390. tip(
  8391. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  8392. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  8393. " \"" + key + "\". " +
  8394. "Note that HTML attributes are case-insensitive and camelCased " +
  8395. "props need to use their kebab-case equivalents when using in-DOM " +
  8396. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  8397. );
  8398. }
  8399. }
  8400. checkProp(res, props, key, altKey, true) ||
  8401. checkProp(res, attrs, key, altKey, false);
  8402. }
  8403. }
  8404. // fixed by xxxxxx
  8405. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  8406. }
  8407. function checkProp (
  8408. res,
  8409. hash,
  8410. key,
  8411. altKey,
  8412. preserve
  8413. ) {
  8414. if (isDef(hash)) {
  8415. if (hasOwn(hash, key)) {
  8416. res[key] = hash[key];
  8417. if (!preserve) {
  8418. delete hash[key];
  8419. }
  8420. return true
  8421. } else if (hasOwn(hash, altKey)) {
  8422. res[key] = hash[altKey];
  8423. if (!preserve) {
  8424. delete hash[altKey];
  8425. }
  8426. return true
  8427. }
  8428. }
  8429. return false
  8430. }
  8431. /* */
  8432. // The template compiler attempts to minimize the need for normalization by
  8433. // statically analyzing the template at compile time.
  8434. //
  8435. // For plain HTML markup, normalization can be completely skipped because the
  8436. // generated render function is guaranteed to return Array<VNode>. There are
  8437. // two cases where extra normalization is needed:
  8438. // 1. When the children contains components - because a functional component
  8439. // may return an Array instead of a single root. In this case, just a simple
  8440. // normalization is needed - if any child is an Array, we flatten the whole
  8441. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  8442. // because functional components already normalize their own children.
  8443. function simpleNormalizeChildren (children) {
  8444. for (var i = 0; i < children.length; i++) {
  8445. if (Array.isArray(children[i])) {
  8446. return Array.prototype.concat.apply([], children)
  8447. }
  8448. }
  8449. return children
  8450. }
  8451. // 2. When the children contains constructs that always generated nested Arrays,
  8452. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  8453. // with hand-written render functions / JSX. In such cases a full normalization
  8454. // is needed to cater to all possible types of children values.
  8455. function normalizeChildren (children) {
  8456. return isPrimitive(children)
  8457. ? [createTextVNode(children)]
  8458. : Array.isArray(children)
  8459. ? normalizeArrayChildren(children)
  8460. : undefined
  8461. }
  8462. function isTextNode (node) {
  8463. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  8464. }
  8465. function normalizeArrayChildren (children, nestedIndex) {
  8466. var res = [];
  8467. var i, c, lastIndex, last;
  8468. for (i = 0; i < children.length; i++) {
  8469. c = children[i];
  8470. if (isUndef(c) || typeof c === 'boolean') { continue }
  8471. lastIndex = res.length - 1;
  8472. last = res[lastIndex];
  8473. // nested
  8474. if (Array.isArray(c)) {
  8475. if (c.length > 0) {
  8476. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  8477. // merge adjacent text nodes
  8478. if (isTextNode(c[0]) && isTextNode(last)) {
  8479. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  8480. c.shift();
  8481. }
  8482. res.push.apply(res, c);
  8483. }
  8484. } else if (isPrimitive(c)) {
  8485. if (isTextNode(last)) {
  8486. // merge adjacent text nodes
  8487. // this is necessary for SSR hydration because text nodes are
  8488. // essentially merged when rendered to HTML strings
  8489. res[lastIndex] = createTextVNode(last.text + c);
  8490. } else if (c !== '') {
  8491. // convert primitive to vnode
  8492. res.push(createTextVNode(c));
  8493. }
  8494. } else {
  8495. if (isTextNode(c) && isTextNode(last)) {
  8496. // merge adjacent text nodes
  8497. res[lastIndex] = createTextVNode(last.text + c.text);
  8498. } else {
  8499. // default key for nested array children (likely generated by v-for)
  8500. if (isTrue(children._isVList) &&
  8501. isDef(c.tag) &&
  8502. isUndef(c.key) &&
  8503. isDef(nestedIndex)) {
  8504. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  8505. }
  8506. res.push(c);
  8507. }
  8508. }
  8509. }
  8510. return res
  8511. }
  8512. /* */
  8513. function initProvide (vm) {
  8514. var provide = vm.$options.provide;
  8515. if (provide) {
  8516. vm._provided = typeof provide === 'function'
  8517. ? provide.call(vm)
  8518. : provide;
  8519. }
  8520. }
  8521. function initInjections (vm) {
  8522. var result = resolveInject(vm.$options.inject, vm);
  8523. if (result) {
  8524. toggleObserving(false);
  8525. Object.keys(result).forEach(function (key) {
  8526. /* istanbul ignore else */
  8527. if (true) {
  8528. defineReactive$$1(vm, key, result[key], function () {
  8529. warn(
  8530. "Avoid mutating an injected value directly since the changes will be " +
  8531. "overwritten whenever the provided component re-renders. " +
  8532. "injection being mutated: \"" + key + "\"",
  8533. vm
  8534. );
  8535. });
  8536. } else {}
  8537. });
  8538. toggleObserving(true);
  8539. }
  8540. }
  8541. function resolveInject (inject, vm) {
  8542. if (inject) {
  8543. // inject is :any because flow is not smart enough to figure out cached
  8544. var result = Object.create(null);
  8545. var keys = hasSymbol
  8546. ? Reflect.ownKeys(inject)
  8547. : Object.keys(inject);
  8548. for (var i = 0; i < keys.length; i++) {
  8549. var key = keys[i];
  8550. // #6574 in case the inject object is observed...
  8551. if (key === '__ob__') { continue }
  8552. var provideKey = inject[key].from;
  8553. var source = vm;
  8554. while (source) {
  8555. if (source._provided && hasOwn(source._provided, provideKey)) {
  8556. result[key] = source._provided[provideKey];
  8557. break
  8558. }
  8559. source = source.$parent;
  8560. }
  8561. if (!source) {
  8562. if ('default' in inject[key]) {
  8563. var provideDefault = inject[key].default;
  8564. result[key] = typeof provideDefault === 'function'
  8565. ? provideDefault.call(vm)
  8566. : provideDefault;
  8567. } else if (true) {
  8568. warn(("Injection \"" + key + "\" not found"), vm);
  8569. }
  8570. }
  8571. }
  8572. return result
  8573. }
  8574. }
  8575. /* */
  8576. /**
  8577. * Runtime helper for resolving raw children VNodes into a slot object.
  8578. */
  8579. function resolveSlots (
  8580. children,
  8581. context
  8582. ) {
  8583. if (!children || !children.length) {
  8584. return {}
  8585. }
  8586. var slots = {};
  8587. for (var i = 0, l = children.length; i < l; i++) {
  8588. var child = children[i];
  8589. var data = child.data;
  8590. // remove slot attribute if the node is resolved as a Vue slot node
  8591. if (data && data.attrs && data.attrs.slot) {
  8592. delete data.attrs.slot;
  8593. }
  8594. // named slots should only be respected if the vnode was rendered in the
  8595. // same context.
  8596. if ((child.context === context || child.fnContext === context) &&
  8597. data && data.slot != null
  8598. ) {
  8599. var name = data.slot;
  8600. var slot = (slots[name] || (slots[name] = []));
  8601. if (child.tag === 'template') {
  8602. slot.push.apply(slot, child.children || []);
  8603. } else {
  8604. slot.push(child);
  8605. }
  8606. } else {
  8607. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  8608. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  8609. (slots['page'] || (slots['page'] = [])).push(child);
  8610. }else{
  8611. (slots.default || (slots.default = [])).push(child);
  8612. }
  8613. }
  8614. }
  8615. // ignore slots that contains only whitespace
  8616. for (var name$1 in slots) {
  8617. if (slots[name$1].every(isWhitespace)) {
  8618. delete slots[name$1];
  8619. }
  8620. }
  8621. return slots
  8622. }
  8623. function isWhitespace (node) {
  8624. return (node.isComment && !node.asyncFactory) || node.text === ' '
  8625. }
  8626. /* */
  8627. function normalizeScopedSlots (
  8628. slots,
  8629. normalSlots,
  8630. prevSlots
  8631. ) {
  8632. var res;
  8633. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  8634. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  8635. var key = slots && slots.$key;
  8636. if (!slots) {
  8637. res = {};
  8638. } else if (slots._normalized) {
  8639. // fast path 1: child component re-render only, parent did not change
  8640. return slots._normalized
  8641. } else if (
  8642. isStable &&
  8643. prevSlots &&
  8644. prevSlots !== emptyObject &&
  8645. key === prevSlots.$key &&
  8646. !hasNormalSlots &&
  8647. !prevSlots.$hasNormal
  8648. ) {
  8649. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  8650. // only need to normalize once
  8651. return prevSlots
  8652. } else {
  8653. res = {};
  8654. for (var key$1 in slots) {
  8655. if (slots[key$1] && key$1[0] !== '$') {
  8656. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  8657. }
  8658. }
  8659. }
  8660. // expose normal slots on scopedSlots
  8661. for (var key$2 in normalSlots) {
  8662. if (!(key$2 in res)) {
  8663. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  8664. }
  8665. }
  8666. // avoriaz seems to mock a non-extensible $scopedSlots object
  8667. // and when that is passed down this would cause an error
  8668. if (slots && Object.isExtensible(slots)) {
  8669. (slots)._normalized = res;
  8670. }
  8671. def(res, '$stable', isStable);
  8672. def(res, '$key', key);
  8673. def(res, '$hasNormal', hasNormalSlots);
  8674. return res
  8675. }
  8676. function normalizeScopedSlot(normalSlots, key, fn) {
  8677. var normalized = function () {
  8678. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  8679. res = res && typeof res === 'object' && !Array.isArray(res)
  8680. ? [res] // single vnode
  8681. : normalizeChildren(res);
  8682. return res && (
  8683. res.length === 0 ||
  8684. (res.length === 1 && res[0].isComment) // #9658
  8685. ) ? undefined
  8686. : res
  8687. };
  8688. // this is a slot using the new v-slot syntax without scope. although it is
  8689. // compiled as a scoped slot, render fn users would expect it to be present
  8690. // on this.$slots because the usage is semantically a normal slot.
  8691. if (fn.proxy) {
  8692. Object.defineProperty(normalSlots, key, {
  8693. get: normalized,
  8694. enumerable: true,
  8695. configurable: true
  8696. });
  8697. }
  8698. return normalized
  8699. }
  8700. function proxyNormalSlot(slots, key) {
  8701. return function () { return slots[key]; }
  8702. }
  8703. /* */
  8704. /**
  8705. * Runtime helper for rendering v-for lists.
  8706. */
  8707. function renderList (
  8708. val,
  8709. render
  8710. ) {
  8711. var ret, i, l, keys, key;
  8712. if (Array.isArray(val) || typeof val === 'string') {
  8713. ret = new Array(val.length);
  8714. for (i = 0, l = val.length; i < l; i++) {
  8715. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  8716. }
  8717. } else if (typeof val === 'number') {
  8718. ret = new Array(val);
  8719. for (i = 0; i < val; i++) {
  8720. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  8721. }
  8722. } else if (isObject(val)) {
  8723. if (hasSymbol && val[Symbol.iterator]) {
  8724. ret = [];
  8725. var iterator = val[Symbol.iterator]();
  8726. var result = iterator.next();
  8727. while (!result.done) {
  8728. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  8729. result = iterator.next();
  8730. }
  8731. } else {
  8732. keys = Object.keys(val);
  8733. ret = new Array(keys.length);
  8734. for (i = 0, l = keys.length; i < l; i++) {
  8735. key = keys[i];
  8736. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  8737. }
  8738. }
  8739. }
  8740. if (!isDef(ret)) {
  8741. ret = [];
  8742. }
  8743. (ret)._isVList = true;
  8744. return ret
  8745. }
  8746. /* */
  8747. /**
  8748. * Runtime helper for rendering <slot>
  8749. */
  8750. function renderSlot (
  8751. name,
  8752. fallback,
  8753. props,
  8754. bindObject
  8755. ) {
  8756. var scopedSlotFn = this.$scopedSlots[name];
  8757. var nodes;
  8758. if (scopedSlotFn) { // scoped slot
  8759. props = props || {};
  8760. if (bindObject) {
  8761. if ( true && !isObject(bindObject)) {
  8762. warn(
  8763. 'slot v-bind without argument expects an Object',
  8764. this
  8765. );
  8766. }
  8767. props = extend(extend({}, bindObject), props);
  8768. }
  8769. // fixed by xxxxxx app-plus scopedSlot
  8770. nodes = scopedSlotFn(props, this, props._i) || fallback;
  8771. } else {
  8772. nodes = this.$slots[name] || fallback;
  8773. }
  8774. var target = props && props.slot;
  8775. if (target) {
  8776. return this.$createElement('template', { slot: target }, nodes)
  8777. } else {
  8778. return nodes
  8779. }
  8780. }
  8781. /* */
  8782. /**
  8783. * Runtime helper for resolving filters
  8784. */
  8785. function resolveFilter (id) {
  8786. return resolveAsset(this.$options, 'filters', id, true) || identity
  8787. }
  8788. /* */
  8789. function isKeyNotMatch (expect, actual) {
  8790. if (Array.isArray(expect)) {
  8791. return expect.indexOf(actual) === -1
  8792. } else {
  8793. return expect !== actual
  8794. }
  8795. }
  8796. /**
  8797. * Runtime helper for checking keyCodes from config.
  8798. * exposed as Vue.prototype._k
  8799. * passing in eventKeyName as last argument separately for backwards compat
  8800. */
  8801. function checkKeyCodes (
  8802. eventKeyCode,
  8803. key,
  8804. builtInKeyCode,
  8805. eventKeyName,
  8806. builtInKeyName
  8807. ) {
  8808. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  8809. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  8810. return isKeyNotMatch(builtInKeyName, eventKeyName)
  8811. } else if (mappedKeyCode) {
  8812. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  8813. } else if (eventKeyName) {
  8814. return hyphenate(eventKeyName) !== key
  8815. }
  8816. }
  8817. /* */
  8818. /**
  8819. * Runtime helper for merging v-bind="object" into a VNode's data.
  8820. */
  8821. function bindObjectProps (
  8822. data,
  8823. tag,
  8824. value,
  8825. asProp,
  8826. isSync
  8827. ) {
  8828. if (value) {
  8829. if (!isObject(value)) {
  8830. true && warn(
  8831. 'v-bind without argument expects an Object or Array value',
  8832. this
  8833. );
  8834. } else {
  8835. if (Array.isArray(value)) {
  8836. value = toObject(value);
  8837. }
  8838. var hash;
  8839. var loop = function ( key ) {
  8840. if (
  8841. key === 'class' ||
  8842. key === 'style' ||
  8843. isReservedAttribute(key)
  8844. ) {
  8845. hash = data;
  8846. } else {
  8847. var type = data.attrs && data.attrs.type;
  8848. hash = asProp || config.mustUseProp(tag, type, key)
  8849. ? data.domProps || (data.domProps = {})
  8850. : data.attrs || (data.attrs = {});
  8851. }
  8852. var camelizedKey = camelize(key);
  8853. var hyphenatedKey = hyphenate(key);
  8854. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  8855. hash[key] = value[key];
  8856. if (isSync) {
  8857. var on = data.on || (data.on = {});
  8858. on[("update:" + key)] = function ($event) {
  8859. value[key] = $event;
  8860. };
  8861. }
  8862. }
  8863. };
  8864. for (var key in value) loop( key );
  8865. }
  8866. }
  8867. return data
  8868. }
  8869. /* */
  8870. /**
  8871. * Runtime helper for rendering static trees.
  8872. */
  8873. function renderStatic (
  8874. index,
  8875. isInFor
  8876. ) {
  8877. var cached = this._staticTrees || (this._staticTrees = []);
  8878. var tree = cached[index];
  8879. // if has already-rendered static tree and not inside v-for,
  8880. // we can reuse the same tree.
  8881. if (tree && !isInFor) {
  8882. return tree
  8883. }
  8884. // otherwise, render a fresh tree.
  8885. tree = cached[index] = this.$options.staticRenderFns[index].call(
  8886. this._renderProxy,
  8887. null,
  8888. this // for render fns generated for functional component templates
  8889. );
  8890. markStatic(tree, ("__static__" + index), false);
  8891. return tree
  8892. }
  8893. /**
  8894. * Runtime helper for v-once.
  8895. * Effectively it means marking the node as static with a unique key.
  8896. */
  8897. function markOnce (
  8898. tree,
  8899. index,
  8900. key
  8901. ) {
  8902. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  8903. return tree
  8904. }
  8905. function markStatic (
  8906. tree,
  8907. key,
  8908. isOnce
  8909. ) {
  8910. if (Array.isArray(tree)) {
  8911. for (var i = 0; i < tree.length; i++) {
  8912. if (tree[i] && typeof tree[i] !== 'string') {
  8913. markStaticNode(tree[i], (key + "_" + i), isOnce);
  8914. }
  8915. }
  8916. } else {
  8917. markStaticNode(tree, key, isOnce);
  8918. }
  8919. }
  8920. function markStaticNode (node, key, isOnce) {
  8921. node.isStatic = true;
  8922. node.key = key;
  8923. node.isOnce = isOnce;
  8924. }
  8925. /* */
  8926. function bindObjectListeners (data, value) {
  8927. if (value) {
  8928. if (!isPlainObject(value)) {
  8929. true && warn(
  8930. 'v-on without argument expects an Object value',
  8931. this
  8932. );
  8933. } else {
  8934. var on = data.on = data.on ? extend({}, data.on) : {};
  8935. for (var key in value) {
  8936. var existing = on[key];
  8937. var ours = value[key];
  8938. on[key] = existing ? [].concat(existing, ours) : ours;
  8939. }
  8940. }
  8941. }
  8942. return data
  8943. }
  8944. /* */
  8945. function resolveScopedSlots (
  8946. fns, // see flow/vnode
  8947. res,
  8948. // the following are added in 2.6
  8949. hasDynamicKeys,
  8950. contentHashKey
  8951. ) {
  8952. res = res || { $stable: !hasDynamicKeys };
  8953. for (var i = 0; i < fns.length; i++) {
  8954. var slot = fns[i];
  8955. if (Array.isArray(slot)) {
  8956. resolveScopedSlots(slot, res, hasDynamicKeys);
  8957. } else if (slot) {
  8958. // marker for reverse proxying v-slot without scope on this.$slots
  8959. if (slot.proxy) {
  8960. slot.fn.proxy = true;
  8961. }
  8962. res[slot.key] = slot.fn;
  8963. }
  8964. }
  8965. if (contentHashKey) {
  8966. (res).$key = contentHashKey;
  8967. }
  8968. return res
  8969. }
  8970. /* */
  8971. function bindDynamicKeys (baseObj, values) {
  8972. for (var i = 0; i < values.length; i += 2) {
  8973. var key = values[i];
  8974. if (typeof key === 'string' && key) {
  8975. baseObj[values[i]] = values[i + 1];
  8976. } else if ( true && key !== '' && key !== null) {
  8977. // null is a special value for explicitly removing a binding
  8978. warn(
  8979. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  8980. this
  8981. );
  8982. }
  8983. }
  8984. return baseObj
  8985. }
  8986. // helper to dynamically append modifier runtime markers to event names.
  8987. // ensure only append when value is already string, otherwise it will be cast
  8988. // to string and cause the type check to miss.
  8989. function prependModifier (value, symbol) {
  8990. return typeof value === 'string' ? symbol + value : value
  8991. }
  8992. /* */
  8993. function installRenderHelpers (target) {
  8994. target._o = markOnce;
  8995. target._n = toNumber;
  8996. target._s = toString;
  8997. target._l = renderList;
  8998. target._t = renderSlot;
  8999. target._q = looseEqual;
  9000. target._i = looseIndexOf;
  9001. target._m = renderStatic;
  9002. target._f = resolveFilter;
  9003. target._k = checkKeyCodes;
  9004. target._b = bindObjectProps;
  9005. target._v = createTextVNode;
  9006. target._e = createEmptyVNode;
  9007. target._u = resolveScopedSlots;
  9008. target._g = bindObjectListeners;
  9009. target._d = bindDynamicKeys;
  9010. target._p = prependModifier;
  9011. }
  9012. /* */
  9013. function FunctionalRenderContext (
  9014. data,
  9015. props,
  9016. children,
  9017. parent,
  9018. Ctor
  9019. ) {
  9020. var this$1 = this;
  9021. var options = Ctor.options;
  9022. // ensure the createElement function in functional components
  9023. // gets a unique context - this is necessary for correct named slot check
  9024. var contextVm;
  9025. if (hasOwn(parent, '_uid')) {
  9026. contextVm = Object.create(parent);
  9027. // $flow-disable-line
  9028. contextVm._original = parent;
  9029. } else {
  9030. // the context vm passed in is a functional context as well.
  9031. // in this case we want to make sure we are able to get a hold to the
  9032. // real context instance.
  9033. contextVm = parent;
  9034. // $flow-disable-line
  9035. parent = parent._original;
  9036. }
  9037. var isCompiled = isTrue(options._compiled);
  9038. var needNormalization = !isCompiled;
  9039. this.data = data;
  9040. this.props = props;
  9041. this.children = children;
  9042. this.parent = parent;
  9043. this.listeners = data.on || emptyObject;
  9044. this.injections = resolveInject(options.inject, parent);
  9045. this.slots = function () {
  9046. if (!this$1.$slots) {
  9047. normalizeScopedSlots(
  9048. data.scopedSlots,
  9049. this$1.$slots = resolveSlots(children, parent)
  9050. );
  9051. }
  9052. return this$1.$slots
  9053. };
  9054. Object.defineProperty(this, 'scopedSlots', ({
  9055. enumerable: true,
  9056. get: function get () {
  9057. return normalizeScopedSlots(data.scopedSlots, this.slots())
  9058. }
  9059. }));
  9060. // support for compiled functional template
  9061. if (isCompiled) {
  9062. // exposing $options for renderStatic()
  9063. this.$options = options;
  9064. // pre-resolve slots for renderSlot()
  9065. this.$slots = this.slots();
  9066. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  9067. }
  9068. if (options._scopeId) {
  9069. this._c = function (a, b, c, d) {
  9070. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  9071. if (vnode && !Array.isArray(vnode)) {
  9072. vnode.fnScopeId = options._scopeId;
  9073. vnode.fnContext = parent;
  9074. }
  9075. return vnode
  9076. };
  9077. } else {
  9078. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  9079. }
  9080. }
  9081. installRenderHelpers(FunctionalRenderContext.prototype);
  9082. function createFunctionalComponent (
  9083. Ctor,
  9084. propsData,
  9085. data,
  9086. contextVm,
  9087. children
  9088. ) {
  9089. var options = Ctor.options;
  9090. var props = {};
  9091. var propOptions = options.props;
  9092. if (isDef(propOptions)) {
  9093. for (var key in propOptions) {
  9094. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  9095. }
  9096. } else {
  9097. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  9098. if (isDef(data.props)) { mergeProps(props, data.props); }
  9099. }
  9100. var renderContext = new FunctionalRenderContext(
  9101. data,
  9102. props,
  9103. children,
  9104. contextVm,
  9105. Ctor
  9106. );
  9107. var vnode = options.render.call(null, renderContext._c, renderContext);
  9108. if (vnode instanceof VNode) {
  9109. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  9110. } else if (Array.isArray(vnode)) {
  9111. var vnodes = normalizeChildren(vnode) || [];
  9112. var res = new Array(vnodes.length);
  9113. for (var i = 0; i < vnodes.length; i++) {
  9114. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  9115. }
  9116. return res
  9117. }
  9118. }
  9119. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  9120. // #7817 clone node before setting fnContext, otherwise if the node is reused
  9121. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  9122. // that should not be matched to match.
  9123. var clone = cloneVNode(vnode);
  9124. clone.fnContext = contextVm;
  9125. clone.fnOptions = options;
  9126. if (true) {
  9127. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  9128. }
  9129. if (data.slot) {
  9130. (clone.data || (clone.data = {})).slot = data.slot;
  9131. }
  9132. return clone
  9133. }
  9134. function mergeProps (to, from) {
  9135. for (var key in from) {
  9136. to[camelize(key)] = from[key];
  9137. }
  9138. }
  9139. /* */
  9140. /* */
  9141. /* */
  9142. /* */
  9143. // inline hooks to be invoked on component VNodes during patch
  9144. var componentVNodeHooks = {
  9145. init: function init (vnode, hydrating) {
  9146. if (
  9147. vnode.componentInstance &&
  9148. !vnode.componentInstance._isDestroyed &&
  9149. vnode.data.keepAlive
  9150. ) {
  9151. // kept-alive components, treat as a patch
  9152. var mountedNode = vnode; // work around flow
  9153. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  9154. } else {
  9155. var child = vnode.componentInstance = createComponentInstanceForVnode(
  9156. vnode,
  9157. activeInstance
  9158. );
  9159. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  9160. }
  9161. },
  9162. prepatch: function prepatch (oldVnode, vnode) {
  9163. var options = vnode.componentOptions;
  9164. var child = vnode.componentInstance = oldVnode.componentInstance;
  9165. updateChildComponent(
  9166. child,
  9167. options.propsData, // updated props
  9168. options.listeners, // updated listeners
  9169. vnode, // new parent vnode
  9170. options.children // new children
  9171. );
  9172. },
  9173. insert: function insert (vnode) {
  9174. var context = vnode.context;
  9175. var componentInstance = vnode.componentInstance;
  9176. if (!componentInstance._isMounted) {
  9177. callHook(componentInstance, 'onServiceCreated');
  9178. callHook(componentInstance, 'onServiceAttached');
  9179. componentInstance._isMounted = true;
  9180. callHook(componentInstance, 'mounted');
  9181. }
  9182. if (vnode.data.keepAlive) {
  9183. if (context._isMounted) {
  9184. // vue-router#1212
  9185. // During updates, a kept-alive component's child components may
  9186. // change, so directly walking the tree here may call activated hooks
  9187. // on incorrect children. Instead we push them into a queue which will
  9188. // be processed after the whole patch process ended.
  9189. queueActivatedComponent(componentInstance);
  9190. } else {
  9191. activateChildComponent(componentInstance, true /* direct */);
  9192. }
  9193. }
  9194. },
  9195. destroy: function destroy (vnode) {
  9196. var componentInstance = vnode.componentInstance;
  9197. if (!componentInstance._isDestroyed) {
  9198. if (!vnode.data.keepAlive) {
  9199. componentInstance.$destroy();
  9200. } else {
  9201. deactivateChildComponent(componentInstance, true /* direct */);
  9202. }
  9203. }
  9204. }
  9205. };
  9206. var hooksToMerge = Object.keys(componentVNodeHooks);
  9207. function createComponent (
  9208. Ctor,
  9209. data,
  9210. context,
  9211. children,
  9212. tag
  9213. ) {
  9214. if (isUndef(Ctor)) {
  9215. return
  9216. }
  9217. var baseCtor = context.$options._base;
  9218. // plain options object: turn it into a constructor
  9219. if (isObject(Ctor)) {
  9220. Ctor = baseCtor.extend(Ctor);
  9221. }
  9222. // if at this stage it's not a constructor or an async component factory,
  9223. // reject.
  9224. if (typeof Ctor !== 'function') {
  9225. if (true) {
  9226. warn(("Invalid Component definition: " + (String(Ctor))), context);
  9227. }
  9228. return
  9229. }
  9230. // async component
  9231. var asyncFactory;
  9232. if (isUndef(Ctor.cid)) {
  9233. asyncFactory = Ctor;
  9234. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  9235. if (Ctor === undefined) {
  9236. // return a placeholder node for async component, which is rendered
  9237. // as a comment node but preserves all the raw information for the node.
  9238. // the information will be used for async server-rendering and hydration.
  9239. return createAsyncPlaceholder(
  9240. asyncFactory,
  9241. data,
  9242. context,
  9243. children,
  9244. tag
  9245. )
  9246. }
  9247. }
  9248. data = data || {};
  9249. // resolve constructor options in case global mixins are applied after
  9250. // component constructor creation
  9251. resolveConstructorOptions(Ctor);
  9252. // transform component v-model data into props & events
  9253. if (isDef(data.model)) {
  9254. transformModel(Ctor.options, data);
  9255. }
  9256. // extract props
  9257. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  9258. // functional component
  9259. if (isTrue(Ctor.options.functional)) {
  9260. return createFunctionalComponent(Ctor, propsData, data, context, children)
  9261. }
  9262. // extract listeners, since these needs to be treated as
  9263. // child component listeners instead of DOM listeners
  9264. var listeners = data.on;
  9265. // replace with listeners with .native modifier
  9266. // so it gets processed during parent component patch.
  9267. data.on = data.nativeOn;
  9268. if (isTrue(Ctor.options.abstract)) {
  9269. // abstract components do not keep anything
  9270. // other than props & listeners & slot
  9271. // work around flow
  9272. var slot = data.slot;
  9273. data = {};
  9274. if (slot) {
  9275. data.slot = slot;
  9276. }
  9277. }
  9278. // install component management hooks onto the placeholder node
  9279. installComponentHooks(data);
  9280. // return a placeholder vnode
  9281. var name = Ctor.options.name || tag;
  9282. var vnode = new VNode(
  9283. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  9284. data, undefined, undefined, undefined, context,
  9285. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  9286. asyncFactory
  9287. );
  9288. return vnode
  9289. }
  9290. function createComponentInstanceForVnode (
  9291. vnode, // we know it's MountedComponentVNode but flow doesn't
  9292. parent // activeInstance in lifecycle state
  9293. ) {
  9294. var options = {
  9295. _isComponent: true,
  9296. _parentVnode: vnode,
  9297. parent: parent
  9298. };
  9299. // check inline-template render functions
  9300. var inlineTemplate = vnode.data.inlineTemplate;
  9301. if (isDef(inlineTemplate)) {
  9302. options.render = inlineTemplate.render;
  9303. options.staticRenderFns = inlineTemplate.staticRenderFns;
  9304. }
  9305. return new vnode.componentOptions.Ctor(options)
  9306. }
  9307. function installComponentHooks (data) {
  9308. var hooks = data.hook || (data.hook = {});
  9309. for (var i = 0; i < hooksToMerge.length; i++) {
  9310. var key = hooksToMerge[i];
  9311. var existing = hooks[key];
  9312. var toMerge = componentVNodeHooks[key];
  9313. if (existing !== toMerge && !(existing && existing._merged)) {
  9314. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  9315. }
  9316. }
  9317. }
  9318. function mergeHook$1 (f1, f2) {
  9319. var merged = function (a, b) {
  9320. // flow complains about extra args which is why we use any
  9321. f1(a, b);
  9322. f2(a, b);
  9323. };
  9324. merged._merged = true;
  9325. return merged
  9326. }
  9327. // transform component v-model info (value and callback) into
  9328. // prop and event handler respectively.
  9329. function transformModel (options, data) {
  9330. var prop = (options.model && options.model.prop) || 'value';
  9331. var event = (options.model && options.model.event) || 'input'
  9332. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  9333. var on = data.on || (data.on = {});
  9334. var existing = on[event];
  9335. var callback = data.model.callback;
  9336. if (isDef(existing)) {
  9337. if (
  9338. Array.isArray(existing)
  9339. ? existing.indexOf(callback) === -1
  9340. : existing !== callback
  9341. ) {
  9342. on[event] = [callback].concat(existing);
  9343. }
  9344. } else {
  9345. on[event] = callback;
  9346. }
  9347. }
  9348. /* */
  9349. var SIMPLE_NORMALIZE = 1;
  9350. var ALWAYS_NORMALIZE = 2;
  9351. // wrapper function for providing a more flexible interface
  9352. // without getting yelled at by flow
  9353. function createElement (
  9354. context,
  9355. tag,
  9356. data,
  9357. children,
  9358. normalizationType,
  9359. alwaysNormalize
  9360. ) {
  9361. if (Array.isArray(data) || isPrimitive(data)) {
  9362. normalizationType = children;
  9363. children = data;
  9364. data = undefined;
  9365. }
  9366. if (isTrue(alwaysNormalize)) {
  9367. normalizationType = ALWAYS_NORMALIZE;
  9368. }
  9369. return _createElement(context, tag, data, children, normalizationType)
  9370. }
  9371. function _createElement (
  9372. context,
  9373. tag,
  9374. data,
  9375. children,
  9376. normalizationType
  9377. ) {
  9378. if (isDef(data) && isDef((data).__ob__)) {
  9379. true && warn(
  9380. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  9381. 'Always create fresh vnode data objects in each render!',
  9382. context
  9383. );
  9384. return createEmptyVNode()
  9385. }
  9386. // object syntax in v-bind
  9387. if (isDef(data) && isDef(data.is)) {
  9388. tag = data.is;
  9389. }
  9390. if (!tag) {
  9391. // in case of component :is set to falsy value
  9392. return createEmptyVNode()
  9393. }
  9394. // warn against non-primitive key
  9395. if ( true &&
  9396. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  9397. ) {
  9398. {
  9399. warn(
  9400. 'Avoid using non-primitive value as key, ' +
  9401. 'use string/number value instead.',
  9402. context
  9403. );
  9404. }
  9405. }
  9406. // support single function children as default scoped slot
  9407. if (Array.isArray(children) &&
  9408. typeof children[0] === 'function'
  9409. ) {
  9410. data = data || {};
  9411. data.scopedSlots = { default: children[0] };
  9412. children.length = 0;
  9413. }
  9414. if (normalizationType === ALWAYS_NORMALIZE) {
  9415. children = normalizeChildren(children);
  9416. } else if (normalizationType === SIMPLE_NORMALIZE) {
  9417. children = simpleNormalizeChildren(children);
  9418. }
  9419. var vnode, ns;
  9420. if (typeof tag === 'string') {
  9421. var Ctor;
  9422. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  9423. if (config.isReservedTag(tag)) {
  9424. // platform built-in elements
  9425. if ( true && isDef(data) && isDef(data.nativeOn)) {
  9426. warn(
  9427. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  9428. context
  9429. );
  9430. }
  9431. vnode = new VNode(
  9432. config.parsePlatformTagName(tag), data, children,
  9433. undefined, undefined, context
  9434. );
  9435. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  9436. // component
  9437. vnode = createComponent(Ctor, data, context, children, tag);
  9438. } else {
  9439. // unknown or unlisted namespaced elements
  9440. // check at runtime because it may get assigned a namespace when its
  9441. // parent normalizes children
  9442. vnode = new VNode(
  9443. tag, data, children,
  9444. undefined, undefined, context
  9445. );
  9446. }
  9447. } else {
  9448. // direct component options / constructor
  9449. vnode = createComponent(tag, data, context, children);
  9450. }
  9451. if (Array.isArray(vnode)) {
  9452. return vnode
  9453. } else if (isDef(vnode)) {
  9454. if (isDef(ns)) { applyNS(vnode, ns); }
  9455. if (isDef(data)) { registerDeepBindings(data); }
  9456. return vnode
  9457. } else {
  9458. return createEmptyVNode()
  9459. }
  9460. }
  9461. function applyNS (vnode, ns, force) {
  9462. vnode.ns = ns;
  9463. if (vnode.tag === 'foreignObject') {
  9464. // use default namespace inside foreignObject
  9465. ns = undefined;
  9466. force = true;
  9467. }
  9468. if (isDef(vnode.children)) {
  9469. for (var i = 0, l = vnode.children.length; i < l; i++) {
  9470. var child = vnode.children[i];
  9471. if (isDef(child.tag) && (
  9472. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  9473. applyNS(child, ns, force);
  9474. }
  9475. }
  9476. }
  9477. }
  9478. // ref #5318
  9479. // necessary to ensure parent re-render when deep bindings like :style and
  9480. // :class are used on slot nodes
  9481. function registerDeepBindings (data) {
  9482. if (isObject(data.style)) {
  9483. traverse(data.style);
  9484. }
  9485. if (isObject(data.class)) {
  9486. traverse(data.class);
  9487. }
  9488. }
  9489. /* */
  9490. function initRender (vm) {
  9491. vm._vnode = null; // the root of the child tree
  9492. vm._staticTrees = null; // v-once cached trees
  9493. var options = vm.$options;
  9494. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  9495. var renderContext = parentVnode && parentVnode.context;
  9496. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  9497. vm.$scopedSlots = emptyObject;
  9498. // bind the createElement fn to this instance
  9499. // so that we get proper render context inside it.
  9500. // args order: tag, data, children, normalizationType, alwaysNormalize
  9501. // internal version is used by render functions compiled from templates
  9502. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  9503. // normalization is always applied for the public version, used in
  9504. // user-written render functions.
  9505. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  9506. // $attrs & $listeners are exposed for easier HOC creation.
  9507. // they need to be reactive so that HOCs using them are always updated
  9508. var parentData = parentVnode && parentVnode.data;
  9509. /* istanbul ignore else */
  9510. if (true) {
  9511. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  9512. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  9513. }, true);
  9514. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  9515. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  9516. }, true);
  9517. } else {}
  9518. }
  9519. var currentRenderingInstance = null;
  9520. function renderMixin (Vue) {
  9521. // install runtime convenience helpers
  9522. installRenderHelpers(Vue.prototype);
  9523. Vue.prototype.$nextTick = function (fn) {
  9524. return nextTick(fn, this)
  9525. };
  9526. Vue.prototype._render = function () {
  9527. var vm = this;
  9528. var ref = vm.$options;
  9529. var render = ref.render;
  9530. var _parentVnode = ref._parentVnode;
  9531. if (_parentVnode) {
  9532. vm.$scopedSlots = normalizeScopedSlots(
  9533. _parentVnode.data.scopedSlots,
  9534. vm.$slots,
  9535. vm.$scopedSlots
  9536. );
  9537. }
  9538. // set parent vnode. this allows render functions to have access
  9539. // to the data on the placeholder node.
  9540. vm.$vnode = _parentVnode;
  9541. // render self
  9542. var vnode;
  9543. try {
  9544. // There's no need to maintain a stack because all render fns are called
  9545. // separately from one another. Nested component's render fns are called
  9546. // when parent component is patched.
  9547. currentRenderingInstance = vm;
  9548. vnode = render.call(vm._renderProxy, vm.$createElement);
  9549. } catch (e) {
  9550. handleError(e, vm, "render");
  9551. // return error render result,
  9552. // or previous vnode to prevent render error causing blank component
  9553. /* istanbul ignore else */
  9554. if ( true && vm.$options.renderError) {
  9555. try {
  9556. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  9557. } catch (e) {
  9558. handleError(e, vm, "renderError");
  9559. vnode = vm._vnode;
  9560. }
  9561. } else {
  9562. vnode = vm._vnode;
  9563. }
  9564. } finally {
  9565. currentRenderingInstance = null;
  9566. }
  9567. // if the returned array contains only a single node, allow it
  9568. if (Array.isArray(vnode) && vnode.length === 1) {
  9569. vnode = vnode[0];
  9570. }
  9571. // return empty vnode in case the render function errored out
  9572. if (!(vnode instanceof VNode)) {
  9573. if ( true && Array.isArray(vnode)) {
  9574. warn(
  9575. 'Multiple root nodes returned from render function. Render function ' +
  9576. 'should return a single root node.',
  9577. vm
  9578. );
  9579. }
  9580. vnode = createEmptyVNode();
  9581. }
  9582. // set parent
  9583. vnode.parent = _parentVnode;
  9584. return vnode
  9585. };
  9586. }
  9587. /* */
  9588. function ensureCtor (comp, base) {
  9589. if (
  9590. comp.__esModule ||
  9591. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  9592. ) {
  9593. comp = comp.default;
  9594. }
  9595. return isObject(comp)
  9596. ? base.extend(comp)
  9597. : comp
  9598. }
  9599. function createAsyncPlaceholder (
  9600. factory,
  9601. data,
  9602. context,
  9603. children,
  9604. tag
  9605. ) {
  9606. var node = createEmptyVNode();
  9607. node.asyncFactory = factory;
  9608. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  9609. return node
  9610. }
  9611. function resolveAsyncComponent (
  9612. factory,
  9613. baseCtor
  9614. ) {
  9615. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  9616. return factory.errorComp
  9617. }
  9618. if (isDef(factory.resolved)) {
  9619. return factory.resolved
  9620. }
  9621. var owner = currentRenderingInstance;
  9622. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  9623. // already pending
  9624. factory.owners.push(owner);
  9625. }
  9626. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  9627. return factory.loadingComp
  9628. }
  9629. if (owner && !isDef(factory.owners)) {
  9630. var owners = factory.owners = [owner];
  9631. var sync = true;
  9632. var timerLoading = null;
  9633. var timerTimeout = null
  9634. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  9635. var forceRender = function (renderCompleted) {
  9636. for (var i = 0, l = owners.length; i < l; i++) {
  9637. (owners[i]).$forceUpdate();
  9638. }
  9639. if (renderCompleted) {
  9640. owners.length = 0;
  9641. if (timerLoading !== null) {
  9642. clearTimeout(timerLoading);
  9643. timerLoading = null;
  9644. }
  9645. if (timerTimeout !== null) {
  9646. clearTimeout(timerTimeout);
  9647. timerTimeout = null;
  9648. }
  9649. }
  9650. };
  9651. var resolve = once(function (res) {
  9652. // cache resolved
  9653. factory.resolved = ensureCtor(res, baseCtor);
  9654. // invoke callbacks only if this is not a synchronous resolve
  9655. // (async resolves are shimmed as synchronous during SSR)
  9656. if (!sync) {
  9657. forceRender(true);
  9658. } else {
  9659. owners.length = 0;
  9660. }
  9661. });
  9662. var reject = once(function (reason) {
  9663. true && warn(
  9664. "Failed to resolve async component: " + (String(factory)) +
  9665. (reason ? ("\nReason: " + reason) : '')
  9666. );
  9667. if (isDef(factory.errorComp)) {
  9668. factory.error = true;
  9669. forceRender(true);
  9670. }
  9671. });
  9672. var res = factory(resolve, reject);
  9673. if (isObject(res)) {
  9674. if (isPromise(res)) {
  9675. // () => Promise
  9676. if (isUndef(factory.resolved)) {
  9677. res.then(resolve, reject);
  9678. }
  9679. } else if (isPromise(res.component)) {
  9680. res.component.then(resolve, reject);
  9681. if (isDef(res.error)) {
  9682. factory.errorComp = ensureCtor(res.error, baseCtor);
  9683. }
  9684. if (isDef(res.loading)) {
  9685. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  9686. if (res.delay === 0) {
  9687. factory.loading = true;
  9688. } else {
  9689. timerLoading = setTimeout(function () {
  9690. timerLoading = null;
  9691. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  9692. factory.loading = true;
  9693. forceRender(false);
  9694. }
  9695. }, res.delay || 200);
  9696. }
  9697. }
  9698. if (isDef(res.timeout)) {
  9699. timerTimeout = setTimeout(function () {
  9700. timerTimeout = null;
  9701. if (isUndef(factory.resolved)) {
  9702. reject(
  9703. true
  9704. ? ("timeout (" + (res.timeout) + "ms)")
  9705. : undefined
  9706. );
  9707. }
  9708. }, res.timeout);
  9709. }
  9710. }
  9711. }
  9712. sync = false;
  9713. // return in case resolved synchronously
  9714. return factory.loading
  9715. ? factory.loadingComp
  9716. : factory.resolved
  9717. }
  9718. }
  9719. /* */
  9720. function isAsyncPlaceholder (node) {
  9721. return node.isComment && node.asyncFactory
  9722. }
  9723. /* */
  9724. function getFirstComponentChild (children) {
  9725. if (Array.isArray(children)) {
  9726. for (var i = 0; i < children.length; i++) {
  9727. var c = children[i];
  9728. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  9729. return c
  9730. }
  9731. }
  9732. }
  9733. }
  9734. /* */
  9735. /* */
  9736. function initEvents (vm) {
  9737. vm._events = Object.create(null);
  9738. vm._hasHookEvent = false;
  9739. // init parent attached events
  9740. var listeners = vm.$options._parentListeners;
  9741. if (listeners) {
  9742. updateComponentListeners(vm, listeners);
  9743. }
  9744. }
  9745. var target;
  9746. function add (event, fn) {
  9747. target.$on(event, fn);
  9748. }
  9749. function remove$1 (event, fn) {
  9750. target.$off(event, fn);
  9751. }
  9752. function createOnceHandler (event, fn) {
  9753. var _target = target;
  9754. return function onceHandler () {
  9755. var res = fn.apply(null, arguments);
  9756. if (res !== null) {
  9757. _target.$off(event, onceHandler);
  9758. }
  9759. }
  9760. }
  9761. function updateComponentListeners (
  9762. vm,
  9763. listeners,
  9764. oldListeners
  9765. ) {
  9766. target = vm;
  9767. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  9768. target = undefined;
  9769. }
  9770. function eventsMixin (Vue) {
  9771. var hookRE = /^hook:/;
  9772. Vue.prototype.$on = function (event, fn) {
  9773. var vm = this;
  9774. if (Array.isArray(event)) {
  9775. for (var i = 0, l = event.length; i < l; i++) {
  9776. vm.$on(event[i], fn);
  9777. }
  9778. } else {
  9779. (vm._events[event] || (vm._events[event] = [])).push(fn);
  9780. // optimize hook:event cost by using a boolean flag marked at registration
  9781. // instead of a hash lookup
  9782. if (hookRE.test(event)) {
  9783. vm._hasHookEvent = true;
  9784. }
  9785. }
  9786. return vm
  9787. };
  9788. Vue.prototype.$once = function (event, fn) {
  9789. var vm = this;
  9790. function on () {
  9791. vm.$off(event, on);
  9792. fn.apply(vm, arguments);
  9793. }
  9794. on.fn = fn;
  9795. vm.$on(event, on);
  9796. return vm
  9797. };
  9798. Vue.prototype.$off = function (event, fn) {
  9799. var vm = this;
  9800. // all
  9801. if (!arguments.length) {
  9802. vm._events = Object.create(null);
  9803. return vm
  9804. }
  9805. // array of events
  9806. if (Array.isArray(event)) {
  9807. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  9808. vm.$off(event[i$1], fn);
  9809. }
  9810. return vm
  9811. }
  9812. // specific event
  9813. var cbs = vm._events[event];
  9814. if (!cbs) {
  9815. return vm
  9816. }
  9817. if (!fn) {
  9818. vm._events[event] = null;
  9819. return vm
  9820. }
  9821. // specific handler
  9822. var cb;
  9823. var i = cbs.length;
  9824. while (i--) {
  9825. cb = cbs[i];
  9826. if (cb === fn || cb.fn === fn) {
  9827. cbs.splice(i, 1);
  9828. break
  9829. }
  9830. }
  9831. return vm
  9832. };
  9833. Vue.prototype.$emit = function (event) {
  9834. var vm = this;
  9835. if (true) {
  9836. var lowerCaseEvent = event.toLowerCase();
  9837. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  9838. tip(
  9839. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  9840. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  9841. "Note that HTML attributes are case-insensitive and you cannot use " +
  9842. "v-on to listen to camelCase events when using in-DOM templates. " +
  9843. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  9844. );
  9845. }
  9846. }
  9847. var cbs = vm._events[event];
  9848. if (cbs) {
  9849. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  9850. var args = toArray(arguments, 1);
  9851. var info = "event handler for \"" + event + "\"";
  9852. for (var i = 0, l = cbs.length; i < l; i++) {
  9853. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  9854. }
  9855. }
  9856. return vm
  9857. };
  9858. }
  9859. /* */
  9860. var activeInstance = null;
  9861. var isUpdatingChildComponent = false;
  9862. function setActiveInstance(vm) {
  9863. var prevActiveInstance = activeInstance;
  9864. activeInstance = vm;
  9865. return function () {
  9866. activeInstance = prevActiveInstance;
  9867. }
  9868. }
  9869. function initLifecycle (vm) {
  9870. var options = vm.$options;
  9871. // locate first non-abstract parent
  9872. var parent = options.parent;
  9873. if (parent && !options.abstract) {
  9874. while (parent.$options.abstract && parent.$parent) {
  9875. parent = parent.$parent;
  9876. }
  9877. parent.$children.push(vm);
  9878. }
  9879. vm.$parent = parent;
  9880. vm.$root = parent ? parent.$root : vm;
  9881. vm.$children = [];
  9882. vm.$refs = {};
  9883. vm._watcher = null;
  9884. vm._inactive = null;
  9885. vm._directInactive = false;
  9886. vm._isMounted = false;
  9887. vm._isDestroyed = false;
  9888. vm._isBeingDestroyed = false;
  9889. }
  9890. function lifecycleMixin (Vue) {
  9891. Vue.prototype._update = function (vnode, hydrating) {
  9892. var vm = this;
  9893. var prevEl = vm.$el;
  9894. var prevVnode = vm._vnode;
  9895. var restoreActiveInstance = setActiveInstance(vm);
  9896. vm._vnode = vnode;
  9897. // Vue.prototype.__patch__ is injected in entry points
  9898. // based on the rendering backend used.
  9899. if (!prevVnode) {
  9900. // initial render
  9901. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  9902. } else {
  9903. // updates
  9904. vm.$el = vm.__patch__(prevVnode, vnode);
  9905. }
  9906. restoreActiveInstance();
  9907. // update __vue__ reference
  9908. if (prevEl) {
  9909. prevEl.__vue__ = null;
  9910. }
  9911. if (vm.$el) {
  9912. vm.$el.__vue__ = vm;
  9913. }
  9914. // if parent is an HOC, update its $el as well
  9915. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  9916. vm.$parent.$el = vm.$el;
  9917. }
  9918. // updated hook is called by the scheduler to ensure that children are
  9919. // updated in a parent's updated hook.
  9920. };
  9921. Vue.prototype.$forceUpdate = function () {
  9922. var vm = this;
  9923. if (vm._watcher) {
  9924. vm._watcher.update();
  9925. }
  9926. };
  9927. Vue.prototype.$destroy = function () {
  9928. var vm = this;
  9929. if (vm._isBeingDestroyed) {
  9930. return
  9931. }
  9932. callHook(vm, 'beforeDestroy');
  9933. vm._isBeingDestroyed = true;
  9934. // remove self from parent
  9935. var parent = vm.$parent;
  9936. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  9937. remove(parent.$children, vm);
  9938. }
  9939. // teardown watchers
  9940. if (vm._watcher) {
  9941. vm._watcher.teardown();
  9942. }
  9943. var i = vm._watchers.length;
  9944. while (i--) {
  9945. vm._watchers[i].teardown();
  9946. }
  9947. // remove reference from data ob
  9948. // frozen object may not have observer.
  9949. if (vm._data.__ob__) {
  9950. vm._data.__ob__.vmCount--;
  9951. }
  9952. // call the last hook...
  9953. vm._isDestroyed = true;
  9954. // invoke destroy hooks on current rendered tree
  9955. vm.__patch__(vm._vnode, null);
  9956. // fire destroyed hook
  9957. callHook(vm, 'destroyed');
  9958. // turn off all instance listeners.
  9959. vm.$off();
  9960. // remove __vue__ reference
  9961. if (vm.$el) {
  9962. vm.$el.__vue__ = null;
  9963. }
  9964. // release circular reference (#6759)
  9965. if (vm.$vnode) {
  9966. vm.$vnode.parent = null;
  9967. }
  9968. };
  9969. }
  9970. function updateChildComponent (
  9971. vm,
  9972. propsData,
  9973. listeners,
  9974. parentVnode,
  9975. renderChildren
  9976. ) {
  9977. if (true) {
  9978. isUpdatingChildComponent = true;
  9979. }
  9980. // determine whether component has slot children
  9981. // we need to do this before overwriting $options._renderChildren.
  9982. // check if there are dynamic scopedSlots (hand-written or compiled but with
  9983. // dynamic slot names). Static scoped slots compiled from template has the
  9984. // "$stable" marker.
  9985. var newScopedSlots = parentVnode.data.scopedSlots;
  9986. var oldScopedSlots = vm.$scopedSlots;
  9987. var hasDynamicScopedSlot = !!(
  9988. (newScopedSlots && !newScopedSlots.$stable) ||
  9989. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  9990. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  9991. );
  9992. // Any static slot children from the parent may have changed during parent's
  9993. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  9994. // update is necessary to ensure correctness.
  9995. var needsForceUpdate = !!(
  9996. renderChildren || // has new static slots
  9997. vm.$options._renderChildren || // has old static slots
  9998. hasDynamicScopedSlot
  9999. );
  10000. vm.$options._parentVnode = parentVnode;
  10001. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  10002. if (vm._vnode) { // update child tree's parent
  10003. vm._vnode.parent = parentVnode;
  10004. }
  10005. vm.$options._renderChildren = renderChildren;
  10006. // update $attrs and $listeners hash
  10007. // these are also reactive so they may trigger child update if the child
  10008. // used them during render
  10009. vm.$attrs = parentVnode.data.attrs || emptyObject;
  10010. vm.$listeners = listeners || emptyObject;
  10011. // update props
  10012. if (propsData && vm.$options.props) {
  10013. toggleObserving(false);
  10014. var props = vm._props;
  10015. var propKeys = vm.$options._propKeys || [];
  10016. for (var i = 0; i < propKeys.length; i++) {
  10017. var key = propKeys[i];
  10018. var propOptions = vm.$options.props; // wtf flow?
  10019. props[key] = validateProp(key, propOptions, propsData, vm);
  10020. }
  10021. toggleObserving(true);
  10022. // keep a copy of raw propsData
  10023. vm.$options.propsData = propsData;
  10024. }
  10025. // fixed by xxxxxx update properties(mp runtime)
  10026. vm._$updateProperties && vm._$updateProperties(vm);
  10027. // update listeners
  10028. listeners = listeners || emptyObject;
  10029. var oldListeners = vm.$options._parentListeners;
  10030. vm.$options._parentListeners = listeners;
  10031. updateComponentListeners(vm, listeners, oldListeners);
  10032. // resolve slots + force update if has children
  10033. if (needsForceUpdate) {
  10034. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  10035. vm.$forceUpdate();
  10036. }
  10037. if (true) {
  10038. isUpdatingChildComponent = false;
  10039. }
  10040. }
  10041. function isInInactiveTree (vm) {
  10042. while (vm && (vm = vm.$parent)) {
  10043. if (vm._inactive) { return true }
  10044. }
  10045. return false
  10046. }
  10047. function activateChildComponent (vm, direct) {
  10048. if (direct) {
  10049. vm._directInactive = false;
  10050. if (isInInactiveTree(vm)) {
  10051. return
  10052. }
  10053. } else if (vm._directInactive) {
  10054. return
  10055. }
  10056. if (vm._inactive || vm._inactive === null) {
  10057. vm._inactive = false;
  10058. for (var i = 0; i < vm.$children.length; i++) {
  10059. activateChildComponent(vm.$children[i]);
  10060. }
  10061. callHook(vm, 'activated');
  10062. }
  10063. }
  10064. function deactivateChildComponent (vm, direct) {
  10065. if (direct) {
  10066. vm._directInactive = true;
  10067. if (isInInactiveTree(vm)) {
  10068. return
  10069. }
  10070. }
  10071. if (!vm._inactive) {
  10072. vm._inactive = true;
  10073. for (var i = 0; i < vm.$children.length; i++) {
  10074. deactivateChildComponent(vm.$children[i]);
  10075. }
  10076. callHook(vm, 'deactivated');
  10077. }
  10078. }
  10079. function callHook (vm, hook) {
  10080. // #7573 disable dep collection when invoking lifecycle hooks
  10081. pushTarget();
  10082. var handlers = vm.$options[hook];
  10083. var info = hook + " hook";
  10084. if (handlers) {
  10085. for (var i = 0, j = handlers.length; i < j; i++) {
  10086. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  10087. }
  10088. }
  10089. if (vm._hasHookEvent) {
  10090. vm.$emit('hook:' + hook);
  10091. }
  10092. popTarget();
  10093. }
  10094. /* */
  10095. var MAX_UPDATE_COUNT = 100;
  10096. var queue = [];
  10097. var activatedChildren = [];
  10098. var has = {};
  10099. var circular = {};
  10100. var waiting = false;
  10101. var flushing = false;
  10102. var index = 0;
  10103. /**
  10104. * Reset the scheduler's state.
  10105. */
  10106. function resetSchedulerState () {
  10107. index = queue.length = activatedChildren.length = 0;
  10108. has = {};
  10109. if (true) {
  10110. circular = {};
  10111. }
  10112. waiting = flushing = false;
  10113. }
  10114. // Async edge case #6566 requires saving the timestamp when event listeners are
  10115. // attached. However, calling performance.now() has a perf overhead especially
  10116. // if the page has thousands of event listeners. Instead, we take a timestamp
  10117. // every time the scheduler flushes and use that for all event listeners
  10118. // attached during that flush.
  10119. var currentFlushTimestamp = 0;
  10120. // Async edge case fix requires storing an event listener's attach timestamp.
  10121. var getNow = Date.now;
  10122. // Determine what event timestamp the browser is using. Annoyingly, the
  10123. // timestamp can either be hi-res (relative to page load) or low-res
  10124. // (relative to UNIX epoch), so in order to compare time we have to use the
  10125. // same timestamp type when saving the flush timestamp.
  10126. // All IE versions use low-res event timestamps, and have problematic clock
  10127. // implementations (#9632)
  10128. if (inBrowser && !isIE) {
  10129. var performance = window.performance;
  10130. if (
  10131. performance &&
  10132. typeof performance.now === 'function' &&
  10133. getNow() > document.createEvent('Event').timeStamp
  10134. ) {
  10135. // if the event timestamp, although evaluated AFTER the Date.now(), is
  10136. // smaller than it, it means the event is using a hi-res timestamp,
  10137. // and we need to use the hi-res version for event listener timestamps as
  10138. // well.
  10139. getNow = function () { return performance.now(); };
  10140. }
  10141. }
  10142. /**
  10143. * Flush both queues and run the watchers.
  10144. */
  10145. function flushSchedulerQueue () {
  10146. currentFlushTimestamp = getNow();
  10147. flushing = true;
  10148. var watcher, id;
  10149. // Sort queue before flush.
  10150. // This ensures that:
  10151. // 1. Components are updated from parent to child. (because parent is always
  10152. // created before the child)
  10153. // 2. A component's user watchers are run before its render watcher (because
  10154. // user watchers are created before the render watcher)
  10155. // 3. If a component is destroyed during a parent component's watcher run,
  10156. // its watchers can be skipped.
  10157. queue.sort(function (a, b) { return a.id - b.id; });
  10158. // do not cache length because more watchers might be pushed
  10159. // as we run existing watchers
  10160. for (index = 0; index < queue.length; index++) {
  10161. watcher = queue[index];
  10162. if (watcher.before) {
  10163. watcher.before();
  10164. }
  10165. id = watcher.id;
  10166. has[id] = null;
  10167. watcher.run();
  10168. // in dev build, check and stop circular updates.
  10169. if ( true && has[id] != null) {
  10170. circular[id] = (circular[id] || 0) + 1;
  10171. if (circular[id] > MAX_UPDATE_COUNT) {
  10172. warn(
  10173. 'You may have an infinite update loop ' + (
  10174. watcher.user
  10175. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  10176. : "in a component render function."
  10177. ),
  10178. watcher.vm
  10179. );
  10180. break
  10181. }
  10182. }
  10183. }
  10184. // keep copies of post queues before resetting state
  10185. var activatedQueue = activatedChildren.slice();
  10186. var updatedQueue = queue.slice();
  10187. resetSchedulerState();
  10188. // call component updated and activated hooks
  10189. callActivatedHooks(activatedQueue);
  10190. callUpdatedHooks(updatedQueue);
  10191. // devtool hook
  10192. /* istanbul ignore if */
  10193. if (devtools && config.devtools) {
  10194. devtools.emit('flush');
  10195. }
  10196. }
  10197. function callUpdatedHooks (queue) {
  10198. var i = queue.length;
  10199. while (i--) {
  10200. var watcher = queue[i];
  10201. var vm = watcher.vm;
  10202. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  10203. callHook(vm, 'updated');
  10204. }
  10205. }
  10206. }
  10207. /**
  10208. * Queue a kept-alive component that was activated during patch.
  10209. * The queue will be processed after the entire tree has been patched.
  10210. */
  10211. function queueActivatedComponent (vm) {
  10212. // setting _inactive to false here so that a render function can
  10213. // rely on checking whether it's in an inactive tree (e.g. router-view)
  10214. vm._inactive = false;
  10215. activatedChildren.push(vm);
  10216. }
  10217. function callActivatedHooks (queue) {
  10218. for (var i = 0; i < queue.length; i++) {
  10219. queue[i]._inactive = true;
  10220. activateChildComponent(queue[i], true /* true */);
  10221. }
  10222. }
  10223. /**
  10224. * Push a watcher into the watcher queue.
  10225. * Jobs with duplicate IDs will be skipped unless it's
  10226. * pushed when the queue is being flushed.
  10227. */
  10228. function queueWatcher (watcher) {
  10229. var id = watcher.id;
  10230. if (has[id] == null) {
  10231. has[id] = true;
  10232. if (!flushing) {
  10233. queue.push(watcher);
  10234. } else {
  10235. // if already flushing, splice the watcher based on its id
  10236. // if already past its id, it will be run next immediately.
  10237. var i = queue.length - 1;
  10238. while (i > index && queue[i].id > watcher.id) {
  10239. i--;
  10240. }
  10241. queue.splice(i + 1, 0, watcher);
  10242. }
  10243. // queue the flush
  10244. if (!waiting) {
  10245. waiting = true;
  10246. if ( true && !config.async) {
  10247. flushSchedulerQueue();
  10248. return
  10249. }
  10250. nextTick(flushSchedulerQueue);
  10251. }
  10252. }
  10253. }
  10254. /* */
  10255. var uid$2 = 0;
  10256. /**
  10257. * A watcher parses an expression, collects dependencies,
  10258. * and fires callback when the expression value changes.
  10259. * This is used for both the $watch() api and directives.
  10260. */
  10261. var Watcher = function Watcher (
  10262. vm,
  10263. expOrFn,
  10264. cb,
  10265. options,
  10266. isRenderWatcher
  10267. ) {
  10268. this.vm = vm;
  10269. if (isRenderWatcher) {
  10270. vm._watcher = this;
  10271. }
  10272. vm._watchers.push(this);
  10273. // options
  10274. if (options) {
  10275. this.deep = !!options.deep;
  10276. this.user = !!options.user;
  10277. this.lazy = !!options.lazy;
  10278. this.sync = !!options.sync;
  10279. this.before = options.before;
  10280. } else {
  10281. this.deep = this.user = this.lazy = this.sync = false;
  10282. }
  10283. this.cb = cb;
  10284. this.id = ++uid$2; // uid for batching
  10285. this.active = true;
  10286. this.dirty = this.lazy; // for lazy watchers
  10287. this.deps = [];
  10288. this.newDeps = [];
  10289. this.depIds = new _Set();
  10290. this.newDepIds = new _Set();
  10291. this.expression = true
  10292. ? expOrFn.toString()
  10293. : undefined;
  10294. // parse expression for getter
  10295. if (typeof expOrFn === 'function') {
  10296. this.getter = expOrFn;
  10297. } else {
  10298. this.getter = parsePath(expOrFn);
  10299. if (!this.getter) {
  10300. this.getter = noop;
  10301. true && warn(
  10302. "Failed watching path: \"" + expOrFn + "\" " +
  10303. 'Watcher only accepts simple dot-delimited paths. ' +
  10304. 'For full control, use a function instead.',
  10305. vm
  10306. );
  10307. }
  10308. }
  10309. this.value = this.lazy
  10310. ? undefined
  10311. : this.get();
  10312. };
  10313. /**
  10314. * Evaluate the getter, and re-collect dependencies.
  10315. */
  10316. Watcher.prototype.get = function get () {
  10317. pushTarget(this);
  10318. var value;
  10319. var vm = this.vm;
  10320. try {
  10321. value = this.getter.call(vm, vm);
  10322. } catch (e) {
  10323. if (this.user) {
  10324. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  10325. } else {
  10326. throw e
  10327. }
  10328. } finally {
  10329. // "touch" every property so they are all tracked as
  10330. // dependencies for deep watching
  10331. if (this.deep) {
  10332. traverse(value);
  10333. }
  10334. popTarget();
  10335. this.cleanupDeps();
  10336. }
  10337. return value
  10338. };
  10339. /**
  10340. * Add a dependency to this directive.
  10341. */
  10342. Watcher.prototype.addDep = function addDep (dep) {
  10343. var id = dep.id;
  10344. if (!this.newDepIds.has(id)) {
  10345. this.newDepIds.add(id);
  10346. this.newDeps.push(dep);
  10347. if (!this.depIds.has(id)) {
  10348. dep.addSub(this);
  10349. }
  10350. }
  10351. };
  10352. /**
  10353. * Clean up for dependency collection.
  10354. */
  10355. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  10356. var i = this.deps.length;
  10357. while (i--) {
  10358. var dep = this.deps[i];
  10359. if (!this.newDepIds.has(dep.id)) {
  10360. dep.removeSub(this);
  10361. }
  10362. }
  10363. var tmp = this.depIds;
  10364. this.depIds = this.newDepIds;
  10365. this.newDepIds = tmp;
  10366. this.newDepIds.clear();
  10367. tmp = this.deps;
  10368. this.deps = this.newDeps;
  10369. this.newDeps = tmp;
  10370. this.newDeps.length = 0;
  10371. };
  10372. /**
  10373. * Subscriber interface.
  10374. * Will be called when a dependency changes.
  10375. */
  10376. Watcher.prototype.update = function update () {
  10377. /* istanbul ignore else */
  10378. if (this.lazy) {
  10379. this.dirty = true;
  10380. } else if (this.sync) {
  10381. this.run();
  10382. } else {
  10383. queueWatcher(this);
  10384. }
  10385. };
  10386. /**
  10387. * Scheduler job interface.
  10388. * Will be called by the scheduler.
  10389. */
  10390. Watcher.prototype.run = function run () {
  10391. if (this.active) {
  10392. var value = this.get();
  10393. if (
  10394. value !== this.value ||
  10395. // Deep watchers and watchers on Object/Arrays should fire even
  10396. // when the value is the same, because the value may
  10397. // have mutated.
  10398. isObject(value) ||
  10399. this.deep
  10400. ) {
  10401. // set new value
  10402. var oldValue = this.value;
  10403. this.value = value;
  10404. if (this.user) {
  10405. try {
  10406. this.cb.call(this.vm, value, oldValue);
  10407. } catch (e) {
  10408. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  10409. }
  10410. } else {
  10411. this.cb.call(this.vm, value, oldValue);
  10412. }
  10413. }
  10414. }
  10415. };
  10416. /**
  10417. * Evaluate the value of the watcher.
  10418. * This only gets called for lazy watchers.
  10419. */
  10420. Watcher.prototype.evaluate = function evaluate () {
  10421. this.value = this.get();
  10422. this.dirty = false;
  10423. };
  10424. /**
  10425. * Depend on all deps collected by this watcher.
  10426. */
  10427. Watcher.prototype.depend = function depend () {
  10428. var i = this.deps.length;
  10429. while (i--) {
  10430. this.deps[i].depend();
  10431. }
  10432. };
  10433. /**
  10434. * Remove self from all dependencies' subscriber list.
  10435. */
  10436. Watcher.prototype.teardown = function teardown () {
  10437. if (this.active) {
  10438. // remove self from vm's watcher list
  10439. // this is a somewhat expensive operation so we skip it
  10440. // if the vm is being destroyed.
  10441. if (!this.vm._isBeingDestroyed) {
  10442. remove(this.vm._watchers, this);
  10443. }
  10444. var i = this.deps.length;
  10445. while (i--) {
  10446. this.deps[i].removeSub(this);
  10447. }
  10448. this.active = false;
  10449. }
  10450. };
  10451. /* */
  10452. var sharedPropertyDefinition = {
  10453. enumerable: true,
  10454. configurable: true,
  10455. get: noop,
  10456. set: noop
  10457. };
  10458. function proxy (target, sourceKey, key) {
  10459. sharedPropertyDefinition.get = function proxyGetter () {
  10460. return this[sourceKey][key]
  10461. };
  10462. sharedPropertyDefinition.set = function proxySetter (val) {
  10463. this[sourceKey][key] = val;
  10464. };
  10465. Object.defineProperty(target, key, sharedPropertyDefinition);
  10466. }
  10467. function initState (vm) {
  10468. vm._watchers = [];
  10469. var opts = vm.$options;
  10470. if (opts.props) { initProps(vm, opts.props); }
  10471. if (opts.methods) { initMethods(vm, opts.methods); }
  10472. if (opts.data) {
  10473. initData(vm);
  10474. } else {
  10475. observe(vm._data = {}, true /* asRootData */);
  10476. }
  10477. if (opts.computed) { initComputed(vm, opts.computed); }
  10478. if (opts.watch && opts.watch !== nativeWatch) {
  10479. initWatch(vm, opts.watch);
  10480. }
  10481. }
  10482. function initProps (vm, propsOptions) {
  10483. var propsData = vm.$options.propsData || {};
  10484. var props = vm._props = {};
  10485. // cache prop keys so that future props updates can iterate using Array
  10486. // instead of dynamic object key enumeration.
  10487. var keys = vm.$options._propKeys = [];
  10488. var isRoot = !vm.$parent;
  10489. // root instance props should be converted
  10490. if (!isRoot) {
  10491. toggleObserving(false);
  10492. }
  10493. var loop = function ( key ) {
  10494. keys.push(key);
  10495. var value = validateProp(key, propsOptions, propsData, vm);
  10496. /* istanbul ignore else */
  10497. if (true) {
  10498. var hyphenatedKey = hyphenate(key);
  10499. if (isReservedAttribute(hyphenatedKey) ||
  10500. config.isReservedAttr(hyphenatedKey)) {
  10501. warn(
  10502. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  10503. vm
  10504. );
  10505. }
  10506. defineReactive$$1(props, key, value, function () {
  10507. if (!isRoot && !isUpdatingChildComponent) {
  10508. {
  10509. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  10510. return
  10511. }
  10512. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  10513. if(
  10514. key === 'value' &&
  10515. Array.isArray(vm.$options.behaviors) &&
  10516. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  10517. ){
  10518. return
  10519. }
  10520. if(vm._getFormData){
  10521. return
  10522. }
  10523. var $parent = vm.$parent;
  10524. while($parent){
  10525. if($parent.__next_tick_pending){
  10526. return
  10527. }
  10528. $parent = $parent.$parent;
  10529. }
  10530. }
  10531. warn(
  10532. "Avoid mutating a prop directly since the value will be " +
  10533. "overwritten whenever the parent component re-renders. " +
  10534. "Instead, use a data or computed property based on the prop's " +
  10535. "value. Prop being mutated: \"" + key + "\"",
  10536. vm
  10537. );
  10538. }
  10539. });
  10540. } else {}
  10541. // static props are already proxied on the component's prototype
  10542. // during Vue.extend(). We only need to proxy props defined at
  10543. // instantiation here.
  10544. if (!(key in vm)) {
  10545. proxy(vm, "_props", key);
  10546. }
  10547. };
  10548. for (var key in propsOptions) loop( key );
  10549. toggleObserving(true);
  10550. }
  10551. function initData (vm) {
  10552. var data = vm.$options.data;
  10553. data = vm._data = typeof data === 'function'
  10554. ? getData(data, vm)
  10555. : data || {};
  10556. if (!isPlainObject(data)) {
  10557. data = {};
  10558. true && warn(
  10559. 'data functions should return an object:\n' +
  10560. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  10561. vm
  10562. );
  10563. }
  10564. // proxy data on instance
  10565. var keys = Object.keys(data);
  10566. var props = vm.$options.props;
  10567. var methods = vm.$options.methods;
  10568. var i = keys.length;
  10569. while (i--) {
  10570. var key = keys[i];
  10571. if (true) {
  10572. if (methods && hasOwn(methods, key)) {
  10573. warn(
  10574. ("Method \"" + key + "\" has already been defined as a data property."),
  10575. vm
  10576. );
  10577. }
  10578. }
  10579. if (props && hasOwn(props, key)) {
  10580. true && warn(
  10581. "The data property \"" + key + "\" is already declared as a prop. " +
  10582. "Use prop default value instead.",
  10583. vm
  10584. );
  10585. } else if (!isReserved(key)) {
  10586. proxy(vm, "_data", key);
  10587. }
  10588. }
  10589. // observe data
  10590. observe(data, true /* asRootData */);
  10591. }
  10592. function getData (data, vm) {
  10593. // #7573 disable dep collection when invoking data getters
  10594. pushTarget();
  10595. try {
  10596. return data.call(vm, vm)
  10597. } catch (e) {
  10598. handleError(e, vm, "data()");
  10599. return {}
  10600. } finally {
  10601. popTarget();
  10602. }
  10603. }
  10604. var computedWatcherOptions = { lazy: true };
  10605. function initComputed (vm, computed) {
  10606. // $flow-disable-line
  10607. var watchers = vm._computedWatchers = Object.create(null);
  10608. // computed properties are just getters during SSR
  10609. var isSSR = isServerRendering();
  10610. for (var key in computed) {
  10611. var userDef = computed[key];
  10612. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  10613. if ( true && getter == null) {
  10614. warn(
  10615. ("Getter is missing for computed property \"" + key + "\"."),
  10616. vm
  10617. );
  10618. }
  10619. if (!isSSR) {
  10620. // create internal watcher for the computed property.
  10621. watchers[key] = new Watcher(
  10622. vm,
  10623. getter || noop,
  10624. noop,
  10625. computedWatcherOptions
  10626. );
  10627. }
  10628. // component-defined computed properties are already defined on the
  10629. // component prototype. We only need to define computed properties defined
  10630. // at instantiation here.
  10631. if (!(key in vm)) {
  10632. defineComputed(vm, key, userDef);
  10633. } else if (true) {
  10634. if (key in vm.$data) {
  10635. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  10636. } else if (vm.$options.props && key in vm.$options.props) {
  10637. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  10638. }
  10639. }
  10640. }
  10641. }
  10642. function defineComputed (
  10643. target,
  10644. key,
  10645. userDef
  10646. ) {
  10647. var shouldCache = !isServerRendering();
  10648. if (typeof userDef === 'function') {
  10649. sharedPropertyDefinition.get = shouldCache
  10650. ? createComputedGetter(key)
  10651. : createGetterInvoker(userDef);
  10652. sharedPropertyDefinition.set = noop;
  10653. } else {
  10654. sharedPropertyDefinition.get = userDef.get
  10655. ? shouldCache && userDef.cache !== false
  10656. ? createComputedGetter(key)
  10657. : createGetterInvoker(userDef.get)
  10658. : noop;
  10659. sharedPropertyDefinition.set = userDef.set || noop;
  10660. }
  10661. if ( true &&
  10662. sharedPropertyDefinition.set === noop) {
  10663. sharedPropertyDefinition.set = function () {
  10664. warn(
  10665. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  10666. this
  10667. );
  10668. };
  10669. }
  10670. Object.defineProperty(target, key, sharedPropertyDefinition);
  10671. }
  10672. function createComputedGetter (key) {
  10673. return function computedGetter () {
  10674. var watcher = this._computedWatchers && this._computedWatchers[key];
  10675. if (watcher) {
  10676. if (watcher.dirty) {
  10677. watcher.evaluate();
  10678. }
  10679. if (Dep.SharedObject.target) {// fixed by xxxxxx
  10680. watcher.depend();
  10681. }
  10682. return watcher.value
  10683. }
  10684. }
  10685. }
  10686. function createGetterInvoker(fn) {
  10687. return function computedGetter () {
  10688. return fn.call(this, this)
  10689. }
  10690. }
  10691. function initMethods (vm, methods) {
  10692. var props = vm.$options.props;
  10693. for (var key in methods) {
  10694. if (true) {
  10695. if (typeof methods[key] !== 'function') {
  10696. warn(
  10697. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  10698. "Did you reference the function correctly?",
  10699. vm
  10700. );
  10701. }
  10702. if (props && hasOwn(props, key)) {
  10703. warn(
  10704. ("Method \"" + key + "\" has already been defined as a prop."),
  10705. vm
  10706. );
  10707. }
  10708. if ((key in vm) && isReserved(key)) {
  10709. warn(
  10710. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  10711. "Avoid defining component methods that start with _ or $."
  10712. );
  10713. }
  10714. }
  10715. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  10716. }
  10717. }
  10718. function initWatch (vm, watch) {
  10719. for (var key in watch) {
  10720. var handler = watch[key];
  10721. if (Array.isArray(handler)) {
  10722. for (var i = 0; i < handler.length; i++) {
  10723. createWatcher(vm, key, handler[i]);
  10724. }
  10725. } else {
  10726. createWatcher(vm, key, handler);
  10727. }
  10728. }
  10729. }
  10730. function createWatcher (
  10731. vm,
  10732. expOrFn,
  10733. handler,
  10734. options
  10735. ) {
  10736. if (isPlainObject(handler)) {
  10737. options = handler;
  10738. handler = handler.handler;
  10739. }
  10740. if (typeof handler === 'string') {
  10741. handler = vm[handler];
  10742. }
  10743. return vm.$watch(expOrFn, handler, options)
  10744. }
  10745. function stateMixin (Vue) {
  10746. // flow somehow has problems with directly declared definition object
  10747. // when using Object.defineProperty, so we have to procedurally build up
  10748. // the object here.
  10749. var dataDef = {};
  10750. dataDef.get = function () { return this._data };
  10751. var propsDef = {};
  10752. propsDef.get = function () { return this._props };
  10753. if (true) {
  10754. dataDef.set = function () {
  10755. warn(
  10756. 'Avoid replacing instance root $data. ' +
  10757. 'Use nested data properties instead.',
  10758. this
  10759. );
  10760. };
  10761. propsDef.set = function () {
  10762. warn("$props is readonly.", this);
  10763. };
  10764. }
  10765. Object.defineProperty(Vue.prototype, '$data', dataDef);
  10766. Object.defineProperty(Vue.prototype, '$props', propsDef);
  10767. Vue.prototype.$set = set;
  10768. Vue.prototype.$delete = del;
  10769. Vue.prototype.$watch = function (
  10770. expOrFn,
  10771. cb,
  10772. options
  10773. ) {
  10774. var vm = this;
  10775. if (isPlainObject(cb)) {
  10776. return createWatcher(vm, expOrFn, cb, options)
  10777. }
  10778. options = options || {};
  10779. options.user = true;
  10780. var watcher = new Watcher(vm, expOrFn, cb, options);
  10781. if (options.immediate) {
  10782. try {
  10783. cb.call(vm, watcher.value);
  10784. } catch (error) {
  10785. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  10786. }
  10787. }
  10788. return function unwatchFn () {
  10789. watcher.teardown();
  10790. }
  10791. };
  10792. }
  10793. /* */
  10794. var uid$3 = 0;
  10795. function initMixin (Vue) {
  10796. Vue.prototype._init = function (options) {
  10797. var vm = this;
  10798. // a uid
  10799. vm._uid = uid$3++;
  10800. var startTag, endTag;
  10801. /* istanbul ignore if */
  10802. if ( true && config.performance && mark) {
  10803. startTag = "vue-perf-start:" + (vm._uid);
  10804. endTag = "vue-perf-end:" + (vm._uid);
  10805. mark(startTag);
  10806. }
  10807. // a flag to avoid this being observed
  10808. vm._isVue = true;
  10809. // merge options
  10810. if (options && options._isComponent) {
  10811. // optimize internal component instantiation
  10812. // since dynamic options merging is pretty slow, and none of the
  10813. // internal component options needs special treatment.
  10814. initInternalComponent(vm, options);
  10815. } else {
  10816. vm.$options = mergeOptions(
  10817. resolveConstructorOptions(vm.constructor),
  10818. options || {},
  10819. vm
  10820. );
  10821. }
  10822. /* istanbul ignore else */
  10823. if (true) {
  10824. initProxy(vm);
  10825. } else {}
  10826. // expose real self
  10827. vm._self = vm;
  10828. initLifecycle(vm);
  10829. initEvents(vm);
  10830. initRender(vm);
  10831. callHook(vm, 'beforeCreate');
  10832. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  10833. initState(vm);
  10834. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  10835. !vm._$fallback && callHook(vm, 'created');
  10836. /* istanbul ignore if */
  10837. if ( true && config.performance && mark) {
  10838. vm._name = formatComponentName(vm, false);
  10839. mark(endTag);
  10840. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  10841. }
  10842. if (vm.$options.el) {
  10843. vm.$mount(vm.$options.el);
  10844. }
  10845. };
  10846. }
  10847. function initInternalComponent (vm, options) {
  10848. var opts = vm.$options = Object.create(vm.constructor.options);
  10849. // doing this because it's faster than dynamic enumeration.
  10850. var parentVnode = options._parentVnode;
  10851. opts.parent = options.parent;
  10852. opts._parentVnode = parentVnode;
  10853. var vnodeComponentOptions = parentVnode.componentOptions;
  10854. opts.propsData = vnodeComponentOptions.propsData;
  10855. opts._parentListeners = vnodeComponentOptions.listeners;
  10856. opts._renderChildren = vnodeComponentOptions.children;
  10857. opts._componentTag = vnodeComponentOptions.tag;
  10858. if (options.render) {
  10859. opts.render = options.render;
  10860. opts.staticRenderFns = options.staticRenderFns;
  10861. }
  10862. }
  10863. function resolveConstructorOptions (Ctor) {
  10864. var options = Ctor.options;
  10865. if (Ctor.super) {
  10866. var superOptions = resolveConstructorOptions(Ctor.super);
  10867. var cachedSuperOptions = Ctor.superOptions;
  10868. if (superOptions !== cachedSuperOptions) {
  10869. // super option changed,
  10870. // need to resolve new options.
  10871. Ctor.superOptions = superOptions;
  10872. // check if there are any late-modified/attached options (#4976)
  10873. var modifiedOptions = resolveModifiedOptions(Ctor);
  10874. // update base extend options
  10875. if (modifiedOptions) {
  10876. extend(Ctor.extendOptions, modifiedOptions);
  10877. }
  10878. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  10879. if (options.name) {
  10880. options.components[options.name] = Ctor;
  10881. }
  10882. }
  10883. }
  10884. return options
  10885. }
  10886. function resolveModifiedOptions (Ctor) {
  10887. var modified;
  10888. var latest = Ctor.options;
  10889. var sealed = Ctor.sealedOptions;
  10890. for (var key in latest) {
  10891. if (latest[key] !== sealed[key]) {
  10892. if (!modified) { modified = {}; }
  10893. modified[key] = latest[key];
  10894. }
  10895. }
  10896. return modified
  10897. }
  10898. function Vue (options) {
  10899. if ( true &&
  10900. !(this instanceof Vue)
  10901. ) {
  10902. warn('Vue is a constructor and should be called with the `new` keyword');
  10903. }
  10904. this._init(options);
  10905. }
  10906. initMixin(Vue);
  10907. stateMixin(Vue);
  10908. eventsMixin(Vue);
  10909. lifecycleMixin(Vue);
  10910. renderMixin(Vue);
  10911. /* */
  10912. function initUse (Vue) {
  10913. Vue.use = function (plugin) {
  10914. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  10915. if (installedPlugins.indexOf(plugin) > -1) {
  10916. return this
  10917. }
  10918. // additional parameters
  10919. var args = toArray(arguments, 1);
  10920. args.unshift(this);
  10921. if (typeof plugin.install === 'function') {
  10922. plugin.install.apply(plugin, args);
  10923. } else if (typeof plugin === 'function') {
  10924. plugin.apply(null, args);
  10925. }
  10926. installedPlugins.push(plugin);
  10927. return this
  10928. };
  10929. }
  10930. /* */
  10931. function initMixin$1 (Vue) {
  10932. Vue.mixin = function (mixin) {
  10933. this.options = mergeOptions(this.options, mixin);
  10934. return this
  10935. };
  10936. }
  10937. /* */
  10938. function initExtend (Vue) {
  10939. /**
  10940. * Each instance constructor, including Vue, has a unique
  10941. * cid. This enables us to create wrapped "child
  10942. * constructors" for prototypal inheritance and cache them.
  10943. */
  10944. Vue.cid = 0;
  10945. var cid = 1;
  10946. /**
  10947. * Class inheritance
  10948. */
  10949. Vue.extend = function (extendOptions) {
  10950. extendOptions = extendOptions || {};
  10951. var Super = this;
  10952. var SuperId = Super.cid;
  10953. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  10954. if (cachedCtors[SuperId]) {
  10955. return cachedCtors[SuperId]
  10956. }
  10957. var name = extendOptions.name || Super.options.name;
  10958. if ( true && name) {
  10959. validateComponentName(name);
  10960. }
  10961. var Sub = function VueComponent (options) {
  10962. this._init(options);
  10963. };
  10964. Sub.prototype = Object.create(Super.prototype);
  10965. Sub.prototype.constructor = Sub;
  10966. Sub.cid = cid++;
  10967. Sub.options = mergeOptions(
  10968. Super.options,
  10969. extendOptions
  10970. );
  10971. Sub['super'] = Super;
  10972. // For props and computed properties, we define the proxy getters on
  10973. // the Vue instances at extension time, on the extended prototype. This
  10974. // avoids Object.defineProperty calls for each instance created.
  10975. if (Sub.options.props) {
  10976. initProps$1(Sub);
  10977. }
  10978. if (Sub.options.computed) {
  10979. initComputed$1(Sub);
  10980. }
  10981. // allow further extension/mixin/plugin usage
  10982. Sub.extend = Super.extend;
  10983. Sub.mixin = Super.mixin;
  10984. Sub.use = Super.use;
  10985. // create asset registers, so extended classes
  10986. // can have their private assets too.
  10987. ASSET_TYPES.forEach(function (type) {
  10988. Sub[type] = Super[type];
  10989. });
  10990. // enable recursive self-lookup
  10991. if (name) {
  10992. Sub.options.components[name] = Sub;
  10993. }
  10994. // keep a reference to the super options at extension time.
  10995. // later at instantiation we can check if Super's options have
  10996. // been updated.
  10997. Sub.superOptions = Super.options;
  10998. Sub.extendOptions = extendOptions;
  10999. Sub.sealedOptions = extend({}, Sub.options);
  11000. // cache constructor
  11001. cachedCtors[SuperId] = Sub;
  11002. return Sub
  11003. };
  11004. }
  11005. function initProps$1 (Comp) {
  11006. var props = Comp.options.props;
  11007. for (var key in props) {
  11008. proxy(Comp.prototype, "_props", key);
  11009. }
  11010. }
  11011. function initComputed$1 (Comp) {
  11012. var computed = Comp.options.computed;
  11013. for (var key in computed) {
  11014. defineComputed(Comp.prototype, key, computed[key]);
  11015. }
  11016. }
  11017. /* */
  11018. function initAssetRegisters (Vue) {
  11019. /**
  11020. * Create asset registration methods.
  11021. */
  11022. ASSET_TYPES.forEach(function (type) {
  11023. Vue[type] = function (
  11024. id,
  11025. definition
  11026. ) {
  11027. if (!definition) {
  11028. return this.options[type + 's'][id]
  11029. } else {
  11030. /* istanbul ignore if */
  11031. if ( true && type === 'component') {
  11032. validateComponentName(id);
  11033. }
  11034. if (type === 'component' && isPlainObject(definition)) {
  11035. definition.name = definition.name || id;
  11036. definition = this.options._base.extend(definition);
  11037. }
  11038. if (type === 'directive' && typeof definition === 'function') {
  11039. definition = { bind: definition, update: definition };
  11040. }
  11041. this.options[type + 's'][id] = definition;
  11042. return definition
  11043. }
  11044. };
  11045. });
  11046. }
  11047. /* */
  11048. function getComponentName (opts) {
  11049. return opts && (opts.Ctor.options.name || opts.tag)
  11050. }
  11051. function matches (pattern, name) {
  11052. if (Array.isArray(pattern)) {
  11053. return pattern.indexOf(name) > -1
  11054. } else if (typeof pattern === 'string') {
  11055. return pattern.split(',').indexOf(name) > -1
  11056. } else if (isRegExp(pattern)) {
  11057. return pattern.test(name)
  11058. }
  11059. /* istanbul ignore next */
  11060. return false
  11061. }
  11062. function pruneCache (keepAliveInstance, filter) {
  11063. var cache = keepAliveInstance.cache;
  11064. var keys = keepAliveInstance.keys;
  11065. var _vnode = keepAliveInstance._vnode;
  11066. for (var key in cache) {
  11067. var cachedNode = cache[key];
  11068. if (cachedNode) {
  11069. var name = getComponentName(cachedNode.componentOptions);
  11070. if (name && !filter(name)) {
  11071. pruneCacheEntry(cache, key, keys, _vnode);
  11072. }
  11073. }
  11074. }
  11075. }
  11076. function pruneCacheEntry (
  11077. cache,
  11078. key,
  11079. keys,
  11080. current
  11081. ) {
  11082. var cached$$1 = cache[key];
  11083. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  11084. cached$$1.componentInstance.$destroy();
  11085. }
  11086. cache[key] = null;
  11087. remove(keys, key);
  11088. }
  11089. var patternTypes = [String, RegExp, Array];
  11090. var KeepAlive = {
  11091. name: 'keep-alive',
  11092. abstract: true,
  11093. props: {
  11094. include: patternTypes,
  11095. exclude: patternTypes,
  11096. max: [String, Number]
  11097. },
  11098. created: function created () {
  11099. this.cache = Object.create(null);
  11100. this.keys = [];
  11101. },
  11102. destroyed: function destroyed () {
  11103. for (var key in this.cache) {
  11104. pruneCacheEntry(this.cache, key, this.keys);
  11105. }
  11106. },
  11107. mounted: function mounted () {
  11108. var this$1 = this;
  11109. this.$watch('include', function (val) {
  11110. pruneCache(this$1, function (name) { return matches(val, name); });
  11111. });
  11112. this.$watch('exclude', function (val) {
  11113. pruneCache(this$1, function (name) { return !matches(val, name); });
  11114. });
  11115. },
  11116. render: function render () {
  11117. var slot = this.$slots.default;
  11118. var vnode = getFirstComponentChild(slot);
  11119. var componentOptions = vnode && vnode.componentOptions;
  11120. if (componentOptions) {
  11121. // check pattern
  11122. var name = getComponentName(componentOptions);
  11123. var ref = this;
  11124. var include = ref.include;
  11125. var exclude = ref.exclude;
  11126. if (
  11127. // not included
  11128. (include && (!name || !matches(include, name))) ||
  11129. // excluded
  11130. (exclude && name && matches(exclude, name))
  11131. ) {
  11132. return vnode
  11133. }
  11134. var ref$1 = this;
  11135. var cache = ref$1.cache;
  11136. var keys = ref$1.keys;
  11137. var key = vnode.key == null
  11138. // same constructor may get registered as different local components
  11139. // so cid alone is not enough (#3269)
  11140. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  11141. : vnode.key;
  11142. if (cache[key]) {
  11143. vnode.componentInstance = cache[key].componentInstance;
  11144. // make current key freshest
  11145. remove(keys, key);
  11146. keys.push(key);
  11147. } else {
  11148. cache[key] = vnode;
  11149. keys.push(key);
  11150. // prune oldest entry
  11151. if (this.max && keys.length > parseInt(this.max)) {
  11152. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  11153. }
  11154. }
  11155. vnode.data.keepAlive = true;
  11156. }
  11157. return vnode || (slot && slot[0])
  11158. }
  11159. };
  11160. var builtInComponents = {
  11161. KeepAlive: KeepAlive
  11162. };
  11163. /* */
  11164. function initGlobalAPI (Vue) {
  11165. // config
  11166. var configDef = {};
  11167. configDef.get = function () { return config; };
  11168. if (true) {
  11169. configDef.set = function () {
  11170. warn(
  11171. 'Do not replace the Vue.config object, set individual fields instead.'
  11172. );
  11173. };
  11174. }
  11175. Object.defineProperty(Vue, 'config', configDef);
  11176. // exposed util methods.
  11177. // NOTE: these are not considered part of the public API - avoid relying on
  11178. // them unless you are aware of the risk.
  11179. Vue.util = {
  11180. warn: warn,
  11181. extend: extend,
  11182. mergeOptions: mergeOptions,
  11183. defineReactive: defineReactive$$1
  11184. };
  11185. Vue.set = set;
  11186. Vue.delete = del;
  11187. Vue.nextTick = nextTick;
  11188. // 2.6 explicit observable API
  11189. Vue.observable = function (obj) {
  11190. observe(obj);
  11191. return obj
  11192. };
  11193. Vue.options = Object.create(null);
  11194. ASSET_TYPES.forEach(function (type) {
  11195. Vue.options[type + 's'] = Object.create(null);
  11196. });
  11197. // this is used to identify the "base" constructor to extend all plain-object
  11198. // components with in Weex's multi-instance scenarios.
  11199. Vue.options._base = Vue;
  11200. extend(Vue.options.components, builtInComponents);
  11201. initUse(Vue);
  11202. initMixin$1(Vue);
  11203. initExtend(Vue);
  11204. initAssetRegisters(Vue);
  11205. }
  11206. initGlobalAPI(Vue);
  11207. Object.defineProperty(Vue.prototype, '$isServer', {
  11208. get: isServerRendering
  11209. });
  11210. Object.defineProperty(Vue.prototype, '$ssrContext', {
  11211. get: function get () {
  11212. /* istanbul ignore next */
  11213. return this.$vnode && this.$vnode.ssrContext
  11214. }
  11215. });
  11216. // expose FunctionalRenderContext for ssr runtime helper installation
  11217. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  11218. value: FunctionalRenderContext
  11219. });
  11220. Vue.version = '2.6.11';
  11221. /**
  11222. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  11223. */
  11224. var ARRAYTYPE = '[object Array]';
  11225. var OBJECTTYPE = '[object Object]';
  11226. var NULLTYPE = '[object Null]';
  11227. var UNDEFINEDTYPE = '[object Undefined]';
  11228. // const FUNCTIONTYPE = '[object Function]'
  11229. function diff(current, pre) {
  11230. var result = {};
  11231. syncKeys(current, pre);
  11232. _diff(current, pre, '', result);
  11233. return result
  11234. }
  11235. function syncKeys(current, pre) {
  11236. if (current === pre) { return }
  11237. var rootCurrentType = type(current);
  11238. var rootPreType = type(pre);
  11239. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  11240. if(Object.keys(current).length >= Object.keys(pre).length){
  11241. for (var key in pre) {
  11242. var currentValue = current[key];
  11243. if (currentValue === undefined) {
  11244. current[key] = null;
  11245. } else {
  11246. syncKeys(currentValue, pre[key]);
  11247. }
  11248. }
  11249. }
  11250. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  11251. if (current.length >= pre.length) {
  11252. pre.forEach(function (item, index) {
  11253. syncKeys(current[index], item);
  11254. });
  11255. }
  11256. }
  11257. }
  11258. function nullOrUndefined(currentType, preType) {
  11259. if(
  11260. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  11261. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  11262. ) {
  11263. return false
  11264. }
  11265. return true
  11266. }
  11267. function _diff(current, pre, path, result) {
  11268. if (current === pre) { return }
  11269. var rootCurrentType = type(current);
  11270. var rootPreType = type(pre);
  11271. if (rootCurrentType == OBJECTTYPE) {
  11272. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  11273. setResult(result, path, current);
  11274. } else {
  11275. var loop = function ( key ) {
  11276. var currentValue = current[key];
  11277. var preValue = pre[key];
  11278. var currentType = type(currentValue);
  11279. var preType = type(preValue);
  11280. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  11281. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  11282. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  11283. }
  11284. } else if (currentType == ARRAYTYPE) {
  11285. if (preType != ARRAYTYPE) {
  11286. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  11287. } else {
  11288. if (currentValue.length < preValue.length) {
  11289. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  11290. } else {
  11291. currentValue.forEach(function (item, index) {
  11292. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  11293. });
  11294. }
  11295. }
  11296. } else if (currentType == OBJECTTYPE) {
  11297. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  11298. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  11299. } else {
  11300. for (var subKey in currentValue) {
  11301. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  11302. }
  11303. }
  11304. }
  11305. };
  11306. for (var key in current) loop( key );
  11307. }
  11308. } else if (rootCurrentType == ARRAYTYPE) {
  11309. if (rootPreType != ARRAYTYPE) {
  11310. setResult(result, path, current);
  11311. } else {
  11312. if (current.length < pre.length) {
  11313. setResult(result, path, current);
  11314. } else {
  11315. current.forEach(function (item, index) {
  11316. _diff(item, pre[index], path + '[' + index + ']', result);
  11317. });
  11318. }
  11319. }
  11320. } else {
  11321. setResult(result, path, current);
  11322. }
  11323. }
  11324. function setResult(result, k, v) {
  11325. // if (type(v) != FUNCTIONTYPE) {
  11326. result[k] = v;
  11327. // }
  11328. }
  11329. function type(obj) {
  11330. return Object.prototype.toString.call(obj)
  11331. }
  11332. /* */
  11333. function flushCallbacks$1(vm) {
  11334. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  11335. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"芯悦澜","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  11336. var mpInstance = vm.$scope;
  11337. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  11338. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  11339. }
  11340. var copies = vm.__next_tick_callbacks.slice(0);
  11341. vm.__next_tick_callbacks.length = 0;
  11342. for (var i = 0; i < copies.length; i++) {
  11343. copies[i]();
  11344. }
  11345. }
  11346. }
  11347. function hasRenderWatcher(vm) {
  11348. return queue.find(function (watcher) { return vm._watcher === watcher; })
  11349. }
  11350. function nextTick$1(vm, cb) {
  11351. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  11352. //2.nextTick 之前存在 render watcher
  11353. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  11354. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"芯悦澜","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  11355. var mpInstance = vm.$scope;
  11356. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  11357. ']:nextVueTick');
  11358. }
  11359. return nextTick(cb, vm)
  11360. }else{
  11361. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"芯悦澜","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  11362. var mpInstance$1 = vm.$scope;
  11363. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  11364. ']:nextMPTick');
  11365. }
  11366. }
  11367. var _resolve;
  11368. if (!vm.__next_tick_callbacks) {
  11369. vm.__next_tick_callbacks = [];
  11370. }
  11371. vm.__next_tick_callbacks.push(function () {
  11372. if (cb) {
  11373. try {
  11374. cb.call(vm);
  11375. } catch (e) {
  11376. handleError(e, vm, 'nextTick');
  11377. }
  11378. } else if (_resolve) {
  11379. _resolve(vm);
  11380. }
  11381. });
  11382. // $flow-disable-line
  11383. if (!cb && typeof Promise !== 'undefined') {
  11384. return new Promise(function (resolve) {
  11385. _resolve = resolve;
  11386. })
  11387. }
  11388. }
  11389. /* */
  11390. function clearInstance(key, value) {
  11391. // 简易去除 Vue 和小程序组件实例
  11392. if (value) {
  11393. if (value._isVue || value.__v_isMPComponent) {
  11394. return {}
  11395. }
  11396. }
  11397. return value
  11398. }
  11399. function cloneWithData(vm) {
  11400. // 确保当前 vm 所有数据被同步
  11401. var ret = Object.create(null);
  11402. var dataKeys = [].concat(
  11403. Object.keys(vm._data || {}),
  11404. Object.keys(vm._computedWatchers || {}));
  11405. dataKeys.reduce(function(ret, key) {
  11406. ret[key] = vm[key];
  11407. return ret
  11408. }, ret);
  11409. // vue-composition-api
  11410. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  11411. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  11412. if (rawBindings) {
  11413. Object.keys(rawBindings).forEach(function (key) {
  11414. ret[key] = vm[key];
  11415. });
  11416. }
  11417. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  11418. Object.assign(ret, vm.$mp.data || {});
  11419. if (
  11420. Array.isArray(vm.$options.behaviors) &&
  11421. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  11422. ) { //form-field
  11423. ret['name'] = vm.name;
  11424. ret['value'] = vm.value;
  11425. }
  11426. return JSON.parse(JSON.stringify(ret, clearInstance))
  11427. }
  11428. var patch = function(oldVnode, vnode) {
  11429. var this$1 = this;
  11430. if (vnode === null) { //destroy
  11431. return
  11432. }
  11433. if (this.mpType === 'page' || this.mpType === 'component') {
  11434. var mpInstance = this.$scope;
  11435. var data = Object.create(null);
  11436. try {
  11437. data = cloneWithData(this);
  11438. } catch (err) {
  11439. console.error(err);
  11440. }
  11441. data.__webviewId__ = mpInstance.data.__webviewId__;
  11442. var mpData = Object.create(null);
  11443. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  11444. mpData[key] = mpInstance.data[key];
  11445. });
  11446. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  11447. if (Object.keys(diffData).length) {
  11448. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"芯悦澜","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  11449. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  11450. ']差量更新',
  11451. JSON.stringify(diffData));
  11452. }
  11453. this.__next_tick_pending = true;
  11454. mpInstance.setData(diffData, function () {
  11455. this$1.__next_tick_pending = false;
  11456. flushCallbacks$1(this$1);
  11457. });
  11458. } else {
  11459. flushCallbacks$1(this);
  11460. }
  11461. }
  11462. };
  11463. /* */
  11464. function createEmptyRender() {
  11465. }
  11466. function mountComponent$1(
  11467. vm,
  11468. el,
  11469. hydrating
  11470. ) {
  11471. if (!vm.mpType) {//main.js 中的 new Vue
  11472. return vm
  11473. }
  11474. if (vm.mpType === 'app') {
  11475. vm.$options.render = createEmptyRender;
  11476. }
  11477. if (!vm.$options.render) {
  11478. vm.$options.render = createEmptyRender;
  11479. if (true) {
  11480. /* istanbul ignore if */
  11481. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  11482. vm.$options.el || el) {
  11483. warn(
  11484. 'You are using the runtime-only build of Vue where the template ' +
  11485. 'compiler is not available. Either pre-compile the templates into ' +
  11486. 'render functions, or use the compiler-included build.',
  11487. vm
  11488. );
  11489. } else {
  11490. warn(
  11491. 'Failed to mount component: template or render function not defined.',
  11492. vm
  11493. );
  11494. }
  11495. }
  11496. }
  11497. !vm._$fallback && callHook(vm, 'beforeMount');
  11498. var updateComponent = function () {
  11499. vm._update(vm._render(), hydrating);
  11500. };
  11501. // we set this to vm._watcher inside the watcher's constructor
  11502. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  11503. // component's mounted hook), which relies on vm._watcher being already defined
  11504. new Watcher(vm, updateComponent, noop, {
  11505. before: function before() {
  11506. if (vm._isMounted && !vm._isDestroyed) {
  11507. callHook(vm, 'beforeUpdate');
  11508. }
  11509. }
  11510. }, true /* isRenderWatcher */);
  11511. hydrating = false;
  11512. return vm
  11513. }
  11514. /* */
  11515. function renderClass (
  11516. staticClass,
  11517. dynamicClass
  11518. ) {
  11519. if (isDef(staticClass) || isDef(dynamicClass)) {
  11520. return concat(staticClass, stringifyClass(dynamicClass))
  11521. }
  11522. /* istanbul ignore next */
  11523. return ''
  11524. }
  11525. function concat (a, b) {
  11526. return a ? b ? (a + ' ' + b) : a : (b || '')
  11527. }
  11528. function stringifyClass (value) {
  11529. if (Array.isArray(value)) {
  11530. return stringifyArray(value)
  11531. }
  11532. if (isObject(value)) {
  11533. return stringifyObject(value)
  11534. }
  11535. if (typeof value === 'string') {
  11536. return value
  11537. }
  11538. /* istanbul ignore next */
  11539. return ''
  11540. }
  11541. function stringifyArray (value) {
  11542. var res = '';
  11543. var stringified;
  11544. for (var i = 0, l = value.length; i < l; i++) {
  11545. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  11546. if (res) { res += ' '; }
  11547. res += stringified;
  11548. }
  11549. }
  11550. return res
  11551. }
  11552. function stringifyObject (value) {
  11553. var res = '';
  11554. for (var key in value) {
  11555. if (value[key]) {
  11556. if (res) { res += ' '; }
  11557. res += key;
  11558. }
  11559. }
  11560. return res
  11561. }
  11562. /* */
  11563. var parseStyleText = cached(function (cssText) {
  11564. var res = {};
  11565. var listDelimiter = /;(?![^(]*\))/g;
  11566. var propertyDelimiter = /:(.+)/;
  11567. cssText.split(listDelimiter).forEach(function (item) {
  11568. if (item) {
  11569. var tmp = item.split(propertyDelimiter);
  11570. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  11571. }
  11572. });
  11573. return res
  11574. });
  11575. // normalize possible array / string values into Object
  11576. function normalizeStyleBinding (bindingStyle) {
  11577. if (Array.isArray(bindingStyle)) {
  11578. return toObject(bindingStyle)
  11579. }
  11580. if (typeof bindingStyle === 'string') {
  11581. return parseStyleText(bindingStyle)
  11582. }
  11583. return bindingStyle
  11584. }
  11585. /* */
  11586. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  11587. function getTarget(obj, path) {
  11588. var parts = path.split('.');
  11589. var key = parts[0];
  11590. if (key.indexOf('__$n') === 0) { //number index
  11591. key = parseInt(key.replace('__$n', ''));
  11592. }
  11593. if (parts.length === 1) {
  11594. return obj[key]
  11595. }
  11596. return getTarget(obj[key], parts.slice(1).join('.'))
  11597. }
  11598. function internalMixin(Vue) {
  11599. Vue.config.errorHandler = function(err, vm, info) {
  11600. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  11601. console.error(err);
  11602. /* eslint-disable no-undef */
  11603. var app = typeof getApp === 'function' && getApp();
  11604. if (app && app.onError) {
  11605. app.onError(err);
  11606. }
  11607. };
  11608. var oldEmit = Vue.prototype.$emit;
  11609. Vue.prototype.$emit = function(event) {
  11610. if (this.$scope && event) {
  11611. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  11612. if (triggerEvent) {
  11613. try {
  11614. triggerEvent.call(this.$scope, event, {
  11615. __args__: toArray(arguments, 1)
  11616. });
  11617. } catch (error) {
  11618. }
  11619. }
  11620. }
  11621. return oldEmit.apply(this, arguments)
  11622. };
  11623. Vue.prototype.$nextTick = function(fn) {
  11624. return nextTick$1(this, fn)
  11625. };
  11626. MP_METHODS.forEach(function (method) {
  11627. Vue.prototype[method] = function(args) {
  11628. if (this.$scope && this.$scope[method]) {
  11629. return this.$scope[method](args)
  11630. }
  11631. // mp-alipay
  11632. if (typeof my === 'undefined') {
  11633. return
  11634. }
  11635. if (method === 'createSelectorQuery') {
  11636. /* eslint-disable no-undef */
  11637. return my.createSelectorQuery(args)
  11638. } else if (method === 'createIntersectionObserver') {
  11639. /* eslint-disable no-undef */
  11640. return my.createIntersectionObserver(args)
  11641. }
  11642. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  11643. };
  11644. });
  11645. Vue.prototype.__init_provide = initProvide;
  11646. Vue.prototype.__init_injections = initInjections;
  11647. Vue.prototype.__call_hook = function(hook, args) {
  11648. var vm = this;
  11649. // #7573 disable dep collection when invoking lifecycle hooks
  11650. pushTarget();
  11651. var handlers = vm.$options[hook];
  11652. var info = hook + " hook";
  11653. var ret;
  11654. if (handlers) {
  11655. for (var i = 0, j = handlers.length; i < j; i++) {
  11656. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  11657. }
  11658. }
  11659. if (vm._hasHookEvent) {
  11660. vm.$emit('hook:' + hook, args);
  11661. }
  11662. popTarget();
  11663. return ret
  11664. };
  11665. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  11666. if (Array.isArray(modifiers)) {
  11667. if (modifiers.indexOf('trim') !== -1) {
  11668. value = value.trim();
  11669. }
  11670. if (modifiers.indexOf('number') !== -1) {
  11671. value = this._n(value);
  11672. }
  11673. }
  11674. if (!target) {
  11675. target = this;
  11676. }
  11677. // 解决动态属性添加
  11678. Vue.set(target, key, value);
  11679. };
  11680. Vue.prototype.__set_sync = function(target, key, value) {
  11681. if (!target) {
  11682. target = this;
  11683. }
  11684. // 解决动态属性添加
  11685. Vue.set(target, key, value);
  11686. };
  11687. Vue.prototype.__get_orig = function(item) {
  11688. if (isPlainObject(item)) {
  11689. return item['$orig'] || item
  11690. }
  11691. return item
  11692. };
  11693. Vue.prototype.__get_value = function(dataPath, target) {
  11694. return getTarget(target || this, dataPath)
  11695. };
  11696. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  11697. return renderClass(staticClass, dynamicClass)
  11698. };
  11699. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  11700. if (!dynamicStyle && !staticStyle) {
  11701. return ''
  11702. }
  11703. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  11704. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  11705. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  11706. };
  11707. Vue.prototype.__map = function(val, iteratee) {
  11708. //TODO 暂不考虑 string
  11709. var ret, i, l, keys, key;
  11710. if (Array.isArray(val)) {
  11711. ret = new Array(val.length);
  11712. for (i = 0, l = val.length; i < l; i++) {
  11713. ret[i] = iteratee(val[i], i);
  11714. }
  11715. return ret
  11716. } else if (isObject(val)) {
  11717. keys = Object.keys(val);
  11718. ret = Object.create(null);
  11719. for (i = 0, l = keys.length; i < l; i++) {
  11720. key = keys[i];
  11721. ret[key] = iteratee(val[key], key, i);
  11722. }
  11723. return ret
  11724. } else if (typeof val === 'number') {
  11725. ret = new Array(val);
  11726. for (i = 0, l = val; i < l; i++) {
  11727. // 第一个参数暂时仍和小程序一致
  11728. ret[i] = iteratee(i, i);
  11729. }
  11730. return ret
  11731. }
  11732. return []
  11733. };
  11734. }
  11735. /* */
  11736. var LIFECYCLE_HOOKS$1 = [
  11737. //App
  11738. 'onLaunch',
  11739. 'onShow',
  11740. 'onHide',
  11741. 'onUniNViewMessage',
  11742. 'onPageNotFound',
  11743. 'onThemeChange',
  11744. 'onError',
  11745. 'onUnhandledRejection',
  11746. //Page
  11747. 'onInit',
  11748. 'onLoad',
  11749. // 'onShow',
  11750. 'onReady',
  11751. // 'onHide',
  11752. 'onUnload',
  11753. 'onPullDownRefresh',
  11754. 'onReachBottom',
  11755. 'onTabItemTap',
  11756. 'onAddToFavorites',
  11757. 'onShareTimeline',
  11758. 'onShareAppMessage',
  11759. 'onResize',
  11760. 'onPageScroll',
  11761. 'onNavigationBarButtonTap',
  11762. 'onBackPress',
  11763. 'onNavigationBarSearchInputChanged',
  11764. 'onNavigationBarSearchInputConfirmed',
  11765. 'onNavigationBarSearchInputClicked',
  11766. 'onUploadDouyinVideo',
  11767. 'onNFCReadMessage',
  11768. //Component
  11769. // 'onReady', // 兼容旧版本,应该移除该事件
  11770. 'onPageShow',
  11771. 'onPageHide',
  11772. 'onPageResize'
  11773. ];
  11774. function lifecycleMixin$1(Vue) {
  11775. //fixed vue-class-component
  11776. var oldExtend = Vue.extend;
  11777. Vue.extend = function(extendOptions) {
  11778. extendOptions = extendOptions || {};
  11779. var methods = extendOptions.methods;
  11780. if (methods) {
  11781. Object.keys(methods).forEach(function (methodName) {
  11782. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  11783. extendOptions[methodName] = methods[methodName];
  11784. delete methods[methodName];
  11785. }
  11786. });
  11787. }
  11788. return oldExtend.call(this, extendOptions)
  11789. };
  11790. var strategies = Vue.config.optionMergeStrategies;
  11791. var mergeHook = strategies.created;
  11792. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  11793. strategies[hook] = mergeHook;
  11794. });
  11795. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  11796. }
  11797. /* */
  11798. // install platform patch function
  11799. Vue.prototype.__patch__ = patch;
  11800. // public mount method
  11801. Vue.prototype.$mount = function(
  11802. el ,
  11803. hydrating
  11804. ) {
  11805. return mountComponent$1(this, el, hydrating)
  11806. };
  11807. lifecycleMixin$1(Vue);
  11808. internalMixin(Vue);
  11809. /* */
  11810. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  11811. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  11812. /***/ }),
  11813. /***/ 26:
  11814. /*!***********************************!*\
  11815. !*** E:/项目/2023-8/xyl/pages.json ***!
  11816. \***********************************/
  11817. /*! no static exports found */
  11818. /***/ (function(module, exports) {
  11819. /***/ }),
  11820. /***/ 261:
  11821. /*!**********************************************!*\
  11822. !*** E:/项目/2023-8/xyl/api/functionalUnit.js ***!
  11823. \**********************************************/
  11824. /*! no static exports found */
  11825. /***/ (function(module, exports, __webpack_require__) {
  11826. "use strict";
  11827. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11828. Object.defineProperty(exports, "__esModule", {
  11829. value: true
  11830. });
  11831. exports.couponsOrder = couponsOrder;
  11832. exports.getCouponsList = getCouponsList;
  11833. exports.integral = integral;
  11834. exports.integrallist = integrallist;
  11835. exports.setCoupons = setCoupons;
  11836. exports.signList = signList;
  11837. exports.signUser = signUser;
  11838. var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 46));
  11839. //获取优惠券列表
  11840. function getCouponsList(data, types) {
  11841. //优惠券状态 0全部 1未使用 2已使用
  11842. return (0, _request.default)({
  11843. url: '/api/coupons/user/' + types,
  11844. method: 'get',
  11845. data: data
  11846. });
  11847. }
  11848. //领取优惠券
  11849. function setCoupons(data) {
  11850. return (0, _request.default)({
  11851. url: '/api/coupon/receive',
  11852. method: 'post',
  11853. data: data
  11854. });
  11855. }
  11856. //获取可使用优惠券
  11857. function couponsOrder(data, price) {
  11858. return (0, _request.default)({
  11859. url: '/api/coupons/order/' + price,
  11860. method: 'get',
  11861. data: data
  11862. });
  11863. }
  11864. // 积分列表
  11865. function integrallist(data) {
  11866. return (0, _request.default)({
  11867. url: '/api/integral/list',
  11868. method: 'get',
  11869. data: data
  11870. });
  11871. }
  11872. // 获取签到列表
  11873. function signList(data) {
  11874. return (0, _request.default)({
  11875. url: '/api/sign/list',
  11876. method: 'get',
  11877. data: data
  11878. });
  11879. }
  11880. // 点击签到
  11881. function integral(data) {
  11882. return (0, _request.default)({
  11883. url: '/api/sign/integral',
  11884. method: 'post',
  11885. data: data
  11886. });
  11887. }
  11888. // 签到信息
  11889. function signUser(data) {
  11890. return (0, _request.default)({
  11891. url: '/api/sign/user',
  11892. method: 'post',
  11893. data: data
  11894. });
  11895. }
  11896. /***/ }),
  11897. /***/ 27:
  11898. /*!***************************************!*\
  11899. !*** E:/项目/2023-8/xyl/store/index.js ***!
  11900. \***************************************/
  11901. /*! no static exports found */
  11902. /***/ (function(module, exports, __webpack_require__) {
  11903. "use strict";
  11904. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11905. Object.defineProperty(exports, "__esModule", {
  11906. value: true
  11907. });
  11908. exports.default = void 0;
  11909. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  11910. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 28));
  11911. var _user = _interopRequireDefault(__webpack_require__(/*! ./model/user */ 29));
  11912. _vue.default.use(_vuex.default);
  11913. var store = new _vuex.default.Store({
  11914. state: {
  11915. // baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置
  11916. baseURL: 'https://xyl.liuniukj.com',
  11917. //请求地址配置
  11918. urlFile: '/index',
  11919. //项目部署所在文件夹
  11920. userInfo: {},
  11921. //登录信息
  11922. loginInterceptor: false,
  11923. //是否打开强制登录
  11924. weichatInfo: {},
  11925. //保存微信注册信息
  11926. weichatObj: '',
  11927. //微信对象
  11928. latitude: '',
  11929. longitude: ''
  11930. },
  11931. mutations: {
  11932. setLat: function setLat(state, provider) {
  11933. state.latitude = provider;
  11934. },
  11935. setLon: function setLon(state, provider) {
  11936. state.longitude = provider;
  11937. },
  11938. //保存微信信息
  11939. setWeiChatInfo: function setWeiChatInfo(state, provider) {
  11940. state.weichatInfo = provider;
  11941. },
  11942. //保存微信对象
  11943. setWeiChatObj: function setWeiChatObj(state, provider) {
  11944. state.weichatObj = provider;
  11945. }
  11946. },
  11947. modules: {
  11948. user: _user.default
  11949. },
  11950. actions: {}
  11951. });
  11952. var _default = store;
  11953. exports.default = _default;
  11954. /***/ }),
  11955. /***/ 270:
  11956. /*!******************************************!*\
  11957. !*** E:/项目/2023-8/xyl/utils/rocessor.js ***!
  11958. \******************************************/
  11959. /*! no static exports found */
  11960. /***/ (function(module, exports, __webpack_require__) {
  11961. "use strict";
  11962. /* WEBPACK VAR INJECTION */(function(wx) {
  11963. Object.defineProperty(exports, "__esModule", {
  11964. value: true
  11965. });
  11966. exports.getMoneyStyle = getMoneyStyle;
  11967. exports.getTime = getTime;
  11968. exports.isCardNo = isCardNo;
  11969. exports.openMap = openMap;
  11970. exports.timeComputed = timeComputed;
  11971. //身份证验证
  11972. function isCardNo(card) {
  11973. // 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
  11974. var reg = /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/;
  11975. if (reg.test(card) === false) {
  11976. console.log(card);
  11977. return false;
  11978. }
  11979. return true;
  11980. }
  11981. // 金额显示变化
  11982. function getMoneyStyle() {
  11983. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  11984. if (typeof value == 'string') {
  11985. value = (+value).toFixed(2);
  11986. }
  11987. if (typeof value == 'number') {
  11988. value = value.toFixed(2);
  11989. }
  11990. // 将字符串转为数组
  11991. var n = value.split("");
  11992. // 反转数组并复制循环处理
  11993. var arr = n.reverse().map(function (e, ind, ar) {
  11994. // 判断当前下标是否为3的整数倍数且不为最后一个下标
  11995. if (ind % 3 == 0 && ind / 3 > 1 && ind != ar.length) {
  11996. return e + ',';
  11997. } else {
  11998. return e;
  11999. }
  12000. });
  12001. // 反转数组回复原来排序并合并回字符串
  12002. arr = arr.reverse().join('');
  12003. return arr;
  12004. }
  12005. // 倒计时计算
  12006. // 计算倒计时时间
  12007. function timeComputed(time) {
  12008. // 获取当前时间
  12009. var actTime = new Date().getTime();
  12010. // 获取到期时间
  12011. var stopTime = time - actTime;
  12012. // 判断是否小于0
  12013. if (stopTime < 0) {
  12014. stopTime = stopTime * -1;
  12015. }
  12016. var day = Math.floor(stopTime / 1000 / 60 / 60 / 24); //获取剩余天数
  12017. var hours = Math.floor(stopTime / 1000 / 60 / 60 % 24); //获取剩余小时数
  12018. var minutes = Math.floor(stopTime / 1000 / 60 % 60); //获取分钟
  12019. var seconds = Math.floor(stopTime / 1000 % 60); //获取秒数
  12020. return {
  12021. hours: hours,
  12022. //倒计时小时数
  12023. minutes: minutes,
  12024. //倒计时分钟数
  12025. seconds: seconds,
  12026. //倒计时秒数
  12027. day: day //倒计时天数
  12028. };
  12029. }
  12030. // 调用打开地图方法
  12031. function openMap(e) {
  12032. var that = this;
  12033. return new Promise(function (resolve, reject) {
  12034. wx.getSetting({
  12035. success: function success(res) {
  12036. //这里判断是否有地位权限
  12037. if (!res.authSetting['scope.userLocation']) {
  12038. wx.showModal({
  12039. title: '提示',
  12040. content: '请求获取位置权限',
  12041. success: function success(res) {
  12042. if (res.confirm == false) {
  12043. // 授权失败
  12044. reject();
  12045. return false;
  12046. }
  12047. wx.openSetting({
  12048. success: function success(res) {
  12049. //如果再次拒绝则返回页面并提示
  12050. if (!res.authSetting['scope.userLocation']) {
  12051. wx.showToast({
  12052. title: '此功能需获取位置信息,请重新设置',
  12053. duration: 3000,
  12054. icon: 'none'
  12055. });
  12056. } else {
  12057. //允许授权,调用地图
  12058. resolve();
  12059. }
  12060. }
  12061. });
  12062. }
  12063. });
  12064. } else {
  12065. //如果有定位权限,调用地图
  12066. resolve();
  12067. }
  12068. }
  12069. });
  12070. });
  12071. }
  12072. //时间戳转换成时间
  12073. function getTime(time) {
  12074. var num = 13 - (time + '').length;
  12075. var l = 1; //倍数
  12076. for (var i = 0; i < num; i++) {
  12077. l += '0';
  12078. }
  12079. // 重新解析为数字
  12080. l = parseInt(l);
  12081. var date = new Date(parseInt(time) * l);
  12082. var year = date.getFullYear();
  12083. var mon = date.getMonth() + 1;
  12084. var day = date.getDate();
  12085. var hours = date.getHours();
  12086. var minu = date.getMinutes();
  12087. var sec = date.getSeconds();
  12088. return year + '-' + mon + '-' + day + ' ' + hours + ':' + minu + ':' + sec;
  12089. }
  12090. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  12091. /***/ }),
  12092. /***/ 271:
  12093. /*!**************************************!*\
  12094. !*** E:/项目/2023-8/xyl/api/wallet.js ***!
  12095. \**************************************/
  12096. /*! no static exports found */
  12097. /***/ (function(module, exports, __webpack_require__) {
  12098. "use strict";
  12099. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  12100. Object.defineProperty(exports, "__esModule", {
  12101. value: true
  12102. });
  12103. exports.aliInfo = aliInfo;
  12104. exports.balance = balance;
  12105. exports.bankInfo = bankInfo;
  12106. exports.extractBank = extractBank;
  12107. exports.extractCash = extractCash;
  12108. exports.getBank = getBank;
  12109. exports.integral = integral;
  12110. exports.rechargeRoutine = rechargeRoutine;
  12111. exports.setAliInfo = setAliInfo;
  12112. exports.setBank = setBank;
  12113. exports.setBankInfo = setBankInfo;
  12114. exports.spreadCommission = spreadCommission;
  12115. exports.userBalance = userBalance;
  12116. exports.yue = yue;
  12117. var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 46));
  12118. // 获取用户消费记录
  12119. function spreadCommission(data, state) {
  12120. return (0, _request.default)({
  12121. url: '/api/spread/commission/' + state,
  12122. method: 'get',
  12123. data: data
  12124. });
  12125. }
  12126. // 获取账户余额
  12127. function userBalance(data) {
  12128. return (0, _request.default)({
  12129. url: '/api/user/balance',
  12130. method: 'get',
  12131. data: data
  12132. });
  12133. }
  12134. // 提现
  12135. function extractCash(data) {
  12136. return (0, _request.default)({
  12137. url: '/api/extract/cash',
  12138. method: 'post',
  12139. data: data
  12140. });
  12141. }
  12142. // 提现信息
  12143. function extractBank(data) {
  12144. return (0, _request.default)({
  12145. url: '/api/extract/bank',
  12146. method: 'get',
  12147. data: data
  12148. });
  12149. }
  12150. // 小程序充值
  12151. function rechargeRoutine(data) {
  12152. return (0, _request.default)({
  12153. url: '/api/recharge/routine',
  12154. method: 'post',
  12155. data: data
  12156. });
  12157. }
  12158. // 获取提现支付宝账号
  12159. function aliInfo(data) {
  12160. return (0, _request.default)({
  12161. url: '/api/ali/info',
  12162. method: 'get',
  12163. data: data
  12164. });
  12165. }
  12166. //获取默认银行卡账号
  12167. function bankInfo(data) {
  12168. return (0, _request.default)({
  12169. url: '/api/bank/info',
  12170. method: 'get',
  12171. data: data
  12172. });
  12173. }
  12174. // 保存提现支付宝账号
  12175. function setAliInfo(data) {
  12176. return (0, _request.default)({
  12177. url: '/api/ali/edit',
  12178. method: 'post',
  12179. data: data
  12180. });
  12181. }
  12182. //保存默认银行卡账号
  12183. function setBankInfo(data) {
  12184. return (0, _request.default)({
  12185. url: '/api/bank/edit',
  12186. method: 'post',
  12187. data: data
  12188. });
  12189. }
  12190. // 账户余额
  12191. function balance(data) {
  12192. return (0, _request.default)({
  12193. url: '/api/user/balance',
  12194. method: 'get',
  12195. data: data
  12196. });
  12197. }
  12198. //
  12199. function yue(data) {
  12200. return (0, _request.default)({
  12201. url: '/api/now_money/list',
  12202. method: 'get',
  12203. data: data
  12204. });
  12205. }
  12206. function integral(data) {
  12207. return (0, _request.default)({
  12208. url: '/api/integral/list',
  12209. method: 'get',
  12210. data: data
  12211. });
  12212. }
  12213. function getBank(data) {
  12214. return (0, _request.default)({
  12215. url: '/api/auction/pay_list',
  12216. method: 'get',
  12217. data: data
  12218. });
  12219. }
  12220. function setBank(data) {
  12221. return (0, _request.default)({
  12222. url: '/api/auction/pay',
  12223. method: 'post',
  12224. data: data
  12225. });
  12226. }
  12227. /***/ }),
  12228. /***/ 28:
  12229. /*!**************************************************************************************!*\
  12230. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
  12231. \**************************************************************************************/
  12232. /*! no static exports found */
  12233. /***/ (function(module, exports, __webpack_require__) {
  12234. "use strict";
  12235. /* WEBPACK VAR INJECTION */(function(global) {/*!
  12236. * vuex v3.6.2
  12237. * (c) 2021 Evan You
  12238. * @license MIT
  12239. */
  12240. function applyMixin (Vue) {
  12241. var version = Number(Vue.version.split('.')[0]);
  12242. if (version >= 2) {
  12243. Vue.mixin({ beforeCreate: vuexInit });
  12244. } else {
  12245. // override init and inject vuex init procedure
  12246. // for 1.x backwards compatibility.
  12247. var _init = Vue.prototype._init;
  12248. Vue.prototype._init = function (options) {
  12249. if ( options === void 0 ) options = {};
  12250. options.init = options.init
  12251. ? [vuexInit].concat(options.init)
  12252. : vuexInit;
  12253. _init.call(this, options);
  12254. };
  12255. }
  12256. /**
  12257. * Vuex init hook, injected into each instances init hooks list.
  12258. */
  12259. function vuexInit () {
  12260. var options = this.$options;
  12261. // store injection
  12262. if (options.store) {
  12263. this.$store = typeof options.store === 'function'
  12264. ? options.store()
  12265. : options.store;
  12266. } else if (options.parent && options.parent.$store) {
  12267. this.$store = options.parent.$store;
  12268. }
  12269. }
  12270. }
  12271. var target = typeof window !== 'undefined'
  12272. ? window
  12273. : typeof global !== 'undefined'
  12274. ? global
  12275. : {};
  12276. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  12277. function devtoolPlugin (store) {
  12278. if (!devtoolHook) { return }
  12279. store._devtoolHook = devtoolHook;
  12280. devtoolHook.emit('vuex:init', store);
  12281. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  12282. store.replaceState(targetState);
  12283. });
  12284. store.subscribe(function (mutation, state) {
  12285. devtoolHook.emit('vuex:mutation', mutation, state);
  12286. }, { prepend: true });
  12287. store.subscribeAction(function (action, state) {
  12288. devtoolHook.emit('vuex:action', action, state);
  12289. }, { prepend: true });
  12290. }
  12291. /**
  12292. * Get the first item that pass the test
  12293. * by second argument function
  12294. *
  12295. * @param {Array} list
  12296. * @param {Function} f
  12297. * @return {*}
  12298. */
  12299. function find (list, f) {
  12300. return list.filter(f)[0]
  12301. }
  12302. /**
  12303. * Deep copy the given object considering circular structure.
  12304. * This function caches all nested objects and its copies.
  12305. * If it detects circular structure, use cached copy to avoid infinite loop.
  12306. *
  12307. * @param {*} obj
  12308. * @param {Array<Object>} cache
  12309. * @return {*}
  12310. */
  12311. function deepCopy (obj, cache) {
  12312. if ( cache === void 0 ) cache = [];
  12313. // just return if obj is immutable value
  12314. if (obj === null || typeof obj !== 'object') {
  12315. return obj
  12316. }
  12317. // if obj is hit, it is in circular structure
  12318. var hit = find(cache, function (c) { return c.original === obj; });
  12319. if (hit) {
  12320. return hit.copy
  12321. }
  12322. var copy = Array.isArray(obj) ? [] : {};
  12323. // put the copy into cache at first
  12324. // because we want to refer it in recursive deepCopy
  12325. cache.push({
  12326. original: obj,
  12327. copy: copy
  12328. });
  12329. Object.keys(obj).forEach(function (key) {
  12330. copy[key] = deepCopy(obj[key], cache);
  12331. });
  12332. return copy
  12333. }
  12334. /**
  12335. * forEach for object
  12336. */
  12337. function forEachValue (obj, fn) {
  12338. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  12339. }
  12340. function isObject (obj) {
  12341. return obj !== null && typeof obj === 'object'
  12342. }
  12343. function isPromise (val) {
  12344. return val && typeof val.then === 'function'
  12345. }
  12346. function assert (condition, msg) {
  12347. if (!condition) { throw new Error(("[vuex] " + msg)) }
  12348. }
  12349. function partial (fn, arg) {
  12350. return function () {
  12351. return fn(arg)
  12352. }
  12353. }
  12354. // Base data struct for store's module, package with some attribute and method
  12355. var Module = function Module (rawModule, runtime) {
  12356. this.runtime = runtime;
  12357. // Store some children item
  12358. this._children = Object.create(null);
  12359. // Store the origin module object which passed by programmer
  12360. this._rawModule = rawModule;
  12361. var rawState = rawModule.state;
  12362. // Store the origin module's state
  12363. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  12364. };
  12365. var prototypeAccessors = { namespaced: { configurable: true } };
  12366. prototypeAccessors.namespaced.get = function () {
  12367. return !!this._rawModule.namespaced
  12368. };
  12369. Module.prototype.addChild = function addChild (key, module) {
  12370. this._children[key] = module;
  12371. };
  12372. Module.prototype.removeChild = function removeChild (key) {
  12373. delete this._children[key];
  12374. };
  12375. Module.prototype.getChild = function getChild (key) {
  12376. return this._children[key]
  12377. };
  12378. Module.prototype.hasChild = function hasChild (key) {
  12379. return key in this._children
  12380. };
  12381. Module.prototype.update = function update (rawModule) {
  12382. this._rawModule.namespaced = rawModule.namespaced;
  12383. if (rawModule.actions) {
  12384. this._rawModule.actions = rawModule.actions;
  12385. }
  12386. if (rawModule.mutations) {
  12387. this._rawModule.mutations = rawModule.mutations;
  12388. }
  12389. if (rawModule.getters) {
  12390. this._rawModule.getters = rawModule.getters;
  12391. }
  12392. };
  12393. Module.prototype.forEachChild = function forEachChild (fn) {
  12394. forEachValue(this._children, fn);
  12395. };
  12396. Module.prototype.forEachGetter = function forEachGetter (fn) {
  12397. if (this._rawModule.getters) {
  12398. forEachValue(this._rawModule.getters, fn);
  12399. }
  12400. };
  12401. Module.prototype.forEachAction = function forEachAction (fn) {
  12402. if (this._rawModule.actions) {
  12403. forEachValue(this._rawModule.actions, fn);
  12404. }
  12405. };
  12406. Module.prototype.forEachMutation = function forEachMutation (fn) {
  12407. if (this._rawModule.mutations) {
  12408. forEachValue(this._rawModule.mutations, fn);
  12409. }
  12410. };
  12411. Object.defineProperties( Module.prototype, prototypeAccessors );
  12412. var ModuleCollection = function ModuleCollection (rawRootModule) {
  12413. // register root module (Vuex.Store options)
  12414. this.register([], rawRootModule, false);
  12415. };
  12416. ModuleCollection.prototype.get = function get (path) {
  12417. return path.reduce(function (module, key) {
  12418. return module.getChild(key)
  12419. }, this.root)
  12420. };
  12421. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  12422. var module = this.root;
  12423. return path.reduce(function (namespace, key) {
  12424. module = module.getChild(key);
  12425. return namespace + (module.namespaced ? key + '/' : '')
  12426. }, '')
  12427. };
  12428. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  12429. update([], this.root, rawRootModule);
  12430. };
  12431. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  12432. var this$1 = this;
  12433. if ( runtime === void 0 ) runtime = true;
  12434. if ((true)) {
  12435. assertRawModule(path, rawModule);
  12436. }
  12437. var newModule = new Module(rawModule, runtime);
  12438. if (path.length === 0) {
  12439. this.root = newModule;
  12440. } else {
  12441. var parent = this.get(path.slice(0, -1));
  12442. parent.addChild(path[path.length - 1], newModule);
  12443. }
  12444. // register nested modules
  12445. if (rawModule.modules) {
  12446. forEachValue(rawModule.modules, function (rawChildModule, key) {
  12447. this$1.register(path.concat(key), rawChildModule, runtime);
  12448. });
  12449. }
  12450. };
  12451. ModuleCollection.prototype.unregister = function unregister (path) {
  12452. var parent = this.get(path.slice(0, -1));
  12453. var key = path[path.length - 1];
  12454. var child = parent.getChild(key);
  12455. if (!child) {
  12456. if ((true)) {
  12457. console.warn(
  12458. "[vuex] trying to unregister module '" + key + "', which is " +
  12459. "not registered"
  12460. );
  12461. }
  12462. return
  12463. }
  12464. if (!child.runtime) {
  12465. return
  12466. }
  12467. parent.removeChild(key);
  12468. };
  12469. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  12470. var parent = this.get(path.slice(0, -1));
  12471. var key = path[path.length - 1];
  12472. if (parent) {
  12473. return parent.hasChild(key)
  12474. }
  12475. return false
  12476. };
  12477. function update (path, targetModule, newModule) {
  12478. if ((true)) {
  12479. assertRawModule(path, newModule);
  12480. }
  12481. // update target module
  12482. targetModule.update(newModule);
  12483. // update nested modules
  12484. if (newModule.modules) {
  12485. for (var key in newModule.modules) {
  12486. if (!targetModule.getChild(key)) {
  12487. if ((true)) {
  12488. console.warn(
  12489. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  12490. 'manual reload is needed'
  12491. );
  12492. }
  12493. return
  12494. }
  12495. update(
  12496. path.concat(key),
  12497. targetModule.getChild(key),
  12498. newModule.modules[key]
  12499. );
  12500. }
  12501. }
  12502. }
  12503. var functionAssert = {
  12504. assert: function (value) { return typeof value === 'function'; },
  12505. expected: 'function'
  12506. };
  12507. var objectAssert = {
  12508. assert: function (value) { return typeof value === 'function' ||
  12509. (typeof value === 'object' && typeof value.handler === 'function'); },
  12510. expected: 'function or object with "handler" function'
  12511. };
  12512. var assertTypes = {
  12513. getters: functionAssert,
  12514. mutations: functionAssert,
  12515. actions: objectAssert
  12516. };
  12517. function assertRawModule (path, rawModule) {
  12518. Object.keys(assertTypes).forEach(function (key) {
  12519. if (!rawModule[key]) { return }
  12520. var assertOptions = assertTypes[key];
  12521. forEachValue(rawModule[key], function (value, type) {
  12522. assert(
  12523. assertOptions.assert(value),
  12524. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  12525. );
  12526. });
  12527. });
  12528. }
  12529. function makeAssertionMessage (path, key, type, value, expected) {
  12530. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  12531. if (path.length > 0) {
  12532. buf += " in module \"" + (path.join('.')) + "\"";
  12533. }
  12534. buf += " is " + (JSON.stringify(value)) + ".";
  12535. return buf
  12536. }
  12537. var Vue; // bind on install
  12538. var Store = function Store (options) {
  12539. var this$1 = this;
  12540. if ( options === void 0 ) options = {};
  12541. // Auto install if it is not done yet and `window` has `Vue`.
  12542. // To allow users to avoid auto-installation in some cases,
  12543. // this code should be placed here. See #731
  12544. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  12545. install(window.Vue);
  12546. }
  12547. if ((true)) {
  12548. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  12549. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  12550. assert(this instanceof Store, "store must be called with the new operator.");
  12551. }
  12552. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  12553. var strict = options.strict; if ( strict === void 0 ) strict = false;
  12554. // store internal state
  12555. this._committing = false;
  12556. this._actions = Object.create(null);
  12557. this._actionSubscribers = [];
  12558. this._mutations = Object.create(null);
  12559. this._wrappedGetters = Object.create(null);
  12560. this._modules = new ModuleCollection(options);
  12561. this._modulesNamespaceMap = Object.create(null);
  12562. this._subscribers = [];
  12563. this._watcherVM = new Vue();
  12564. this._makeLocalGettersCache = Object.create(null);
  12565. // bind commit and dispatch to self
  12566. var store = this;
  12567. var ref = this;
  12568. var dispatch = ref.dispatch;
  12569. var commit = ref.commit;
  12570. this.dispatch = function boundDispatch (type, payload) {
  12571. return dispatch.call(store, type, payload)
  12572. };
  12573. this.commit = function boundCommit (type, payload, options) {
  12574. return commit.call(store, type, payload, options)
  12575. };
  12576. // strict mode
  12577. this.strict = strict;
  12578. var state = this._modules.root.state;
  12579. // init root module.
  12580. // this also recursively registers all sub-modules
  12581. // and collects all module getters inside this._wrappedGetters
  12582. installModule(this, state, [], this._modules.root);
  12583. // initialize the store vm, which is responsible for the reactivity
  12584. // (also registers _wrappedGetters as computed properties)
  12585. resetStoreVM(this, state);
  12586. // apply plugins
  12587. plugins.forEach(function (plugin) { return plugin(this$1); });
  12588. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  12589. if (useDevtools) {
  12590. devtoolPlugin(this);
  12591. }
  12592. };
  12593. var prototypeAccessors$1 = { state: { configurable: true } };
  12594. prototypeAccessors$1.state.get = function () {
  12595. return this._vm._data.$$state
  12596. };
  12597. prototypeAccessors$1.state.set = function (v) {
  12598. if ((true)) {
  12599. assert(false, "use store.replaceState() to explicit replace store state.");
  12600. }
  12601. };
  12602. Store.prototype.commit = function commit (_type, _payload, _options) {
  12603. var this$1 = this;
  12604. // check object-style commit
  12605. var ref = unifyObjectStyle(_type, _payload, _options);
  12606. var type = ref.type;
  12607. var payload = ref.payload;
  12608. var options = ref.options;
  12609. var mutation = { type: type, payload: payload };
  12610. var entry = this._mutations[type];
  12611. if (!entry) {
  12612. if ((true)) {
  12613. console.error(("[vuex] unknown mutation type: " + type));
  12614. }
  12615. return
  12616. }
  12617. this._withCommit(function () {
  12618. entry.forEach(function commitIterator (handler) {
  12619. handler(payload);
  12620. });
  12621. });
  12622. this._subscribers
  12623. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  12624. .forEach(function (sub) { return sub(mutation, this$1.state); });
  12625. if (
  12626. ( true) &&
  12627. options && options.silent
  12628. ) {
  12629. console.warn(
  12630. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  12631. 'Use the filter functionality in the vue-devtools'
  12632. );
  12633. }
  12634. };
  12635. Store.prototype.dispatch = function dispatch (_type, _payload) {
  12636. var this$1 = this;
  12637. // check object-style dispatch
  12638. var ref = unifyObjectStyle(_type, _payload);
  12639. var type = ref.type;
  12640. var payload = ref.payload;
  12641. var action = { type: type, payload: payload };
  12642. var entry = this._actions[type];
  12643. if (!entry) {
  12644. if ((true)) {
  12645. console.error(("[vuex] unknown action type: " + type));
  12646. }
  12647. return
  12648. }
  12649. try {
  12650. this._actionSubscribers
  12651. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  12652. .filter(function (sub) { return sub.before; })
  12653. .forEach(function (sub) { return sub.before(action, this$1.state); });
  12654. } catch (e) {
  12655. if ((true)) {
  12656. console.warn("[vuex] error in before action subscribers: ");
  12657. console.error(e);
  12658. }
  12659. }
  12660. var result = entry.length > 1
  12661. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  12662. : entry[0](payload);
  12663. return new Promise(function (resolve, reject) {
  12664. result.then(function (res) {
  12665. try {
  12666. this$1._actionSubscribers
  12667. .filter(function (sub) { return sub.after; })
  12668. .forEach(function (sub) { return sub.after(action, this$1.state); });
  12669. } catch (e) {
  12670. if ((true)) {
  12671. console.warn("[vuex] error in after action subscribers: ");
  12672. console.error(e);
  12673. }
  12674. }
  12675. resolve(res);
  12676. }, function (error) {
  12677. try {
  12678. this$1._actionSubscribers
  12679. .filter(function (sub) { return sub.error; })
  12680. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  12681. } catch (e) {
  12682. if ((true)) {
  12683. console.warn("[vuex] error in error action subscribers: ");
  12684. console.error(e);
  12685. }
  12686. }
  12687. reject(error);
  12688. });
  12689. })
  12690. };
  12691. Store.prototype.subscribe = function subscribe (fn, options) {
  12692. return genericSubscribe(fn, this._subscribers, options)
  12693. };
  12694. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  12695. var subs = typeof fn === 'function' ? { before: fn } : fn;
  12696. return genericSubscribe(subs, this._actionSubscribers, options)
  12697. };
  12698. Store.prototype.watch = function watch (getter, cb, options) {
  12699. var this$1 = this;
  12700. if ((true)) {
  12701. assert(typeof getter === 'function', "store.watch only accepts a function.");
  12702. }
  12703. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  12704. };
  12705. Store.prototype.replaceState = function replaceState (state) {
  12706. var this$1 = this;
  12707. this._withCommit(function () {
  12708. this$1._vm._data.$$state = state;
  12709. });
  12710. };
  12711. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  12712. if ( options === void 0 ) options = {};
  12713. if (typeof path === 'string') { path = [path]; }
  12714. if ((true)) {
  12715. assert(Array.isArray(path), "module path must be a string or an Array.");
  12716. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  12717. }
  12718. this._modules.register(path, rawModule);
  12719. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  12720. // reset store to update getters...
  12721. resetStoreVM(this, this.state);
  12722. };
  12723. Store.prototype.unregisterModule = function unregisterModule (path) {
  12724. var this$1 = this;
  12725. if (typeof path === 'string') { path = [path]; }
  12726. if ((true)) {
  12727. assert(Array.isArray(path), "module path must be a string or an Array.");
  12728. }
  12729. this._modules.unregister(path);
  12730. this._withCommit(function () {
  12731. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  12732. Vue.delete(parentState, path[path.length - 1]);
  12733. });
  12734. resetStore(this);
  12735. };
  12736. Store.prototype.hasModule = function hasModule (path) {
  12737. if (typeof path === 'string') { path = [path]; }
  12738. if ((true)) {
  12739. assert(Array.isArray(path), "module path must be a string or an Array.");
  12740. }
  12741. return this._modules.isRegistered(path)
  12742. };
  12743. Store.prototype[[104,111,116,85,112,100,97,116,101].map(function (item) {return String.fromCharCode(item)}).join('')] = function (newOptions) {
  12744. this._modules.update(newOptions);
  12745. resetStore(this, true);
  12746. };
  12747. Store.prototype._withCommit = function _withCommit (fn) {
  12748. var committing = this._committing;
  12749. this._committing = true;
  12750. fn();
  12751. this._committing = committing;
  12752. };
  12753. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  12754. function genericSubscribe (fn, subs, options) {
  12755. if (subs.indexOf(fn) < 0) {
  12756. options && options.prepend
  12757. ? subs.unshift(fn)
  12758. : subs.push(fn);
  12759. }
  12760. return function () {
  12761. var i = subs.indexOf(fn);
  12762. if (i > -1) {
  12763. subs.splice(i, 1);
  12764. }
  12765. }
  12766. }
  12767. function resetStore (store, hot) {
  12768. store._actions = Object.create(null);
  12769. store._mutations = Object.create(null);
  12770. store._wrappedGetters = Object.create(null);
  12771. store._modulesNamespaceMap = Object.create(null);
  12772. var state = store.state;
  12773. // init all modules
  12774. installModule(store, state, [], store._modules.root, true);
  12775. // reset vm
  12776. resetStoreVM(store, state, hot);
  12777. }
  12778. function resetStoreVM (store, state, hot) {
  12779. var oldVm = store._vm;
  12780. // bind store public getters
  12781. store.getters = {};
  12782. // reset local getters cache
  12783. store._makeLocalGettersCache = Object.create(null);
  12784. var wrappedGetters = store._wrappedGetters;
  12785. var computed = {};
  12786. forEachValue(wrappedGetters, function (fn, key) {
  12787. // use computed to leverage its lazy-caching mechanism
  12788. // direct inline function use will lead to closure preserving oldVm.
  12789. // using partial to return function with only arguments preserved in closure environment.
  12790. computed[key] = partial(fn, store);
  12791. Object.defineProperty(store.getters, key, {
  12792. get: function () { return store._vm[key]; },
  12793. enumerable: true // for local getters
  12794. });
  12795. });
  12796. // use a Vue instance to store the state tree
  12797. // suppress warnings just in case the user has added
  12798. // some funky global mixins
  12799. var silent = Vue.config.silent;
  12800. Vue.config.silent = true;
  12801. store._vm = new Vue({
  12802. data: {
  12803. $$state: state
  12804. },
  12805. computed: computed
  12806. });
  12807. Vue.config.silent = silent;
  12808. // enable strict mode for new vm
  12809. if (store.strict) {
  12810. enableStrictMode(store);
  12811. }
  12812. if (oldVm) {
  12813. if (hot) {
  12814. // dispatch changes in all subscribed watchers
  12815. // to force getter re-evaluation for hot reloading.
  12816. store._withCommit(function () {
  12817. oldVm._data.$$state = null;
  12818. });
  12819. }
  12820. Vue.nextTick(function () { return oldVm.$destroy(); });
  12821. }
  12822. }
  12823. function installModule (store, rootState, path, module, hot) {
  12824. var isRoot = !path.length;
  12825. var namespace = store._modules.getNamespace(path);
  12826. // register in namespace map
  12827. if (module.namespaced) {
  12828. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  12829. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  12830. }
  12831. store._modulesNamespaceMap[namespace] = module;
  12832. }
  12833. // set state
  12834. if (!isRoot && !hot) {
  12835. var parentState = getNestedState(rootState, path.slice(0, -1));
  12836. var moduleName = path[path.length - 1];
  12837. store._withCommit(function () {
  12838. if ((true)) {
  12839. if (moduleName in parentState) {
  12840. console.warn(
  12841. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  12842. );
  12843. }
  12844. }
  12845. Vue.set(parentState, moduleName, module.state);
  12846. });
  12847. }
  12848. var local = module.context = makeLocalContext(store, namespace, path);
  12849. module.forEachMutation(function (mutation, key) {
  12850. var namespacedType = namespace + key;
  12851. registerMutation(store, namespacedType, mutation, local);
  12852. });
  12853. module.forEachAction(function (action, key) {
  12854. var type = action.root ? key : namespace + key;
  12855. var handler = action.handler || action;
  12856. registerAction(store, type, handler, local);
  12857. });
  12858. module.forEachGetter(function (getter, key) {
  12859. var namespacedType = namespace + key;
  12860. registerGetter(store, namespacedType, getter, local);
  12861. });
  12862. module.forEachChild(function (child, key) {
  12863. installModule(store, rootState, path.concat(key), child, hot);
  12864. });
  12865. }
  12866. /**
  12867. * make localized dispatch, commit, getters and state
  12868. * if there is no namespace, just use root ones
  12869. */
  12870. function makeLocalContext (store, namespace, path) {
  12871. var noNamespace = namespace === '';
  12872. var local = {
  12873. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  12874. var args = unifyObjectStyle(_type, _payload, _options);
  12875. var payload = args.payload;
  12876. var options = args.options;
  12877. var type = args.type;
  12878. if (!options || !options.root) {
  12879. type = namespace + type;
  12880. if (( true) && !store._actions[type]) {
  12881. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  12882. return
  12883. }
  12884. }
  12885. return store.dispatch(type, payload)
  12886. },
  12887. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  12888. var args = unifyObjectStyle(_type, _payload, _options);
  12889. var payload = args.payload;
  12890. var options = args.options;
  12891. var type = args.type;
  12892. if (!options || !options.root) {
  12893. type = namespace + type;
  12894. if (( true) && !store._mutations[type]) {
  12895. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  12896. return
  12897. }
  12898. }
  12899. store.commit(type, payload, options);
  12900. }
  12901. };
  12902. // getters and state object must be gotten lazily
  12903. // because they will be changed by vm update
  12904. Object.defineProperties(local, {
  12905. getters: {
  12906. get: noNamespace
  12907. ? function () { return store.getters; }
  12908. : function () { return makeLocalGetters(store, namespace); }
  12909. },
  12910. state: {
  12911. get: function () { return getNestedState(store.state, path); }
  12912. }
  12913. });
  12914. return local
  12915. }
  12916. function makeLocalGetters (store, namespace) {
  12917. if (!store._makeLocalGettersCache[namespace]) {
  12918. var gettersProxy = {};
  12919. var splitPos = namespace.length;
  12920. Object.keys(store.getters).forEach(function (type) {
  12921. // skip if the target getter is not match this namespace
  12922. if (type.slice(0, splitPos) !== namespace) { return }
  12923. // extract local getter type
  12924. var localType = type.slice(splitPos);
  12925. // Add a port to the getters proxy.
  12926. // Define as getter property because
  12927. // we do not want to evaluate the getters in this time.
  12928. Object.defineProperty(gettersProxy, localType, {
  12929. get: function () { return store.getters[type]; },
  12930. enumerable: true
  12931. });
  12932. });
  12933. store._makeLocalGettersCache[namespace] = gettersProxy;
  12934. }
  12935. return store._makeLocalGettersCache[namespace]
  12936. }
  12937. function registerMutation (store, type, handler, local) {
  12938. var entry = store._mutations[type] || (store._mutations[type] = []);
  12939. entry.push(function wrappedMutationHandler (payload) {
  12940. handler.call(store, local.state, payload);
  12941. });
  12942. }
  12943. function registerAction (store, type, handler, local) {
  12944. var entry = store._actions[type] || (store._actions[type] = []);
  12945. entry.push(function wrappedActionHandler (payload) {
  12946. var res = handler.call(store, {
  12947. dispatch: local.dispatch,
  12948. commit: local.commit,
  12949. getters: local.getters,
  12950. state: local.state,
  12951. rootGetters: store.getters,
  12952. rootState: store.state
  12953. }, payload);
  12954. if (!isPromise(res)) {
  12955. res = Promise.resolve(res);
  12956. }
  12957. if (store._devtoolHook) {
  12958. return res.catch(function (err) {
  12959. store._devtoolHook.emit('vuex:error', err);
  12960. throw err
  12961. })
  12962. } else {
  12963. return res
  12964. }
  12965. });
  12966. }
  12967. function registerGetter (store, type, rawGetter, local) {
  12968. if (store._wrappedGetters[type]) {
  12969. if ((true)) {
  12970. console.error(("[vuex] duplicate getter key: " + type));
  12971. }
  12972. return
  12973. }
  12974. store._wrappedGetters[type] = function wrappedGetter (store) {
  12975. return rawGetter(
  12976. local.state, // local state
  12977. local.getters, // local getters
  12978. store.state, // root state
  12979. store.getters // root getters
  12980. )
  12981. };
  12982. }
  12983. function enableStrictMode (store) {
  12984. store._vm.$watch(function () { return this._data.$$state }, function () {
  12985. if ((true)) {
  12986. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  12987. }
  12988. }, { deep: true, sync: true });
  12989. }
  12990. function getNestedState (state, path) {
  12991. return path.reduce(function (state, key) { return state[key]; }, state)
  12992. }
  12993. function unifyObjectStyle (type, payload, options) {
  12994. if (isObject(type) && type.type) {
  12995. options = payload;
  12996. payload = type;
  12997. type = type.type;
  12998. }
  12999. if ((true)) {
  13000. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  13001. }
  13002. return { type: type, payload: payload, options: options }
  13003. }
  13004. function install (_Vue) {
  13005. if (Vue && _Vue === Vue) {
  13006. if ((true)) {
  13007. console.error(
  13008. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  13009. );
  13010. }
  13011. return
  13012. }
  13013. Vue = _Vue;
  13014. applyMixin(Vue);
  13015. }
  13016. /**
  13017. * Reduce the code which written in Vue.js for getting the state.
  13018. * @param {String} [namespace] - Module's namespace
  13019. * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
  13020. * @param {Object}
  13021. */
  13022. var mapState = normalizeNamespace(function (namespace, states) {
  13023. var res = {};
  13024. if (( true) && !isValidMap(states)) {
  13025. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  13026. }
  13027. normalizeMap(states).forEach(function (ref) {
  13028. var key = ref.key;
  13029. var val = ref.val;
  13030. res[key] = function mappedState () {
  13031. var state = this.$store.state;
  13032. var getters = this.$store.getters;
  13033. if (namespace) {
  13034. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  13035. if (!module) {
  13036. return
  13037. }
  13038. state = module.context.state;
  13039. getters = module.context.getters;
  13040. }
  13041. return typeof val === 'function'
  13042. ? val.call(this, state, getters)
  13043. : state[val]
  13044. };
  13045. // mark vuex getter for devtools
  13046. res[key].vuex = true;
  13047. });
  13048. return res
  13049. });
  13050. /**
  13051. * Reduce the code which written in Vue.js for committing the mutation
  13052. * @param {String} [namespace] - Module's namespace
  13053. * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  13054. * @return {Object}
  13055. */
  13056. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  13057. var res = {};
  13058. if (( true) && !isValidMap(mutations)) {
  13059. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  13060. }
  13061. normalizeMap(mutations).forEach(function (ref) {
  13062. var key = ref.key;
  13063. var val = ref.val;
  13064. res[key] = function mappedMutation () {
  13065. var args = [], len = arguments.length;
  13066. while ( len-- ) args[ len ] = arguments[ len ];
  13067. // Get the commit method from store
  13068. var commit = this.$store.commit;
  13069. if (namespace) {
  13070. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  13071. if (!module) {
  13072. return
  13073. }
  13074. commit = module.context.commit;
  13075. }
  13076. return typeof val === 'function'
  13077. ? val.apply(this, [commit].concat(args))
  13078. : commit.apply(this.$store, [val].concat(args))
  13079. };
  13080. });
  13081. return res
  13082. });
  13083. /**
  13084. * Reduce the code which written in Vue.js for getting the getters
  13085. * @param {String} [namespace] - Module's namespace
  13086. * @param {Object|Array} getters
  13087. * @return {Object}
  13088. */
  13089. var mapGetters = normalizeNamespace(function (namespace, getters) {
  13090. var res = {};
  13091. if (( true) && !isValidMap(getters)) {
  13092. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  13093. }
  13094. normalizeMap(getters).forEach(function (ref) {
  13095. var key = ref.key;
  13096. var val = ref.val;
  13097. // The namespace has been mutated by normalizeNamespace
  13098. val = namespace + val;
  13099. res[key] = function mappedGetter () {
  13100. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  13101. return
  13102. }
  13103. if (( true) && !(val in this.$store.getters)) {
  13104. console.error(("[vuex] unknown getter: " + val));
  13105. return
  13106. }
  13107. return this.$store.getters[val]
  13108. };
  13109. // mark vuex getter for devtools
  13110. res[key].vuex = true;
  13111. });
  13112. return res
  13113. });
  13114. /**
  13115. * Reduce the code which written in Vue.js for dispatch the action
  13116. * @param {String} [namespace] - Module's namespace
  13117. * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  13118. * @return {Object}
  13119. */
  13120. var mapActions = normalizeNamespace(function (namespace, actions) {
  13121. var res = {};
  13122. if (( true) && !isValidMap(actions)) {
  13123. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  13124. }
  13125. normalizeMap(actions).forEach(function (ref) {
  13126. var key = ref.key;
  13127. var val = ref.val;
  13128. res[key] = function mappedAction () {
  13129. var args = [], len = arguments.length;
  13130. while ( len-- ) args[ len ] = arguments[ len ];
  13131. // get dispatch function from store
  13132. var dispatch = this.$store.dispatch;
  13133. if (namespace) {
  13134. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  13135. if (!module) {
  13136. return
  13137. }
  13138. dispatch = module.context.dispatch;
  13139. }
  13140. return typeof val === 'function'
  13141. ? val.apply(this, [dispatch].concat(args))
  13142. : dispatch.apply(this.$store, [val].concat(args))
  13143. };
  13144. });
  13145. return res
  13146. });
  13147. /**
  13148. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  13149. * @param {String} namespace
  13150. * @return {Object}
  13151. */
  13152. var createNamespacedHelpers = function (namespace) { return ({
  13153. mapState: mapState.bind(null, namespace),
  13154. mapGetters: mapGetters.bind(null, namespace),
  13155. mapMutations: mapMutations.bind(null, namespace),
  13156. mapActions: mapActions.bind(null, namespace)
  13157. }); };
  13158. /**
  13159. * Normalize the map
  13160. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  13161. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  13162. * @param {Array|Object} map
  13163. * @return {Object}
  13164. */
  13165. function normalizeMap (map) {
  13166. if (!isValidMap(map)) {
  13167. return []
  13168. }
  13169. return Array.isArray(map)
  13170. ? map.map(function (key) { return ({ key: key, val: key }); })
  13171. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  13172. }
  13173. /**
  13174. * Validate whether given map is valid or not
  13175. * @param {*} map
  13176. * @return {Boolean}
  13177. */
  13178. function isValidMap (map) {
  13179. return Array.isArray(map) || isObject(map)
  13180. }
  13181. /**
  13182. * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
  13183. * @param {Function} fn
  13184. * @return {Function}
  13185. */
  13186. function normalizeNamespace (fn) {
  13187. return function (namespace, map) {
  13188. if (typeof namespace !== 'string') {
  13189. map = namespace;
  13190. namespace = '';
  13191. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  13192. namespace += '/';
  13193. }
  13194. return fn(namespace, map)
  13195. }
  13196. }
  13197. /**
  13198. * Search a special module from store by namespace. if module not exist, print error message.
  13199. * @param {Object} store
  13200. * @param {String} helper
  13201. * @param {String} namespace
  13202. * @return {Object}
  13203. */
  13204. function getModuleByNamespace (store, helper, namespace) {
  13205. var module = store._modulesNamespaceMap[namespace];
  13206. if (( true) && !module) {
  13207. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  13208. }
  13209. return module
  13210. }
  13211. // Credits: borrowed code from fcomb/redux-logger
  13212. function createLogger (ref) {
  13213. if ( ref === void 0 ) ref = {};
  13214. var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  13215. var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  13216. var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  13217. var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  13218. var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  13219. var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  13220. var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  13221. var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  13222. var logger = ref.logger; if ( logger === void 0 ) logger = console;
  13223. return function (store) {
  13224. var prevState = deepCopy(store.state);
  13225. if (typeof logger === 'undefined') {
  13226. return
  13227. }
  13228. if (logMutations) {
  13229. store.subscribe(function (mutation, state) {
  13230. var nextState = deepCopy(state);
  13231. if (filter(mutation, prevState, nextState)) {
  13232. var formattedTime = getFormattedTime();
  13233. var formattedMutation = mutationTransformer(mutation);
  13234. var message = "mutation " + (mutation.type) + formattedTime;
  13235. startMessage(logger, message, collapsed);
  13236. logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
  13237. logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
  13238. logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
  13239. endMessage(logger);
  13240. }
  13241. prevState = nextState;
  13242. });
  13243. }
  13244. if (logActions) {
  13245. store.subscribeAction(function (action, state) {
  13246. if (actionFilter(action, state)) {
  13247. var formattedTime = getFormattedTime();
  13248. var formattedAction = actionTransformer(action);
  13249. var message = "action " + (action.type) + formattedTime;
  13250. startMessage(logger, message, collapsed);
  13251. logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
  13252. endMessage(logger);
  13253. }
  13254. });
  13255. }
  13256. }
  13257. }
  13258. function startMessage (logger, message, collapsed) {
  13259. var startMessage = collapsed
  13260. ? logger.groupCollapsed
  13261. : logger.group;
  13262. // render
  13263. try {
  13264. startMessage.call(logger, message);
  13265. } catch (e) {
  13266. logger.log(message);
  13267. }
  13268. }
  13269. function endMessage (logger) {
  13270. try {
  13271. logger.groupEnd();
  13272. } catch (e) {
  13273. logger.log('—— log end ——');
  13274. }
  13275. }
  13276. function getFormattedTime () {
  13277. var time = new Date();
  13278. return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
  13279. }
  13280. function repeat (str, times) {
  13281. return (new Array(times + 1)).join(str)
  13282. }
  13283. function pad (num, maxLength) {
  13284. return repeat('0', maxLength - num.toString().length) + num
  13285. }
  13286. var index_cjs = {
  13287. Store: Store,
  13288. install: install,
  13289. version: '3.6.2',
  13290. mapState: mapState,
  13291. mapMutations: mapMutations,
  13292. mapGetters: mapGetters,
  13293. mapActions: mapActions,
  13294. createNamespacedHelpers: createNamespacedHelpers,
  13295. createLogger: createLogger
  13296. };
  13297. module.exports = index_cjs;
  13298. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  13299. /***/ }),
  13300. /***/ 29:
  13301. /*!********************************************!*\
  13302. !*** E:/项目/2023-8/xyl/store/model/user.js ***!
  13303. \********************************************/
  13304. /*! no static exports found */
  13305. /***/ (function(module, exports, __webpack_require__) {
  13306. "use strict";
  13307. /* WEBPACK VAR INJECTION */(function(uni) {
  13308. Object.defineProperty(exports, "__esModule", {
  13309. value: true
  13310. });
  13311. exports.default = void 0;
  13312. var state = {
  13313. userInfo: {},
  13314. //用户信息
  13315. orderInfo: {
  13316. complete_count: 0,
  13317. //完成
  13318. received_count: 0,
  13319. //待收货
  13320. unshipped_count: 0,
  13321. //待发货
  13322. order_count: 0,
  13323. //订单总数
  13324. unpaid_count: 0 //待付款
  13325. },
  13326. //订单信息
  13327. hasLogin: false //是否登录
  13328. };
  13329. var mutations = {
  13330. // 登录
  13331. login: function login(state) {
  13332. state.hasLogin = true;
  13333. },
  13334. // 退出登录
  13335. logout: function logout(state, provider) {
  13336. state.hasLogin = false;
  13337. // 清空基础信息
  13338. state.userInfo = {};
  13339. state.orderInfo = {
  13340. complete_count: 0,
  13341. //完成
  13342. received_count: 0,
  13343. //待收货
  13344. unshipped_count: 0,
  13345. //待发货
  13346. order_count: 0,
  13347. //订单总数
  13348. unpaid_count: 0 //待付款
  13349. };
  13350. // 清除缓存用户信息
  13351. uni.removeStorage({
  13352. key: 'userInfo'
  13353. });
  13354. // 清除缓存token
  13355. uni.removeStorage({
  13356. key: 'token'
  13357. });
  13358. },
  13359. // 保存用户信息
  13360. setUserInfo: function setUserInfo(state, provider) {
  13361. state.userInfo = provider;
  13362. uni.setStorage({
  13363. //缓存用户登陆状态
  13364. key: 'userInfo',
  13365. data: provider
  13366. });
  13367. },
  13368. // 保存订单信息
  13369. setOrderInfo: function setOrderInfo(state, provider) {
  13370. state.orderInfo = provider;
  13371. }
  13372. };
  13373. var getters = {};
  13374. var _default = {
  13375. namespaced: true,
  13376. state: state,
  13377. mutations: mutations,
  13378. getters: getters
  13379. };
  13380. exports.default = _default;
  13381. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  13382. /***/ }),
  13383. /***/ 3:
  13384. /*!***********************************!*\
  13385. !*** (webpack)/buildin/global.js ***!
  13386. \***********************************/
  13387. /*! no static exports found */
  13388. /***/ (function(module, exports) {
  13389. var g;
  13390. // This works in non-strict mode
  13391. g = (function() {
  13392. return this;
  13393. })();
  13394. try {
  13395. // This works if eval is allowed (see CSP)
  13396. g = g || new Function("return this")();
  13397. } catch (e) {
  13398. // This works if the window reference is available
  13399. if (typeof window === "object") g = window;
  13400. }
  13401. // g can still be undefined, but nothing to do about it...
  13402. // We return undefined, instead of nothing here, so it's
  13403. // easier to handle this case. if(!global) { ...}
  13404. module.exports = g;
  13405. /***/ }),
  13406. /***/ 35:
  13407. /*!**********************************************************************************************************!*\
  13408. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  13409. \**********************************************************************************************************/
  13410. /*! exports provided: default */
  13411. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  13412. "use strict";
  13413. __webpack_require__.r(__webpack_exports__);
  13414. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  13415. /* globals __VUE_SSR_CONTEXT__ */
  13416. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  13417. // This module is a runtime utility for cleaner component module output and will
  13418. // be included in the final webpack user bundle.
  13419. function normalizeComponent (
  13420. scriptExports,
  13421. render,
  13422. staticRenderFns,
  13423. functionalTemplate,
  13424. injectStyles,
  13425. scopeId,
  13426. moduleIdentifier, /* server only */
  13427. shadowMode, /* vue-cli only */
  13428. components, // fixed by xxxxxx auto components
  13429. renderjs // fixed by xxxxxx renderjs
  13430. ) {
  13431. // Vue.extend constructor export interop
  13432. var options = typeof scriptExports === 'function'
  13433. ? scriptExports.options
  13434. : scriptExports
  13435. // fixed by xxxxxx auto components
  13436. if (components) {
  13437. if (!options.components) {
  13438. options.components = {}
  13439. }
  13440. var hasOwn = Object.prototype.hasOwnProperty
  13441. for (var name in components) {
  13442. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  13443. options.components[name] = components[name]
  13444. }
  13445. }
  13446. }
  13447. // fixed by xxxxxx renderjs
  13448. if (renderjs) {
  13449. if(typeof renderjs.beforeCreate === 'function'){
  13450. renderjs.beforeCreate = [renderjs.beforeCreate]
  13451. }
  13452. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  13453. this[renderjs.__module] = this
  13454. });
  13455. (options.mixins || (options.mixins = [])).push(renderjs)
  13456. }
  13457. // render functions
  13458. if (render) {
  13459. options.render = render
  13460. options.staticRenderFns = staticRenderFns
  13461. options._compiled = true
  13462. }
  13463. // functional template
  13464. if (functionalTemplate) {
  13465. options.functional = true
  13466. }
  13467. // scopedId
  13468. if (scopeId) {
  13469. options._scopeId = 'data-v-' + scopeId
  13470. }
  13471. var hook
  13472. if (moduleIdentifier) { // server build
  13473. hook = function (context) {
  13474. // 2.3 injection
  13475. context =
  13476. context || // cached call
  13477. (this.$vnode && this.$vnode.ssrContext) || // stateful
  13478. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  13479. // 2.2 with runInNewContext: true
  13480. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  13481. context = __VUE_SSR_CONTEXT__
  13482. }
  13483. // inject component styles
  13484. if (injectStyles) {
  13485. injectStyles.call(this, context)
  13486. }
  13487. // register component module identifier for async chunk inferrence
  13488. if (context && context._registeredComponents) {
  13489. context._registeredComponents.add(moduleIdentifier)
  13490. }
  13491. }
  13492. // used by ssr in case component is cached and beforeCreate
  13493. // never gets called
  13494. options._ssrRegister = hook
  13495. } else if (injectStyles) {
  13496. hook = shadowMode
  13497. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  13498. : injectStyles
  13499. }
  13500. if (hook) {
  13501. if (options.functional) {
  13502. // for template-only hot-reload because in that case the render fn doesn't
  13503. // go through the normalizer
  13504. options._injectStyles = hook
  13505. // register for functioal component in vue file
  13506. var originalRender = options.render
  13507. options.render = function renderWithStyleInjection (h, context) {
  13508. hook.call(context)
  13509. return originalRender(h, context)
  13510. }
  13511. } else {
  13512. // inject component registration as beforeCreate hook
  13513. var existing = options.beforeCreate
  13514. options.beforeCreate = existing
  13515. ? [].concat(existing, hook)
  13516. : [hook]
  13517. }
  13518. }
  13519. return {
  13520. exports: scriptExports,
  13521. options: options
  13522. }
  13523. }
  13524. /***/ }),
  13525. /***/ 4:
  13526. /*!**********************************************************************!*\
  13527. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  13528. \**********************************************************************/
  13529. /*! no static exports found */
  13530. /***/ (function(module, exports) {
  13531. function _interopRequireDefault(obj) {
  13532. return obj && obj.__esModule ? obj : {
  13533. "default": obj
  13534. };
  13535. }
  13536. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  13537. /***/ }),
  13538. /***/ 42:
  13539. /*!************************************************************************************************!*\
  13540. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  13541. \************************************************************************************************/
  13542. /*! no static exports found */
  13543. /***/ (function(module, exports, __webpack_require__) {
  13544. // TODO(Babel 8): Remove this file.
  13545. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 43)();
  13546. module.exports = runtime;
  13547. /***/ }),
  13548. /***/ 43:
  13549. /*!*******************************************************************!*\
  13550. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  13551. \*******************************************************************/
  13552. /*! no static exports found */
  13553. /***/ (function(module, exports, __webpack_require__) {
  13554. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  13555. function _regeneratorRuntime() {
  13556. "use strict";
  13557. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  13558. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  13559. return exports;
  13560. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  13561. var exports = {},
  13562. Op = Object.prototype,
  13563. hasOwn = Op.hasOwnProperty,
  13564. defineProperty = Object.defineProperty || function (obj, key, desc) {
  13565. obj[key] = desc.value;
  13566. },
  13567. $Symbol = "function" == typeof Symbol ? Symbol : {},
  13568. iteratorSymbol = $Symbol.iterator || "@@iterator",
  13569. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  13570. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  13571. function define(obj, key, value) {
  13572. return Object.defineProperty(obj, key, {
  13573. value: value,
  13574. enumerable: !0,
  13575. configurable: !0,
  13576. writable: !0
  13577. }), obj[key];
  13578. }
  13579. try {
  13580. define({}, "");
  13581. } catch (err) {
  13582. define = function define(obj, key, value) {
  13583. return obj[key] = value;
  13584. };
  13585. }
  13586. function wrap(innerFn, outerFn, self, tryLocsList) {
  13587. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  13588. generator = Object.create(protoGenerator.prototype),
  13589. context = new Context(tryLocsList || []);
  13590. return defineProperty(generator, "_invoke", {
  13591. value: makeInvokeMethod(innerFn, self, context)
  13592. }), generator;
  13593. }
  13594. function tryCatch(fn, obj, arg) {
  13595. try {
  13596. return {
  13597. type: "normal",
  13598. arg: fn.call(obj, arg)
  13599. };
  13600. } catch (err) {
  13601. return {
  13602. type: "throw",
  13603. arg: err
  13604. };
  13605. }
  13606. }
  13607. exports.wrap = wrap;
  13608. var ContinueSentinel = {};
  13609. function Generator() {}
  13610. function GeneratorFunction() {}
  13611. function GeneratorFunctionPrototype() {}
  13612. var IteratorPrototype = {};
  13613. define(IteratorPrototype, iteratorSymbol, function () {
  13614. return this;
  13615. });
  13616. var getProto = Object.getPrototypeOf,
  13617. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  13618. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  13619. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  13620. function defineIteratorMethods(prototype) {
  13621. ["next", "throw", "return"].forEach(function (method) {
  13622. define(prototype, method, function (arg) {
  13623. return this._invoke(method, arg);
  13624. });
  13625. });
  13626. }
  13627. function AsyncIterator(generator, PromiseImpl) {
  13628. function invoke(method, arg, resolve, reject) {
  13629. var record = tryCatch(generator[method], generator, arg);
  13630. if ("throw" !== record.type) {
  13631. var result = record.arg,
  13632. value = result.value;
  13633. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  13634. invoke("next", value, resolve, reject);
  13635. }, function (err) {
  13636. invoke("throw", err, resolve, reject);
  13637. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  13638. result.value = unwrapped, resolve(result);
  13639. }, function (error) {
  13640. return invoke("throw", error, resolve, reject);
  13641. });
  13642. }
  13643. reject(record.arg);
  13644. }
  13645. var previousPromise;
  13646. defineProperty(this, "_invoke", {
  13647. value: function value(method, arg) {
  13648. function callInvokeWithMethodAndArg() {
  13649. return new PromiseImpl(function (resolve, reject) {
  13650. invoke(method, arg, resolve, reject);
  13651. });
  13652. }
  13653. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  13654. }
  13655. });
  13656. }
  13657. function makeInvokeMethod(innerFn, self, context) {
  13658. var state = "suspendedStart";
  13659. return function (method, arg) {
  13660. if ("executing" === state) throw new Error("Generator is already running");
  13661. if ("completed" === state) {
  13662. if ("throw" === method) throw arg;
  13663. return doneResult();
  13664. }
  13665. for (context.method = method, context.arg = arg;;) {
  13666. var delegate = context.delegate;
  13667. if (delegate) {
  13668. var delegateResult = maybeInvokeDelegate(delegate, context);
  13669. if (delegateResult) {
  13670. if (delegateResult === ContinueSentinel) continue;
  13671. return delegateResult;
  13672. }
  13673. }
  13674. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  13675. if ("suspendedStart" === state) throw state = "completed", context.arg;
  13676. context.dispatchException(context.arg);
  13677. } else "return" === context.method && context.abrupt("return", context.arg);
  13678. state = "executing";
  13679. var record = tryCatch(innerFn, self, context);
  13680. if ("normal" === record.type) {
  13681. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  13682. return {
  13683. value: record.arg,
  13684. done: context.done
  13685. };
  13686. }
  13687. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  13688. }
  13689. };
  13690. }
  13691. function maybeInvokeDelegate(delegate, context) {
  13692. var methodName = context.method,
  13693. method = delegate.iterator[methodName];
  13694. if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
  13695. var record = tryCatch(method, delegate.iterator, context.arg);
  13696. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  13697. var info = record.arg;
  13698. return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
  13699. }
  13700. function pushTryEntry(locs) {
  13701. var entry = {
  13702. tryLoc: locs[0]
  13703. };
  13704. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  13705. }
  13706. function resetTryEntry(entry) {
  13707. var record = entry.completion || {};
  13708. record.type = "normal", delete record.arg, entry.completion = record;
  13709. }
  13710. function Context(tryLocsList) {
  13711. this.tryEntries = [{
  13712. tryLoc: "root"
  13713. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  13714. }
  13715. function values(iterable) {
  13716. if (iterable) {
  13717. var iteratorMethod = iterable[iteratorSymbol];
  13718. if (iteratorMethod) return iteratorMethod.call(iterable);
  13719. if ("function" == typeof iterable.next) return iterable;
  13720. if (!isNaN(iterable.length)) {
  13721. var i = -1,
  13722. next = function next() {
  13723. for (; ++i < iterable.length;) {
  13724. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  13725. }
  13726. return next.value = undefined, next.done = !0, next;
  13727. };
  13728. return next.next = next;
  13729. }
  13730. }
  13731. return {
  13732. next: doneResult
  13733. };
  13734. }
  13735. function doneResult() {
  13736. return {
  13737. value: undefined,
  13738. done: !0
  13739. };
  13740. }
  13741. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  13742. value: GeneratorFunctionPrototype,
  13743. configurable: !0
  13744. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  13745. value: GeneratorFunction,
  13746. configurable: !0
  13747. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  13748. var ctor = "function" == typeof genFun && genFun.constructor;
  13749. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  13750. }, exports.mark = function (genFun) {
  13751. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  13752. }, exports.awrap = function (arg) {
  13753. return {
  13754. __await: arg
  13755. };
  13756. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  13757. return this;
  13758. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  13759. void 0 === PromiseImpl && (PromiseImpl = Promise);
  13760. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  13761. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  13762. return result.done ? result.value : iter.next();
  13763. });
  13764. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  13765. return this;
  13766. }), define(Gp, "toString", function () {
  13767. return "[object Generator]";
  13768. }), exports.keys = function (val) {
  13769. var object = Object(val),
  13770. keys = [];
  13771. for (var key in object) {
  13772. keys.push(key);
  13773. }
  13774. return keys.reverse(), function next() {
  13775. for (; keys.length;) {
  13776. var key = keys.pop();
  13777. if (key in object) return next.value = key, next.done = !1, next;
  13778. }
  13779. return next.done = !0, next;
  13780. };
  13781. }, exports.values = values, Context.prototype = {
  13782. constructor: Context,
  13783. reset: function reset(skipTempReset) {
  13784. if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
  13785. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  13786. }
  13787. },
  13788. stop: function stop() {
  13789. this.done = !0;
  13790. var rootRecord = this.tryEntries[0].completion;
  13791. if ("throw" === rootRecord.type) throw rootRecord.arg;
  13792. return this.rval;
  13793. },
  13794. dispatchException: function dispatchException(exception) {
  13795. if (this.done) throw exception;
  13796. var context = this;
  13797. function handle(loc, caught) {
  13798. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  13799. }
  13800. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  13801. var entry = this.tryEntries[i],
  13802. record = entry.completion;
  13803. if ("root" === entry.tryLoc) return handle("end");
  13804. if (entry.tryLoc <= this.prev) {
  13805. var hasCatch = hasOwn.call(entry, "catchLoc"),
  13806. hasFinally = hasOwn.call(entry, "finallyLoc");
  13807. if (hasCatch && hasFinally) {
  13808. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  13809. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  13810. } else if (hasCatch) {
  13811. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  13812. } else {
  13813. if (!hasFinally) throw new Error("try statement without catch or finally");
  13814. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  13815. }
  13816. }
  13817. }
  13818. },
  13819. abrupt: function abrupt(type, arg) {
  13820. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  13821. var entry = this.tryEntries[i];
  13822. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  13823. var finallyEntry = entry;
  13824. break;
  13825. }
  13826. }
  13827. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  13828. var record = finallyEntry ? finallyEntry.completion : {};
  13829. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  13830. },
  13831. complete: function complete(record, afterLoc) {
  13832. if ("throw" === record.type) throw record.arg;
  13833. return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
  13834. },
  13835. finish: function finish(finallyLoc) {
  13836. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  13837. var entry = this.tryEntries[i];
  13838. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  13839. }
  13840. },
  13841. "catch": function _catch(tryLoc) {
  13842. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  13843. var entry = this.tryEntries[i];
  13844. if (entry.tryLoc === tryLoc) {
  13845. var record = entry.completion;
  13846. if ("throw" === record.type) {
  13847. var thrown = record.arg;
  13848. resetTryEntry(entry);
  13849. }
  13850. return thrown;
  13851. }
  13852. }
  13853. throw new Error("illegal catch attempt");
  13854. },
  13855. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  13856. return this.delegate = {
  13857. iterator: values(iterable),
  13858. resultName: resultName,
  13859. nextLoc: nextLoc
  13860. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  13861. }
  13862. }, exports;
  13863. }
  13864. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  13865. /***/ }),
  13866. /***/ 44:
  13867. /*!*****************************************************************!*\
  13868. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  13869. \*****************************************************************/
  13870. /*! no static exports found */
  13871. /***/ (function(module, exports) {
  13872. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  13873. try {
  13874. var info = gen[key](arg);
  13875. var value = info.value;
  13876. } catch (error) {
  13877. reject(error);
  13878. return;
  13879. }
  13880. if (info.done) {
  13881. resolve(value);
  13882. } else {
  13883. Promise.resolve(value).then(_next, _throw);
  13884. }
  13885. }
  13886. function _asyncToGenerator(fn) {
  13887. return function () {
  13888. var self = this,
  13889. args = arguments;
  13890. return new Promise(function (resolve, reject) {
  13891. var gen = fn.apply(self, args);
  13892. function _next(value) {
  13893. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  13894. }
  13895. function _throw(err) {
  13896. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  13897. }
  13898. _next(undefined);
  13899. });
  13900. };
  13901. }
  13902. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  13903. /***/ }),
  13904. /***/ 45:
  13905. /*!*************************************!*\
  13906. !*** E:/项目/2023-8/xyl/api/index.js ***!
  13907. \*************************************/
  13908. /*! no static exports found */
  13909. /***/ (function(module, exports, __webpack_require__) {
  13910. "use strict";
  13911. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13912. Object.defineProperty(exports, "__esModule", {
  13913. value: true
  13914. });
  13915. exports.groom1 = groom1;
  13916. exports.groom3 = groom3;
  13917. exports.groom4 = groom4;
  13918. exports.loadIndexs = loadIndexs;
  13919. var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 46));
  13920. // 促销商品
  13921. function groom4(data) {
  13922. return (0, _request.default)({
  13923. url: '/api/groom/list/4',
  13924. method: 'get',
  13925. data: data
  13926. });
  13927. }
  13928. // 精品推荐
  13929. function groom1(data) {
  13930. return (0, _request.default)({
  13931. url: '/api/groom/list/1',
  13932. method: 'get',
  13933. data: data
  13934. });
  13935. }
  13936. // 新品首发
  13937. function groom3(data) {
  13938. return (0, _request.default)({
  13939. url: '/api/groom/list/3',
  13940. method: 'get',
  13941. data: data
  13942. });
  13943. }
  13944. // 获取首页信息
  13945. function loadIndexs(data) {
  13946. return (0, _request.default)({
  13947. url: '/api/index',
  13948. method: 'get',
  13949. data: data
  13950. });
  13951. }
  13952. /***/ }),
  13953. /***/ 46:
  13954. /*!*****************************************!*\
  13955. !*** E:/项目/2023-8/xyl/utils/request.js ***!
  13956. \*****************************************/
  13957. /*! no static exports found */
  13958. /***/ (function(module, exports, __webpack_require__) {
  13959. "use strict";
  13960. /* WEBPACK VAR INJECTION */(function(uni) {
  13961. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13962. Object.defineProperty(exports, "__esModule", {
  13963. value: true
  13964. });
  13965. exports.upFilse = exports.default = void 0;
  13966. var _newRequest = _interopRequireDefault(__webpack_require__(/*! ./newRequest.js */ 47));
  13967. var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 27));
  13968. var _loginUtils = __webpack_require__(/*! @/utils/loginUtils.js */ 48);
  13969. // 请求完成后拦截
  13970. _newRequest.default.interceptors.response(function (response) {
  13971. try {
  13972. var res = response.data;
  13973. // 解析字符串为数字
  13974. if (res.status !== 200) {
  13975. console.log(res.status);
  13976. if (res.status == 410000) {
  13977. // 调用退出登录方法清空用户信息
  13978. _store.default.commit('user/logout');
  13979. // 判断是否开启强制登录
  13980. uni.showModal({
  13981. title: "登陆",
  13982. content: '您未登录!是否马上登录?',
  13983. success: function success(e) {
  13984. // 判断是否点击确认按钮
  13985. if (e.confirm) {
  13986. // 保存当前页面地址
  13987. (0, _loginUtils.saveUrl)();
  13988. // 跳转页面
  13989. (0, _loginUtils.interceptor)();
  13990. }
  13991. }
  13992. });
  13993. } else {
  13994. if (res.msg != '系统出现异常') {
  13995. uni.showToast({
  13996. title: res.msg,
  13997. duration: 1500,
  13998. mask: false,
  13999. icon: 'none'
  14000. });
  14001. }
  14002. }
  14003. return Promise.reject(res);
  14004. } else {
  14005. return res;
  14006. }
  14007. } catch (e) {
  14008. console.log(e);
  14009. }
  14010. }, function (error) {
  14011. uni.showToast({
  14012. title: "加载错误请重试",
  14013. duration: 1500,
  14014. mask: false,
  14015. icon: 'none'
  14016. });
  14017. return Promise.reject(error);
  14018. });
  14019. // 请求前拦截器
  14020. _newRequest.default.interceptors.request(function (config) {
  14021. var token = uni.getStorageSync('token') || '';
  14022. // console.log(config);
  14023. if (!config.header) {
  14024. config.header = {
  14025. "Authori-zation": 'Bearer ' + token
  14026. };
  14027. } else {
  14028. // 添加key请求头
  14029. config.header["Authori-zation"] = 'Bearer ' + token;
  14030. }
  14031. return config;
  14032. }, function (error) {
  14033. // 错误处理
  14034. console.log(error);
  14035. return Promise.reject(error);
  14036. });
  14037. var upFilse = _newRequest.default.upFilse;
  14038. exports.upFilse = upFilse;
  14039. var _default = _newRequest.default.open;
  14040. exports.default = _default;
  14041. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14042. /***/ }),
  14043. /***/ 47:
  14044. /*!********************************************!*\
  14045. !*** E:/项目/2023-8/xyl/utils/newRequest.js ***!
  14046. \********************************************/
  14047. /*! no static exports found */
  14048. /***/ (function(module, exports, __webpack_require__) {
  14049. "use strict";
  14050. /* WEBPACK VAR INJECTION */(function(uni) {
  14051. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14052. Object.defineProperty(exports, "__esModule", {
  14053. value: true
  14054. });
  14055. exports.default = void 0;
  14056. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 42));
  14057. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 44));
  14058. var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 27));
  14059. var service = {
  14060. baseURL: _store.default.state.baseURL,
  14061. // 请求头
  14062. header: {
  14063. 'Content-Type': "application/x-www-form-urlencoded"
  14064. },
  14065. // 请求拦截器
  14066. interceptors: {
  14067. // 安装请求前拦截
  14068. request: function request(success, iserror) {
  14069. service.request.success = success;
  14070. service.request.error = iserror;
  14071. },
  14072. // 安装请求完成后拦截
  14073. response: function response(success, iserror) {
  14074. service.response.success = success;
  14075. service.response.error = iserror;
  14076. }
  14077. },
  14078. // 请求前拦截
  14079. request: {
  14080. // 回调成功执行方法
  14081. success: function success(e) {
  14082. return e;
  14083. },
  14084. // 回调失败
  14085. error: function error(e) {
  14086. return e;
  14087. }
  14088. },
  14089. // 请求完成后拦截
  14090. response: {
  14091. // 回调成功执行方法
  14092. success: function success(e) {
  14093. return e;
  14094. },
  14095. // 回调失败
  14096. error: function error(e) {
  14097. return e;
  14098. }
  14099. },
  14100. // 开始请求
  14101. open: function () {
  14102. var _open = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
  14103. return _regenerator.default.wrap(function _callee$(_context) {
  14104. while (1) {
  14105. switch (_context.prev = _context.next) {
  14106. case 0:
  14107. _context.next = 2;
  14108. return new Promise(function (resolve, reject) {
  14109. var requestData = ''; //保存处理完成后请求数据
  14110. var url = ''; //保存链接地址
  14111. //console.log(data);
  14112. // 请求前数据处理
  14113. requestData = service.request.success(data);
  14114. url = service.baseURL + requestData.url;
  14115. // 数据复制用于请求
  14116. uni.request({
  14117. url: url,
  14118. method: requestData.method || 'GET',
  14119. data: requestData.data,
  14120. header: data.header || service.header,
  14121. success: function success(res) {
  14122. if (res.statusCode == 200) {
  14123. try {
  14124. resolve(service.response.success(res));
  14125. } catch (e) {
  14126. service.response.error(e);
  14127. }
  14128. }
  14129. },
  14130. // 请求失败数据处理
  14131. fail: function fail(err) {
  14132. service.response.error(err);
  14133. }
  14134. });
  14135. });
  14136. case 2:
  14137. return _context.abrupt("return", _context.sent);
  14138. case 3:
  14139. case "end":
  14140. return _context.stop();
  14141. }
  14142. }
  14143. }, _callee);
  14144. }));
  14145. function open(_x) {
  14146. return _open.apply(this, arguments);
  14147. }
  14148. return open;
  14149. }(),
  14150. // 上传文件
  14151. upFilse: function () {
  14152. var _upFilse = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(data) {
  14153. return _regenerator.default.wrap(function _callee4$(_context4) {
  14154. while (1) {
  14155. switch (_context4.prev = _context4.next) {
  14156. case 0:
  14157. _context4.next = 2;
  14158. return new Promise(function (resolve, reject) {
  14159. var requestData = ''; //保存处理完成后请求数据
  14160. var url = ''; //保存请求地址
  14161. try {
  14162. // 请求前数据处理
  14163. requestData = service.request.success(data);
  14164. } catch (e) {
  14165. // 请求报错拦截
  14166. service.request.error(e);
  14167. }
  14168. url = service.baseURL + requestData.url;
  14169. var config = {
  14170. // 上传图片的API
  14171. upload_img_url: url
  14172. };
  14173. var Uploader = {
  14174. // 选择图片
  14175. choose: function choose(num) {
  14176. return new Promise(function (resolve, reject) {
  14177. uni.chooseImage({
  14178. count: num,
  14179. success: function success(res) {
  14180. // console.log(res);
  14181. // 缓存文件路径
  14182. resolve(res.tempFilePaths);
  14183. },
  14184. fail: function fail(err) {
  14185. console.log(err);
  14186. reject(err);
  14187. }
  14188. });
  14189. });
  14190. },
  14191. // 上传图片
  14192. upload_one: function upload_one(path) {
  14193. return new Promise(function (resolve, reject) {
  14194. uni.showLoading({
  14195. title: '上传中'
  14196. });
  14197. console.log(config.upload_img_url);
  14198. uni.uploadFile({
  14199. url: config.upload_img_url,
  14200. //仅为示例,非真实的接口地址
  14201. filePath: path,
  14202. name: 'file',
  14203. header: {
  14204. "Authori-zation": 'Bearer ' + uni.getStorageSync('token')
  14205. },
  14206. success: function success(uploadFileRes) {
  14207. if ("string" === typeof uploadFileRes.data) {
  14208. resolve(JSON.parse(uploadFileRes.data).data);
  14209. } else {
  14210. resolve(uploadFileRes.data.data);
  14211. }
  14212. },
  14213. complete: function complete() {
  14214. uni.hideLoading();
  14215. }
  14216. });
  14217. });
  14218. },
  14219. // 上传多个图片
  14220. upload: function upload(path_arr) {
  14221. var _this = this;
  14222. var num = path_arr.length;
  14223. return new Promise( /*#__PURE__*/function () {
  14224. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(resolve, reject) {
  14225. var img_urls, i, img_url;
  14226. return _regenerator.default.wrap(function _callee2$(_context2) {
  14227. while (1) {
  14228. switch (_context2.prev = _context2.next) {
  14229. case 0:
  14230. img_urls = [];
  14231. i = 0;
  14232. case 2:
  14233. if (!(i < num)) {
  14234. _context2.next = 10;
  14235. break;
  14236. }
  14237. _context2.next = 5;
  14238. return _this.upload_one(path_arr[i]);
  14239. case 5:
  14240. img_url = _context2.sent;
  14241. img_urls.push(img_url);
  14242. case 7:
  14243. i++;
  14244. _context2.next = 2;
  14245. break;
  14246. case 10:
  14247. ;
  14248. resolve(img_urls);
  14249. case 12:
  14250. case "end":
  14251. return _context2.stop();
  14252. }
  14253. }
  14254. }, _callee2);
  14255. }));
  14256. return function (_x3, _x4) {
  14257. return _ref.apply(this, arguments);
  14258. };
  14259. }());
  14260. },
  14261. // 触发上传图片事件
  14262. choose_and_upload: function choose_and_upload(num) {
  14263. var _this2 = this;
  14264. return new Promise( /*#__PURE__*/function () {
  14265. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(resolve, reject) {
  14266. var path_arr;
  14267. return _regenerator.default.wrap(function _callee3$(_context3) {
  14268. while (1) {
  14269. switch (_context3.prev = _context3.next) {
  14270. case 0:
  14271. _context3.next = 2;
  14272. return _this2.choose(num);
  14273. case 2:
  14274. path_arr = _context3.sent;
  14275. _context3.next = 5;
  14276. return _this2.upload(path_arr).then(function (e) {
  14277. resolve(e);
  14278. }).catch(function (e) {
  14279. reject(e);
  14280. });
  14281. case 5:
  14282. case "end":
  14283. return _context3.stop();
  14284. }
  14285. }
  14286. }, _callee3);
  14287. }));
  14288. return function (_x5, _x6) {
  14289. return _ref2.apply(this, arguments);
  14290. };
  14291. }());
  14292. }
  14293. };
  14294. Uploader.choose_and_upload(1).then(function (e) {
  14295. resolve(e);
  14296. }).catch(function (e) {
  14297. console.log(e);
  14298. });
  14299. });
  14300. case 2:
  14301. return _context4.abrupt("return", _context4.sent);
  14302. case 3:
  14303. case "end":
  14304. return _context4.stop();
  14305. }
  14306. }
  14307. }, _callee4);
  14308. }));
  14309. function upFilse(_x2) {
  14310. return _upFilse.apply(this, arguments);
  14311. }
  14312. return upFilse;
  14313. }()
  14314. };
  14315. var _default = service;
  14316. exports.default = _default;
  14317. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  14318. /***/ }),
  14319. /***/ 479:
  14320. /*!******************************************************************!*\
  14321. !*** E:/项目/2023-8/xyl/components/wangding-pickerAddress/data.js ***!
  14322. \******************************************************************/
  14323. /*! no static exports found */
  14324. /***/ (function(module, exports, __webpack_require__) {
  14325. "use strict";
  14326. Object.defineProperty(exports, "__esModule", {
  14327. value: true
  14328. });
  14329. exports.default = void 0;
  14330. var _default = [{
  14331. "name": "北京市",
  14332. "city": [{
  14333. "name": "北京市",
  14334. "area": ["东城区", "西城区", "崇文区", "宣武区", "朝阳区", "丰台区", "石景山区", "海淀区", "门头沟区", "房山区", "通州区", "顺义区", "昌平区", "大兴区", "平谷区", "怀柔区", "密云县", "延庆县"]
  14335. }]
  14336. }, {
  14337. "name": "天津市",
  14338. "city": [{
  14339. "name": "天津市",
  14340. "area": ["和平区", "河东区", "河西区", "南开区", "河北区", "红桥区", "塘沽区", "汉沽区", "大港区", "东丽区", "西青区", "津南区", "北辰区", "武清区", "宝坻区", "宁河县", "静海县", "蓟 县"]
  14341. }]
  14342. }, {
  14343. "name": "河北省",
  14344. "city": [{
  14345. "name": "石家庄市",
  14346. "area": ["长安区", "桥东区", "桥西区", "新华区", "郊 区", "井陉矿区", "井陉县", "正定县", "栾城县", "行唐县", "灵寿县", "高邑县", "深泽县", "赞皇县", "无极县", "平山县", "元氏县", "赵 县", "辛集市", "藁", "晋州市", "新乐市", "鹿泉市"]
  14347. }, {
  14348. "name": "唐山市",
  14349. "area": ["路南区", "路北区", "古冶区", "开平区", "新 区", "丰润县", "滦 县", "滦南县", "乐亭县", "迁西县", "玉田县", "唐海县", "遵化市", "丰南市", "迁安市"]
  14350. }, {
  14351. "name": "秦皇岛市",
  14352. "area": ["海港区", "山海关区", "北戴河区", "青龙满族自治县", "昌黎县", "抚宁县", "卢龙县"]
  14353. }, {
  14354. "name": "邯郸市",
  14355. "area": ["邯山区", "丛台区", "复兴区", "峰峰矿区", "邯郸县", "临漳县", "成安县", "大名县", "涉 县", "磁 县", "肥乡县", "永年县", "邱 县", "鸡泽县", "广平县", "馆陶县", "魏 县", "曲周县", "武安市"]
  14356. }, {
  14357. "name": "邢台市",
  14358. "area": ["桥东区", "桥西区", "邢台县", "临城县", "内丘县", "柏乡县", "隆尧县", "任 县", "南和县", "宁晋县", "巨鹿县", "新河县", "广宗县", "平乡县", "威 县", "清河县", "临西县", "南宫市", "沙河市"]
  14359. }, {
  14360. "name": "保定市",
  14361. "area": ["新市区", "北市区", "南市区", "满城县", "清苑县", "涞水县", "阜平县", "徐水县", "定兴县", "唐 县", "高阳县", "容城县", "涞源县", "望都县", "安新县", "易 县", "曲阳县", "蠡 县", "顺平县", "博野", "雄县", "涿州市", "定州市", "安国市", "高碑店市"]
  14362. }, {
  14363. "name": "张家口",
  14364. "area": ["桥东区", "桥西区", "宣化区", "下花园区", "宣化县", "张北县", "康保县", "沽源县", "尚义县", "蔚 县", "阳原县", "怀安县", "万全县", "怀来县", "涿鹿县", "赤城县", "崇礼县"]
  14365. }, {
  14366. "name": "承德市",
  14367. "area": ["双桥区", "双滦区", "鹰手营子矿区", "承德县", "兴隆县", "平泉县", "滦平县", "隆化县", "丰宁满族自治县", "宽城满族自治县", "围场满族蒙古族自治县"]
  14368. }, {
  14369. "name": "沧州市",
  14370. "area": ["新华区", "运河区", "沧 县", "青 县", "东光县", "海兴县", "盐山县", "肃宁县", "南皮县", "吴桥县", "献 县", "孟村回族自治县", "泊头市", "任丘市", "黄骅市", "河间市"]
  14371. }, {
  14372. "name": "廊坊市",
  14373. "area": ["安次区", "固安县", "永清县", "香河县", "大城县", "文安县", "大厂回族自治县", "霸州市", "三河市"]
  14374. }, {
  14375. "name": "衡水市",
  14376. "area": ["桃城区", "枣强县", "武邑县", "武强县", "饶阳县", "安平县", "故城县", "景 县", "阜城县", "冀州市", "深州市"]
  14377. }]
  14378. }, {
  14379. "name": "山西省",
  14380. "city": [{
  14381. "name": "太原市",
  14382. "area": ["小店区", "迎泽区", "杏花岭区", "尖草坪区", "万柏林区", "晋源区", "清徐县", "阳曲县", "娄烦县", "古交市"]
  14383. }, {
  14384. "name": "大同市",
  14385. "area": ["城 区", "矿 区", "南郊区", "新荣区", "阳高县", "天镇县", "广灵县", "灵丘县", "浑源县", "左云县", "大同县"]
  14386. }, {
  14387. "name": "阳泉市",
  14388. "area": ["城 区", "矿 区", "郊 区", "平定县", "盂 县"]
  14389. }, {
  14390. "name": "长治市",
  14391. "area": ["城 区", "郊 区", "长治县", "襄垣县", "屯留县", "平顺县", "黎城县", "壶关县", "长子县", "武乡县", "沁 县", "沁源县", "潞城市"]
  14392. }, {
  14393. "name": "晋城市",
  14394. "area": ["城 区", "沁水县", "阳城县", "陵川县", "泽州县", "高平市"]
  14395. }, {
  14396. "name": "朔州市",
  14397. "area": ["朔城区", "平鲁区", "山阴县", "应 县", "右玉县", "怀仁县"]
  14398. }, {
  14399. "name": "忻州市",
  14400. "area": ["忻府区", "原平市", "定襄县", "五台县", "代 县", "繁峙县", "宁武县", "静乐县", "神池县", "五寨县", "岢岚县", "河曲县", "保德县", "偏关县"]
  14401. }, {
  14402. "name": "吕梁市",
  14403. "area": ["离石区", "孝义市", "汾阳市", "文水县", "交城县", "兴 县", "临 县", "柳林县", "石楼县", "岚 县", "方山县", "中阳县", "交口县"]
  14404. }, {
  14405. "name": "晋中市",
  14406. "area": ["榆次市", "介休市", "榆社县", "左权县", "和顺县", "昔阳县", "寿阳县", "太谷县", "祁 县", "平遥县", "灵石县"]
  14407. }, {
  14408. "name": "临汾市",
  14409. "area": ["临汾市", "侯马市", "霍州市", "曲沃县", "翼城县", "襄汾县", "洪洞县", "古 县", "安泽县", "浮山县", "吉 县", "乡宁县", "蒲 县", "大宁县", "永和县", "隰 县", "汾西县"]
  14410. }, {
  14411. "name": "运城市",
  14412. "area": ["运城市", "永济市", "河津市", "芮城县", "临猗县", "万荣县", "新绛县", "稷山县", "闻喜县", "夏 县", "绛 县", "平陆县", "垣曲县"]
  14413. }]
  14414. }, {
  14415. "name": "内蒙古",
  14416. "city": [{
  14417. "name": "呼和浩特市",
  14418. "area": ["新城区", "回民区", "玉泉区", "郊 区", "土默特左旗", "托克托县", "和林格尔县", "清水河县", "武川县"]
  14419. }, {
  14420. "name": "包头市",
  14421. "area": ["东河区", "昆都伦区", "青山区", "石拐矿区", "白云矿区", "郊 区", "土默特右旗", "固阳县", "达尔罕茂明安联合旗"]
  14422. }, {
  14423. "name": "乌海市",
  14424. "area": ["海勃湾区", "海南区", "乌达区"]
  14425. }, {
  14426. "name": "赤峰市",
  14427. "area": ["红山区", "元宝山区", "松山区", "阿鲁科尔沁旗", "巴林左旗", "巴林右旗", "林西县", "克什克腾旗", "翁牛特旗", "喀喇沁旗", "宁城县", "敖汉旗"]
  14428. }, {
  14429. "name": "呼伦贝尔市",
  14430. "area": ["海拉尔市", "满洲里市", "扎兰屯市", "牙克石市", "根河市", "额尔古纳市", "阿荣旗", "莫力达瓦达斡尔族自治旗", "鄂伦春自治旗", "鄂温克族自治旗", "新巴尔虎右旗", "新巴尔虎左旗", "陈巴尔虎旗"]
  14431. }, {
  14432. "name": "兴安盟",
  14433. "area": ["乌兰浩特市", "阿尔山市", "科尔沁右翼前旗", "科尔沁右翼中旗", "扎赉特旗", "突泉县"]
  14434. }, {
  14435. "name": "通辽市",
  14436. "area": ["科尔沁区", "霍林郭勒市", "科尔沁左翼中旗", "科尔沁左翼后旗", "开鲁县", "库伦旗", "奈曼旗", "扎鲁特旗"]
  14437. }, {
  14438. "name": "锡林郭勒盟",
  14439. "area": ["二连浩特市", "锡林浩特市", "阿巴嘎旗", "苏尼特左旗", "苏尼特右旗", "东乌珠穆沁旗", "西乌珠穆沁旗", "太仆寺旗", "镶黄旗", "正镶白旗", "正蓝旗", "多伦县"]
  14440. }, {
  14441. "name": "乌兰察布盟",
  14442. "area": ["集宁市", "丰镇市", "卓资县", "化德县", "商都县", "兴和县", "凉城县", "察哈尔右翼前旗", "察哈尔右翼中旗", "察哈尔右翼后旗", "四子王旗"]
  14443. }, {
  14444. "name": "伊克昭盟",
  14445. "area": ["东胜市", "达拉特旗", "准格尔旗", "鄂托克前旗", "鄂托克旗", "杭锦旗", "乌审旗", "伊金霍洛旗"]
  14446. }, {
  14447. "name": "巴彦淖尔盟",
  14448. "area": ["临河市", "五原县", "磴口县", "乌拉特前旗", "乌拉特中旗", "乌拉特后旗", "杭锦后旗"]
  14449. }, {
  14450. "name": "阿拉善盟",
  14451. "area": ["阿拉善左旗", "阿拉善右旗", "额济纳旗"]
  14452. }]
  14453. }, {
  14454. "name": "辽宁省",
  14455. "city": [{
  14456. "name": "沈阳市",
  14457. "area": ["沈河区", "皇姑区", "和平区", "大东区", "铁西区", "苏家屯区", "东陵区", "于洪区", "新民市", "法库县", "辽中县", "康平县", "新城子区"]
  14458. }, {
  14459. "name": "大连市",
  14460. "area": ["西岗区", "中山区", "沙河口区", "甘井子区", "旅顺口区", "金州区", "瓦房店市", "普兰店市", "庄河市", "长海县"]
  14461. }, {
  14462. "name": "鞍山市",
  14463. "area": ["铁东区", "铁西区", "立山区", "千山区", "海城市", "台安县", "岫岩满族自治县"]
  14464. }, {
  14465. "name": "抚顺市",
  14466. "area": ["顺城区", "新抚区", "东洲区", "望花区", "抚顺县", "清原满族自治县", "新宾满族自治县"]
  14467. }, {
  14468. "name": "本溪市",
  14469. "area": ["平山区", "明山区", "溪湖区", "南芬区", "本溪满族自治县", "桓仁满族自治县"]
  14470. }, {
  14471. "name": "丹东市",
  14472. "area": ["振兴区", "元宝区", "振安区", "东港市", "凤城市", "宽甸满族自治县"]
  14473. }, {
  14474. "name": "锦州市",
  14475. "area": ["太和区", "古塔区", "凌河区", "凌海市", "黑山县", "义县", "北宁市"]
  14476. }, {
  14477. "name": "营口市",
  14478. "area": ["站前区", "西市区", "鲅鱼圈区", "老边区", "大石桥市", "盖州市"]
  14479. }, {
  14480. "name": "阜新市",
  14481. "area": ["海州区", "新邱区", "太平区", "清河门区", "细河区", "彰武县", "阜新蒙古族自治县"]
  14482. }, {
  14483. "name": "辽阳市",
  14484. "area": ["白塔区", "文圣区", "宏伟区", "太子河区", "弓长岭区", "灯塔市", "辽阳县"]
  14485. }, {
  14486. "name": "盘锦",
  14487. "area": ["双台子区", "兴隆台区", "盘山县", "大洼县"]
  14488. }, {
  14489. "name": "铁岭市",
  14490. "area": ["银州区", "清河区", "调兵山市", "开原市", "铁岭县", "昌图县", "西丰县"]
  14491. }, {
  14492. "name": "朝阳市",
  14493. "area": ["双塔区", "龙城区", "凌源市", "北票市", "朝阳县", "建平县", "喀喇沁左翼蒙古族自治县"]
  14494. }, {
  14495. "name": "葫芦岛市",
  14496. "area": ["龙港区", "南票区", "连山区", "兴城市", "绥中县", "建昌县"]
  14497. }]
  14498. }, {
  14499. "name": "吉林省",
  14500. "city": [{
  14501. "name": "长春市",
  14502. "area": ["朝阳区", "宽城区", "二道区", "南关区", "绿园区", "双阳区", "九台市", "榆树市", "德惠市", "农安县"]
  14503. }, {
  14504. "name": "吉林市",
  14505. "area": ["船营区", "昌邑区", "龙潭区", "丰满区", "舒兰市", "桦甸市", "蛟河市", "磐石市", "永吉县"]
  14506. }, {
  14507. "name": "四平",
  14508. "area": ["铁西区", "铁东区", "公主岭市", "双辽市", "梨树县", "伊通满族自治县"]
  14509. }, {
  14510. "name": "辽源市",
  14511. "area": ["龙山区", "西安区", "东辽县", "东丰县"]
  14512. }, {
  14513. "name": "通化市",
  14514. "area": ["东昌区", "二道江区", "梅河口市", "集安市", "通化县", "辉南县", "柳河县"]
  14515. }, {
  14516. "name": "白山市",
  14517. "area": ["八道江区", "江源区", "临江市", "靖宇县", "抚松县", "长白朝鲜族自治县"]
  14518. }, {
  14519. "name": "松原市",
  14520. "area": ["宁江区", "乾安县", "长岭县", "扶余县", "前郭尔罗斯蒙古族自治县"]
  14521. }, {
  14522. "name": "白城市",
  14523. "area": ["洮北区", "大安市", "洮南市", "镇赉县", "通榆县"]
  14524. }, {
  14525. "name": "延边朝鲜族自治州",
  14526. "area": ["延吉市", "图们市", "敦化市", "龙井市", "珲春市", "和龙市", "安图县", "汪清县"]
  14527. }]
  14528. }, {
  14529. "name": "黑龙江省",
  14530. "city": [{
  14531. "name": "哈尔滨市",
  14532. "area": ["松北区", "道里区", "南岗区", "平房区", "香坊区", "道外区", "呼兰区", "阿城区", "双城市", "尚志市", "五常市", "宾县", "方正县", "通河县", "巴彦县", "延寿县", "木兰县", "依兰县"]
  14533. }, {
  14534. "name": "齐齐哈尔市",
  14535. "area": ["龙沙区", "昂昂溪区", "铁锋区", "建华区", "富拉尔基区", "碾子山区", "梅里斯达斡尔族区", "讷河市", "富裕县", "拜泉县", "甘南县", "依安县", "克山县", "泰来县", "克东县", "龙江县"]
  14536. }, {
  14537. "name": "鹤岗市",
  14538. "area": ["兴山区", "工农区", "南山区", "兴安区", "向阳区", "东山区", "萝北县", "绥滨县"]
  14539. }, {
  14540. "name": "双鸭山",
  14541. "area": ["尖山区", "岭东区", "四方台区", "宝山区", "集贤县", "宝清县", "友谊县", "饶河县"]
  14542. }, {
  14543. "name": "鸡西市",
  14544. "area": ["鸡冠区", "恒山区", "城子河区", "滴道区", "梨树区", "麻山区", "密山市", "虎林市", "鸡东县"]
  14545. }, {
  14546. "name": "大庆市",
  14547. "area": ["萨尔图区", "红岗区", "龙凤区", "让胡路区", "大同区", "林甸县", "肇州县", "肇源县", "杜尔伯特蒙古族自治县"]
  14548. }, {
  14549. "name": "伊春市",
  14550. "area": ["伊春区", "带岭区", "南岔区", "金山屯区", "西林区", "美溪区", "乌马河区", "翠峦区", "友好区", "上甘岭区", "五营区", "红星区", "新青区", "汤旺河区", "乌伊岭区", "铁力市", "嘉荫县"]
  14551. }, {
  14552. "name": "牡丹江市",
  14553. "area": ["爱民区", "东安区", "阳明区", "西安区", "绥芬河市", "宁安市", "海林市", "穆棱市", "林口县", "东宁县"]
  14554. }, {
  14555. "name": "佳木斯市",
  14556. "area": ["向阳区", "前进区", "东风区", "郊区", "同江市", "富锦市", "桦川县", "抚远县", "桦南县", "汤原县"]
  14557. }, {
  14558. "name": "七台河市",
  14559. "area": ["桃山区", "新兴区", "茄子河区", "勃利县"]
  14560. }, {
  14561. "name": "黑河市",
  14562. "area": ["爱辉区", "北安市", "五大连池市", "逊克县", "嫩江县", "孙吴县"]
  14563. }, {
  14564. "name": "绥化市",
  14565. "area": ["北林区", "安达市", "肇东市", "海伦市", "绥棱县", "兰西县", "明水县", "青冈县", "庆安县", "望奎县"]
  14566. }, {
  14567. "name": "大兴安岭地区",
  14568. "area": ["呼玛县", "塔河县", "漠河县", "大兴安岭辖区"]
  14569. }]
  14570. }, {
  14571. "name": "上海市",
  14572. "city": [{
  14573. "name": "上海市",
  14574. "area": ["黄浦区", "卢湾区", "徐汇区", "长宁区", "静安区", "普陀区", "闸北区", "虹口区", "杨浦区", "宝山区", "闵行区", "嘉定区", "松江区", "金山区", "青浦区", "南汇区", "奉贤区", "浦东新区", "崇明县"]
  14575. }]
  14576. }, {
  14577. "name": "江苏省",
  14578. "city": [{
  14579. "name": "南京市",
  14580. "area": ["玄武区", "白下区", "秦淮区", "建邺区", "鼓楼区", "下关区", "栖霞区", "雨花台区", "浦口区", "江宁区", "六合区", "溧水县", "高淳县"]
  14581. }, {
  14582. "name": "苏州市",
  14583. "area": ["金阊区", "平江区", "沧浪区", "虎丘区", "吴中区", "相城区", "常熟市", "张家港市", "昆山市", "吴江市", "太仓市"]
  14584. }, {
  14585. "name": "无锡市",
  14586. "area": ["崇安区", "南长区", "北塘区", "滨湖区", "锡山区", "惠山区", "江阴市", "宜兴市"]
  14587. }, {
  14588. "name": "常州市",
  14589. "area": ["钟楼区", "天宁区", "戚墅堰区", "新北区", "武进区", "金坛市", "溧阳市"]
  14590. }, {
  14591. "name": "镇江市",
  14592. "area": ["京口区", "润州区", "丹徒区", "丹阳市", "扬中市", "句容市"]
  14593. }, {
  14594. "name": "南通市",
  14595. "area": ["崇川区", "港闸区", "通州市", "如皋市", "海门市", "启东市", "海安县", "如东县"]
  14596. }, {
  14597. "name": "泰州市",
  14598. "area": ["海陵区", "高港区", "姜堰市", "泰兴市", "靖江市", "兴化市"]
  14599. }, {
  14600. "name": "扬州市",
  14601. "area": ["广陵区", "维扬区", "邗江区", "江都市", "仪征市", "高邮市", "宝应县"]
  14602. }, {
  14603. "name": "盐城市",
  14604. "area": ["亭湖区", "盐都区", "大丰市", "东台市", "建湖县", "射阳县", "阜宁县", "滨海县", "响水县"]
  14605. }, {
  14606. "name": "连云港市",
  14607. "area": ["新浦区", "海州区", "连云区", "东海县", "灌云县", "赣榆县", "灌南县"]
  14608. }, {
  14609. "name": "徐州市",
  14610. "area": ["云龙区", "鼓楼区", "九里区", "泉山区", "贾汪区", "邳州市", "新沂市", "铜山县", "睢宁县", "沛县", "丰县"]
  14611. }, {
  14612. "name": "淮安市",
  14613. "area": ["清河区", "清浦区", "楚州区", "淮阴区", "涟水县", "洪泽县", "金湖县", "盱眙县"]
  14614. }, {
  14615. "name": "宿迁市",
  14616. "area": ["宿城区", "宿豫区", "沭阳县", "泗阳县", "泗洪县"]
  14617. }]
  14618. }, {
  14619. "name": "浙江省",
  14620. "city": [{
  14621. "name": "杭州市",
  14622. "area": ["拱墅区", "西湖区", "上城区", "下城区", "江干区", "滨江区", "余杭区", "萧山区", "建德市", "富阳市", "临安市", "桐庐县", "淳安县"]
  14623. }, {
  14624. "name": "宁波市",
  14625. "area": ["海曙区", "江东区", "江北区", "镇海区", "北仑区", "鄞州区", "余姚市", "慈溪市", "奉化市", "宁海县", "象山县"]
  14626. }, {
  14627. "name": "温州市",
  14628. "area": ["鹿城区", "龙湾区", "瓯海区", "瑞安市", "乐清市", "永嘉县", "洞头县", "平阳县", "苍南县", "文成县", "泰顺县"]
  14629. }, {
  14630. "name": "嘉兴市",
  14631. "area": ["秀城区", "秀洲区", "海宁市", "平湖市", "桐乡市", "嘉善县", "海盐县"]
  14632. }, {
  14633. "name": "湖州市",
  14634. "area": ["吴兴区", "南浔区", "长兴县", "德清县", "安吉县"]
  14635. }, {
  14636. "name": "绍兴市",
  14637. "area": ["越城区", "诸暨市", "上虞市", "嵊州市", "绍兴县", "新昌县"]
  14638. }, {
  14639. "name": "金华市",
  14640. "area": ["婺城区", "金东区", "兰溪市", "义乌市", "东阳市", "永康市", "武义县", "浦江县", "磐安县"]
  14641. }, {
  14642. "name": "衢州市",
  14643. "area": ["柯城区", "衢江区", "江山市", "龙游县", "常山县", "开化县"]
  14644. }, {
  14645. "name": "舟山市",
  14646. "area": ["定海区", "普陀区", "岱山县", "嵊泗县"]
  14647. }, {
  14648. "name": "台州市",
  14649. "area": ["椒江区", "黄岩区", "路桥区", "临海市", "温岭市", "玉环县", "天台县", "仙居县", "三门县"]
  14650. }, {
  14651. "name": "丽水市",
  14652. "area": ["莲都区", "龙泉市", "缙云县", "青田县", "云和县", "遂昌县", "松阳县", "庆元县", "景宁畲族自治县"]
  14653. }]
  14654. }, {
  14655. "name": "安徽省",
  14656. "city": [{
  14657. "name": "合肥市",
  14658. "area": ["庐阳区", "瑶海区", "蜀山区", "包河区", "长丰县", "肥东县", "肥西县"]
  14659. }, {
  14660. "name": "芜湖市",
  14661. "area": ["镜湖区", "弋江区", "鸠江区", "三山区", "芜湖县", "南陵县", "繁昌县"]
  14662. }, {
  14663. "name": "蚌埠市",
  14664. "area": ["蚌山区", "龙子湖区", "禹会区", "淮上区", "怀远县", "固镇县", "五河县"]
  14665. }, {
  14666. "name": "淮南市",
  14667. "area": ["田家庵区", "大通区", "谢家集区", "八公山区", "潘集区", "凤台县"]
  14668. }, {
  14669. "name": "马鞍山市",
  14670. "area": ["雨山区", "花山区", "金家庄区", "当涂县"]
  14671. }, {
  14672. "name": "淮北市",
  14673. "area": ["相山区", "杜集区", "烈山区", "濉溪县"]
  14674. }, {
  14675. "name": "铜陵市",
  14676. "area": ["铜官山区", "狮子山区", "郊区", "铜陵县"]
  14677. }, {
  14678. "name": "安庆市",
  14679. "area": ["迎江区", "大观区", "宜秀区", "桐城市", "宿松县", "枞阳县", "太湖县", "怀宁县", "岳西县", "望江县", "潜山县"]
  14680. }, {
  14681. "name": "黄山市",
  14682. "area": ["屯溪区", "黄山区", "徽州区", "休宁县", "歙县", "祁门县", "黟县"]
  14683. }, {
  14684. "name": "滁州市",
  14685. "area": ["琅琊区", "南谯区", "天长市", "明光市", "全椒县", "来安县", "定远县", "凤阳县"]
  14686. }, {
  14687. "name": "阜阳市",
  14688. "area": ["颍州区", "颍东区", "颍泉区", "界首市", "临泉县", "颍上县", "阜南县", "太和县"]
  14689. }, {
  14690. "name": "宿州市",
  14691. "area": ["埇桥区", "萧县", "泗县", "砀山县", "灵璧县"]
  14692. }, {
  14693. "name": "巢湖市",
  14694. "area": ["居巢区", "含山县", "无为县", "庐江县", "和县"]
  14695. }, {
  14696. "name": "六安市",
  14697. "area": ["金安区", "裕安区", "寿县", "霍山县", "霍邱县", "舒城县", "金寨县"]
  14698. }, {
  14699. "name": "亳州市",
  14700. "area": ["谯城区", "利辛县", "涡阳县", "蒙城县"]
  14701. }, {
  14702. "name": "池州市",
  14703. "area": ["贵池区", "东至县", "石台县", "青阳县"]
  14704. }, {
  14705. "name": "宣城市",
  14706. "area": ["宣州区", "宁国市", "广德县", "郎溪县", "泾县", "旌德县", "绩溪县"]
  14707. }]
  14708. }, {
  14709. "name": "福建省",
  14710. "city": [{
  14711. "name": "福州市",
  14712. "area": ["鼓楼区", "台江区", "仓山区", "马尾区", "晋安区", "福清市", "长乐市", "闽侯县", "闽清县", "永泰县", "连江县", "罗源县", "平潭县"]
  14713. }, {
  14714. "name": "厦门市",
  14715. "area": ["思明区", "海沧区", "湖里区", "集美区", "同安区", "翔安区"]
  14716. }, {
  14717. "name": "莆田市",
  14718. "area": ["城厢区", "涵江区", "荔城区", "秀屿区", "仙游县"]
  14719. }, {
  14720. "name": "三明市",
  14721. "area": ["梅列区", "三元区", "永安市", "明溪县", "将乐县", "大田县", "宁化县", "建宁县", "沙县", "尤溪县", "清流县", "泰宁县"]
  14722. }, {
  14723. "name": "泉州市",
  14724. "area": ["鲤城区", "丰泽区", "洛江区", "泉港区", "石狮市", "晋江市", "南安市", "惠安县", "永春县", "安溪县", "德化县", "金门县"]
  14725. }, {
  14726. "name": "漳州市",
  14727. "area": ["芗城区", "龙文区", "龙海市", "平和县", "南靖县", "诏安县", "漳浦县", "华安县", "东山县", "长泰县", "云霄县"]
  14728. }, {
  14729. "name": "南平市",
  14730. "area": ["延平区", "建瓯市", "邵武市", "武夷山市", "建阳市", "松溪县", "光泽县", "顺昌县", "浦城县", "政和县"]
  14731. }, {
  14732. "name": "龙岩市",
  14733. "area": ["新罗区", "漳平市", "长汀县", "武平县", "上杭县", "永定县", "连城县"]
  14734. }, {
  14735. "name": "宁德市",
  14736. "area": ["蕉城区", "福安市", "福鼎市", "寿宁县", "霞浦县", "柘荣县", "屏南县", "古田县", "周宁县"]
  14737. }]
  14738. }, {
  14739. "name": "江西省",
  14740. "city": [{
  14741. "name": "南昌市",
  14742. "area": ["东湖区", "西湖区", "青云谱区", "湾里区", "青山湖区", "新建县", "南昌县", "进贤县", "安义县"]
  14743. }, {
  14744. "name": "景德镇市",
  14745. "area": ["珠山区", "昌江区", "乐平市", "浮梁县"]
  14746. }, {
  14747. "name": "萍乡市",
  14748. "area": ["安源区", "湘东区", "莲花县", "上栗县", "芦溪县"]
  14749. }, {
  14750. "name": "九江市",
  14751. "area": ["浔阳区", "庐山区", "瑞昌市", "九江县", "星子县", "武宁县", "彭泽县", "永修县", "修水县", "湖口县", "德安县", "都昌县"]
  14752. }, {
  14753. "name": "新余市",
  14754. "area": ["渝水区", "分宜县"]
  14755. }, {
  14756. "name": "鹰潭市",
  14757. "area": ["月湖区", "贵溪市", "余江县"]
  14758. }, {
  14759. "name": "赣州市",
  14760. "area": ["章贡区", "瑞金市", "南康市", "石城县", "安远县", "赣县", "宁都县", "寻乌县", "兴国县", "定南县", "上犹县", "于都县", "龙南县", "崇义县", "信丰县", "全南县", "大余县", "会昌县"]
  14761. }, {
  14762. "name": "吉安市",
  14763. "area": ["吉州区", "青原区", "井冈山市", "吉安县", "永丰县", "永新县", "新干县", "泰和县", "峡江县", "遂川县", "安福县", "吉水县", "万安县"]
  14764. }, {
  14765. "name": "宜春市",
  14766. "area": ["袁州区", "丰城市", "樟树市", "高安市", "铜鼓县", "靖安县", "宜丰县", "奉新县", "万载县", "上高县"]
  14767. }, {
  14768. "name": "抚州市",
  14769. "area": ["临川区", "南丰县", "乐安县", "金溪县", "南城县", "东乡县", "资溪县", "宜黄县", "广昌县", "黎川县", "崇仁县"]
  14770. }, {
  14771. "name": "上饶市",
  14772. "area": ["信州区", "德兴市", "上饶县", "广丰县", "鄱阳县", "婺源县", "铅山县", "余干县", "横峰县", "弋阳县", "玉山县", "万年县"]
  14773. }]
  14774. }, {
  14775. "name": "山东省",
  14776. "city": [{
  14777. "name": "济南市",
  14778. "area": ["市中区", "历下区", "天桥区", "槐荫区", "历城区", "长清区", "章丘市", "平阴县", "济阳县", "商河县"]
  14779. }, {
  14780. "name": "青岛市",
  14781. "area": ["市南区", "市北区", "城阳区", "四方区", "李沧区", "黄岛区", "崂山区", "胶南市", "胶州市", "平度市", "莱西市", "即墨市"]
  14782. }, {
  14783. "name": "淄博市",
  14784. "area": ["张店区", "临淄区", "淄川区", "博山区", "周村区", "桓台县", "高青县", "沂源县"]
  14785. }, {
  14786. "name": "枣庄市",
  14787. "area": ["市中区", "山亭区", "峄城区", "台儿庄区", "薛城区", "滕州市"]
  14788. }, {
  14789. "name": "东营市",
  14790. "area": ["东营区", "河口区", "垦利县", "广饶县", "利津县"]
  14791. }, {
  14792. "name": "烟台市",
  14793. "area": ["芝罘区", "福山区", "牟平区", "莱山区", "龙口市", "莱阳市", "莱州市", "招远市", "蓬莱市", "栖霞市", "海阳市", "长岛县"]
  14794. }, {
  14795. "name": "潍坊市",
  14796. "area": ["潍城区", "寒亭区", "坊子区", "奎文区", "青州市", "诸城市", "寿光市", "安丘市", "高密市", "昌邑市", "昌乐县", "临朐县"]
  14797. }, {
  14798. "name": "济宁市",
  14799. "area": ["市中区", "任城区", "曲阜市", "兖州市", "邹城市", "鱼台县", "金乡县", "嘉祥县", "微山县", "汶上县", "泗水县", "梁山县"]
  14800. }, {
  14801. "name": "泰安市",
  14802. "area": ["泰山区", "岱岳区", "新泰市", "肥城市", "宁阳县", "东平县"]
  14803. }, {
  14804. "name": "威海市",
  14805. "area": ["环翠区", "乳山市", "文登市", "荣成市"]
  14806. }, {
  14807. "name": "日照市",
  14808. "area": ["东港区", "岚山区", "五莲县", "莒县"]
  14809. }, {
  14810. "name": "莱芜市",
  14811. "area": ["莱城区", "钢城区"]
  14812. }, {
  14813. "name": "临沂市",
  14814. "area": ["兰山区", "罗庄区", "河东区", "沂南县", "郯城县", "沂水县", "苍山县", "费县", "平邑县", "莒南县", "蒙阴县", "临沭县"]
  14815. }, {
  14816. "name": "德州市",
  14817. "area": ["德城区", "乐陵市", "禹城市", "陵县", "宁津县", "齐河县", "武城县", "庆云县", "平原县", "夏津县", "临邑县"]
  14818. }, {
  14819. "name": "聊城市",
  14820. "area": ["东昌府区", "临清市", "高唐县", "阳谷县", "茌平县", "莘县", "东阿县", "冠县"]
  14821. }, {
  14822. "name": "滨州市",
  14823. "area": ["滨城区", "邹平县", "沾化县", "惠民县", "博兴县", "阳信县", "无棣县"]
  14824. }, {
  14825. "name": "菏泽市",
  14826. "area": ["牡丹区", "鄄城县", "单县", "郓城县", "曹县", "定陶县", "巨野县", "东明县", "成武县"]
  14827. }]
  14828. }, {
  14829. "name": "河南省",
  14830. "city": [{
  14831. "name": "郑州市",
  14832. "area": ["中原区", "金水区", "二七区", "管城回族区", "上街区", "惠济区", "巩义市", "新郑市", "新密市", "登封市", "荥阳市", "中牟县"]
  14833. }, {
  14834. "name": "开封市",
  14835. "area": ["鼓楼区", "龙亭区", "顺河回族区", "禹王台区", "金明区", "开封县", "尉氏县", "兰考县", "杞县", "通许县"]
  14836. }, {
  14837. "name": "洛阳市",
  14838. "area": ["西工区", "老城区", "涧西区", "瀍河回族区", "洛龙区", "吉利区", "偃师市", "孟津县", "汝阳县", "伊川县", "洛宁县", "嵩县", "宜阳县", "新安县", "栾川县"]
  14839. }, {
  14840. "name": "平顶山市",
  14841. "area": ["新华区", "卫东区", "湛河区", "石龙区", "汝州市", "舞钢市", "宝丰县", "叶县", "郏县", "鲁山县"]
  14842. }, {
  14843. "name": "安阳市",
  14844. "area": ["北关区", "文峰区", "殷都区", "龙安区", "林州市", "安阳县", "滑县", "内黄县", "汤阴县"]
  14845. }, {
  14846. "name": "鹤壁市",
  14847. "area": ["淇滨区", "山城区", "鹤山区", "浚县", "淇县"]
  14848. }, {
  14849. "name": "新乡市",
  14850. "area": ["卫滨区", "红旗区", "凤泉区", "牧野区", "卫辉市", "辉县市", "新乡县", "获嘉县", "原阳县", "长垣县", "封丘县", "延津县"]
  14851. }, {
  14852. "name": "焦作市",
  14853. "area": ["解放区", "中站区", "马村区", "山阳区", "沁阳市", "孟州市", "修武县", "温县", "武陟县", "博爱县"]
  14854. }, {
  14855. "name": "濮阳市",
  14856. "area": ["华龙区", "濮阳县", "南乐县", "台前县", "清丰县", "范县"]
  14857. }, {
  14858. "name": "许昌市",
  14859. "area": ["魏都区", "禹州市", "长葛市", "许昌县", "鄢陵县", "襄城县"]
  14860. }, {
  14861. "name": "漯河市",
  14862. "area": ["源汇区", "郾城区", "召陵区", "临颍县", "舞阳县"]
  14863. }, {
  14864. "name": "三门峡市",
  14865. "area": ["湖滨区", "义马市", "灵宝市", "渑池县", "卢氏县", "陕县"]
  14866. }, {
  14867. "name": "南阳市",
  14868. "area": ["卧龙区", "宛城区", "邓州市", "桐柏县", "方城县", "淅川县", "镇平县", "唐河县", "南召县", "内乡县", "新野县", "社旗县", "西峡县"]
  14869. }, {
  14870. "name": "商丘市",
  14871. "area": ["梁园区", "睢阳区", "永城市", "宁陵县", "虞城县", "民权县", "夏邑县", "柘城县", "睢县"]
  14872. }, {
  14873. "name": "信阳市",
  14874. "area": ["浉河区", "平桥区", "潢川县", "淮滨县", "息县", "新县", "商城县", "固始县", "罗山县", "光山县"]
  14875. }, {
  14876. "name": "周口市",
  14877. "area": ["川汇区", "项城市", "商水县", "淮阳县", "太康县", "鹿邑县", "西华县", "扶沟县", "沈丘县", "郸城县"]
  14878. }, {
  14879. "name": "驻马店市",
  14880. "area": ["驿城区", "确山县", "新蔡县", "上蔡县", "西平县", "泌阳县", "平舆县", "汝南县", "遂平县", "正阳县"]
  14881. }, {
  14882. "name": "焦作市",
  14883. "area": ["济源市"]
  14884. }]
  14885. }, {
  14886. "name": "湖北省",
  14887. "city": [{
  14888. "name": "武汉市",
  14889. "area": ["江岸区", "武昌区", "江汉区", "硚口区", "汉阳区", "青山区", "洪山区", "东西湖区", "汉南区", "蔡甸区", "江夏区", "黄陂区", "新洲区"]
  14890. }, {
  14891. "name": "黄石市",
  14892. "area": ["黄石港区", "西塞山区", "下陆区", "铁山区", "大冶市", "阳新县"]
  14893. }, {
  14894. "name": "十堰市",
  14895. "area": ["张湾区", "茅箭区", "丹江口市", "郧县", "竹山县", "房县", "郧西县", "竹溪县"]
  14896. }, {
  14897. "name": "荆州市",
  14898. "area": ["沙市区", "荆州区", "洪湖市", "石首市", "松滋市", "监利县", "公安县", "江陵县"]
  14899. }, {
  14900. "name": "宜昌市",
  14901. "area": ["西陵区", "伍家岗区", "点军区", "猇亭区", "夷陵区", "宜都市", "当阳市", "枝江市", "秭归县", "远安县", "兴山县", "五峰土家族自治县", "长阳土家族自治县"]
  14902. }, {
  14903. "name": "襄樊市",
  14904. "area": ["襄城区", "樊城区", "襄阳区", "老河口市", "枣阳市", "宜城市", "南漳县", "谷城县", "保康县"]
  14905. }, {
  14906. "name": "鄂州市",
  14907. "area": ["鄂城区", "华容区", "梁子湖区"]
  14908. }, {
  14909. "name": "荆门市",
  14910. "area": ["东宝区", "掇刀区", "钟祥市", "京山县", "沙洋县"]
  14911. }, {
  14912. "name": "孝感市",
  14913. "area": ["孝南区", "应城市", "安陆市", "汉川市", "云梦县", "大悟县", "孝昌县"]
  14914. }, {
  14915. "name": "黄冈市",
  14916. "area": ["黄州区", "麻城市", "武穴市", "红安县", "罗田县", "浠水县", "蕲春县", "黄梅县", "英山县", "团风县"]
  14917. }, {
  14918. "name": "咸宁市",
  14919. "area": ["咸安区", "赤壁市", "嘉鱼县", "通山县", "崇阳县", "通城县"]
  14920. }, {
  14921. "name": "随州市",
  14922. "area": ["曾都区", "广水市"]
  14923. }, {
  14924. "name": "恩施土家族苗族自治州",
  14925. "area": ["恩施市", "利川市", "建始县", "来凤县", "巴东县", "鹤峰县", "宣恩县", "咸丰县"]
  14926. }, {
  14927. "name": "仙桃市",
  14928. "area": ["仙桃"]
  14929. }, {
  14930. "name": "天门市",
  14931. "area": ["天门"]
  14932. }, {
  14933. "name": "潜江市",
  14934. "area": ["潜江"]
  14935. }, {
  14936. "name": "神农架林区",
  14937. "area": ["神农架林区"]
  14938. }]
  14939. }, {
  14940. "name": "湖南省",
  14941. "city": [{
  14942. "name": "长沙市",
  14943. "area": ["岳麓区", "芙蓉区", "天心区", "开福区", "雨花区", "浏阳市", "长沙县", "望城县", "宁乡县"]
  14944. }, {
  14945. "name": "株洲市",
  14946. "area": ["天元区", "荷塘区", "芦淞区", "石峰区", "醴陵市", "株洲县", "炎陵县", "茶陵县", "攸县"]
  14947. }, {
  14948. "name": "湘潭市",
  14949. "area": ["岳塘区", "雨湖区", "湘乡市", "韶山市", "湘潭县"]
  14950. }, {
  14951. "name": "衡阳市",
  14952. "area": ["雁峰区", "珠晖区", "石鼓区", "蒸湘区", "南岳区", "耒阳市", "常宁市", "衡阳县", "衡东县", "衡山县", "衡南县", "祁东县"]
  14953. }, {
  14954. "name": "邵阳市",
  14955. "area": ["双清区", "大祥区", "北塔区", "武冈市", "邵东县", "洞口县", "新邵县", "绥宁县", "新宁县", "邵阳县", "隆回县", "城步苗族自治县"]
  14956. }, {
  14957. "name": "岳阳市",
  14958. "area": ["岳阳楼区", "云溪区", "君山区", "临湘市", "汨罗市", "岳阳县", "湘阴县", "平江县", "华容县"]
  14959. }, {
  14960. "name": "常德市",
  14961. "area": ["武陵区", "鼎城区", "津市市", "澧县", "临澧县", "桃源县", "汉寿县", "安乡县", "石门县"]
  14962. }, {
  14963. "name": "张家界市",
  14964. "area": ["永定区", "武陵源区", "慈利县", "桑植县"]
  14965. }, {
  14966. "name": "益阳市",
  14967. "area": ["赫山区", "资阳区", "沅江市", "桃江县", "南县", "安化县"]
  14968. }, {
  14969. "name": "郴州市",
  14970. "area": ["北湖区", "苏仙区", "资兴市", "宜章县", "汝城县", "安仁县", "嘉禾县", "临武县", "桂东县", "永兴县", "桂阳县"]
  14971. }, {
  14972. "name": "永州市",
  14973. "area": ["冷水滩区", "零陵区", "祁阳县", "蓝山县", "宁远县", "新田县", "东安县", "江永县", "道县", "双牌县", "江华瑶族自治县"]
  14974. }, {
  14975. "name": "怀化市",
  14976. "area": ["鹤城区", "洪江市", "会同县", "沅陵县", "辰溪县", "溆浦县", "中方县", "新晃侗族自治县", "芷江侗族自治县", "通道侗族自治县", "靖州苗族侗族自治县", "麻阳苗族自治县"]
  14977. }, {
  14978. "name": "娄底市",
  14979. "area": ["娄星区", "冷水江市", "涟源市", "新化县", "双峰县"]
  14980. }, {
  14981. "name": "湘西土家族苗族自治州",
  14982. "area": ["吉首市", "古丈县", "龙山县", "永顺县", "凤凰县", "泸溪县", "保靖县", "花垣县"]
  14983. }]
  14984. }, {
  14985. "name": "广东省",
  14986. "city": [{
  14987. "name": "广州市",
  14988. "area": ["越秀区", "荔湾区", "海珠区", "天河区", "白云区", "黄埔区", "番禺区", "花都区", "南沙区", "萝岗区", "增城市", "从化市"]
  14989. }, {
  14990. "name": "深圳市",
  14991. "area": ["福田区", "罗湖区", "南山区", "宝安区", "龙岗区", "盐田区"]
  14992. }, {
  14993. "name": "东莞市",
  14994. "area": ["莞城", "常平", "塘厦", "塘厦", "塘厦"]
  14995. }, {
  14996. "name": "中山市",
  14997. "area": ["中山"]
  14998. }, {
  14999. "name": "潮州市",
  15000. "area": ["湘桥区", "潮安县", "饶平县"]
  15001. }, {
  15002. "name": "揭阳市",
  15003. "area": ["榕城区", "揭东县", "揭西县", "惠来县", "普宁市"]
  15004. }, {
  15005. "name": "云浮市",
  15006. "area": ["云城区", "新兴县", "郁南县", "云安县", "罗定市"]
  15007. }, {
  15008. "name": "珠海市",
  15009. "area": ["香洲区", "斗门区", "金湾区"]
  15010. }, {
  15011. "name": "汕头市",
  15012. "area": ["金平区", "濠江区", "龙湖区", "潮阳区", "潮南区", "澄海区", "南澳县"]
  15013. }, {
  15014. "name": "韶关市",
  15015. "area": ["浈江区", "武江区", "曲江区", "乐昌市", "南雄市", "始兴县", "仁化县", "翁源县", "新丰县", "乳源瑶族自治县"]
  15016. }, {
  15017. "name": "佛山市",
  15018. "area": ["禅城区", "南海区", "顺德区", "三水区", "高明区"]
  15019. }, {
  15020. "name": "江门市",
  15021. "area": ["蓬江区", "江海区", "新会区", "恩平市", "台山市", "开平市", "鹤山市"]
  15022. }, {
  15023. "name": "湛江市",
  15024. "area": ["赤坎区", "霞山区", "坡头区", "麻章区", "吴川市", "廉江市", "雷州市", "遂溪县", "徐闻县"]
  15025. }, {
  15026. "name": "茂名市",
  15027. "area": ["茂南区", "茂港区", "化州市", "信宜市", "高州市", "电白县"]
  15028. }, {
  15029. "name": "肇庆市",
  15030. "area": ["端州区", "鼎湖区", "高要市", "四会市", "广宁县", "怀集县", "封开县", "德庆县"]
  15031. }, {
  15032. "name": "惠州市",
  15033. "area": ["惠城区", "惠阳区", "博罗县", "惠东县", "龙门县"]
  15034. }, {
  15035. "name": "梅州市",
  15036. "area": ["梅江区", "兴宁市", "梅县", "大埔县", "丰顺县", "五华县", "平远县", "蕉岭县"]
  15037. }, {
  15038. "name": "汕尾市",
  15039. "area": ["城区", "陆丰市", "海丰县", "陆河县"]
  15040. }, {
  15041. "name": "河源市",
  15042. "area": ["源城区", "紫金县", "龙川县", "连平县", "和平县", "东源县"]
  15043. }, {
  15044. "name": "阳江市",
  15045. "area": ["江城区", "阳春市", "阳西县", "阳东县"]
  15046. }, {
  15047. "name": "清远市",
  15048. "area": ["清城区", "英德市", "连州市", "佛冈县", "阳山县", "清新县", "连山壮族瑶族自治县", "连南瑶族自治县"]
  15049. }]
  15050. }, {
  15051. "name": "广西",
  15052. "city": [{
  15053. "name": "南宁市",
  15054. "area": ["青秀区", "兴宁区", "西乡塘区", "良庆区", "江南区", "邕宁区", "武鸣县", "隆安县", "马山县", "上林县", "宾阳县", "横县"]
  15055. }, {
  15056. "name": "柳州市",
  15057. "area": ["城中区", "鱼峰区", "柳北区", "柳南区", "柳江县", "柳城县", "鹿寨县", "融安县", "融水苗族自治县", "三江侗族自治县"]
  15058. }, {
  15059. "name": "桂林市",
  15060. "area": ["象山区", "秀峰区", "叠彩区", "七星区", "雁山区", "阳朔县", "临桂县", "灵川县", "全州县", "平乐县", "兴安县", "灌阳县", "荔浦县", "资源县", "永福县", "龙胜各族自治县", "恭城瑶族自治县"]
  15061. }, {
  15062. "name": "梧州市",
  15063. "area": ["万秀区", "蝶山区", "长洲区", "岑溪市", "苍梧县", "藤县", "蒙山县"]
  15064. }, {
  15065. "name": "北海市",
  15066. "area": ["海城区", "银海区", "铁山港区", "合浦县"]
  15067. }, {
  15068. "name": "防城港市",
  15069. "area": ["港口区", "防城区", "东兴市", "上思县"]
  15070. }, {
  15071. "name": "钦州市",
  15072. "area": ["钦南区", "钦北区", "灵山县", "浦北县"]
  15073. }, {
  15074. "name": "贵港市",
  15075. "area": ["港北区", "港南区", "覃塘区", "桂平市", "平南县"]
  15076. }, {
  15077. "name": "玉林市",
  15078. "area": ["玉州区", "北流市", "容县", "陆川县", "博白县", "兴业县"]
  15079. }, {
  15080. "name": "百色市",
  15081. "area": ["右江区", "凌云县", "平果县", "西林县", "乐业县", "德保县", "田林县", "田阳县", "靖西县", "田东县", "那坡县", "隆林各族自治县"]
  15082. }, {
  15083. "name": "贺州市",
  15084. "area": ["八步区", "钟山县", "昭平县", "富川瑶族自治县"]
  15085. }, {
  15086. "name": "河池市",
  15087. "area": ["金城江区", "宜州市", "天峨县", "凤山县", "南丹县", "东兰县", "都安瑶族自治县", "罗城仫佬族自治县", "巴马瑶族自治县", "环江毛南族自治县", "大化瑶族自治县"]
  15088. }, {
  15089. "name": "来宾市",
  15090. "area": ["兴宾区", "合山市", "象州县", "武宣县", "忻城县", "金秀瑶族自治县"]
  15091. }, {
  15092. "name": "崇左市",
  15093. "area": ["江州区", "凭祥市", "宁明县", "扶绥县", "龙州县", "大新县", "天等县"]
  15094. }]
  15095. }, {
  15096. "name": "海南省",
  15097. "city": [{
  15098. "name": "海口市",
  15099. "area": ["龙华区", "秀英区", "琼山区", "美兰区"]
  15100. }, {
  15101. "name": "三亚市",
  15102. "area": ["三亚市"]
  15103. }, {
  15104. "name": "五指山市",
  15105. "area": ["五指山"]
  15106. }, {
  15107. "name": "琼海市",
  15108. "area": ["琼海"]
  15109. }, {
  15110. "name": "儋州市",
  15111. "area": ["儋州"]
  15112. }, {
  15113. "name": "文昌市",
  15114. "area": ["文昌"]
  15115. }, {
  15116. "name": "万宁市",
  15117. "area": ["万宁"]
  15118. }, {
  15119. "name": "东方市",
  15120. "area": ["东方"]
  15121. }, {
  15122. "name": "澄迈县",
  15123. "area": ["澄迈县"]
  15124. }, {
  15125. "name": "定安县",
  15126. "area": ["定安县"]
  15127. }, {
  15128. "name": "屯昌县",
  15129. "area": ["屯昌县"]
  15130. }, {
  15131. "name": "临高县",
  15132. "area": ["临高县"]
  15133. }, {
  15134. "name": "白沙黎族自治县",
  15135. "area": ["白沙黎族自治县"]
  15136. }, {
  15137. "name": "昌江黎族自治县",
  15138. "area": ["昌江黎族自治县"]
  15139. }, {
  15140. "name": "乐东黎族自治县",
  15141. "area": ["乐东黎族自治县"]
  15142. }, {
  15143. "name": "陵水黎族自治县",
  15144. "area": ["陵水黎族自治县"]
  15145. }, {
  15146. "name": "保亭黎族苗族自治县",
  15147. "area": ["保亭黎族苗族自治县"]
  15148. }, {
  15149. "name": "琼中黎族苗族自治县",
  15150. "area": ["琼中黎族苗族自治县"]
  15151. }]
  15152. }, {
  15153. "name": "重庆市",
  15154. "city": [{
  15155. "name": "重庆市",
  15156. "area": ["渝中区", "大渡口区", "江北区", "南岸区", "北碚区", "渝北区", "巴南区", "长寿区", "双桥区", "沙坪坝区", "万盛区", "万州区", "涪陵区", "黔江区", "永川区", "合川区", "江津区", "九龙坡区", "南川区", "綦江县", "潼南县", "荣昌县", "璧山县", "大足县", "铜梁县", "梁平县", "开县", "忠县", "城口县", "垫江县", "武隆县", "丰都县", "奉节县", "云阳县", "巫溪县", "巫山县", "石柱土家族自治县", "秀山土家族苗族自治县", "酉阳土家族苗族自治县", "彭水苗族土家族自治县"]
  15157. }]
  15158. }, {
  15159. "name": "四川省",
  15160. "city": [{
  15161. "name": "成都市",
  15162. "area": ["青羊区", "锦江区", "金牛区", "武侯区", "成华区", "龙泉驿区", "青白江区", "新都区", "温江区", "都江堰市", "彭州市", "邛崃市", "崇州市", "金堂县", "郫县", "新津县", "双流县", "蒲江县", "大邑县"]
  15163. }, {
  15164. "name": "自贡市",
  15165. "area": ["大安区", "自流井区", "贡井区", "沿滩区", "荣县", "富顺县"]
  15166. }, {
  15167. "name": "攀枝花市",
  15168. "area": ["仁和区", "米易县", "盐边县", "东区", "西区"]
  15169. }, {
  15170. "name": "泸州市",
  15171. "area": ["江阳区", "纳溪区", "龙马潭区", "泸县", "合江县", "叙永县", "古蔺县"]
  15172. }, {
  15173. "name": "德阳市",
  15174. "area": ["旌阳区", "广汉市", "什邡市", "绵竹市", "罗江县", "中江县"]
  15175. }, {
  15176. "name": "绵阳市",
  15177. "area": ["涪城区", "游仙区", "江油市", "盐亭县", "三台县", "平武县", "安县", "梓潼县", "北川羌族自治县"]
  15178. }, {
  15179. "name": "广元市",
  15180. "area": ["元坝区", "朝天区", "青川县", "旺苍县", "剑阁县", "苍溪县", "市中区"]
  15181. }, {
  15182. "name": "遂宁市",
  15183. "area": ["船山区", "安居区", "射洪县", "蓬溪县", "大英县"]
  15184. }, {
  15185. "name": "内江市",
  15186. "area": ["市中区", "东兴区", "资中县", "隆昌县", "威远县"]
  15187. }, {
  15188. "name": "乐山市",
  15189. "area": ["市中区", "五通桥区", "沙湾区", "金口河区", "峨眉山市", "夹江县", "井研县", "犍为县", "沐川县", "马边彝族自治县", "峨边彝族自治县"]
  15190. }, {
  15191. "name": "南充",
  15192. "area": ["顺庆区", "高坪区", "嘉陵区", "阆中市", "营山县", "蓬安县", "仪陇县", "南部县", "西充县"]
  15193. }, {
  15194. "name": "眉山市",
  15195. "area": ["东坡区", "仁寿县", "彭山县", "洪雅县", "丹棱县", "青神县"]
  15196. }, {
  15197. "name": "宜宾市",
  15198. "area": ["翠屏区", "宜宾县", "兴文县", "南溪县", "珙县", "长宁县", "高县", "江安县", "筠连县", "屏山县"]
  15199. }, {
  15200. "name": "广安市",
  15201. "area": ["广安区", "华蓥市", "岳池县", "邻水县", "武胜县"]
  15202. }, {
  15203. "name": "达州市",
  15204. "area": ["通川区", "万源市", "达县", "渠县", "宣汉县", "开江县", "大竹县"]
  15205. }, {
  15206. "name": "雅安市",
  15207. "area": ["雨城区", "芦山县", "石棉县", "名山县", "天全县", "荥经县", "宝兴县", "汉源县"]
  15208. }, {
  15209. "name": "巴中市",
  15210. "area": ["巴州区", "南江县", "平昌县", "通江县"]
  15211. }, {
  15212. "name": "资阳市",
  15213. "area": ["雁江区", "简阳市", "安岳县", "乐至县"]
  15214. }, {
  15215. "name": "阿坝藏族羌族自治州",
  15216. "area": ["马尔康县", "九寨沟县", "红原县", "汶川县", "阿坝县", "理县", "若尔盖县", "小金县", "黑水县", "金川县", "松潘县", "壤塘县", "茂县"]
  15217. }, {
  15218. "name": "甘孜藏族自治州",
  15219. "area": ["康定县", "丹巴县", "炉霍县", "九龙县", "甘孜县", "雅江县", "新龙县", "道孚县", "白玉县", "理塘县", "德格县", "乡城县", "石渠县", "稻城县", "色达县", "巴塘县", "泸定县", "得荣县"]
  15220. }, {
  15221. "name": "凉山彝族自治州",
  15222. "area": ["西昌市", "美姑县", "昭觉县", "金阳县", "甘洛县", "布拖县", "雷波县", "普格县", "宁南县", "喜德县", "会东县", "越西县", "会理县", "盐源县", "德昌县", "冕宁县", "木里藏族自治县"]
  15223. }]
  15224. }, {
  15225. "name": "贵州省",
  15226. "city": [{
  15227. "name": "贵阳市",
  15228. "area": ["南明区", "云岩区", "花溪区", "乌当区", "白云区", "小河区", "清镇市", "开阳县", "修文县", "息烽县"]
  15229. }, {
  15230. "name": "六盘水市",
  15231. "area": ["钟山区", "水城县", "盘县", "六枝特区"]
  15232. }, {
  15233. "name": "遵义市",
  15234. "area": ["红花岗区", "汇川区", "赤水市", "仁怀市", "遵义县", "绥阳县", "桐梓县", "习水县", "凤冈县", "正安县", "余庆县", "湄潭县", "道真仡佬族苗族自治县", "务川仡佬族苗族自治县"]
  15235. }, {
  15236. "name": "安顺市",
  15237. "area": ["西秀区", "普定县", "平坝县", "镇宁布依族苗族自治县", "紫云苗族布依族自治县", "关岭布依族苗族自治县"]
  15238. }, {
  15239. "name": "铜仁地区",
  15240. "area": ["铜仁市", "德江县", "江口县", "思南县", "石阡县", "玉屏侗族自治县", "松桃苗族自治县", "印江土家族苗族自治县", "沿河土家族自治县", "万山特区"]
  15241. }, {
  15242. "name": "毕节地区",
  15243. "area": ["毕节市", "黔西县", "大方县", "织金县", "金沙县", "赫章县", "纳雍县", "威宁彝族回族苗族自治县"]
  15244. }, {
  15245. "name": "黔西南布依族苗族自治州",
  15246. "area": ["兴义市", "望谟县", "兴仁县", "普安县", "册亨县", "晴隆县", "贞丰县", "安龙县"]
  15247. }, {
  15248. "name": "黔东南苗族侗族自治州",
  15249. "area": ["凯里市", "施秉县", "从江县", "锦屏县", "镇远县", "麻江县", "台江县", "天柱县", "黄平县", "榕江县", "剑河县", "三穗县", "雷山县", "黎平县", "岑巩县", "丹寨县"]
  15250. }, {
  15251. "name": "黔南布依族苗族自治州",
  15252. "area": ["都匀市", "福泉市", "贵定县", "惠水县", "罗甸县", "瓮安县", "荔波县", "龙里县", "平塘县", "长顺县", "独山县", "三都水族自治县"]
  15253. }]
  15254. }, {
  15255. "name": "云南省",
  15256. "city": [{
  15257. "name": "昆明市",
  15258. "area": ["盘龙区", "五华区", "官渡区", "西山区", "东川区", "安宁市", "呈贡县", "晋宁县", "富民县", "宜良县", "嵩明县", "石林彝族自治县", "禄劝彝族苗族自治县", "寻甸回族彝族自治县"]
  15259. }, {
  15260. "name": "曲靖市",
  15261. "area": ["麒麟区", "宣威市", "马龙县", "沾益县", "富源县", "罗平县", "师宗县", "陆良县", "会泽县"]
  15262. }, {
  15263. "name": "玉溪市",
  15264. "area": ["红塔区", "江川县", "澄江县", "通海县", "华宁县", "易门县", "峨山彝族自治县", "新平彝族傣族自治县", "元江哈尼族彝族傣族自治县"]
  15265. }, {
  15266. "name": "保山市",
  15267. "area": ["隆阳区", "施甸县", "腾冲县", "龙陵县", "昌宁县"]
  15268. }, {
  15269. "name": "昭通市",
  15270. "area": ["昭阳区", "鲁甸县", "巧家县", "盐津县", "大关县", "永善县", "绥江县", "镇雄县", "彝良县", "威信县", "水富县"]
  15271. }, {
  15272. "name": "丽江市",
  15273. "area": ["古城区", "永胜县", "华坪县", "玉龙纳西族自治县", "宁蒗彝族自治县"]
  15274. }, {
  15275. "name": "普洱市",
  15276. "area": ["思茅区", "普洱哈尼族彝族自治县", "墨江哈尼族自治县", "景东彝族自治县", "景谷傣族彝族自治县", "镇沅彝族哈尼族拉祜族自治县", "江城哈尼族彝族自治县", "孟连傣族拉祜族佤族自治县", "澜沧拉祜族自治县", "西盟佤族自治县"]
  15277. }, {
  15278. "name": "临沧市",
  15279. "area": ["临翔区", "凤庆县", "云县", "永德县", "镇康县", "双江拉祜族佤族布朗族傣族自治县", "耿马傣族佤族自治县", "沧源佤族自治县"]
  15280. }, {
  15281. "name": "德宏傣族景颇族自治州",
  15282. "area": ["潞西市", "瑞丽市", "梁河县", "盈江县", "陇川县"]
  15283. }, {
  15284. "name": "怒江傈僳族自治州",
  15285. "area": ["泸水县", "福贡县", "贡山独龙族怒族自治县", "兰坪白族普米族自治县"]
  15286. }, {
  15287. "name": "迪庆藏族自治州",
  15288. "area": ["香格里拉县", "德钦县", "维西傈僳族自治县"]
  15289. }, {
  15290. "name": "大理白族自治州",
  15291. "area": ["大理市", "祥云县", "宾川县", "弥渡县", "永平县", "云龙县", "洱源县", "剑川县", "鹤庆县", "漾濞彝族自治县", "南涧彝族自治县", "巍山彝族回族自治县"]
  15292. }, {
  15293. "name": "楚雄彝族自治州",
  15294. "area": ["楚雄市", "双柏县", "牟定县", "南华县", "姚安县", "大姚县", "永仁县", "元谋县", "武定县", "禄丰县"]
  15295. }, {
  15296. "name": "红河哈尼族彝族自治州",
  15297. "area": ["蒙自县", "个旧市", "开远市", "绿春县", "建水县", "石屏县", "弥勒县", "泸西县", "元阳县", "红河县", "金平苗族瑶族傣族自治县", "河口瑶族自治县", "屏边苗族自治县"]
  15298. }, {
  15299. "name": "文山壮族苗族自治州",
  15300. "area": ["文山县", "砚山县", "西畴县", "麻栗坡县", "马关县", "丘北县", "广南县", "富宁县"]
  15301. }, {
  15302. "name": "西双版纳傣族自治州",
  15303. "area": ["景洪市", "勐海县", "勐腊县"]
  15304. }]
  15305. }, {
  15306. "name": "西藏",
  15307. "city": [{
  15308. "name": "拉萨市",
  15309. "area": ["城关区", "林周县", "当雄县", "尼木县", "曲水县", "堆龙德庆县", "达孜县", "墨竹工卡县"]
  15310. }, {
  15311. "name": "那曲地区",
  15312. "area": ["那曲县", "嘉黎县", "比如县", "聂荣县", "安多县", "申扎县", "索县", "班戈县", "巴青县", "尼玛县"]
  15313. }, {
  15314. "name": "昌都地区",
  15315. "area": ["昌都县", "江达县", "贡觉县", "类乌齐县", "丁青县", "察雅县", "八宿县", "左贡县", "芒康县", "洛隆县", "边坝县"]
  15316. }, {
  15317. "name": "林芝地区",
  15318. "area": ["林芝县", "工布江达县", "米林县", "墨脱县", "波密县", "察隅县", "朗县"]
  15319. }, {
  15320. "name": "山南地区",
  15321. "area": ["乃东县", "扎囊县", "贡嘎县", "桑日县", "琼结县", "曲松县", "措美县", "洛扎县", "加查县", "隆子县", "错那县", "浪卡子县"]
  15322. }, {
  15323. "name": "日喀则地区",
  15324. "area": ["日喀则市", "南木林县", "江孜县", "定日县", "萨迦县", "拉孜县", "昂仁县", "谢通门县", "白朗县", "仁布县", "康马县", "定结县", "仲巴县", "亚东县", "吉隆县", "聂拉木县", "萨嘎县", "岗巴县"]
  15325. }, {
  15326. "name": "阿里地区",
  15327. "area": ["噶尔县", "普兰县", "札达县", "日土县", "革吉县", "改则县", "措勤县"]
  15328. }]
  15329. }, {
  15330. "name": "陕西省",
  15331. "city": [{
  15332. "name": "西安市",
  15333. "area": ["莲湖区", "新城区", "碑林区", "雁塔区", "灞桥区", "未央区", "阎良区", "临潼区", "长安区", "高陵县", "蓝田县", "户县", "周至县"]
  15334. }, {
  15335. "name": "铜川市",
  15336. "area": ["耀州区", "王益区", "印台区", "宜君县"]
  15337. }, {
  15338. "name": "宝鸡市",
  15339. "area": ["渭滨区", "金台区", "陈仓区", "岐山县", "凤翔县", "陇县", "太白县", "麟游县", "扶风县", "千阳县", "眉县", "凤县"]
  15340. }, {
  15341. "name": "咸阳市",
  15342. "area": ["秦都区", "渭城区", "杨陵区", "兴平市", "礼泉县", "泾阳县", "永寿县", "三原县", "彬县", "旬邑县", "长武县", "乾县", "武功县", "淳化县"]
  15343. }, {
  15344. "name": "渭南市",
  15345. "area": ["临渭区", "韩城市", "华阴市", "蒲城县", "潼关县", "白水县", "澄城县", "华县", "合阳县", "富平县", "大荔县"]
  15346. }, {
  15347. "name": "延安市",
  15348. "area": ["宝塔区", "安塞县", "洛川县", "子长县", "黄陵县", "延川县", "富县", "延长县", "甘泉县", "宜川县", "志丹县", "黄龙县", "吴起县"]
  15349. }, {
  15350. "name": "汉中市",
  15351. "area": ["汉台区", "留坝县", "镇巴县", "城固县", "南郑县", "洋县", "宁强县", "佛坪县", "勉县", "西乡县", "略阳县"]
  15352. }, {
  15353. "name": "榆林市",
  15354. "area": ["榆阳区", "清涧县", "绥德县", "神木县", "佳县", "府谷县", "子洲县", "靖边县", "横山县", "米脂县", "吴堡县", "定边县"]
  15355. }, {
  15356. "name": "安康市",
  15357. "area": ["汉滨区", "紫阳县", "岚皋县", "旬阳县", "镇坪县", "平利县", "石泉县", "宁陕县", "白河县", "汉阴县"]
  15358. }, {
  15359. "name": "商洛市",
  15360. "area": ["商州区", "镇安县", "山阳县", "洛南县", "商南县", "丹凤县", "柞水县"]
  15361. }]
  15362. }, {
  15363. "name": "甘肃省",
  15364. "city": [{
  15365. "name": "兰州市",
  15366. "area": ["城关区", "七里河区", "西固区", "安宁区", "红古区", "永登县", "皋兰县", "榆中县"]
  15367. }, {
  15368. "name": "嘉峪关市",
  15369. "area": ["嘉峪关市"]
  15370. }, {
  15371. "name": "金昌市",
  15372. "area": ["金川区", "永昌县"]
  15373. }, {
  15374. "name": "白银市",
  15375. "area": ["白银区", "平川区", "靖远县", "会宁县", "景泰县"]
  15376. }, {
  15377. "name": "天水市",
  15378. "area": ["清水县", "秦安县", "甘谷县", "武山县", "张家川回族自治县", "北道区", "秦城区"]
  15379. }, {
  15380. "name": "武威市",
  15381. "area": ["凉州区", "民勤县", "古浪县", "天祝藏族自治县"]
  15382. }, {
  15383. "name": "酒泉市",
  15384. "area": ["肃州区", "玉门市", "敦煌市", "金塔县", "肃北蒙古族自治县", "阿克塞哈萨克族自治县", "安西县"]
  15385. }, {
  15386. "name": "张掖市",
  15387. "area": ["甘州区", "民乐县", "临泽县", "高台县", "山丹县", "肃南裕固族自治县"]
  15388. }, {
  15389. "name": "庆阳市",
  15390. "area": ["西峰区", "庆城县", "环县", "华池县", "合水县", "正宁县", "宁县", "镇原县"]
  15391. }, {
  15392. "name": "平凉市",
  15393. "area": ["崆峒区", "泾川县", "灵台县", "崇信县", "华亭县", "庄浪县", "静宁县"]
  15394. }, {
  15395. "name": "定西市",
  15396. "area": ["安定区", "通渭县", "临洮县", "漳县", "岷县", "渭源县", "陇西县"]
  15397. }, {
  15398. "name": "陇南市",
  15399. "area": ["武都区", "成县", "宕昌县", "康县", "文县", "西和县", "礼县", "两当县", "徽县"]
  15400. }, {
  15401. "name": "临夏回族自治州",
  15402. "area": ["临夏市", "临夏县", "康乐县", "永靖县", "广河县", "和政县", "东乡族自治县", "积石山保安族东乡族撒拉族自治县"]
  15403. }, {
  15404. "name": "甘南藏族自治州",
  15405. "area": ["合作市", "临潭县", "卓尼县", "舟曲县", "迭部县", "玛曲县", "碌曲县", "夏河县"]
  15406. }]
  15407. }, {
  15408. "name": "青海省",
  15409. "city": [{
  15410. "name": "西宁市",
  15411. "area": ["城中区", "城东区", "城西区", "城北区", "湟源县", "湟中县", "大通回族土族自治县"]
  15412. }, {
  15413. "name": "海东地区",
  15414. "area": ["平安县", "乐都县", "民和回族土族自治县", "互助土族自治县", "化隆回族自治县", "循化撒拉族自治县"]
  15415. }, {
  15416. "name": "海北藏族自治州",
  15417. "area": ["海晏县", "祁连县", "刚察县", "门源回族自治县"]
  15418. }, {
  15419. "name": "海南藏族自治州",
  15420. "area": ["共和县", "同德县", "贵德县", "兴海县", "贵南县"]
  15421. }, {
  15422. "name": "黄南藏族自治州",
  15423. "area": ["同仁县", "尖扎县", "泽库县", "河南蒙古族自治县"]
  15424. }, {
  15425. "name": "果洛藏族自治州",
  15426. "area": ["玛沁县", "班玛县", "甘德县", "达日县", "久治县", "玛多县"]
  15427. }, {
  15428. "name": "玉树藏族自治州",
  15429. "area": ["玉树县", "杂多县", "称多县", "治多县", "囊谦县", "曲麻莱县"]
  15430. }, {
  15431. "name": "海西蒙古族藏族自治州",
  15432. "area": ["德令哈市", "格尔木市", "乌兰县", "都兰县", "天峻县"]
  15433. }]
  15434. }, {
  15435. "name": "宁夏",
  15436. "city": [{
  15437. "name": "银川市",
  15438. "area": ["兴庆区", "西夏区", "金凤区", "灵武市", "永宁县", "贺兰县"]
  15439. }, {
  15440. "name": "石嘴山市",
  15441. "area": ["大武口区", "惠农区", "平罗县"]
  15442. }, {
  15443. "name": "吴忠市",
  15444. "area": ["利通区", "青铜峡市", "盐池县", "同心县"]
  15445. }, {
  15446. "name": "固原市",
  15447. "area": ["原州区", "西吉县", "隆德县", "泾源县", "彭阳县"]
  15448. }, {
  15449. "name": "中卫市",
  15450. "area": ["沙坡头区", "中宁县", "海原县"]
  15451. }]
  15452. }, {
  15453. "name": "新疆",
  15454. "city": [{
  15455. "name": "乌鲁木齐市",
  15456. "area": ["天山区", "沙依巴克区", "新市区", "水磨沟区", "头屯河区", "达坂城区", "东山区", "乌鲁木齐县"]
  15457. }, {
  15458. "name": "克拉玛依市",
  15459. "area": ["克拉玛依区", "独山子区", "白碱滩区", "乌尔禾区"]
  15460. }, {
  15461. "name": "吐鲁番地区",
  15462. "area": ["吐鲁番市", "托克逊县", "鄯善县"]
  15463. }, {
  15464. "name": "哈密地区",
  15465. "area": ["哈密市", "伊吾县", "巴里坤哈萨克自治县"]
  15466. }, {
  15467. "name": "和田地区",
  15468. "area": ["和田市", "和田县", "洛浦县", "民丰县", "皮山县", "策勒县", "于田县", "墨玉县"]
  15469. }, {
  15470. "name": "阿克苏地区",
  15471. "area": ["阿克苏市", "温宿县", "沙雅县", "拜城县", "阿瓦提县", "库车县", "柯坪县", "新和县", "乌什县"]
  15472. }, {
  15473. "name": "喀什地区",
  15474. "area": ["喀什市", "巴楚县", "泽普县", "伽师县", "叶城县", "岳普湖县", "疏勒县", "麦盖提县", "英吉沙县", "莎车县", "疏附县", "塔什库尔干塔吉克自治县"]
  15475. }, {
  15476. "name": "克孜勒苏柯尔克孜自治州",
  15477. "area": ["阿图什市", "阿合奇县", "乌恰县", "阿克陶县"]
  15478. }, {
  15479. "name": "巴音郭楞蒙古自治州",
  15480. "area": ["库尔勒市", "和静县", "尉犁县", "和硕县", "且末县", "博湖县", "轮台县", "若羌县", "焉耆回族自治县"]
  15481. }, {
  15482. "name": "昌吉回族自治州",
  15483. "area": ["昌吉市", "阜康市", "奇台县", "玛纳斯县", "吉木萨尔县", "呼图壁县", "木垒哈萨克自治县", "米泉市"]
  15484. }, {
  15485. "name": "博尔塔拉蒙古自治州",
  15486. "area": ["博乐市", "精河县", "温泉县"]
  15487. }, {
  15488. "name": "石河子",
  15489. "area": ["石河子"]
  15490. }, {
  15491. "name": "阿拉尔",
  15492. "area": ["阿拉尔"]
  15493. }, {
  15494. "name": "图木舒克",
  15495. "area": ["图木舒克"]
  15496. }, {
  15497. "name": "五家渠",
  15498. "area": ["五家渠"]
  15499. }, {
  15500. "name": "伊犁哈萨克自治州",
  15501. "area": ["伊宁市", "奎屯市", "伊宁县", "特克斯县", "尼勒克县", "昭苏县", "新源县", "霍城县", "巩留县", "察布查尔锡伯自治县", "塔城地区", "阿勒泰地区"]
  15502. }]
  15503. }, {
  15504. "name": "台湾省",
  15505. "city": [{
  15506. "name": "台北市",
  15507. "area": ["内湖区", "南港区", "中正区", "万华区", "大同区", "中山区", "松山区", "大安区", "信义区", "文山区", "士林区", "北投区"]
  15508. }, {
  15509. "name": "新北市",
  15510. "area": ["板桥区", "汐止区", "新店区"]
  15511. }, {
  15512. "name": "桃园市",
  15513. "area": ["其他"]
  15514. }, {
  15515. "name": "台中市",
  15516. "area": ["其他"]
  15517. }, {
  15518. "name": "台南市",
  15519. "area": ["其他"]
  15520. }, {
  15521. "name": "高雄市",
  15522. "area": ["其他"]
  15523. }]
  15524. }, {
  15525. "name": "澳门",
  15526. "city": [{
  15527. "name": "澳门",
  15528. "area": ["花地玛堂区", "圣安多尼堂区", "大堂区", "望德堂区", "风顺堂区", "嘉模堂区", "圣方济各堂区", "路凼"]
  15529. }]
  15530. }, {
  15531. "name": "香港",
  15532. "city": [{
  15533. "name": "香港",
  15534. "area": ["深水埗区", "油尖旺区", "九龙城区", "黄大仙区", "观塘区", "北区", "大埔区", "沙田区", "西贡区", "元朗区", "屯门区", "荃湾区", "葵青区", "离岛区", "中西区", "湾仔区", "东区", "南区"]
  15535. }]
  15536. }];
  15537. exports.default = _default;
  15538. /***/ }),
  15539. /***/ 48:
  15540. /*!********************************************!*\
  15541. !*** E:/项目/2023-8/xyl/utils/loginUtils.js ***!
  15542. \********************************************/
  15543. /*! no static exports found */
  15544. /***/ (function(module, exports, __webpack_require__) {
  15545. "use strict";
  15546. /* WEBPACK VAR INJECTION */(function(uni) {
  15547. Object.defineProperty(exports, "__esModule", {
  15548. value: true
  15549. });
  15550. exports.getActionPage = getActionPage;
  15551. exports.getPageUrl = getPageUrl;
  15552. exports.interceptor = interceptor;
  15553. exports.saveUrl = saveUrl;
  15554. function getActionPage() {
  15555. var pages = getCurrentPages();
  15556. return pages[pages.length - 1];
  15557. }
  15558. //登录拦截
  15559. function interceptor() {
  15560. var pages = getActionPage();
  15561. // 获取当前页面
  15562. var pageUrl = '/' + pages.route;
  15563. var url = '/pages/public/login';
  15564. url = '/pages/public/wxLogin';
  15565. if (pageUrl != url) {
  15566. uni.navigateTo({
  15567. url: url
  15568. });
  15569. }
  15570. }
  15571. // 保存页面
  15572. function saveUrl() {
  15573. var path = getPageUrl(true);
  15574. uni.setStorageSync('present', path);
  15575. }
  15576. // 处理分享链接地址
  15577. function getPageUrl() {
  15578. var showSpeard = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  15579. var page = getActionPage();
  15580. var path = '/' + page.route;
  15581. var url = '';
  15582. // 获取对象可枚举键值列表
  15583. var objKeys = Object.keys(page.options);
  15584. // 判断有无传值
  15585. if (objKeys.length > 0) {
  15586. // 循环赋值对象数据
  15587. for (var a in page.options) {
  15588. // 判断有无邀请人
  15589. if (a != 'speard') {
  15590. url += a + "=" + page.options[a] + "&";
  15591. } else {
  15592. // 判断是否需要存储邀请人
  15593. if (showSpeard) {
  15594. url += a + "=" + page.options[a] + "&";
  15595. }
  15596. }
  15597. }
  15598. path += '?' + url.substr(0, url.length - 1);
  15599. }
  15600. // 返回处理邀请人后的邀请地址
  15601. return path;
  15602. }
  15603. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  15604. /***/ }),
  15605. /***/ 485:
  15606. /*!*******************************************************************!*\
  15607. !*** E:/项目/2023-8/xyl/components/jyf-parser/libs/MpHtmlParser.js ***!
  15608. \*******************************************************************/
  15609. /*! no static exports found */
  15610. /***/ (function(module, exports, __webpack_require__) {
  15611. /* WEBPACK VAR INJECTION */(function(uni) {/**
  15612. * html 解析器
  15613. * @tutorial https://github.com/jin-yufeng/Parser
  15614. * @version 20200728
  15615. * @author JinYufeng
  15616. * @listens MIT
  15617. */
  15618. var cfg = __webpack_require__(/*! ./config.js */ 486),
  15619. blankChar = cfg.blankChar,
  15620. CssHandler = __webpack_require__(/*! ./CssHandler.js */ 487),
  15621. windowWidth = uni.getSystemInfoSync().windowWidth;
  15622. var emoji;
  15623. function MpHtmlParser(data) {
  15624. var _this = this;
  15625. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  15626. this.attrs = {};
  15627. this.CssHandler = new CssHandler(options.tagStyle, windowWidth);
  15628. this.data = data;
  15629. this.domain = options.domain;
  15630. this.DOM = [];
  15631. this.i = this.start = this.audioNum = this.imgNum = this.videoNum = 0;
  15632. options.prot = (this.domain || '').includes('://') ? this.domain.split('://')[0] : 'http';
  15633. this.options = options;
  15634. this.state = this.Text;
  15635. this.STACK = [];
  15636. // 工具函数
  15637. this.bubble = function () {
  15638. for (var i = _this.STACK.length, item; item = _this.STACK[--i];) {
  15639. if (cfg.richOnlyTags[item.name]) {
  15640. if (item.name == 'table' && !Object.hasOwnProperty.call(item, 'c')) item.c = 1;
  15641. return false;
  15642. }
  15643. item.c = 1;
  15644. }
  15645. return true;
  15646. };
  15647. this.decode = function (val, amp) {
  15648. var i = -1,
  15649. j,
  15650. en;
  15651. while (1) {
  15652. if ((i = val.indexOf('&', i + 1)) == -1) break;
  15653. if ((j = val.indexOf(';', i + 2)) == -1) break;
  15654. if (val[i + 1] == '#') {
  15655. en = parseInt((val[i + 2] == 'x' ? '0' : '') + val.substring(i + 2, j));
  15656. if (!isNaN(en)) val = val.substr(0, i) + String.fromCharCode(en) + val.substr(j + 1);
  15657. } else {
  15658. en = val.substring(i + 1, j);
  15659. if (cfg.entities[en] || en == amp) val = val.substr(0, i) + (cfg.entities[en] || '&') + val.substr(j + 1);
  15660. }
  15661. }
  15662. return val;
  15663. };
  15664. this.getUrl = function (url) {
  15665. if (url[0] == '/') {
  15666. if (url[1] == '/') url = _this.options.prot + ':' + url;else if (_this.domain) url = _this.domain + url;
  15667. } else if (_this.domain && url.indexOf('data:') != 0 && !url.includes('://')) url = _this.domain + '/' + url;
  15668. return url;
  15669. };
  15670. this.isClose = function () {
  15671. return _this.data[_this.i] == '>' || _this.data[_this.i] == '/' && _this.data[_this.i + 1] == '>';
  15672. };
  15673. this.section = function () {
  15674. return _this.data.substring(_this.start, _this.i);
  15675. };
  15676. this.parent = function () {
  15677. return _this.STACK[_this.STACK.length - 1];
  15678. };
  15679. this.siblings = function () {
  15680. return _this.STACK.length ? _this.parent().children : _this.DOM;
  15681. };
  15682. }
  15683. MpHtmlParser.prototype.parse = function () {
  15684. if (emoji) this.data = emoji.parseEmoji(this.data);
  15685. for (var c; c = this.data[this.i]; this.i++) {
  15686. this.state(c);
  15687. }
  15688. if (this.state == this.Text) this.setText();
  15689. while (this.STACK.length) {
  15690. this.popNode(this.STACK.pop());
  15691. }
  15692. return this.DOM;
  15693. };
  15694. // 设置属性
  15695. MpHtmlParser.prototype.setAttr = function () {
  15696. var name = this.attrName.toLowerCase(),
  15697. val = this.attrVal;
  15698. if (cfg.boolAttrs[name]) this.attrs[name] = 'T';else if (val) {
  15699. if (name == 'src' || name == 'data-src' && !this.attrs.src) this.attrs.src = this.getUrl(this.decode(val, 'amp'));else if (name == 'href' || name == 'style') this.attrs[name] = this.decode(val, 'amp');else if (name.substr(0, 5) != 'data-') this.attrs[name] = val;
  15700. }
  15701. this.attrVal = '';
  15702. while (blankChar[this.data[this.i]]) {
  15703. this.i++;
  15704. }
  15705. if (this.isClose()) this.setNode();else {
  15706. this.start = this.i;
  15707. this.state = this.AttrName;
  15708. }
  15709. };
  15710. // 设置文本节点
  15711. MpHtmlParser.prototype.setText = function () {
  15712. var back,
  15713. text = this.section();
  15714. if (!text) return;
  15715. text = cfg.onText && cfg.onText(text, function () {
  15716. return back = true;
  15717. }) || text;
  15718. if (back) {
  15719. this.data = this.data.substr(0, this.start) + text + this.data.substr(this.i);
  15720. var j = this.start + text.length;
  15721. for (this.i = this.start; this.i < j; this.i++) {
  15722. this.state(this.data[this.i]);
  15723. }
  15724. return;
  15725. }
  15726. if (!this.pre) {
  15727. // 合并空白符
  15728. var flag,
  15729. tmp = [];
  15730. for (var i = text.length, c; c = text[--i];) {
  15731. if (!blankChar[c]) {
  15732. tmp.unshift(c);
  15733. if (!flag) flag = 1;
  15734. } else {
  15735. if (tmp[0] != ' ') tmp.unshift(' ');
  15736. if (c == '\n' && flag == void 0) flag = 0;
  15737. }
  15738. }
  15739. if (flag == 0) return;
  15740. text = tmp.join('');
  15741. }
  15742. this.siblings().push({
  15743. type: 'text',
  15744. text: this.decode(text)
  15745. });
  15746. };
  15747. // 设置元素节点
  15748. MpHtmlParser.prototype.setNode = function () {
  15749. var node = {
  15750. name: this.tagName.toLowerCase(),
  15751. attrs: this.attrs
  15752. },
  15753. close = cfg.selfClosingTags[node.name];
  15754. if (this.options.nodes.length) node.type = 'node';
  15755. this.attrs = {};
  15756. if (!cfg.ignoreTags[node.name]) {
  15757. // 处理属性
  15758. var attrs = node.attrs,
  15759. style = this.CssHandler.match(node.name, attrs, node) + (attrs.style || ''),
  15760. styleObj = {};
  15761. if (attrs.id) {
  15762. if (this.options.compress & 1) attrs.id = void 0;else if (this.options.useAnchor) this.bubble();
  15763. }
  15764. if (this.options.compress & 2 && attrs.class) attrs.class = void 0;
  15765. switch (node.name) {
  15766. case 'a':
  15767. case 'ad':
  15768. this.bubble();
  15769. break;
  15770. case 'font':
  15771. if (attrs.color) {
  15772. styleObj['color'] = attrs.color;
  15773. attrs.color = void 0;
  15774. }
  15775. if (attrs.face) {
  15776. styleObj['font-family'] = attrs.face;
  15777. attrs.face = void 0;
  15778. }
  15779. if (attrs.size) {
  15780. var size = parseInt(attrs.size);
  15781. if (size < 1) size = 1;else if (size > 7) size = 7;
  15782. var map = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
  15783. styleObj['font-size'] = map[size - 1];
  15784. attrs.size = void 0;
  15785. }
  15786. break;
  15787. case 'embed':
  15788. var src = node.attrs.src || '',
  15789. type = node.attrs.type || '';
  15790. if (type.includes('video') || src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8')) node.name = 'video';else if (type.includes('audio') || src.includes('.m4a') || src.includes('.wav') || src.includes('.mp3') || src.includes('.aac')) node.name = 'audio';else break;
  15791. if (node.attrs.autostart) node.attrs.autoplay = 'T';
  15792. node.attrs.controls = 'T';
  15793. case 'video':
  15794. case 'audio':
  15795. if (!attrs.id) attrs.id = node.name + ++this["".concat(node.name, "Num")];else this["".concat(node.name, "Num")]++;
  15796. if (node.name == 'video') {
  15797. if (this.videoNum > 3) node.lazyLoad = 1;
  15798. if (attrs.width) {
  15799. styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px');
  15800. attrs.width = void 0;
  15801. }
  15802. if (attrs.height) {
  15803. styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px');
  15804. attrs.height = void 0;
  15805. }
  15806. }
  15807. if (!attrs.controls && !attrs.autoplay) attrs.controls = 'T';
  15808. attrs.source = [];
  15809. if (attrs.src) {
  15810. attrs.source.push(attrs.src);
  15811. attrs.src = void 0;
  15812. }
  15813. this.bubble();
  15814. break;
  15815. case 'td':
  15816. case 'th':
  15817. if (attrs.colspan || attrs.rowspan) for (var k = this.STACK.length, item; item = this.STACK[--k];) {
  15818. if (item.name == 'table') {
  15819. item.c = void 0;
  15820. break;
  15821. }
  15822. }
  15823. }
  15824. if (attrs.align) {
  15825. styleObj['text-align'] = attrs.align;
  15826. attrs.align = void 0;
  15827. }
  15828. // 压缩 style
  15829. var styles = style.split(';');
  15830. style = '';
  15831. for (var i = 0, len = styles.length; i < len; i++) {
  15832. var info = styles[i].split(':');
  15833. if (info.length < 2) continue;
  15834. var _key = info[0].trim().toLowerCase(),
  15835. _value = info.slice(1).join(':').trim();
  15836. if (_value[0] == '-' || _value.includes('safe')) style += ";".concat(_key, ":").concat(_value);else if (!styleObj[_key] || _value.includes('import') || !styleObj[_key].includes('import')) styleObj[_key] = _value;
  15837. }
  15838. if (node.name == 'img') {
  15839. if (attrs.src && !attrs.ignore) {
  15840. if (this.bubble()) attrs.i = (this.imgNum++).toString();else attrs.ignore = 'T';
  15841. }
  15842. if (attrs.ignore) {
  15843. style += ';-webkit-touch-callout:none';
  15844. styleObj['max-width'] = '100%';
  15845. }
  15846. var width;
  15847. if (styleObj.width) width = styleObj.width;else if (attrs.width) width = attrs.width.includes('%') ? attrs.width : attrs.width + 'px';
  15848. if (width) {
  15849. styleObj.width = width;
  15850. attrs.width = '100%';
  15851. if (parseInt(width) > windowWidth) {
  15852. styleObj.height = '';
  15853. if (attrs.height) attrs.height = void 0;
  15854. }
  15855. }
  15856. if (styleObj.height) {
  15857. attrs.height = styleObj.height;
  15858. styleObj.height = '';
  15859. } else if (attrs.height && !attrs.height.includes('%')) attrs.height += 'px';
  15860. }
  15861. for (var key in styleObj) {
  15862. var value = styleObj[key];
  15863. if (!value) continue;
  15864. if (key.includes('flex') || key == 'order' || key == 'self-align') node.c = 1;
  15865. // 填充链接
  15866. if (value.includes('url')) {
  15867. var j = value.indexOf('(');
  15868. if (j++ != -1) {
  15869. while (value[j] == '"' || value[j] == "'" || blankChar[value[j]]) {
  15870. j++;
  15871. }
  15872. value = value.substr(0, j) + this.getUrl(value.substr(j));
  15873. }
  15874. }
  15875. // 转换 rpx
  15876. else if (value.includes('rpx')) value = value.replace(/[0-9.]+\s*rpx/g, function ($) {
  15877. return parseFloat($) * windowWidth / 750 + 'px';
  15878. });else if (key == 'white-space' && value.includes('pre') && !close) this.pre = node.pre = true;
  15879. style += ";".concat(key, ":").concat(value);
  15880. }
  15881. style = style.substr(1);
  15882. if (style) attrs.style = style;
  15883. if (!close) {
  15884. node.children = [];
  15885. if (node.name == 'pre' && cfg.highlight) {
  15886. this.remove(node);
  15887. this.pre = node.pre = true;
  15888. }
  15889. this.siblings().push(node);
  15890. this.STACK.push(node);
  15891. } else if (!cfg.filter || cfg.filter(node, this) != false) this.siblings().push(node);
  15892. } else {
  15893. if (!close) this.remove(node);else if (node.name == 'source') {
  15894. var parent = this.parent();
  15895. if (parent && (parent.name == 'video' || parent.name == 'audio') && node.attrs.src) parent.attrs.source.push(node.attrs.src);
  15896. } else if (node.name == 'base' && !this.domain) this.domain = node.attrs.href;
  15897. }
  15898. if (this.data[this.i] == '/') this.i++;
  15899. this.start = this.i + 1;
  15900. this.state = this.Text;
  15901. };
  15902. // 移除标签
  15903. MpHtmlParser.prototype.remove = function (node) {
  15904. var _this2 = this;
  15905. var name = node.name,
  15906. j = this.i;
  15907. // 处理 svg
  15908. var handleSvg = function handleSvg() {
  15909. var src = _this2.data.substring(j, _this2.i + 1);
  15910. if (!node.attrs.xmlns) src = ' xmlns="http://www.w3.org/2000/svg"' + src;
  15911. var i = j;
  15912. while (_this2.data[j] != '<') {
  15913. j--;
  15914. }
  15915. src = _this2.data.substring(j, i).replace("viewbox", "viewBox") + src;
  15916. var parent = _this2.parent();
  15917. if (node.attrs.width == '100%' && parent && (parent.attrs.style || '').includes('inline')) parent.attrs.style = 'width:300px;max-width:100%;' + parent.attrs.style;
  15918. _this2.siblings().push({
  15919. name: 'img',
  15920. attrs: {
  15921. src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
  15922. style: (/vertical[^;]+/.exec(node.attrs.style) || []).shift(),
  15923. ignore: 'T'
  15924. }
  15925. });
  15926. };
  15927. if (node.name == 'svg' && this.data[j] == '/') return handleSvg(this.i++);
  15928. while (1) {
  15929. if ((this.i = this.data.indexOf('</', this.i + 1)) == -1) {
  15930. if (name == 'pre' || name == 'svg') this.i = j;else this.i = this.data.length;
  15931. return;
  15932. }
  15933. this.start = this.i += 2;
  15934. while (!blankChar[this.data[this.i]] && !this.isClose()) {
  15935. this.i++;
  15936. }
  15937. if (this.section().toLowerCase() == name) {
  15938. // 代码块高亮
  15939. if (name == 'pre') {
  15940. this.data = this.data.substr(0, j + 1) + cfg.highlight(this.data.substring(j + 1, this.i - 5), node.attrs) + this.data.substr(this.i - 5);
  15941. return this.i = j;
  15942. } else if (name == 'style') this.CssHandler.getStyle(this.data.substring(j + 1, this.i - 7));else if (name == 'title') this.DOM.title = this.data.substring(j + 1, this.i - 7);
  15943. if ((this.i = this.data.indexOf('>', this.i)) == -1) this.i = this.data.length;
  15944. if (name == 'svg') handleSvg();
  15945. return;
  15946. }
  15947. }
  15948. };
  15949. // 节点出栈处理
  15950. MpHtmlParser.prototype.popNode = function (node) {
  15951. // 空白符处理
  15952. if (node.pre) {
  15953. node.pre = this.pre = void 0;
  15954. for (var i = this.STACK.length; i--;) {
  15955. if (this.STACK[i].pre) this.pre = true;
  15956. }
  15957. }
  15958. var siblings = this.siblings(),
  15959. len = siblings.length,
  15960. childs = node.children;
  15961. if (node.name == 'head' || cfg.filter && cfg.filter(node, this) == false) return siblings.pop();
  15962. var attrs = node.attrs;
  15963. // 替换一些标签名
  15964. if (cfg.blockTags[node.name]) node.name = 'div';else if (!cfg.trustTags[node.name]) node.name = 'span';
  15965. // 处理列表
  15966. if (node.c && (node.name == 'ul' || node.name == 'ol')) {
  15967. if ((node.attrs.style || '').includes('list-style:none')) {
  15968. for (var _i = 0, child; child = childs[_i++];) {
  15969. if (child.name == 'li') child.name = 'div';
  15970. }
  15971. } else if (node.name == 'ul') {
  15972. var floor = 1;
  15973. for (var _i2 = this.STACK.length; _i2--;) {
  15974. if (this.STACK[_i2].name == 'ul') floor++;
  15975. }
  15976. if (floor != 1) for (var _i3 = childs.length; _i3--;) {
  15977. childs[_i3].floor = floor;
  15978. }
  15979. } else {
  15980. for (var _i4 = 0, num = 1, _child; _child = childs[_i4++];) {
  15981. if (_child.name == 'li') {
  15982. _child.type = 'ol';
  15983. _child.num = function (num, type) {
  15984. if (type == 'a') return String.fromCharCode(97 + (num - 1) % 26);
  15985. if (type == 'A') return String.fromCharCode(65 + (num - 1) % 26);
  15986. if (type == 'i' || type == 'I') {
  15987. num = (num - 1) % 99 + 1;
  15988. var one = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'],
  15989. ten = ['X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'],
  15990. res = (ten[Math.floor(num / 10) - 1] || '') + (one[num % 10 - 1] || '');
  15991. if (type == 'i') return res.toLowerCase();
  15992. return res;
  15993. }
  15994. return num;
  15995. }(num++, attrs.type) + '.';
  15996. }
  15997. }
  15998. }
  15999. }
  16000. // 处理表格的边框
  16001. if (node.name == 'table') {
  16002. var padding = attrs.cellpadding,
  16003. spacing = attrs.cellspacing,
  16004. border = attrs.border;
  16005. if (node.c) {
  16006. this.bubble();
  16007. attrs.style = (attrs.style || '') + ';display:table';
  16008. if (!padding) padding = 2;
  16009. if (!spacing) spacing = 2;
  16010. }
  16011. if (border) attrs.style = "border:".concat(border, "px solid gray;").concat(attrs.style || '');
  16012. if (spacing) attrs.style = "border-spacing:".concat(spacing, "px;").concat(attrs.style || '');
  16013. if (border || padding || node.c) (function f(ns) {
  16014. for (var i = 0, n; n = ns[i]; i++) {
  16015. if (n.type == 'text') continue;
  16016. var style = n.attrs.style || '';
  16017. if (node.c && n.name[0] == 't') {
  16018. n.c = 1;
  16019. style += ';display:table-' + (n.name == 'th' || n.name == 'td' ? 'cell' : n.name == 'tr' ? 'row' : 'row-group');
  16020. }
  16021. if (n.name == 'th' || n.name == 'td') {
  16022. if (border) style = "border:".concat(border, "px solid gray;").concat(style);
  16023. if (padding) style = "padding:".concat(padding, "px;").concat(style);
  16024. } else f(n.children || []);
  16025. if (style) n.attrs.style = style;
  16026. }
  16027. })(childs);
  16028. if (this.options.autoscroll) {
  16029. var table = Object.assign({}, node);
  16030. node.name = 'div';
  16031. node.attrs = {
  16032. style: 'overflow:scroll'
  16033. };
  16034. node.children = [table];
  16035. }
  16036. }
  16037. this.CssHandler.pop && this.CssHandler.pop(node);
  16038. // 自动压缩
  16039. if (node.name == 'div' && !Object.keys(attrs).length && childs.length == 1 && childs[0].name == 'div') siblings[len - 1] = childs[0];
  16040. };
  16041. // 状态机
  16042. MpHtmlParser.prototype.Text = function (c) {
  16043. if (c == '<') {
  16044. var next = this.data[this.i + 1],
  16045. isLetter = function isLetter(c) {
  16046. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
  16047. };
  16048. if (isLetter(next)) {
  16049. this.setText();
  16050. this.start = this.i + 1;
  16051. this.state = this.TagName;
  16052. } else if (next == '/') {
  16053. this.setText();
  16054. if (isLetter(this.data[++this.i + 1])) {
  16055. this.start = this.i + 1;
  16056. this.state = this.EndTag;
  16057. } else this.Comment();
  16058. } else if (next == '!' || next == '?') {
  16059. this.setText();
  16060. this.Comment();
  16061. }
  16062. }
  16063. };
  16064. MpHtmlParser.prototype.Comment = function () {
  16065. var key;
  16066. if (this.data.substring(this.i + 2, this.i + 4) == '--') key = '-->';else if (this.data.substring(this.i + 2, this.i + 9) == '[CDATA[') key = ']]>';else key = '>';
  16067. if ((this.i = this.data.indexOf(key, this.i + 2)) == -1) this.i = this.data.length;else this.i += key.length - 1;
  16068. this.start = this.i + 1;
  16069. this.state = this.Text;
  16070. };
  16071. MpHtmlParser.prototype.TagName = function (c) {
  16072. if (blankChar[c]) {
  16073. this.tagName = this.section();
  16074. while (blankChar[this.data[this.i]]) {
  16075. this.i++;
  16076. }
  16077. if (this.isClose()) this.setNode();else {
  16078. this.start = this.i;
  16079. this.state = this.AttrName;
  16080. }
  16081. } else if (this.isClose()) {
  16082. this.tagName = this.section();
  16083. this.setNode();
  16084. }
  16085. };
  16086. MpHtmlParser.prototype.AttrName = function (c) {
  16087. if (c == '=' || blankChar[c] || this.isClose()) {
  16088. this.attrName = this.section();
  16089. if (blankChar[c]) while (blankChar[this.data[++this.i]]) {
  16090. ;
  16091. }
  16092. if (this.data[this.i] == '=') {
  16093. while (blankChar[this.data[++this.i]]) {
  16094. ;
  16095. }
  16096. this.start = this.i--;
  16097. this.state = this.AttrValue;
  16098. } else this.setAttr();
  16099. }
  16100. };
  16101. MpHtmlParser.prototype.AttrValue = function (c) {
  16102. if (c == '"' || c == "'") {
  16103. this.start++;
  16104. if ((this.i = this.data.indexOf(c, this.i + 1)) == -1) return this.i = this.data.length;
  16105. this.attrVal = this.section();
  16106. this.i++;
  16107. } else {
  16108. for (; !blankChar[this.data[this.i]] && !this.isClose(); this.i++) {
  16109. ;
  16110. }
  16111. this.attrVal = this.section();
  16112. }
  16113. this.setAttr();
  16114. };
  16115. MpHtmlParser.prototype.EndTag = function (c) {
  16116. if (blankChar[c] || c == '>' || c == '/') {
  16117. var name = this.section().toLowerCase();
  16118. for (var i = this.STACK.length; i--;) {
  16119. if (this.STACK[i].name == name) break;
  16120. }
  16121. if (i != -1) {
  16122. var node;
  16123. while ((node = this.STACK.pop()).name != name) {
  16124. this.popNode(node);
  16125. }
  16126. this.popNode(node);
  16127. } else if (name == 'p' || name == 'br') this.siblings().push({
  16128. name: name,
  16129. attrs: {}
  16130. });
  16131. this.i = this.data.indexOf('>', this.i);
  16132. this.start = this.i + 1;
  16133. if (this.i == -1) this.i = this.data.length;else this.state = this.Text;
  16134. }
  16135. };
  16136. module.exports = MpHtmlParser;
  16137. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  16138. /***/ }),
  16139. /***/ 486:
  16140. /*!*************************************************************!*\
  16141. !*** E:/项目/2023-8/xyl/components/jyf-parser/libs/config.js ***!
  16142. \*************************************************************/
  16143. /*! no static exports found */
  16144. /***/ (function(module, exports, __webpack_require__) {
  16145. /* WEBPACK VAR INJECTION */(function(wx) {/* 配置文件 */
  16146. var cfg = {
  16147. // 出错占位图
  16148. errorImg: null,
  16149. // 过滤器函数
  16150. filter: null,
  16151. // 代码高亮函数
  16152. highlight: null,
  16153. // 文本处理函数
  16154. onText: null,
  16155. // 实体编码列表
  16156. entities: {
  16157. quot: '"',
  16158. apos: "'",
  16159. semi: ';',
  16160. nbsp: '\xA0',
  16161. ensp: "\u2002",
  16162. emsp: "\u2003",
  16163. ndash: '–',
  16164. mdash: '—',
  16165. middot: '·',
  16166. lsquo: '‘',
  16167. rsquo: '’',
  16168. ldquo: '“',
  16169. rdquo: '”',
  16170. bull: '•',
  16171. hellip: '…'
  16172. },
  16173. blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'),
  16174. boolAttrs: makeMap('allowfullscreen,autoplay,autostart,controls,ignore,loop,muted'),
  16175. // 块级标签,将被转为 div
  16176. blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
  16177. // 将被移除的标签
  16178. ignoreTags: makeMap('area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr'),
  16179. // 只能被 rich-text 显示的标签
  16180. richOnlyTags: makeMap('a,colgroup,fieldset,legend,table'),
  16181. // 自闭合的标签
  16182. selfClosingTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
  16183. // 信任的标签
  16184. trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
  16185. // 默认的标签样式
  16186. userAgentStyles: {
  16187. address: 'font-style:italic',
  16188. big: 'display:inline;font-size:1.2em',
  16189. blockquote: 'background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px',
  16190. caption: 'display:table-caption;text-align:center',
  16191. center: 'text-align:center',
  16192. cite: 'font-style:italic',
  16193. dd: 'margin-left:40px',
  16194. mark: 'background-color:yellow',
  16195. pre: 'font-family:monospace;white-space:pre;overflow:scroll',
  16196. s: 'text-decoration:line-through',
  16197. small: 'display:inline;font-size:0.8em',
  16198. u: 'text-decoration:underline'
  16199. }
  16200. };
  16201. function makeMap(str) {
  16202. var map = Object.create(null),
  16203. list = str.split(',');
  16204. for (var i = list.length; i--;) {
  16205. map[list[i]] = true;
  16206. }
  16207. return map;
  16208. }
  16209. if (wx.canIUse('editor')) {
  16210. cfg.blockTags.pre = void 0;
  16211. cfg.ignoreTags.rp = true;
  16212. Object.assign(cfg.richOnlyTags, makeMap('bdi,bdo,caption,rt,ruby'));
  16213. Object.assign(cfg.trustTags, makeMap('bdi,bdo,caption,pre,rt,ruby'));
  16214. }
  16215. module.exports = cfg;
  16216. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  16217. /***/ }),
  16218. /***/ 487:
  16219. /*!*****************************************************************!*\
  16220. !*** E:/项目/2023-8/xyl/components/jyf-parser/libs/CssHandler.js ***!
  16221. \*****************************************************************/
  16222. /*! no static exports found */
  16223. /***/ (function(module, exports, __webpack_require__) {
  16224. var cfg = __webpack_require__(/*! ./config.js */ 486),
  16225. isLetter = function isLetter(c) {
  16226. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
  16227. };
  16228. function CssHandler(tagStyle) {
  16229. var styles = Object.assign(Object.create(null), cfg.userAgentStyles);
  16230. for (var item in tagStyle) {
  16231. styles[item] = (styles[item] ? styles[item] + ';' : '') + tagStyle[item];
  16232. }
  16233. this.styles = styles;
  16234. }
  16235. CssHandler.prototype.getStyle = function (data) {
  16236. this.styles = new parser(data, this.styles).parse();
  16237. };
  16238. CssHandler.prototype.match = function (name, attrs) {
  16239. var tmp,
  16240. matched = (tmp = this.styles[name]) ? tmp + ';' : '';
  16241. if (attrs.class) {
  16242. var items = attrs.class.split(' ');
  16243. for (var i = 0, item; item = items[i]; i++) {
  16244. if (tmp = this.styles['.' + item]) matched += tmp + ';';
  16245. }
  16246. }
  16247. if (tmp = this.styles['#' + attrs.id]) matched += tmp + ';';
  16248. return matched;
  16249. };
  16250. module.exports = CssHandler;
  16251. function parser(data, init) {
  16252. this.data = data;
  16253. this.floor = 0;
  16254. this.i = 0;
  16255. this.list = [];
  16256. this.res = init;
  16257. this.state = this.Space;
  16258. }
  16259. parser.prototype.parse = function () {
  16260. for (var c; c = this.data[this.i]; this.i++) {
  16261. this.state(c);
  16262. }
  16263. return this.res;
  16264. };
  16265. parser.prototype.section = function () {
  16266. return this.data.substring(this.start, this.i);
  16267. };
  16268. // 状态机
  16269. parser.prototype.Space = function (c) {
  16270. if (c == '.' || c == '#' || isLetter(c)) {
  16271. this.start = this.i;
  16272. this.state = this.Name;
  16273. } else if (c == '/' && this.data[this.i + 1] == '*') this.Comment();else if (!cfg.blankChar[c] && c != ';') this.state = this.Ignore;
  16274. };
  16275. parser.prototype.Comment = function () {
  16276. this.i = this.data.indexOf('*/', this.i) + 1;
  16277. if (!this.i) this.i = this.data.length;
  16278. this.state = this.Space;
  16279. };
  16280. parser.prototype.Ignore = function (c) {
  16281. if (c == '{') this.floor++;else if (c == '}' && ! --this.floor) this.state = this.Space;
  16282. };
  16283. parser.prototype.Name = function (c) {
  16284. if (cfg.blankChar[c]) {
  16285. this.list.push(this.section());
  16286. this.state = this.NameSpace;
  16287. } else if (c == '{') {
  16288. this.list.push(this.section());
  16289. this.Content();
  16290. } else if (c == ',') {
  16291. this.list.push(this.section());
  16292. this.Comma();
  16293. } else if (!isLetter(c) && (c < '0' || c > '9') && c != '-' && c != '_') this.state = this.Ignore;
  16294. };
  16295. parser.prototype.NameSpace = function (c) {
  16296. if (c == '{') this.Content();else if (c == ',') this.Comma();else if (!cfg.blankChar[c]) this.state = this.Ignore;
  16297. };
  16298. parser.prototype.Comma = function () {
  16299. while (cfg.blankChar[this.data[++this.i]]) {
  16300. ;
  16301. }
  16302. if (this.data[this.i] == '{') this.Content();else {
  16303. this.start = this.i--;
  16304. this.state = this.Name;
  16305. }
  16306. };
  16307. parser.prototype.Content = function () {
  16308. this.start = ++this.i;
  16309. if ((this.i = this.data.indexOf('}', this.i)) == -1) this.i = this.data.length;
  16310. var content = this.section();
  16311. for (var i = 0, item; item = this.list[i++];) {
  16312. if (this.res[item]) this.res[item] += ';' + content;else this.res[item] = content;
  16313. }
  16314. this.list = [];
  16315. this.state = this.Space;
  16316. };
  16317. /***/ }),
  16318. /***/ 49:
  16319. /*!************************************!*\
  16320. !*** E:/项目/2023-8/xyl/api/user.js ***!
  16321. \************************************/
  16322. /*! no static exports found */
  16323. /***/ (function(module, exports, __webpack_require__) {
  16324. "use strict";
  16325. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  16326. Object.defineProperty(exports, "__esModule", {
  16327. value: true
  16328. });
  16329. exports.addressDel = addressDel;
  16330. exports.addressEdit = addressEdit;
  16331. exports.article = article;
  16332. exports.cartDel = cartDel;
  16333. exports.check = check;
  16334. exports.delcollect = delcollect;
  16335. exports.details = details;
  16336. exports.getAddressList = getAddressList;
  16337. exports.getCartList = getCartList;
  16338. exports.getCartNum = getCartNum;
  16339. exports.getCommissionInfo = getCommissionInfo;
  16340. exports.getStoreDetail = getStoreDetail;
  16341. exports.getStoreList = getStoreList;
  16342. exports.getUser = getUser;
  16343. exports.getUserInfo = getUserInfo;
  16344. exports.getcollectList = getcollectList;
  16345. exports.jfzz = jfzz;
  16346. exports.lookSubpoints = lookSubpoints;
  16347. exports.myspread = myspread;
  16348. exports.orderData = orderData;
  16349. exports.setAddressDefault = setAddressDefault;
  16350. exports.spreadBanner = spreadBanner;
  16351. exports.sqdl = sqdl;
  16352. exports.version = version;
  16353. exports.yjzye = yjzye;
  16354. exports.yuezz = yuezz;
  16355. var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 46));
  16356. // 订单统计信息
  16357. function orderData(data) {
  16358. return (0, _request.default)({
  16359. url: '/api/order/data',
  16360. method: 'get',
  16361. data: data
  16362. });
  16363. }
  16364. // 获取用户信息
  16365. function getUserInfo(data) {
  16366. return (0, _request.default)({
  16367. url: '/api/userinfo',
  16368. method: 'get',
  16369. data: data
  16370. });
  16371. }
  16372. // 获取用户信息
  16373. function getUser(data) {
  16374. return (0, _request.default)({
  16375. url: '/api/user',
  16376. method: 'get',
  16377. data: data
  16378. });
  16379. }
  16380. // 用户分享图
  16381. function spreadBanner(data) {
  16382. return (0, _request.default)({
  16383. url: '/api/spread/banner',
  16384. method: 'get',
  16385. data: data
  16386. });
  16387. }
  16388. // 获取地址列表
  16389. function getAddressList(data) {
  16390. return (0, _request.default)({
  16391. url: '/api/address/list',
  16392. method: 'get',
  16393. data: data
  16394. });
  16395. }
  16396. // 修改地址
  16397. function addressEdit(data) {
  16398. return (0, _request.default)({
  16399. url: '/api/address/edit',
  16400. method: 'post',
  16401. data: data
  16402. });
  16403. }
  16404. // 删除地址
  16405. function addressDel(data) {
  16406. return (0, _request.default)({
  16407. url: '/api/address/del',
  16408. method: 'post',
  16409. data: data
  16410. });
  16411. }
  16412. // 设为默认地址
  16413. function setAddressDefault(data) {
  16414. return (0, _request.default)({
  16415. url: '/api/address/default/set',
  16416. method: 'post',
  16417. data: data
  16418. });
  16419. }
  16420. // 购物车列表
  16421. function getCartList(data) {
  16422. return (0, _request.default)({
  16423. url: '/api/cart/list',
  16424. method: 'get',
  16425. data: data
  16426. });
  16427. }
  16428. // 修改购物车数量
  16429. function getCartNum(data) {
  16430. return (0, _request.default)({
  16431. url: '/api/cart/num',
  16432. method: 'post',
  16433. data: data
  16434. });
  16435. }
  16436. //删除购物车
  16437. function cartDel(data) {
  16438. return (0, _request.default)({
  16439. url: '/api/cart/del',
  16440. method: 'post',
  16441. data: data
  16442. });
  16443. }
  16444. //获取收藏夹列表
  16445. function getcollectList(data) {
  16446. return (0, _request.default)({
  16447. url: '/api/collect/user',
  16448. method: 'get',
  16449. data: data
  16450. });
  16451. }
  16452. // 取消收藏
  16453. function delcollect(data) {
  16454. return (0, _request.default)({
  16455. url: '/api/collect/del',
  16456. method: 'post',
  16457. data: data
  16458. });
  16459. }
  16460. //http://hmd.frp.liuniu946.com/api/brokerage/list?page=1&limit=10&pm=1
  16461. function getCommissionInfo(data) {
  16462. return (0, _request.default)({
  16463. url: '/api/brokerage/list',
  16464. method: 'get',
  16465. data: data
  16466. });
  16467. }
  16468. //我的推广
  16469. function myspread(data) {
  16470. return (0, _request.default)({
  16471. url: '/api/spread/people',
  16472. method: 'POST',
  16473. data: data
  16474. });
  16475. }
  16476. //
  16477. function sqdl(data) {
  16478. return (0, _request.default)({
  16479. url: '/api/user/apply',
  16480. method: 'POST',
  16481. data: data
  16482. });
  16483. }
  16484. //文章列表
  16485. function article(data, id) {
  16486. return (0, _request.default)({
  16487. url: '/api/article/list/' + id,
  16488. method: 'GET',
  16489. data: data
  16490. });
  16491. }
  16492. function details(data, id) {
  16493. return (0, _request.default)({
  16494. url: '/api/article/details/' + id,
  16495. method: 'get',
  16496. data: data
  16497. });
  16498. }
  16499. function yjzye(data) {
  16500. return (0, _request.default)({
  16501. url: '/api/user/transformation',
  16502. method: 'post',
  16503. data: data
  16504. });
  16505. }
  16506. //佣金转账
  16507. function jfzz(data) {
  16508. return (0, _request.default)({
  16509. url: '/api/user/transfer_account',
  16510. method: 'post',
  16511. data: data
  16512. });
  16513. }
  16514. //余额转账
  16515. function yuezz(data) {
  16516. return (0, _request.default)({
  16517. url: '/api/user/transfer_nowMoney',
  16518. method: 'post',
  16519. data: data
  16520. });
  16521. }
  16522. //获取店铺列表
  16523. function getStoreList(data) {
  16524. return (0, _request.default)({
  16525. url: '/api/store_list',
  16526. method: 'get',
  16527. data: data
  16528. });
  16529. }
  16530. //获取店铺详情
  16531. function getStoreDetail(data, id) {
  16532. return (0, _request.default)({
  16533. url: '/api/store_detail/' + id,
  16534. method: 'get',
  16535. data: data
  16536. });
  16537. }
  16538. // 查看节点
  16539. function lookSubpoints(data) {
  16540. return (0, _request.default)({
  16541. url: '/api/user/getLowerUser',
  16542. method: 'get',
  16543. data: data
  16544. });
  16545. }
  16546. // 是否过审
  16547. function version(data) {
  16548. return (0, _request.default)({
  16549. url: '/api/version',
  16550. method: 'get',
  16551. data: data
  16552. });
  16553. }
  16554. //订单核销
  16555. function check(data) {
  16556. return (0, _request.default)({
  16557. url: '/api/order/order_verific',
  16558. method: 'post',
  16559. data: data
  16560. });
  16561. }
  16562. /***/ }),
  16563. /***/ 5:
  16564. /*!**************************************************************!*\
  16565. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  16566. \**************************************************************/
  16567. /*! no static exports found */
  16568. /***/ (function(module, exports, __webpack_require__) {
  16569. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  16570. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  16571. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  16572. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  16573. function _slicedToArray(arr, i) {
  16574. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  16575. }
  16576. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  16577. /***/ }),
  16578. /***/ 50:
  16579. /*!***************************************!*\
  16580. !*** E:/项目/2023-8/xyl/api/product.js ***!
  16581. \***************************************/
  16582. /*! no static exports found */
  16583. /***/ (function(module, exports, __webpack_require__) {
  16584. "use strict";
  16585. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  16586. Object.defineProperty(exports, "__esModule", {
  16587. value: true
  16588. });
  16589. exports.cartAdd = cartAdd;
  16590. exports.collectAdd = collectAdd;
  16591. exports.collectDel = collectDel;
  16592. exports.getBargainList = getBargainList;
  16593. exports.getCategoryList = getCategoryList;
  16594. exports.getCombinationLisPink = getCombinationLisPink;
  16595. exports.getCombinationLisRemove = getCombinationLisRemove;
  16596. exports.getCombinationList = getCombinationList;
  16597. exports.getCombinationPoster = getCombinationPoster;
  16598. exports.getProducts = getProducts;
  16599. exports.getSeckillClass = getSeckillClass;
  16600. exports.getSeckillList = getSeckillList;
  16601. exports.goodsDetail = goodsDetail;
  16602. exports.groomList = groomList;
  16603. exports.groupGoods = groupGoods;
  16604. exports.poster = poster;
  16605. exports.reply_config = reply_config;
  16606. exports.reply_list = reply_list;
  16607. exports.searchKeyword = searchKeyword;
  16608. exports.seckillGoods = seckillGoods;
  16609. var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 46));
  16610. // 获取商品列表
  16611. function getProducts(data) {
  16612. // {
  16613. // 参数名称 是否必须 示例 备注
  16614. // sid 否 二级分类编号
  16615. // cid 否 一级分类编号(!)
  16616. // keyword 否 搜索
  16617. // priceOrder 否 价格排序
  16618. // salesOrder 否 销量排序
  16619. // news 否 是否新品
  16620. // page 否 分页参数起始值
  16621. // limit 否 分页数步长值
  16622. // }
  16623. return (0, _request.default)({
  16624. url: '/api/products',
  16625. method: 'get',
  16626. data: data
  16627. });
  16628. }
  16629. // 获取商品详情
  16630. function goodsDetail(data, id) {
  16631. return (0, _request.default)({
  16632. url: '/api/product/detail/' + id,
  16633. method: 'get',
  16634. data: data
  16635. });
  16636. }
  16637. // 砍价列表
  16638. function getBargainList(data) {
  16639. return (0, _request.default)({
  16640. url: '/api/bargain/list',
  16641. method: 'get',
  16642. data: data
  16643. });
  16644. }
  16645. // 加入购物车
  16646. function cartAdd(data) {
  16647. return (0, _request.default)({
  16648. url: '/api/cart/add',
  16649. method: 'post',
  16650. data: data
  16651. });
  16652. }
  16653. // 收藏商品
  16654. function collectAdd(data) {
  16655. return (0, _request.default)({
  16656. url: '/api/collect/add',
  16657. method: 'post',
  16658. data: data
  16659. });
  16660. }
  16661. // 取消收藏商品
  16662. function collectDel(data) {
  16663. return (0, _request.default)({
  16664. url: '/api/collect/del',
  16665. method: 'post',
  16666. data: data
  16667. });
  16668. }
  16669. // 获取搜搜关键字
  16670. function searchKeyword(data) {
  16671. return (0, _request.default)({
  16672. url: '/api/search/keyword',
  16673. method: 'get',
  16674. data: data
  16675. });
  16676. }
  16677. // 获取热门分类信息
  16678. function groomList(data, type) {
  16679. // 获取产品类型 1 精品推荐 2 热门榜单 3首发新品 4促销单品
  16680. return (0, _request.default)({
  16681. url: '/api/groom/list/' + type,
  16682. method: 'get',
  16683. data: data
  16684. });
  16685. }
  16686. // 获取秒杀商品详细
  16687. function seckillGoods(data, id) {
  16688. return (0, _request.default)({
  16689. url: '/api/seckill/detail/' + id,
  16690. method: 'get',
  16691. data: data
  16692. });
  16693. }
  16694. // 获取拼团商品详细
  16695. function groupGoods(data, id) {
  16696. return (0, _request.default)({
  16697. url: '/api/combination/detail/' + id,
  16698. method: 'get',
  16699. data: data
  16700. });
  16701. }
  16702. // 获取商品分类
  16703. function getCategoryList(data) {
  16704. return (0, _request.default)({
  16705. url: '/api/category',
  16706. method: 'get',
  16707. data: data
  16708. });
  16709. }
  16710. // 获取拼团列表
  16711. function getCombinationList(data) {
  16712. return (0, _request.default)({
  16713. url: '/api/combination/list',
  16714. method: 'get',
  16715. data: data
  16716. });
  16717. }
  16718. //取消拼团
  16719. function getCombinationLisRemove(data, id) {
  16720. return (0, _request.default)({
  16721. url: '/api/combination/remove' + id,
  16722. method: 'get',
  16723. data: data
  16724. });
  16725. }
  16726. //拼团开团页面数据
  16727. function getCombinationLisPink(data, id) {
  16728. return (0, _request.default)({
  16729. url: '/api/combination/pink/' + id,
  16730. method: 'get',
  16731. data: data
  16732. });
  16733. }
  16734. // 获取拼团海报
  16735. function getCombinationPoster(data) {
  16736. return (0, _request.default)({
  16737. url: '/api/combination/poster',
  16738. method: 'post',
  16739. data: data
  16740. });
  16741. }
  16742. // 获取秒杀分类
  16743. function getSeckillClass(data) {
  16744. return (0, _request.default)({
  16745. url: '/api/seckill/index',
  16746. method: 'get',
  16747. data: data
  16748. });
  16749. }
  16750. // 获取秒杀列表
  16751. function getSeckillList(data, id) {
  16752. return (0, _request.default)({
  16753. url: '/api/seckill/list/' + id,
  16754. method: 'get',
  16755. data: data
  16756. });
  16757. }
  16758. // 产品评价数量和好评度
  16759. function reply_config(data, id) {
  16760. return (0, _request.default)({
  16761. url: '/api/reply/config/' + id,
  16762. method: 'get',
  16763. data: data
  16764. });
  16765. }
  16766. // 获取产品评论
  16767. function reply_list(data, id) {
  16768. return (0, _request.default)({
  16769. url: '/api/reply/list/' + id,
  16770. method: 'get',
  16771. data: data
  16772. });
  16773. }
  16774. // 分享海报
  16775. function poster(data) {
  16776. return (0, _request.default)({
  16777. url: '/api/product/poster',
  16778. method: 'post',
  16779. data: data
  16780. });
  16781. }
  16782. /***/ }),
  16783. /***/ 523:
  16784. /*!********************************************************!*\
  16785. !*** E:/项目/2023-8/xyl/components/tki-qrcode/qrcode.js ***!
  16786. \********************************************************/
  16787. /*! no static exports found */
  16788. /***/ (function(module, exports, __webpack_require__) {
  16789. "use strict";
  16790. /* WEBPACK VAR INJECTION */(function(uni) {
  16791. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  16792. Object.defineProperty(exports, "__esModule", {
  16793. value: true
  16794. });
  16795. exports.default = void 0;
  16796. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  16797. var QRCode = {};
  16798. (function () {
  16799. /**
  16800. * 获取单个字符的utf8编码
  16801. * unicode BMP平面约65535个字符
  16802. * @param {num} code
  16803. * return {array}
  16804. */
  16805. function unicodeFormat8(code) {
  16806. // 1 byte
  16807. var c0, c1, c2;
  16808. if (code < 128) {
  16809. return [code];
  16810. // 2 bytes
  16811. } else if (code < 2048) {
  16812. c0 = 192 + (code >> 6);
  16813. c1 = 128 + (code & 63);
  16814. return [c0, c1];
  16815. // 3 bytes
  16816. } else {
  16817. c0 = 224 + (code >> 12);
  16818. c1 = 128 + (code >> 6 & 63);
  16819. c2 = 128 + (code & 63);
  16820. return [c0, c1, c2];
  16821. }
  16822. }
  16823. /**
  16824. * 获取字符串的utf8编码字节串
  16825. * @param {string} string
  16826. * @return {array}
  16827. */
  16828. function getUTF8Bytes(string) {
  16829. var utf8codes = [];
  16830. for (var i = 0; i < string.length; i++) {
  16831. var code = string.charCodeAt(i);
  16832. var utf8 = unicodeFormat8(code);
  16833. for (var j = 0; j < utf8.length; j++) {
  16834. utf8codes.push(utf8[j]);
  16835. }
  16836. }
  16837. return utf8codes;
  16838. }
  16839. /**
  16840. * 二维码算法实现
  16841. * @param {string} data 要编码的信息字符串
  16842. * @param {num} errorCorrectLevel 纠错等级
  16843. */
  16844. function QRCodeAlg(data, errorCorrectLevel) {
  16845. this.typeNumber = -1; //版本
  16846. this.errorCorrectLevel = errorCorrectLevel;
  16847. this.modules = null; //二维矩阵,存放最终结果
  16848. this.moduleCount = 0; //矩阵大小
  16849. this.dataCache = null; //数据缓存
  16850. this.rsBlocks = null; //版本数据信息
  16851. this.totalDataCount = -1; //可使用的数据量
  16852. this.data = data;
  16853. this.utf8bytes = getUTF8Bytes(data);
  16854. this.make();
  16855. }
  16856. QRCodeAlg.prototype = {
  16857. constructor: QRCodeAlg,
  16858. /**
  16859. * 获取二维码矩阵大小
  16860. * @return {num} 矩阵大小
  16861. */
  16862. getModuleCount: function getModuleCount() {
  16863. return this.moduleCount;
  16864. },
  16865. /**
  16866. * 编码
  16867. */
  16868. make: function make() {
  16869. this.getRightType();
  16870. this.dataCache = this.createData();
  16871. this.createQrcode();
  16872. },
  16873. /**
  16874. * 设置二位矩阵功能图形
  16875. * @param {bool} test 表示是否在寻找最好掩膜阶段
  16876. * @param {num} maskPattern 掩膜的版本
  16877. */
  16878. makeImpl: function makeImpl(maskPattern) {
  16879. this.moduleCount = this.typeNumber * 4 + 17;
  16880. this.modules = new Array(this.moduleCount);
  16881. for (var row = 0; row < this.moduleCount; row++) {
  16882. this.modules[row] = new Array(this.moduleCount);
  16883. }
  16884. this.setupPositionProbePattern(0, 0);
  16885. this.setupPositionProbePattern(this.moduleCount - 7, 0);
  16886. this.setupPositionProbePattern(0, this.moduleCount - 7);
  16887. this.setupPositionAdjustPattern();
  16888. this.setupTimingPattern();
  16889. this.setupTypeInfo(true, maskPattern);
  16890. if (this.typeNumber >= 7) {
  16891. this.setupTypeNumber(true);
  16892. }
  16893. this.mapData(this.dataCache, maskPattern);
  16894. },
  16895. /**
  16896. * 设置二维码的位置探测图形
  16897. * @param {num} row 探测图形的中心横坐标
  16898. * @param {num} col 探测图形的中心纵坐标
  16899. */
  16900. setupPositionProbePattern: function setupPositionProbePattern(row, col) {
  16901. for (var r = -1; r <= 7; r++) {
  16902. if (row + r <= -1 || this.moduleCount <= row + r) continue;
  16903. for (var c = -1; c <= 7; c++) {
  16904. if (col + c <= -1 || this.moduleCount <= col + c) continue;
  16905. if (0 <= r && r <= 6 && (c == 0 || c == 6) || 0 <= c && c <= 6 && (r == 0 || r == 6) || 2 <= r && r <= 4 && 2 <= c && c <= 4) {
  16906. this.modules[row + r][col + c] = true;
  16907. } else {
  16908. this.modules[row + r][col + c] = false;
  16909. }
  16910. }
  16911. }
  16912. },
  16913. /**
  16914. * 创建二维码
  16915. * @return {[type]} [description]
  16916. */
  16917. createQrcode: function createQrcode() {
  16918. var minLostPoint = 0;
  16919. var pattern = 0;
  16920. var bestModules = null;
  16921. for (var i = 0; i < 8; i++) {
  16922. this.makeImpl(i);
  16923. var lostPoint = QRUtil.getLostPoint(this);
  16924. if (i == 0 || minLostPoint > lostPoint) {
  16925. minLostPoint = lostPoint;
  16926. pattern = i;
  16927. bestModules = this.modules;
  16928. }
  16929. }
  16930. this.modules = bestModules;
  16931. this.setupTypeInfo(false, pattern);
  16932. if (this.typeNumber >= 7) {
  16933. this.setupTypeNumber(false);
  16934. }
  16935. },
  16936. /**
  16937. * 设置定位图形
  16938. * @return {[type]} [description]
  16939. */
  16940. setupTimingPattern: function setupTimingPattern() {
  16941. for (var r = 8; r < this.moduleCount - 8; r++) {
  16942. if (this.modules[r][6] != null) {
  16943. continue;
  16944. }
  16945. this.modules[r][6] = r % 2 == 0;
  16946. if (this.modules[6][r] != null) {
  16947. continue;
  16948. }
  16949. this.modules[6][r] = r % 2 == 0;
  16950. }
  16951. },
  16952. /**
  16953. * 设置矫正图形
  16954. * @return {[type]} [description]
  16955. */
  16956. setupPositionAdjustPattern: function setupPositionAdjustPattern() {
  16957. var pos = QRUtil.getPatternPosition(this.typeNumber);
  16958. for (var i = 0; i < pos.length; i++) {
  16959. for (var j = 0; j < pos.length; j++) {
  16960. var row = pos[i];
  16961. var col = pos[j];
  16962. if (this.modules[row][col] != null) {
  16963. continue;
  16964. }
  16965. for (var r = -2; r <= 2; r++) {
  16966. for (var c = -2; c <= 2; c++) {
  16967. if (r == -2 || r == 2 || c == -2 || c == 2 || r == 0 && c == 0) {
  16968. this.modules[row + r][col + c] = true;
  16969. } else {
  16970. this.modules[row + r][col + c] = false;
  16971. }
  16972. }
  16973. }
  16974. }
  16975. }
  16976. },
  16977. /**
  16978. * 设置版本信息(7以上版本才有)
  16979. * @param {bool} test 是否处于判断最佳掩膜阶段
  16980. * @return {[type]} [description]
  16981. */
  16982. setupTypeNumber: function setupTypeNumber(test) {
  16983. var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
  16984. for (var i = 0; i < 18; i++) {
  16985. var mod = !test && (bits >> i & 1) == 1;
  16986. this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod;
  16987. this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod;
  16988. }
  16989. },
  16990. /**
  16991. * 设置格式信息(纠错等级和掩膜版本)
  16992. * @param {bool} test
  16993. * @param {num} maskPattern 掩膜版本
  16994. * @return {}
  16995. */
  16996. setupTypeInfo: function setupTypeInfo(test, maskPattern) {
  16997. var data = QRErrorCorrectLevel[this.errorCorrectLevel] << 3 | maskPattern;
  16998. var bits = QRUtil.getBCHTypeInfo(data);
  16999. // vertical
  17000. for (var i = 0; i < 15; i++) {
  17001. var mod = !test && (bits >> i & 1) == 1;
  17002. if (i < 6) {
  17003. this.modules[i][8] = mod;
  17004. } else if (i < 8) {
  17005. this.modules[i + 1][8] = mod;
  17006. } else {
  17007. this.modules[this.moduleCount - 15 + i][8] = mod;
  17008. }
  17009. // horizontal
  17010. var mod = !test && (bits >> i & 1) == 1;
  17011. if (i < 8) {
  17012. this.modules[8][this.moduleCount - i - 1] = mod;
  17013. } else if (i < 9) {
  17014. this.modules[8][15 - i - 1 + 1] = mod;
  17015. } else {
  17016. this.modules[8][15 - i - 1] = mod;
  17017. }
  17018. }
  17019. // fixed module
  17020. this.modules[this.moduleCount - 8][8] = !test;
  17021. },
  17022. /**
  17023. * 数据编码
  17024. * @return {[type]} [description]
  17025. */
  17026. createData: function createData() {
  17027. var buffer = new QRBitBuffer();
  17028. var lengthBits = this.typeNumber > 9 ? 16 : 8;
  17029. buffer.put(4, 4); //添加模式
  17030. buffer.put(this.utf8bytes.length, lengthBits);
  17031. for (var i = 0, l = this.utf8bytes.length; i < l; i++) {
  17032. buffer.put(this.utf8bytes[i], 8);
  17033. }
  17034. if (buffer.length + 4 <= this.totalDataCount * 8) {
  17035. buffer.put(0, 4);
  17036. }
  17037. // padding
  17038. while (buffer.length % 8 != 0) {
  17039. buffer.putBit(false);
  17040. }
  17041. // padding
  17042. while (true) {
  17043. if (buffer.length >= this.totalDataCount * 8) {
  17044. break;
  17045. }
  17046. buffer.put(QRCodeAlg.PAD0, 8);
  17047. if (buffer.length >= this.totalDataCount * 8) {
  17048. break;
  17049. }
  17050. buffer.put(QRCodeAlg.PAD1, 8);
  17051. }
  17052. return this.createBytes(buffer);
  17053. },
  17054. /**
  17055. * 纠错码编码
  17056. * @param {buffer} buffer 数据编码
  17057. * @return {[type]}
  17058. */
  17059. createBytes: function createBytes(buffer) {
  17060. var offset = 0;
  17061. var maxDcCount = 0;
  17062. var maxEcCount = 0;
  17063. var length = this.rsBlock.length / 3;
  17064. var rsBlocks = new Array();
  17065. for (var i = 0; i < length; i++) {
  17066. var count = this.rsBlock[i * 3 + 0];
  17067. var totalCount = this.rsBlock[i * 3 + 1];
  17068. var dataCount = this.rsBlock[i * 3 + 2];
  17069. for (var j = 0; j < count; j++) {
  17070. rsBlocks.push([dataCount, totalCount]);
  17071. }
  17072. }
  17073. var dcdata = new Array(rsBlocks.length);
  17074. var ecdata = new Array(rsBlocks.length);
  17075. for (var r = 0; r < rsBlocks.length; r++) {
  17076. var dcCount = rsBlocks[r][0];
  17077. var ecCount = rsBlocks[r][1] - dcCount;
  17078. maxDcCount = Math.max(maxDcCount, dcCount);
  17079. maxEcCount = Math.max(maxEcCount, ecCount);
  17080. dcdata[r] = new Array(dcCount);
  17081. for (var i = 0; i < dcdata[r].length; i++) {
  17082. dcdata[r][i] = 0xff & buffer.buffer[i + offset];
  17083. }
  17084. offset += dcCount;
  17085. var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
  17086. var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);
  17087. var modPoly = rawPoly.mod(rsPoly);
  17088. ecdata[r] = new Array(rsPoly.getLength() - 1);
  17089. for (var i = 0; i < ecdata[r].length; i++) {
  17090. var modIndex = i + modPoly.getLength() - ecdata[r].length;
  17091. ecdata[r][i] = modIndex >= 0 ? modPoly.get(modIndex) : 0;
  17092. }
  17093. }
  17094. var data = new Array(this.totalDataCount);
  17095. var index = 0;
  17096. for (var i = 0; i < maxDcCount; i++) {
  17097. for (var r = 0; r < rsBlocks.length; r++) {
  17098. if (i < dcdata[r].length) {
  17099. data[index++] = dcdata[r][i];
  17100. }
  17101. }
  17102. }
  17103. for (var i = 0; i < maxEcCount; i++) {
  17104. for (var r = 0; r < rsBlocks.length; r++) {
  17105. if (i < ecdata[r].length) {
  17106. data[index++] = ecdata[r][i];
  17107. }
  17108. }
  17109. }
  17110. return data;
  17111. },
  17112. /**
  17113. * 布置模块,构建最终信息
  17114. * @param {} data
  17115. * @param {} maskPattern
  17116. * @return {}
  17117. */
  17118. mapData: function mapData(data, maskPattern) {
  17119. var inc = -1;
  17120. var row = this.moduleCount - 1;
  17121. var bitIndex = 7;
  17122. var byteIndex = 0;
  17123. for (var col = this.moduleCount - 1; col > 0; col -= 2) {
  17124. if (col == 6) col--;
  17125. while (true) {
  17126. for (var c = 0; c < 2; c++) {
  17127. if (this.modules[row][col - c] == null) {
  17128. var dark = false;
  17129. if (byteIndex < data.length) {
  17130. dark = (data[byteIndex] >>> bitIndex & 1) == 1;
  17131. }
  17132. var mask = QRUtil.getMask(maskPattern, row, col - c);
  17133. if (mask) {
  17134. dark = !dark;
  17135. }
  17136. this.modules[row][col - c] = dark;
  17137. bitIndex--;
  17138. if (bitIndex == -1) {
  17139. byteIndex++;
  17140. bitIndex = 7;
  17141. }
  17142. }
  17143. }
  17144. row += inc;
  17145. if (row < 0 || this.moduleCount <= row) {
  17146. row -= inc;
  17147. inc = -inc;
  17148. break;
  17149. }
  17150. }
  17151. }
  17152. }
  17153. };
  17154. /**
  17155. * 填充字段
  17156. */
  17157. QRCodeAlg.PAD0 = 0xEC;
  17158. QRCodeAlg.PAD1 = 0x11;
  17159. //---------------------------------------------------------------------
  17160. // 纠错等级对应的编码
  17161. //---------------------------------------------------------------------
  17162. var QRErrorCorrectLevel = [1, 0, 3, 2];
  17163. //---------------------------------------------------------------------
  17164. // 掩膜版本
  17165. //---------------------------------------------------------------------
  17166. var QRMaskPattern = {
  17167. PATTERN000: 0,
  17168. PATTERN001: 1,
  17169. PATTERN010: 2,
  17170. PATTERN011: 3,
  17171. PATTERN100: 4,
  17172. PATTERN101: 5,
  17173. PATTERN110: 6,
  17174. PATTERN111: 7
  17175. };
  17176. //---------------------------------------------------------------------
  17177. // 工具类
  17178. //---------------------------------------------------------------------
  17179. var QRUtil = {
  17180. /*
  17181. 每个版本矫正图形的位置
  17182. */
  17183. PATTERN_POSITION_TABLE: [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]],
  17184. G15: 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0,
  17185. G18: 1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0,
  17186. G15_MASK: 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1,
  17187. /*
  17188. BCH编码格式信息
  17189. */
  17190. getBCHTypeInfo: function getBCHTypeInfo(data) {
  17191. var d = data << 10;
  17192. while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
  17193. d ^= QRUtil.G15 << QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15);
  17194. }
  17195. return (data << 10 | d) ^ QRUtil.G15_MASK;
  17196. },
  17197. /*
  17198. BCH编码版本信息
  17199. */
  17200. getBCHTypeNumber: function getBCHTypeNumber(data) {
  17201. var d = data << 12;
  17202. while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
  17203. d ^= QRUtil.G18 << QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18);
  17204. }
  17205. return data << 12 | d;
  17206. },
  17207. /*
  17208. 获取BCH位信息
  17209. */
  17210. getBCHDigit: function getBCHDigit(data) {
  17211. var digit = 0;
  17212. while (data != 0) {
  17213. digit++;
  17214. data >>>= 1;
  17215. }
  17216. return digit;
  17217. },
  17218. /*
  17219. 获取版本对应的矫正图形位置
  17220. */
  17221. getPatternPosition: function getPatternPosition(typeNumber) {
  17222. return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
  17223. },
  17224. /*
  17225. 掩膜算法
  17226. */
  17227. getMask: function getMask(maskPattern, i, j) {
  17228. switch (maskPattern) {
  17229. case QRMaskPattern.PATTERN000:
  17230. return (i + j) % 2 == 0;
  17231. case QRMaskPattern.PATTERN001:
  17232. return i % 2 == 0;
  17233. case QRMaskPattern.PATTERN010:
  17234. return j % 3 == 0;
  17235. case QRMaskPattern.PATTERN011:
  17236. return (i + j) % 3 == 0;
  17237. case QRMaskPattern.PATTERN100:
  17238. return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0;
  17239. case QRMaskPattern.PATTERN101:
  17240. return i * j % 2 + i * j % 3 == 0;
  17241. case QRMaskPattern.PATTERN110:
  17242. return (i * j % 2 + i * j % 3) % 2 == 0;
  17243. case QRMaskPattern.PATTERN111:
  17244. return (i * j % 3 + (i + j) % 2) % 2 == 0;
  17245. default:
  17246. throw new Error("bad maskPattern:" + maskPattern);
  17247. }
  17248. },
  17249. /*
  17250. 获取RS的纠错多项式
  17251. */
  17252. getErrorCorrectPolynomial: function getErrorCorrectPolynomial(errorCorrectLength) {
  17253. var a = new QRPolynomial([1], 0);
  17254. for (var i = 0; i < errorCorrectLength; i++) {
  17255. a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0));
  17256. }
  17257. return a;
  17258. },
  17259. /*
  17260. 获取评价
  17261. */
  17262. getLostPoint: function getLostPoint(qrCode) {
  17263. var moduleCount = qrCode.getModuleCount(),
  17264. lostPoint = 0,
  17265. darkCount = 0;
  17266. for (var row = 0; row < moduleCount; row++) {
  17267. var sameCount = 0;
  17268. var head = qrCode.modules[row][0];
  17269. for (var col = 0; col < moduleCount; col++) {
  17270. var current = qrCode.modules[row][col];
  17271. //level 3 评价
  17272. if (col < moduleCount - 6) {
  17273. if (current && !qrCode.modules[row][col + 1] && qrCode.modules[row][col + 2] && qrCode.modules[row][col + 3] && qrCode.modules[row][col + 4] && !qrCode.modules[row][col + 5] && qrCode.modules[row][col + 6]) {
  17274. if (col < moduleCount - 10) {
  17275. if (qrCode.modules[row][col + 7] && qrCode.modules[row][col + 8] && qrCode.modules[row][col + 9] && qrCode.modules[row][col + 10]) {
  17276. lostPoint += 40;
  17277. }
  17278. } else if (col > 3) {
  17279. if (qrCode.modules[row][col - 1] && qrCode.modules[row][col - 2] && qrCode.modules[row][col - 3] && qrCode.modules[row][col - 4]) {
  17280. lostPoint += 40;
  17281. }
  17282. }
  17283. }
  17284. }
  17285. //level 2 评价
  17286. if (row < moduleCount - 1 && col < moduleCount - 1) {
  17287. var count = 0;
  17288. if (current) count++;
  17289. if (qrCode.modules[row + 1][col]) count++;
  17290. if (qrCode.modules[row][col + 1]) count++;
  17291. if (qrCode.modules[row + 1][col + 1]) count++;
  17292. if (count == 0 || count == 4) {
  17293. lostPoint += 3;
  17294. }
  17295. }
  17296. //level 1 评价
  17297. if (head ^ current) {
  17298. sameCount++;
  17299. } else {
  17300. head = current;
  17301. if (sameCount >= 5) {
  17302. lostPoint += 3 + sameCount - 5;
  17303. }
  17304. sameCount = 1;
  17305. }
  17306. //level 4 评价
  17307. if (current) {
  17308. darkCount++;
  17309. }
  17310. }
  17311. }
  17312. for (var col = 0; col < moduleCount; col++) {
  17313. var sameCount = 0;
  17314. var head = qrCode.modules[0][col];
  17315. for (var row = 0; row < moduleCount; row++) {
  17316. var current = qrCode.modules[row][col];
  17317. //level 3 评价
  17318. if (row < moduleCount - 6) {
  17319. if (current && !qrCode.modules[row + 1][col] && qrCode.modules[row + 2][col] && qrCode.modules[row + 3][col] && qrCode.modules[row + 4][col] && !qrCode.modules[row + 5][col] && qrCode.modules[row + 6][col]) {
  17320. if (row < moduleCount - 10) {
  17321. if (qrCode.modules[row + 7][col] && qrCode.modules[row + 8][col] && qrCode.modules[row + 9][col] && qrCode.modules[row + 10][col]) {
  17322. lostPoint += 40;
  17323. }
  17324. } else if (row > 3) {
  17325. if (qrCode.modules[row - 1][col] && qrCode.modules[row - 2][col] && qrCode.modules[row - 3][col] && qrCode.modules[row - 4][col]) {
  17326. lostPoint += 40;
  17327. }
  17328. }
  17329. }
  17330. }
  17331. //level 1 评价
  17332. if (head ^ current) {
  17333. sameCount++;
  17334. } else {
  17335. head = current;
  17336. if (sameCount >= 5) {
  17337. lostPoint += 3 + sameCount - 5;
  17338. }
  17339. sameCount = 1;
  17340. }
  17341. }
  17342. }
  17343. // LEVEL4
  17344. var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
  17345. lostPoint += ratio * 10;
  17346. return lostPoint;
  17347. }
  17348. };
  17349. //---------------------------------------------------------------------
  17350. // QRMath使用的数学工具
  17351. //---------------------------------------------------------------------
  17352. var QRMath = {
  17353. /*
  17354. 将n转化为a^m
  17355. */
  17356. glog: function glog(n) {
  17357. if (n < 1) {
  17358. throw new Error("glog(" + n + ")");
  17359. }
  17360. return QRMath.LOG_TABLE[n];
  17361. },
  17362. /*
  17363. 将a^m转化为n
  17364. */
  17365. gexp: function gexp(n) {
  17366. while (n < 0) {
  17367. n += 255;
  17368. }
  17369. while (n >= 256) {
  17370. n -= 255;
  17371. }
  17372. return QRMath.EXP_TABLE[n];
  17373. },
  17374. EXP_TABLE: new Array(256),
  17375. LOG_TABLE: new Array(256)
  17376. };
  17377. for (var i = 0; i < 8; i++) {
  17378. QRMath.EXP_TABLE[i] = 1 << i;
  17379. }
  17380. for (var i = 8; i < 256; i++) {
  17381. QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] ^ QRMath.EXP_TABLE[i - 5] ^ QRMath.EXP_TABLE[i - 6] ^ QRMath.EXP_TABLE[i - 8];
  17382. }
  17383. for (var i = 0; i < 255; i++) {
  17384. QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i;
  17385. }
  17386. //---------------------------------------------------------------------
  17387. // QRPolynomial 多项式
  17388. //---------------------------------------------------------------------
  17389. /**
  17390. * 多项式类
  17391. * @param {Array} num 系数
  17392. * @param {num} shift a^shift
  17393. */
  17394. function QRPolynomial(num, shift) {
  17395. if (num.length == undefined) {
  17396. throw new Error(num.length + "/" + shift);
  17397. }
  17398. var offset = 0;
  17399. while (offset < num.length && num[offset] == 0) {
  17400. offset++;
  17401. }
  17402. this.num = new Array(num.length - offset + shift);
  17403. for (var i = 0; i < num.length - offset; i++) {
  17404. this.num[i] = num[i + offset];
  17405. }
  17406. }
  17407. QRPolynomial.prototype = {
  17408. get: function get(index) {
  17409. return this.num[index];
  17410. },
  17411. getLength: function getLength() {
  17412. return this.num.length;
  17413. },
  17414. /**
  17415. * 多项式乘法
  17416. * @param {QRPolynomial} e 被乘多项式
  17417. * @return {[type]} [description]
  17418. */
  17419. multiply: function multiply(e) {
  17420. var num = new Array(this.getLength() + e.getLength() - 1);
  17421. for (var i = 0; i < this.getLength(); i++) {
  17422. for (var j = 0; j < e.getLength(); j++) {
  17423. num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j)));
  17424. }
  17425. }
  17426. return new QRPolynomial(num, 0);
  17427. },
  17428. /**
  17429. * 多项式模运算
  17430. * @param {QRPolynomial} e 模多项式
  17431. * @return {}
  17432. */
  17433. mod: function mod(e) {
  17434. var tl = this.getLength(),
  17435. el = e.getLength();
  17436. if (tl - el < 0) {
  17437. return this;
  17438. }
  17439. var num = new Array(tl);
  17440. for (var i = 0; i < tl; i++) {
  17441. num[i] = this.get(i);
  17442. }
  17443. while (num.length >= el) {
  17444. var ratio = QRMath.glog(num[0]) - QRMath.glog(e.get(0));
  17445. for (var i = 0; i < e.getLength(); i++) {
  17446. num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio);
  17447. }
  17448. while (num[0] == 0) {
  17449. num.shift();
  17450. }
  17451. }
  17452. return new QRPolynomial(num, 0);
  17453. }
  17454. };
  17455. //---------------------------------------------------------------------
  17456. // RS_BLOCK_TABLE
  17457. //---------------------------------------------------------------------
  17458. /*
  17459. 二维码各个版本信息[块数, 每块中的数据块数, 每块中的信息块数]
  17460. */
  17461. var RS_BLOCK_TABLE = [
  17462. // L
  17463. // M
  17464. // Q
  17465. // H
  17466. // 1
  17467. [1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9],
  17468. // 2
  17469. [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16],
  17470. // 3
  17471. [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13],
  17472. // 4
  17473. [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9],
  17474. // 5
  17475. [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12],
  17476. // 6
  17477. [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15],
  17478. // 7
  17479. [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14],
  17480. // 8
  17481. [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15],
  17482. // 9
  17483. [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13],
  17484. // 10
  17485. [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16],
  17486. // 11
  17487. [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13],
  17488. // 12
  17489. [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15],
  17490. // 13
  17491. [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12],
  17492. // 14
  17493. [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13],
  17494. // 15
  17495. [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12],
  17496. // 16
  17497. [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16],
  17498. // 17
  17499. [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15],
  17500. // 18
  17501. [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15],
  17502. // 19
  17503. [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14],
  17504. // 20
  17505. [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16],
  17506. // 21
  17507. [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17],
  17508. // 22
  17509. [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13],
  17510. // 23
  17511. [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16],
  17512. // 24
  17513. [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17],
  17514. // 25
  17515. [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16],
  17516. // 26
  17517. [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17],
  17518. // 27
  17519. [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16],
  17520. // 28
  17521. [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16],
  17522. // 29
  17523. [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16],
  17524. // 30
  17525. [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16],
  17526. // 31
  17527. [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16],
  17528. // 32
  17529. [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16],
  17530. // 33
  17531. [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16],
  17532. // 34
  17533. [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17],
  17534. // 35
  17535. [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16],
  17536. // 36
  17537. [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16],
  17538. // 37
  17539. [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16],
  17540. // 38
  17541. [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16],
  17542. // 39
  17543. [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16],
  17544. // 40
  17545. [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]];
  17546. /**
  17547. * 根据数据获取对应版本
  17548. * @return {[type]} [description]
  17549. */
  17550. QRCodeAlg.prototype.getRightType = function () {
  17551. for (var typeNumber = 1; typeNumber < 41; typeNumber++) {
  17552. var rsBlock = RS_BLOCK_TABLE[(typeNumber - 1) * 4 + this.errorCorrectLevel];
  17553. if (rsBlock == undefined) {
  17554. throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + this.errorCorrectLevel);
  17555. }
  17556. var length = rsBlock.length / 3;
  17557. var totalDataCount = 0;
  17558. for (var i = 0; i < length; i++) {
  17559. var count = rsBlock[i * 3 + 0];
  17560. var dataCount = rsBlock[i * 3 + 2];
  17561. totalDataCount += dataCount * count;
  17562. }
  17563. var lengthBytes = typeNumber > 9 ? 2 : 1;
  17564. if (this.utf8bytes.length + lengthBytes < totalDataCount || typeNumber == 40) {
  17565. this.typeNumber = typeNumber;
  17566. this.rsBlock = rsBlock;
  17567. this.totalDataCount = totalDataCount;
  17568. break;
  17569. }
  17570. }
  17571. };
  17572. //---------------------------------------------------------------------
  17573. // QRBitBuffer
  17574. //---------------------------------------------------------------------
  17575. function QRBitBuffer() {
  17576. this.buffer = new Array();
  17577. this.length = 0;
  17578. }
  17579. QRBitBuffer.prototype = {
  17580. get: function get(index) {
  17581. var bufIndex = Math.floor(index / 8);
  17582. return this.buffer[bufIndex] >>> 7 - index % 8 & 1;
  17583. },
  17584. put: function put(num, length) {
  17585. for (var i = 0; i < length; i++) {
  17586. this.putBit(num >>> length - i - 1 & 1);
  17587. }
  17588. },
  17589. putBit: function putBit(bit) {
  17590. var bufIndex = Math.floor(this.length / 8);
  17591. if (this.buffer.length <= bufIndex) {
  17592. this.buffer.push(0);
  17593. }
  17594. if (bit) {
  17595. this.buffer[bufIndex] |= 0x80 >>> this.length % 8;
  17596. }
  17597. this.length++;
  17598. }
  17599. };
  17600. // xzedit
  17601. var qrcodeAlgObjCache = [];
  17602. /**
  17603. * 二维码构造函数,主要用于绘制
  17604. * @param {参数列表} opt 传递参数
  17605. * @return {}
  17606. */
  17607. QRCode = function QRCode(opt) {
  17608. //设置默认参数
  17609. this.options = {
  17610. text: '',
  17611. size: 256,
  17612. correctLevel: 3,
  17613. background: '#ffffff',
  17614. foreground: '#000000',
  17615. pdground: '#000000',
  17616. image: '',
  17617. imageSize: 30,
  17618. canvasId: opt.canvasId,
  17619. context: opt.context,
  17620. usingComponents: opt.usingComponents,
  17621. showLoading: opt.showLoading,
  17622. loadingText: opt.loadingText
  17623. };
  17624. if (typeof opt === 'string') {
  17625. // 只编码ASCII字符串
  17626. opt = {
  17627. text: opt
  17628. };
  17629. }
  17630. if (opt) {
  17631. for (var i in opt) {
  17632. this.options[i] = opt[i];
  17633. }
  17634. }
  17635. //使用QRCodeAlg创建二维码结构
  17636. var qrCodeAlg = null;
  17637. for (var i = 0, l = qrcodeAlgObjCache.length; i < l; i++) {
  17638. if (qrcodeAlgObjCache[i].text == this.options.text && qrcodeAlgObjCache[i].text.correctLevel == this.options.correctLevel) {
  17639. qrCodeAlg = qrcodeAlgObjCache[i].obj;
  17640. break;
  17641. }
  17642. }
  17643. if (i == l) {
  17644. qrCodeAlg = new QRCodeAlg(this.options.text, this.options.correctLevel);
  17645. qrcodeAlgObjCache.push({
  17646. text: this.options.text,
  17647. correctLevel: this.options.correctLevel,
  17648. obj: qrCodeAlg
  17649. });
  17650. }
  17651. /**
  17652. * 计算矩阵点的前景色
  17653. * @param {Obj} config
  17654. * @param {Number} config.row 点x坐标
  17655. * @param {Number} config.col 点y坐标
  17656. * @param {Number} config.count 矩阵大小
  17657. * @param {Number} config.options 组件的options
  17658. * @return {String}
  17659. */
  17660. var getForeGround = function getForeGround(config) {
  17661. var options = config.options;
  17662. if (options.pdground && (config.row > 1 && config.row < 5 && config.col > 1 && config.col < 5 || config.row > config.count - 6 && config.row < config.count - 2 && config.col > 1 && config.col < 5 || config.row > 1 && config.row < 5 && config.col > config.count - 6 && config.col < config.count - 2)) {
  17663. return options.pdground;
  17664. }
  17665. return options.foreground;
  17666. };
  17667. // 创建canvas
  17668. var createCanvas = function createCanvas(options) {
  17669. if (options.showLoading) {
  17670. uni.showLoading({
  17671. title: options.loadingText,
  17672. mask: true
  17673. });
  17674. }
  17675. var ctx = uni.createCanvasContext(options.canvasId, options.context);
  17676. var count = qrCodeAlg.getModuleCount();
  17677. var ratioSize = options.size;
  17678. var ratioImgSize = options.imageSize;
  17679. //计算每个点的长宽
  17680. var tileW = (ratioSize / count).toPrecision(4);
  17681. var tileH = (ratioSize / count).toPrecision(4);
  17682. //绘制
  17683. for (var row = 0; row < count; row++) {
  17684. for (var col = 0; col < count; col++) {
  17685. var w = Math.ceil((col + 1) * tileW) - Math.floor(col * tileW);
  17686. var h = Math.ceil((row + 1) * tileW) - Math.floor(row * tileW);
  17687. var foreground = getForeGround({
  17688. row: row,
  17689. col: col,
  17690. count: count,
  17691. options: options
  17692. });
  17693. ctx.setFillStyle(qrCodeAlg.modules[row][col] ? foreground : options.background);
  17694. ctx.fillRect(Math.round(col * tileW), Math.round(row * tileH), w, h);
  17695. }
  17696. }
  17697. if (options.image) {
  17698. // 画圆角矩形
  17699. var drawRoundedRect = function drawRoundedRect(ctxi, x, y, width, height, r, lineWidth, fill, stroke) {
  17700. ctxi.setLineWidth(lineWidth);
  17701. ctxi.setFillStyle(options.background);
  17702. ctxi.setStrokeStyle(options.background);
  17703. ctxi.beginPath(); // draw top and top right corner
  17704. ctxi.moveTo(x + r, y);
  17705. ctxi.arcTo(x + width, y, x + width, y + r, r); // draw right side and bottom right corner
  17706. ctxi.arcTo(x + width, y + height, x + width - r, y + height, r); // draw bottom and bottom left corner
  17707. ctxi.arcTo(x, y + height, x, y + height - r, r); // draw left and top left corner
  17708. ctxi.arcTo(x, y, x + r, y, r);
  17709. ctxi.closePath();
  17710. if (fill) {
  17711. ctxi.fill();
  17712. }
  17713. if (stroke) {
  17714. ctxi.stroke();
  17715. }
  17716. };
  17717. var x = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
  17718. var y = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
  17719. drawRoundedRect(ctx, x, y, ratioImgSize, ratioImgSize, 2, 6, true, true);
  17720. ctx.drawImage(options.image, x, y, ratioImgSize, ratioImgSize);
  17721. }
  17722. setTimeout(function () {
  17723. ctx.draw(true, function () {
  17724. // 保存到临时区域
  17725. setTimeout(function () {
  17726. uni.canvasToTempFilePath({
  17727. width: options.width,
  17728. height: options.height,
  17729. destWidth: options.width,
  17730. destHeight: options.height,
  17731. canvasId: options.canvasId,
  17732. quality: Number(1),
  17733. success: function success(res) {
  17734. if (options.cbResult) {
  17735. options.cbResult(res.tempFilePath);
  17736. }
  17737. },
  17738. fail: function fail(res) {
  17739. if (options.cbResult) {
  17740. options.cbResult(res);
  17741. }
  17742. },
  17743. complete: function complete() {
  17744. if (options.showLoading) {
  17745. uni.hideLoading();
  17746. }
  17747. }
  17748. }, options.context);
  17749. }, options.text.length + 100);
  17750. });
  17751. }, options.usingComponents ? 0 : 150);
  17752. };
  17753. createCanvas(this.options);
  17754. // 空判定
  17755. var empty = function empty(v) {
  17756. var tp = (0, _typeof2.default)(v),
  17757. rt = false;
  17758. if (tp == "number" && String(v) == "") {
  17759. rt = true;
  17760. } else if (tp == "undefined") {
  17761. rt = true;
  17762. } else if (tp == "object") {
  17763. if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true;
  17764. } else if (tp == "string") {
  17765. if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true;
  17766. } else if (tp == "function") {
  17767. rt = false;
  17768. }
  17769. return rt;
  17770. };
  17771. };
  17772. QRCode.prototype.clear = function (fn) {
  17773. var ctx = uni.createCanvasContext(this.options.canvasId, this.options.context);
  17774. ctx.clearRect(0, 0, this.options.size, this.options.size);
  17775. ctx.draw(false, function () {
  17776. if (fn) {
  17777. fn();
  17778. }
  17779. });
  17780. };
  17781. })();
  17782. var _default = QRCode;
  17783. exports.default = _default;
  17784. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  17785. /***/ }),
  17786. /***/ 531:
  17787. /*!******************************************************!*\
  17788. !*** E:/项目/2023-8/xyl/components/uni-icons/icons.js ***!
  17789. \******************************************************/
  17790. /*! no static exports found */
  17791. /***/ (function(module, exports, __webpack_require__) {
  17792. "use strict";
  17793. Object.defineProperty(exports, "__esModule", {
  17794. value: true
  17795. });
  17796. exports.default = void 0;
  17797. var _default = {
  17798. 'contact': "\uE100",
  17799. 'person': "\uE101",
  17800. 'personadd': "\uE102",
  17801. 'contact-filled': "\uE130",
  17802. 'person-filled': "\uE131",
  17803. 'personadd-filled': "\uE132",
  17804. 'phone': "\uE200",
  17805. 'email': "\uE201",
  17806. 'chatbubble': "\uE202",
  17807. 'chatboxes': "\uE203",
  17808. 'phone-filled': "\uE230",
  17809. 'email-filled': "\uE231",
  17810. 'chatbubble-filled': "\uE232",
  17811. 'chatboxes-filled': "\uE233",
  17812. 'weibo': "\uE260",
  17813. 'weixin': "\uE261",
  17814. 'pengyouquan': "\uE262",
  17815. 'chat': "\uE263",
  17816. 'qq': "\uE264",
  17817. 'videocam': "\uE300",
  17818. 'camera': "\uE301",
  17819. 'mic': "\uE302",
  17820. 'location': "\uE303",
  17821. 'mic-filled': "\uE332",
  17822. 'speech': "\uE332",
  17823. 'location-filled': "\uE333",
  17824. 'micoff': "\uE360",
  17825. 'image': "\uE363",
  17826. 'map': "\uE364",
  17827. 'compose': "\uE400",
  17828. 'trash': "\uE401",
  17829. 'upload': "\uE402",
  17830. 'download': "\uE403",
  17831. 'close': "\uE404",
  17832. 'redo': "\uE405",
  17833. 'undo': "\uE406",
  17834. 'refresh': "\uE407",
  17835. 'star': "\uE408",
  17836. 'plus': "\uE409",
  17837. 'minus': "\uE410",
  17838. 'circle': "\uE411",
  17839. 'checkbox': "\uE411",
  17840. 'close-filled': "\uE434",
  17841. 'clear': "\uE434",
  17842. 'refresh-filled': "\uE437",
  17843. 'star-filled': "\uE438",
  17844. 'plus-filled': "\uE439",
  17845. 'minus-filled': "\uE440",
  17846. 'circle-filled': "\uE441",
  17847. 'checkbox-filled': "\uE442",
  17848. 'closeempty': "\uE460",
  17849. 'refreshempty': "\uE461",
  17850. 'reload': "\uE462",
  17851. 'starhalf': "\uE463",
  17852. 'spinner': "\uE464",
  17853. 'spinner-cycle': "\uE465",
  17854. 'search': "\uE466",
  17855. 'plusempty': "\uE468",
  17856. 'forward': "\uE470",
  17857. 'back': "\uE471",
  17858. 'left-nav': "\uE471",
  17859. 'checkmarkempty': "\uE472",
  17860. 'home': "\uE500",
  17861. 'navigate': "\uE501",
  17862. 'gear': "\uE502",
  17863. 'paperplane': "\uE503",
  17864. 'info': "\uE504",
  17865. 'help': "\uE505",
  17866. 'locked': "\uE506",
  17867. 'more': "\uE507",
  17868. 'flag': "\uE508",
  17869. 'home-filled': "\uE530",
  17870. 'gear-filled': "\uE532",
  17871. 'info-filled': "\uE534",
  17872. 'help-filled': "\uE535",
  17873. 'more-filled': "\uE537",
  17874. 'settings': "\uE560",
  17875. 'list': "\uE562",
  17876. 'bars': "\uE563",
  17877. 'loop': "\uE565",
  17878. 'paperclip': "\uE567",
  17879. 'eye': "\uE568",
  17880. 'arrowup': "\uE580",
  17881. 'arrowdown': "\uE581",
  17882. 'arrowleft': "\uE582",
  17883. 'arrowright': "\uE583",
  17884. 'arrowthinup': "\uE584",
  17885. 'arrowthindown': "\uE585",
  17886. 'arrowthinleft': "\uE586",
  17887. 'arrowthinright': "\uE587",
  17888. 'pulldown': "\uE588",
  17889. 'closefill': "\uE589",
  17890. 'sound': "\uE590",
  17891. 'scan': "\uE612"
  17892. };
  17893. exports.default = _default;
  17894. /***/ }),
  17895. /***/ 6:
  17896. /*!***************************************************************!*\
  17897. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  17898. \***************************************************************/
  17899. /*! no static exports found */
  17900. /***/ (function(module, exports) {
  17901. function _arrayWithHoles(arr) {
  17902. if (Array.isArray(arr)) return arr;
  17903. }
  17904. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  17905. /***/ }),
  17906. /***/ 7:
  17907. /*!*********************************************************************!*\
  17908. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  17909. \*********************************************************************/
  17910. /*! no static exports found */
  17911. /***/ (function(module, exports) {
  17912. function _iterableToArrayLimit(arr, i) {
  17913. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  17914. if (null != _i) {
  17915. var _s,
  17916. _e,
  17917. _x,
  17918. _r,
  17919. _arr = [],
  17920. _n = !0,
  17921. _d = !1;
  17922. try {
  17923. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  17924. if (Object(_i) !== _i) return;
  17925. _n = !1;
  17926. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  17927. ;
  17928. }
  17929. } catch (err) {
  17930. _d = !0, _e = err;
  17931. } finally {
  17932. try {
  17933. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  17934. } finally {
  17935. if (_d) throw _e;
  17936. }
  17937. }
  17938. return _arr;
  17939. }
  17940. }
  17941. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  17942. /***/ }),
  17943. /***/ 8:
  17944. /*!***************************************************************************!*\
  17945. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  17946. \***************************************************************************/
  17947. /*! no static exports found */
  17948. /***/ (function(module, exports, __webpack_require__) {
  17949. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  17950. function _unsupportedIterableToArray(o, minLen) {
  17951. if (!o) return;
  17952. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  17953. var n = Object.prototype.toString.call(o).slice(8, -1);
  17954. if (n === "Object" && o.constructor) n = o.constructor.name;
  17955. if (n === "Map" || n === "Set") return Array.from(o);
  17956. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  17957. }
  17958. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  17959. /***/ }),
  17960. /***/ 9:
  17961. /*!*****************************************************************!*\
  17962. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  17963. \*****************************************************************/
  17964. /*! no static exports found */
  17965. /***/ (function(module, exports) {
  17966. function _arrayLikeToArray(arr, len) {
  17967. if (len == null || len > arr.length) len = arr.length;
  17968. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  17969. arr2[i] = arr[i];
  17970. }
  17971. return arr2;
  17972. }
  17973. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  17974. /***/ }),
  17975. /***/ 91:
  17976. /*!*************************************!*\
  17977. !*** E:/项目/2023-8/xyl/api/login.js ***!
  17978. \*************************************/
  17979. /*! no static exports found */
  17980. /***/ (function(module, exports, __webpack_require__) {
  17981. "use strict";
  17982. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  17983. Object.defineProperty(exports, "__esModule", {
  17984. value: true
  17985. });
  17986. exports.bangding = bangding;
  17987. exports.getUserInfo = getUserInfo;
  17988. exports.login = login;
  17989. exports.loginMobile = loginMobile;
  17990. exports.register = register;
  17991. exports.verify = verify;
  17992. var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 46));
  17993. // 登录
  17994. function login(data) {
  17995. return (0, _request.default)({
  17996. url: '/api/login',
  17997. method: 'post',
  17998. data: data
  17999. });
  18000. }
  18001. // 注册
  18002. function register(data) {
  18003. return (0, _request.default)({
  18004. url: '/api/register',
  18005. method: 'post',
  18006. data: data
  18007. });
  18008. }
  18009. // 验证码
  18010. function verify(data) {
  18011. // type=register为注册
  18012. // type=login为登录
  18013. return (0, _request.default)({
  18014. url: '/api/register/verify',
  18015. method: 'post',
  18016. data: data
  18017. });
  18018. }
  18019. // 获取用户信息
  18020. function getUserInfo(data) {
  18021. return (0, _request.default)({
  18022. url: '/api/userinfo',
  18023. method: 'get',
  18024. data: data
  18025. });
  18026. }
  18027. // 短信登录
  18028. function loginMobile(data) {
  18029. return (0, _request.default)({
  18030. url: '/api/login/mobile',
  18031. method: 'post',
  18032. data: data
  18033. });
  18034. }
  18035. //绑定手机号
  18036. function bangding(data) {
  18037. return (0, _request.default)({
  18038. url: '/api/binding',
  18039. method: 'POST',
  18040. data: data
  18041. });
  18042. }
  18043. /***/ })
  18044. }]);
  18045. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map