vendor.js 862 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],[
  2. /* 0 */,
  3. /* 1 */
  4. /*!*********************************************************!*\
  5. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  6. \*********************************************************/
  7. /*! no static exports found */
  8. /***/ (function(module, exports, __webpack_require__) {
  9. "use strict";
  10. Object.defineProperty(exports, "__esModule", {
  11. value: true
  12. });
  13. exports.default = void 0;
  14. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  15. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  16. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  17. return this;
  18. }();
  19. var key = ['w', 'x'].join('');
  20. var oldWx = target[key];
  21. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  22. function isWxKey(key) {
  23. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  24. return false;
  25. }
  26. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  27. }
  28. function initWx() {
  29. var newWx = {};
  30. for (var _key in oldWx) {
  31. if (isWxKey(_key)) {
  32. // TODO wrapper function
  33. newWx[_key] = oldWx[_key];
  34. }
  35. }
  36. return newWx;
  37. }
  38. target[key] = initWx();
  39. var _default = target[key];
  40. exports.default = _default;
  41. /***/ }),
  42. /* 2 */
  43. /*!************************************************************!*\
  44. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  45. \************************************************************/
  46. /*! no static exports found */
  47. /***/ (function(module, exports, __webpack_require__) {
  48. "use strict";
  49. /* WEBPACK VAR INJECTION */(function(wx, global) {
  50. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  51. Object.defineProperty(exports, "__esModule", {
  52. value: true
  53. });
  54. exports.createApp = createApp;
  55. exports.createComponent = createComponent;
  56. exports.createPage = createPage;
  57. exports.createPlugin = createPlugin;
  58. exports.createSubpackageApp = createSubpackageApp;
  59. exports.default = void 0;
  60. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  61. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  62. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  63. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  64. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  65. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  66. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  67. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  68. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  69. var realAtob;
  70. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  71. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  72. if (typeof atob !== 'function') {
  73. realAtob = function realAtob(str) {
  74. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  75. if (!b64re.test(str)) {
  76. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  77. }
  78. // Adding the padding if missing, for semplicity
  79. str += '=='.slice(2 - (str.length & 3));
  80. var bitmap;
  81. var result = '';
  82. var r1;
  83. var r2;
  84. var i = 0;
  85. for (; i < str.length;) {
  86. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  87. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  88. }
  89. return result;
  90. };
  91. } else {
  92. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  93. realAtob = atob;
  94. }
  95. function b64DecodeUnicode(str) {
  96. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  97. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  98. }).join(''));
  99. }
  100. function getCurrentUserInfo() {
  101. var token = wx.getStorageSync('uni_id_token') || '';
  102. var tokenArr = token.split('.');
  103. if (!token || tokenArr.length !== 3) {
  104. return {
  105. uid: null,
  106. role: [],
  107. permission: [],
  108. tokenExpired: 0
  109. };
  110. }
  111. var userInfo;
  112. try {
  113. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  114. } catch (error) {
  115. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  116. }
  117. userInfo.tokenExpired = userInfo.exp * 1000;
  118. delete userInfo.exp;
  119. delete userInfo.iat;
  120. return userInfo;
  121. }
  122. function uniIdMixin(Vue) {
  123. Vue.prototype.uniIDHasRole = function (roleId) {
  124. var _getCurrentUserInfo = getCurrentUserInfo(),
  125. role = _getCurrentUserInfo.role;
  126. return role.indexOf(roleId) > -1;
  127. };
  128. Vue.prototype.uniIDHasPermission = function (permissionId) {
  129. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  130. permission = _getCurrentUserInfo2.permission;
  131. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  132. };
  133. Vue.prototype.uniIDTokenValid = function () {
  134. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  135. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  136. return tokenExpired > Date.now();
  137. };
  138. }
  139. var _toString = Object.prototype.toString;
  140. var hasOwnProperty = Object.prototype.hasOwnProperty;
  141. function isFn(fn) {
  142. return typeof fn === 'function';
  143. }
  144. function isStr(str) {
  145. return typeof str === 'string';
  146. }
  147. function isObject(obj) {
  148. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  149. }
  150. function isPlainObject(obj) {
  151. return _toString.call(obj) === '[object Object]';
  152. }
  153. function hasOwn(obj, key) {
  154. return hasOwnProperty.call(obj, key);
  155. }
  156. function noop() {}
  157. /**
  158. * Create a cached version of a pure function.
  159. */
  160. function cached(fn) {
  161. var cache = Object.create(null);
  162. return function cachedFn(str) {
  163. var hit = cache[str];
  164. return hit || (cache[str] = fn(str));
  165. };
  166. }
  167. /**
  168. * Camelize a hyphen-delimited string.
  169. */
  170. var camelizeRE = /-(\w)/g;
  171. var camelize = cached(function (str) {
  172. return str.replace(camelizeRE, function (_, c) {
  173. return c ? c.toUpperCase() : '';
  174. });
  175. });
  176. function sortObject(obj) {
  177. var sortObj = {};
  178. if (isPlainObject(obj)) {
  179. Object.keys(obj).sort().forEach(function (key) {
  180. sortObj[key] = obj[key];
  181. });
  182. }
  183. return !Object.keys(sortObj) ? obj : sortObj;
  184. }
  185. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  186. var globalInterceptors = {};
  187. var scopedInterceptors = {};
  188. function mergeHook(parentVal, childVal) {
  189. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  190. return res ? dedupeHooks(res) : res;
  191. }
  192. function dedupeHooks(hooks) {
  193. var res = [];
  194. for (var i = 0; i < hooks.length; i++) {
  195. if (res.indexOf(hooks[i]) === -1) {
  196. res.push(hooks[i]);
  197. }
  198. }
  199. return res;
  200. }
  201. function removeHook(hooks, hook) {
  202. var index = hooks.indexOf(hook);
  203. if (index !== -1) {
  204. hooks.splice(index, 1);
  205. }
  206. }
  207. function mergeInterceptorHook(interceptor, option) {
  208. Object.keys(option).forEach(function (hook) {
  209. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  210. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  211. }
  212. });
  213. }
  214. function removeInterceptorHook(interceptor, option) {
  215. if (!interceptor || !option) {
  216. return;
  217. }
  218. Object.keys(option).forEach(function (hook) {
  219. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  220. removeHook(interceptor[hook], option[hook]);
  221. }
  222. });
  223. }
  224. function addInterceptor(method, option) {
  225. if (typeof method === 'string' && isPlainObject(option)) {
  226. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  227. } else if (isPlainObject(method)) {
  228. mergeInterceptorHook(globalInterceptors, method);
  229. }
  230. }
  231. function removeInterceptor(method, option) {
  232. if (typeof method === 'string') {
  233. if (isPlainObject(option)) {
  234. removeInterceptorHook(scopedInterceptors[method], option);
  235. } else {
  236. delete scopedInterceptors[method];
  237. }
  238. } else if (isPlainObject(method)) {
  239. removeInterceptorHook(globalInterceptors, method);
  240. }
  241. }
  242. function wrapperHook(hook, params) {
  243. return function (data) {
  244. return hook(data, params) || data;
  245. };
  246. }
  247. function isPromise(obj) {
  248. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  249. }
  250. function queue(hooks, data, params) {
  251. var promise = false;
  252. for (var i = 0; i < hooks.length; i++) {
  253. var hook = hooks[i];
  254. if (promise) {
  255. promise = Promise.resolve(wrapperHook(hook, params));
  256. } else {
  257. var res = hook(data, params);
  258. if (isPromise(res)) {
  259. promise = Promise.resolve(res);
  260. }
  261. if (res === false) {
  262. return {
  263. then: function then() {}
  264. };
  265. }
  266. }
  267. }
  268. return promise || {
  269. then: function then(callback) {
  270. return callback(data);
  271. }
  272. };
  273. }
  274. function wrapperOptions(interceptor) {
  275. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  276. ['success', 'fail', 'complete'].forEach(function (name) {
  277. if (Array.isArray(interceptor[name])) {
  278. var oldCallback = options[name];
  279. options[name] = function callbackInterceptor(res) {
  280. queue(interceptor[name], res, options).then(function (res) {
  281. /* eslint-disable no-mixed-operators */
  282. return isFn(oldCallback) && oldCallback(res) || res;
  283. });
  284. };
  285. }
  286. });
  287. return options;
  288. }
  289. function wrapperReturnValue(method, returnValue) {
  290. var returnValueHooks = [];
  291. if (Array.isArray(globalInterceptors.returnValue)) {
  292. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  293. }
  294. var interceptor = scopedInterceptors[method];
  295. if (interceptor && Array.isArray(interceptor.returnValue)) {
  296. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  297. }
  298. returnValueHooks.forEach(function (hook) {
  299. returnValue = hook(returnValue) || returnValue;
  300. });
  301. return returnValue;
  302. }
  303. function getApiInterceptorHooks(method) {
  304. var interceptor = Object.create(null);
  305. Object.keys(globalInterceptors).forEach(function (hook) {
  306. if (hook !== 'returnValue') {
  307. interceptor[hook] = globalInterceptors[hook].slice();
  308. }
  309. });
  310. var scopedInterceptor = scopedInterceptors[method];
  311. if (scopedInterceptor) {
  312. Object.keys(scopedInterceptor).forEach(function (hook) {
  313. if (hook !== 'returnValue') {
  314. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  315. }
  316. });
  317. }
  318. return interceptor;
  319. }
  320. function invokeApi(method, api, options) {
  321. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  322. params[_key - 3] = arguments[_key];
  323. }
  324. var interceptor = getApiInterceptorHooks(method);
  325. if (interceptor && Object.keys(interceptor).length) {
  326. if (Array.isArray(interceptor.invoke)) {
  327. var res = queue(interceptor.invoke, options);
  328. return res.then(function (options) {
  329. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  330. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  331. });
  332. } else {
  333. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  334. }
  335. }
  336. return api.apply(void 0, [options].concat(params));
  337. }
  338. var promiseInterceptor = {
  339. returnValue: function returnValue(res) {
  340. if (!isPromise(res)) {
  341. return res;
  342. }
  343. return new Promise(function (resolve, reject) {
  344. res.then(function (res) {
  345. if (!res) {
  346. resolve(res);
  347. return;
  348. }
  349. if (res[0]) {
  350. reject(res[0]);
  351. } else {
  352. resolve(res[1]);
  353. }
  354. });
  355. });
  356. }
  357. };
  358. 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/;
  359. var CONTEXT_API_RE = /^create|Manager$/;
  360. // Context例外情况
  361. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  362. // 同步例外情况
  363. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  364. var CALLBACK_API_RE = /^on|^off/;
  365. function isContextApi(name) {
  366. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  367. }
  368. function isSyncApi(name) {
  369. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  370. }
  371. function isCallbackApi(name) {
  372. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  373. }
  374. function handlePromise(promise) {
  375. return promise.then(function (data) {
  376. return [null, data];
  377. }).catch(function (err) {
  378. return [err];
  379. });
  380. }
  381. function shouldPromise(name) {
  382. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  383. return false;
  384. }
  385. return true;
  386. }
  387. /* eslint-disable no-extend-native */
  388. if (!Promise.prototype.finally) {
  389. Promise.prototype.finally = function (callback) {
  390. var promise = this.constructor;
  391. return this.then(function (value) {
  392. return promise.resolve(callback()).then(function () {
  393. return value;
  394. });
  395. }, function (reason) {
  396. return promise.resolve(callback()).then(function () {
  397. throw reason;
  398. });
  399. });
  400. };
  401. }
  402. function promisify(name, api) {
  403. if (!shouldPromise(name) || !isFn(api)) {
  404. return api;
  405. }
  406. return function promiseApi() {
  407. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  408. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  409. params[_key2 - 1] = arguments[_key2];
  410. }
  411. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  412. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  413. }
  414. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  415. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  416. success: resolve,
  417. fail: reject
  418. })].concat(params));
  419. })));
  420. };
  421. }
  422. var EPS = 1e-4;
  423. var BASE_DEVICE_WIDTH = 750;
  424. var isIOS = false;
  425. var deviceWidth = 0;
  426. var deviceDPR = 0;
  427. function checkDeviceWidth() {
  428. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  429. platform = _wx$getSystemInfoSync.platform,
  430. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  431. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  432. deviceWidth = windowWidth;
  433. deviceDPR = pixelRatio;
  434. isIOS = platform === 'ios';
  435. }
  436. function upx2px(number, newDeviceWidth) {
  437. if (deviceWidth === 0) {
  438. checkDeviceWidth();
  439. }
  440. number = Number(number);
  441. if (number === 0) {
  442. return 0;
  443. }
  444. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  445. if (result < 0) {
  446. result = -result;
  447. }
  448. result = Math.floor(result + EPS);
  449. if (result === 0) {
  450. if (deviceDPR === 1 || !isIOS) {
  451. result = 1;
  452. } else {
  453. result = 0.5;
  454. }
  455. }
  456. return number < 0 ? -result : result;
  457. }
  458. var LOCALE_ZH_HANS = 'zh-Hans';
  459. var LOCALE_ZH_HANT = 'zh-Hant';
  460. var LOCALE_EN = 'en';
  461. var LOCALE_FR = 'fr';
  462. var LOCALE_ES = 'es';
  463. var messages = {};
  464. var locale;
  465. {
  466. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  467. }
  468. function initI18nMessages() {
  469. if (!isEnableLocale()) {
  470. return;
  471. }
  472. var localeKeys = Object.keys(__uniConfig.locales);
  473. if (localeKeys.length) {
  474. localeKeys.forEach(function (locale) {
  475. var curMessages = messages[locale];
  476. var userMessages = __uniConfig.locales[locale];
  477. if (curMessages) {
  478. Object.assign(curMessages, userMessages);
  479. } else {
  480. messages[locale] = userMessages;
  481. }
  482. });
  483. }
  484. }
  485. initI18nMessages();
  486. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  487. var t = i18n.t;
  488. var i18nMixin = i18n.mixin = {
  489. beforeCreate: function beforeCreate() {
  490. var _this = this;
  491. var unwatch = i18n.i18n.watchLocale(function () {
  492. _this.$forceUpdate();
  493. });
  494. this.$once('hook:beforeDestroy', function () {
  495. unwatch();
  496. });
  497. },
  498. methods: {
  499. $$t: function $$t(key, values) {
  500. return t(key, values);
  501. }
  502. }
  503. };
  504. var setLocale = i18n.setLocale;
  505. var getLocale = i18n.getLocale;
  506. function initAppLocale(Vue, appVm, locale) {
  507. var state = Vue.observable({
  508. locale: locale || i18n.getLocale()
  509. });
  510. var localeWatchers = [];
  511. appVm.$watchLocale = function (fn) {
  512. localeWatchers.push(fn);
  513. };
  514. Object.defineProperty(appVm, '$locale', {
  515. get: function get() {
  516. return state.locale;
  517. },
  518. set: function set(v) {
  519. state.locale = v;
  520. localeWatchers.forEach(function (watch) {
  521. return watch(v);
  522. });
  523. }
  524. });
  525. }
  526. function isEnableLocale() {
  527. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  528. }
  529. function include(str, parts) {
  530. return !!parts.find(function (part) {
  531. return str.indexOf(part) !== -1;
  532. });
  533. }
  534. function startsWith(str, parts) {
  535. return parts.find(function (part) {
  536. return str.indexOf(part) === 0;
  537. });
  538. }
  539. function normalizeLocale(locale, messages) {
  540. if (!locale) {
  541. return;
  542. }
  543. locale = locale.trim().replace(/_/g, '-');
  544. if (messages && messages[locale]) {
  545. return locale;
  546. }
  547. locale = locale.toLowerCase();
  548. if (locale === 'chinese') {
  549. // 支付宝
  550. return LOCALE_ZH_HANS;
  551. }
  552. if (locale.indexOf('zh') === 0) {
  553. if (locale.indexOf('-hans') > -1) {
  554. return LOCALE_ZH_HANS;
  555. }
  556. if (locale.indexOf('-hant') > -1) {
  557. return LOCALE_ZH_HANT;
  558. }
  559. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  560. return LOCALE_ZH_HANT;
  561. }
  562. return LOCALE_ZH_HANS;
  563. }
  564. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  565. if (lang) {
  566. return lang;
  567. }
  568. }
  569. // export function initI18n() {
  570. // const localeKeys = Object.keys(__uniConfig.locales || {})
  571. // if (localeKeys.length) {
  572. // localeKeys.forEach((locale) =>
  573. // i18n.add(locale, __uniConfig.locales[locale])
  574. // )
  575. // }
  576. // }
  577. function getLocale$1() {
  578. // 优先使用 $locale
  579. if (isFn(getApp)) {
  580. var app = getApp({
  581. allowDefault: true
  582. });
  583. if (app && app.$vm) {
  584. return app.$vm.$locale;
  585. }
  586. }
  587. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  588. }
  589. function setLocale$1(locale) {
  590. var app = isFn(getApp) ? getApp() : false;
  591. if (!app) {
  592. return false;
  593. }
  594. var oldLocale = app.$vm.$locale;
  595. if (oldLocale !== locale) {
  596. app.$vm.$locale = locale;
  597. onLocaleChangeCallbacks.forEach(function (fn) {
  598. return fn({
  599. locale: locale
  600. });
  601. });
  602. return true;
  603. }
  604. return false;
  605. }
  606. var onLocaleChangeCallbacks = [];
  607. function onLocaleChange(fn) {
  608. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  609. onLocaleChangeCallbacks.push(fn);
  610. }
  611. }
  612. if (typeof global !== 'undefined') {
  613. global.getLocale = getLocale$1;
  614. }
  615. var interceptors = {
  616. promiseInterceptor: promiseInterceptor
  617. };
  618. var baseApi = /*#__PURE__*/Object.freeze({
  619. __proto__: null,
  620. upx2px: upx2px,
  621. getLocale: getLocale$1,
  622. setLocale: setLocale$1,
  623. onLocaleChange: onLocaleChange,
  624. addInterceptor: addInterceptor,
  625. removeInterceptor: removeInterceptor,
  626. interceptors: interceptors
  627. });
  628. function findExistsPageIndex(url) {
  629. var pages = getCurrentPages();
  630. var len = pages.length;
  631. while (len--) {
  632. var page = pages[len];
  633. if (page.$page && page.$page.fullPath === url) {
  634. return len;
  635. }
  636. }
  637. return -1;
  638. }
  639. var redirectTo = {
  640. name: function name(fromArgs) {
  641. if (fromArgs.exists === 'back' && fromArgs.delta) {
  642. return 'navigateBack';
  643. }
  644. return 'redirectTo';
  645. },
  646. args: function args(fromArgs) {
  647. if (fromArgs.exists === 'back' && fromArgs.url) {
  648. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  649. if (existsPageIndex !== -1) {
  650. var delta = getCurrentPages().length - 1 - existsPageIndex;
  651. if (delta > 0) {
  652. fromArgs.delta = delta;
  653. }
  654. }
  655. }
  656. }
  657. };
  658. var previewImage = {
  659. args: function args(fromArgs) {
  660. var currentIndex = parseInt(fromArgs.current);
  661. if (isNaN(currentIndex)) {
  662. return;
  663. }
  664. var urls = fromArgs.urls;
  665. if (!Array.isArray(urls)) {
  666. return;
  667. }
  668. var len = urls.length;
  669. if (!len) {
  670. return;
  671. }
  672. if (currentIndex < 0) {
  673. currentIndex = 0;
  674. } else if (currentIndex >= len) {
  675. currentIndex = len - 1;
  676. }
  677. if (currentIndex > 0) {
  678. fromArgs.current = urls[currentIndex];
  679. fromArgs.urls = urls.filter(function (item, index) {
  680. return index < currentIndex ? item !== urls[currentIndex] : true;
  681. });
  682. } else {
  683. fromArgs.current = urls[0];
  684. }
  685. return {
  686. indicator: false,
  687. loop: false
  688. };
  689. }
  690. };
  691. var UUID_KEY = '__DC_STAT_UUID';
  692. var deviceId;
  693. function useDeviceId(result) {
  694. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  695. if (!deviceId) {
  696. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  697. wx.setStorage({
  698. key: UUID_KEY,
  699. data: deviceId
  700. });
  701. }
  702. result.deviceId = deviceId;
  703. }
  704. function addSafeAreaInsets(result) {
  705. if (result.safeArea) {
  706. var safeArea = result.safeArea;
  707. result.safeAreaInsets = {
  708. top: safeArea.top,
  709. left: safeArea.left,
  710. right: result.windowWidth - safeArea.right,
  711. bottom: result.screenHeight - safeArea.bottom
  712. };
  713. }
  714. }
  715. function populateParameters(result) {
  716. var _result$brand = result.brand,
  717. brand = _result$brand === void 0 ? '' : _result$brand,
  718. _result$model = result.model,
  719. model = _result$model === void 0 ? '' : _result$model,
  720. _result$system = result.system,
  721. system = _result$system === void 0 ? '' : _result$system,
  722. _result$language = result.language,
  723. language = _result$language === void 0 ? '' : _result$language,
  724. theme = result.theme,
  725. version = result.version,
  726. platform = result.platform,
  727. fontSizeSetting = result.fontSizeSetting,
  728. SDKVersion = result.SDKVersion,
  729. pixelRatio = result.pixelRatio,
  730. deviceOrientation = result.deviceOrientation;
  731. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  732. var extraParam = {};
  733. // osName osVersion
  734. var osName = '';
  735. var osVersion = '';
  736. {
  737. osName = system.split(' ')[0] || '';
  738. osVersion = system.split(' ')[1] || '';
  739. }
  740. var hostVersion = version;
  741. // deviceType
  742. var deviceType = getGetDeviceType(result, model);
  743. // deviceModel
  744. var deviceBrand = getDeviceBrand(brand);
  745. // hostName
  746. var _hostName = getHostName(result);
  747. // deviceOrientation
  748. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  749. // devicePixelRatio
  750. var _devicePixelRatio = pixelRatio;
  751. // SDKVersion
  752. var _SDKVersion = SDKVersion;
  753. // hostLanguage
  754. var hostLanguage = language.replace(/_/g, '-');
  755. // wx.getAccountInfoSync
  756. var parameters = {
  757. appId: "__UNI__8C5F0F6",
  758. appName: "红沙湾管理端",
  759. appVersion: "1.0.0",
  760. appVersionCode: "100",
  761. appLanguage: getAppLanguage(hostLanguage),
  762. uniCompileVersion: "4.32",
  763. uniRuntimeVersion: "4.32",
  764. uniPlatform: undefined || "mp-weixin",
  765. deviceBrand: deviceBrand,
  766. deviceModel: model,
  767. deviceType: deviceType,
  768. devicePixelRatio: _devicePixelRatio,
  769. deviceOrientation: _deviceOrientation,
  770. osName: osName.toLocaleLowerCase(),
  771. osVersion: osVersion,
  772. hostTheme: theme,
  773. hostVersion: hostVersion,
  774. hostLanguage: hostLanguage,
  775. hostName: _hostName,
  776. hostSDKVersion: _SDKVersion,
  777. hostFontSizeSetting: fontSizeSetting,
  778. windowTop: 0,
  779. windowBottom: 0,
  780. // TODO
  781. osLanguage: undefined,
  782. osTheme: undefined,
  783. ua: undefined,
  784. hostPackageName: undefined,
  785. browserName: undefined,
  786. browserVersion: undefined
  787. };
  788. Object.assign(result, parameters, extraParam);
  789. }
  790. function getGetDeviceType(result, model) {
  791. var deviceType = result.deviceType || 'phone';
  792. {
  793. var deviceTypeMaps = {
  794. ipad: 'pad',
  795. windows: 'pc',
  796. mac: 'pc'
  797. };
  798. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  799. var _model = model.toLocaleLowerCase();
  800. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  801. var _m = deviceTypeMapsKeys[index];
  802. if (_model.indexOf(_m) !== -1) {
  803. deviceType = deviceTypeMaps[_m];
  804. break;
  805. }
  806. }
  807. }
  808. return deviceType;
  809. }
  810. function getDeviceBrand(brand) {
  811. var deviceBrand = brand;
  812. if (deviceBrand) {
  813. deviceBrand = brand.toLocaleLowerCase();
  814. }
  815. return deviceBrand;
  816. }
  817. function getAppLanguage(defaultLanguage) {
  818. return getLocale$1 ? getLocale$1() : defaultLanguage;
  819. }
  820. function getHostName(result) {
  821. var _platform = 'WeChat';
  822. var _hostName = result.hostName || _platform; // mp-jd
  823. {
  824. if (result.environment) {
  825. _hostName = result.environment;
  826. } else if (result.host && result.host.env) {
  827. _hostName = result.host.env;
  828. }
  829. }
  830. return _hostName;
  831. }
  832. var getSystemInfo = {
  833. returnValue: function returnValue(result) {
  834. useDeviceId(result);
  835. addSafeAreaInsets(result);
  836. populateParameters(result);
  837. }
  838. };
  839. var showActionSheet = {
  840. args: function args(fromArgs) {
  841. if ((0, _typeof2.default)(fromArgs) === 'object') {
  842. fromArgs.alertText = fromArgs.title;
  843. }
  844. }
  845. };
  846. var getAppBaseInfo = {
  847. returnValue: function returnValue(result) {
  848. var _result = result,
  849. version = _result.version,
  850. language = _result.language,
  851. SDKVersion = _result.SDKVersion,
  852. theme = _result.theme;
  853. var _hostName = getHostName(result);
  854. var hostLanguage = language.replace('_', '-');
  855. result = sortObject(Object.assign(result, {
  856. appId: "__UNI__8C5F0F6",
  857. appName: "红沙湾管理端",
  858. appVersion: "1.0.0",
  859. appVersionCode: "100",
  860. appLanguage: getAppLanguage(hostLanguage),
  861. hostVersion: version,
  862. hostLanguage: hostLanguage,
  863. hostName: _hostName,
  864. hostSDKVersion: SDKVersion,
  865. hostTheme: theme
  866. }));
  867. }
  868. };
  869. var getDeviceInfo = {
  870. returnValue: function returnValue(result) {
  871. var _result2 = result,
  872. brand = _result2.brand,
  873. model = _result2.model;
  874. var deviceType = getGetDeviceType(result, model);
  875. var deviceBrand = getDeviceBrand(brand);
  876. useDeviceId(result);
  877. result = sortObject(Object.assign(result, {
  878. deviceType: deviceType,
  879. deviceBrand: deviceBrand,
  880. deviceModel: model
  881. }));
  882. }
  883. };
  884. var getWindowInfo = {
  885. returnValue: function returnValue(result) {
  886. addSafeAreaInsets(result);
  887. result = sortObject(Object.assign(result, {
  888. windowTop: 0,
  889. windowBottom: 0
  890. }));
  891. }
  892. };
  893. var getAppAuthorizeSetting = {
  894. returnValue: function returnValue(result) {
  895. var locationReducedAccuracy = result.locationReducedAccuracy;
  896. result.locationAccuracy = 'unsupported';
  897. if (locationReducedAccuracy === true) {
  898. result.locationAccuracy = 'reduced';
  899. } else if (locationReducedAccuracy === false) {
  900. result.locationAccuracy = 'full';
  901. }
  902. }
  903. };
  904. // import navigateTo from 'uni-helpers/navigate-to'
  905. var compressImage = {
  906. args: function args(fromArgs) {
  907. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  908. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  909. fromArgs.compressHeight = fromArgs.compressedHeight;
  910. }
  911. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  912. fromArgs.compressWidth = fromArgs.compressedWidth;
  913. }
  914. }
  915. };
  916. var protocols = {
  917. redirectTo: redirectTo,
  918. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  919. previewImage: previewImage,
  920. getSystemInfo: getSystemInfo,
  921. getSystemInfoSync: getSystemInfo,
  922. showActionSheet: showActionSheet,
  923. getAppBaseInfo: getAppBaseInfo,
  924. getDeviceInfo: getDeviceInfo,
  925. getWindowInfo: getWindowInfo,
  926. getAppAuthorizeSetting: getAppAuthorizeSetting,
  927. compressImage: compressImage
  928. };
  929. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  930. var canIUses = [];
  931. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  932. function processCallback(methodName, method, returnValue) {
  933. return function (res) {
  934. return method(processReturnValue(methodName, res, returnValue));
  935. };
  936. }
  937. function processArgs(methodName, fromArgs) {
  938. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  939. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  940. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  941. if (isPlainObject(fromArgs)) {
  942. // 一般 api 的参数解析
  943. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  944. if (isFn(argsOption)) {
  945. argsOption = argsOption(fromArgs, toArgs) || {};
  946. }
  947. for (var key in fromArgs) {
  948. if (hasOwn(argsOption, key)) {
  949. var keyOption = argsOption[key];
  950. if (isFn(keyOption)) {
  951. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  952. }
  953. if (!keyOption) {
  954. // 不支持的参数
  955. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  956. } else if (isStr(keyOption)) {
  957. // 重写参数 key
  958. toArgs[keyOption] = fromArgs[key];
  959. } else if (isPlainObject(keyOption)) {
  960. // {name:newName,value:value}可重新指定参数 key:value
  961. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  962. }
  963. } else if (CALLBACKS.indexOf(key) !== -1) {
  964. if (isFn(fromArgs[key])) {
  965. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  966. }
  967. } else {
  968. if (!keepFromArgs) {
  969. toArgs[key] = fromArgs[key];
  970. }
  971. }
  972. }
  973. return toArgs;
  974. } else if (isFn(fromArgs)) {
  975. fromArgs = processCallback(methodName, fromArgs, returnValue);
  976. }
  977. return fromArgs;
  978. }
  979. function processReturnValue(methodName, res, returnValue) {
  980. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  981. if (isFn(protocols.returnValue)) {
  982. // 处理通用 returnValue
  983. res = protocols.returnValue(methodName, res);
  984. }
  985. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  986. }
  987. function wrapper(methodName, method) {
  988. if (hasOwn(protocols, methodName)) {
  989. var protocol = protocols[methodName];
  990. if (!protocol) {
  991. // 暂不支持的 api
  992. return function () {
  993. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  994. };
  995. }
  996. return function (arg1, arg2) {
  997. // 目前 api 最多两个参数
  998. var options = protocol;
  999. if (isFn(protocol)) {
  1000. options = protocol(arg1);
  1001. }
  1002. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  1003. var args = [arg1];
  1004. if (typeof arg2 !== 'undefined') {
  1005. args.push(arg2);
  1006. }
  1007. if (isFn(options.name)) {
  1008. methodName = options.name(arg1);
  1009. } else if (isStr(options.name)) {
  1010. methodName = options.name;
  1011. }
  1012. var returnValue = wx[methodName].apply(wx, args);
  1013. if (isSyncApi(methodName)) {
  1014. // 同步 api
  1015. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1016. }
  1017. return returnValue;
  1018. };
  1019. }
  1020. return method;
  1021. }
  1022. var todoApis = Object.create(null);
  1023. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  1024. function createTodoApi(name) {
  1025. return function todoApi(_ref) {
  1026. var fail = _ref.fail,
  1027. complete = _ref.complete;
  1028. var res = {
  1029. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  1030. };
  1031. isFn(fail) && fail(res);
  1032. isFn(complete) && complete(res);
  1033. };
  1034. }
  1035. TODOS.forEach(function (name) {
  1036. todoApis[name] = createTodoApi(name);
  1037. });
  1038. var providers = {
  1039. oauth: ['weixin'],
  1040. share: ['weixin'],
  1041. payment: ['wxpay'],
  1042. push: ['weixin']
  1043. };
  1044. function getProvider(_ref2) {
  1045. var service = _ref2.service,
  1046. success = _ref2.success,
  1047. fail = _ref2.fail,
  1048. complete = _ref2.complete;
  1049. var res = false;
  1050. if (providers[service]) {
  1051. res = {
  1052. errMsg: 'getProvider:ok',
  1053. service: service,
  1054. provider: providers[service]
  1055. };
  1056. isFn(success) && success(res);
  1057. } else {
  1058. res = {
  1059. errMsg: 'getProvider:fail service not found'
  1060. };
  1061. isFn(fail) && fail(res);
  1062. }
  1063. isFn(complete) && complete(res);
  1064. }
  1065. var extraApi = /*#__PURE__*/Object.freeze({
  1066. __proto__: null,
  1067. getProvider: getProvider
  1068. });
  1069. var getEmitter = function () {
  1070. var Emitter;
  1071. return function getUniEmitter() {
  1072. if (!Emitter) {
  1073. Emitter = new _vue.default();
  1074. }
  1075. return Emitter;
  1076. };
  1077. }();
  1078. function apply(ctx, method, args) {
  1079. return ctx[method].apply(ctx, args);
  1080. }
  1081. function $on() {
  1082. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  1083. }
  1084. function $off() {
  1085. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  1086. }
  1087. function $once() {
  1088. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  1089. }
  1090. function $emit() {
  1091. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  1092. }
  1093. var eventApi = /*#__PURE__*/Object.freeze({
  1094. __proto__: null,
  1095. $on: $on,
  1096. $off: $off,
  1097. $once: $once,
  1098. $emit: $emit
  1099. });
  1100. /**
  1101. * 框架内 try-catch
  1102. */
  1103. /**
  1104. * 开发者 try-catch
  1105. */
  1106. function tryCatch(fn) {
  1107. return function () {
  1108. try {
  1109. return fn.apply(fn, arguments);
  1110. } catch (e) {
  1111. // TODO
  1112. console.error(e);
  1113. }
  1114. };
  1115. }
  1116. function getApiCallbacks(params) {
  1117. var apiCallbacks = {};
  1118. for (var name in params) {
  1119. var param = params[name];
  1120. if (isFn(param)) {
  1121. apiCallbacks[name] = tryCatch(param);
  1122. delete params[name];
  1123. }
  1124. }
  1125. return apiCallbacks;
  1126. }
  1127. var cid;
  1128. var cidErrMsg;
  1129. var enabled;
  1130. function normalizePushMessage(message) {
  1131. try {
  1132. return JSON.parse(message);
  1133. } catch (e) {}
  1134. return message;
  1135. }
  1136. function invokePushCallback(args) {
  1137. if (args.type === 'enabled') {
  1138. enabled = true;
  1139. } else if (args.type === 'clientId') {
  1140. cid = args.cid;
  1141. cidErrMsg = args.errMsg;
  1142. invokeGetPushCidCallbacks(cid, args.errMsg);
  1143. } else if (args.type === 'pushMsg') {
  1144. var message = {
  1145. type: 'receive',
  1146. data: normalizePushMessage(args.message)
  1147. };
  1148. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  1149. var callback = onPushMessageCallbacks[i];
  1150. callback(message);
  1151. // 该消息已被阻止
  1152. if (message.stopped) {
  1153. break;
  1154. }
  1155. }
  1156. } else if (args.type === 'click') {
  1157. onPushMessageCallbacks.forEach(function (callback) {
  1158. callback({
  1159. type: 'click',
  1160. data: normalizePushMessage(args.message)
  1161. });
  1162. });
  1163. }
  1164. }
  1165. var getPushCidCallbacks = [];
  1166. function invokeGetPushCidCallbacks(cid, errMsg) {
  1167. getPushCidCallbacks.forEach(function (callback) {
  1168. callback(cid, errMsg);
  1169. });
  1170. getPushCidCallbacks.length = 0;
  1171. }
  1172. function getPushClientId(args) {
  1173. if (!isPlainObject(args)) {
  1174. args = {};
  1175. }
  1176. var _getApiCallbacks = getApiCallbacks(args),
  1177. success = _getApiCallbacks.success,
  1178. fail = _getApiCallbacks.fail,
  1179. complete = _getApiCallbacks.complete;
  1180. var hasSuccess = isFn(success);
  1181. var hasFail = isFn(fail);
  1182. var hasComplete = isFn(complete);
  1183. Promise.resolve().then(function () {
  1184. if (typeof enabled === 'undefined') {
  1185. enabled = false;
  1186. cid = '';
  1187. cidErrMsg = 'uniPush is not enabled';
  1188. }
  1189. getPushCidCallbacks.push(function (cid, errMsg) {
  1190. var res;
  1191. if (cid) {
  1192. res = {
  1193. errMsg: 'getPushClientId:ok',
  1194. cid: cid
  1195. };
  1196. hasSuccess && success(res);
  1197. } else {
  1198. res = {
  1199. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  1200. };
  1201. hasFail && fail(res);
  1202. }
  1203. hasComplete && complete(res);
  1204. });
  1205. if (typeof cid !== 'undefined') {
  1206. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1207. }
  1208. });
  1209. }
  1210. var onPushMessageCallbacks = [];
  1211. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1212. var onPushMessage = function onPushMessage(fn) {
  1213. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1214. onPushMessageCallbacks.push(fn);
  1215. }
  1216. };
  1217. var offPushMessage = function offPushMessage(fn) {
  1218. if (!fn) {
  1219. onPushMessageCallbacks.length = 0;
  1220. } else {
  1221. var index = onPushMessageCallbacks.indexOf(fn);
  1222. if (index > -1) {
  1223. onPushMessageCallbacks.splice(index, 1);
  1224. }
  1225. }
  1226. };
  1227. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  1228. if (!baseInfo) {
  1229. baseInfo = wx.getSystemInfoSync();
  1230. }
  1231. var host = baseInfo ? baseInfo.host : null;
  1232. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  1233. var api = /*#__PURE__*/Object.freeze({
  1234. __proto__: null,
  1235. shareVideoMessage: shareVideoMessage,
  1236. getPushClientId: getPushClientId,
  1237. onPushMessage: onPushMessage,
  1238. offPushMessage: offPushMessage,
  1239. invokePushCallback: invokePushCallback
  1240. });
  1241. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1242. function findVmByVueId(vm, vuePid) {
  1243. var $children = vm.$children;
  1244. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1245. for (var i = $children.length - 1; i >= 0; i--) {
  1246. var childVm = $children[i];
  1247. if (childVm.$scope._$vueId === vuePid) {
  1248. return childVm;
  1249. }
  1250. }
  1251. // 反向递归查找
  1252. var parentVm;
  1253. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1254. parentVm = findVmByVueId($children[_i], vuePid);
  1255. if (parentVm) {
  1256. return parentVm;
  1257. }
  1258. }
  1259. }
  1260. function initBehavior(options) {
  1261. return Behavior(options);
  1262. }
  1263. function isPage() {
  1264. return !!this.route;
  1265. }
  1266. function initRelation(detail) {
  1267. this.triggerEvent('__l', detail);
  1268. }
  1269. function selectAllComponents(mpInstance, selector, $refs) {
  1270. var components = mpInstance.selectAllComponents(selector) || [];
  1271. components.forEach(function (component) {
  1272. var ref = component.dataset.ref;
  1273. $refs[ref] = component.$vm || toSkip(component);
  1274. {
  1275. if (component.dataset.vueGeneric === 'scoped') {
  1276. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1277. selectAllComponents(scopedComponent, selector, $refs);
  1278. });
  1279. }
  1280. }
  1281. });
  1282. }
  1283. function syncRefs(refs, newRefs) {
  1284. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  1285. var newKeys = Object.keys(newRefs);
  1286. newKeys.forEach(function (key) {
  1287. var oldValue = refs[key];
  1288. var newValue = newRefs[key];
  1289. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  1290. return oldValue.includes(value);
  1291. })) {
  1292. return;
  1293. }
  1294. refs[key] = newValue;
  1295. oldKeys.delete(key);
  1296. });
  1297. oldKeys.forEach(function (key) {
  1298. delete refs[key];
  1299. });
  1300. return refs;
  1301. }
  1302. function initRefs(vm) {
  1303. var mpInstance = vm.$scope;
  1304. var refs = {};
  1305. Object.defineProperty(vm, '$refs', {
  1306. get: function get() {
  1307. var $refs = {};
  1308. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1309. // TODO 暂不考虑 for 中的 scoped
  1310. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  1311. forComponents.forEach(function (component) {
  1312. var ref = component.dataset.ref;
  1313. if (!$refs[ref]) {
  1314. $refs[ref] = [];
  1315. }
  1316. $refs[ref].push(component.$vm || toSkip(component));
  1317. });
  1318. return syncRefs(refs, $refs);
  1319. }
  1320. });
  1321. }
  1322. function handleLink(event) {
  1323. var _ref3 = event.detail || event.value,
  1324. vuePid = _ref3.vuePid,
  1325. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  1326. var parentVm;
  1327. if (vuePid) {
  1328. parentVm = findVmByVueId(this.$vm, vuePid);
  1329. }
  1330. if (!parentVm) {
  1331. parentVm = this.$vm;
  1332. }
  1333. vueOptions.parent = parentVm;
  1334. }
  1335. function markMPComponent(component) {
  1336. // 在 Vue 中标记为小程序组件
  1337. var IS_MP = '__v_isMPComponent';
  1338. Object.defineProperty(component, IS_MP, {
  1339. configurable: true,
  1340. enumerable: false,
  1341. value: true
  1342. });
  1343. return component;
  1344. }
  1345. function toSkip(obj) {
  1346. var OB = '__ob__';
  1347. var SKIP = '__v_skip';
  1348. if (isObject(obj) && Object.isExtensible(obj)) {
  1349. // 避免被 @vue/composition-api 观测
  1350. Object.defineProperty(obj, OB, {
  1351. configurable: true,
  1352. enumerable: false,
  1353. value: (0, _defineProperty2.default)({}, SKIP, true)
  1354. });
  1355. }
  1356. return obj;
  1357. }
  1358. var WORKLET_RE = /_(.*)_worklet_factory_/;
  1359. function initWorkletMethods(mpMethods, vueMethods) {
  1360. if (vueMethods) {
  1361. Object.keys(vueMethods).forEach(function (name) {
  1362. var matches = name.match(WORKLET_RE);
  1363. if (matches) {
  1364. var workletName = matches[1];
  1365. mpMethods[name] = vueMethods[name];
  1366. mpMethods[workletName] = vueMethods[workletName];
  1367. }
  1368. });
  1369. }
  1370. }
  1371. var MPPage = Page;
  1372. var MPComponent = Component;
  1373. var customizeRE = /:/g;
  1374. var customize = cached(function (str) {
  1375. return camelize(str.replace(customizeRE, '-'));
  1376. });
  1377. function initTriggerEvent(mpInstance) {
  1378. var oldTriggerEvent = mpInstance.triggerEvent;
  1379. var newTriggerEvent = function newTriggerEvent(event) {
  1380. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  1381. args[_key3 - 1] = arguments[_key3];
  1382. }
  1383. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  1384. if (this.$vm || this.dataset && this.dataset.comType) {
  1385. event = customize(event);
  1386. } else {
  1387. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  1388. var newEvent = customize(event);
  1389. if (newEvent !== event) {
  1390. oldTriggerEvent.apply(this, [newEvent].concat(args));
  1391. }
  1392. }
  1393. return oldTriggerEvent.apply(this, [event].concat(args));
  1394. };
  1395. try {
  1396. // 京东小程序 triggerEvent 为只读
  1397. mpInstance.triggerEvent = newTriggerEvent;
  1398. } catch (error) {
  1399. mpInstance._triggerEvent = newTriggerEvent;
  1400. }
  1401. }
  1402. function initHook(name, options, isComponent) {
  1403. var oldHook = options[name];
  1404. options[name] = function () {
  1405. markMPComponent(this);
  1406. initTriggerEvent(this);
  1407. if (oldHook) {
  1408. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1409. args[_key4] = arguments[_key4];
  1410. }
  1411. return oldHook.apply(this, args);
  1412. }
  1413. };
  1414. }
  1415. if (!MPPage.__$wrappered) {
  1416. MPPage.__$wrappered = true;
  1417. Page = function Page() {
  1418. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1419. initHook('onLoad', options);
  1420. return MPPage(options);
  1421. };
  1422. Page.after = MPPage.after;
  1423. Component = function Component() {
  1424. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1425. initHook('created', options);
  1426. return MPComponent(options);
  1427. };
  1428. }
  1429. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  1430. function initMocks(vm, mocks) {
  1431. var mpInstance = vm.$mp[vm.mpType];
  1432. mocks.forEach(function (mock) {
  1433. if (hasOwn(mpInstance, mock)) {
  1434. vm[mock] = mpInstance[mock];
  1435. }
  1436. });
  1437. }
  1438. function hasHook(hook, vueOptions) {
  1439. if (!vueOptions) {
  1440. return true;
  1441. }
  1442. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1443. return true;
  1444. }
  1445. vueOptions = vueOptions.default || vueOptions;
  1446. if (isFn(vueOptions)) {
  1447. if (isFn(vueOptions.extendOptions[hook])) {
  1448. return true;
  1449. }
  1450. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  1451. return true;
  1452. }
  1453. return false;
  1454. }
  1455. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  1456. return true;
  1457. }
  1458. var mixins = vueOptions.mixins;
  1459. if (Array.isArray(mixins)) {
  1460. return !!mixins.find(function (mixin) {
  1461. return hasHook(hook, mixin);
  1462. });
  1463. }
  1464. }
  1465. function initHooks(mpOptions, hooks, vueOptions) {
  1466. hooks.forEach(function (hook) {
  1467. if (hasHook(hook, vueOptions)) {
  1468. mpOptions[hook] = function (args) {
  1469. return this.$vm && this.$vm.__call_hook(hook, args);
  1470. };
  1471. }
  1472. });
  1473. }
  1474. function initUnknownHooks(mpOptions, vueOptions) {
  1475. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1476. findHooks(vueOptions).forEach(function (hook) {
  1477. return initHook$1(mpOptions, hook, excludes);
  1478. });
  1479. }
  1480. function findHooks(vueOptions) {
  1481. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1482. if (vueOptions) {
  1483. Object.keys(vueOptions).forEach(function (name) {
  1484. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  1485. hooks.push(name);
  1486. }
  1487. });
  1488. }
  1489. return hooks;
  1490. }
  1491. function initHook$1(mpOptions, hook, excludes) {
  1492. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  1493. mpOptions[hook] = function (args) {
  1494. return this.$vm && this.$vm.__call_hook(hook, args);
  1495. };
  1496. }
  1497. }
  1498. function initVueComponent(Vue, vueOptions) {
  1499. vueOptions = vueOptions.default || vueOptions;
  1500. var VueComponent;
  1501. if (isFn(vueOptions)) {
  1502. VueComponent = vueOptions;
  1503. } else {
  1504. VueComponent = Vue.extend(vueOptions);
  1505. }
  1506. vueOptions = VueComponent.options;
  1507. return [VueComponent, vueOptions];
  1508. }
  1509. function initSlots(vm, vueSlots) {
  1510. if (Array.isArray(vueSlots) && vueSlots.length) {
  1511. var $slots = Object.create(null);
  1512. vueSlots.forEach(function (slotName) {
  1513. $slots[slotName] = true;
  1514. });
  1515. vm.$scopedSlots = vm.$slots = $slots;
  1516. }
  1517. }
  1518. function initVueIds(vueIds, mpInstance) {
  1519. vueIds = (vueIds || '').split(',');
  1520. var len = vueIds.length;
  1521. if (len === 1) {
  1522. mpInstance._$vueId = vueIds[0];
  1523. } else if (len === 2) {
  1524. mpInstance._$vueId = vueIds[0];
  1525. mpInstance._$vuePid = vueIds[1];
  1526. }
  1527. }
  1528. function initData(vueOptions, context) {
  1529. var data = vueOptions.data || {};
  1530. var methods = vueOptions.methods || {};
  1531. if (typeof data === 'function') {
  1532. try {
  1533. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1534. } catch (e) {
  1535. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"红沙湾管理端","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1536. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1537. }
  1538. }
  1539. } else {
  1540. try {
  1541. // 对 data 格式化
  1542. data = JSON.parse(JSON.stringify(data));
  1543. } catch (e) {}
  1544. }
  1545. if (!isPlainObject(data)) {
  1546. data = {};
  1547. }
  1548. Object.keys(methods).forEach(function (methodName) {
  1549. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1550. data[methodName] = methods[methodName];
  1551. }
  1552. });
  1553. return data;
  1554. }
  1555. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1556. function createObserver(name) {
  1557. return function observer(newVal, oldVal) {
  1558. if (this.$vm) {
  1559. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1560. }
  1561. };
  1562. }
  1563. function initBehaviors(vueOptions, initBehavior) {
  1564. var vueBehaviors = vueOptions.behaviors;
  1565. var vueExtends = vueOptions.extends;
  1566. var vueMixins = vueOptions.mixins;
  1567. var vueProps = vueOptions.props;
  1568. if (!vueProps) {
  1569. vueOptions.props = vueProps = [];
  1570. }
  1571. var behaviors = [];
  1572. if (Array.isArray(vueBehaviors)) {
  1573. vueBehaviors.forEach(function (behavior) {
  1574. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  1575. if (behavior === 'uni://form-field') {
  1576. if (Array.isArray(vueProps)) {
  1577. vueProps.push('name');
  1578. vueProps.push('value');
  1579. } else {
  1580. vueProps.name = {
  1581. type: String,
  1582. default: ''
  1583. };
  1584. vueProps.value = {
  1585. type: [String, Number, Boolean, Array, Object, Date],
  1586. default: ''
  1587. };
  1588. }
  1589. }
  1590. });
  1591. }
  1592. if (isPlainObject(vueExtends) && vueExtends.props) {
  1593. behaviors.push(initBehavior({
  1594. properties: initProperties(vueExtends.props, true)
  1595. }));
  1596. }
  1597. if (Array.isArray(vueMixins)) {
  1598. vueMixins.forEach(function (vueMixin) {
  1599. if (isPlainObject(vueMixin) && vueMixin.props) {
  1600. behaviors.push(initBehavior({
  1601. properties: initProperties(vueMixin.props, true)
  1602. }));
  1603. }
  1604. });
  1605. }
  1606. return behaviors;
  1607. }
  1608. function parsePropType(key, type, defaultValue, file) {
  1609. // [String]=>String
  1610. if (Array.isArray(type) && type.length === 1) {
  1611. return type[0];
  1612. }
  1613. return type;
  1614. }
  1615. function initProperties(props) {
  1616. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1617. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  1618. var options = arguments.length > 3 ? arguments[3] : undefined;
  1619. var properties = {};
  1620. if (!isBehavior) {
  1621. properties.vueId = {
  1622. type: String,
  1623. value: ''
  1624. };
  1625. {
  1626. if (options.virtualHost) {
  1627. properties.virtualHostStyle = {
  1628. type: null,
  1629. value: ''
  1630. };
  1631. properties.virtualHostClass = {
  1632. type: null,
  1633. value: ''
  1634. };
  1635. }
  1636. }
  1637. // scopedSlotsCompiler auto
  1638. properties.scopedSlotsCompiler = {
  1639. type: String,
  1640. value: ''
  1641. };
  1642. properties.vueSlots = {
  1643. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1644. type: null,
  1645. value: [],
  1646. observer: function observer(newVal, oldVal) {
  1647. var $slots = Object.create(null);
  1648. newVal.forEach(function (slotName) {
  1649. $slots[slotName] = true;
  1650. });
  1651. this.setData({
  1652. $slots: $slots
  1653. });
  1654. }
  1655. };
  1656. }
  1657. if (Array.isArray(props)) {
  1658. // ['title']
  1659. props.forEach(function (key) {
  1660. properties[key] = {
  1661. type: null,
  1662. observer: createObserver(key)
  1663. };
  1664. });
  1665. } else if (isPlainObject(props)) {
  1666. // {title:{type:String,default:''},content:String}
  1667. Object.keys(props).forEach(function (key) {
  1668. var opts = props[key];
  1669. if (isPlainObject(opts)) {
  1670. // title:{type:String,default:''}
  1671. var value = opts.default;
  1672. if (isFn(value)) {
  1673. value = value();
  1674. }
  1675. opts.type = parsePropType(key, opts.type);
  1676. properties[key] = {
  1677. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1678. value: value,
  1679. observer: createObserver(key)
  1680. };
  1681. } else {
  1682. // content:String
  1683. var type = parsePropType(key, opts);
  1684. properties[key] = {
  1685. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1686. observer: createObserver(key)
  1687. };
  1688. }
  1689. });
  1690. }
  1691. return properties;
  1692. }
  1693. function wrapper$1(event) {
  1694. // TODO 又得兼容 mpvue 的 mp 对象
  1695. try {
  1696. event.mp = JSON.parse(JSON.stringify(event));
  1697. } catch (e) {}
  1698. event.stopPropagation = noop;
  1699. event.preventDefault = noop;
  1700. event.target = event.target || {};
  1701. if (!hasOwn(event, 'detail')) {
  1702. event.detail = {};
  1703. }
  1704. if (hasOwn(event, 'markerId')) {
  1705. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  1706. event.detail.markerId = event.markerId;
  1707. }
  1708. if (isPlainObject(event.detail)) {
  1709. event.target = Object.assign({}, event.target, event.detail);
  1710. }
  1711. return event;
  1712. }
  1713. function getExtraValue(vm, dataPathsArray) {
  1714. var context = vm;
  1715. dataPathsArray.forEach(function (dataPathArray) {
  1716. var dataPath = dataPathArray[0];
  1717. var value = dataPathArray[2];
  1718. if (dataPath || typeof value !== 'undefined') {
  1719. // ['','',index,'disable']
  1720. var propPath = dataPathArray[1];
  1721. var valuePath = dataPathArray[3];
  1722. var vFor;
  1723. if (Number.isInteger(dataPath)) {
  1724. vFor = dataPath;
  1725. } else if (!dataPath) {
  1726. vFor = context;
  1727. } else if (typeof dataPath === 'string' && dataPath) {
  1728. if (dataPath.indexOf('#s#') === 0) {
  1729. vFor = dataPath.substr(3);
  1730. } else {
  1731. vFor = vm.__get_value(dataPath, context);
  1732. }
  1733. }
  1734. if (Number.isInteger(vFor)) {
  1735. context = value;
  1736. } else if (!propPath) {
  1737. context = vFor[value];
  1738. } else {
  1739. if (Array.isArray(vFor)) {
  1740. context = vFor.find(function (vForItem) {
  1741. return vm.__get_value(propPath, vForItem) === value;
  1742. });
  1743. } else if (isPlainObject(vFor)) {
  1744. context = Object.keys(vFor).find(function (vForKey) {
  1745. return vm.__get_value(propPath, vFor[vForKey]) === value;
  1746. });
  1747. } else {
  1748. console.error('v-for 暂不支持循环数据:', vFor);
  1749. }
  1750. }
  1751. if (valuePath) {
  1752. context = vm.__get_value(valuePath, context);
  1753. }
  1754. }
  1755. });
  1756. return context;
  1757. }
  1758. function processEventExtra(vm, extra, event, __args__) {
  1759. var extraObj = {};
  1760. if (Array.isArray(extra) && extra.length) {
  1761. /**
  1762. *[
  1763. * ['data.items', 'data.id', item.data.id],
  1764. * ['metas', 'id', meta.id]
  1765. *],
  1766. *[
  1767. * ['data.items', 'data.id', item.data.id],
  1768. * ['metas', 'id', meta.id]
  1769. *],
  1770. *'test'
  1771. */
  1772. extra.forEach(function (dataPath, index) {
  1773. if (typeof dataPath === 'string') {
  1774. if (!dataPath) {
  1775. // model,prop.sync
  1776. extraObj['$' + index] = vm;
  1777. } else {
  1778. if (dataPath === '$event') {
  1779. // $event
  1780. extraObj['$' + index] = event;
  1781. } else if (dataPath === 'arguments') {
  1782. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  1783. } else if (dataPath.indexOf('$event.') === 0) {
  1784. // $event.target.value
  1785. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1786. } else {
  1787. extraObj['$' + index] = vm.__get_value(dataPath);
  1788. }
  1789. }
  1790. } else {
  1791. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1792. }
  1793. });
  1794. }
  1795. return extraObj;
  1796. }
  1797. function getObjByArray(arr) {
  1798. var obj = {};
  1799. for (var i = 1; i < arr.length; i++) {
  1800. var element = arr[i];
  1801. obj[element[0]] = element[1];
  1802. }
  1803. return obj;
  1804. }
  1805. function processEventArgs(vm, event) {
  1806. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1807. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  1808. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  1809. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1810. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1811. // fixed 用户直接触发 mpInstance.triggerEvent
  1812. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  1813. if (isCustom) {
  1814. // 自定义事件
  1815. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  1816. if (!args.length) {
  1817. // 无参数,直接传入 event 或 detail 数组
  1818. if (isCustomMPEvent) {
  1819. return [event];
  1820. }
  1821. return __args__;
  1822. }
  1823. }
  1824. var extraObj = processEventExtra(vm, extra, event, __args__);
  1825. var ret = [];
  1826. args.forEach(function (arg) {
  1827. if (arg === '$event') {
  1828. if (methodName === '__set_model' && !isCustom) {
  1829. // input v-model value
  1830. ret.push(event.target.value);
  1831. } else {
  1832. if (isCustom && !isCustomMPEvent) {
  1833. ret.push(__args__[0]);
  1834. } else {
  1835. // wxcomponent 组件或内置组件
  1836. ret.push(event);
  1837. }
  1838. }
  1839. } else {
  1840. if (Array.isArray(arg) && arg[0] === 'o') {
  1841. ret.push(getObjByArray(arg));
  1842. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1843. ret.push(extraObj[arg]);
  1844. } else {
  1845. ret.push(arg);
  1846. }
  1847. }
  1848. });
  1849. return ret;
  1850. }
  1851. var ONCE = '~';
  1852. var CUSTOM = '^';
  1853. function isMatchEventType(eventType, optType) {
  1854. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  1855. }
  1856. function getContextVm(vm) {
  1857. var $parent = vm.$parent;
  1858. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1859. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1860. $parent = $parent.$parent;
  1861. }
  1862. return $parent && $parent.$parent;
  1863. }
  1864. function handleEvent(event) {
  1865. var _this2 = this;
  1866. event = wrapper$1(event);
  1867. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1868. var dataset = (event.currentTarget || event.target).dataset;
  1869. if (!dataset) {
  1870. return console.warn('事件信息不存在');
  1871. }
  1872. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1873. if (!eventOpts) {
  1874. return console.warn('事件信息不存在');
  1875. }
  1876. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1877. var eventType = event.type;
  1878. var ret = [];
  1879. eventOpts.forEach(function (eventOpt) {
  1880. var type = eventOpt[0];
  1881. var eventsArray = eventOpt[1];
  1882. var isCustom = type.charAt(0) === CUSTOM;
  1883. type = isCustom ? type.slice(1) : type;
  1884. var isOnce = type.charAt(0) === ONCE;
  1885. type = isOnce ? type.slice(1) : type;
  1886. if (eventsArray && isMatchEventType(eventType, type)) {
  1887. eventsArray.forEach(function (eventArray) {
  1888. var methodName = eventArray[0];
  1889. if (methodName) {
  1890. var handlerCtx = _this2.$vm;
  1891. if (handlerCtx.$options.generic) {
  1892. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1893. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1894. }
  1895. if (methodName === '$emit') {
  1896. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  1897. return;
  1898. }
  1899. var handler = handlerCtx[methodName];
  1900. if (!isFn(handler)) {
  1901. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  1902. var path = _this2.route || _this2.is;
  1903. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  1904. }
  1905. if (isOnce) {
  1906. if (handler.once) {
  1907. return;
  1908. }
  1909. handler.once = true;
  1910. }
  1911. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  1912. params = Array.isArray(params) ? params : [];
  1913. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1914. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  1915. // eslint-disable-next-line no-sparse-arrays
  1916. params = params.concat([,,,,,,,,,, event]);
  1917. }
  1918. ret.push(handler.apply(handlerCtx, params));
  1919. }
  1920. });
  1921. }
  1922. });
  1923. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  1924. return ret[0];
  1925. }
  1926. }
  1927. var eventChannels = {};
  1928. function getEventChannel(id) {
  1929. var eventChannel = eventChannels[id];
  1930. delete eventChannels[id];
  1931. return eventChannel;
  1932. }
  1933. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  1934. function initEventChannel() {
  1935. _vue.default.prototype.getOpenerEventChannel = function () {
  1936. // 微信小程序使用自身getOpenerEventChannel
  1937. {
  1938. return this.$scope.getOpenerEventChannel();
  1939. }
  1940. };
  1941. var callHook = _vue.default.prototype.__call_hook;
  1942. _vue.default.prototype.__call_hook = function (hook, args) {
  1943. if (hook === 'onLoad' && args && args.__id__) {
  1944. this.__eventChannel__ = getEventChannel(args.__id__);
  1945. delete args.__id__;
  1946. }
  1947. return callHook.call(this, hook, args);
  1948. };
  1949. }
  1950. function initScopedSlotsParams() {
  1951. var center = {};
  1952. var parents = {};
  1953. function currentId(fn) {
  1954. var vueIds = this.$options.propsData.vueId;
  1955. if (vueIds) {
  1956. var vueId = vueIds.split(',')[0];
  1957. fn(vueId);
  1958. }
  1959. }
  1960. _vue.default.prototype.$hasSSP = function (vueId) {
  1961. var slot = center[vueId];
  1962. if (!slot) {
  1963. parents[vueId] = this;
  1964. this.$on('hook:destroyed', function () {
  1965. delete parents[vueId];
  1966. });
  1967. }
  1968. return slot;
  1969. };
  1970. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  1971. var slot = center[vueId];
  1972. if (slot) {
  1973. var params = slot[name] || [];
  1974. if (needAll) {
  1975. return params;
  1976. }
  1977. return params[0];
  1978. }
  1979. };
  1980. _vue.default.prototype.$setSSP = function (name, value) {
  1981. var index = 0;
  1982. currentId.call(this, function (vueId) {
  1983. var slot = center[vueId];
  1984. var params = slot[name] = slot[name] || [];
  1985. params.push(value);
  1986. index = params.length - 1;
  1987. });
  1988. return index;
  1989. };
  1990. _vue.default.prototype.$initSSP = function () {
  1991. currentId.call(this, function (vueId) {
  1992. center[vueId] = {};
  1993. });
  1994. };
  1995. _vue.default.prototype.$callSSP = function () {
  1996. currentId.call(this, function (vueId) {
  1997. if (parents[vueId]) {
  1998. parents[vueId].$forceUpdate();
  1999. }
  2000. });
  2001. };
  2002. _vue.default.mixin({
  2003. destroyed: function destroyed() {
  2004. var propsData = this.$options.propsData;
  2005. var vueId = propsData && propsData.vueId;
  2006. if (vueId) {
  2007. delete center[vueId];
  2008. delete parents[vueId];
  2009. }
  2010. }
  2011. });
  2012. }
  2013. function parseBaseApp(vm, _ref4) {
  2014. var mocks = _ref4.mocks,
  2015. initRefs = _ref4.initRefs;
  2016. initEventChannel();
  2017. {
  2018. initScopedSlotsParams();
  2019. }
  2020. if (vm.$options.store) {
  2021. _vue.default.prototype.$store = vm.$options.store;
  2022. }
  2023. uniIdMixin(_vue.default);
  2024. _vue.default.prototype.mpHost = "mp-weixin";
  2025. _vue.default.mixin({
  2026. beforeCreate: function beforeCreate() {
  2027. if (!this.$options.mpType) {
  2028. return;
  2029. }
  2030. this.mpType = this.$options.mpType;
  2031. this.$mp = (0, _defineProperty2.default)({
  2032. data: {}
  2033. }, this.mpType, this.$options.mpInstance);
  2034. this.$scope = this.$options.mpInstance;
  2035. delete this.$options.mpType;
  2036. delete this.$options.mpInstance;
  2037. if (this.mpType === 'page' && typeof getApp === 'function') {
  2038. // hack vue-i18n
  2039. var app = getApp();
  2040. if (app.$vm && app.$vm.$i18n) {
  2041. this._i18n = app.$vm.$i18n;
  2042. }
  2043. }
  2044. if (this.mpType !== 'app') {
  2045. initRefs(this);
  2046. initMocks(this, mocks);
  2047. }
  2048. }
  2049. });
  2050. var appOptions = {
  2051. onLaunch: function onLaunch(args) {
  2052. if (this.$vm) {
  2053. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  2054. return;
  2055. }
  2056. {
  2057. if (wx.canIUse && !wx.canIUse('nextTick')) {
  2058. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  2059. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  2060. }
  2061. }
  2062. this.$vm = vm;
  2063. this.$vm.$mp = {
  2064. app: this
  2065. };
  2066. this.$vm.$scope = this;
  2067. // vm 上也挂载 globalData
  2068. this.$vm.globalData = this.globalData;
  2069. this.$vm._isMounted = true;
  2070. this.$vm.__call_hook('mounted', args);
  2071. this.$vm.__call_hook('onLaunch', args);
  2072. }
  2073. };
  2074. // 兼容旧版本 globalData
  2075. appOptions.globalData = vm.$options.globalData || {};
  2076. // 将 methods 中的方法挂在 getApp() 中
  2077. var methods = vm.$options.methods;
  2078. if (methods) {
  2079. Object.keys(methods).forEach(function (name) {
  2080. appOptions[name] = methods[name];
  2081. });
  2082. }
  2083. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  2084. initHooks(appOptions, hooks);
  2085. initUnknownHooks(appOptions, vm.$options);
  2086. return appOptions;
  2087. }
  2088. function parseApp(vm) {
  2089. return parseBaseApp(vm, {
  2090. mocks: mocks,
  2091. initRefs: initRefs
  2092. });
  2093. }
  2094. function createApp(vm) {
  2095. App(parseApp(vm));
  2096. return vm;
  2097. }
  2098. var encodeReserveRE = /[!'()*]/g;
  2099. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  2100. return '%' + c.charCodeAt(0).toString(16);
  2101. };
  2102. var commaRE = /%2C/g;
  2103. // fixed encodeURIComponent which is more conformant to RFC3986:
  2104. // - escapes [!'()*]
  2105. // - preserve commas
  2106. var encode = function encode(str) {
  2107. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  2108. };
  2109. function stringifyQuery(obj) {
  2110. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  2111. var res = obj ? Object.keys(obj).map(function (key) {
  2112. var val = obj[key];
  2113. if (val === undefined) {
  2114. return '';
  2115. }
  2116. if (val === null) {
  2117. return encodeStr(key);
  2118. }
  2119. if (Array.isArray(val)) {
  2120. var result = [];
  2121. val.forEach(function (val2) {
  2122. if (val2 === undefined) {
  2123. return;
  2124. }
  2125. if (val2 === null) {
  2126. result.push(encodeStr(key));
  2127. } else {
  2128. result.push(encodeStr(key) + '=' + encodeStr(val2));
  2129. }
  2130. });
  2131. return result.join('&');
  2132. }
  2133. return encodeStr(key) + '=' + encodeStr(val);
  2134. }).filter(function (x) {
  2135. return x.length > 0;
  2136. }).join('&') : null;
  2137. return res ? "?".concat(res) : '';
  2138. }
  2139. function parseBaseComponent(vueComponentOptions) {
  2140. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  2141. isPage = _ref5.isPage,
  2142. initRelation = _ref5.initRelation;
  2143. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  2144. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  2145. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  2146. VueComponent = _initVueComponent2[0],
  2147. vueOptions = _initVueComponent2[1];
  2148. var options = _objectSpread({
  2149. multipleSlots: true,
  2150. // styleIsolation: 'apply-shared',
  2151. addGlobalClass: true
  2152. }, vueOptions.options || {});
  2153. {
  2154. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  2155. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  2156. Object.assign(options, vueOptions['mp-weixin'].options);
  2157. }
  2158. }
  2159. var componentOptions = {
  2160. options: options,
  2161. data: initData(vueOptions, _vue.default.prototype),
  2162. behaviors: initBehaviors(vueOptions, initBehavior),
  2163. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  2164. lifetimes: {
  2165. attached: function attached() {
  2166. var properties = this.properties;
  2167. var options = {
  2168. mpType: isPage.call(this) ? 'page' : 'component',
  2169. mpInstance: this,
  2170. propsData: properties
  2171. };
  2172. initVueIds(properties.vueId, this);
  2173. // 处理父子关系
  2174. initRelation.call(this, {
  2175. vuePid: this._$vuePid,
  2176. vueOptions: options
  2177. });
  2178. // 初始化 vue 实例
  2179. this.$vm = new VueComponent(options);
  2180. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  2181. initSlots(this.$vm, properties.vueSlots);
  2182. // 触发首次 setData
  2183. this.$vm.$mount();
  2184. },
  2185. ready: function ready() {
  2186. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  2187. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  2188. if (this.$vm) {
  2189. this.$vm._isMounted = true;
  2190. this.$vm.__call_hook('mounted');
  2191. this.$vm.__call_hook('onReady');
  2192. }
  2193. },
  2194. detached: function detached() {
  2195. this.$vm && this.$vm.$destroy();
  2196. }
  2197. },
  2198. pageLifetimes: {
  2199. show: function show(args) {
  2200. this.$vm && this.$vm.__call_hook('onPageShow', args);
  2201. },
  2202. hide: function hide() {
  2203. this.$vm && this.$vm.__call_hook('onPageHide');
  2204. },
  2205. resize: function resize(size) {
  2206. this.$vm && this.$vm.__call_hook('onPageResize', size);
  2207. }
  2208. },
  2209. methods: {
  2210. __l: handleLink,
  2211. __e: handleEvent
  2212. }
  2213. };
  2214. // externalClasses
  2215. if (vueOptions.externalClasses) {
  2216. componentOptions.externalClasses = vueOptions.externalClasses;
  2217. }
  2218. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2219. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2220. componentOptions.methods[callMethod] = function (args) {
  2221. return this.$vm[callMethod](args);
  2222. };
  2223. });
  2224. }
  2225. if (needVueOptions) {
  2226. return [componentOptions, vueOptions, VueComponent];
  2227. }
  2228. if (isPage) {
  2229. return componentOptions;
  2230. }
  2231. return [componentOptions, VueComponent];
  2232. }
  2233. function parseComponent(vueComponentOptions, needVueOptions) {
  2234. return parseBaseComponent(vueComponentOptions, {
  2235. isPage: isPage,
  2236. initRelation: initRelation
  2237. }, needVueOptions);
  2238. }
  2239. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  2240. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  2241. function parseBasePage(vuePageOptions) {
  2242. var _parseComponent = parseComponent(vuePageOptions, true),
  2243. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  2244. pageOptions = _parseComponent2[0],
  2245. vueOptions = _parseComponent2[1];
  2246. initHooks(pageOptions.methods, hooks$1, vueOptions);
  2247. pageOptions.methods.onLoad = function (query) {
  2248. this.options = query;
  2249. var copyQuery = Object.assign({}, query);
  2250. delete copyQuery.__id__;
  2251. this.$page = {
  2252. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  2253. };
  2254. this.$vm.$mp.query = query; // 兼容 mpvue
  2255. this.$vm.__call_hook('onLoad', query);
  2256. };
  2257. {
  2258. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  2259. }
  2260. {
  2261. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  2262. }
  2263. return pageOptions;
  2264. }
  2265. function parsePage(vuePageOptions) {
  2266. return parseBasePage(vuePageOptions);
  2267. }
  2268. function createPage(vuePageOptions) {
  2269. {
  2270. return Component(parsePage(vuePageOptions));
  2271. }
  2272. }
  2273. function createComponent(vueOptions) {
  2274. {
  2275. return Component(parseComponent(vueOptions));
  2276. }
  2277. }
  2278. function createSubpackageApp(vm) {
  2279. var appOptions = parseApp(vm);
  2280. var app = getApp({
  2281. allowDefault: true
  2282. });
  2283. vm.$scope = app;
  2284. var globalData = app.globalData;
  2285. if (globalData) {
  2286. Object.keys(appOptions.globalData).forEach(function (name) {
  2287. if (!hasOwn(globalData, name)) {
  2288. globalData[name] = appOptions.globalData[name];
  2289. }
  2290. });
  2291. }
  2292. Object.keys(appOptions).forEach(function (name) {
  2293. if (!hasOwn(app, name)) {
  2294. app[name] = appOptions[name];
  2295. }
  2296. });
  2297. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2298. wx.onAppShow(function () {
  2299. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2300. args[_key5] = arguments[_key5];
  2301. }
  2302. vm.__call_hook('onShow', args);
  2303. });
  2304. }
  2305. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2306. wx.onAppHide(function () {
  2307. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2308. args[_key6] = arguments[_key6];
  2309. }
  2310. vm.__call_hook('onHide', args);
  2311. });
  2312. }
  2313. if (isFn(appOptions.onLaunch)) {
  2314. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2315. vm.__call_hook('onLaunch', args);
  2316. }
  2317. return vm;
  2318. }
  2319. function createPlugin(vm) {
  2320. var appOptions = parseApp(vm);
  2321. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2322. wx.onAppShow(function () {
  2323. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2324. args[_key7] = arguments[_key7];
  2325. }
  2326. vm.__call_hook('onShow', args);
  2327. });
  2328. }
  2329. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2330. wx.onAppHide(function () {
  2331. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2332. args[_key8] = arguments[_key8];
  2333. }
  2334. vm.__call_hook('onHide', args);
  2335. });
  2336. }
  2337. if (isFn(appOptions.onLaunch)) {
  2338. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2339. vm.__call_hook('onLaunch', args);
  2340. }
  2341. return vm;
  2342. }
  2343. todos.forEach(function (todoApi) {
  2344. protocols[todoApi] = false;
  2345. });
  2346. canIUses.forEach(function (canIUseApi) {
  2347. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  2348. if (!wx.canIUse(apiName)) {
  2349. protocols[canIUseApi] = false;
  2350. }
  2351. });
  2352. var uni = {};
  2353. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2354. uni = new Proxy({}, {
  2355. get: function get(target, name) {
  2356. if (hasOwn(target, name)) {
  2357. return target[name];
  2358. }
  2359. if (baseApi[name]) {
  2360. return baseApi[name];
  2361. }
  2362. if (api[name]) {
  2363. return promisify(name, api[name]);
  2364. }
  2365. {
  2366. if (extraApi[name]) {
  2367. return promisify(name, extraApi[name]);
  2368. }
  2369. if (todoApis[name]) {
  2370. return promisify(name, todoApis[name]);
  2371. }
  2372. }
  2373. if (eventApi[name]) {
  2374. return eventApi[name];
  2375. }
  2376. return promisify(name, wrapper(name, wx[name]));
  2377. },
  2378. set: function set(target, name, value) {
  2379. target[name] = value;
  2380. return true;
  2381. }
  2382. });
  2383. } else {
  2384. Object.keys(baseApi).forEach(function (name) {
  2385. uni[name] = baseApi[name];
  2386. });
  2387. {
  2388. Object.keys(todoApis).forEach(function (name) {
  2389. uni[name] = promisify(name, todoApis[name]);
  2390. });
  2391. Object.keys(extraApi).forEach(function (name) {
  2392. uni[name] = promisify(name, extraApi[name]);
  2393. });
  2394. }
  2395. Object.keys(eventApi).forEach(function (name) {
  2396. uni[name] = eventApi[name];
  2397. });
  2398. Object.keys(api).forEach(function (name) {
  2399. uni[name] = promisify(name, api[name]);
  2400. });
  2401. Object.keys(wx).forEach(function (name) {
  2402. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2403. uni[name] = promisify(name, wrapper(name, wx[name]));
  2404. }
  2405. });
  2406. }
  2407. wx.createApp = createApp;
  2408. wx.createPage = createPage;
  2409. wx.createComponent = createComponent;
  2410. wx.createSubpackageApp = createSubpackageApp;
  2411. wx.createPlugin = createPlugin;
  2412. var uni$1 = uni;
  2413. var _default = uni$1;
  2414. exports.default = _default;
  2415. /* 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)))
  2416. /***/ }),
  2417. /* 3 */
  2418. /*!***********************************!*\
  2419. !*** (webpack)/buildin/global.js ***!
  2420. \***********************************/
  2421. /*! no static exports found */
  2422. /***/ (function(module, exports) {
  2423. var g;
  2424. // This works in non-strict mode
  2425. g = (function() {
  2426. return this;
  2427. })();
  2428. try {
  2429. // This works if eval is allowed (see CSP)
  2430. g = g || new Function("return this")();
  2431. } catch (e) {
  2432. // This works if the window reference is available
  2433. if (typeof window === "object") g = window;
  2434. }
  2435. // g can still be undefined, but nothing to do about it...
  2436. // We return undefined, instead of nothing here, so it's
  2437. // easier to handle this case. if(!global) { ...}
  2438. module.exports = g;
  2439. /***/ }),
  2440. /* 4 */
  2441. /*!**********************************************************************!*\
  2442. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  2443. \**********************************************************************/
  2444. /*! no static exports found */
  2445. /***/ (function(module, exports) {
  2446. function _interopRequireDefault(obj) {
  2447. return obj && obj.__esModule ? obj : {
  2448. "default": obj
  2449. };
  2450. }
  2451. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2452. /***/ }),
  2453. /* 5 */
  2454. /*!**************************************************************!*\
  2455. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  2456. \**************************************************************/
  2457. /*! no static exports found */
  2458. /***/ (function(module, exports, __webpack_require__) {
  2459. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  2460. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  2461. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  2462. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  2463. function _slicedToArray(arr, i) {
  2464. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  2465. }
  2466. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2467. /***/ }),
  2468. /* 6 */
  2469. /*!***************************************************************!*\
  2470. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  2471. \***************************************************************/
  2472. /*! no static exports found */
  2473. /***/ (function(module, exports) {
  2474. function _arrayWithHoles(arr) {
  2475. if (Array.isArray(arr)) return arr;
  2476. }
  2477. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2478. /***/ }),
  2479. /* 7 */
  2480. /*!*********************************************************************!*\
  2481. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  2482. \*********************************************************************/
  2483. /*! no static exports found */
  2484. /***/ (function(module, exports) {
  2485. function _iterableToArrayLimit(r, l) {
  2486. var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  2487. if (null != t) {
  2488. var e,
  2489. n,
  2490. i,
  2491. u,
  2492. a = [],
  2493. f = !0,
  2494. o = !1;
  2495. try {
  2496. if (i = (t = t.call(r)).next, 0 === l) {
  2497. if (Object(t) !== t) return;
  2498. f = !1;
  2499. } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) {
  2500. ;
  2501. }
  2502. } catch (r) {
  2503. o = !0, n = r;
  2504. } finally {
  2505. try {
  2506. if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
  2507. } finally {
  2508. if (o) throw n;
  2509. }
  2510. }
  2511. return a;
  2512. }
  2513. }
  2514. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2515. /***/ }),
  2516. /* 8 */
  2517. /*!***************************************************************************!*\
  2518. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  2519. \***************************************************************************/
  2520. /*! no static exports found */
  2521. /***/ (function(module, exports, __webpack_require__) {
  2522. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  2523. function _unsupportedIterableToArray(o, minLen) {
  2524. if (!o) return;
  2525. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  2526. var n = Object.prototype.toString.call(o).slice(8, -1);
  2527. if (n === "Object" && o.constructor) n = o.constructor.name;
  2528. if (n === "Map" || n === "Set") return Array.from(o);
  2529. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  2530. }
  2531. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2532. /***/ }),
  2533. /* 9 */
  2534. /*!*****************************************************************!*\
  2535. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  2536. \*****************************************************************/
  2537. /*! no static exports found */
  2538. /***/ (function(module, exports) {
  2539. function _arrayLikeToArray(arr, len) {
  2540. if (len == null || len > arr.length) len = arr.length;
  2541. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  2542. arr2[i] = arr[i];
  2543. }
  2544. return arr2;
  2545. }
  2546. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2547. /***/ }),
  2548. /* 10 */
  2549. /*!****************************************************************!*\
  2550. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  2551. \****************************************************************/
  2552. /*! no static exports found */
  2553. /***/ (function(module, exports) {
  2554. function _nonIterableRest() {
  2555. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2556. }
  2557. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2558. /***/ }),
  2559. /* 11 */
  2560. /*!***************************************************************!*\
  2561. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  2562. \***************************************************************/
  2563. /*! no static exports found */
  2564. /***/ (function(module, exports, __webpack_require__) {
  2565. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  2566. function _defineProperty(obj, key, value) {
  2567. key = toPropertyKey(key);
  2568. if (key in obj) {
  2569. Object.defineProperty(obj, key, {
  2570. value: value,
  2571. enumerable: true,
  2572. configurable: true,
  2573. writable: true
  2574. });
  2575. } else {
  2576. obj[key] = value;
  2577. }
  2578. return obj;
  2579. }
  2580. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2581. /***/ }),
  2582. /* 12 */
  2583. /*!**************************************************************!*\
  2584. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  2585. \**************************************************************/
  2586. /*! no static exports found */
  2587. /***/ (function(module, exports, __webpack_require__) {
  2588. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  2589. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  2590. function toPropertyKey(t) {
  2591. var i = toPrimitive(t, "string");
  2592. return "symbol" == _typeof(i) ? i : i + "";
  2593. }
  2594. module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2595. /***/ }),
  2596. /* 13 */
  2597. /*!*******************************************************!*\
  2598. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  2599. \*******************************************************/
  2600. /*! no static exports found */
  2601. /***/ (function(module, exports) {
  2602. function _typeof(o) {
  2603. "@babel/helpers - typeof";
  2604. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
  2605. return typeof o;
  2606. } : function (o) {
  2607. return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  2608. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
  2609. }
  2610. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2611. /***/ }),
  2612. /* 14 */
  2613. /*!************************************************************!*\
  2614. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  2615. \************************************************************/
  2616. /*! no static exports found */
  2617. /***/ (function(module, exports, __webpack_require__) {
  2618. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  2619. function toPrimitive(t, r) {
  2620. if ("object" != _typeof(t) || !t) return t;
  2621. var e = t[Symbol.toPrimitive];
  2622. if (void 0 !== e) {
  2623. var i = e.call(t, r || "default");
  2624. if ("object" != _typeof(i)) return i;
  2625. throw new TypeError("@@toPrimitive must return a primitive value.");
  2626. }
  2627. return ("string" === r ? String : Number)(t);
  2628. }
  2629. module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2630. /***/ }),
  2631. /* 15 */
  2632. /*!**********************************************************!*\
  2633. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  2634. \**********************************************************/
  2635. /*! no static exports found */
  2636. /***/ (function(module, exports, __webpack_require__) {
  2637. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  2638. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  2639. function _construct(t, e, r) {
  2640. if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
  2641. var o = [null];
  2642. o.push.apply(o, e);
  2643. var p = new (t.bind.apply(t, o))();
  2644. return r && setPrototypeOf(p, r.prototype), p;
  2645. }
  2646. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2647. /***/ }),
  2648. /* 16 */
  2649. /*!***************************************************************!*\
  2650. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  2651. \***************************************************************/
  2652. /*! no static exports found */
  2653. /***/ (function(module, exports) {
  2654. function _setPrototypeOf(o, p) {
  2655. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2656. o.__proto__ = p;
  2657. return o;
  2658. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2659. return _setPrototypeOf(o, p);
  2660. }
  2661. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2662. /***/ }),
  2663. /* 17 */
  2664. /*!*************************************************************************!*\
  2665. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  2666. \*************************************************************************/
  2667. /*! no static exports found */
  2668. /***/ (function(module, exports) {
  2669. function _isNativeReflectConstruct() {
  2670. try {
  2671. var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  2672. } catch (t) {}
  2673. return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() {
  2674. return !!t;
  2675. }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
  2676. }
  2677. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2678. /***/ }),
  2679. /* 18 */
  2680. /*!******************************************************************!*\
  2681. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  2682. \******************************************************************/
  2683. /*! no static exports found */
  2684. /***/ (function(module, exports, __webpack_require__) {
  2685. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  2686. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  2687. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  2688. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  2689. function _toConsumableArray(arr) {
  2690. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  2691. }
  2692. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2693. /***/ }),
  2694. /* 19 */
  2695. /*!******************************************************************!*\
  2696. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  2697. \******************************************************************/
  2698. /*! no static exports found */
  2699. /***/ (function(module, exports, __webpack_require__) {
  2700. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  2701. function _arrayWithoutHoles(arr) {
  2702. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  2703. }
  2704. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2705. /***/ }),
  2706. /* 20 */
  2707. /*!****************************************************************!*\
  2708. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  2709. \****************************************************************/
  2710. /*! no static exports found */
  2711. /***/ (function(module, exports) {
  2712. function _iterableToArray(iter) {
  2713. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  2714. }
  2715. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2716. /***/ }),
  2717. /* 21 */
  2718. /*!******************************************************************!*\
  2719. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  2720. \******************************************************************/
  2721. /*! no static exports found */
  2722. /***/ (function(module, exports) {
  2723. function _nonIterableSpread() {
  2724. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2725. }
  2726. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2727. /***/ }),
  2728. /* 22 */
  2729. /*!*************************************************************!*\
  2730. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  2731. \*************************************************************/
  2732. /*! no static exports found */
  2733. /***/ (function(module, exports, __webpack_require__) {
  2734. "use strict";
  2735. /* WEBPACK VAR INJECTION */(function(uni, global) {
  2736. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2737. Object.defineProperty(exports, "__esModule", {
  2738. value: true
  2739. });
  2740. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  2741. exports.compileI18nJsonStr = compileI18nJsonStr;
  2742. exports.hasI18nJson = hasI18nJson;
  2743. exports.initVueI18n = initVueI18n;
  2744. exports.isI18nStr = isI18nStr;
  2745. exports.isString = void 0;
  2746. exports.normalizeLocale = normalizeLocale;
  2747. exports.parseI18nJson = parseI18nJson;
  2748. exports.resolveLocale = resolveLocale;
  2749. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  2750. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  2751. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  2752. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2753. var isObject = function isObject(val) {
  2754. return val !== null && (0, _typeof2.default)(val) === 'object';
  2755. };
  2756. var defaultDelimiters = ['{', '}'];
  2757. var BaseFormatter = /*#__PURE__*/function () {
  2758. function BaseFormatter() {
  2759. (0, _classCallCheck2.default)(this, BaseFormatter);
  2760. this._caches = Object.create(null);
  2761. }
  2762. (0, _createClass2.default)(BaseFormatter, [{
  2763. key: "interpolate",
  2764. value: function interpolate(message, values) {
  2765. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  2766. if (!values) {
  2767. return [message];
  2768. }
  2769. var tokens = this._caches[message];
  2770. if (!tokens) {
  2771. tokens = parse(message, delimiters);
  2772. this._caches[message] = tokens;
  2773. }
  2774. return compile(tokens, values);
  2775. }
  2776. }]);
  2777. return BaseFormatter;
  2778. }();
  2779. exports.Formatter = BaseFormatter;
  2780. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2781. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2782. function parse(format, _ref) {
  2783. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  2784. startDelimiter = _ref2[0],
  2785. endDelimiter = _ref2[1];
  2786. var tokens = [];
  2787. var position = 0;
  2788. var text = '';
  2789. while (position < format.length) {
  2790. var char = format[position++];
  2791. if (char === startDelimiter) {
  2792. if (text) {
  2793. tokens.push({
  2794. type: 'text',
  2795. value: text
  2796. });
  2797. }
  2798. text = '';
  2799. var sub = '';
  2800. char = format[position++];
  2801. while (char !== undefined && char !== endDelimiter) {
  2802. sub += char;
  2803. char = format[position++];
  2804. }
  2805. var isClosed = char === endDelimiter;
  2806. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  2807. tokens.push({
  2808. value: sub,
  2809. type: type
  2810. });
  2811. }
  2812. // else if (char === '%') {
  2813. // // when found rails i18n syntax, skip text capture
  2814. // if (format[position] !== '{') {
  2815. // text += char
  2816. // }
  2817. // }
  2818. else {
  2819. text += char;
  2820. }
  2821. }
  2822. text && tokens.push({
  2823. type: 'text',
  2824. value: text
  2825. });
  2826. return tokens;
  2827. }
  2828. function compile(tokens, values) {
  2829. var compiled = [];
  2830. var index = 0;
  2831. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  2832. if (mode === 'unknown') {
  2833. return compiled;
  2834. }
  2835. while (index < tokens.length) {
  2836. var token = tokens[index];
  2837. switch (token.type) {
  2838. case 'text':
  2839. compiled.push(token.value);
  2840. break;
  2841. case 'list':
  2842. compiled.push(values[parseInt(token.value, 10)]);
  2843. break;
  2844. case 'named':
  2845. if (mode === 'named') {
  2846. compiled.push(values[token.value]);
  2847. } else {
  2848. if (true) {
  2849. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  2850. }
  2851. }
  2852. break;
  2853. case 'unknown':
  2854. if (true) {
  2855. console.warn("Detect 'unknown' type of token!");
  2856. }
  2857. break;
  2858. }
  2859. index++;
  2860. }
  2861. return compiled;
  2862. }
  2863. var LOCALE_ZH_HANS = 'zh-Hans';
  2864. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  2865. var LOCALE_ZH_HANT = 'zh-Hant';
  2866. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  2867. var LOCALE_EN = 'en';
  2868. exports.LOCALE_EN = LOCALE_EN;
  2869. var LOCALE_FR = 'fr';
  2870. exports.LOCALE_FR = LOCALE_FR;
  2871. var LOCALE_ES = 'es';
  2872. exports.LOCALE_ES = LOCALE_ES;
  2873. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2874. var hasOwn = function hasOwn(val, key) {
  2875. return hasOwnProperty.call(val, key);
  2876. };
  2877. var defaultFormatter = new BaseFormatter();
  2878. function include(str, parts) {
  2879. return !!parts.find(function (part) {
  2880. return str.indexOf(part) !== -1;
  2881. });
  2882. }
  2883. function startsWith(str, parts) {
  2884. return parts.find(function (part) {
  2885. return str.indexOf(part) === 0;
  2886. });
  2887. }
  2888. function normalizeLocale(locale, messages) {
  2889. if (!locale) {
  2890. return;
  2891. }
  2892. locale = locale.trim().replace(/_/g, '-');
  2893. if (messages && messages[locale]) {
  2894. return locale;
  2895. }
  2896. locale = locale.toLowerCase();
  2897. if (locale === 'chinese') {
  2898. // 支付宝
  2899. return LOCALE_ZH_HANS;
  2900. }
  2901. if (locale.indexOf('zh') === 0) {
  2902. if (locale.indexOf('-hans') > -1) {
  2903. return LOCALE_ZH_HANS;
  2904. }
  2905. if (locale.indexOf('-hant') > -1) {
  2906. return LOCALE_ZH_HANT;
  2907. }
  2908. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2909. return LOCALE_ZH_HANT;
  2910. }
  2911. return LOCALE_ZH_HANS;
  2912. }
  2913. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  2914. if (messages && Object.keys(messages).length > 0) {
  2915. locales = Object.keys(messages);
  2916. }
  2917. var lang = startsWith(locale, locales);
  2918. if (lang) {
  2919. return lang;
  2920. }
  2921. }
  2922. var I18n = /*#__PURE__*/function () {
  2923. function I18n(_ref3) {
  2924. var locale = _ref3.locale,
  2925. fallbackLocale = _ref3.fallbackLocale,
  2926. messages = _ref3.messages,
  2927. watcher = _ref3.watcher,
  2928. formater = _ref3.formater;
  2929. (0, _classCallCheck2.default)(this, I18n);
  2930. this.locale = LOCALE_EN;
  2931. this.fallbackLocale = LOCALE_EN;
  2932. this.message = {};
  2933. this.messages = {};
  2934. this.watchers = [];
  2935. if (fallbackLocale) {
  2936. this.fallbackLocale = fallbackLocale;
  2937. }
  2938. this.formater = formater || defaultFormatter;
  2939. this.messages = messages || {};
  2940. this.setLocale(locale || LOCALE_EN);
  2941. if (watcher) {
  2942. this.watchLocale(watcher);
  2943. }
  2944. }
  2945. (0, _createClass2.default)(I18n, [{
  2946. key: "setLocale",
  2947. value: function setLocale(locale) {
  2948. var _this = this;
  2949. var oldLocale = this.locale;
  2950. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  2951. if (!this.messages[this.locale]) {
  2952. // 可能初始化时不存在
  2953. this.messages[this.locale] = {};
  2954. }
  2955. this.message = this.messages[this.locale];
  2956. // 仅发生变化时,通知
  2957. if (oldLocale !== this.locale) {
  2958. this.watchers.forEach(function (watcher) {
  2959. watcher(_this.locale, oldLocale);
  2960. });
  2961. }
  2962. }
  2963. }, {
  2964. key: "getLocale",
  2965. value: function getLocale() {
  2966. return this.locale;
  2967. }
  2968. }, {
  2969. key: "watchLocale",
  2970. value: function watchLocale(fn) {
  2971. var _this2 = this;
  2972. var index = this.watchers.push(fn) - 1;
  2973. return function () {
  2974. _this2.watchers.splice(index, 1);
  2975. };
  2976. }
  2977. }, {
  2978. key: "add",
  2979. value: function add(locale, message) {
  2980. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2981. var curMessages = this.messages[locale];
  2982. if (curMessages) {
  2983. if (override) {
  2984. Object.assign(curMessages, message);
  2985. } else {
  2986. Object.keys(message).forEach(function (key) {
  2987. if (!hasOwn(curMessages, key)) {
  2988. curMessages[key] = message[key];
  2989. }
  2990. });
  2991. }
  2992. } else {
  2993. this.messages[locale] = message;
  2994. }
  2995. }
  2996. }, {
  2997. key: "f",
  2998. value: function f(message, values, delimiters) {
  2999. return this.formater.interpolate(message, values, delimiters).join('');
  3000. }
  3001. }, {
  3002. key: "t",
  3003. value: function t(key, locale, values) {
  3004. var message = this.message;
  3005. if (typeof locale === 'string') {
  3006. locale = normalizeLocale(locale, this.messages);
  3007. locale && (message = this.messages[locale]);
  3008. } else {
  3009. values = locale;
  3010. }
  3011. if (!hasOwn(message, key)) {
  3012. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  3013. return key;
  3014. }
  3015. return this.formater.interpolate(message[key], values).join('');
  3016. }
  3017. }]);
  3018. return I18n;
  3019. }();
  3020. exports.I18n = I18n;
  3021. function watchAppLocale(appVm, i18n) {
  3022. // 需要保证 watch 的触发在组件渲染之前
  3023. if (appVm.$watchLocale) {
  3024. // vue2
  3025. appVm.$watchLocale(function (newLocale) {
  3026. i18n.setLocale(newLocale);
  3027. });
  3028. } else {
  3029. appVm.$watch(function () {
  3030. return appVm.$locale;
  3031. }, function (newLocale) {
  3032. i18n.setLocale(newLocale);
  3033. });
  3034. }
  3035. }
  3036. function getDefaultLocale() {
  3037. if (typeof uni !== 'undefined' && uni.getLocale) {
  3038. return uni.getLocale();
  3039. }
  3040. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  3041. if (typeof global !== 'undefined' && global.getLocale) {
  3042. return global.getLocale();
  3043. }
  3044. return LOCALE_EN;
  3045. }
  3046. function initVueI18n(locale) {
  3047. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3048. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  3049. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  3050. // 兼容旧版本入参
  3051. if (typeof locale !== 'string') {
  3052. var _ref4 = [messages, locale];
  3053. locale = _ref4[0];
  3054. messages = _ref4[1];
  3055. }
  3056. if (typeof locale !== 'string') {
  3057. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  3058. locale = getDefaultLocale();
  3059. }
  3060. if (typeof fallbackLocale !== 'string') {
  3061. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  3062. }
  3063. var i18n = new I18n({
  3064. locale: locale,
  3065. fallbackLocale: fallbackLocale,
  3066. messages: messages,
  3067. watcher: watcher
  3068. });
  3069. var _t = function t(key, values) {
  3070. if (typeof getApp !== 'function') {
  3071. // app view
  3072. /* eslint-disable no-func-assign */
  3073. _t = function t(key, values) {
  3074. return i18n.t(key, values);
  3075. };
  3076. } else {
  3077. var isWatchedAppLocale = false;
  3078. _t = function t(key, values) {
  3079. var appVm = getApp().$vm;
  3080. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  3081. // options: {
  3082. // type: Array,
  3083. // default () {
  3084. // return [{
  3085. // icon: 'shop',
  3086. // text: t("uni-goods-nav.options.shop"),
  3087. // }, {
  3088. // icon: 'cart',
  3089. // text: t("uni-goods-nav.options.cart")
  3090. // }]
  3091. // }
  3092. // },
  3093. if (appVm) {
  3094. // 触发响应式
  3095. appVm.$locale;
  3096. if (!isWatchedAppLocale) {
  3097. isWatchedAppLocale = true;
  3098. watchAppLocale(appVm, i18n);
  3099. }
  3100. }
  3101. return i18n.t(key, values);
  3102. };
  3103. }
  3104. return _t(key, values);
  3105. };
  3106. return {
  3107. i18n: i18n,
  3108. f: function f(message, values, delimiters) {
  3109. return i18n.f(message, values, delimiters);
  3110. },
  3111. t: function t(key, values) {
  3112. return _t(key, values);
  3113. },
  3114. add: function add(locale, message) {
  3115. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  3116. return i18n.add(locale, message, override);
  3117. },
  3118. watch: function watch(fn) {
  3119. return i18n.watchLocale(fn);
  3120. },
  3121. getLocale: function getLocale() {
  3122. return i18n.getLocale();
  3123. },
  3124. setLocale: function setLocale(newLocale) {
  3125. return i18n.setLocale(newLocale);
  3126. }
  3127. };
  3128. }
  3129. var isString = function isString(val) {
  3130. return typeof val === 'string';
  3131. };
  3132. exports.isString = isString;
  3133. var formater;
  3134. function hasI18nJson(jsonObj, delimiters) {
  3135. if (!formater) {
  3136. formater = new BaseFormatter();
  3137. }
  3138. return walkJsonObj(jsonObj, function (jsonObj, key) {
  3139. var value = jsonObj[key];
  3140. if (isString(value)) {
  3141. if (isI18nStr(value, delimiters)) {
  3142. return true;
  3143. }
  3144. } else {
  3145. return hasI18nJson(value, delimiters);
  3146. }
  3147. });
  3148. }
  3149. function parseI18nJson(jsonObj, values, delimiters) {
  3150. if (!formater) {
  3151. formater = new BaseFormatter();
  3152. }
  3153. walkJsonObj(jsonObj, function (jsonObj, key) {
  3154. var value = jsonObj[key];
  3155. if (isString(value)) {
  3156. if (isI18nStr(value, delimiters)) {
  3157. jsonObj[key] = compileStr(value, values, delimiters);
  3158. }
  3159. } else {
  3160. parseI18nJson(value, values, delimiters);
  3161. }
  3162. });
  3163. return jsonObj;
  3164. }
  3165. function compileI18nJsonStr(jsonStr, _ref5) {
  3166. var locale = _ref5.locale,
  3167. locales = _ref5.locales,
  3168. delimiters = _ref5.delimiters;
  3169. if (!isI18nStr(jsonStr, delimiters)) {
  3170. return jsonStr;
  3171. }
  3172. if (!formater) {
  3173. formater = new BaseFormatter();
  3174. }
  3175. var localeValues = [];
  3176. Object.keys(locales).forEach(function (name) {
  3177. if (name !== locale) {
  3178. localeValues.push({
  3179. locale: name,
  3180. values: locales[name]
  3181. });
  3182. }
  3183. });
  3184. localeValues.unshift({
  3185. locale: locale,
  3186. values: locales[locale]
  3187. });
  3188. try {
  3189. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  3190. } catch (e) {}
  3191. return jsonStr;
  3192. }
  3193. function isI18nStr(value, delimiters) {
  3194. return value.indexOf(delimiters[0]) > -1;
  3195. }
  3196. function compileStr(value, values, delimiters) {
  3197. return formater.interpolate(value, values, delimiters).join('');
  3198. }
  3199. function compileValue(jsonObj, key, localeValues, delimiters) {
  3200. var value = jsonObj[key];
  3201. if (isString(value)) {
  3202. // 存在国际化
  3203. if (isI18nStr(value, delimiters)) {
  3204. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  3205. if (localeValues.length > 1) {
  3206. // 格式化国际化语言
  3207. var valueLocales = jsonObj[key + 'Locales'] = {};
  3208. localeValues.forEach(function (localValue) {
  3209. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  3210. });
  3211. }
  3212. }
  3213. } else {
  3214. compileJsonObj(value, localeValues, delimiters);
  3215. }
  3216. }
  3217. function compileJsonObj(jsonObj, localeValues, delimiters) {
  3218. walkJsonObj(jsonObj, function (jsonObj, key) {
  3219. compileValue(jsonObj, key, localeValues, delimiters);
  3220. });
  3221. return jsonObj;
  3222. }
  3223. function walkJsonObj(jsonObj, walk) {
  3224. if (Array.isArray(jsonObj)) {
  3225. for (var i = 0; i < jsonObj.length; i++) {
  3226. if (walk(jsonObj, i)) {
  3227. return true;
  3228. }
  3229. }
  3230. } else if (isObject(jsonObj)) {
  3231. for (var key in jsonObj) {
  3232. if (walk(jsonObj, key)) {
  3233. return true;
  3234. }
  3235. }
  3236. }
  3237. return false;
  3238. }
  3239. function resolveLocale(locales) {
  3240. return function (locale) {
  3241. if (!locale) {
  3242. return locale;
  3243. }
  3244. locale = normalizeLocale(locale) || locale;
  3245. return resolveLocaleChain(locale).find(function (locale) {
  3246. return locales.indexOf(locale) > -1;
  3247. });
  3248. };
  3249. }
  3250. function resolveLocaleChain(locale) {
  3251. var chain = [];
  3252. var tokens = locale.split('-');
  3253. while (tokens.length) {
  3254. chain.push(tokens.join('-'));
  3255. tokens.pop();
  3256. }
  3257. return chain;
  3258. }
  3259. /* 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)))
  3260. /***/ }),
  3261. /* 23 */
  3262. /*!***************************************************************!*\
  3263. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  3264. \***************************************************************/
  3265. /*! no static exports found */
  3266. /***/ (function(module, exports) {
  3267. function _classCallCheck(instance, Constructor) {
  3268. if (!(instance instanceof Constructor)) {
  3269. throw new TypeError("Cannot call a class as a function");
  3270. }
  3271. }
  3272. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3273. /***/ }),
  3274. /* 24 */
  3275. /*!************************************************************!*\
  3276. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  3277. \************************************************************/
  3278. /*! no static exports found */
  3279. /***/ (function(module, exports, __webpack_require__) {
  3280. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  3281. function _defineProperties(target, props) {
  3282. for (var i = 0; i < props.length; i++) {
  3283. var descriptor = props[i];
  3284. descriptor.enumerable = descriptor.enumerable || false;
  3285. descriptor.configurable = true;
  3286. if ("value" in descriptor) descriptor.writable = true;
  3287. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  3288. }
  3289. }
  3290. function _createClass(Constructor, protoProps, staticProps) {
  3291. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  3292. if (staticProps) _defineProperties(Constructor, staticProps);
  3293. Object.defineProperty(Constructor, "prototype", {
  3294. writable: false
  3295. });
  3296. return Constructor;
  3297. }
  3298. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3299. /***/ }),
  3300. /* 25 */
  3301. /*!******************************************************************************************!*\
  3302. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  3303. \******************************************************************************************/
  3304. /*! exports provided: default */
  3305. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3306. "use strict";
  3307. __webpack_require__.r(__webpack_exports__);
  3308. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3309. * Vue.js v2.6.11
  3310. * (c) 2014-2024 Evan You
  3311. * Released under the MIT License.
  3312. */
  3313. /* */
  3314. var emptyObject = Object.freeze({});
  3315. // These helpers produce better VM code in JS engines due to their
  3316. // explicitness and function inlining.
  3317. function isUndef (v) {
  3318. return v === undefined || v === null
  3319. }
  3320. function isDef (v) {
  3321. return v !== undefined && v !== null
  3322. }
  3323. function isTrue (v) {
  3324. return v === true
  3325. }
  3326. function isFalse (v) {
  3327. return v === false
  3328. }
  3329. /**
  3330. * Check if value is primitive.
  3331. */
  3332. function isPrimitive (value) {
  3333. return (
  3334. typeof value === 'string' ||
  3335. typeof value === 'number' ||
  3336. // $flow-disable-line
  3337. typeof value === 'symbol' ||
  3338. typeof value === 'boolean'
  3339. )
  3340. }
  3341. /**
  3342. * Quick object check - this is primarily used to tell
  3343. * Objects from primitive values when we know the value
  3344. * is a JSON-compliant type.
  3345. */
  3346. function isObject (obj) {
  3347. return obj !== null && typeof obj === 'object'
  3348. }
  3349. /**
  3350. * Get the raw type string of a value, e.g., [object Object].
  3351. */
  3352. var _toString = Object.prototype.toString;
  3353. function toRawType (value) {
  3354. return _toString.call(value).slice(8, -1)
  3355. }
  3356. /**
  3357. * Strict object type check. Only returns true
  3358. * for plain JavaScript objects.
  3359. */
  3360. function isPlainObject (obj) {
  3361. return _toString.call(obj) === '[object Object]'
  3362. }
  3363. function isRegExp (v) {
  3364. return _toString.call(v) === '[object RegExp]'
  3365. }
  3366. /**
  3367. * Check if val is a valid array index.
  3368. */
  3369. function isValidArrayIndex (val) {
  3370. var n = parseFloat(String(val));
  3371. return n >= 0 && Math.floor(n) === n && isFinite(val)
  3372. }
  3373. function isPromise (val) {
  3374. return (
  3375. isDef(val) &&
  3376. typeof val.then === 'function' &&
  3377. typeof val.catch === 'function'
  3378. )
  3379. }
  3380. /**
  3381. * Convert a value to a string that is actually rendered.
  3382. */
  3383. function toString (val) {
  3384. return val == null
  3385. ? ''
  3386. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  3387. ? JSON.stringify(val, null, 2)
  3388. : String(val)
  3389. }
  3390. /**
  3391. * Convert an input value to a number for persistence.
  3392. * If the conversion fails, return original string.
  3393. */
  3394. function toNumber (val) {
  3395. var n = parseFloat(val);
  3396. return isNaN(n) ? val : n
  3397. }
  3398. /**
  3399. * Make a map and return a function for checking if a key
  3400. * is in that map.
  3401. */
  3402. function makeMap (
  3403. str,
  3404. expectsLowerCase
  3405. ) {
  3406. var map = Object.create(null);
  3407. var list = str.split(',');
  3408. for (var i = 0; i < list.length; i++) {
  3409. map[list[i]] = true;
  3410. }
  3411. return expectsLowerCase
  3412. ? function (val) { return map[val.toLowerCase()]; }
  3413. : function (val) { return map[val]; }
  3414. }
  3415. /**
  3416. * Check if a tag is a built-in tag.
  3417. */
  3418. var isBuiltInTag = makeMap('slot,component', true);
  3419. /**
  3420. * Check if an attribute is a reserved attribute.
  3421. */
  3422. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  3423. /**
  3424. * Remove an item from an array.
  3425. */
  3426. function remove (arr, item) {
  3427. if (arr.length) {
  3428. var index = arr.indexOf(item);
  3429. if (index > -1) {
  3430. return arr.splice(index, 1)
  3431. }
  3432. }
  3433. }
  3434. /**
  3435. * Check whether an object has the property.
  3436. */
  3437. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3438. function hasOwn (obj, key) {
  3439. return hasOwnProperty.call(obj, key)
  3440. }
  3441. /**
  3442. * Create a cached version of a pure function.
  3443. */
  3444. function cached (fn) {
  3445. var cache = Object.create(null);
  3446. return (function cachedFn (str) {
  3447. var hit = cache[str];
  3448. return hit || (cache[str] = fn(str))
  3449. })
  3450. }
  3451. /**
  3452. * Camelize a hyphen-delimited string.
  3453. */
  3454. var camelizeRE = /-(\w)/g;
  3455. var camelize = cached(function (str) {
  3456. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  3457. });
  3458. /**
  3459. * Capitalize a string.
  3460. */
  3461. var capitalize = cached(function (str) {
  3462. return str.charAt(0).toUpperCase() + str.slice(1)
  3463. });
  3464. /**
  3465. * Hyphenate a camelCase string.
  3466. */
  3467. var hyphenateRE = /\B([A-Z])/g;
  3468. var hyphenate = cached(function (str) {
  3469. return str.replace(hyphenateRE, '-$1').toLowerCase()
  3470. });
  3471. /**
  3472. * Simple bind polyfill for environments that do not support it,
  3473. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  3474. * since native bind is now performant enough in most browsers.
  3475. * But removing it would mean breaking code that was able to run in
  3476. * PhantomJS 1.x, so this must be kept for backward compatibility.
  3477. */
  3478. /* istanbul ignore next */
  3479. function polyfillBind (fn, ctx) {
  3480. function boundFn (a) {
  3481. var l = arguments.length;
  3482. return l
  3483. ? l > 1
  3484. ? fn.apply(ctx, arguments)
  3485. : fn.call(ctx, a)
  3486. : fn.call(ctx)
  3487. }
  3488. boundFn._length = fn.length;
  3489. return boundFn
  3490. }
  3491. function nativeBind (fn, ctx) {
  3492. return fn.bind(ctx)
  3493. }
  3494. var bind = Function.prototype.bind
  3495. ? nativeBind
  3496. : polyfillBind;
  3497. /**
  3498. * Convert an Array-like object to a real Array.
  3499. */
  3500. function toArray (list, start) {
  3501. start = start || 0;
  3502. var i = list.length - start;
  3503. var ret = new Array(i);
  3504. while (i--) {
  3505. ret[i] = list[i + start];
  3506. }
  3507. return ret
  3508. }
  3509. /**
  3510. * Mix properties into target object.
  3511. */
  3512. function extend (to, _from) {
  3513. for (var key in _from) {
  3514. to[key] = _from[key];
  3515. }
  3516. return to
  3517. }
  3518. /**
  3519. * Merge an Array of Objects into a single Object.
  3520. */
  3521. function toObject (arr) {
  3522. var res = {};
  3523. for (var i = 0; i < arr.length; i++) {
  3524. if (arr[i]) {
  3525. extend(res, arr[i]);
  3526. }
  3527. }
  3528. return res
  3529. }
  3530. /* eslint-disable no-unused-vars */
  3531. /**
  3532. * Perform no operation.
  3533. * Stubbing args to make Flow happy without leaving useless transpiled code
  3534. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  3535. */
  3536. function noop (a, b, c) {}
  3537. /**
  3538. * Always return false.
  3539. */
  3540. var no = function (a, b, c) { return false; };
  3541. /* eslint-enable no-unused-vars */
  3542. /**
  3543. * Return the same value.
  3544. */
  3545. var identity = function (_) { return _; };
  3546. /**
  3547. * Check if two values are loosely equal - that is,
  3548. * if they are plain objects, do they have the same shape?
  3549. */
  3550. function looseEqual (a, b) {
  3551. if (a === b) { return true }
  3552. var isObjectA = isObject(a);
  3553. var isObjectB = isObject(b);
  3554. if (isObjectA && isObjectB) {
  3555. try {
  3556. var isArrayA = Array.isArray(a);
  3557. var isArrayB = Array.isArray(b);
  3558. if (isArrayA && isArrayB) {
  3559. return a.length === b.length && a.every(function (e, i) {
  3560. return looseEqual(e, b[i])
  3561. })
  3562. } else if (a instanceof Date && b instanceof Date) {
  3563. return a.getTime() === b.getTime()
  3564. } else if (!isArrayA && !isArrayB) {
  3565. var keysA = Object.keys(a);
  3566. var keysB = Object.keys(b);
  3567. return keysA.length === keysB.length && keysA.every(function (key) {
  3568. return looseEqual(a[key], b[key])
  3569. })
  3570. } else {
  3571. /* istanbul ignore next */
  3572. return false
  3573. }
  3574. } catch (e) {
  3575. /* istanbul ignore next */
  3576. return false
  3577. }
  3578. } else if (!isObjectA && !isObjectB) {
  3579. return String(a) === String(b)
  3580. } else {
  3581. return false
  3582. }
  3583. }
  3584. /**
  3585. * Return the first index at which a loosely equal value can be
  3586. * found in the array (if value is a plain object, the array must
  3587. * contain an object of the same shape), or -1 if it is not present.
  3588. */
  3589. function looseIndexOf (arr, val) {
  3590. for (var i = 0; i < arr.length; i++) {
  3591. if (looseEqual(arr[i], val)) { return i }
  3592. }
  3593. return -1
  3594. }
  3595. /**
  3596. * Ensure a function is called only once.
  3597. */
  3598. function once (fn) {
  3599. var called = false;
  3600. return function () {
  3601. if (!called) {
  3602. called = true;
  3603. fn.apply(this, arguments);
  3604. }
  3605. }
  3606. }
  3607. var ASSET_TYPES = [
  3608. 'component',
  3609. 'directive',
  3610. 'filter'
  3611. ];
  3612. var LIFECYCLE_HOOKS = [
  3613. 'beforeCreate',
  3614. 'created',
  3615. 'beforeMount',
  3616. 'mounted',
  3617. 'beforeUpdate',
  3618. 'updated',
  3619. 'beforeDestroy',
  3620. 'destroyed',
  3621. 'activated',
  3622. 'deactivated',
  3623. 'errorCaptured',
  3624. 'serverPrefetch'
  3625. ];
  3626. /* */
  3627. var config = ({
  3628. /**
  3629. * Option merge strategies (used in core/util/options)
  3630. */
  3631. // $flow-disable-line
  3632. optionMergeStrategies: Object.create(null),
  3633. /**
  3634. * Whether to suppress warnings.
  3635. */
  3636. silent: false,
  3637. /**
  3638. * Show production mode tip message on boot?
  3639. */
  3640. productionTip: "development" !== 'production',
  3641. /**
  3642. * Whether to enable devtools
  3643. */
  3644. devtools: "development" !== 'production',
  3645. /**
  3646. * Whether to record perf
  3647. */
  3648. performance: false,
  3649. /**
  3650. * Error handler for watcher errors
  3651. */
  3652. errorHandler: null,
  3653. /**
  3654. * Warn handler for watcher warns
  3655. */
  3656. warnHandler: null,
  3657. /**
  3658. * Ignore certain custom elements
  3659. */
  3660. ignoredElements: [],
  3661. /**
  3662. * Custom user key aliases for v-on
  3663. */
  3664. // $flow-disable-line
  3665. keyCodes: Object.create(null),
  3666. /**
  3667. * Check if a tag is reserved so that it cannot be registered as a
  3668. * component. This is platform-dependent and may be overwritten.
  3669. */
  3670. isReservedTag: no,
  3671. /**
  3672. * Check if an attribute is reserved so that it cannot be used as a component
  3673. * prop. This is platform-dependent and may be overwritten.
  3674. */
  3675. isReservedAttr: no,
  3676. /**
  3677. * Check if a tag is an unknown element.
  3678. * Platform-dependent.
  3679. */
  3680. isUnknownElement: no,
  3681. /**
  3682. * Get the namespace of an element
  3683. */
  3684. getTagNamespace: noop,
  3685. /**
  3686. * Parse the real tag name for the specific platform.
  3687. */
  3688. parsePlatformTagName: identity,
  3689. /**
  3690. * Check if an attribute must be bound using property, e.g. value
  3691. * Platform-dependent.
  3692. */
  3693. mustUseProp: no,
  3694. /**
  3695. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  3696. * This will significantly reduce performance if set to false.
  3697. */
  3698. async: true,
  3699. /**
  3700. * Exposed for legacy reasons
  3701. */
  3702. _lifecycleHooks: LIFECYCLE_HOOKS
  3703. });
  3704. /* */
  3705. /**
  3706. * unicode letters used for parsing html tags, component names and property paths.
  3707. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  3708. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  3709. */
  3710. 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/;
  3711. /**
  3712. * Check if a string starts with $ or _
  3713. */
  3714. function isReserved (str) {
  3715. var c = (str + '').charCodeAt(0);
  3716. return c === 0x24 || c === 0x5F
  3717. }
  3718. /**
  3719. * Define a property.
  3720. */
  3721. function def (obj, key, val, enumerable) {
  3722. Object.defineProperty(obj, key, {
  3723. value: val,
  3724. enumerable: !!enumerable,
  3725. writable: true,
  3726. configurable: true
  3727. });
  3728. }
  3729. /**
  3730. * Parse simple path.
  3731. */
  3732. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  3733. function parsePath (path) {
  3734. if (bailRE.test(path)) {
  3735. return
  3736. }
  3737. var segments = path.split('.');
  3738. return function (obj) {
  3739. for (var i = 0; i < segments.length; i++) {
  3740. if (!obj) { return }
  3741. obj = obj[segments[i]];
  3742. }
  3743. return obj
  3744. }
  3745. }
  3746. /* */
  3747. // can we use __proto__?
  3748. var hasProto = '__proto__' in {};
  3749. // Browser environment sniffing
  3750. var inBrowser = typeof window !== 'undefined';
  3751. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  3752. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  3753. var UA = inBrowser && window.navigator && window.navigator.userAgent.toLowerCase();
  3754. var isIE = UA && /msie|trident/.test(UA);
  3755. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  3756. var isEdge = UA && UA.indexOf('edge/') > 0;
  3757. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  3758. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  3759. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  3760. var isPhantomJS = UA && /phantomjs/.test(UA);
  3761. var isFF = UA && UA.match(/firefox\/(\d+)/);
  3762. // Firefox has a "watch" function on Object.prototype...
  3763. var nativeWatch = ({}).watch;
  3764. if (inBrowser) {
  3765. try {
  3766. var opts = {};
  3767. Object.defineProperty(opts, 'passive', ({
  3768. get: function get () {
  3769. }
  3770. })); // https://github.com/facebook/flow/issues/285
  3771. window.addEventListener('test-passive', null, opts);
  3772. } catch (e) {}
  3773. }
  3774. // this needs to be lazy-evaled because vue may be required before
  3775. // vue-server-renderer can set VUE_ENV
  3776. var _isServer;
  3777. var isServerRendering = function () {
  3778. if (_isServer === undefined) {
  3779. /* istanbul ignore if */
  3780. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  3781. // detect presence of vue-server-renderer and avoid
  3782. // Webpack shimming the process
  3783. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  3784. } else {
  3785. _isServer = false;
  3786. }
  3787. }
  3788. return _isServer
  3789. };
  3790. // detect devtools
  3791. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  3792. /* istanbul ignore next */
  3793. function isNative (Ctor) {
  3794. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  3795. }
  3796. var hasSymbol =
  3797. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  3798. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  3799. var _Set;
  3800. /* istanbul ignore if */ // $flow-disable-line
  3801. if (typeof Set !== 'undefined' && isNative(Set)) {
  3802. // use native Set when available.
  3803. _Set = Set;
  3804. } else {
  3805. // a non-standard Set polyfill that only works with primitive keys.
  3806. _Set = /*@__PURE__*/(function () {
  3807. function Set () {
  3808. this.set = Object.create(null);
  3809. }
  3810. Set.prototype.has = function has (key) {
  3811. return this.set[key] === true
  3812. };
  3813. Set.prototype.add = function add (key) {
  3814. this.set[key] = true;
  3815. };
  3816. Set.prototype.clear = function clear () {
  3817. this.set = Object.create(null);
  3818. };
  3819. return Set;
  3820. }());
  3821. }
  3822. /* */
  3823. var warn = noop;
  3824. var tip = noop;
  3825. var generateComponentTrace = (noop); // work around flow check
  3826. var formatComponentName = (noop);
  3827. if (true) {
  3828. var hasConsole = typeof console !== 'undefined';
  3829. var classifyRE = /(?:^|[-_])(\w)/g;
  3830. var classify = function (str) { return str
  3831. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  3832. .replace(/[-_]/g, ''); };
  3833. warn = function (msg, vm) {
  3834. var trace = vm ? generateComponentTrace(vm) : '';
  3835. if (config.warnHandler) {
  3836. config.warnHandler.call(null, msg, vm, trace);
  3837. } else if (hasConsole && (!config.silent)) {
  3838. console.error(("[Vue warn]: " + msg + trace));
  3839. }
  3840. };
  3841. tip = function (msg, vm) {
  3842. if (hasConsole && (!config.silent)) {
  3843. console.warn("[Vue tip]: " + msg + (
  3844. vm ? generateComponentTrace(vm) : ''
  3845. ));
  3846. }
  3847. };
  3848. formatComponentName = function (vm, includeFile) {
  3849. if (vm.$root === vm) {
  3850. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  3851. return ('') + vm.$options.__file
  3852. }
  3853. return '<Root>'
  3854. }
  3855. var options = typeof vm === 'function' && vm.cid != null
  3856. ? vm.options
  3857. : vm._isVue
  3858. ? vm.$options || vm.constructor.options
  3859. : vm;
  3860. var name = options.name || options._componentTag;
  3861. var file = options.__file;
  3862. if (!name && file) {
  3863. var match = file.match(/([^/\\]+)\.vue$/);
  3864. name = match && match[1];
  3865. }
  3866. return (
  3867. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  3868. (file && includeFile !== false ? (" at " + file) : '')
  3869. )
  3870. };
  3871. var repeat = function (str, n) {
  3872. var res = '';
  3873. while (n) {
  3874. if (n % 2 === 1) { res += str; }
  3875. if (n > 1) { str += str; }
  3876. n >>= 1;
  3877. }
  3878. return res
  3879. };
  3880. generateComponentTrace = function (vm) {
  3881. if (vm._isVue && vm.$parent) {
  3882. var tree = [];
  3883. var currentRecursiveSequence = 0;
  3884. while (vm && vm.$options.name !== 'PageBody') {
  3885. if (tree.length > 0) {
  3886. var last = tree[tree.length - 1];
  3887. if (last.constructor === vm.constructor) {
  3888. currentRecursiveSequence++;
  3889. vm = vm.$parent;
  3890. continue
  3891. } else if (currentRecursiveSequence > 0) {
  3892. tree[tree.length - 1] = [last, currentRecursiveSequence];
  3893. currentRecursiveSequence = 0;
  3894. }
  3895. }
  3896. !vm.$options.isReserved && tree.push(vm);
  3897. vm = vm.$parent;
  3898. }
  3899. return '\n\nfound in\n\n' + tree
  3900. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  3901. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  3902. : formatComponentName(vm))); })
  3903. .join('\n')
  3904. } else {
  3905. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  3906. }
  3907. };
  3908. }
  3909. /* */
  3910. var uid = 0;
  3911. /**
  3912. * A dep is an observable that can have multiple
  3913. * directives subscribing to it.
  3914. */
  3915. var Dep = function Dep () {
  3916. this.id = uid++;
  3917. this.subs = [];
  3918. };
  3919. Dep.prototype.addSub = function addSub (sub) {
  3920. this.subs.push(sub);
  3921. };
  3922. Dep.prototype.removeSub = function removeSub (sub) {
  3923. remove(this.subs, sub);
  3924. };
  3925. Dep.prototype.depend = function depend () {
  3926. if (Dep.SharedObject.target) {
  3927. Dep.SharedObject.target.addDep(this);
  3928. }
  3929. };
  3930. Dep.prototype.notify = function notify () {
  3931. // stabilize the subscriber list first
  3932. var subs = this.subs.slice();
  3933. if ( true && !config.async) {
  3934. // subs aren't sorted in scheduler if not running async
  3935. // we need to sort them now to make sure they fire in correct
  3936. // order
  3937. subs.sort(function (a, b) { return a.id - b.id; });
  3938. }
  3939. for (var i = 0, l = subs.length; i < l; i++) {
  3940. subs[i].update();
  3941. }
  3942. };
  3943. // The current target watcher being evaluated.
  3944. // This is globally unique because only one watcher
  3945. // can be evaluated at a time.
  3946. // fixed by xxxxxx (nvue shared vuex)
  3947. /* eslint-disable no-undef */
  3948. Dep.SharedObject = {};
  3949. Dep.SharedObject.target = null;
  3950. Dep.SharedObject.targetStack = [];
  3951. function pushTarget (target) {
  3952. Dep.SharedObject.targetStack.push(target);
  3953. Dep.SharedObject.target = target;
  3954. Dep.target = target;
  3955. }
  3956. function popTarget () {
  3957. Dep.SharedObject.targetStack.pop();
  3958. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  3959. Dep.target = Dep.SharedObject.target;
  3960. }
  3961. /* */
  3962. var VNode = function VNode (
  3963. tag,
  3964. data,
  3965. children,
  3966. text,
  3967. elm,
  3968. context,
  3969. componentOptions,
  3970. asyncFactory
  3971. ) {
  3972. this.tag = tag;
  3973. this.data = data;
  3974. this.children = children;
  3975. this.text = text;
  3976. this.elm = elm;
  3977. this.ns = undefined;
  3978. this.context = context;
  3979. this.fnContext = undefined;
  3980. this.fnOptions = undefined;
  3981. this.fnScopeId = undefined;
  3982. this.key = data && data.key;
  3983. this.componentOptions = componentOptions;
  3984. this.componentInstance = undefined;
  3985. this.parent = undefined;
  3986. this.raw = false;
  3987. this.isStatic = false;
  3988. this.isRootInsert = true;
  3989. this.isComment = false;
  3990. this.isCloned = false;
  3991. this.isOnce = false;
  3992. this.asyncFactory = asyncFactory;
  3993. this.asyncMeta = undefined;
  3994. this.isAsyncPlaceholder = false;
  3995. };
  3996. var prototypeAccessors = { child: { configurable: true } };
  3997. // DEPRECATED: alias for componentInstance for backwards compat.
  3998. /* istanbul ignore next */
  3999. prototypeAccessors.child.get = function () {
  4000. return this.componentInstance
  4001. };
  4002. Object.defineProperties( VNode.prototype, prototypeAccessors );
  4003. var createEmptyVNode = function (text) {
  4004. if ( text === void 0 ) text = '';
  4005. var node = new VNode();
  4006. node.text = text;
  4007. node.isComment = true;
  4008. return node
  4009. };
  4010. function createTextVNode (val) {
  4011. return new VNode(undefined, undefined, undefined, String(val))
  4012. }
  4013. // optimized shallow clone
  4014. // used for static nodes and slot nodes because they may be reused across
  4015. // multiple renders, cloning them avoids errors when DOM manipulations rely
  4016. // on their elm reference.
  4017. function cloneVNode (vnode) {
  4018. var cloned = new VNode(
  4019. vnode.tag,
  4020. vnode.data,
  4021. // #7975
  4022. // clone children array to avoid mutating original in case of cloning
  4023. // a child.
  4024. vnode.children && vnode.children.slice(),
  4025. vnode.text,
  4026. vnode.elm,
  4027. vnode.context,
  4028. vnode.componentOptions,
  4029. vnode.asyncFactory
  4030. );
  4031. cloned.ns = vnode.ns;
  4032. cloned.isStatic = vnode.isStatic;
  4033. cloned.key = vnode.key;
  4034. cloned.isComment = vnode.isComment;
  4035. cloned.fnContext = vnode.fnContext;
  4036. cloned.fnOptions = vnode.fnOptions;
  4037. cloned.fnScopeId = vnode.fnScopeId;
  4038. cloned.asyncMeta = vnode.asyncMeta;
  4039. cloned.isCloned = true;
  4040. return cloned
  4041. }
  4042. /*
  4043. * not type checking this file because flow doesn't play well with
  4044. * dynamically accessing methods on Array prototype
  4045. */
  4046. var arrayProto = Array.prototype;
  4047. var arrayMethods = Object.create(arrayProto);
  4048. var methodsToPatch = [
  4049. 'push',
  4050. 'pop',
  4051. 'shift',
  4052. 'unshift',
  4053. 'splice',
  4054. 'sort',
  4055. 'reverse'
  4056. ];
  4057. /**
  4058. * Intercept mutating methods and emit events
  4059. */
  4060. methodsToPatch.forEach(function (method) {
  4061. // cache original method
  4062. var original = arrayProto[method];
  4063. def(arrayMethods, method, function mutator () {
  4064. var args = [], len = arguments.length;
  4065. while ( len-- ) args[ len ] = arguments[ len ];
  4066. var result = original.apply(this, args);
  4067. var ob = this.__ob__;
  4068. var inserted;
  4069. switch (method) {
  4070. case 'push':
  4071. case 'unshift':
  4072. inserted = args;
  4073. break
  4074. case 'splice':
  4075. inserted = args.slice(2);
  4076. break
  4077. }
  4078. if (inserted) { ob.observeArray(inserted); }
  4079. // notify change
  4080. ob.dep.notify();
  4081. return result
  4082. });
  4083. });
  4084. /* */
  4085. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  4086. /**
  4087. * In some cases we may want to disable observation inside a component's
  4088. * update computation.
  4089. */
  4090. var shouldObserve = true;
  4091. function toggleObserving (value) {
  4092. shouldObserve = value;
  4093. }
  4094. /**
  4095. * Observer class that is attached to each observed
  4096. * object. Once attached, the observer converts the target
  4097. * object's property keys into getter/setters that
  4098. * collect dependencies and dispatch updates.
  4099. */
  4100. var Observer = function Observer (value) {
  4101. this.value = value;
  4102. this.dep = new Dep();
  4103. this.vmCount = 0;
  4104. def(value, '__ob__', this);
  4105. if (Array.isArray(value)) {
  4106. if (hasProto) {
  4107. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  4108. if(value.push !== value.__proto__.push){
  4109. copyAugment(value, arrayMethods, arrayKeys);
  4110. } else {
  4111. protoAugment(value, arrayMethods);
  4112. }
  4113. }
  4114. } else {
  4115. copyAugment(value, arrayMethods, arrayKeys);
  4116. }
  4117. this.observeArray(value);
  4118. } else {
  4119. this.walk(value);
  4120. }
  4121. };
  4122. /**
  4123. * Walk through all properties and convert them into
  4124. * getter/setters. This method should only be called when
  4125. * value type is Object.
  4126. */
  4127. Observer.prototype.walk = function walk (obj) {
  4128. var keys = Object.keys(obj);
  4129. for (var i = 0; i < keys.length; i++) {
  4130. defineReactive$$1(obj, keys[i]);
  4131. }
  4132. };
  4133. /**
  4134. * Observe a list of Array items.
  4135. */
  4136. Observer.prototype.observeArray = function observeArray (items) {
  4137. for (var i = 0, l = items.length; i < l; i++) {
  4138. observe(items[i]);
  4139. }
  4140. };
  4141. // helpers
  4142. /**
  4143. * Augment a target Object or Array by intercepting
  4144. * the prototype chain using __proto__
  4145. */
  4146. function protoAugment (target, src) {
  4147. /* eslint-disable no-proto */
  4148. target.__proto__ = src;
  4149. /* eslint-enable no-proto */
  4150. }
  4151. /**
  4152. * Augment a target Object or Array by defining
  4153. * hidden properties.
  4154. */
  4155. /* istanbul ignore next */
  4156. function copyAugment (target, src, keys) {
  4157. for (var i = 0, l = keys.length; i < l; i++) {
  4158. var key = keys[i];
  4159. def(target, key, src[key]);
  4160. }
  4161. }
  4162. /**
  4163. * Attempt to create an observer instance for a value,
  4164. * returns the new observer if successfully observed,
  4165. * or the existing observer if the value already has one.
  4166. */
  4167. function observe (value, asRootData) {
  4168. if (!isObject(value) || value instanceof VNode) {
  4169. return
  4170. }
  4171. var ob;
  4172. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  4173. ob = value.__ob__;
  4174. } else if (
  4175. shouldObserve &&
  4176. !isServerRendering() &&
  4177. (Array.isArray(value) || isPlainObject(value)) &&
  4178. Object.isExtensible(value) &&
  4179. !value._isVue &&
  4180. !value.__v_isMPComponent
  4181. ) {
  4182. ob = new Observer(value);
  4183. }
  4184. if (asRootData && ob) {
  4185. ob.vmCount++;
  4186. }
  4187. return ob
  4188. }
  4189. /**
  4190. * Define a reactive property on an Object.
  4191. */
  4192. function defineReactive$$1 (
  4193. obj,
  4194. key,
  4195. val,
  4196. customSetter,
  4197. shallow
  4198. ) {
  4199. var dep = new Dep();
  4200. var property = Object.getOwnPropertyDescriptor(obj, key);
  4201. if (property && property.configurable === false) {
  4202. return
  4203. }
  4204. // cater for pre-defined getter/setters
  4205. var getter = property && property.get;
  4206. var setter = property && property.set;
  4207. if ((!getter || setter) && arguments.length === 2) {
  4208. val = obj[key];
  4209. }
  4210. var childOb = !shallow && observe(val);
  4211. Object.defineProperty(obj, key, {
  4212. enumerable: true,
  4213. configurable: true,
  4214. get: function reactiveGetter () {
  4215. var value = getter ? getter.call(obj) : val;
  4216. if (Dep.SharedObject.target) { // fixed by xxxxxx
  4217. dep.depend();
  4218. if (childOb) {
  4219. childOb.dep.depend();
  4220. if (Array.isArray(value)) {
  4221. dependArray(value);
  4222. }
  4223. }
  4224. }
  4225. return value
  4226. },
  4227. set: function reactiveSetter (newVal) {
  4228. var value = getter ? getter.call(obj) : val;
  4229. /* eslint-disable no-self-compare */
  4230. if (newVal === value || (newVal !== newVal && value !== value)) {
  4231. return
  4232. }
  4233. /* eslint-enable no-self-compare */
  4234. if ( true && customSetter) {
  4235. customSetter();
  4236. }
  4237. // #7981: for accessor properties without setter
  4238. if (getter && !setter) { return }
  4239. if (setter) {
  4240. setter.call(obj, newVal);
  4241. } else {
  4242. val = newVal;
  4243. }
  4244. childOb = !shallow && observe(newVal);
  4245. dep.notify();
  4246. }
  4247. });
  4248. }
  4249. /**
  4250. * Set a property on an object. Adds the new property and
  4251. * triggers change notification if the property doesn't
  4252. * already exist.
  4253. */
  4254. function set (target, key, val) {
  4255. if ( true &&
  4256. (isUndef(target) || isPrimitive(target))
  4257. ) {
  4258. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  4259. }
  4260. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4261. target.length = Math.max(target.length, key);
  4262. target.splice(key, 1, val);
  4263. return val
  4264. }
  4265. if (key in target && !(key in Object.prototype)) {
  4266. target[key] = val;
  4267. return val
  4268. }
  4269. var ob = (target).__ob__;
  4270. if (target._isVue || (ob && ob.vmCount)) {
  4271. true && warn(
  4272. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  4273. 'at runtime - declare it upfront in the data option.'
  4274. );
  4275. return val
  4276. }
  4277. if (!ob) {
  4278. target[key] = val;
  4279. return val
  4280. }
  4281. defineReactive$$1(ob.value, key, val);
  4282. ob.dep.notify();
  4283. return val
  4284. }
  4285. /**
  4286. * Delete a property and trigger change if necessary.
  4287. */
  4288. function del (target, key) {
  4289. if ( true &&
  4290. (isUndef(target) || isPrimitive(target))
  4291. ) {
  4292. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  4293. }
  4294. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4295. target.splice(key, 1);
  4296. return
  4297. }
  4298. var ob = (target).__ob__;
  4299. if (target._isVue || (ob && ob.vmCount)) {
  4300. true && warn(
  4301. 'Avoid deleting properties on a Vue instance or its root $data ' +
  4302. '- just set it to null.'
  4303. );
  4304. return
  4305. }
  4306. if (!hasOwn(target, key)) {
  4307. return
  4308. }
  4309. delete target[key];
  4310. if (!ob) {
  4311. return
  4312. }
  4313. ob.dep.notify();
  4314. }
  4315. /**
  4316. * Collect dependencies on array elements when the array is touched, since
  4317. * we cannot intercept array element access like property getters.
  4318. */
  4319. function dependArray (value) {
  4320. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  4321. e = value[i];
  4322. e && e.__ob__ && e.__ob__.dep.depend();
  4323. if (Array.isArray(e)) {
  4324. dependArray(e);
  4325. }
  4326. }
  4327. }
  4328. /* */
  4329. /**
  4330. * Option overwriting strategies are functions that handle
  4331. * how to merge a parent option value and a child option
  4332. * value into the final value.
  4333. */
  4334. var strats = config.optionMergeStrategies;
  4335. /**
  4336. * Options with restrictions
  4337. */
  4338. if (true) {
  4339. strats.el = strats.propsData = function (parent, child, vm, key) {
  4340. if (!vm) {
  4341. warn(
  4342. "option \"" + key + "\" can only be used during instance " +
  4343. 'creation with the `new` keyword.'
  4344. );
  4345. }
  4346. return defaultStrat(parent, child)
  4347. };
  4348. }
  4349. /**
  4350. * Helper that recursively merges two data objects together.
  4351. */
  4352. function mergeData (to, from) {
  4353. if (!from) { return to }
  4354. var key, toVal, fromVal;
  4355. var keys = hasSymbol
  4356. ? Reflect.ownKeys(from)
  4357. : Object.keys(from);
  4358. for (var i = 0; i < keys.length; i++) {
  4359. key = keys[i];
  4360. // in case the object is already observed...
  4361. if (key === '__ob__') { continue }
  4362. toVal = to[key];
  4363. fromVal = from[key];
  4364. if (!hasOwn(to, key)) {
  4365. set(to, key, fromVal);
  4366. } else if (
  4367. toVal !== fromVal &&
  4368. isPlainObject(toVal) &&
  4369. isPlainObject(fromVal)
  4370. ) {
  4371. mergeData(toVal, fromVal);
  4372. }
  4373. }
  4374. return to
  4375. }
  4376. /**
  4377. * Data
  4378. */
  4379. function mergeDataOrFn (
  4380. parentVal,
  4381. childVal,
  4382. vm
  4383. ) {
  4384. if (!vm) {
  4385. // in a Vue.extend merge, both should be functions
  4386. if (!childVal) {
  4387. return parentVal
  4388. }
  4389. if (!parentVal) {
  4390. return childVal
  4391. }
  4392. // when parentVal & childVal are both present,
  4393. // we need to return a function that returns the
  4394. // merged result of both functions... no need to
  4395. // check if parentVal is a function here because
  4396. // it has to be a function to pass previous merges.
  4397. return function mergedDataFn () {
  4398. return mergeData(
  4399. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  4400. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  4401. )
  4402. }
  4403. } else {
  4404. return function mergedInstanceDataFn () {
  4405. // instance merge
  4406. var instanceData = typeof childVal === 'function'
  4407. ? childVal.call(vm, vm)
  4408. : childVal;
  4409. var defaultData = typeof parentVal === 'function'
  4410. ? parentVal.call(vm, vm)
  4411. : parentVal;
  4412. if (instanceData) {
  4413. return mergeData(instanceData, defaultData)
  4414. } else {
  4415. return defaultData
  4416. }
  4417. }
  4418. }
  4419. }
  4420. strats.data = function (
  4421. parentVal,
  4422. childVal,
  4423. vm
  4424. ) {
  4425. if (!vm) {
  4426. if (childVal && typeof childVal !== 'function') {
  4427. true && warn(
  4428. 'The "data" option should be a function ' +
  4429. 'that returns a per-instance value in component ' +
  4430. 'definitions.',
  4431. vm
  4432. );
  4433. return parentVal
  4434. }
  4435. return mergeDataOrFn(parentVal, childVal)
  4436. }
  4437. return mergeDataOrFn(parentVal, childVal, vm)
  4438. };
  4439. /**
  4440. * Hooks and props are merged as arrays.
  4441. */
  4442. function mergeHook (
  4443. parentVal,
  4444. childVal
  4445. ) {
  4446. var res = childVal
  4447. ? parentVal
  4448. ? parentVal.concat(childVal)
  4449. : Array.isArray(childVal)
  4450. ? childVal
  4451. : [childVal]
  4452. : parentVal;
  4453. return res
  4454. ? dedupeHooks(res)
  4455. : res
  4456. }
  4457. function dedupeHooks (hooks) {
  4458. var res = [];
  4459. for (var i = 0; i < hooks.length; i++) {
  4460. if (res.indexOf(hooks[i]) === -1) {
  4461. res.push(hooks[i]);
  4462. }
  4463. }
  4464. return res
  4465. }
  4466. LIFECYCLE_HOOKS.forEach(function (hook) {
  4467. strats[hook] = mergeHook;
  4468. });
  4469. /**
  4470. * Assets
  4471. *
  4472. * When a vm is present (instance creation), we need to do
  4473. * a three-way merge between constructor options, instance
  4474. * options and parent options.
  4475. */
  4476. function mergeAssets (
  4477. parentVal,
  4478. childVal,
  4479. vm,
  4480. key
  4481. ) {
  4482. var res = Object.create(parentVal || null);
  4483. if (childVal) {
  4484. true && assertObjectType(key, childVal, vm);
  4485. return extend(res, childVal)
  4486. } else {
  4487. return res
  4488. }
  4489. }
  4490. ASSET_TYPES.forEach(function (type) {
  4491. strats[type + 's'] = mergeAssets;
  4492. });
  4493. /**
  4494. * Watchers.
  4495. *
  4496. * Watchers hashes should not overwrite one
  4497. * another, so we merge them as arrays.
  4498. */
  4499. strats.watch = function (
  4500. parentVal,
  4501. childVal,
  4502. vm,
  4503. key
  4504. ) {
  4505. // work around Firefox's Object.prototype.watch...
  4506. if (parentVal === nativeWatch) { parentVal = undefined; }
  4507. if (childVal === nativeWatch) { childVal = undefined; }
  4508. /* istanbul ignore if */
  4509. if (!childVal) { return Object.create(parentVal || null) }
  4510. if (true) {
  4511. assertObjectType(key, childVal, vm);
  4512. }
  4513. if (!parentVal) { return childVal }
  4514. var ret = {};
  4515. extend(ret, parentVal);
  4516. for (var key$1 in childVal) {
  4517. var parent = ret[key$1];
  4518. var child = childVal[key$1];
  4519. if (parent && !Array.isArray(parent)) {
  4520. parent = [parent];
  4521. }
  4522. ret[key$1] = parent
  4523. ? parent.concat(child)
  4524. : Array.isArray(child) ? child : [child];
  4525. }
  4526. return ret
  4527. };
  4528. /**
  4529. * Other object hashes.
  4530. */
  4531. strats.props =
  4532. strats.methods =
  4533. strats.inject =
  4534. strats.computed = function (
  4535. parentVal,
  4536. childVal,
  4537. vm,
  4538. key
  4539. ) {
  4540. if (childVal && "development" !== 'production') {
  4541. assertObjectType(key, childVal, vm);
  4542. }
  4543. if (!parentVal) { return childVal }
  4544. var ret = Object.create(null);
  4545. extend(ret, parentVal);
  4546. if (childVal) { extend(ret, childVal); }
  4547. return ret
  4548. };
  4549. strats.provide = mergeDataOrFn;
  4550. /**
  4551. * Default strategy.
  4552. */
  4553. var defaultStrat = function (parentVal, childVal) {
  4554. return childVal === undefined
  4555. ? parentVal
  4556. : childVal
  4557. };
  4558. /**
  4559. * Validate component names
  4560. */
  4561. function checkComponents (options) {
  4562. for (var key in options.components) {
  4563. validateComponentName(key);
  4564. }
  4565. }
  4566. function validateComponentName (name) {
  4567. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  4568. warn(
  4569. 'Invalid component name: "' + name + '". Component names ' +
  4570. 'should conform to valid custom element name in html5 specification.'
  4571. );
  4572. }
  4573. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  4574. warn(
  4575. 'Do not use built-in or reserved HTML elements as component ' +
  4576. 'id: ' + name
  4577. );
  4578. }
  4579. }
  4580. /**
  4581. * Ensure all props option syntax are normalized into the
  4582. * Object-based format.
  4583. */
  4584. function normalizeProps (options, vm) {
  4585. var props = options.props;
  4586. if (!props) { return }
  4587. var res = {};
  4588. var i, val, name;
  4589. if (Array.isArray(props)) {
  4590. i = props.length;
  4591. while (i--) {
  4592. val = props[i];
  4593. if (typeof val === 'string') {
  4594. name = camelize(val);
  4595. res[name] = { type: null };
  4596. } else if (true) {
  4597. warn('props must be strings when using array syntax.');
  4598. }
  4599. }
  4600. } else if (isPlainObject(props)) {
  4601. for (var key in props) {
  4602. val = props[key];
  4603. name = camelize(key);
  4604. res[name] = isPlainObject(val)
  4605. ? val
  4606. : { type: val };
  4607. }
  4608. } else if (true) {
  4609. warn(
  4610. "Invalid value for option \"props\": expected an Array or an Object, " +
  4611. "but got " + (toRawType(props)) + ".",
  4612. vm
  4613. );
  4614. }
  4615. options.props = res;
  4616. }
  4617. /**
  4618. * Normalize all injections into Object-based format
  4619. */
  4620. function normalizeInject (options, vm) {
  4621. var inject = options.inject;
  4622. if (!inject) { return }
  4623. var normalized = options.inject = {};
  4624. if (Array.isArray(inject)) {
  4625. for (var i = 0; i < inject.length; i++) {
  4626. normalized[inject[i]] = { from: inject[i] };
  4627. }
  4628. } else if (isPlainObject(inject)) {
  4629. for (var key in inject) {
  4630. var val = inject[key];
  4631. normalized[key] = isPlainObject(val)
  4632. ? extend({ from: key }, val)
  4633. : { from: val };
  4634. }
  4635. } else if (true) {
  4636. warn(
  4637. "Invalid value for option \"inject\": expected an Array or an Object, " +
  4638. "but got " + (toRawType(inject)) + ".",
  4639. vm
  4640. );
  4641. }
  4642. }
  4643. /**
  4644. * Normalize raw function directives into object format.
  4645. */
  4646. function normalizeDirectives (options) {
  4647. var dirs = options.directives;
  4648. if (dirs) {
  4649. for (var key in dirs) {
  4650. var def$$1 = dirs[key];
  4651. if (typeof def$$1 === 'function') {
  4652. dirs[key] = { bind: def$$1, update: def$$1 };
  4653. }
  4654. }
  4655. }
  4656. }
  4657. function assertObjectType (name, value, vm) {
  4658. if (!isPlainObject(value)) {
  4659. warn(
  4660. "Invalid value for option \"" + name + "\": expected an Object, " +
  4661. "but got " + (toRawType(value)) + ".",
  4662. vm
  4663. );
  4664. }
  4665. }
  4666. /**
  4667. * Merge two option objects into a new one.
  4668. * Core utility used in both instantiation and inheritance.
  4669. */
  4670. function mergeOptions (
  4671. parent,
  4672. child,
  4673. vm
  4674. ) {
  4675. if (true) {
  4676. checkComponents(child);
  4677. }
  4678. if (typeof child === 'function') {
  4679. child = child.options;
  4680. }
  4681. normalizeProps(child, vm);
  4682. normalizeInject(child, vm);
  4683. normalizeDirectives(child);
  4684. // Apply extends and mixins on the child options,
  4685. // but only if it is a raw options object that isn't
  4686. // the result of another mergeOptions call.
  4687. // Only merged options has the _base property.
  4688. if (!child._base) {
  4689. if (child.extends) {
  4690. parent = mergeOptions(parent, child.extends, vm);
  4691. }
  4692. if (child.mixins) {
  4693. for (var i = 0, l = child.mixins.length; i < l; i++) {
  4694. parent = mergeOptions(parent, child.mixins[i], vm);
  4695. }
  4696. }
  4697. }
  4698. var options = {};
  4699. var key;
  4700. for (key in parent) {
  4701. mergeField(key);
  4702. }
  4703. for (key in child) {
  4704. if (!hasOwn(parent, key)) {
  4705. mergeField(key);
  4706. }
  4707. }
  4708. function mergeField (key) {
  4709. var strat = strats[key] || defaultStrat;
  4710. options[key] = strat(parent[key], child[key], vm, key);
  4711. }
  4712. return options
  4713. }
  4714. /**
  4715. * Resolve an asset.
  4716. * This function is used because child instances need access
  4717. * to assets defined in its ancestor chain.
  4718. */
  4719. function resolveAsset (
  4720. options,
  4721. type,
  4722. id,
  4723. warnMissing
  4724. ) {
  4725. /* istanbul ignore if */
  4726. if (typeof id !== 'string') {
  4727. return
  4728. }
  4729. var assets = options[type];
  4730. // check local registration variations first
  4731. if (hasOwn(assets, id)) { return assets[id] }
  4732. var camelizedId = camelize(id);
  4733. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  4734. var PascalCaseId = capitalize(camelizedId);
  4735. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  4736. // fallback to prototype chain
  4737. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  4738. if ( true && warnMissing && !res) {
  4739. warn(
  4740. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  4741. options
  4742. );
  4743. }
  4744. return res
  4745. }
  4746. /* */
  4747. function validateProp (
  4748. key,
  4749. propOptions,
  4750. propsData,
  4751. vm
  4752. ) {
  4753. var prop = propOptions[key];
  4754. var absent = !hasOwn(propsData, key);
  4755. var value = propsData[key];
  4756. // boolean casting
  4757. var booleanIndex = getTypeIndex(Boolean, prop.type);
  4758. if (booleanIndex > -1) {
  4759. if (absent && !hasOwn(prop, 'default')) {
  4760. value = false;
  4761. } else if (value === '' || value === hyphenate(key)) {
  4762. // only cast empty string / same name to boolean if
  4763. // boolean has higher priority
  4764. var stringIndex = getTypeIndex(String, prop.type);
  4765. if (stringIndex < 0 || booleanIndex < stringIndex) {
  4766. value = true;
  4767. }
  4768. }
  4769. }
  4770. // check default value
  4771. if (value === undefined) {
  4772. value = getPropDefaultValue(vm, prop, key);
  4773. // since the default value is a fresh copy,
  4774. // make sure to observe it.
  4775. var prevShouldObserve = shouldObserve;
  4776. toggleObserving(true);
  4777. observe(value);
  4778. toggleObserving(prevShouldObserve);
  4779. }
  4780. if (
  4781. true
  4782. ) {
  4783. assertProp(prop, key, value, vm, absent);
  4784. }
  4785. return value
  4786. }
  4787. /**
  4788. * Get the default value of a prop.
  4789. */
  4790. function getPropDefaultValue (vm, prop, key) {
  4791. // no default, return undefined
  4792. if (!hasOwn(prop, 'default')) {
  4793. return undefined
  4794. }
  4795. var def = prop.default;
  4796. // warn against non-factory defaults for Object & Array
  4797. if ( true && isObject(def)) {
  4798. warn(
  4799. 'Invalid default value for prop "' + key + '": ' +
  4800. 'Props with type Object/Array must use a factory function ' +
  4801. 'to return the default value.',
  4802. vm
  4803. );
  4804. }
  4805. // the raw prop value was also undefined from previous render,
  4806. // return previous default value to avoid unnecessary watcher trigger
  4807. if (vm && vm.$options.propsData &&
  4808. vm.$options.propsData[key] === undefined &&
  4809. vm._props[key] !== undefined
  4810. ) {
  4811. return vm._props[key]
  4812. }
  4813. // call factory function for non-Function types
  4814. // a value is Function if its prototype is function even across different execution context
  4815. return typeof def === 'function' && getType(prop.type) !== 'Function'
  4816. ? def.call(vm)
  4817. : def
  4818. }
  4819. /**
  4820. * Assert whether a prop is valid.
  4821. */
  4822. function assertProp (
  4823. prop,
  4824. name,
  4825. value,
  4826. vm,
  4827. absent
  4828. ) {
  4829. if (prop.required && absent) {
  4830. warn(
  4831. 'Missing required prop: "' + name + '"',
  4832. vm
  4833. );
  4834. return
  4835. }
  4836. if (value == null && !prop.required) {
  4837. return
  4838. }
  4839. var type = prop.type;
  4840. var valid = !type || type === true;
  4841. var expectedTypes = [];
  4842. if (type) {
  4843. if (!Array.isArray(type)) {
  4844. type = [type];
  4845. }
  4846. for (var i = 0; i < type.length && !valid; i++) {
  4847. var assertedType = assertType(value, type[i]);
  4848. expectedTypes.push(assertedType.expectedType || '');
  4849. valid = assertedType.valid;
  4850. }
  4851. }
  4852. if (!valid) {
  4853. warn(
  4854. getInvalidTypeMessage(name, value, expectedTypes),
  4855. vm
  4856. );
  4857. return
  4858. }
  4859. var validator = prop.validator;
  4860. if (validator) {
  4861. if (!validator(value)) {
  4862. warn(
  4863. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  4864. vm
  4865. );
  4866. }
  4867. }
  4868. }
  4869. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  4870. function assertType (value, type) {
  4871. var valid;
  4872. var expectedType = getType(type);
  4873. if (simpleCheckRE.test(expectedType)) {
  4874. var t = typeof value;
  4875. valid = t === expectedType.toLowerCase();
  4876. // for primitive wrapper objects
  4877. if (!valid && t === 'object') {
  4878. valid = value instanceof type;
  4879. }
  4880. } else if (expectedType === 'Object') {
  4881. valid = isPlainObject(value);
  4882. } else if (expectedType === 'Array') {
  4883. valid = Array.isArray(value);
  4884. } else {
  4885. valid = value instanceof type;
  4886. }
  4887. return {
  4888. valid: valid,
  4889. expectedType: expectedType
  4890. }
  4891. }
  4892. /**
  4893. * Use function string name to check built-in types,
  4894. * because a simple equality check will fail when running
  4895. * across different vms / iframes.
  4896. */
  4897. function getType (fn) {
  4898. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  4899. return match ? match[1] : ''
  4900. }
  4901. function isSameType (a, b) {
  4902. return getType(a) === getType(b)
  4903. }
  4904. function getTypeIndex (type, expectedTypes) {
  4905. if (!Array.isArray(expectedTypes)) {
  4906. return isSameType(expectedTypes, type) ? 0 : -1
  4907. }
  4908. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  4909. if (isSameType(expectedTypes[i], type)) {
  4910. return i
  4911. }
  4912. }
  4913. return -1
  4914. }
  4915. function getInvalidTypeMessage (name, value, expectedTypes) {
  4916. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  4917. " Expected " + (expectedTypes.map(capitalize).join(', '));
  4918. var expectedType = expectedTypes[0];
  4919. var receivedType = toRawType(value);
  4920. var expectedValue = styleValue(value, expectedType);
  4921. var receivedValue = styleValue(value, receivedType);
  4922. // check if we need to specify expected value
  4923. if (expectedTypes.length === 1 &&
  4924. isExplicable(expectedType) &&
  4925. !isBoolean(expectedType, receivedType)) {
  4926. message += " with value " + expectedValue;
  4927. }
  4928. message += ", got " + receivedType + " ";
  4929. // check if we need to specify received value
  4930. if (isExplicable(receivedType)) {
  4931. message += "with value " + receivedValue + ".";
  4932. }
  4933. return message
  4934. }
  4935. function styleValue (value, type) {
  4936. if (type === 'String') {
  4937. return ("\"" + value + "\"")
  4938. } else if (type === 'Number') {
  4939. return ("" + (Number(value)))
  4940. } else {
  4941. return ("" + value)
  4942. }
  4943. }
  4944. function isExplicable (value) {
  4945. var explicitTypes = ['string', 'number', 'boolean'];
  4946. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  4947. }
  4948. function isBoolean () {
  4949. var args = [], len = arguments.length;
  4950. while ( len-- ) args[ len ] = arguments[ len ];
  4951. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  4952. }
  4953. /* */
  4954. function handleError (err, vm, info) {
  4955. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  4956. // See: https://github.com/vuejs/vuex/issues/1505
  4957. pushTarget();
  4958. try {
  4959. if (vm) {
  4960. var cur = vm;
  4961. while ((cur = cur.$parent)) {
  4962. var hooks = cur.$options.errorCaptured;
  4963. if (hooks) {
  4964. for (var i = 0; i < hooks.length; i++) {
  4965. try {
  4966. var capture = hooks[i].call(cur, err, vm, info) === false;
  4967. if (capture) { return }
  4968. } catch (e) {
  4969. globalHandleError(e, cur, 'errorCaptured hook');
  4970. }
  4971. }
  4972. }
  4973. }
  4974. }
  4975. globalHandleError(err, vm, info);
  4976. } finally {
  4977. popTarget();
  4978. }
  4979. }
  4980. function invokeWithErrorHandling (
  4981. handler,
  4982. context,
  4983. args,
  4984. vm,
  4985. info
  4986. ) {
  4987. var res;
  4988. try {
  4989. res = args ? handler.apply(context, args) : handler.call(context);
  4990. if (res && !res._isVue && isPromise(res) && !res._handled) {
  4991. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  4992. // issue #9511
  4993. // avoid catch triggering multiple times when nested calls
  4994. res._handled = true;
  4995. }
  4996. } catch (e) {
  4997. handleError(e, vm, info);
  4998. }
  4999. return res
  5000. }
  5001. function globalHandleError (err, vm, info) {
  5002. if (config.errorHandler) {
  5003. try {
  5004. return config.errorHandler.call(null, err, vm, info)
  5005. } catch (e) {
  5006. // if the user intentionally throws the original error in the handler,
  5007. // do not log it twice
  5008. if (e !== err) {
  5009. logError(e, null, 'config.errorHandler');
  5010. }
  5011. }
  5012. }
  5013. logError(err, vm, info);
  5014. }
  5015. function logError (err, vm, info) {
  5016. if (true) {
  5017. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  5018. }
  5019. /* istanbul ignore else */
  5020. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  5021. console.error(err);
  5022. } else {
  5023. throw err
  5024. }
  5025. }
  5026. /* */
  5027. var callbacks = [];
  5028. var pending = false;
  5029. function flushCallbacks () {
  5030. pending = false;
  5031. var copies = callbacks.slice(0);
  5032. callbacks.length = 0;
  5033. for (var i = 0; i < copies.length; i++) {
  5034. copies[i]();
  5035. }
  5036. }
  5037. // Here we have async deferring wrappers using microtasks.
  5038. // In 2.5 we used (macro) tasks (in combination with microtasks).
  5039. // However, it has subtle problems when state is changed right before repaint
  5040. // (e.g. #6813, out-in transitions).
  5041. // Also, using (macro) tasks in event handler would cause some weird behaviors
  5042. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  5043. // So we now use microtasks everywhere, again.
  5044. // A major drawback of this tradeoff is that there are some scenarios
  5045. // where microtasks have too high a priority and fire in between supposedly
  5046. // sequential events (e.g. #4521, #6690, which have workarounds)
  5047. // or even between bubbling of the same event (#6566).
  5048. var timerFunc;
  5049. // The nextTick behavior leverages the microtask queue, which can be accessed
  5050. // via either native Promise.then or MutationObserver.
  5051. // MutationObserver has wider support, however it is seriously bugged in
  5052. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  5053. // completely stops working after triggering a few times... so, if native
  5054. // Promise is available, we will use it:
  5055. /* istanbul ignore next, $flow-disable-line */
  5056. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  5057. var p = Promise.resolve();
  5058. timerFunc = function () {
  5059. p.then(flushCallbacks);
  5060. // In problematic UIWebViews, Promise.then doesn't completely break, but
  5061. // it can get stuck in a weird state where callbacks are pushed into the
  5062. // microtask queue but the queue isn't being flushed, until the browser
  5063. // needs to do some other work, e.g. handle a timer. Therefore we can
  5064. // "force" the microtask queue to be flushed by adding an empty timer.
  5065. if (isIOS) { setTimeout(noop); }
  5066. };
  5067. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  5068. isNative(MutationObserver) ||
  5069. // PhantomJS and iOS 7.x
  5070. MutationObserver.toString() === '[object MutationObserverConstructor]'
  5071. )) {
  5072. // Use MutationObserver where native Promise is not available,
  5073. // e.g. PhantomJS, iOS7, Android 4.4
  5074. // (#6466 MutationObserver is unreliable in IE11)
  5075. var counter = 1;
  5076. var observer = new MutationObserver(flushCallbacks);
  5077. var textNode = document.createTextNode(String(counter));
  5078. observer.observe(textNode, {
  5079. characterData: true
  5080. });
  5081. timerFunc = function () {
  5082. counter = (counter + 1) % 2;
  5083. textNode.data = String(counter);
  5084. };
  5085. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  5086. // Fallback to setImmediate.
  5087. // Technically it leverages the (macro) task queue,
  5088. // but it is still a better choice than setTimeout.
  5089. timerFunc = function () {
  5090. setImmediate(flushCallbacks);
  5091. };
  5092. } else {
  5093. // Fallback to setTimeout.
  5094. timerFunc = function () {
  5095. setTimeout(flushCallbacks, 0);
  5096. };
  5097. }
  5098. function nextTick (cb, ctx) {
  5099. var _resolve;
  5100. callbacks.push(function () {
  5101. if (cb) {
  5102. try {
  5103. cb.call(ctx);
  5104. } catch (e) {
  5105. handleError(e, ctx, 'nextTick');
  5106. }
  5107. } else if (_resolve) {
  5108. _resolve(ctx);
  5109. }
  5110. });
  5111. if (!pending) {
  5112. pending = true;
  5113. timerFunc();
  5114. }
  5115. // $flow-disable-line
  5116. if (!cb && typeof Promise !== 'undefined') {
  5117. return new Promise(function (resolve) {
  5118. _resolve = resolve;
  5119. })
  5120. }
  5121. }
  5122. /* */
  5123. /* not type checking this file because flow doesn't play well with Proxy */
  5124. var initProxy;
  5125. if (true) {
  5126. var allowedGlobals = makeMap(
  5127. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  5128. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  5129. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  5130. 'require' // for Webpack/Browserify
  5131. );
  5132. var warnNonPresent = function (target, key) {
  5133. warn(
  5134. "Property or method \"" + key + "\" is not defined on the instance but " +
  5135. 'referenced during render. Make sure that this property is reactive, ' +
  5136. 'either in the data option, or for class-based components, by ' +
  5137. 'initializing the property. ' +
  5138. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  5139. target
  5140. );
  5141. };
  5142. var warnReservedPrefix = function (target, key) {
  5143. warn(
  5144. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  5145. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  5146. 'prevent conflicts with Vue internals. ' +
  5147. 'See: https://vuejs.org/v2/api/#data',
  5148. target
  5149. );
  5150. };
  5151. var hasProxy =
  5152. typeof Proxy !== 'undefined' && isNative(Proxy);
  5153. if (hasProxy) {
  5154. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  5155. config.keyCodes = new Proxy(config.keyCodes, {
  5156. set: function set (target, key, value) {
  5157. if (isBuiltInModifier(key)) {
  5158. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  5159. return false
  5160. } else {
  5161. target[key] = value;
  5162. return true
  5163. }
  5164. }
  5165. });
  5166. }
  5167. var hasHandler = {
  5168. has: function has (target, key) {
  5169. var has = key in target;
  5170. var isAllowed = allowedGlobals(key) ||
  5171. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  5172. if (!has && !isAllowed) {
  5173. if (key in target.$data) { warnReservedPrefix(target, key); }
  5174. else { warnNonPresent(target, key); }
  5175. }
  5176. return has || !isAllowed
  5177. }
  5178. };
  5179. var getHandler = {
  5180. get: function get (target, key) {
  5181. if (typeof key === 'string' && !(key in target)) {
  5182. if (key in target.$data) { warnReservedPrefix(target, key); }
  5183. else { warnNonPresent(target, key); }
  5184. }
  5185. return target[key]
  5186. }
  5187. };
  5188. initProxy = function initProxy (vm) {
  5189. if (hasProxy) {
  5190. // determine which proxy handler to use
  5191. var options = vm.$options;
  5192. var handlers = options.render && options.render._withStripped
  5193. ? getHandler
  5194. : hasHandler;
  5195. vm._renderProxy = new Proxy(vm, handlers);
  5196. } else {
  5197. vm._renderProxy = vm;
  5198. }
  5199. };
  5200. }
  5201. /* */
  5202. var seenObjects = new _Set();
  5203. /**
  5204. * Recursively traverse an object to evoke all converted
  5205. * getters, so that every nested property inside the object
  5206. * is collected as a "deep" dependency.
  5207. */
  5208. function traverse (val) {
  5209. _traverse(val, seenObjects);
  5210. seenObjects.clear();
  5211. }
  5212. function _traverse (val, seen) {
  5213. var i, keys;
  5214. var isA = Array.isArray(val);
  5215. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  5216. return
  5217. }
  5218. if (val.__ob__) {
  5219. var depId = val.__ob__.dep.id;
  5220. if (seen.has(depId)) {
  5221. return
  5222. }
  5223. seen.add(depId);
  5224. }
  5225. if (isA) {
  5226. i = val.length;
  5227. while (i--) { _traverse(val[i], seen); }
  5228. } else {
  5229. keys = Object.keys(val);
  5230. i = keys.length;
  5231. while (i--) { _traverse(val[keys[i]], seen); }
  5232. }
  5233. }
  5234. var mark;
  5235. var measure;
  5236. if (true) {
  5237. var perf = inBrowser && window.performance;
  5238. /* istanbul ignore if */
  5239. if (
  5240. perf &&
  5241. perf.mark &&
  5242. perf.measure &&
  5243. perf.clearMarks &&
  5244. perf.clearMeasures
  5245. ) {
  5246. mark = function (tag) { return perf.mark(tag); };
  5247. measure = function (name, startTag, endTag) {
  5248. perf.measure(name, startTag, endTag);
  5249. perf.clearMarks(startTag);
  5250. perf.clearMarks(endTag);
  5251. // perf.clearMeasures(name)
  5252. };
  5253. }
  5254. }
  5255. /* */
  5256. var normalizeEvent = cached(function (name) {
  5257. var passive = name.charAt(0) === '&';
  5258. name = passive ? name.slice(1) : name;
  5259. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  5260. name = once$$1 ? name.slice(1) : name;
  5261. var capture = name.charAt(0) === '!';
  5262. name = capture ? name.slice(1) : name;
  5263. return {
  5264. name: name,
  5265. once: once$$1,
  5266. capture: capture,
  5267. passive: passive
  5268. }
  5269. });
  5270. function createFnInvoker (fns, vm) {
  5271. function invoker () {
  5272. var arguments$1 = arguments;
  5273. var fns = invoker.fns;
  5274. if (Array.isArray(fns)) {
  5275. var cloned = fns.slice();
  5276. for (var i = 0; i < cloned.length; i++) {
  5277. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  5278. }
  5279. } else {
  5280. // return handler return value for single handlers
  5281. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  5282. }
  5283. }
  5284. invoker.fns = fns;
  5285. return invoker
  5286. }
  5287. function updateListeners (
  5288. on,
  5289. oldOn,
  5290. add,
  5291. remove$$1,
  5292. createOnceHandler,
  5293. vm
  5294. ) {
  5295. var name, def$$1, cur, old, event;
  5296. for (name in on) {
  5297. def$$1 = cur = on[name];
  5298. old = oldOn[name];
  5299. event = normalizeEvent(name);
  5300. if (isUndef(cur)) {
  5301. true && warn(
  5302. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  5303. vm
  5304. );
  5305. } else if (isUndef(old)) {
  5306. if (isUndef(cur.fns)) {
  5307. cur = on[name] = createFnInvoker(cur, vm);
  5308. }
  5309. if (isTrue(event.once)) {
  5310. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  5311. }
  5312. add(event.name, cur, event.capture, event.passive, event.params);
  5313. } else if (cur !== old) {
  5314. old.fns = cur;
  5315. on[name] = old;
  5316. }
  5317. }
  5318. for (name in oldOn) {
  5319. if (isUndef(on[name])) {
  5320. event = normalizeEvent(name);
  5321. remove$$1(event.name, oldOn[name], event.capture);
  5322. }
  5323. }
  5324. }
  5325. /* */
  5326. /* */
  5327. // fixed by xxxxxx (mp properties)
  5328. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  5329. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  5330. if (isUndef(propOptions)) {
  5331. return res
  5332. }
  5333. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  5334. var attrs = data.attrs;
  5335. var props = data.props;
  5336. if (isDef(attrs) || isDef(props)) {
  5337. for (var key in propOptions) {
  5338. var altKey = hyphenate(key);
  5339. var result = checkProp(res, props, key, altKey, true) ||
  5340. checkProp(res, attrs, key, altKey, false);
  5341. // externalClass
  5342. if (
  5343. result &&
  5344. res[key] &&
  5345. externalClasses.indexOf(altKey) !== -1 &&
  5346. context[camelize(res[key])]
  5347. ) {
  5348. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  5349. res[key] = context[camelize(res[key])];
  5350. }
  5351. }
  5352. }
  5353. return res
  5354. }
  5355. function extractPropsFromVNodeData (
  5356. data,
  5357. Ctor,
  5358. tag,
  5359. context// fixed by xxxxxx
  5360. ) {
  5361. // we are only extracting raw values here.
  5362. // validation and default values are handled in the child
  5363. // component itself.
  5364. var propOptions = Ctor.options.props;
  5365. if (isUndef(propOptions)) {
  5366. // fixed by xxxxxx
  5367. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  5368. }
  5369. var res = {};
  5370. var attrs = data.attrs;
  5371. var props = data.props;
  5372. if (isDef(attrs) || isDef(props)) {
  5373. for (var key in propOptions) {
  5374. var altKey = hyphenate(key);
  5375. if (true) {
  5376. var keyInLowerCase = key.toLowerCase();
  5377. if (
  5378. key !== keyInLowerCase &&
  5379. attrs && hasOwn(attrs, keyInLowerCase)
  5380. ) {
  5381. tip(
  5382. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  5383. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  5384. " \"" + key + "\". " +
  5385. "Note that HTML attributes are case-insensitive and camelCased " +
  5386. "props need to use their kebab-case equivalents when using in-DOM " +
  5387. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  5388. );
  5389. }
  5390. }
  5391. checkProp(res, props, key, altKey, true) ||
  5392. checkProp(res, attrs, key, altKey, false);
  5393. }
  5394. }
  5395. // fixed by xxxxxx
  5396. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  5397. }
  5398. function checkProp (
  5399. res,
  5400. hash,
  5401. key,
  5402. altKey,
  5403. preserve
  5404. ) {
  5405. if (isDef(hash)) {
  5406. if (hasOwn(hash, key)) {
  5407. res[key] = hash[key];
  5408. if (!preserve) {
  5409. delete hash[key];
  5410. }
  5411. return true
  5412. } else if (hasOwn(hash, altKey)) {
  5413. res[key] = hash[altKey];
  5414. if (!preserve) {
  5415. delete hash[altKey];
  5416. }
  5417. return true
  5418. }
  5419. }
  5420. return false
  5421. }
  5422. /* */
  5423. // The template compiler attempts to minimize the need for normalization by
  5424. // statically analyzing the template at compile time.
  5425. //
  5426. // For plain HTML markup, normalization can be completely skipped because the
  5427. // generated render function is guaranteed to return Array<VNode>. There are
  5428. // two cases where extra normalization is needed:
  5429. // 1. When the children contains components - because a functional component
  5430. // may return an Array instead of a single root. In this case, just a simple
  5431. // normalization is needed - if any child is an Array, we flatten the whole
  5432. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  5433. // because functional components already normalize their own children.
  5434. function simpleNormalizeChildren (children) {
  5435. for (var i = 0; i < children.length; i++) {
  5436. if (Array.isArray(children[i])) {
  5437. return Array.prototype.concat.apply([], children)
  5438. }
  5439. }
  5440. return children
  5441. }
  5442. // 2. When the children contains constructs that always generated nested Arrays,
  5443. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  5444. // with hand-written render functions / JSX. In such cases a full normalization
  5445. // is needed to cater to all possible types of children values.
  5446. function normalizeChildren (children) {
  5447. return isPrimitive(children)
  5448. ? [createTextVNode(children)]
  5449. : Array.isArray(children)
  5450. ? normalizeArrayChildren(children)
  5451. : undefined
  5452. }
  5453. function isTextNode (node) {
  5454. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  5455. }
  5456. function normalizeArrayChildren (children, nestedIndex) {
  5457. var res = [];
  5458. var i, c, lastIndex, last;
  5459. for (i = 0; i < children.length; i++) {
  5460. c = children[i];
  5461. if (isUndef(c) || typeof c === 'boolean') { continue }
  5462. lastIndex = res.length - 1;
  5463. last = res[lastIndex];
  5464. // nested
  5465. if (Array.isArray(c)) {
  5466. if (c.length > 0) {
  5467. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  5468. // merge adjacent text nodes
  5469. if (isTextNode(c[0]) && isTextNode(last)) {
  5470. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  5471. c.shift();
  5472. }
  5473. res.push.apply(res, c);
  5474. }
  5475. } else if (isPrimitive(c)) {
  5476. if (isTextNode(last)) {
  5477. // merge adjacent text nodes
  5478. // this is necessary for SSR hydration because text nodes are
  5479. // essentially merged when rendered to HTML strings
  5480. res[lastIndex] = createTextVNode(last.text + c);
  5481. } else if (c !== '') {
  5482. // convert primitive to vnode
  5483. res.push(createTextVNode(c));
  5484. }
  5485. } else {
  5486. if (isTextNode(c) && isTextNode(last)) {
  5487. // merge adjacent text nodes
  5488. res[lastIndex] = createTextVNode(last.text + c.text);
  5489. } else {
  5490. // default key for nested array children (likely generated by v-for)
  5491. if (isTrue(children._isVList) &&
  5492. isDef(c.tag) &&
  5493. isUndef(c.key) &&
  5494. isDef(nestedIndex)) {
  5495. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  5496. }
  5497. res.push(c);
  5498. }
  5499. }
  5500. }
  5501. return res
  5502. }
  5503. /* */
  5504. function initProvide (vm) {
  5505. var provide = vm.$options.provide;
  5506. if (provide) {
  5507. vm._provided = typeof provide === 'function'
  5508. ? provide.call(vm)
  5509. : provide;
  5510. }
  5511. }
  5512. function initInjections (vm) {
  5513. var result = resolveInject(vm.$options.inject, vm);
  5514. if (result) {
  5515. toggleObserving(false);
  5516. Object.keys(result).forEach(function (key) {
  5517. /* istanbul ignore else */
  5518. if (true) {
  5519. defineReactive$$1(vm, key, result[key], function () {
  5520. warn(
  5521. "Avoid mutating an injected value directly since the changes will be " +
  5522. "overwritten whenever the provided component re-renders. " +
  5523. "injection being mutated: \"" + key + "\"",
  5524. vm
  5525. );
  5526. });
  5527. } else {}
  5528. });
  5529. toggleObserving(true);
  5530. }
  5531. }
  5532. function resolveInject (inject, vm) {
  5533. if (inject) {
  5534. // inject is :any because flow is not smart enough to figure out cached
  5535. var result = Object.create(null);
  5536. var keys = hasSymbol
  5537. ? Reflect.ownKeys(inject)
  5538. : Object.keys(inject);
  5539. for (var i = 0; i < keys.length; i++) {
  5540. var key = keys[i];
  5541. // #6574 in case the inject object is observed...
  5542. if (key === '__ob__') { continue }
  5543. var provideKey = inject[key].from;
  5544. var source = vm;
  5545. while (source) {
  5546. if (source._provided && hasOwn(source._provided, provideKey)) {
  5547. result[key] = source._provided[provideKey];
  5548. break
  5549. }
  5550. source = source.$parent;
  5551. }
  5552. if (!source) {
  5553. if ('default' in inject[key]) {
  5554. var provideDefault = inject[key].default;
  5555. result[key] = typeof provideDefault === 'function'
  5556. ? provideDefault.call(vm)
  5557. : provideDefault;
  5558. } else if (true) {
  5559. warn(("Injection \"" + key + "\" not found"), vm);
  5560. }
  5561. }
  5562. }
  5563. return result
  5564. }
  5565. }
  5566. /* */
  5567. /**
  5568. * Runtime helper for resolving raw children VNodes into a slot object.
  5569. */
  5570. function resolveSlots (
  5571. children,
  5572. context
  5573. ) {
  5574. if (!children || !children.length) {
  5575. return {}
  5576. }
  5577. var slots = {};
  5578. for (var i = 0, l = children.length; i < l; i++) {
  5579. var child = children[i];
  5580. var data = child.data;
  5581. // remove slot attribute if the node is resolved as a Vue slot node
  5582. if (data && data.attrs && data.attrs.slot) {
  5583. delete data.attrs.slot;
  5584. }
  5585. // named slots should only be respected if the vnode was rendered in the
  5586. // same context.
  5587. if ((child.context === context || child.fnContext === context) &&
  5588. data && data.slot != null
  5589. ) {
  5590. var name = data.slot;
  5591. var slot = (slots[name] || (slots[name] = []));
  5592. if (child.tag === 'template') {
  5593. slot.push.apply(slot, child.children || []);
  5594. } else {
  5595. slot.push(child);
  5596. }
  5597. } else {
  5598. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  5599. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  5600. (slots['page'] || (slots['page'] = [])).push(child);
  5601. }else{
  5602. (slots.default || (slots.default = [])).push(child);
  5603. }
  5604. }
  5605. }
  5606. // ignore slots that contains only whitespace
  5607. for (var name$1 in slots) {
  5608. if (slots[name$1].every(isWhitespace)) {
  5609. delete slots[name$1];
  5610. }
  5611. }
  5612. return slots
  5613. }
  5614. function isWhitespace (node) {
  5615. return (node.isComment && !node.asyncFactory) || node.text === ' '
  5616. }
  5617. /* */
  5618. function normalizeScopedSlots (
  5619. slots,
  5620. normalSlots,
  5621. prevSlots
  5622. ) {
  5623. var res;
  5624. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  5625. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  5626. var key = slots && slots.$key;
  5627. if (!slots) {
  5628. res = {};
  5629. } else if (slots._normalized) {
  5630. // fast path 1: child component re-render only, parent did not change
  5631. return slots._normalized
  5632. } else if (
  5633. isStable &&
  5634. prevSlots &&
  5635. prevSlots !== emptyObject &&
  5636. key === prevSlots.$key &&
  5637. !hasNormalSlots &&
  5638. !prevSlots.$hasNormal
  5639. ) {
  5640. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  5641. // only need to normalize once
  5642. return prevSlots
  5643. } else {
  5644. res = {};
  5645. for (var key$1 in slots) {
  5646. if (slots[key$1] && key$1[0] !== '$') {
  5647. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  5648. }
  5649. }
  5650. }
  5651. // expose normal slots on scopedSlots
  5652. for (var key$2 in normalSlots) {
  5653. if (!(key$2 in res)) {
  5654. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  5655. }
  5656. }
  5657. // avoriaz seems to mock a non-extensible $scopedSlots object
  5658. // and when that is passed down this would cause an error
  5659. if (slots && Object.isExtensible(slots)) {
  5660. (slots)._normalized = res;
  5661. }
  5662. def(res, '$stable', isStable);
  5663. def(res, '$key', key);
  5664. def(res, '$hasNormal', hasNormalSlots);
  5665. return res
  5666. }
  5667. function normalizeScopedSlot(normalSlots, key, fn) {
  5668. var normalized = function () {
  5669. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  5670. res = res && typeof res === 'object' && !Array.isArray(res)
  5671. ? [res] // single vnode
  5672. : normalizeChildren(res);
  5673. return res && (
  5674. res.length === 0 ||
  5675. (res.length === 1 && res[0].isComment) // #9658
  5676. ) ? undefined
  5677. : res
  5678. };
  5679. // this is a slot using the new v-slot syntax without scope. although it is
  5680. // compiled as a scoped slot, render fn users would expect it to be present
  5681. // on this.$slots because the usage is semantically a normal slot.
  5682. if (fn.proxy) {
  5683. Object.defineProperty(normalSlots, key, {
  5684. get: normalized,
  5685. enumerable: true,
  5686. configurable: true
  5687. });
  5688. }
  5689. return normalized
  5690. }
  5691. function proxyNormalSlot(slots, key) {
  5692. return function () { return slots[key]; }
  5693. }
  5694. /* */
  5695. /**
  5696. * Runtime helper for rendering v-for lists.
  5697. */
  5698. function renderList (
  5699. val,
  5700. render
  5701. ) {
  5702. var ret, i, l, keys, key;
  5703. if (Array.isArray(val) || typeof val === 'string') {
  5704. ret = new Array(val.length);
  5705. for (i = 0, l = val.length; i < l; i++) {
  5706. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  5707. }
  5708. } else if (typeof val === 'number') {
  5709. ret = new Array(val);
  5710. for (i = 0; i < val; i++) {
  5711. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  5712. }
  5713. } else if (isObject(val)) {
  5714. if (hasSymbol && val[Symbol.iterator]) {
  5715. ret = [];
  5716. var iterator = val[Symbol.iterator]();
  5717. var result = iterator.next();
  5718. while (!result.done) {
  5719. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  5720. result = iterator.next();
  5721. }
  5722. } else {
  5723. keys = Object.keys(val);
  5724. ret = new Array(keys.length);
  5725. for (i = 0, l = keys.length; i < l; i++) {
  5726. key = keys[i];
  5727. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  5728. }
  5729. }
  5730. }
  5731. if (!isDef(ret)) {
  5732. ret = [];
  5733. }
  5734. (ret)._isVList = true;
  5735. return ret
  5736. }
  5737. /* */
  5738. /**
  5739. * Runtime helper for rendering <slot>
  5740. */
  5741. function renderSlot (
  5742. name,
  5743. fallback,
  5744. props,
  5745. bindObject
  5746. ) {
  5747. var scopedSlotFn = this.$scopedSlots[name];
  5748. var nodes;
  5749. if (scopedSlotFn) { // scoped slot
  5750. props = props || {};
  5751. if (bindObject) {
  5752. if ( true && !isObject(bindObject)) {
  5753. warn(
  5754. 'slot v-bind without argument expects an Object',
  5755. this
  5756. );
  5757. }
  5758. props = extend(extend({}, bindObject), props);
  5759. }
  5760. // fixed by xxxxxx app-plus scopedSlot
  5761. nodes = scopedSlotFn(props, this, props._i) || fallback;
  5762. } else {
  5763. nodes = this.$slots[name] || fallback;
  5764. }
  5765. var target = props && props.slot;
  5766. if (target) {
  5767. return this.$createElement('template', { slot: target }, nodes)
  5768. } else {
  5769. return nodes
  5770. }
  5771. }
  5772. /* */
  5773. /**
  5774. * Runtime helper for resolving filters
  5775. */
  5776. function resolveFilter (id) {
  5777. return resolveAsset(this.$options, 'filters', id, true) || identity
  5778. }
  5779. /* */
  5780. function isKeyNotMatch (expect, actual) {
  5781. if (Array.isArray(expect)) {
  5782. return expect.indexOf(actual) === -1
  5783. } else {
  5784. return expect !== actual
  5785. }
  5786. }
  5787. /**
  5788. * Runtime helper for checking keyCodes from config.
  5789. * exposed as Vue.prototype._k
  5790. * passing in eventKeyName as last argument separately for backwards compat
  5791. */
  5792. function checkKeyCodes (
  5793. eventKeyCode,
  5794. key,
  5795. builtInKeyCode,
  5796. eventKeyName,
  5797. builtInKeyName
  5798. ) {
  5799. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  5800. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  5801. return isKeyNotMatch(builtInKeyName, eventKeyName)
  5802. } else if (mappedKeyCode) {
  5803. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  5804. } else if (eventKeyName) {
  5805. return hyphenate(eventKeyName) !== key
  5806. }
  5807. }
  5808. /* */
  5809. /**
  5810. * Runtime helper for merging v-bind="object" into a VNode's data.
  5811. */
  5812. function bindObjectProps (
  5813. data,
  5814. tag,
  5815. value,
  5816. asProp,
  5817. isSync
  5818. ) {
  5819. if (value) {
  5820. if (!isObject(value)) {
  5821. true && warn(
  5822. 'v-bind without argument expects an Object or Array value',
  5823. this
  5824. );
  5825. } else {
  5826. if (Array.isArray(value)) {
  5827. value = toObject(value);
  5828. }
  5829. var hash;
  5830. var loop = function ( key ) {
  5831. if (
  5832. key === 'class' ||
  5833. key === 'style' ||
  5834. isReservedAttribute(key)
  5835. ) {
  5836. hash = data;
  5837. } else {
  5838. var type = data.attrs && data.attrs.type;
  5839. hash = asProp || config.mustUseProp(tag, type, key)
  5840. ? data.domProps || (data.domProps = {})
  5841. : data.attrs || (data.attrs = {});
  5842. }
  5843. var camelizedKey = camelize(key);
  5844. var hyphenatedKey = hyphenate(key);
  5845. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  5846. hash[key] = value[key];
  5847. if (isSync) {
  5848. var on = data.on || (data.on = {});
  5849. on[("update:" + key)] = function ($event) {
  5850. value[key] = $event;
  5851. };
  5852. }
  5853. }
  5854. };
  5855. for (var key in value) loop( key );
  5856. }
  5857. }
  5858. return data
  5859. }
  5860. /* */
  5861. /**
  5862. * Runtime helper for rendering static trees.
  5863. */
  5864. function renderStatic (
  5865. index,
  5866. isInFor
  5867. ) {
  5868. var cached = this._staticTrees || (this._staticTrees = []);
  5869. var tree = cached[index];
  5870. // if has already-rendered static tree and not inside v-for,
  5871. // we can reuse the same tree.
  5872. if (tree && !isInFor) {
  5873. return tree
  5874. }
  5875. // otherwise, render a fresh tree.
  5876. tree = cached[index] = this.$options.staticRenderFns[index].call(
  5877. this._renderProxy,
  5878. null,
  5879. this // for render fns generated for functional component templates
  5880. );
  5881. markStatic(tree, ("__static__" + index), false);
  5882. return tree
  5883. }
  5884. /**
  5885. * Runtime helper for v-once.
  5886. * Effectively it means marking the node as static with a unique key.
  5887. */
  5888. function markOnce (
  5889. tree,
  5890. index,
  5891. key
  5892. ) {
  5893. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  5894. return tree
  5895. }
  5896. function markStatic (
  5897. tree,
  5898. key,
  5899. isOnce
  5900. ) {
  5901. if (Array.isArray(tree)) {
  5902. for (var i = 0; i < tree.length; i++) {
  5903. if (tree[i] && typeof tree[i] !== 'string') {
  5904. markStaticNode(tree[i], (key + "_" + i), isOnce);
  5905. }
  5906. }
  5907. } else {
  5908. markStaticNode(tree, key, isOnce);
  5909. }
  5910. }
  5911. function markStaticNode (node, key, isOnce) {
  5912. node.isStatic = true;
  5913. node.key = key;
  5914. node.isOnce = isOnce;
  5915. }
  5916. /* */
  5917. function bindObjectListeners (data, value) {
  5918. if (value) {
  5919. if (!isPlainObject(value)) {
  5920. true && warn(
  5921. 'v-on without argument expects an Object value',
  5922. this
  5923. );
  5924. } else {
  5925. var on = data.on = data.on ? extend({}, data.on) : {};
  5926. for (var key in value) {
  5927. var existing = on[key];
  5928. var ours = value[key];
  5929. on[key] = existing ? [].concat(existing, ours) : ours;
  5930. }
  5931. }
  5932. }
  5933. return data
  5934. }
  5935. /* */
  5936. function resolveScopedSlots (
  5937. fns, // see flow/vnode
  5938. res,
  5939. // the following are added in 2.6
  5940. hasDynamicKeys,
  5941. contentHashKey
  5942. ) {
  5943. res = res || { $stable: !hasDynamicKeys };
  5944. for (var i = 0; i < fns.length; i++) {
  5945. var slot = fns[i];
  5946. if (Array.isArray(slot)) {
  5947. resolveScopedSlots(slot, res, hasDynamicKeys);
  5948. } else if (slot) {
  5949. // marker for reverse proxying v-slot without scope on this.$slots
  5950. if (slot.proxy) {
  5951. slot.fn.proxy = true;
  5952. }
  5953. res[slot.key] = slot.fn;
  5954. }
  5955. }
  5956. if (contentHashKey) {
  5957. (res).$key = contentHashKey;
  5958. }
  5959. return res
  5960. }
  5961. /* */
  5962. function bindDynamicKeys (baseObj, values) {
  5963. for (var i = 0; i < values.length; i += 2) {
  5964. var key = values[i];
  5965. if (typeof key === 'string' && key) {
  5966. baseObj[values[i]] = values[i + 1];
  5967. } else if ( true && key !== '' && key !== null) {
  5968. // null is a special value for explicitly removing a binding
  5969. warn(
  5970. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  5971. this
  5972. );
  5973. }
  5974. }
  5975. return baseObj
  5976. }
  5977. // helper to dynamically append modifier runtime markers to event names.
  5978. // ensure only append when value is already string, otherwise it will be cast
  5979. // to string and cause the type check to miss.
  5980. function prependModifier (value, symbol) {
  5981. return typeof value === 'string' ? symbol + value : value
  5982. }
  5983. /* */
  5984. function installRenderHelpers (target) {
  5985. target._o = markOnce;
  5986. target._n = toNumber;
  5987. target._s = toString;
  5988. target._l = renderList;
  5989. target._t = renderSlot;
  5990. target._q = looseEqual;
  5991. target._i = looseIndexOf;
  5992. target._m = renderStatic;
  5993. target._f = resolveFilter;
  5994. target._k = checkKeyCodes;
  5995. target._b = bindObjectProps;
  5996. target._v = createTextVNode;
  5997. target._e = createEmptyVNode;
  5998. target._u = resolveScopedSlots;
  5999. target._g = bindObjectListeners;
  6000. target._d = bindDynamicKeys;
  6001. target._p = prependModifier;
  6002. }
  6003. /* */
  6004. function FunctionalRenderContext (
  6005. data,
  6006. props,
  6007. children,
  6008. parent,
  6009. Ctor
  6010. ) {
  6011. var this$1 = this;
  6012. var options = Ctor.options;
  6013. // ensure the createElement function in functional components
  6014. // gets a unique context - this is necessary for correct named slot check
  6015. var contextVm;
  6016. if (hasOwn(parent, '_uid')) {
  6017. contextVm = Object.create(parent);
  6018. // $flow-disable-line
  6019. contextVm._original = parent;
  6020. } else {
  6021. // the context vm passed in is a functional context as well.
  6022. // in this case we want to make sure we are able to get a hold to the
  6023. // real context instance.
  6024. contextVm = parent;
  6025. // $flow-disable-line
  6026. parent = parent._original;
  6027. }
  6028. var isCompiled = isTrue(options._compiled);
  6029. var needNormalization = !isCompiled;
  6030. this.data = data;
  6031. this.props = props;
  6032. this.children = children;
  6033. this.parent = parent;
  6034. this.listeners = data.on || emptyObject;
  6035. this.injections = resolveInject(options.inject, parent);
  6036. this.slots = function () {
  6037. if (!this$1.$slots) {
  6038. normalizeScopedSlots(
  6039. data.scopedSlots,
  6040. this$1.$slots = resolveSlots(children, parent)
  6041. );
  6042. }
  6043. return this$1.$slots
  6044. };
  6045. Object.defineProperty(this, 'scopedSlots', ({
  6046. enumerable: true,
  6047. get: function get () {
  6048. return normalizeScopedSlots(data.scopedSlots, this.slots())
  6049. }
  6050. }));
  6051. // support for compiled functional template
  6052. if (isCompiled) {
  6053. // exposing $options for renderStatic()
  6054. this.$options = options;
  6055. // pre-resolve slots for renderSlot()
  6056. this.$slots = this.slots();
  6057. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  6058. }
  6059. if (options._scopeId) {
  6060. this._c = function (a, b, c, d) {
  6061. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  6062. if (vnode && !Array.isArray(vnode)) {
  6063. vnode.fnScopeId = options._scopeId;
  6064. vnode.fnContext = parent;
  6065. }
  6066. return vnode
  6067. };
  6068. } else {
  6069. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  6070. }
  6071. }
  6072. installRenderHelpers(FunctionalRenderContext.prototype);
  6073. function createFunctionalComponent (
  6074. Ctor,
  6075. propsData,
  6076. data,
  6077. contextVm,
  6078. children
  6079. ) {
  6080. var options = Ctor.options;
  6081. var props = {};
  6082. var propOptions = options.props;
  6083. if (isDef(propOptions)) {
  6084. for (var key in propOptions) {
  6085. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  6086. }
  6087. } else {
  6088. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  6089. if (isDef(data.props)) { mergeProps(props, data.props); }
  6090. }
  6091. var renderContext = new FunctionalRenderContext(
  6092. data,
  6093. props,
  6094. children,
  6095. contextVm,
  6096. Ctor
  6097. );
  6098. var vnode = options.render.call(null, renderContext._c, renderContext);
  6099. if (vnode instanceof VNode) {
  6100. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  6101. } else if (Array.isArray(vnode)) {
  6102. var vnodes = normalizeChildren(vnode) || [];
  6103. var res = new Array(vnodes.length);
  6104. for (var i = 0; i < vnodes.length; i++) {
  6105. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  6106. }
  6107. return res
  6108. }
  6109. }
  6110. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  6111. // #7817 clone node before setting fnContext, otherwise if the node is reused
  6112. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  6113. // that should not be matched to match.
  6114. var clone = cloneVNode(vnode);
  6115. clone.fnContext = contextVm;
  6116. clone.fnOptions = options;
  6117. if (true) {
  6118. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  6119. }
  6120. if (data.slot) {
  6121. (clone.data || (clone.data = {})).slot = data.slot;
  6122. }
  6123. return clone
  6124. }
  6125. function mergeProps (to, from) {
  6126. for (var key in from) {
  6127. to[camelize(key)] = from[key];
  6128. }
  6129. }
  6130. /* */
  6131. /* */
  6132. /* */
  6133. /* */
  6134. // inline hooks to be invoked on component VNodes during patch
  6135. var componentVNodeHooks = {
  6136. init: function init (vnode, hydrating) {
  6137. if (
  6138. vnode.componentInstance &&
  6139. !vnode.componentInstance._isDestroyed &&
  6140. vnode.data.keepAlive
  6141. ) {
  6142. // kept-alive components, treat as a patch
  6143. var mountedNode = vnode; // work around flow
  6144. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  6145. } else {
  6146. var child = vnode.componentInstance = createComponentInstanceForVnode(
  6147. vnode,
  6148. activeInstance
  6149. );
  6150. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  6151. }
  6152. },
  6153. prepatch: function prepatch (oldVnode, vnode) {
  6154. var options = vnode.componentOptions;
  6155. var child = vnode.componentInstance = oldVnode.componentInstance;
  6156. updateChildComponent(
  6157. child,
  6158. options.propsData, // updated props
  6159. options.listeners, // updated listeners
  6160. vnode, // new parent vnode
  6161. options.children // new children
  6162. );
  6163. },
  6164. insert: function insert (vnode) {
  6165. var context = vnode.context;
  6166. var componentInstance = vnode.componentInstance;
  6167. if (!componentInstance._isMounted) {
  6168. callHook(componentInstance, 'onServiceCreated');
  6169. callHook(componentInstance, 'onServiceAttached');
  6170. componentInstance._isMounted = true;
  6171. callHook(componentInstance, 'mounted');
  6172. }
  6173. if (vnode.data.keepAlive) {
  6174. if (context._isMounted) {
  6175. // vue-router#1212
  6176. // During updates, a kept-alive component's child components may
  6177. // change, so directly walking the tree here may call activated hooks
  6178. // on incorrect children. Instead we push them into a queue which will
  6179. // be processed after the whole patch process ended.
  6180. queueActivatedComponent(componentInstance);
  6181. } else {
  6182. activateChildComponent(componentInstance, true /* direct */);
  6183. }
  6184. }
  6185. },
  6186. destroy: function destroy (vnode) {
  6187. var componentInstance = vnode.componentInstance;
  6188. if (!componentInstance._isDestroyed) {
  6189. if (!vnode.data.keepAlive) {
  6190. componentInstance.$destroy();
  6191. } else {
  6192. deactivateChildComponent(componentInstance, true /* direct */);
  6193. }
  6194. }
  6195. }
  6196. };
  6197. var hooksToMerge = Object.keys(componentVNodeHooks);
  6198. function createComponent (
  6199. Ctor,
  6200. data,
  6201. context,
  6202. children,
  6203. tag
  6204. ) {
  6205. if (isUndef(Ctor)) {
  6206. return
  6207. }
  6208. var baseCtor = context.$options._base;
  6209. // plain options object: turn it into a constructor
  6210. if (isObject(Ctor)) {
  6211. Ctor = baseCtor.extend(Ctor);
  6212. }
  6213. // if at this stage it's not a constructor or an async component factory,
  6214. // reject.
  6215. if (typeof Ctor !== 'function') {
  6216. if (true) {
  6217. warn(("Invalid Component definition: " + (String(Ctor))), context);
  6218. }
  6219. return
  6220. }
  6221. // async component
  6222. var asyncFactory;
  6223. if (isUndef(Ctor.cid)) {
  6224. asyncFactory = Ctor;
  6225. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  6226. if (Ctor === undefined) {
  6227. // return a placeholder node for async component, which is rendered
  6228. // as a comment node but preserves all the raw information for the node.
  6229. // the information will be used for async server-rendering and hydration.
  6230. return createAsyncPlaceholder(
  6231. asyncFactory,
  6232. data,
  6233. context,
  6234. children,
  6235. tag
  6236. )
  6237. }
  6238. }
  6239. data = data || {};
  6240. // resolve constructor options in case global mixins are applied after
  6241. // component constructor creation
  6242. resolveConstructorOptions(Ctor);
  6243. // transform component v-model data into props & events
  6244. if (isDef(data.model)) {
  6245. transformModel(Ctor.options, data);
  6246. }
  6247. // extract props
  6248. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  6249. // functional component
  6250. if (isTrue(Ctor.options.functional)) {
  6251. return createFunctionalComponent(Ctor, propsData, data, context, children)
  6252. }
  6253. // extract listeners, since these needs to be treated as
  6254. // child component listeners instead of DOM listeners
  6255. var listeners = data.on;
  6256. // replace with listeners with .native modifier
  6257. // so it gets processed during parent component patch.
  6258. data.on = data.nativeOn;
  6259. if (isTrue(Ctor.options.abstract)) {
  6260. // abstract components do not keep anything
  6261. // other than props & listeners & slot
  6262. // work around flow
  6263. var slot = data.slot;
  6264. data = {};
  6265. if (slot) {
  6266. data.slot = slot;
  6267. }
  6268. }
  6269. // install component management hooks onto the placeholder node
  6270. installComponentHooks(data);
  6271. // return a placeholder vnode
  6272. var name = Ctor.options.name || tag;
  6273. var vnode = new VNode(
  6274. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  6275. data, undefined, undefined, undefined, context,
  6276. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  6277. asyncFactory
  6278. );
  6279. return vnode
  6280. }
  6281. function createComponentInstanceForVnode (
  6282. vnode, // we know it's MountedComponentVNode but flow doesn't
  6283. parent // activeInstance in lifecycle state
  6284. ) {
  6285. var options = {
  6286. _isComponent: true,
  6287. _parentVnode: vnode,
  6288. parent: parent
  6289. };
  6290. // check inline-template render functions
  6291. var inlineTemplate = vnode.data.inlineTemplate;
  6292. if (isDef(inlineTemplate)) {
  6293. options.render = inlineTemplate.render;
  6294. options.staticRenderFns = inlineTemplate.staticRenderFns;
  6295. }
  6296. return new vnode.componentOptions.Ctor(options)
  6297. }
  6298. function installComponentHooks (data) {
  6299. var hooks = data.hook || (data.hook = {});
  6300. for (var i = 0; i < hooksToMerge.length; i++) {
  6301. var key = hooksToMerge[i];
  6302. var existing = hooks[key];
  6303. var toMerge = componentVNodeHooks[key];
  6304. if (existing !== toMerge && !(existing && existing._merged)) {
  6305. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  6306. }
  6307. }
  6308. }
  6309. function mergeHook$1 (f1, f2) {
  6310. var merged = function (a, b) {
  6311. // flow complains about extra args which is why we use any
  6312. f1(a, b);
  6313. f2(a, b);
  6314. };
  6315. merged._merged = true;
  6316. return merged
  6317. }
  6318. // transform component v-model info (value and callback) into
  6319. // prop and event handler respectively.
  6320. function transformModel (options, data) {
  6321. var prop = (options.model && options.model.prop) || 'value';
  6322. var event = (options.model && options.model.event) || 'input'
  6323. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  6324. var on = data.on || (data.on = {});
  6325. var existing = on[event];
  6326. var callback = data.model.callback;
  6327. if (isDef(existing)) {
  6328. if (
  6329. Array.isArray(existing)
  6330. ? existing.indexOf(callback) === -1
  6331. : existing !== callback
  6332. ) {
  6333. on[event] = [callback].concat(existing);
  6334. }
  6335. } else {
  6336. on[event] = callback;
  6337. }
  6338. }
  6339. /* */
  6340. var SIMPLE_NORMALIZE = 1;
  6341. var ALWAYS_NORMALIZE = 2;
  6342. // wrapper function for providing a more flexible interface
  6343. // without getting yelled at by flow
  6344. function createElement (
  6345. context,
  6346. tag,
  6347. data,
  6348. children,
  6349. normalizationType,
  6350. alwaysNormalize
  6351. ) {
  6352. if (Array.isArray(data) || isPrimitive(data)) {
  6353. normalizationType = children;
  6354. children = data;
  6355. data = undefined;
  6356. }
  6357. if (isTrue(alwaysNormalize)) {
  6358. normalizationType = ALWAYS_NORMALIZE;
  6359. }
  6360. return _createElement(context, tag, data, children, normalizationType)
  6361. }
  6362. function _createElement (
  6363. context,
  6364. tag,
  6365. data,
  6366. children,
  6367. normalizationType
  6368. ) {
  6369. if (isDef(data) && isDef((data).__ob__)) {
  6370. true && warn(
  6371. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  6372. 'Always create fresh vnode data objects in each render!',
  6373. context
  6374. );
  6375. return createEmptyVNode()
  6376. }
  6377. // object syntax in v-bind
  6378. if (isDef(data) && isDef(data.is)) {
  6379. tag = data.is;
  6380. }
  6381. if (!tag) {
  6382. // in case of component :is set to falsy value
  6383. return createEmptyVNode()
  6384. }
  6385. // warn against non-primitive key
  6386. if ( true &&
  6387. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  6388. ) {
  6389. {
  6390. warn(
  6391. 'Avoid using non-primitive value as key, ' +
  6392. 'use string/number value instead.',
  6393. context
  6394. );
  6395. }
  6396. }
  6397. // support single function children as default scoped slot
  6398. if (Array.isArray(children) &&
  6399. typeof children[0] === 'function'
  6400. ) {
  6401. data = data || {};
  6402. data.scopedSlots = { default: children[0] };
  6403. children.length = 0;
  6404. }
  6405. if (normalizationType === ALWAYS_NORMALIZE) {
  6406. children = normalizeChildren(children);
  6407. } else if (normalizationType === SIMPLE_NORMALIZE) {
  6408. children = simpleNormalizeChildren(children);
  6409. }
  6410. var vnode, ns;
  6411. if (typeof tag === 'string') {
  6412. var Ctor;
  6413. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  6414. if (config.isReservedTag(tag)) {
  6415. // platform built-in elements
  6416. if ( true && isDef(data) && isDef(data.nativeOn)) {
  6417. warn(
  6418. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  6419. context
  6420. );
  6421. }
  6422. vnode = new VNode(
  6423. config.parsePlatformTagName(tag), data, children,
  6424. undefined, undefined, context
  6425. );
  6426. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  6427. // component
  6428. vnode = createComponent(Ctor, data, context, children, tag);
  6429. } else {
  6430. // unknown or unlisted namespaced elements
  6431. // check at runtime because it may get assigned a namespace when its
  6432. // parent normalizes children
  6433. vnode = new VNode(
  6434. tag, data, children,
  6435. undefined, undefined, context
  6436. );
  6437. }
  6438. } else {
  6439. // direct component options / constructor
  6440. vnode = createComponent(tag, data, context, children);
  6441. }
  6442. if (Array.isArray(vnode)) {
  6443. return vnode
  6444. } else if (isDef(vnode)) {
  6445. if (isDef(ns)) { applyNS(vnode, ns); }
  6446. if (isDef(data)) { registerDeepBindings(data); }
  6447. return vnode
  6448. } else {
  6449. return createEmptyVNode()
  6450. }
  6451. }
  6452. function applyNS (vnode, ns, force) {
  6453. vnode.ns = ns;
  6454. if (vnode.tag === 'foreignObject') {
  6455. // use default namespace inside foreignObject
  6456. ns = undefined;
  6457. force = true;
  6458. }
  6459. if (isDef(vnode.children)) {
  6460. for (var i = 0, l = vnode.children.length; i < l; i++) {
  6461. var child = vnode.children[i];
  6462. if (isDef(child.tag) && (
  6463. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  6464. applyNS(child, ns, force);
  6465. }
  6466. }
  6467. }
  6468. }
  6469. // ref #5318
  6470. // necessary to ensure parent re-render when deep bindings like :style and
  6471. // :class are used on slot nodes
  6472. function registerDeepBindings (data) {
  6473. if (isObject(data.style)) {
  6474. traverse(data.style);
  6475. }
  6476. if (isObject(data.class)) {
  6477. traverse(data.class);
  6478. }
  6479. }
  6480. /* */
  6481. function initRender (vm) {
  6482. vm._vnode = null; // the root of the child tree
  6483. vm._staticTrees = null; // v-once cached trees
  6484. var options = vm.$options;
  6485. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  6486. var renderContext = parentVnode && parentVnode.context;
  6487. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  6488. vm.$scopedSlots = emptyObject;
  6489. // bind the createElement fn to this instance
  6490. // so that we get proper render context inside it.
  6491. // args order: tag, data, children, normalizationType, alwaysNormalize
  6492. // internal version is used by render functions compiled from templates
  6493. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  6494. // normalization is always applied for the public version, used in
  6495. // user-written render functions.
  6496. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  6497. // $attrs & $listeners are exposed for easier HOC creation.
  6498. // they need to be reactive so that HOCs using them are always updated
  6499. var parentData = parentVnode && parentVnode.data;
  6500. /* istanbul ignore else */
  6501. if (true) {
  6502. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  6503. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  6504. }, true);
  6505. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  6506. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  6507. }, true);
  6508. } else {}
  6509. }
  6510. var currentRenderingInstance = null;
  6511. function renderMixin (Vue) {
  6512. // install runtime convenience helpers
  6513. installRenderHelpers(Vue.prototype);
  6514. Vue.prototype.$nextTick = function (fn) {
  6515. return nextTick(fn, this)
  6516. };
  6517. Vue.prototype._render = function () {
  6518. var vm = this;
  6519. var ref = vm.$options;
  6520. var render = ref.render;
  6521. var _parentVnode = ref._parentVnode;
  6522. if (_parentVnode) {
  6523. vm.$scopedSlots = normalizeScopedSlots(
  6524. _parentVnode.data.scopedSlots,
  6525. vm.$slots,
  6526. vm.$scopedSlots
  6527. );
  6528. }
  6529. // set parent vnode. this allows render functions to have access
  6530. // to the data on the placeholder node.
  6531. vm.$vnode = _parentVnode;
  6532. // render self
  6533. var vnode;
  6534. try {
  6535. // There's no need to maintain a stack because all render fns are called
  6536. // separately from one another. Nested component's render fns are called
  6537. // when parent component is patched.
  6538. currentRenderingInstance = vm;
  6539. vnode = render.call(vm._renderProxy, vm.$createElement);
  6540. } catch (e) {
  6541. handleError(e, vm, "render");
  6542. // return error render result,
  6543. // or previous vnode to prevent render error causing blank component
  6544. /* istanbul ignore else */
  6545. if ( true && vm.$options.renderError) {
  6546. try {
  6547. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  6548. } catch (e) {
  6549. handleError(e, vm, "renderError");
  6550. vnode = vm._vnode;
  6551. }
  6552. } else {
  6553. vnode = vm._vnode;
  6554. }
  6555. } finally {
  6556. currentRenderingInstance = null;
  6557. }
  6558. // if the returned array contains only a single node, allow it
  6559. if (Array.isArray(vnode) && vnode.length === 1) {
  6560. vnode = vnode[0];
  6561. }
  6562. // return empty vnode in case the render function errored out
  6563. if (!(vnode instanceof VNode)) {
  6564. if ( true && Array.isArray(vnode)) {
  6565. warn(
  6566. 'Multiple root nodes returned from render function. Render function ' +
  6567. 'should return a single root node.',
  6568. vm
  6569. );
  6570. }
  6571. vnode = createEmptyVNode();
  6572. }
  6573. // set parent
  6574. vnode.parent = _parentVnode;
  6575. return vnode
  6576. };
  6577. }
  6578. /* */
  6579. function ensureCtor (comp, base) {
  6580. if (
  6581. comp.__esModule ||
  6582. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  6583. ) {
  6584. comp = comp.default;
  6585. }
  6586. return isObject(comp)
  6587. ? base.extend(comp)
  6588. : comp
  6589. }
  6590. function createAsyncPlaceholder (
  6591. factory,
  6592. data,
  6593. context,
  6594. children,
  6595. tag
  6596. ) {
  6597. var node = createEmptyVNode();
  6598. node.asyncFactory = factory;
  6599. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  6600. return node
  6601. }
  6602. function resolveAsyncComponent (
  6603. factory,
  6604. baseCtor
  6605. ) {
  6606. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  6607. return factory.errorComp
  6608. }
  6609. if (isDef(factory.resolved)) {
  6610. return factory.resolved
  6611. }
  6612. var owner = currentRenderingInstance;
  6613. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  6614. // already pending
  6615. factory.owners.push(owner);
  6616. }
  6617. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  6618. return factory.loadingComp
  6619. }
  6620. if (owner && !isDef(factory.owners)) {
  6621. var owners = factory.owners = [owner];
  6622. var sync = true;
  6623. var timerLoading = null;
  6624. var timerTimeout = null
  6625. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  6626. var forceRender = function (renderCompleted) {
  6627. for (var i = 0, l = owners.length; i < l; i++) {
  6628. (owners[i]).$forceUpdate();
  6629. }
  6630. if (renderCompleted) {
  6631. owners.length = 0;
  6632. if (timerLoading !== null) {
  6633. clearTimeout(timerLoading);
  6634. timerLoading = null;
  6635. }
  6636. if (timerTimeout !== null) {
  6637. clearTimeout(timerTimeout);
  6638. timerTimeout = null;
  6639. }
  6640. }
  6641. };
  6642. var resolve = once(function (res) {
  6643. // cache resolved
  6644. factory.resolved = ensureCtor(res, baseCtor);
  6645. // invoke callbacks only if this is not a synchronous resolve
  6646. // (async resolves are shimmed as synchronous during SSR)
  6647. if (!sync) {
  6648. forceRender(true);
  6649. } else {
  6650. owners.length = 0;
  6651. }
  6652. });
  6653. var reject = once(function (reason) {
  6654. true && warn(
  6655. "Failed to resolve async component: " + (String(factory)) +
  6656. (reason ? ("\nReason: " + reason) : '')
  6657. );
  6658. if (isDef(factory.errorComp)) {
  6659. factory.error = true;
  6660. forceRender(true);
  6661. }
  6662. });
  6663. var res = factory(resolve, reject);
  6664. if (isObject(res)) {
  6665. if (isPromise(res)) {
  6666. // () => Promise
  6667. if (isUndef(factory.resolved)) {
  6668. res.then(resolve, reject);
  6669. }
  6670. } else if (isPromise(res.component)) {
  6671. res.component.then(resolve, reject);
  6672. if (isDef(res.error)) {
  6673. factory.errorComp = ensureCtor(res.error, baseCtor);
  6674. }
  6675. if (isDef(res.loading)) {
  6676. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  6677. if (res.delay === 0) {
  6678. factory.loading = true;
  6679. } else {
  6680. timerLoading = setTimeout(function () {
  6681. timerLoading = null;
  6682. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  6683. factory.loading = true;
  6684. forceRender(false);
  6685. }
  6686. }, res.delay || 200);
  6687. }
  6688. }
  6689. if (isDef(res.timeout)) {
  6690. timerTimeout = setTimeout(function () {
  6691. timerTimeout = null;
  6692. if (isUndef(factory.resolved)) {
  6693. reject(
  6694. true
  6695. ? ("timeout (" + (res.timeout) + "ms)")
  6696. : undefined
  6697. );
  6698. }
  6699. }, res.timeout);
  6700. }
  6701. }
  6702. }
  6703. sync = false;
  6704. // return in case resolved synchronously
  6705. return factory.loading
  6706. ? factory.loadingComp
  6707. : factory.resolved
  6708. }
  6709. }
  6710. /* */
  6711. function isAsyncPlaceholder (node) {
  6712. return node.isComment && node.asyncFactory
  6713. }
  6714. /* */
  6715. function getFirstComponentChild (children) {
  6716. if (Array.isArray(children)) {
  6717. for (var i = 0; i < children.length; i++) {
  6718. var c = children[i];
  6719. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  6720. return c
  6721. }
  6722. }
  6723. }
  6724. }
  6725. /* */
  6726. /* */
  6727. function initEvents (vm) {
  6728. vm._events = Object.create(null);
  6729. vm._hasHookEvent = false;
  6730. // init parent attached events
  6731. var listeners = vm.$options._parentListeners;
  6732. if (listeners) {
  6733. updateComponentListeners(vm, listeners);
  6734. }
  6735. }
  6736. var target;
  6737. function add (event, fn) {
  6738. target.$on(event, fn);
  6739. }
  6740. function remove$1 (event, fn) {
  6741. target.$off(event, fn);
  6742. }
  6743. function createOnceHandler (event, fn) {
  6744. var _target = target;
  6745. return function onceHandler () {
  6746. var res = fn.apply(null, arguments);
  6747. if (res !== null) {
  6748. _target.$off(event, onceHandler);
  6749. }
  6750. }
  6751. }
  6752. function updateComponentListeners (
  6753. vm,
  6754. listeners,
  6755. oldListeners
  6756. ) {
  6757. target = vm;
  6758. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  6759. target = undefined;
  6760. }
  6761. function eventsMixin (Vue) {
  6762. var hookRE = /^hook:/;
  6763. Vue.prototype.$on = function (event, fn) {
  6764. var vm = this;
  6765. if (Array.isArray(event)) {
  6766. for (var i = 0, l = event.length; i < l; i++) {
  6767. vm.$on(event[i], fn);
  6768. }
  6769. } else {
  6770. (vm._events[event] || (vm._events[event] = [])).push(fn);
  6771. // optimize hook:event cost by using a boolean flag marked at registration
  6772. // instead of a hash lookup
  6773. if (hookRE.test(event)) {
  6774. vm._hasHookEvent = true;
  6775. }
  6776. }
  6777. return vm
  6778. };
  6779. Vue.prototype.$once = function (event, fn) {
  6780. var vm = this;
  6781. function on () {
  6782. vm.$off(event, on);
  6783. fn.apply(vm, arguments);
  6784. }
  6785. on.fn = fn;
  6786. vm.$on(event, on);
  6787. return vm
  6788. };
  6789. Vue.prototype.$off = function (event, fn) {
  6790. var vm = this;
  6791. // all
  6792. if (!arguments.length) {
  6793. vm._events = Object.create(null);
  6794. return vm
  6795. }
  6796. // array of events
  6797. if (Array.isArray(event)) {
  6798. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  6799. vm.$off(event[i$1], fn);
  6800. }
  6801. return vm
  6802. }
  6803. // specific event
  6804. var cbs = vm._events[event];
  6805. if (!cbs) {
  6806. return vm
  6807. }
  6808. if (!fn) {
  6809. vm._events[event] = null;
  6810. return vm
  6811. }
  6812. // specific handler
  6813. var cb;
  6814. var i = cbs.length;
  6815. while (i--) {
  6816. cb = cbs[i];
  6817. if (cb === fn || cb.fn === fn) {
  6818. cbs.splice(i, 1);
  6819. break
  6820. }
  6821. }
  6822. return vm
  6823. };
  6824. Vue.prototype.$emit = function (event) {
  6825. var vm = this;
  6826. if (true) {
  6827. var lowerCaseEvent = event.toLowerCase();
  6828. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  6829. tip(
  6830. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  6831. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  6832. "Note that HTML attributes are case-insensitive and you cannot use " +
  6833. "v-on to listen to camelCase events when using in-DOM templates. " +
  6834. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  6835. );
  6836. }
  6837. }
  6838. var cbs = vm._events[event];
  6839. if (cbs) {
  6840. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  6841. var args = toArray(arguments, 1);
  6842. var info = "event handler for \"" + event + "\"";
  6843. for (var i = 0, l = cbs.length; i < l; i++) {
  6844. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  6845. }
  6846. }
  6847. return vm
  6848. };
  6849. }
  6850. /* */
  6851. var activeInstance = null;
  6852. var isUpdatingChildComponent = false;
  6853. function setActiveInstance(vm) {
  6854. var prevActiveInstance = activeInstance;
  6855. activeInstance = vm;
  6856. return function () {
  6857. activeInstance = prevActiveInstance;
  6858. }
  6859. }
  6860. function initLifecycle (vm) {
  6861. var options = vm.$options;
  6862. // locate first non-abstract parent
  6863. var parent = options.parent;
  6864. if (parent && !options.abstract) {
  6865. while (parent.$options.abstract && parent.$parent) {
  6866. parent = parent.$parent;
  6867. }
  6868. parent.$children.push(vm);
  6869. }
  6870. vm.$parent = parent;
  6871. vm.$root = parent ? parent.$root : vm;
  6872. vm.$children = [];
  6873. vm.$refs = {};
  6874. vm._watcher = null;
  6875. vm._inactive = null;
  6876. vm._directInactive = false;
  6877. vm._isMounted = false;
  6878. vm._isDestroyed = false;
  6879. vm._isBeingDestroyed = false;
  6880. }
  6881. function lifecycleMixin (Vue) {
  6882. Vue.prototype._update = function (vnode, hydrating) {
  6883. var vm = this;
  6884. var prevEl = vm.$el;
  6885. var prevVnode = vm._vnode;
  6886. var restoreActiveInstance = setActiveInstance(vm);
  6887. vm._vnode = vnode;
  6888. // Vue.prototype.__patch__ is injected in entry points
  6889. // based on the rendering backend used.
  6890. if (!prevVnode) {
  6891. // initial render
  6892. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  6893. } else {
  6894. // updates
  6895. vm.$el = vm.__patch__(prevVnode, vnode);
  6896. }
  6897. restoreActiveInstance();
  6898. // update __vue__ reference
  6899. if (prevEl) {
  6900. prevEl.__vue__ = null;
  6901. }
  6902. if (vm.$el) {
  6903. vm.$el.__vue__ = vm;
  6904. }
  6905. // if parent is an HOC, update its $el as well
  6906. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  6907. vm.$parent.$el = vm.$el;
  6908. }
  6909. // updated hook is called by the scheduler to ensure that children are
  6910. // updated in a parent's updated hook.
  6911. };
  6912. Vue.prototype.$forceUpdate = function () {
  6913. var vm = this;
  6914. if (vm._watcher) {
  6915. vm._watcher.update();
  6916. }
  6917. };
  6918. Vue.prototype.$destroy = function () {
  6919. var vm = this;
  6920. if (vm._isBeingDestroyed) {
  6921. return
  6922. }
  6923. callHook(vm, 'beforeDestroy');
  6924. vm._isBeingDestroyed = true;
  6925. // remove self from parent
  6926. var parent = vm.$parent;
  6927. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  6928. remove(parent.$children, vm);
  6929. }
  6930. // teardown watchers
  6931. if (vm._watcher) {
  6932. vm._watcher.teardown();
  6933. }
  6934. var i = vm._watchers.length;
  6935. while (i--) {
  6936. vm._watchers[i].teardown();
  6937. }
  6938. // remove reference from data ob
  6939. // frozen object may not have observer.
  6940. if (vm._data.__ob__) {
  6941. vm._data.__ob__.vmCount--;
  6942. }
  6943. // call the last hook...
  6944. vm._isDestroyed = true;
  6945. // invoke destroy hooks on current rendered tree
  6946. vm.__patch__(vm._vnode, null);
  6947. // fire destroyed hook
  6948. callHook(vm, 'destroyed');
  6949. // turn off all instance listeners.
  6950. vm.$off();
  6951. // remove __vue__ reference
  6952. if (vm.$el) {
  6953. vm.$el.__vue__ = null;
  6954. }
  6955. // release circular reference (#6759)
  6956. if (vm.$vnode) {
  6957. vm.$vnode.parent = null;
  6958. }
  6959. };
  6960. }
  6961. function updateChildComponent (
  6962. vm,
  6963. propsData,
  6964. listeners,
  6965. parentVnode,
  6966. renderChildren
  6967. ) {
  6968. if (true) {
  6969. isUpdatingChildComponent = true;
  6970. }
  6971. // determine whether component has slot children
  6972. // we need to do this before overwriting $options._renderChildren.
  6973. // check if there are dynamic scopedSlots (hand-written or compiled but with
  6974. // dynamic slot names). Static scoped slots compiled from template has the
  6975. // "$stable" marker.
  6976. var newScopedSlots = parentVnode.data.scopedSlots;
  6977. var oldScopedSlots = vm.$scopedSlots;
  6978. var hasDynamicScopedSlot = !!(
  6979. (newScopedSlots && !newScopedSlots.$stable) ||
  6980. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  6981. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  6982. );
  6983. // Any static slot children from the parent may have changed during parent's
  6984. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  6985. // update is necessary to ensure correctness.
  6986. var needsForceUpdate = !!(
  6987. renderChildren || // has new static slots
  6988. vm.$options._renderChildren || // has old static slots
  6989. hasDynamicScopedSlot
  6990. );
  6991. vm.$options._parentVnode = parentVnode;
  6992. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  6993. if (vm._vnode) { // update child tree's parent
  6994. vm._vnode.parent = parentVnode;
  6995. }
  6996. vm.$options._renderChildren = renderChildren;
  6997. // update $attrs and $listeners hash
  6998. // these are also reactive so they may trigger child update if the child
  6999. // used them during render
  7000. vm.$attrs = parentVnode.data.attrs || emptyObject;
  7001. vm.$listeners = listeners || emptyObject;
  7002. // update props
  7003. if (propsData && vm.$options.props) {
  7004. toggleObserving(false);
  7005. var props = vm._props;
  7006. var propKeys = vm.$options._propKeys || [];
  7007. for (var i = 0; i < propKeys.length; i++) {
  7008. var key = propKeys[i];
  7009. var propOptions = vm.$options.props; // wtf flow?
  7010. props[key] = validateProp(key, propOptions, propsData, vm);
  7011. }
  7012. toggleObserving(true);
  7013. // keep a copy of raw propsData
  7014. vm.$options.propsData = propsData;
  7015. }
  7016. // fixed by xxxxxx update properties(mp runtime)
  7017. vm._$updateProperties && vm._$updateProperties(vm);
  7018. // update listeners
  7019. listeners = listeners || emptyObject;
  7020. var oldListeners = vm.$options._parentListeners;
  7021. vm.$options._parentListeners = listeners;
  7022. updateComponentListeners(vm, listeners, oldListeners);
  7023. // resolve slots + force update if has children
  7024. if (needsForceUpdate) {
  7025. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  7026. vm.$forceUpdate();
  7027. }
  7028. if (true) {
  7029. isUpdatingChildComponent = false;
  7030. }
  7031. }
  7032. function isInInactiveTree (vm) {
  7033. while (vm && (vm = vm.$parent)) {
  7034. if (vm._inactive) { return true }
  7035. }
  7036. return false
  7037. }
  7038. function activateChildComponent (vm, direct) {
  7039. if (direct) {
  7040. vm._directInactive = false;
  7041. if (isInInactiveTree(vm)) {
  7042. return
  7043. }
  7044. } else if (vm._directInactive) {
  7045. return
  7046. }
  7047. if (vm._inactive || vm._inactive === null) {
  7048. vm._inactive = false;
  7049. for (var i = 0; i < vm.$children.length; i++) {
  7050. activateChildComponent(vm.$children[i]);
  7051. }
  7052. callHook(vm, 'activated');
  7053. }
  7054. }
  7055. function deactivateChildComponent (vm, direct) {
  7056. if (direct) {
  7057. vm._directInactive = true;
  7058. if (isInInactiveTree(vm)) {
  7059. return
  7060. }
  7061. }
  7062. if (!vm._inactive) {
  7063. vm._inactive = true;
  7064. for (var i = 0; i < vm.$children.length; i++) {
  7065. deactivateChildComponent(vm.$children[i]);
  7066. }
  7067. callHook(vm, 'deactivated');
  7068. }
  7069. }
  7070. function callHook (vm, hook) {
  7071. // #7573 disable dep collection when invoking lifecycle hooks
  7072. pushTarget();
  7073. var handlers = vm.$options[hook];
  7074. var info = hook + " hook";
  7075. if (handlers) {
  7076. for (var i = 0, j = handlers.length; i < j; i++) {
  7077. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  7078. }
  7079. }
  7080. if (vm._hasHookEvent) {
  7081. vm.$emit('hook:' + hook);
  7082. }
  7083. popTarget();
  7084. }
  7085. /* */
  7086. var MAX_UPDATE_COUNT = 100;
  7087. var queue = [];
  7088. var activatedChildren = [];
  7089. var has = {};
  7090. var circular = {};
  7091. var waiting = false;
  7092. var flushing = false;
  7093. var index = 0;
  7094. /**
  7095. * Reset the scheduler's state.
  7096. */
  7097. function resetSchedulerState () {
  7098. index = queue.length = activatedChildren.length = 0;
  7099. has = {};
  7100. if (true) {
  7101. circular = {};
  7102. }
  7103. waiting = flushing = false;
  7104. }
  7105. // Async edge case #6566 requires saving the timestamp when event listeners are
  7106. // attached. However, calling performance.now() has a perf overhead especially
  7107. // if the page has thousands of event listeners. Instead, we take a timestamp
  7108. // every time the scheduler flushes and use that for all event listeners
  7109. // attached during that flush.
  7110. var currentFlushTimestamp = 0;
  7111. // Async edge case fix requires storing an event listener's attach timestamp.
  7112. var getNow = Date.now;
  7113. // Determine what event timestamp the browser is using. Annoyingly, the
  7114. // timestamp can either be hi-res (relative to page load) or low-res
  7115. // (relative to UNIX epoch), so in order to compare time we have to use the
  7116. // same timestamp type when saving the flush timestamp.
  7117. // All IE versions use low-res event timestamps, and have problematic clock
  7118. // implementations (#9632)
  7119. if (inBrowser && !isIE) {
  7120. var performance = window.performance;
  7121. if (
  7122. performance &&
  7123. typeof performance.now === 'function' &&
  7124. getNow() > document.createEvent('Event').timeStamp
  7125. ) {
  7126. // if the event timestamp, although evaluated AFTER the Date.now(), is
  7127. // smaller than it, it means the event is using a hi-res timestamp,
  7128. // and we need to use the hi-res version for event listener timestamps as
  7129. // well.
  7130. getNow = function () { return performance.now(); };
  7131. }
  7132. }
  7133. /**
  7134. * Flush both queues and run the watchers.
  7135. */
  7136. function flushSchedulerQueue () {
  7137. currentFlushTimestamp = getNow();
  7138. flushing = true;
  7139. var watcher, id;
  7140. // Sort queue before flush.
  7141. // This ensures that:
  7142. // 1. Components are updated from parent to child. (because parent is always
  7143. // created before the child)
  7144. // 2. A component's user watchers are run before its render watcher (because
  7145. // user watchers are created before the render watcher)
  7146. // 3. If a component is destroyed during a parent component's watcher run,
  7147. // its watchers can be skipped.
  7148. queue.sort(function (a, b) { return a.id - b.id; });
  7149. // do not cache length because more watchers might be pushed
  7150. // as we run existing watchers
  7151. for (index = 0; index < queue.length; index++) {
  7152. watcher = queue[index];
  7153. if (watcher.before) {
  7154. watcher.before();
  7155. }
  7156. id = watcher.id;
  7157. has[id] = null;
  7158. watcher.run();
  7159. // in dev build, check and stop circular updates.
  7160. if ( true && has[id] != null) {
  7161. circular[id] = (circular[id] || 0) + 1;
  7162. if (circular[id] > MAX_UPDATE_COUNT) {
  7163. warn(
  7164. 'You may have an infinite update loop ' + (
  7165. watcher.user
  7166. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  7167. : "in a component render function."
  7168. ),
  7169. watcher.vm
  7170. );
  7171. break
  7172. }
  7173. }
  7174. }
  7175. // keep copies of post queues before resetting state
  7176. var activatedQueue = activatedChildren.slice();
  7177. var updatedQueue = queue.slice();
  7178. resetSchedulerState();
  7179. // call component updated and activated hooks
  7180. callActivatedHooks(activatedQueue);
  7181. callUpdatedHooks(updatedQueue);
  7182. // devtool hook
  7183. /* istanbul ignore if */
  7184. if (devtools && config.devtools) {
  7185. devtools.emit('flush');
  7186. }
  7187. }
  7188. function callUpdatedHooks (queue) {
  7189. var i = queue.length;
  7190. while (i--) {
  7191. var watcher = queue[i];
  7192. var vm = watcher.vm;
  7193. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  7194. callHook(vm, 'updated');
  7195. }
  7196. }
  7197. }
  7198. /**
  7199. * Queue a kept-alive component that was activated during patch.
  7200. * The queue will be processed after the entire tree has been patched.
  7201. */
  7202. function queueActivatedComponent (vm) {
  7203. // setting _inactive to false here so that a render function can
  7204. // rely on checking whether it's in an inactive tree (e.g. router-view)
  7205. vm._inactive = false;
  7206. activatedChildren.push(vm);
  7207. }
  7208. function callActivatedHooks (queue) {
  7209. for (var i = 0; i < queue.length; i++) {
  7210. queue[i]._inactive = true;
  7211. activateChildComponent(queue[i], true /* true */);
  7212. }
  7213. }
  7214. /**
  7215. * Push a watcher into the watcher queue.
  7216. * Jobs with duplicate IDs will be skipped unless it's
  7217. * pushed when the queue is being flushed.
  7218. */
  7219. function queueWatcher (watcher) {
  7220. var id = watcher.id;
  7221. if (has[id] == null) {
  7222. has[id] = true;
  7223. if (!flushing) {
  7224. queue.push(watcher);
  7225. } else {
  7226. // if already flushing, splice the watcher based on its id
  7227. // if already past its id, it will be run next immediately.
  7228. var i = queue.length - 1;
  7229. while (i > index && queue[i].id > watcher.id) {
  7230. i--;
  7231. }
  7232. queue.splice(i + 1, 0, watcher);
  7233. }
  7234. // queue the flush
  7235. if (!waiting) {
  7236. waiting = true;
  7237. if ( true && !config.async) {
  7238. flushSchedulerQueue();
  7239. return
  7240. }
  7241. nextTick(flushSchedulerQueue);
  7242. }
  7243. }
  7244. }
  7245. /* */
  7246. var uid$2 = 0;
  7247. /**
  7248. * A watcher parses an expression, collects dependencies,
  7249. * and fires callback when the expression value changes.
  7250. * This is used for both the $watch() api and directives.
  7251. */
  7252. var Watcher = function Watcher (
  7253. vm,
  7254. expOrFn,
  7255. cb,
  7256. options,
  7257. isRenderWatcher
  7258. ) {
  7259. this.vm = vm;
  7260. if (isRenderWatcher) {
  7261. vm._watcher = this;
  7262. }
  7263. vm._watchers.push(this);
  7264. // options
  7265. if (options) {
  7266. this.deep = !!options.deep;
  7267. this.user = !!options.user;
  7268. this.lazy = !!options.lazy;
  7269. this.sync = !!options.sync;
  7270. this.before = options.before;
  7271. } else {
  7272. this.deep = this.user = this.lazy = this.sync = false;
  7273. }
  7274. this.cb = cb;
  7275. this.id = ++uid$2; // uid for batching
  7276. this.active = true;
  7277. this.dirty = this.lazy; // for lazy watchers
  7278. this.deps = [];
  7279. this.newDeps = [];
  7280. this.depIds = new _Set();
  7281. this.newDepIds = new _Set();
  7282. this.expression = true
  7283. ? expOrFn.toString()
  7284. : undefined;
  7285. // parse expression for getter
  7286. if (typeof expOrFn === 'function') {
  7287. this.getter = expOrFn;
  7288. } else {
  7289. this.getter = parsePath(expOrFn);
  7290. if (!this.getter) {
  7291. this.getter = noop;
  7292. true && warn(
  7293. "Failed watching path: \"" + expOrFn + "\" " +
  7294. 'Watcher only accepts simple dot-delimited paths. ' +
  7295. 'For full control, use a function instead.',
  7296. vm
  7297. );
  7298. }
  7299. }
  7300. this.value = this.lazy
  7301. ? undefined
  7302. : this.get();
  7303. };
  7304. /**
  7305. * Evaluate the getter, and re-collect dependencies.
  7306. */
  7307. Watcher.prototype.get = function get () {
  7308. pushTarget(this);
  7309. var value;
  7310. var vm = this.vm;
  7311. try {
  7312. value = this.getter.call(vm, vm);
  7313. } catch (e) {
  7314. if (this.user) {
  7315. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  7316. } else {
  7317. throw e
  7318. }
  7319. } finally {
  7320. // "touch" every property so they are all tracked as
  7321. // dependencies for deep watching
  7322. if (this.deep) {
  7323. traverse(value);
  7324. }
  7325. popTarget();
  7326. this.cleanupDeps();
  7327. }
  7328. return value
  7329. };
  7330. /**
  7331. * Add a dependency to this directive.
  7332. */
  7333. Watcher.prototype.addDep = function addDep (dep) {
  7334. var id = dep.id;
  7335. if (!this.newDepIds.has(id)) {
  7336. this.newDepIds.add(id);
  7337. this.newDeps.push(dep);
  7338. if (!this.depIds.has(id)) {
  7339. dep.addSub(this);
  7340. }
  7341. }
  7342. };
  7343. /**
  7344. * Clean up for dependency collection.
  7345. */
  7346. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  7347. var i = this.deps.length;
  7348. while (i--) {
  7349. var dep = this.deps[i];
  7350. if (!this.newDepIds.has(dep.id)) {
  7351. dep.removeSub(this);
  7352. }
  7353. }
  7354. var tmp = this.depIds;
  7355. this.depIds = this.newDepIds;
  7356. this.newDepIds = tmp;
  7357. this.newDepIds.clear();
  7358. tmp = this.deps;
  7359. this.deps = this.newDeps;
  7360. this.newDeps = tmp;
  7361. this.newDeps.length = 0;
  7362. };
  7363. /**
  7364. * Subscriber interface.
  7365. * Will be called when a dependency changes.
  7366. */
  7367. Watcher.prototype.update = function update () {
  7368. /* istanbul ignore else */
  7369. if (this.lazy) {
  7370. this.dirty = true;
  7371. } else if (this.sync) {
  7372. this.run();
  7373. } else {
  7374. queueWatcher(this);
  7375. }
  7376. };
  7377. /**
  7378. * Scheduler job interface.
  7379. * Will be called by the scheduler.
  7380. */
  7381. Watcher.prototype.run = function run () {
  7382. if (this.active) {
  7383. var value = this.get();
  7384. if (
  7385. value !== this.value ||
  7386. // Deep watchers and watchers on Object/Arrays should fire even
  7387. // when the value is the same, because the value may
  7388. // have mutated.
  7389. isObject(value) ||
  7390. this.deep
  7391. ) {
  7392. // set new value
  7393. var oldValue = this.value;
  7394. this.value = value;
  7395. if (this.user) {
  7396. try {
  7397. this.cb.call(this.vm, value, oldValue);
  7398. } catch (e) {
  7399. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  7400. }
  7401. } else {
  7402. this.cb.call(this.vm, value, oldValue);
  7403. }
  7404. }
  7405. }
  7406. };
  7407. /**
  7408. * Evaluate the value of the watcher.
  7409. * This only gets called for lazy watchers.
  7410. */
  7411. Watcher.prototype.evaluate = function evaluate () {
  7412. this.value = this.get();
  7413. this.dirty = false;
  7414. };
  7415. /**
  7416. * Depend on all deps collected by this watcher.
  7417. */
  7418. Watcher.prototype.depend = function depend () {
  7419. var i = this.deps.length;
  7420. while (i--) {
  7421. this.deps[i].depend();
  7422. }
  7423. };
  7424. /**
  7425. * Remove self from all dependencies' subscriber list.
  7426. */
  7427. Watcher.prototype.teardown = function teardown () {
  7428. if (this.active) {
  7429. // remove self from vm's watcher list
  7430. // this is a somewhat expensive operation so we skip it
  7431. // if the vm is being destroyed.
  7432. if (!this.vm._isBeingDestroyed) {
  7433. remove(this.vm._watchers, this);
  7434. }
  7435. var i = this.deps.length;
  7436. while (i--) {
  7437. this.deps[i].removeSub(this);
  7438. }
  7439. this.active = false;
  7440. }
  7441. };
  7442. /* */
  7443. var sharedPropertyDefinition = {
  7444. enumerable: true,
  7445. configurable: true,
  7446. get: noop,
  7447. set: noop
  7448. };
  7449. function proxy (target, sourceKey, key) {
  7450. sharedPropertyDefinition.get = function proxyGetter () {
  7451. return this[sourceKey][key]
  7452. };
  7453. sharedPropertyDefinition.set = function proxySetter (val) {
  7454. this[sourceKey][key] = val;
  7455. };
  7456. Object.defineProperty(target, key, sharedPropertyDefinition);
  7457. }
  7458. function initState (vm) {
  7459. vm._watchers = [];
  7460. var opts = vm.$options;
  7461. if (opts.props) { initProps(vm, opts.props); }
  7462. if (opts.methods) { initMethods(vm, opts.methods); }
  7463. if (opts.data) {
  7464. initData(vm);
  7465. } else {
  7466. observe(vm._data = {}, true /* asRootData */);
  7467. }
  7468. if (opts.computed) { initComputed(vm, opts.computed); }
  7469. if (opts.watch && opts.watch !== nativeWatch) {
  7470. initWatch(vm, opts.watch);
  7471. }
  7472. }
  7473. function initProps (vm, propsOptions) {
  7474. var propsData = vm.$options.propsData || {};
  7475. var props = vm._props = {};
  7476. // cache prop keys so that future props updates can iterate using Array
  7477. // instead of dynamic object key enumeration.
  7478. var keys = vm.$options._propKeys = [];
  7479. var isRoot = !vm.$parent;
  7480. // root instance props should be converted
  7481. if (!isRoot) {
  7482. toggleObserving(false);
  7483. }
  7484. var loop = function ( key ) {
  7485. keys.push(key);
  7486. var value = validateProp(key, propsOptions, propsData, vm);
  7487. /* istanbul ignore else */
  7488. if (true) {
  7489. var hyphenatedKey = hyphenate(key);
  7490. if (isReservedAttribute(hyphenatedKey) ||
  7491. config.isReservedAttr(hyphenatedKey)) {
  7492. warn(
  7493. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  7494. vm
  7495. );
  7496. }
  7497. defineReactive$$1(props, key, value, function () {
  7498. if (!isRoot && !isUpdatingChildComponent) {
  7499. {
  7500. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  7501. return
  7502. }
  7503. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  7504. if(
  7505. key === 'value' &&
  7506. Array.isArray(vm.$options.behaviors) &&
  7507. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  7508. ){
  7509. return
  7510. }
  7511. if(vm._getFormData){
  7512. return
  7513. }
  7514. var $parent = vm.$parent;
  7515. while($parent){
  7516. if($parent.__next_tick_pending){
  7517. return
  7518. }
  7519. $parent = $parent.$parent;
  7520. }
  7521. }
  7522. warn(
  7523. "Avoid mutating a prop directly since the value will be " +
  7524. "overwritten whenever the parent component re-renders. " +
  7525. "Instead, use a data or computed property based on the prop's " +
  7526. "value. Prop being mutated: \"" + key + "\"",
  7527. vm
  7528. );
  7529. }
  7530. });
  7531. } else {}
  7532. // static props are already proxied on the component's prototype
  7533. // during Vue.extend(). We only need to proxy props defined at
  7534. // instantiation here.
  7535. if (!(key in vm)) {
  7536. proxy(vm, "_props", key);
  7537. }
  7538. };
  7539. for (var key in propsOptions) loop( key );
  7540. toggleObserving(true);
  7541. }
  7542. function initData (vm) {
  7543. var data = vm.$options.data;
  7544. data = vm._data = typeof data === 'function'
  7545. ? getData(data, vm)
  7546. : data || {};
  7547. if (!isPlainObject(data)) {
  7548. data = {};
  7549. true && warn(
  7550. 'data functions should return an object:\n' +
  7551. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  7552. vm
  7553. );
  7554. }
  7555. // proxy data on instance
  7556. var keys = Object.keys(data);
  7557. var props = vm.$options.props;
  7558. var methods = vm.$options.methods;
  7559. var i = keys.length;
  7560. while (i--) {
  7561. var key = keys[i];
  7562. if (true) {
  7563. if (methods && hasOwn(methods, key)) {
  7564. warn(
  7565. ("Method \"" + key + "\" has already been defined as a data property."),
  7566. vm
  7567. );
  7568. }
  7569. }
  7570. if (props && hasOwn(props, key)) {
  7571. true && warn(
  7572. "The data property \"" + key + "\" is already declared as a prop. " +
  7573. "Use prop default value instead.",
  7574. vm
  7575. );
  7576. } else if (!isReserved(key)) {
  7577. proxy(vm, "_data", key);
  7578. }
  7579. }
  7580. // observe data
  7581. observe(data, true /* asRootData */);
  7582. }
  7583. function getData (data, vm) {
  7584. // #7573 disable dep collection when invoking data getters
  7585. pushTarget();
  7586. try {
  7587. return data.call(vm, vm)
  7588. } catch (e) {
  7589. handleError(e, vm, "data()");
  7590. return {}
  7591. } finally {
  7592. popTarget();
  7593. }
  7594. }
  7595. var computedWatcherOptions = { lazy: true };
  7596. function initComputed (vm, computed) {
  7597. // $flow-disable-line
  7598. var watchers = vm._computedWatchers = Object.create(null);
  7599. // computed properties are just getters during SSR
  7600. var isSSR = isServerRendering();
  7601. for (var key in computed) {
  7602. var userDef = computed[key];
  7603. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  7604. if ( true && getter == null) {
  7605. warn(
  7606. ("Getter is missing for computed property \"" + key + "\"."),
  7607. vm
  7608. );
  7609. }
  7610. if (!isSSR) {
  7611. // create internal watcher for the computed property.
  7612. watchers[key] = new Watcher(
  7613. vm,
  7614. getter || noop,
  7615. noop,
  7616. computedWatcherOptions
  7617. );
  7618. }
  7619. // component-defined computed properties are already defined on the
  7620. // component prototype. We only need to define computed properties defined
  7621. // at instantiation here.
  7622. if (!(key in vm)) {
  7623. defineComputed(vm, key, userDef);
  7624. } else if (true) {
  7625. if (key in vm.$data) {
  7626. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  7627. } else if (vm.$options.props && key in vm.$options.props) {
  7628. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  7629. }
  7630. }
  7631. }
  7632. }
  7633. function defineComputed (
  7634. target,
  7635. key,
  7636. userDef
  7637. ) {
  7638. var shouldCache = !isServerRendering();
  7639. if (typeof userDef === 'function') {
  7640. sharedPropertyDefinition.get = shouldCache
  7641. ? createComputedGetter(key)
  7642. : createGetterInvoker(userDef);
  7643. sharedPropertyDefinition.set = noop;
  7644. } else {
  7645. sharedPropertyDefinition.get = userDef.get
  7646. ? shouldCache && userDef.cache !== false
  7647. ? createComputedGetter(key)
  7648. : createGetterInvoker(userDef.get)
  7649. : noop;
  7650. sharedPropertyDefinition.set = userDef.set || noop;
  7651. }
  7652. if ( true &&
  7653. sharedPropertyDefinition.set === noop) {
  7654. sharedPropertyDefinition.set = function () {
  7655. warn(
  7656. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  7657. this
  7658. );
  7659. };
  7660. }
  7661. Object.defineProperty(target, key, sharedPropertyDefinition);
  7662. }
  7663. function createComputedGetter (key) {
  7664. return function computedGetter () {
  7665. var watcher = this._computedWatchers && this._computedWatchers[key];
  7666. if (watcher) {
  7667. if (watcher.dirty) {
  7668. watcher.evaluate();
  7669. }
  7670. if (Dep.SharedObject.target) {// fixed by xxxxxx
  7671. watcher.depend();
  7672. }
  7673. return watcher.value
  7674. }
  7675. }
  7676. }
  7677. function createGetterInvoker(fn) {
  7678. return function computedGetter () {
  7679. return fn.call(this, this)
  7680. }
  7681. }
  7682. function initMethods (vm, methods) {
  7683. var props = vm.$options.props;
  7684. for (var key in methods) {
  7685. if (true) {
  7686. if (typeof methods[key] !== 'function') {
  7687. warn(
  7688. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  7689. "Did you reference the function correctly?",
  7690. vm
  7691. );
  7692. }
  7693. if (props && hasOwn(props, key)) {
  7694. warn(
  7695. ("Method \"" + key + "\" has already been defined as a prop."),
  7696. vm
  7697. );
  7698. }
  7699. if ((key in vm) && isReserved(key)) {
  7700. warn(
  7701. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  7702. "Avoid defining component methods that start with _ or $."
  7703. );
  7704. }
  7705. }
  7706. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  7707. }
  7708. }
  7709. function initWatch (vm, watch) {
  7710. for (var key in watch) {
  7711. var handler = watch[key];
  7712. if (Array.isArray(handler)) {
  7713. for (var i = 0; i < handler.length; i++) {
  7714. createWatcher(vm, key, handler[i]);
  7715. }
  7716. } else {
  7717. createWatcher(vm, key, handler);
  7718. }
  7719. }
  7720. }
  7721. function createWatcher (
  7722. vm,
  7723. expOrFn,
  7724. handler,
  7725. options
  7726. ) {
  7727. if (isPlainObject(handler)) {
  7728. options = handler;
  7729. handler = handler.handler;
  7730. }
  7731. if (typeof handler === 'string') {
  7732. handler = vm[handler];
  7733. }
  7734. return vm.$watch(expOrFn, handler, options)
  7735. }
  7736. function stateMixin (Vue) {
  7737. // flow somehow has problems with directly declared definition object
  7738. // when using Object.defineProperty, so we have to procedurally build up
  7739. // the object here.
  7740. var dataDef = {};
  7741. dataDef.get = function () { return this._data };
  7742. var propsDef = {};
  7743. propsDef.get = function () { return this._props };
  7744. if (true) {
  7745. dataDef.set = function () {
  7746. warn(
  7747. 'Avoid replacing instance root $data. ' +
  7748. 'Use nested data properties instead.',
  7749. this
  7750. );
  7751. };
  7752. propsDef.set = function () {
  7753. warn("$props is readonly.", this);
  7754. };
  7755. }
  7756. Object.defineProperty(Vue.prototype, '$data', dataDef);
  7757. Object.defineProperty(Vue.prototype, '$props', propsDef);
  7758. Vue.prototype.$set = set;
  7759. Vue.prototype.$delete = del;
  7760. Vue.prototype.$watch = function (
  7761. expOrFn,
  7762. cb,
  7763. options
  7764. ) {
  7765. var vm = this;
  7766. if (isPlainObject(cb)) {
  7767. return createWatcher(vm, expOrFn, cb, options)
  7768. }
  7769. options = options || {};
  7770. options.user = true;
  7771. var watcher = new Watcher(vm, expOrFn, cb, options);
  7772. if (options.immediate) {
  7773. try {
  7774. cb.call(vm, watcher.value);
  7775. } catch (error) {
  7776. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  7777. }
  7778. }
  7779. return function unwatchFn () {
  7780. watcher.teardown();
  7781. }
  7782. };
  7783. }
  7784. /* */
  7785. var uid$3 = 0;
  7786. function initMixin (Vue) {
  7787. Vue.prototype._init = function (options) {
  7788. var vm = this;
  7789. // a uid
  7790. vm._uid = uid$3++;
  7791. var startTag, endTag;
  7792. /* istanbul ignore if */
  7793. if ( true && config.performance && mark) {
  7794. startTag = "vue-perf-start:" + (vm._uid);
  7795. endTag = "vue-perf-end:" + (vm._uid);
  7796. mark(startTag);
  7797. }
  7798. // a flag to avoid this being observed
  7799. vm._isVue = true;
  7800. // merge options
  7801. if (options && options._isComponent) {
  7802. // optimize internal component instantiation
  7803. // since dynamic options merging is pretty slow, and none of the
  7804. // internal component options needs special treatment.
  7805. initInternalComponent(vm, options);
  7806. } else {
  7807. vm.$options = mergeOptions(
  7808. resolveConstructorOptions(vm.constructor),
  7809. options || {},
  7810. vm
  7811. );
  7812. }
  7813. /* istanbul ignore else */
  7814. if (true) {
  7815. initProxy(vm);
  7816. } else {}
  7817. // expose real self
  7818. vm._self = vm;
  7819. initLifecycle(vm);
  7820. initEvents(vm);
  7821. initRender(vm);
  7822. callHook(vm, 'beforeCreate');
  7823. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  7824. initState(vm);
  7825. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  7826. !vm._$fallback && callHook(vm, 'created');
  7827. /* istanbul ignore if */
  7828. if ( true && config.performance && mark) {
  7829. vm._name = formatComponentName(vm, false);
  7830. mark(endTag);
  7831. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  7832. }
  7833. if (vm.$options.el) {
  7834. vm.$mount(vm.$options.el);
  7835. }
  7836. };
  7837. }
  7838. function initInternalComponent (vm, options) {
  7839. var opts = vm.$options = Object.create(vm.constructor.options);
  7840. // doing this because it's faster than dynamic enumeration.
  7841. var parentVnode = options._parentVnode;
  7842. opts.parent = options.parent;
  7843. opts._parentVnode = parentVnode;
  7844. var vnodeComponentOptions = parentVnode.componentOptions;
  7845. opts.propsData = vnodeComponentOptions.propsData;
  7846. opts._parentListeners = vnodeComponentOptions.listeners;
  7847. opts._renderChildren = vnodeComponentOptions.children;
  7848. opts._componentTag = vnodeComponentOptions.tag;
  7849. if (options.render) {
  7850. opts.render = options.render;
  7851. opts.staticRenderFns = options.staticRenderFns;
  7852. }
  7853. }
  7854. function resolveConstructorOptions (Ctor) {
  7855. var options = Ctor.options;
  7856. if (Ctor.super) {
  7857. var superOptions = resolveConstructorOptions(Ctor.super);
  7858. var cachedSuperOptions = Ctor.superOptions;
  7859. if (superOptions !== cachedSuperOptions) {
  7860. // super option changed,
  7861. // need to resolve new options.
  7862. Ctor.superOptions = superOptions;
  7863. // check if there are any late-modified/attached options (#4976)
  7864. var modifiedOptions = resolveModifiedOptions(Ctor);
  7865. // update base extend options
  7866. if (modifiedOptions) {
  7867. extend(Ctor.extendOptions, modifiedOptions);
  7868. }
  7869. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  7870. if (options.name) {
  7871. options.components[options.name] = Ctor;
  7872. }
  7873. }
  7874. }
  7875. return options
  7876. }
  7877. function resolveModifiedOptions (Ctor) {
  7878. var modified;
  7879. var latest = Ctor.options;
  7880. var sealed = Ctor.sealedOptions;
  7881. for (var key in latest) {
  7882. if (latest[key] !== sealed[key]) {
  7883. if (!modified) { modified = {}; }
  7884. modified[key] = latest[key];
  7885. }
  7886. }
  7887. return modified
  7888. }
  7889. function Vue (options) {
  7890. if ( true &&
  7891. !(this instanceof Vue)
  7892. ) {
  7893. warn('Vue is a constructor and should be called with the `new` keyword');
  7894. }
  7895. this._init(options);
  7896. }
  7897. initMixin(Vue);
  7898. stateMixin(Vue);
  7899. eventsMixin(Vue);
  7900. lifecycleMixin(Vue);
  7901. renderMixin(Vue);
  7902. /* */
  7903. function initUse (Vue) {
  7904. Vue.use = function (plugin) {
  7905. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  7906. if (installedPlugins.indexOf(plugin) > -1) {
  7907. return this
  7908. }
  7909. // additional parameters
  7910. var args = toArray(arguments, 1);
  7911. args.unshift(this);
  7912. if (typeof plugin.install === 'function') {
  7913. plugin.install.apply(plugin, args);
  7914. } else if (typeof plugin === 'function') {
  7915. plugin.apply(null, args);
  7916. }
  7917. installedPlugins.push(plugin);
  7918. return this
  7919. };
  7920. }
  7921. /* */
  7922. function initMixin$1 (Vue) {
  7923. Vue.mixin = function (mixin) {
  7924. this.options = mergeOptions(this.options, mixin);
  7925. return this
  7926. };
  7927. }
  7928. /* */
  7929. function initExtend (Vue) {
  7930. /**
  7931. * Each instance constructor, including Vue, has a unique
  7932. * cid. This enables us to create wrapped "child
  7933. * constructors" for prototypal inheritance and cache them.
  7934. */
  7935. Vue.cid = 0;
  7936. var cid = 1;
  7937. /**
  7938. * Class inheritance
  7939. */
  7940. Vue.extend = function (extendOptions) {
  7941. extendOptions = extendOptions || {};
  7942. var Super = this;
  7943. var SuperId = Super.cid;
  7944. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  7945. if (cachedCtors[SuperId]) {
  7946. return cachedCtors[SuperId]
  7947. }
  7948. var name = extendOptions.name || Super.options.name;
  7949. if ( true && name) {
  7950. validateComponentName(name);
  7951. }
  7952. var Sub = function VueComponent (options) {
  7953. this._init(options);
  7954. };
  7955. Sub.prototype = Object.create(Super.prototype);
  7956. Sub.prototype.constructor = Sub;
  7957. Sub.cid = cid++;
  7958. Sub.options = mergeOptions(
  7959. Super.options,
  7960. extendOptions
  7961. );
  7962. Sub['super'] = Super;
  7963. // For props and computed properties, we define the proxy getters on
  7964. // the Vue instances at extension time, on the extended prototype. This
  7965. // avoids Object.defineProperty calls for each instance created.
  7966. if (Sub.options.props) {
  7967. initProps$1(Sub);
  7968. }
  7969. if (Sub.options.computed) {
  7970. initComputed$1(Sub);
  7971. }
  7972. // allow further extension/mixin/plugin usage
  7973. Sub.extend = Super.extend;
  7974. Sub.mixin = Super.mixin;
  7975. Sub.use = Super.use;
  7976. // create asset registers, so extended classes
  7977. // can have their private assets too.
  7978. ASSET_TYPES.forEach(function (type) {
  7979. Sub[type] = Super[type];
  7980. });
  7981. // enable recursive self-lookup
  7982. if (name) {
  7983. Sub.options.components[name] = Sub;
  7984. }
  7985. // keep a reference to the super options at extension time.
  7986. // later at instantiation we can check if Super's options have
  7987. // been updated.
  7988. Sub.superOptions = Super.options;
  7989. Sub.extendOptions = extendOptions;
  7990. Sub.sealedOptions = extend({}, Sub.options);
  7991. // cache constructor
  7992. cachedCtors[SuperId] = Sub;
  7993. return Sub
  7994. };
  7995. }
  7996. function initProps$1 (Comp) {
  7997. var props = Comp.options.props;
  7998. for (var key in props) {
  7999. proxy(Comp.prototype, "_props", key);
  8000. }
  8001. }
  8002. function initComputed$1 (Comp) {
  8003. var computed = Comp.options.computed;
  8004. for (var key in computed) {
  8005. defineComputed(Comp.prototype, key, computed[key]);
  8006. }
  8007. }
  8008. /* */
  8009. function initAssetRegisters (Vue) {
  8010. /**
  8011. * Create asset registration methods.
  8012. */
  8013. ASSET_TYPES.forEach(function (type) {
  8014. Vue[type] = function (
  8015. id,
  8016. definition
  8017. ) {
  8018. if (!definition) {
  8019. return this.options[type + 's'][id]
  8020. } else {
  8021. /* istanbul ignore if */
  8022. if ( true && type === 'component') {
  8023. validateComponentName(id);
  8024. }
  8025. if (type === 'component' && isPlainObject(definition)) {
  8026. definition.name = definition.name || id;
  8027. definition = this.options._base.extend(definition);
  8028. }
  8029. if (type === 'directive' && typeof definition === 'function') {
  8030. definition = { bind: definition, update: definition };
  8031. }
  8032. this.options[type + 's'][id] = definition;
  8033. return definition
  8034. }
  8035. };
  8036. });
  8037. }
  8038. /* */
  8039. function getComponentName (opts) {
  8040. return opts && (opts.Ctor.options.name || opts.tag)
  8041. }
  8042. function matches (pattern, name) {
  8043. if (Array.isArray(pattern)) {
  8044. return pattern.indexOf(name) > -1
  8045. } else if (typeof pattern === 'string') {
  8046. return pattern.split(',').indexOf(name) > -1
  8047. } else if (isRegExp(pattern)) {
  8048. return pattern.test(name)
  8049. }
  8050. /* istanbul ignore next */
  8051. return false
  8052. }
  8053. function pruneCache (keepAliveInstance, filter) {
  8054. var cache = keepAliveInstance.cache;
  8055. var keys = keepAliveInstance.keys;
  8056. var _vnode = keepAliveInstance._vnode;
  8057. for (var key in cache) {
  8058. var cachedNode = cache[key];
  8059. if (cachedNode) {
  8060. var name = getComponentName(cachedNode.componentOptions);
  8061. if (name && !filter(name)) {
  8062. pruneCacheEntry(cache, key, keys, _vnode);
  8063. }
  8064. }
  8065. }
  8066. }
  8067. function pruneCacheEntry (
  8068. cache,
  8069. key,
  8070. keys,
  8071. current
  8072. ) {
  8073. var cached$$1 = cache[key];
  8074. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  8075. cached$$1.componentInstance.$destroy();
  8076. }
  8077. cache[key] = null;
  8078. remove(keys, key);
  8079. }
  8080. var patternTypes = [String, RegExp, Array];
  8081. var KeepAlive = {
  8082. name: 'keep-alive',
  8083. abstract: true,
  8084. props: {
  8085. include: patternTypes,
  8086. exclude: patternTypes,
  8087. max: [String, Number]
  8088. },
  8089. created: function created () {
  8090. this.cache = Object.create(null);
  8091. this.keys = [];
  8092. },
  8093. destroyed: function destroyed () {
  8094. for (var key in this.cache) {
  8095. pruneCacheEntry(this.cache, key, this.keys);
  8096. }
  8097. },
  8098. mounted: function mounted () {
  8099. var this$1 = this;
  8100. this.$watch('include', function (val) {
  8101. pruneCache(this$1, function (name) { return matches(val, name); });
  8102. });
  8103. this.$watch('exclude', function (val) {
  8104. pruneCache(this$1, function (name) { return !matches(val, name); });
  8105. });
  8106. },
  8107. render: function render () {
  8108. var slot = this.$slots.default;
  8109. var vnode = getFirstComponentChild(slot);
  8110. var componentOptions = vnode && vnode.componentOptions;
  8111. if (componentOptions) {
  8112. // check pattern
  8113. var name = getComponentName(componentOptions);
  8114. var ref = this;
  8115. var include = ref.include;
  8116. var exclude = ref.exclude;
  8117. if (
  8118. // not included
  8119. (include && (!name || !matches(include, name))) ||
  8120. // excluded
  8121. (exclude && name && matches(exclude, name))
  8122. ) {
  8123. return vnode
  8124. }
  8125. var ref$1 = this;
  8126. var cache = ref$1.cache;
  8127. var keys = ref$1.keys;
  8128. var key = vnode.key == null
  8129. // same constructor may get registered as different local components
  8130. // so cid alone is not enough (#3269)
  8131. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  8132. : vnode.key;
  8133. if (cache[key]) {
  8134. vnode.componentInstance = cache[key].componentInstance;
  8135. // make current key freshest
  8136. remove(keys, key);
  8137. keys.push(key);
  8138. } else {
  8139. cache[key] = vnode;
  8140. keys.push(key);
  8141. // prune oldest entry
  8142. if (this.max && keys.length > parseInt(this.max)) {
  8143. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  8144. }
  8145. }
  8146. vnode.data.keepAlive = true;
  8147. }
  8148. return vnode || (slot && slot[0])
  8149. }
  8150. };
  8151. var builtInComponents = {
  8152. KeepAlive: KeepAlive
  8153. };
  8154. /* */
  8155. function initGlobalAPI (Vue) {
  8156. // config
  8157. var configDef = {};
  8158. configDef.get = function () { return config; };
  8159. if (true) {
  8160. configDef.set = function () {
  8161. warn(
  8162. 'Do not replace the Vue.config object, set individual fields instead.'
  8163. );
  8164. };
  8165. }
  8166. Object.defineProperty(Vue, 'config', configDef);
  8167. // exposed util methods.
  8168. // NOTE: these are not considered part of the public API - avoid relying on
  8169. // them unless you are aware of the risk.
  8170. Vue.util = {
  8171. warn: warn,
  8172. extend: extend,
  8173. mergeOptions: mergeOptions,
  8174. defineReactive: defineReactive$$1
  8175. };
  8176. Vue.set = set;
  8177. Vue.delete = del;
  8178. Vue.nextTick = nextTick;
  8179. // 2.6 explicit observable API
  8180. Vue.observable = function (obj) {
  8181. observe(obj);
  8182. return obj
  8183. };
  8184. Vue.options = Object.create(null);
  8185. ASSET_TYPES.forEach(function (type) {
  8186. Vue.options[type + 's'] = Object.create(null);
  8187. });
  8188. // this is used to identify the "base" constructor to extend all plain-object
  8189. // components with in Weex's multi-instance scenarios.
  8190. Vue.options._base = Vue;
  8191. extend(Vue.options.components, builtInComponents);
  8192. initUse(Vue);
  8193. initMixin$1(Vue);
  8194. initExtend(Vue);
  8195. initAssetRegisters(Vue);
  8196. }
  8197. initGlobalAPI(Vue);
  8198. Object.defineProperty(Vue.prototype, '$isServer', {
  8199. get: isServerRendering
  8200. });
  8201. Object.defineProperty(Vue.prototype, '$ssrContext', {
  8202. get: function get () {
  8203. /* istanbul ignore next */
  8204. return this.$vnode && this.$vnode.ssrContext
  8205. }
  8206. });
  8207. // expose FunctionalRenderContext for ssr runtime helper installation
  8208. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  8209. value: FunctionalRenderContext
  8210. });
  8211. Vue.version = '2.6.11';
  8212. /**
  8213. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  8214. */
  8215. var ARRAYTYPE = '[object Array]';
  8216. var OBJECTTYPE = '[object Object]';
  8217. var NULLTYPE = '[object Null]';
  8218. var UNDEFINEDTYPE = '[object Undefined]';
  8219. // const FUNCTIONTYPE = '[object Function]'
  8220. function diff(current, pre) {
  8221. var result = {};
  8222. syncKeys(current, pre);
  8223. _diff(current, pre, '', result);
  8224. return result
  8225. }
  8226. function syncKeys(current, pre) {
  8227. if (current === pre) { return }
  8228. var rootCurrentType = type(current);
  8229. var rootPreType = type(pre);
  8230. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  8231. if(Object.keys(current).length >= Object.keys(pre).length){
  8232. for (var key in pre) {
  8233. var currentValue = current[key];
  8234. if (currentValue === undefined) {
  8235. current[key] = null;
  8236. } else {
  8237. syncKeys(currentValue, pre[key]);
  8238. }
  8239. }
  8240. }
  8241. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  8242. if (current.length >= pre.length) {
  8243. pre.forEach(function (item, index) {
  8244. syncKeys(current[index], item);
  8245. });
  8246. }
  8247. }
  8248. }
  8249. function nullOrUndefined(currentType, preType) {
  8250. if(
  8251. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  8252. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  8253. ) {
  8254. return false
  8255. }
  8256. return true
  8257. }
  8258. function _diff(current, pre, path, result) {
  8259. if (current === pre) { return }
  8260. var rootCurrentType = type(current);
  8261. var rootPreType = type(pre);
  8262. if (rootCurrentType == OBJECTTYPE) {
  8263. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  8264. setResult(result, path, current);
  8265. } else {
  8266. var loop = function ( key ) {
  8267. var currentValue = current[key];
  8268. var preValue = pre[key];
  8269. var currentType = type(currentValue);
  8270. var preType = type(preValue);
  8271. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  8272. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  8273. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8274. }
  8275. } else if (currentType == ARRAYTYPE) {
  8276. if (preType != ARRAYTYPE) {
  8277. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8278. } else {
  8279. if (currentValue.length < preValue.length) {
  8280. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8281. } else {
  8282. currentValue.forEach(function (item, index) {
  8283. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  8284. });
  8285. }
  8286. }
  8287. } else if (currentType == OBJECTTYPE) {
  8288. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  8289. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8290. } else {
  8291. for (var subKey in currentValue) {
  8292. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  8293. }
  8294. }
  8295. }
  8296. };
  8297. for (var key in current) loop( key );
  8298. }
  8299. } else if (rootCurrentType == ARRAYTYPE) {
  8300. if (rootPreType != ARRAYTYPE) {
  8301. setResult(result, path, current);
  8302. } else {
  8303. if (current.length < pre.length) {
  8304. setResult(result, path, current);
  8305. } else {
  8306. current.forEach(function (item, index) {
  8307. _diff(item, pre[index], path + '[' + index + ']', result);
  8308. });
  8309. }
  8310. }
  8311. } else {
  8312. setResult(result, path, current);
  8313. }
  8314. }
  8315. function setResult(result, k, v) {
  8316. // if (type(v) != FUNCTIONTYPE) {
  8317. result[k] = v;
  8318. // }
  8319. }
  8320. function type(obj) {
  8321. return Object.prototype.toString.call(obj)
  8322. }
  8323. /* */
  8324. function flushCallbacks$1(vm) {
  8325. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  8326. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"红沙湾管理端","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8327. var mpInstance = vm.$scope;
  8328. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8329. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  8330. }
  8331. var copies = vm.__next_tick_callbacks.slice(0);
  8332. vm.__next_tick_callbacks.length = 0;
  8333. for (var i = 0; i < copies.length; i++) {
  8334. copies[i]();
  8335. }
  8336. }
  8337. }
  8338. function hasRenderWatcher(vm) {
  8339. return queue.find(function (watcher) { return vm._watcher === watcher; })
  8340. }
  8341. function nextTick$1(vm, cb) {
  8342. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  8343. //2.nextTick 之前存在 render watcher
  8344. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  8345. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"红沙湾管理端","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8346. var mpInstance = vm.$scope;
  8347. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8348. ']:nextVueTick');
  8349. }
  8350. return nextTick(cb, vm)
  8351. }else{
  8352. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"红沙湾管理端","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8353. var mpInstance$1 = vm.$scope;
  8354. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  8355. ']:nextMPTick');
  8356. }
  8357. }
  8358. var _resolve;
  8359. if (!vm.__next_tick_callbacks) {
  8360. vm.__next_tick_callbacks = [];
  8361. }
  8362. vm.__next_tick_callbacks.push(function () {
  8363. if (cb) {
  8364. try {
  8365. cb.call(vm);
  8366. } catch (e) {
  8367. handleError(e, vm, 'nextTick');
  8368. }
  8369. } else if (_resolve) {
  8370. _resolve(vm);
  8371. }
  8372. });
  8373. // $flow-disable-line
  8374. if (!cb && typeof Promise !== 'undefined') {
  8375. return new Promise(function (resolve) {
  8376. _resolve = resolve;
  8377. })
  8378. }
  8379. }
  8380. /* */
  8381. function clearInstance(key, value) {
  8382. // 简易去除 Vue 和小程序组件实例
  8383. if (value) {
  8384. if (value._isVue || value.__v_isMPComponent) {
  8385. return {}
  8386. }
  8387. }
  8388. return value
  8389. }
  8390. function cloneWithData(vm) {
  8391. // 确保当前 vm 所有数据被同步
  8392. var ret = Object.create(null);
  8393. var dataKeys = [].concat(
  8394. Object.keys(vm._data || {}),
  8395. Object.keys(vm._computedWatchers || {}));
  8396. dataKeys.reduce(function(ret, key) {
  8397. ret[key] = vm[key];
  8398. return ret
  8399. }, ret);
  8400. // vue-composition-api
  8401. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  8402. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  8403. if (rawBindings) {
  8404. Object.keys(rawBindings).forEach(function (key) {
  8405. ret[key] = vm[key];
  8406. });
  8407. }
  8408. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  8409. Object.assign(ret, vm.$mp.data || {});
  8410. if (
  8411. Array.isArray(vm.$options.behaviors) &&
  8412. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8413. ) { //form-field
  8414. ret['name'] = vm.name;
  8415. ret['value'] = vm.value;
  8416. }
  8417. return JSON.parse(JSON.stringify(ret, clearInstance))
  8418. }
  8419. var patch = function(oldVnode, vnode) {
  8420. var this$1 = this;
  8421. if (vnode === null) { //destroy
  8422. return
  8423. }
  8424. if (this.mpType === 'page' || this.mpType === 'component') {
  8425. var mpInstance = this.$scope;
  8426. var data = Object.create(null);
  8427. try {
  8428. data = cloneWithData(this);
  8429. } catch (err) {
  8430. console.error(err);
  8431. }
  8432. data.__webviewId__ = mpInstance.data.__webviewId__;
  8433. var mpData = Object.create(null);
  8434. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  8435. mpData[key] = mpInstance.data[key];
  8436. });
  8437. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  8438. if (Object.keys(diffData).length) {
  8439. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"红沙湾管理端","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8440. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  8441. ']差量更新',
  8442. JSON.stringify(diffData));
  8443. }
  8444. this.__next_tick_pending = true;
  8445. mpInstance.setData(diffData, function () {
  8446. this$1.__next_tick_pending = false;
  8447. flushCallbacks$1(this$1);
  8448. });
  8449. } else {
  8450. flushCallbacks$1(this);
  8451. }
  8452. }
  8453. };
  8454. /* */
  8455. function createEmptyRender() {
  8456. }
  8457. function mountComponent$1(
  8458. vm,
  8459. el,
  8460. hydrating
  8461. ) {
  8462. if (!vm.mpType) {//main.js 中的 new Vue
  8463. return vm
  8464. }
  8465. if (vm.mpType === 'app') {
  8466. vm.$options.render = createEmptyRender;
  8467. }
  8468. if (!vm.$options.render) {
  8469. vm.$options.render = createEmptyRender;
  8470. if (true) {
  8471. /* istanbul ignore if */
  8472. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  8473. vm.$options.el || el) {
  8474. warn(
  8475. 'You are using the runtime-only build of Vue where the template ' +
  8476. 'compiler is not available. Either pre-compile the templates into ' +
  8477. 'render functions, or use the compiler-included build.',
  8478. vm
  8479. );
  8480. } else {
  8481. warn(
  8482. 'Failed to mount component: template or render function not defined.',
  8483. vm
  8484. );
  8485. }
  8486. }
  8487. }
  8488. !vm._$fallback && callHook(vm, 'beforeMount');
  8489. var updateComponent = function () {
  8490. vm._update(vm._render(), hydrating);
  8491. };
  8492. // we set this to vm._watcher inside the watcher's constructor
  8493. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  8494. // component's mounted hook), which relies on vm._watcher being already defined
  8495. new Watcher(vm, updateComponent, noop, {
  8496. before: function before() {
  8497. if (vm._isMounted && !vm._isDestroyed) {
  8498. callHook(vm, 'beforeUpdate');
  8499. }
  8500. }
  8501. }, true /* isRenderWatcher */);
  8502. hydrating = false;
  8503. return vm
  8504. }
  8505. /* */
  8506. function renderClass (
  8507. staticClass,
  8508. dynamicClass
  8509. ) {
  8510. if (isDef(staticClass) || isDef(dynamicClass)) {
  8511. return concat(staticClass, stringifyClass(dynamicClass))
  8512. }
  8513. /* istanbul ignore next */
  8514. return ''
  8515. }
  8516. function concat (a, b) {
  8517. return a ? b ? (a + ' ' + b) : a : (b || '')
  8518. }
  8519. function stringifyClass (value) {
  8520. if (Array.isArray(value)) {
  8521. return stringifyArray(value)
  8522. }
  8523. if (isObject(value)) {
  8524. return stringifyObject(value)
  8525. }
  8526. if (typeof value === 'string') {
  8527. return value
  8528. }
  8529. /* istanbul ignore next */
  8530. return ''
  8531. }
  8532. function stringifyArray (value) {
  8533. var res = '';
  8534. var stringified;
  8535. for (var i = 0, l = value.length; i < l; i++) {
  8536. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  8537. if (res) { res += ' '; }
  8538. res += stringified;
  8539. }
  8540. }
  8541. return res
  8542. }
  8543. function stringifyObject (value) {
  8544. var res = '';
  8545. for (var key in value) {
  8546. if (value[key]) {
  8547. if (res) { res += ' '; }
  8548. res += key;
  8549. }
  8550. }
  8551. return res
  8552. }
  8553. /* */
  8554. var parseStyleText = cached(function (cssText) {
  8555. var res = {};
  8556. var listDelimiter = /;(?![^(]*\))/g;
  8557. var propertyDelimiter = /:(.+)/;
  8558. cssText.split(listDelimiter).forEach(function (item) {
  8559. if (item) {
  8560. var tmp = item.split(propertyDelimiter);
  8561. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  8562. }
  8563. });
  8564. return res
  8565. });
  8566. // normalize possible array / string values into Object
  8567. function normalizeStyleBinding (bindingStyle) {
  8568. if (Array.isArray(bindingStyle)) {
  8569. return toObject(bindingStyle)
  8570. }
  8571. if (typeof bindingStyle === 'string') {
  8572. return parseStyleText(bindingStyle)
  8573. }
  8574. return bindingStyle
  8575. }
  8576. /* */
  8577. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  8578. function getTarget(obj, path) {
  8579. var parts = path.split('.');
  8580. var key = parts[0];
  8581. if (key.indexOf('__$n') === 0) { //number index
  8582. key = parseInt(key.replace('__$n', ''));
  8583. }
  8584. if (parts.length === 1) {
  8585. return obj[key]
  8586. }
  8587. return getTarget(obj[key], parts.slice(1).join('.'))
  8588. }
  8589. function internalMixin(Vue) {
  8590. Vue.config.errorHandler = function(err, vm, info) {
  8591. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  8592. console.error(err);
  8593. /* eslint-disable no-undef */
  8594. var app = typeof getApp === 'function' && getApp();
  8595. if (app && app.onError) {
  8596. app.onError(err);
  8597. }
  8598. };
  8599. var oldEmit = Vue.prototype.$emit;
  8600. Vue.prototype.$emit = function(event) {
  8601. if (this.$scope && event) {
  8602. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  8603. if (triggerEvent) {
  8604. try {
  8605. triggerEvent.call(this.$scope, event, {
  8606. __args__: toArray(arguments, 1)
  8607. });
  8608. } catch (error) {
  8609. }
  8610. }
  8611. }
  8612. return oldEmit.apply(this, arguments)
  8613. };
  8614. Vue.prototype.$nextTick = function(fn) {
  8615. return nextTick$1(this, fn)
  8616. };
  8617. MP_METHODS.forEach(function (method) {
  8618. Vue.prototype[method] = function(args) {
  8619. if (this.$scope && this.$scope[method]) {
  8620. return this.$scope[method](args)
  8621. }
  8622. // mp-alipay
  8623. if (typeof my === 'undefined') {
  8624. return
  8625. }
  8626. if (method === 'createSelectorQuery') {
  8627. /* eslint-disable no-undef */
  8628. return my.createSelectorQuery(args)
  8629. } else if (method === 'createIntersectionObserver') {
  8630. /* eslint-disable no-undef */
  8631. return my.createIntersectionObserver(args)
  8632. }
  8633. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  8634. };
  8635. });
  8636. Vue.prototype.__init_provide = initProvide;
  8637. Vue.prototype.__init_injections = initInjections;
  8638. Vue.prototype.__call_hook = function(hook, args) {
  8639. var vm = this;
  8640. // #7573 disable dep collection when invoking lifecycle hooks
  8641. pushTarget();
  8642. var handlers = vm.$options[hook];
  8643. var info = hook + " hook";
  8644. var ret;
  8645. if (handlers) {
  8646. for (var i = 0, j = handlers.length; i < j; i++) {
  8647. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  8648. }
  8649. }
  8650. if (vm._hasHookEvent) {
  8651. vm.$emit('hook:' + hook, args);
  8652. }
  8653. popTarget();
  8654. return ret
  8655. };
  8656. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  8657. if (Array.isArray(modifiers)) {
  8658. if (modifiers.indexOf('trim') !== -1) {
  8659. value = value.trim();
  8660. }
  8661. if (modifiers.indexOf('number') !== -1) {
  8662. value = this._n(value);
  8663. }
  8664. }
  8665. if (!target) {
  8666. target = this;
  8667. }
  8668. // 解决动态属性添加
  8669. Vue.set(target, key, value);
  8670. };
  8671. Vue.prototype.__set_sync = function(target, key, value) {
  8672. if (!target) {
  8673. target = this;
  8674. }
  8675. // 解决动态属性添加
  8676. Vue.set(target, key, value);
  8677. };
  8678. Vue.prototype.__get_orig = function(item) {
  8679. if (isPlainObject(item)) {
  8680. return item['$orig'] || item
  8681. }
  8682. return item
  8683. };
  8684. Vue.prototype.__get_value = function(dataPath, target) {
  8685. return getTarget(target || this, dataPath)
  8686. };
  8687. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  8688. return renderClass(staticClass, dynamicClass)
  8689. };
  8690. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  8691. if (!dynamicStyle && !staticStyle) {
  8692. return ''
  8693. }
  8694. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  8695. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  8696. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  8697. };
  8698. Vue.prototype.__map = function(val, iteratee) {
  8699. //TODO 暂不考虑 string
  8700. var ret, i, l, keys, key;
  8701. if (Array.isArray(val)) {
  8702. ret = new Array(val.length);
  8703. for (i = 0, l = val.length; i < l; i++) {
  8704. ret[i] = iteratee(val[i], i);
  8705. }
  8706. return ret
  8707. } else if (isObject(val)) {
  8708. keys = Object.keys(val);
  8709. ret = Object.create(null);
  8710. for (i = 0, l = keys.length; i < l; i++) {
  8711. key = keys[i];
  8712. ret[key] = iteratee(val[key], key, i);
  8713. }
  8714. return ret
  8715. } else if (typeof val === 'number') {
  8716. ret = new Array(val);
  8717. for (i = 0, l = val; i < l; i++) {
  8718. // 第一个参数暂时仍和小程序一致
  8719. ret[i] = iteratee(i, i);
  8720. }
  8721. return ret
  8722. }
  8723. return []
  8724. };
  8725. }
  8726. /* */
  8727. var LIFECYCLE_HOOKS$1 = [
  8728. //App
  8729. 'onLaunch',
  8730. 'onShow',
  8731. 'onHide',
  8732. 'onUniNViewMessage',
  8733. 'onPageNotFound',
  8734. 'onThemeChange',
  8735. 'onError',
  8736. 'onUnhandledRejection',
  8737. //Page
  8738. 'onInit',
  8739. 'onLoad',
  8740. // 'onShow',
  8741. 'onReady',
  8742. // 'onHide',
  8743. 'onUnload',
  8744. 'onPullDownRefresh',
  8745. 'onReachBottom',
  8746. 'onTabItemTap',
  8747. 'onAddToFavorites',
  8748. 'onShareTimeline',
  8749. 'onShareAppMessage',
  8750. 'onResize',
  8751. 'onPageScroll',
  8752. 'onNavigationBarButtonTap',
  8753. 'onBackPress',
  8754. 'onNavigationBarSearchInputChanged',
  8755. 'onNavigationBarSearchInputConfirmed',
  8756. 'onNavigationBarSearchInputClicked',
  8757. 'onUploadDouyinVideo',
  8758. 'onNFCReadMessage',
  8759. //Component
  8760. // 'onReady', // 兼容旧版本,应该移除该事件
  8761. 'onPageShow',
  8762. 'onPageHide',
  8763. 'onPageResize'
  8764. ];
  8765. function lifecycleMixin$1(Vue) {
  8766. //fixed vue-class-component
  8767. var oldExtend = Vue.extend;
  8768. Vue.extend = function(extendOptions) {
  8769. extendOptions = extendOptions || {};
  8770. var methods = extendOptions.methods;
  8771. if (methods) {
  8772. Object.keys(methods).forEach(function (methodName) {
  8773. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  8774. extendOptions[methodName] = methods[methodName];
  8775. delete methods[methodName];
  8776. }
  8777. });
  8778. }
  8779. return oldExtend.call(this, extendOptions)
  8780. };
  8781. var strategies = Vue.config.optionMergeStrategies;
  8782. var mergeHook = strategies.created;
  8783. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  8784. strategies[hook] = mergeHook;
  8785. });
  8786. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  8787. }
  8788. /* */
  8789. // install platform patch function
  8790. Vue.prototype.__patch__ = patch;
  8791. // public mount method
  8792. Vue.prototype.$mount = function(
  8793. el ,
  8794. hydrating
  8795. ) {
  8796. return mountComponent$1(this, el, hydrating)
  8797. };
  8798. lifecycleMixin$1(Vue);
  8799. internalMixin(Vue);
  8800. /* */
  8801. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  8802. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  8803. /***/ }),
  8804. /* 26 */
  8805. /*!************************************************************!*\
  8806. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages.json ***!
  8807. \************************************************************/
  8808. /*! no static exports found */
  8809. /***/ (function(module, exports) {
  8810. /***/ }),
  8811. /* 27 */
  8812. /*!*******************************************************************!*\
  8813. !*** ./node_modules/@dcloudio/uni-stat/dist/uni-cloud-stat.es.js ***!
  8814. \*******************************************************************/
  8815. /*! no static exports found */
  8816. /***/ (function(module, exports, __webpack_require__) {
  8817. /* WEBPACK VAR INJECTION */(function(uni, uniCloud) {var _inherits = __webpack_require__(/*! @babel/runtime/helpers/inherits */ 33);
  8818. var _possibleConstructorReturn = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 34);
  8819. var _getPrototypeOf = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 35);
  8820. var _classCallCheck = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23);
  8821. var _createClass = __webpack_require__(/*! @babel/runtime/helpers/createClass */ 24);
  8822. var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  8823. var _defineProperty = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11);
  8824. function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
  8825. function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  8826. /**
  8827. * 获取系统信息
  8828. */
  8829. var sys = uni.getSystemInfoSync();
  8830. // 访问开始即启动小程序,访问结束结分为:进入后台超过5min、在前台无任何操作超过30min、在新的来源打开小程序;
  8831. var STAT_VERSION = "4.32";
  8832. var STAT_URL = 'https://tongji.dcloud.io/uni/stat';
  8833. var STAT_H5_URL = 'https://tongji.dcloud.io/uni/stat.gif';
  8834. var PAGE_PVER_TIME = 1800; // 页面在前台无操作结束访问时间 单位s
  8835. var APP_PVER_TIME = 300; // 应用在后台结束访问时间 单位s
  8836. var OPERATING_TIME = 10; // 数据上报时间 单位s
  8837. var DIFF_TIME = 60 * 1000 * 60 * 24;
  8838. var appid = "__UNI__8C5F0F6"; // 做应用隔离
  8839. var dbSet = function dbSet(name, value) {
  8840. var data = uni.getStorageSync('$$STAT__DBDATA:' + appid) || {};
  8841. if (!data) {
  8842. data = {};
  8843. }
  8844. data[name] = value;
  8845. uni.setStorageSync('$$STAT__DBDATA:' + appid, data);
  8846. };
  8847. var dbGet = function dbGet(name) {
  8848. var data = uni.getStorageSync('$$STAT__DBDATA:' + appid) || {};
  8849. if (!data[name]) {
  8850. var dbdata = uni.getStorageSync('$$STAT__DBDATA:' + appid);
  8851. if (!dbdata) {
  8852. dbdata = {};
  8853. }
  8854. if (!dbdata[name]) {
  8855. return undefined;
  8856. }
  8857. data[name] = dbdata[name];
  8858. }
  8859. return data[name];
  8860. };
  8861. var dbRemove = function dbRemove(name) {
  8862. var data = uni.getStorageSync('$$STAT__DBDATA:' + appid) || {};
  8863. if (data[name]) {
  8864. delete data[name];
  8865. uni.setStorageSync('$$STAT__DBDATA:' + appid, data);
  8866. } else {
  8867. data = uni.getStorageSync('$$STAT__DBDATA:' + appid);
  8868. if (data[name]) {
  8869. delete data[name];
  8870. uni.setStorageSync('$$STAT__DBDATA:' + appid, data);
  8871. }
  8872. }
  8873. };
  8874. // 获取 manifest.json 中统计配置
  8875. var uniStatisticsConfig = {"version":"2","enable":true};
  8876. var statConfig = {
  8877. appid: "__UNI__8C5F0F6"
  8878. };
  8879. var titleJsons = {};
  8880. var debug = false || false;
  8881. // eslint-disable-next-line no-restricted-globals
  8882. var pagesTitle = __webpack_require__(/*! uni-pages?{"type":"style"} */ 40).default;
  8883. var pagesData = pagesTitle.pages;
  8884. for (var i in pagesData) {
  8885. var _style$navigationBar;
  8886. var style = pagesData[i];
  8887. var titleText =
  8888. // MP
  8889. style.navigationBarTitleText ||
  8890. // ali
  8891. style.defaultTitle || ( // H5 || App
  8892. (_style$navigationBar = style.navigationBar) === null || _style$navigationBar === void 0 ? void 0 : _style$navigationBar.titleText) || '';
  8893. if (titleText) {
  8894. titleJsons[i] = titleText;
  8895. }
  8896. }
  8897. // TODO 在云函数中获取,暂时注释
  8898. var UUID_KEY = '__DC_STAT_UUID';
  8899. var UUID_VALUE = '__DC_UUID_VALUE';
  8900. function getUuid() {
  8901. var uuid = '';
  8902. if (get_platform_name() === 'n') {
  8903. try {
  8904. uuid = plus.runtime.getDCloudId();
  8905. } catch (e) {
  8906. uuid = '';
  8907. }
  8908. return uuid;
  8909. }
  8910. try {
  8911. uuid = uni.getStorageSync(UUID_KEY);
  8912. } catch (e) {
  8913. uuid = UUID_VALUE;
  8914. }
  8915. if (!uuid) {
  8916. uuid = Date.now() + '' + Math.floor(Math.random() * 1e7);
  8917. try {
  8918. uni.setStorageSync(UUID_KEY, uuid);
  8919. } catch (e) {
  8920. uni.setStorageSync(UUID_KEY, UUID_VALUE);
  8921. }
  8922. }
  8923. return uuid;
  8924. }
  8925. var get_uuid = function get_uuid(statData) {
  8926. // 有可能不存在 deviceId(一般不存在就是出bug了),就自己生成一个
  8927. return sys.deviceId || getUuid();
  8928. };
  8929. /**
  8930. * 获取老版的 deviceid ,兼容以前的错误 deviceid
  8931. * @param {*} statData
  8932. * @returns
  8933. */
  8934. var get_odid = function get_odid(statData) {
  8935. var odid = '';
  8936. if (get_platform_name() === 'n') {
  8937. try {
  8938. odid = plus.device.uuid;
  8939. } catch (e) {
  8940. odid = '';
  8941. }
  8942. return odid;
  8943. }
  8944. return sys.deviceId || getUuid();
  8945. };
  8946. /**
  8947. * 获取配置信息 如 appid
  8948. */
  8949. var stat_config = statConfig;
  8950. var get_sgin = function get_sgin(statData) {
  8951. var arr = Object.keys(statData);
  8952. var sortArr = arr.sort();
  8953. var sgin = {};
  8954. var sginStr = '';
  8955. for (var i in sortArr) {
  8956. sgin[sortArr[i]] = statData[sortArr[i]];
  8957. sginStr += sortArr[i] + '=' + statData[sortArr[i]] + '&';
  8958. }
  8959. return {
  8960. sign: '',
  8961. options: sginStr.substr(0, sginStr.length - 1)
  8962. };
  8963. };
  8964. var get_encodeURIComponent_options = function get_encodeURIComponent_options(statData) {
  8965. var data = {};
  8966. for (var prop in statData) {
  8967. data[prop] = encodeURIComponent(statData[prop]);
  8968. }
  8969. return data;
  8970. };
  8971. /**
  8972. * 获取当前平台
  8973. * 移动端 : 'n',
  8974. * h5 : 'h5',
  8975. * 微信 : 'wx',
  8976. * 阿里 : 'ali',
  8977. * 百度 : 'bd',
  8978. * 头条 : 'tt',
  8979. * qq : 'qq',
  8980. * 快应用 : 'qn',
  8981. * 快手 : 'ks',
  8982. * 飞书 : 'lark',
  8983. * 快应用 : 'qw',
  8984. * 钉钉 : 'dt'
  8985. */
  8986. var get_platform_name = function get_platform_name() {
  8987. var _platformList;
  8988. // 苹果审核代码中禁止出现 alipay 字样 ,需要特殊处理一下
  8989. var aliArr = ['y', 'a', 'p', 'mp-ali'];
  8990. var platformList = (_platformList = {
  8991. app: 'n',
  8992. 'app-plus': 'n',
  8993. h5: 'h5',
  8994. 'mp-weixin': 'wx'
  8995. }, _defineProperty(_platformList, aliArr.reverse().join(''), 'ali'), _defineProperty(_platformList, 'mp-baidu', 'bd'), _defineProperty(_platformList, 'mp-toutiao', 'tt'), _defineProperty(_platformList, 'mp-qq', 'qq'), _defineProperty(_platformList, 'quickapp-native', 'qn'), _defineProperty(_platformList, 'mp-kuaishou', 'ks'), _defineProperty(_platformList, 'mp-lark', 'lark'), _defineProperty(_platformList, 'quickapp-webview', 'qw'), _platformList);
  8996. if (platformList["mp-weixin"] === 'ali') {
  8997. if (my && my.env) {
  8998. var clientName = my.env.clientName;
  8999. if (clientName === 'ap') return 'ali';
  9000. if (clientName === 'dingtalk') return 'dt';
  9001. // TODO 缺少 ali 下的其他平台
  9002. }
  9003. }
  9004. return platformList["mp-weixin"];
  9005. };
  9006. /**
  9007. * 获取小程序 appid
  9008. */
  9009. var get_pack_name = function get_pack_name() {
  9010. var packName = '';
  9011. if (get_platform_name() === 'wx' || get_platform_name() === 'qq') {
  9012. // 兼容微信小程序低版本基础库
  9013. if (uni.canIUse('getAccountInfoSync')) {
  9014. packName = uni.getAccountInfoSync().miniProgram.appId || '';
  9015. }
  9016. }
  9017. if (get_platform_name() === 'n') ;
  9018. return packName;
  9019. };
  9020. /**
  9021. * 应用版本
  9022. */
  9023. var get_version = function get_version() {
  9024. return get_platform_name() === 'n' ? plus.runtime.version : '';
  9025. };
  9026. /**
  9027. * 获取渠道
  9028. */
  9029. var get_channel = function get_channel() {
  9030. var platformName = get_platform_name();
  9031. var channel = '';
  9032. if (platformName === 'n') {
  9033. channel = plus.runtime.channel;
  9034. }
  9035. return channel;
  9036. };
  9037. /**
  9038. * 获取小程序场景值
  9039. * @param {Object} options 页面信息
  9040. */
  9041. var get_scene = function get_scene(options) {
  9042. var platformName = get_platform_name();
  9043. var scene = '';
  9044. if (options) {
  9045. return options;
  9046. }
  9047. if (platformName === 'wx') {
  9048. scene = uni.getLaunchOptionsSync().scene;
  9049. }
  9050. return scene;
  9051. };
  9052. /**
  9053. * 获取页面url,不包含参数
  9054. */
  9055. var get_route$1 = function get_route$1(pageVm) {
  9056. var _self = pageVm || get_page_vm();
  9057. if (get_platform_name() === 'bd') {
  9058. var mp_route = _self.$mp && _self.$mp.page && _self.$mp.page.is;
  9059. var scope_route = _self.$scope && _self.$scope.is;
  9060. return mp_route || scope_route || '';
  9061. } else {
  9062. return _self.route || _self.$scope && _self.$scope.route || _self.$mp && _self.$mp.page.route;
  9063. }
  9064. };
  9065. /**
  9066. * 获取页面url, 包含参数
  9067. */
  9068. var get_page_route = function get_page_route(pageVm) {
  9069. // 从 app 进入应用 ,没有 $page ,获取不到路由 ,需要获取页面 尝试从 getCurrentPages 获取也页面实例
  9070. // FIXME 尽量不使用 getCurrentPages ,大部分获取路由是从 onHide 获取 ,这时可以获取到,如果是 onload ,则可能获取不到,比如 百度
  9071. var page = pageVm && (pageVm.$page || pageVm.$scope && pageVm.$scope.$page);
  9072. var lastPageRoute = uni.getStorageSync('_STAT_LAST_PAGE_ROUTE');
  9073. if (!page) return lastPageRoute || '';
  9074. // 如果找不到 fullPath 就取 route 的值
  9075. return page.fullPath === '/' ? page.route : page.fullPath || page.route;
  9076. };
  9077. /**
  9078. * 获取页面实例
  9079. */
  9080. var get_page_vm = function get_page_vm() {
  9081. var pages = getCurrentPages();
  9082. var $page = pages[pages.length - 1];
  9083. if (!$page) return null;
  9084. return $page.$vm;
  9085. };
  9086. /**
  9087. * 获取页面类型
  9088. */
  9089. var get_page_types = function get_page_types(self) {
  9090. // XXX 百度有问题 ,获取的都是 componet ,等待修复
  9091. if (self.mpType === 'page' || self.$mpType === 'page' || self.$mp && self.$mp.mpType === 'page' || self.$options.mpType === 'page') {
  9092. return 'page';
  9093. }
  9094. if (self.mpType === 'app' || self.$mpType === 'app' || self.$mp && self.$mp.mpType === 'app' || self.$options.mpType === 'app') {
  9095. return 'app';
  9096. }
  9097. return null;
  9098. };
  9099. /**
  9100. * 处理上报参数
  9101. * @param {Object} 需要处理的数据
  9102. */
  9103. var handle_data = function handle_data(statData) {
  9104. var firstArr = [];
  9105. var contentArr = [];
  9106. var lastArr = [];
  9107. var _loop = function _loop(_i) {
  9108. var rd = statData[_i];
  9109. rd.forEach(function (elm) {
  9110. var newData = '';
  9111. {
  9112. newData = elm;
  9113. }
  9114. if (_i === 0) {
  9115. firstArr.push(newData);
  9116. } else if (_i === 3) {
  9117. lastArr.push(newData);
  9118. } else {
  9119. contentArr.push(newData);
  9120. }
  9121. });
  9122. };
  9123. for (var _i in statData) {
  9124. _loop(_i);
  9125. }
  9126. firstArr.push.apply(firstArr, contentArr.concat(lastArr));
  9127. // 参数需要处理成字符串,方便上传
  9128. return JSON.stringify(firstArr);
  9129. };
  9130. /**
  9131. * 自定义事件参数校验
  9132. */
  9133. var calibration = function calibration(eventName, options) {
  9134. // login 、 share 、pay_success 、pay_fail 、register 、title
  9135. if (!eventName) {
  9136. console.error("uni.report Missing [eventName] parameter");
  9137. return true;
  9138. }
  9139. if (typeof eventName !== 'string') {
  9140. console.error("uni.report [eventName] Parameter type error, it can only be of type String");
  9141. return true;
  9142. }
  9143. if (eventName.length > 255) {
  9144. console.error("uni.report [eventName] Parameter length cannot be greater than 255");
  9145. return true;
  9146. }
  9147. if (typeof options !== 'string' && _typeof(options) !== 'object') {
  9148. console.error('uni.report [options] Parameter type error, Only supports String or Object type');
  9149. return true;
  9150. }
  9151. if (typeof options === 'string' && options.length > 255) {
  9152. console.error("uni.report [options] Parameter length cannot be greater than 255");
  9153. return true;
  9154. }
  9155. if (eventName === 'title' && typeof options !== 'string') {
  9156. console.error("uni.report [eventName] When the parameter is title, the [options] parameter can only be of type String");
  9157. return true;
  9158. }
  9159. };
  9160. var get_page_name = function get_page_name(routepath) {
  9161. return titleJsons && titleJsons[routepath] || '';
  9162. };
  9163. var Report_Data_Time = 'Report_Data_Time';
  9164. var Report_Status = 'Report_Status';
  9165. var is_report_data = function is_report_data() {
  9166. return new Promise(function (resolve, reject) {
  9167. var start_time = '';
  9168. var end_time = new Date().getTime();
  9169. var diff_time = DIFF_TIME;
  9170. var report_status = 1;
  9171. try {
  9172. start_time = uni.getStorageSync(Report_Data_Time);
  9173. report_status = uni.getStorageSync(Report_Status);
  9174. } catch (e) {
  9175. start_time = '';
  9176. report_status = 1;
  9177. }
  9178. if (report_status === '') {
  9179. requestData(function (_ref) {
  9180. var enable = _ref.enable;
  9181. uni.setStorageSync(Report_Data_Time, end_time);
  9182. uni.setStorageSync(Report_Status, enable);
  9183. if (enable === 1) {
  9184. resolve();
  9185. }
  9186. });
  9187. return;
  9188. }
  9189. if (report_status === 1) {
  9190. resolve();
  9191. }
  9192. if (!start_time) {
  9193. uni.setStorageSync(Report_Data_Time, end_time);
  9194. start_time = end_time;
  9195. }
  9196. if (end_time - start_time > diff_time) {
  9197. requestData(function (_ref2) {
  9198. var enable = _ref2.enable;
  9199. uni.setStorageSync(Report_Data_Time, end_time);
  9200. uni.setStorageSync(Report_Status, enable);
  9201. });
  9202. }
  9203. });
  9204. };
  9205. var requestData = function requestData(done) {
  9206. var appid = "__UNI__8C5F0F6";
  9207. var formData = {
  9208. usv: STAT_VERSION,
  9209. conf: JSON.stringify({
  9210. ak: appid
  9211. })
  9212. };
  9213. uni.request({
  9214. url: STAT_URL,
  9215. method: 'GET',
  9216. data: formData,
  9217. success: function success(res) {
  9218. var data = res.data;
  9219. if (data.ret === 0) {
  9220. typeof done === 'function' && done({
  9221. enable: data.enable
  9222. });
  9223. }
  9224. },
  9225. fail: function fail(e) {
  9226. var report_status_code = 1;
  9227. try {
  9228. report_status_code = uni.getStorageSync(Report_Status);
  9229. } catch (e) {
  9230. report_status_code = 1;
  9231. }
  9232. if (report_status_code === '') {
  9233. report_status_code = 1;
  9234. }
  9235. typeof done === 'function' && done({
  9236. enable: report_status_code
  9237. });
  9238. }
  9239. });
  9240. };
  9241. /**
  9242. * 获取uniCloud服务空间配置
  9243. * @returns {Object}
  9244. */
  9245. var uni_cloud_config = function uni_cloud_config() {
  9246. return {} || {};
  9247. };
  9248. /**
  9249. * 获取服务空间
  9250. * @param {*} config
  9251. * @returns
  9252. */
  9253. var get_space = function get_space(config) {
  9254. var uniCloudConfig = uni_cloud_config();
  9255. var spaceId = uniCloudConfig.spaceId,
  9256. provider = uniCloudConfig.provider,
  9257. clientSecret = uniCloudConfig.clientSecret,
  9258. secretKey = uniCloudConfig.secretKey,
  9259. secretId = uniCloudConfig.secretId;
  9260. var space_type = ['tcb', 'tencent', 'aliyun', 'alipay'];
  9261. var is_provider = space_type.indexOf(provider) !== -1;
  9262. var is_aliyun = provider === 'aliyun' && spaceId && clientSecret;
  9263. var is_tcb = (provider === 'tcb' || provider === 'tencent') && spaceId;
  9264. var is_alipay = provider === 'alipay' && spaceId && secretKey && secretId;
  9265. if (is_provider && (is_aliyun || is_tcb || is_alipay)) {
  9266. return uniCloudConfig;
  9267. } else {
  9268. if (config && config.spaceId) {
  9269. return config;
  9270. }
  9271. }
  9272. return null;
  9273. };
  9274. /**
  9275. * 是否开启 debug 模式
  9276. */
  9277. var is_debug = debug;
  9278. /**
  9279. * 日志输出
  9280. * @param {*} data
  9281. */
  9282. var log = function log(data, type) {
  9283. var msg_type = '';
  9284. switch (data.lt) {
  9285. case '1':
  9286. msg_type = '应用启动';
  9287. break;
  9288. case '3':
  9289. msg_type = '应用进入后台';
  9290. break;
  9291. case '11':
  9292. msg_type = '页面切换';
  9293. break;
  9294. case '21':
  9295. msg_type = '事件触发';
  9296. break;
  9297. case '31':
  9298. msg_type = '应用错误';
  9299. break;
  9300. case '101':
  9301. msg_type = 'PUSH';
  9302. break;
  9303. }
  9304. if (type) {
  9305. console.log("=== \u7EDF\u8BA1\u961F\u5217\u6570\u636E\u4E0A\u62A5 ===");
  9306. console.log(data);
  9307. console.log("=== \u4E0A\u62A5\u7ED3\u675F ===");
  9308. return;
  9309. }
  9310. if (msg_type) {
  9311. console.log("=== \u7EDF\u8BA1\u6570\u636E\u91C7\u96C6\uFF1A".concat(msg_type, " ==="));
  9312. console.log(data);
  9313. console.log("=== \u91C7\u96C6\u7ED3\u675F ===");
  9314. }
  9315. };
  9316. /**
  9317. * 获取上报时间间隔
  9318. * @param {*} defaultTime 默认上报间隔时间 单位s
  9319. */
  9320. var get_report_Interval = function get_report_Interval(defaultTime) {
  9321. var time = uniStatisticsConfig.reportInterval;
  9322. // 如果上报时间配置为0 相当于立即上报
  9323. if (Number(time) === 0) return 0;
  9324. time = time || defaultTime;
  9325. var reg = /(^[1-9]\d*$)/;
  9326. // 如果不是整数,则默认为上报间隔时间
  9327. if (!reg.test(time)) return defaultTime;
  9328. return Number(time);
  9329. };
  9330. /**
  9331. * 获取隐私协议配置
  9332. */
  9333. var is_push_clientid = function is_push_clientid() {
  9334. if (uniStatisticsConfig.collectItems) {
  9335. var ClientID = uniStatisticsConfig.collectItems.uniPushClientID;
  9336. return typeof ClientID === 'boolean' ? ClientID : false;
  9337. }
  9338. return false;
  9339. };
  9340. /**
  9341. * 是否上报页面数据
  9342. * @returns
  9343. */
  9344. var is_page_report = function is_page_report() {
  9345. if (uniStatisticsConfig.collectItems) {
  9346. var statPageLog = uniStatisticsConfig.collectItems.uniStatPageLog;
  9347. // 如果字段不存在返回 true , 如果是boolean 值按原值返回,如果是其他类型 返回false
  9348. if (statPageLog === undefined) return true;
  9349. return typeof statPageLog === 'boolean' ? statPageLog : true;
  9350. }
  9351. return true;
  9352. };
  9353. /**
  9354. * 是否已处理设备 DeviceId
  9355. * 如果值为 1 则表示已处理
  9356. */
  9357. var IS_HANDLE_DEVECE_ID = 'is_handle_device_id';
  9358. var is_handle_device = function is_handle_device() {
  9359. var isHandleDevice = dbGet(IS_HANDLE_DEVECE_ID) || '';
  9360. dbSet(IS_HANDLE_DEVECE_ID, '1');
  9361. return isHandleDevice === '1';
  9362. };
  9363. // 首次访问时间
  9364. var FIRST_VISIT_TIME_KEY = '__first__visit__time';
  9365. // 最后访问时间
  9366. var LAST_VISIT_TIME_KEY = '__last__visit__time';
  9367. /**
  9368. * 获取当前时间
  9369. */
  9370. var get_time = function get_time() {
  9371. return parseInt(new Date().getTime() / 1000);
  9372. };
  9373. /**
  9374. * 获取首次访问时间
  9375. */
  9376. var get_first_visit_time = function get_first_visit_time() {
  9377. var timeStorge = dbGet(FIRST_VISIT_TIME_KEY);
  9378. var time = 0;
  9379. if (timeStorge) {
  9380. time = timeStorge;
  9381. } else {
  9382. time = get_time();
  9383. dbSet(FIRST_VISIT_TIME_KEY, time);
  9384. // 首次访问需要 将最后访问时间置 0
  9385. dbRemove(LAST_VISIT_TIME_KEY);
  9386. }
  9387. return time;
  9388. };
  9389. /**
  9390. * 最后访问时间
  9391. */
  9392. var get_last_visit_time = function get_last_visit_time() {
  9393. var timeStorge = dbGet(LAST_VISIT_TIME_KEY);
  9394. var time = 0;
  9395. if (timeStorge) {
  9396. time = timeStorge;
  9397. }
  9398. dbSet(LAST_VISIT_TIME_KEY, get_time());
  9399. return time;
  9400. };
  9401. // 页面停留时间记录key
  9402. var PAGE_RESIDENCE_TIME = '__page__residence__time';
  9403. var First_Page_Residence_Time = 0;
  9404. var Last_Page_Residence_Time = 0;
  9405. /**
  9406. * 设置页面停留时间
  9407. */
  9408. var set_page_residence_time = function set_page_residence_time() {
  9409. First_Page_Residence_Time = get_time();
  9410. dbSet(PAGE_RESIDENCE_TIME, First_Page_Residence_Time);
  9411. return First_Page_Residence_Time;
  9412. };
  9413. /**
  9414. * 获取页面停留时间
  9415. */
  9416. var get_page_residence_time = function get_page_residence_time() {
  9417. Last_Page_Residence_Time = get_time();
  9418. First_Page_Residence_Time = dbGet(PAGE_RESIDENCE_TIME);
  9419. return Last_Page_Residence_Time - First_Page_Residence_Time;
  9420. };
  9421. /**
  9422. * 获取总访问次数
  9423. */
  9424. var TOTAL_VISIT_COUNT = '__total__visit__count';
  9425. var get_total_visit_count = function get_total_visit_count() {
  9426. var timeStorge = dbGet(TOTAL_VISIT_COUNT);
  9427. var count = 1;
  9428. if (timeStorge) {
  9429. count = timeStorge;
  9430. count++;
  9431. }
  9432. dbSet(TOTAL_VISIT_COUNT, count);
  9433. return count;
  9434. };
  9435. var FIRST_TIME = '__first_time';
  9436. /**
  9437. * 设置页面首次访问时间,用户获取页面/应用停留时常
  9438. */
  9439. var set_first_time = function set_first_time() {
  9440. // 获取当前时间 ,以下代码获取到是毫秒级时间戳 ,实际上用到是秒级时间戳,所以需要除以1000
  9441. // const time = new Date().getTime()
  9442. var time = get_time();
  9443. var timeStorge = dbSet(FIRST_TIME, time);
  9444. return timeStorge;
  9445. };
  9446. /**
  9447. * 获取最后一次时间 ,暂时用不到,直接获取当前时间即可
  9448. */
  9449. // export const get_last_time = () => {
  9450. // let time = new Date().getTime()
  9451. // Set__Last__Time = time
  9452. // return time
  9453. // }
  9454. /**
  9455. * 获取页面 \ 应用停留时间
  9456. */
  9457. var get_residence_time = function get_residence_time(type) {
  9458. var residenceTime = 0;
  9459. var first_time = dbGet(FIRST_TIME);
  9460. var last_time = get_time();
  9461. if (first_time !== 0) {
  9462. residenceTime = last_time - first_time;
  9463. }
  9464. // 将毫秒级时间戳转换为秒级时间戳,因为直接获取的是秒级时间戳,所以不需要转换
  9465. // residenceTime = parseInt(residenceTime / 1000)
  9466. residenceTime = residenceTime < 1 ? 1 : residenceTime;
  9467. if (type === 'app') {
  9468. var overtime = residenceTime > APP_PVER_TIME ? true : false;
  9469. return {
  9470. residenceTime: residenceTime,
  9471. overtime: overtime
  9472. };
  9473. }
  9474. if (type === 'page') {
  9475. var _overtime = residenceTime > PAGE_PVER_TIME ? true : false;
  9476. return {
  9477. residenceTime: residenceTime,
  9478. overtime: _overtime
  9479. };
  9480. }
  9481. return {
  9482. residenceTime: residenceTime
  9483. };
  9484. };
  9485. var eport_Interval = get_report_Interval(OPERATING_TIME);
  9486. // 统计数据默认值
  9487. var statData = {
  9488. uuid: get_uuid(),
  9489. // 设备标识
  9490. ak: stat_config.appid,
  9491. // uni-app 应用 Appid
  9492. p: sys.platform === 'android' ? 'a' : 'i',
  9493. // 手机系统
  9494. ut: get_platform_name(),
  9495. // 平台类型
  9496. mpn: get_pack_name(),
  9497. // 原生平台包名、小程序 appid
  9498. usv: STAT_VERSION,
  9499. // 统计 sdk 版本
  9500. v: get_version(),
  9501. // 应用版本,仅app
  9502. ch: get_channel(),
  9503. // 渠道信息
  9504. cn: '',
  9505. // 国家
  9506. pn: '',
  9507. // 省份
  9508. ct: '',
  9509. // 城市
  9510. t: get_time(),
  9511. // 上报数据时的时间戳
  9512. tt: '',
  9513. brand: sys.brand || '',
  9514. // 手机品牌
  9515. md: sys.model,
  9516. // 手机型号
  9517. sv: sys.system.replace(/(Android|iOS)\s/, ''),
  9518. // 手机系统版本
  9519. mpsdk: sys.SDKVersion || '',
  9520. // x程序 sdk version
  9521. mpv: sys.version || '',
  9522. // 小程序平台版本 ,如微信、支付宝
  9523. lang: sys.language,
  9524. // 语言
  9525. pr: sys.pixelRatio,
  9526. // pixelRatio 设备像素比
  9527. ww: sys.windowWidth,
  9528. // windowWidth 可使用窗口宽度
  9529. wh: sys.windowHeight,
  9530. // windowHeight 可使用窗口高度
  9531. sw: sys.screenWidth,
  9532. // screenWidth 屏幕宽度
  9533. sh: sys.screenHeight // screenHeight 屏幕高度
  9534. };
  9535. var Report = /*#__PURE__*/function () {
  9536. "use strict";
  9537. function Report() {
  9538. _classCallCheck(this, Report);
  9539. // 页面实例
  9540. this.self = '';
  9541. // 进入应用标识
  9542. this.__licationShow = false;
  9543. // 离开应用标识
  9544. this.__licationHide = false;
  9545. // 统计默认值
  9546. this.statData = statData;
  9547. // 标题默认值
  9548. this._navigationBarTitle = {
  9549. config: '',
  9550. page: '',
  9551. report: '',
  9552. lt: ''
  9553. };
  9554. // 页面参数
  9555. this._query = {};
  9556. // 页面最后停留页面的 url
  9557. // this._lastPageRoute = ''
  9558. // 注册拦截器
  9559. var registerInterceptor = typeof uni.addInterceptor === 'function';
  9560. if (registerInterceptor) {
  9561. this.addInterceptorInit();
  9562. this.interceptLogin();
  9563. this.interceptShare(true);
  9564. this.interceptRequestPayment();
  9565. }
  9566. }
  9567. _createClass(Report, [{
  9568. key: "addInterceptorInit",
  9569. value: function addInterceptorInit() {
  9570. var self = this;
  9571. uni.addInterceptor('setNavigationBarTitle', {
  9572. invoke: function invoke(args) {
  9573. self._navigationBarTitle.page = args.title;
  9574. }
  9575. });
  9576. }
  9577. }, {
  9578. key: "interceptLogin",
  9579. value: function interceptLogin() {
  9580. var self = this;
  9581. uni.addInterceptor('login', {
  9582. complete: function complete() {
  9583. self._login();
  9584. }
  9585. });
  9586. }
  9587. }, {
  9588. key: "interceptShare",
  9589. value: function interceptShare(type) {
  9590. var self = this;
  9591. if (!type) {
  9592. self._share();
  9593. return;
  9594. }
  9595. uni.addInterceptor('share', {
  9596. success: function success() {
  9597. self._share();
  9598. },
  9599. fail: function fail() {
  9600. self._share();
  9601. }
  9602. });
  9603. }
  9604. }, {
  9605. key: "interceptRequestPayment",
  9606. value: function interceptRequestPayment() {
  9607. var self = this;
  9608. uni.addInterceptor('requestPayment', {
  9609. success: function success() {
  9610. self._payment('pay_success');
  9611. },
  9612. fail: function fail() {
  9613. self._payment('pay_fail');
  9614. }
  9615. });
  9616. }
  9617. }, {
  9618. key: "_login",
  9619. value: function _login() {
  9620. this.sendEventRequest({
  9621. key: 'login'
  9622. }, 0);
  9623. }
  9624. }, {
  9625. key: "_share",
  9626. value: function _share() {
  9627. this.sendEventRequest({
  9628. key: 'share'
  9629. }, 0);
  9630. }
  9631. }, {
  9632. key: "_payment",
  9633. value: function _payment(key) {
  9634. this.sendEventRequest({
  9635. key: key
  9636. }, 0);
  9637. }
  9638. /**
  9639. * 进入应用触发
  9640. */
  9641. }, {
  9642. key: "applicationShow",
  9643. value: function applicationShow() {
  9644. // 通过 __licationHide 判断保证是进入后台后在次进入应用,避免重复上报数据
  9645. if (this.__licationHide) {
  9646. var time = get_residence_time('app');
  9647. // 需要判断进入后台是否超过时限 ,默认是 30min ,是的话需要执行进入应用的上报
  9648. if (time.overtime) {
  9649. var lastPageRoute = uni.getStorageSync('_STAT_LAST_PAGE_ROUTE');
  9650. var options = {
  9651. path: lastPageRoute,
  9652. scene: this.statData.sc,
  9653. cst: 2
  9654. };
  9655. this.sendReportRequest(options);
  9656. }
  9657. // 状态重置
  9658. this.__licationHide = false;
  9659. }
  9660. }
  9661. /**
  9662. * 离开应用触发
  9663. * @param {Object} self
  9664. * @param {Object} type
  9665. */
  9666. }, {
  9667. key: "applicationHide",
  9668. value: function applicationHide(self, type) {
  9669. if (!self) {
  9670. // 表示应用切换到后台 ,此时需要从页面栈获取页面实例
  9671. self = get_page_vm();
  9672. }
  9673. // 进入应用后台保存状态,方便进入前台后判断是否上报应用数据
  9674. this.__licationHide = true;
  9675. var time = get_residence_time();
  9676. var route = get_page_route(self);
  9677. uni.setStorageSync('_STAT_LAST_PAGE_ROUTE', route);
  9678. this.sendHideRequest({
  9679. urlref: route,
  9680. urlref_ts: time.residenceTime
  9681. }, type);
  9682. // 更新页面首次访问时间
  9683. set_first_time();
  9684. }
  9685. /**
  9686. * 进入页面触发
  9687. */
  9688. }, {
  9689. key: "pageShow",
  9690. value: function pageShow(self) {
  9691. // 清空值 ,初始化 ,避免污染后面的上报数据
  9692. this._navigationBarTitle = {
  9693. config: '',
  9694. page: '',
  9695. report: '',
  9696. lt: ''
  9697. };
  9698. var route = get_page_route(self);
  9699. var routepath = get_route$1(self);
  9700. this._navigationBarTitle.config = get_page_name(routepath);
  9701. // 表示应用触发 ,页面切换不触发之后的逻辑
  9702. if (this.__licationShow) {
  9703. // 更新页面首次访问时间
  9704. set_first_time();
  9705. // this._lastPageRoute = route
  9706. uni.setStorageSync('_STAT_LAST_PAGE_ROUTE', route);
  9707. this.__licationShow = false;
  9708. return;
  9709. }
  9710. var time = get_residence_time('page');
  9711. // 停留时间
  9712. if (time.overtime) {
  9713. var options = {
  9714. path: route,
  9715. scene: this.statData.sc,
  9716. cst: 3
  9717. };
  9718. this.sendReportRequest(options);
  9719. }
  9720. // 更新页面首次访问时间
  9721. set_first_time();
  9722. }
  9723. /**
  9724. * 离开页面触发
  9725. */
  9726. }, {
  9727. key: "pageHide",
  9728. value: function pageHide(self) {
  9729. if (!this.__licationHide) {
  9730. var time = get_residence_time('page');
  9731. var route = get_page_route(self);
  9732. var lastPageRoute = uni.getStorageSync('_STAT_LAST_PAGE_ROUTE');
  9733. if (!lastPageRoute) {
  9734. lastPageRoute = route;
  9735. }
  9736. uni.setStorageSync('_STAT_LAST_PAGE_ROUTE', route);
  9737. this.sendPageRequest({
  9738. url: route,
  9739. urlref: lastPageRoute,
  9740. urlref_ts: time.residenceTime
  9741. });
  9742. // this._lastPageRoute = route
  9743. return;
  9744. }
  9745. }
  9746. /**
  9747. * 发送请求,应用维度上报
  9748. * @param {Object} options 页面信息
  9749. * @param {Boolean} type 是否立即上报
  9750. */
  9751. }, {
  9752. key: "sendReportRequest",
  9753. value: function sendReportRequest(options, type) {
  9754. this._navigationBarTitle.lt = '1';
  9755. this._navigationBarTitle.config = get_page_name(options.path);
  9756. var is_opt = options.query && JSON.stringify(options.query) !== '{}';
  9757. var query = is_opt ? '?' + JSON.stringify(options.query) : '';
  9758. var last_time = get_last_visit_time();
  9759. // 非老用户
  9760. if (last_time !== 0 || !last_time) {
  9761. var odid = get_odid();
  9762. // 2.0 处理规则
  9763. {
  9764. var have_device = is_handle_device();
  9765. // 如果没有上报过设备信息 ,则需要上报设备信息
  9766. if (!have_device) {
  9767. this.statData.odid = odid;
  9768. }
  9769. }
  9770. }
  9771. Object.assign(this.statData, {
  9772. lt: '1',
  9773. url: options.path + query || '',
  9774. t: get_time(),
  9775. sc: get_scene(options.scene),
  9776. fvts: get_first_visit_time(),
  9777. lvts: last_time,
  9778. tvc: get_total_visit_count(),
  9779. // create session type 上报类型 ,1 应用进入 2.后台30min进入 3.页面30min进入
  9780. cst: options.cst || 1
  9781. });
  9782. if (get_platform_name() === 'n') {
  9783. this.getProperty(type);
  9784. } else {
  9785. this.getNetworkInfo(type);
  9786. }
  9787. }
  9788. /**
  9789. * 发送请求,页面维度上报
  9790. * @param {Object} opt
  9791. */
  9792. }, {
  9793. key: "sendPageRequest",
  9794. value: function sendPageRequest(opt) {
  9795. var url = opt.url,
  9796. urlref = opt.urlref,
  9797. urlref_ts = opt.urlref_ts;
  9798. this._navigationBarTitle.lt = '11';
  9799. var options = {
  9800. ak: this.statData.ak,
  9801. uuid: this.statData.uuid,
  9802. p: this.statData.p,
  9803. lt: '11',
  9804. ut: this.statData.ut,
  9805. url: url,
  9806. tt: this.statData.tt,
  9807. urlref: urlref,
  9808. urlref_ts: urlref_ts,
  9809. ch: this.statData.ch,
  9810. usv: this.statData.usv,
  9811. t: get_time()
  9812. };
  9813. this.request(options);
  9814. }
  9815. /**
  9816. * 进入后台上报数据
  9817. * @param {Object} opt
  9818. * @param {Object} type
  9819. */
  9820. }, {
  9821. key: "sendHideRequest",
  9822. value: function sendHideRequest(opt, type) {
  9823. var urlref = opt.urlref,
  9824. urlref_ts = opt.urlref_ts;
  9825. var options = {
  9826. ak: this.statData.ak,
  9827. uuid: this.statData.uuid,
  9828. p: this.statData.p,
  9829. lt: '3',
  9830. ut: this.statData.ut,
  9831. urlref: urlref,
  9832. urlref_ts: urlref_ts,
  9833. ch: this.statData.ch,
  9834. usv: this.statData.usv,
  9835. t: get_time()
  9836. };
  9837. this.request(options, type);
  9838. }
  9839. /**
  9840. * 自定义事件上报
  9841. */
  9842. }, {
  9843. key: "sendEventRequest",
  9844. value: function sendEventRequest() {
  9845. var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  9846. _ref3$key = _ref3.key,
  9847. key = _ref3$key === void 0 ? '' : _ref3$key,
  9848. _ref3$value = _ref3.value,
  9849. value = _ref3$value === void 0 ? '' : _ref3$value;
  9850. var routepath = '';
  9851. try {
  9852. routepath = get_route$1();
  9853. } catch (error) {
  9854. var launch_options = dbGet('__launch_options');
  9855. routepath = launch_options.path;
  9856. }
  9857. this._navigationBarTitle.config = get_page_name(routepath);
  9858. this._navigationBarTitle.lt = '21';
  9859. var options = {
  9860. ak: this.statData.ak,
  9861. uuid: this.statData.uuid,
  9862. p: this.statData.p,
  9863. lt: '21',
  9864. ut: this.statData.ut,
  9865. url: routepath,
  9866. ch: this.statData.ch,
  9867. e_n: key,
  9868. e_v: _typeof(value) === 'object' ? JSON.stringify(value) : value.toString(),
  9869. usv: this.statData.usv,
  9870. t: get_time()
  9871. };
  9872. this.request(options);
  9873. }
  9874. }, {
  9875. key: "sendPushRequest",
  9876. value: function sendPushRequest(options, cid) {
  9877. var _this = this;
  9878. var time = get_time();
  9879. var statData = {
  9880. lt: '101',
  9881. cid: cid,
  9882. t: time,
  9883. ut: this.statData.ut
  9884. };
  9885. // debug 打印打点信息
  9886. if (is_debug) {
  9887. log(statData);
  9888. }
  9889. var stat_data = handle_data({
  9890. 101: [statData]
  9891. });
  9892. var optionsData = {
  9893. usv: STAT_VERSION,
  9894. //统计 SDK 版本号
  9895. t: time,
  9896. //发送请求时的时间戮
  9897. requests: stat_data
  9898. };
  9899. // XXX 安卓需要延迟上报 ,否则会有未知错误,需要验证处理
  9900. if (get_platform_name() === 'n' && this.statData.p === 'a') {
  9901. setTimeout(function () {
  9902. _this.sendRequest(optionsData);
  9903. }, 200);
  9904. return;
  9905. }
  9906. this.sendRequest(optionsData);
  9907. }
  9908. /**
  9909. * 获取wgt资源版本
  9910. */
  9911. }, {
  9912. key: "getProperty",
  9913. value: function getProperty(type) {
  9914. var _this2 = this;
  9915. plus.runtime.getProperty(plus.runtime.appid, function (wgtinfo) {
  9916. _this2.statData.v = wgtinfo.version || '';
  9917. _this2.getNetworkInfo(type);
  9918. });
  9919. }
  9920. /**
  9921. * 获取网络信息
  9922. */
  9923. }, {
  9924. key: "getNetworkInfo",
  9925. value: function getNetworkInfo(type) {
  9926. var _this3 = this;
  9927. uni.getNetworkType({
  9928. success: function success(result) {
  9929. _this3.statData.net = result.networkType;
  9930. _this3.getLocation(type);
  9931. }
  9932. });
  9933. }
  9934. /**
  9935. * 获取位置信息
  9936. */
  9937. }, {
  9938. key: "getLocation",
  9939. value: function getLocation(type) {
  9940. var _this4 = this;
  9941. if (stat_config.getLocation) {
  9942. uni.getLocation({
  9943. type: 'wgs84',
  9944. geocode: true,
  9945. success: function success(result) {
  9946. if (result.address) {
  9947. _this4.statData.cn = result.address.country;
  9948. _this4.statData.pn = result.address.province;
  9949. _this4.statData.ct = result.address.city;
  9950. }
  9951. _this4.statData.lat = result.latitude;
  9952. _this4.statData.lng = result.longitude;
  9953. _this4.request(_this4.statData, type);
  9954. }
  9955. });
  9956. } else {
  9957. this.statData.lat = 0;
  9958. this.statData.lng = 0;
  9959. this.request(this.statData, type);
  9960. }
  9961. }
  9962. /**
  9963. * 发送请求
  9964. * @param {Object} data 上报数据
  9965. * @param {Object} type 类型
  9966. */
  9967. }, {
  9968. key: "request",
  9969. value: function request(data, type) {
  9970. var _this5 = this;
  9971. var time = get_time();
  9972. var title = this._navigationBarTitle;
  9973. Object.assign(data, {
  9974. ttn: title.page,
  9975. ttpj: title.config,
  9976. ttc: title.report
  9977. });
  9978. var uniStatData = dbGet('__UNI__STAT__DATA') || {};
  9979. if (!uniStatData[data.lt]) {
  9980. uniStatData[data.lt] = [];
  9981. }
  9982. // 加入队列
  9983. uniStatData[data.lt].push(data);
  9984. dbSet('__UNI__STAT__DATA', uniStatData);
  9985. var page_residence_time = get_page_residence_time();
  9986. // debug 打印打点信息
  9987. if (is_debug) {
  9988. log(data);
  9989. }
  9990. // 判断时候到达上报时间 ,默认 10 秒上报
  9991. if (page_residence_time < eport_Interval && !type) return;
  9992. // 时间超过,重新获取时间戳
  9993. set_page_residence_time();
  9994. var stat_data = handle_data(uniStatData);
  9995. var optionsData = {
  9996. usv: STAT_VERSION,
  9997. //统计 SDK 版本号
  9998. t: time,
  9999. //发送请求时的时间戮
  10000. requests: stat_data
  10001. };
  10002. // 重置队列
  10003. dbRemove('__UNI__STAT__DATA');
  10004. // XXX 安卓需要延迟上报 ,否则会有未知错误,需要验证处理
  10005. if (get_platform_name() === 'n' && this.statData.p === 'a') {
  10006. setTimeout(function () {
  10007. _this5.sendRequest(optionsData);
  10008. }, 200);
  10009. return;
  10010. }
  10011. this.sendRequest(optionsData);
  10012. }
  10013. }, {
  10014. key: "getIsReportData",
  10015. value: function getIsReportData() {
  10016. return is_report_data();
  10017. }
  10018. /**
  10019. * 数据上报
  10020. * @param {Object} optionsData 需要上报的数据
  10021. */
  10022. }, {
  10023. key: "sendRequest",
  10024. value: function sendRequest(optionsData) {
  10025. {
  10026. if (!uni.__stat_uniCloud_space) {
  10027. console.error('应用未关联服务空间,统计上报失败,请在uniCloud目录右键关联服务空间.');
  10028. return;
  10029. }
  10030. var uniCloudObj = uni.__stat_uniCloud_space.importObject('uni-stat-receiver', {
  10031. customUI: true
  10032. });
  10033. uniCloudObj.report(optionsData).then(function () {
  10034. if (is_debug) {
  10035. log(optionsData, true);
  10036. }
  10037. }).catch(function (err) {
  10038. if (is_debug) {
  10039. console.warn('=== 统计上报错误');
  10040. console.error(err);
  10041. }
  10042. });
  10043. }
  10044. }
  10045. /**
  10046. * h5 请求
  10047. */
  10048. }, {
  10049. key: "imageRequest",
  10050. value: function imageRequest(data) {
  10051. this.getIsReportData().then(function () {
  10052. var image = new Image();
  10053. var options = get_sgin(get_encodeURIComponent_options(data)).options;
  10054. image.src = STAT_H5_URL + '?' + options;
  10055. if (is_debug) {
  10056. log(data, true);
  10057. }
  10058. });
  10059. }
  10060. }, {
  10061. key: "sendEvent",
  10062. value: function sendEvent(key, value) {
  10063. // 校验 type 参数
  10064. if (calibration(key, value)) return;
  10065. if (key === 'title') {
  10066. this._navigationBarTitle.report = value;
  10067. return;
  10068. }
  10069. this.sendEventRequest({
  10070. key: key,
  10071. value: _typeof(value) === 'object' ? JSON.stringify(value) : value
  10072. }, 1);
  10073. }
  10074. }]);
  10075. return Report;
  10076. }();
  10077. var Stat = /*#__PURE__*/function (_Report) {
  10078. "use strict";
  10079. _inherits(Stat, _Report);
  10080. var _super = _createSuper(Stat);
  10081. function Stat() {
  10082. _classCallCheck(this, Stat);
  10083. return _super.call(this);
  10084. }
  10085. /**
  10086. * 获取推送id
  10087. */
  10088. _createClass(Stat, [{
  10089. key: "pushEvent",
  10090. value: function pushEvent(options) {
  10091. var _this6 = this;
  10092. var ClientID = is_push_clientid();
  10093. if (uni.getPushClientId && ClientID) {
  10094. uni.getPushClientId({
  10095. success: function success(res) {
  10096. var cid = res.cid || false;
  10097. // 只有获取到才会上传
  10098. if (cid) {
  10099. _this6.sendPushRequest(options, cid);
  10100. }
  10101. }
  10102. });
  10103. }
  10104. }
  10105. /**
  10106. * 进入应用
  10107. * @param {Object} options 页面参数
  10108. * @param {Object} self 当前页面实例
  10109. */
  10110. }, {
  10111. key: "launch",
  10112. value: function launch(options, self) {
  10113. // 初始化页面停留时间 start
  10114. set_page_residence_time();
  10115. this.__licationShow = true;
  10116. dbSet('__launch_options', options);
  10117. // 应用初始上报参数为1
  10118. options.cst = 1;
  10119. this.sendReportRequest(options, true);
  10120. }
  10121. }, {
  10122. key: "load",
  10123. value: function load(options, self) {
  10124. this.self = self;
  10125. this._query = options;
  10126. }
  10127. }, {
  10128. key: "appHide",
  10129. value: function appHide(self) {
  10130. this.applicationHide(self, true);
  10131. }
  10132. }, {
  10133. key: "appShow",
  10134. value: function appShow(self) {
  10135. this.applicationShow(self);
  10136. }
  10137. }, {
  10138. key: "show",
  10139. value: function show(self) {
  10140. this.self = self;
  10141. if (get_page_types(self) === 'page') {
  10142. var isPageReport = is_page_report();
  10143. if (isPageReport) {
  10144. this.pageShow(self);
  10145. }
  10146. }
  10147. if (get_page_types(self) === 'app') {
  10148. this.appShow();
  10149. }
  10150. }
  10151. }, {
  10152. key: "hide",
  10153. value: function hide(self) {
  10154. this.self = self;
  10155. if (get_page_types(self) === 'page') {
  10156. var isPageReport = is_page_report();
  10157. if (isPageReport) {
  10158. this.pageHide(self);
  10159. }
  10160. }
  10161. if (get_page_types(self) === 'app') {
  10162. this.appHide();
  10163. }
  10164. }
  10165. }, {
  10166. key: "error",
  10167. value: function error(em) {
  10168. // 开发工具内不上报错误
  10169. // if (this._platform === 'devtools') {
  10170. // if (process.env.NODE_ENV === 'development') {
  10171. // console.info('当前运行环境为开发者工具,不上报数据。')
  10172. // return
  10173. // }
  10174. // }
  10175. var emVal = '';
  10176. if (!em.message) {
  10177. emVal = JSON.stringify(em);
  10178. } else {
  10179. emVal = em.stack;
  10180. }
  10181. var route = '';
  10182. try {
  10183. route = get_route();
  10184. } catch (e) {
  10185. // 未获取到页面路径
  10186. route = '';
  10187. }
  10188. var options = {
  10189. ak: this.statData.ak,
  10190. uuid: this.statData.uuid,
  10191. p: this.statData.p,
  10192. lt: '31',
  10193. url: route,
  10194. ut: this.statData.ut,
  10195. ch: this.statData.ch,
  10196. mpsdk: this.statData.mpsdk,
  10197. mpv: this.statData.mpv,
  10198. v: this.statData.v,
  10199. em: emVal,
  10200. usv: this.statData.usv,
  10201. t: parseInt(new Date().getTime() / 1000)
  10202. };
  10203. this.request(options);
  10204. }
  10205. }], [{
  10206. key: "getInstance",
  10207. value: function getInstance() {
  10208. if (!uni.__stat_instance) {
  10209. uni.__stat_instance = new Stat();
  10210. }
  10211. // 2.0 init 服务空间
  10212. {
  10213. var space = get_space(uniCloud.config);
  10214. if (!uni.__stat_uniCloud_space) {
  10215. // 判断不为空对象
  10216. if (space && Object.keys(space).length !== 0) {
  10217. var spaceData = {
  10218. provider: space.provider,
  10219. spaceId: space.spaceId,
  10220. clientSecret: space.clientSecret
  10221. };
  10222. if (space.endpoint) {
  10223. spaceData.endpoint = space.endpoint;
  10224. }
  10225. if (space.provider === 'alipay') {
  10226. spaceData.secretKey = space.secretKey;
  10227. spaceData.accessKey = space.accessKey || space.secretId;
  10228. spaceData.spaceAppId = space.spaceAppId || space.appId;
  10229. }
  10230. uni.__stat_uniCloud_space = uniCloud.init(spaceData);
  10231. // console.log(
  10232. // '=== 当前绑定的统计服务空间spaceId:' +
  10233. // uni.__stat_uniCloud_space.config.spaceId
  10234. // )
  10235. } else {
  10236. console.error('应用未关联服务空间,请在uniCloud目录右键关联服务空间');
  10237. }
  10238. }
  10239. }
  10240. return uni.__stat_instance;
  10241. }
  10242. }]);
  10243. return Stat;
  10244. }(Report);
  10245. var Stat$1 = Stat;
  10246. var stat = Stat$1.getInstance();
  10247. // 用于判断是隐藏页面还是卸载页面
  10248. var isHide = false;
  10249. var lifecycle = {
  10250. onLaunch: function onLaunch(options) {
  10251. // 进入应用上报数据
  10252. stat.launch(options, this);
  10253. // 上报push推送id
  10254. stat.pushEvent(options);
  10255. },
  10256. onLoad: function onLoad(options) {
  10257. stat.load(options, this);
  10258. // 重写分享,获取分享上报事件
  10259. if (this.$scope && this.$scope.onShareAppMessage) {
  10260. var oldShareAppMessage = this.$scope.onShareAppMessage;
  10261. this.$scope.onShareAppMessage = function (options) {
  10262. stat.interceptShare(false);
  10263. return oldShareAppMessage.call(this, options);
  10264. };
  10265. }
  10266. },
  10267. onShow: function onShow() {
  10268. isHide = false;
  10269. stat.show(this);
  10270. },
  10271. onHide: function onHide() {
  10272. isHide = true;
  10273. stat.hide(this);
  10274. },
  10275. onUnload: function onUnload() {
  10276. if (isHide) {
  10277. isHide = false;
  10278. return;
  10279. }
  10280. stat.hide(this);
  10281. },
  10282. onError: function onError(e) {
  10283. stat.error(e);
  10284. }
  10285. };
  10286. // 加载统计代码
  10287. function load_stat() {
  10288. // eslint-disable-next-line no-restricted-globals
  10289. var Vue = __webpack_require__(/*! vue */ 25);
  10290. (Vue.default || Vue).mixin(lifecycle);
  10291. uni.report = function (type, options) {
  10292. stat.sendEvent(type, options);
  10293. };
  10294. }
  10295. function main() {
  10296. if (is_debug) {
  10297. {
  10298. console.log('=== uni统计开启,version:2.0 ===');
  10299. }
  10300. load_stat();
  10301. } else {
  10302. if (true) {
  10303. uni.report = function (type, options) {};
  10304. } else {}
  10305. }
  10306. }
  10307. main();
  10308. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js */ 28)["default"]))
  10309. /***/ }),
  10310. /* 28 */
  10311. /*!************************************************************************************!*\
  10312. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js ***!
  10313. \************************************************************************************/
  10314. /*! no static exports found */
  10315. /***/ (function(module, exports, __webpack_require__) {
  10316. "use strict";
  10317. /* WEBPACK VAR INJECTION */(function(global, uni, wx) {
  10318. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10319. Object.defineProperty(exports, "__esModule", {
  10320. value: true
  10321. });
  10322. exports.default = exports.UniCloudError = void 0;
  10323. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 29));
  10324. var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ 31));
  10325. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  10326. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  10327. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  10328. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 32));
  10329. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  10330. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 33));
  10331. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 34));
  10332. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 35));
  10333. var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ 36));
  10334. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  10335. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  10336. var _pages = _interopRequireDefault(__webpack_require__(/*! @/pages.json */ 38));
  10337. function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e33) { throw _e33; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e34) { didErr = true; err = _e34; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  10338. function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
  10339. function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  10340. 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; }
  10341. 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; }
  10342. function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
  10343. function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  10344. "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
  10345. function t(e) {
  10346. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  10347. }
  10348. function n(e, t, n) {
  10349. return e(n = {
  10350. path: t,
  10351. exports: {},
  10352. require: function require(e, t) {
  10353. return function () {
  10354. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  10355. }(null == t && n.path);
  10356. }
  10357. }, n.exports), n.exports;
  10358. }
  10359. var s = n(function (e, t) {
  10360. var n;
  10361. e.exports = (n = n || function (e, t) {
  10362. var n = Object.create || function () {
  10363. function e() {}
  10364. return function (t) {
  10365. var n;
  10366. return e.prototype = t, n = new e(), e.prototype = null, n;
  10367. };
  10368. }(),
  10369. s = {},
  10370. r = s.lib = {},
  10371. i = r.Base = {
  10372. extend: function extend(e) {
  10373. var t = n(this);
  10374. return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {
  10375. t.$super.init.apply(this, arguments);
  10376. }), t.init.prototype = t, t.$super = this, t;
  10377. },
  10378. create: function create() {
  10379. var e = this.extend();
  10380. return e.init.apply(e, arguments), e;
  10381. },
  10382. init: function init() {},
  10383. mixIn: function mixIn(e) {
  10384. for (var t in e) {
  10385. e.hasOwnProperty(t) && (this[t] = e[t]);
  10386. }
  10387. e.hasOwnProperty("toString") && (this.toString = e.toString);
  10388. },
  10389. clone: function clone() {
  10390. return this.init.prototype.extend(this);
  10391. }
  10392. },
  10393. o = r.WordArray = i.extend({
  10394. init: function init(e, n) {
  10395. e = this.words = e || [], this.sigBytes = n != t ? n : 4 * e.length;
  10396. },
  10397. toString: function toString(e) {
  10398. return (e || c).stringify(this);
  10399. },
  10400. concat: function concat(e) {
  10401. var t = this.words,
  10402. n = e.words,
  10403. s = this.sigBytes,
  10404. r = e.sigBytes;
  10405. if (this.clamp(), s % 4) for (var i = 0; i < r; i++) {
  10406. var o = n[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  10407. t[s + i >>> 2] |= o << 24 - (s + i) % 4 * 8;
  10408. } else for (i = 0; i < r; i += 4) {
  10409. t[s + i >>> 2] = n[i >>> 2];
  10410. }
  10411. return this.sigBytes += r, this;
  10412. },
  10413. clamp: function clamp() {
  10414. var t = this.words,
  10415. n = this.sigBytes;
  10416. t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);
  10417. },
  10418. clone: function clone() {
  10419. var e = i.clone.call(this);
  10420. return e.words = this.words.slice(0), e;
  10421. },
  10422. random: function random(t) {
  10423. for (var n, s = [], r = function r(t) {
  10424. t = t;
  10425. var n = 987654321,
  10426. s = 4294967295;
  10427. return function () {
  10428. var r = ((n = 36969 * (65535 & n) + (n >> 16) & s) << 16) + (t = 18e3 * (65535 & t) + (t >> 16) & s) & s;
  10429. return r /= 4294967296, (r += .5) * (e.random() > .5 ? 1 : -1);
  10430. };
  10431. }, i = 0; i < t; i += 4) {
  10432. var a = r(4294967296 * (n || e.random()));
  10433. n = 987654071 * a(), s.push(4294967296 * a() | 0);
  10434. }
  10435. return new o.init(s, t);
  10436. }
  10437. }),
  10438. a = s.enc = {},
  10439. c = a.Hex = {
  10440. stringify: function stringify(e) {
  10441. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  10442. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  10443. s.push((i >>> 4).toString(16)), s.push((15 & i).toString(16));
  10444. }
  10445. return s.join("");
  10446. },
  10447. parse: function parse(e) {
  10448. for (var t = e.length, n = [], s = 0; s < t; s += 2) {
  10449. n[s >>> 3] |= parseInt(e.substr(s, 2), 16) << 24 - s % 8 * 4;
  10450. }
  10451. return new o.init(n, t / 2);
  10452. }
  10453. },
  10454. u = a.Latin1 = {
  10455. stringify: function stringify(e) {
  10456. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  10457. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  10458. s.push(String.fromCharCode(i));
  10459. }
  10460. return s.join("");
  10461. },
  10462. parse: function parse(e) {
  10463. for (var t = e.length, n = [], s = 0; s < t; s++) {
  10464. n[s >>> 2] |= (255 & e.charCodeAt(s)) << 24 - s % 4 * 8;
  10465. }
  10466. return new o.init(n, t);
  10467. }
  10468. },
  10469. l = a.Utf8 = {
  10470. stringify: function stringify(e) {
  10471. try {
  10472. return decodeURIComponent(escape(u.stringify(e)));
  10473. } catch (e) {
  10474. throw new Error("Malformed UTF-8 data");
  10475. }
  10476. },
  10477. parse: function parse(e) {
  10478. return u.parse(unescape(encodeURIComponent(e)));
  10479. }
  10480. },
  10481. h = r.BufferedBlockAlgorithm = i.extend({
  10482. reset: function reset() {
  10483. this._data = new o.init(), this._nDataBytes = 0;
  10484. },
  10485. _append: function _append(e) {
  10486. "string" == typeof e && (e = l.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;
  10487. },
  10488. _process: function _process(t) {
  10489. var n = this._data,
  10490. s = n.words,
  10491. r = n.sigBytes,
  10492. i = this.blockSize,
  10493. a = r / (4 * i),
  10494. c = (a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0)) * i,
  10495. u = e.min(4 * c, r);
  10496. if (c) {
  10497. for (var l = 0; l < c; l += i) {
  10498. this._doProcessBlock(s, l);
  10499. }
  10500. var h = s.splice(0, c);
  10501. n.sigBytes -= u;
  10502. }
  10503. return new o.init(h, u);
  10504. },
  10505. clone: function clone() {
  10506. var e = i.clone.call(this);
  10507. return e._data = this._data.clone(), e;
  10508. },
  10509. _minBufferSize: 0
  10510. });
  10511. r.Hasher = h.extend({
  10512. cfg: i.extend(),
  10513. init: function init(e) {
  10514. this.cfg = this.cfg.extend(e), this.reset();
  10515. },
  10516. reset: function reset() {
  10517. h.reset.call(this), this._doReset();
  10518. },
  10519. update: function update(e) {
  10520. return this._append(e), this._process(), this;
  10521. },
  10522. finalize: function finalize(e) {
  10523. return e && this._append(e), this._doFinalize();
  10524. },
  10525. blockSize: 16,
  10526. _createHelper: function _createHelper(e) {
  10527. return function (t, n) {
  10528. return new e.init(n).finalize(t);
  10529. };
  10530. },
  10531. _createHmacHelper: function _createHmacHelper(e) {
  10532. return function (t, n) {
  10533. return new d.HMAC.init(e, n).finalize(t);
  10534. };
  10535. }
  10536. });
  10537. var d = s.algo = {};
  10538. return s;
  10539. }(Math), n);
  10540. }),
  10541. r = s,
  10542. i = (n(function (e, t) {
  10543. var n;
  10544. e.exports = (n = r, function (e) {
  10545. var t = n,
  10546. s = t.lib,
  10547. r = s.WordArray,
  10548. i = s.Hasher,
  10549. o = t.algo,
  10550. a = [];
  10551. !function () {
  10552. for (var t = 0; t < 64; t++) {
  10553. a[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0;
  10554. }
  10555. }();
  10556. var c = o.MD5 = i.extend({
  10557. _doReset: function _doReset() {
  10558. this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878]);
  10559. },
  10560. _doProcessBlock: function _doProcessBlock(e, t) {
  10561. for (var n = 0; n < 16; n++) {
  10562. var s = t + n,
  10563. r = e[s];
  10564. e[s] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
  10565. }
  10566. var i = this._hash.words,
  10567. o = e[t + 0],
  10568. c = e[t + 1],
  10569. p = e[t + 2],
  10570. f = e[t + 3],
  10571. g = e[t + 4],
  10572. m = e[t + 5],
  10573. y = e[t + 6],
  10574. _ = e[t + 7],
  10575. w = e[t + 8],
  10576. v = e[t + 9],
  10577. I = e[t + 10],
  10578. S = e[t + 11],
  10579. b = e[t + 12],
  10580. k = e[t + 13],
  10581. A = e[t + 14],
  10582. C = e[t + 15],
  10583. P = i[0],
  10584. T = i[1],
  10585. x = i[2],
  10586. O = i[3];
  10587. P = u(P, T, x, O, o, 7, a[0]), O = u(O, P, T, x, c, 12, a[1]), x = u(x, O, P, T, p, 17, a[2]), T = u(T, x, O, P, f, 22, a[3]), P = u(P, T, x, O, g, 7, a[4]), O = u(O, P, T, x, m, 12, a[5]), x = u(x, O, P, T, y, 17, a[6]), T = u(T, x, O, P, _, 22, a[7]), P = u(P, T, x, O, w, 7, a[8]), O = u(O, P, T, x, v, 12, a[9]), x = u(x, O, P, T, I, 17, a[10]), T = u(T, x, O, P, S, 22, a[11]), P = u(P, T, x, O, b, 7, a[12]), O = u(O, P, T, x, k, 12, a[13]), x = u(x, O, P, T, A, 17, a[14]), P = l(P, T = u(T, x, O, P, C, 22, a[15]), x, O, c, 5, a[16]), O = l(O, P, T, x, y, 9, a[17]), x = l(x, O, P, T, S, 14, a[18]), T = l(T, x, O, P, o, 20, a[19]), P = l(P, T, x, O, m, 5, a[20]), O = l(O, P, T, x, I, 9, a[21]), x = l(x, O, P, T, C, 14, a[22]), T = l(T, x, O, P, g, 20, a[23]), P = l(P, T, x, O, v, 5, a[24]), O = l(O, P, T, x, A, 9, a[25]), x = l(x, O, P, T, f, 14, a[26]), T = l(T, x, O, P, w, 20, a[27]), P = l(P, T, x, O, k, 5, a[28]), O = l(O, P, T, x, p, 9, a[29]), x = l(x, O, P, T, _, 14, a[30]), P = h(P, T = l(T, x, O, P, b, 20, a[31]), x, O, m, 4, a[32]), O = h(O, P, T, x, w, 11, a[33]), x = h(x, O, P, T, S, 16, a[34]), T = h(T, x, O, P, A, 23, a[35]), P = h(P, T, x, O, c, 4, a[36]), O = h(O, P, T, x, g, 11, a[37]), x = h(x, O, P, T, _, 16, a[38]), T = h(T, x, O, P, I, 23, a[39]), P = h(P, T, x, O, k, 4, a[40]), O = h(O, P, T, x, o, 11, a[41]), x = h(x, O, P, T, f, 16, a[42]), T = h(T, x, O, P, y, 23, a[43]), P = h(P, T, x, O, v, 4, a[44]), O = h(O, P, T, x, b, 11, a[45]), x = h(x, O, P, T, C, 16, a[46]), P = d(P, T = h(T, x, O, P, p, 23, a[47]), x, O, o, 6, a[48]), O = d(O, P, T, x, _, 10, a[49]), x = d(x, O, P, T, A, 15, a[50]), T = d(T, x, O, P, m, 21, a[51]), P = d(P, T, x, O, b, 6, a[52]), O = d(O, P, T, x, f, 10, a[53]), x = d(x, O, P, T, I, 15, a[54]), T = d(T, x, O, P, c, 21, a[55]), P = d(P, T, x, O, w, 6, a[56]), O = d(O, P, T, x, C, 10, a[57]), x = d(x, O, P, T, y, 15, a[58]), T = d(T, x, O, P, k, 21, a[59]), P = d(P, T, x, O, g, 6, a[60]), O = d(O, P, T, x, S, 10, a[61]), x = d(x, O, P, T, p, 15, a[62]), T = d(T, x, O, P, v, 21, a[63]), i[0] = i[0] + P | 0, i[1] = i[1] + T | 0, i[2] = i[2] + x | 0, i[3] = i[3] + O | 0;
  10588. },
  10589. _doFinalize: function _doFinalize() {
  10590. var t = this._data,
  10591. n = t.words,
  10592. s = 8 * this._nDataBytes,
  10593. r = 8 * t.sigBytes;
  10594. n[r >>> 5] |= 128 << 24 - r % 32;
  10595. var i = e.floor(s / 4294967296),
  10596. o = s;
  10597. n[15 + (r + 64 >>> 9 << 4)] = 16711935 & (i << 8 | i >>> 24) | 4278255360 & (i << 24 | i >>> 8), n[14 + (r + 64 >>> 9 << 4)] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), t.sigBytes = 4 * (n.length + 1), this._process();
  10598. for (var a = this._hash, c = a.words, u = 0; u < 4; u++) {
  10599. var l = c[u];
  10600. c[u] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8);
  10601. }
  10602. return a;
  10603. },
  10604. clone: function clone() {
  10605. var e = i.clone.call(this);
  10606. return e._hash = this._hash.clone(), e;
  10607. }
  10608. });
  10609. function u(e, t, n, s, r, i, o) {
  10610. var a = e + (t & n | ~t & s) + r + o;
  10611. return (a << i | a >>> 32 - i) + t;
  10612. }
  10613. function l(e, t, n, s, r, i, o) {
  10614. var a = e + (t & s | n & ~s) + r + o;
  10615. return (a << i | a >>> 32 - i) + t;
  10616. }
  10617. function h(e, t, n, s, r, i, o) {
  10618. var a = e + (t ^ n ^ s) + r + o;
  10619. return (a << i | a >>> 32 - i) + t;
  10620. }
  10621. function d(e, t, n, s, r, i, o) {
  10622. var a = e + (n ^ (t | ~s)) + r + o;
  10623. return (a << i | a >>> 32 - i) + t;
  10624. }
  10625. t.MD5 = i._createHelper(c), t.HmacMD5 = i._createHmacHelper(c);
  10626. }(Math), n.MD5);
  10627. }), n(function (e, t) {
  10628. var n;
  10629. e.exports = (n = r, void function () {
  10630. var e = n,
  10631. t = e.lib.Base,
  10632. s = e.enc.Utf8;
  10633. e.algo.HMAC = t.extend({
  10634. init: function init(e, t) {
  10635. e = this._hasher = new e.init(), "string" == typeof t && (t = s.parse(t));
  10636. var n = e.blockSize,
  10637. r = 4 * n;
  10638. t.sigBytes > r && (t = e.finalize(t)), t.clamp();
  10639. for (var i = this._oKey = t.clone(), o = this._iKey = t.clone(), a = i.words, c = o.words, u = 0; u < n; u++) {
  10640. a[u] ^= 1549556828, c[u] ^= 909522486;
  10641. }
  10642. i.sigBytes = o.sigBytes = r, this.reset();
  10643. },
  10644. reset: function reset() {
  10645. var e = this._hasher;
  10646. e.reset(), e.update(this._iKey);
  10647. },
  10648. update: function update(e) {
  10649. return this._hasher.update(e), this;
  10650. },
  10651. finalize: function finalize(e) {
  10652. var t = this._hasher,
  10653. n = t.finalize(e);
  10654. return t.reset(), t.finalize(this._oKey.clone().concat(n));
  10655. }
  10656. });
  10657. }());
  10658. }), n(function (e, t) {
  10659. e.exports = r.HmacMD5;
  10660. })),
  10661. o = n(function (e, t) {
  10662. e.exports = r.enc.Utf8;
  10663. }),
  10664. a = n(function (e, t) {
  10665. var n;
  10666. e.exports = (n = r, function () {
  10667. var e = n,
  10668. t = e.lib.WordArray;
  10669. function s(e, n, s) {
  10670. for (var r = [], i = 0, o = 0; o < n; o++) {
  10671. if (o % 4) {
  10672. var a = s[e.charCodeAt(o - 1)] << o % 4 * 2,
  10673. c = s[e.charCodeAt(o)] >>> 6 - o % 4 * 2;
  10674. r[i >>> 2] |= (a | c) << 24 - i % 4 * 8, i++;
  10675. }
  10676. }
  10677. return t.create(r, i);
  10678. }
  10679. e.enc.Base64 = {
  10680. stringify: function stringify(e) {
  10681. var t = e.words,
  10682. n = e.sigBytes,
  10683. s = this._map;
  10684. e.clamp();
  10685. for (var r = [], i = 0; i < n; i += 3) {
  10686. for (var o = (t[i >>> 2] >>> 24 - i % 4 * 8 & 255) << 16 | (t[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255) << 8 | t[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255, a = 0; a < 4 && i + .75 * a < n; a++) {
  10687. r.push(s.charAt(o >>> 6 * (3 - a) & 63));
  10688. }
  10689. }
  10690. var c = s.charAt(64);
  10691. if (c) for (; r.length % 4;) {
  10692. r.push(c);
  10693. }
  10694. return r.join("");
  10695. },
  10696. parse: function parse(e) {
  10697. var t = e.length,
  10698. n = this._map,
  10699. r = this._reverseMap;
  10700. if (!r) {
  10701. r = this._reverseMap = [];
  10702. for (var i = 0; i < n.length; i++) {
  10703. r[n.charCodeAt(i)] = i;
  10704. }
  10705. }
  10706. var o = n.charAt(64);
  10707. if (o) {
  10708. var a = e.indexOf(o);
  10709. -1 !== a && (t = a);
  10710. }
  10711. return s(e, t, r);
  10712. },
  10713. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  10714. };
  10715. }(), n.enc.Base64);
  10716. });
  10717. var c = "FUNCTION",
  10718. u = "OBJECT",
  10719. l = "CLIENT_DB",
  10720. h = "pending",
  10721. d = "fulfilled",
  10722. p = "rejected";
  10723. function f(e) {
  10724. return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
  10725. }
  10726. function g(e) {
  10727. return "object" === f(e);
  10728. }
  10729. function m(e) {
  10730. return "function" == typeof e;
  10731. }
  10732. function y(e) {
  10733. return function () {
  10734. try {
  10735. return e.apply(e, arguments);
  10736. } catch (e) {
  10737. console.error(e);
  10738. }
  10739. };
  10740. }
  10741. var _ = "REJECTED",
  10742. w = "NOT_PENDING";
  10743. var v = /*#__PURE__*/function () {
  10744. function v() {
  10745. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  10746. e = _ref.createPromise,
  10747. _ref$retryRule = _ref.retryRule,
  10748. t = _ref$retryRule === void 0 ? _ : _ref$retryRule;
  10749. (0, _classCallCheck2.default)(this, v);
  10750. this.createPromise = e, this.status = null, this.promise = null, this.retryRule = t;
  10751. }
  10752. (0, _createClass2.default)(v, [{
  10753. key: "needRetry",
  10754. get: function get() {
  10755. if (!this.status) return !0;
  10756. switch (this.retryRule) {
  10757. case _:
  10758. return this.status === p;
  10759. case w:
  10760. return this.status !== h;
  10761. }
  10762. }
  10763. }, {
  10764. key: "exec",
  10765. value: function exec() {
  10766. var _this = this;
  10767. return this.needRetry ? (this.status = h, this.promise = this.createPromise().then(function (e) {
  10768. return _this.status = d, Promise.resolve(e);
  10769. }, function (e) {
  10770. return _this.status = p, Promise.reject(e);
  10771. }), this.promise) : this.promise;
  10772. }
  10773. }]);
  10774. return v;
  10775. }();
  10776. function I(e) {
  10777. return e && "string" == typeof e ? JSON.parse(e) : e;
  10778. }
  10779. var S = "development" === "development",
  10780. b = "mp-weixin",
  10781. k = "true" === undefined || !0 === undefined,
  10782. A = I([]),
  10783. C = "h5" === b ? "web" : "app-plus" === b ? "app" : b,
  10784. P = I(undefined),
  10785. T = I([]) || [],
  10786. x = true;
  10787. var O = "";
  10788. try {
  10789. O = (__webpack_require__(/*! uni-stat-config */ 39).default || __webpack_require__(/*! uni-stat-config */ 39)).appid;
  10790. } catch (e) {}
  10791. var E = {};
  10792. function L(e) {
  10793. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  10794. var n, s;
  10795. return n = E, s = e, Object.prototype.hasOwnProperty.call(n, s) || (E[e] = t), E[e];
  10796. }
  10797. "app" === C && (E = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {});
  10798. var R = ["invoke", "success", "fail", "complete"],
  10799. U = L("_globalUniCloudInterceptor");
  10800. function N(e, t) {
  10801. U[e] || (U[e] = {}), g(t) && Object.keys(t).forEach(function (n) {
  10802. R.indexOf(n) > -1 && function (e, t, n) {
  10803. var s = U[e][t];
  10804. s || (s = U[e][t] = []), -1 === s.indexOf(n) && m(n) && s.push(n);
  10805. }(e, n, t[n]);
  10806. });
  10807. }
  10808. function D(e, t) {
  10809. U[e] || (U[e] = {}), g(t) ? Object.keys(t).forEach(function (n) {
  10810. R.indexOf(n) > -1 && function (e, t, n) {
  10811. var s = U[e][t];
  10812. if (!s) return;
  10813. var r = s.indexOf(n);
  10814. r > -1 && s.splice(r, 1);
  10815. }(e, n, t[n]);
  10816. }) : delete U[e];
  10817. }
  10818. function q(e, t) {
  10819. return e && 0 !== e.length ? e.reduce(function (e, n) {
  10820. return e.then(function () {
  10821. return n(t);
  10822. });
  10823. }, Promise.resolve()) : Promise.resolve();
  10824. }
  10825. function M(e, t) {
  10826. return U[e] && U[e][t] || [];
  10827. }
  10828. function F(e) {
  10829. N("callObject", e);
  10830. }
  10831. var K = L("_globalUniCloudListener"),
  10832. j = "response",
  10833. $ = "needLogin",
  10834. B = "refreshToken",
  10835. W = "clientdb",
  10836. H = "cloudfunction",
  10837. J = "cloudobject";
  10838. function z(e) {
  10839. return K[e] || (K[e] = []), K[e];
  10840. }
  10841. function V(e, t) {
  10842. var n = z(e);
  10843. n.includes(t) || n.push(t);
  10844. }
  10845. function G(e, t) {
  10846. var n = z(e),
  10847. s = n.indexOf(t);
  10848. -1 !== s && n.splice(s, 1);
  10849. }
  10850. function Y(e, t) {
  10851. var n = z(e);
  10852. for (var _e2 = 0; _e2 < n.length; _e2++) {
  10853. (0, n[_e2])(t);
  10854. }
  10855. }
  10856. var Q,
  10857. X = !1;
  10858. function Z() {
  10859. return Q || (Q = new Promise(function (e) {
  10860. X && e(), function t() {
  10861. if ("function" == typeof getCurrentPages) {
  10862. var _t2 = getCurrentPages();
  10863. _t2 && _t2[0] && (X = !0, e());
  10864. }
  10865. X || setTimeout(function () {
  10866. t();
  10867. }, 30);
  10868. }();
  10869. }), Q);
  10870. }
  10871. function ee(e) {
  10872. var t = {};
  10873. for (var _n2 in e) {
  10874. var _s2 = e[_n2];
  10875. m(_s2) && (t[_n2] = y(_s2));
  10876. }
  10877. return t;
  10878. }
  10879. var te = /*#__PURE__*/function (_Error) {
  10880. (0, _inherits2.default)(te, _Error);
  10881. var _super = _createSuper(te);
  10882. function te(e) {
  10883. var _this2;
  10884. (0, _classCallCheck2.default)(this, te);
  10885. _this2 = _super.call(this, e.message), _this2.errMsg = e.message || e.errMsg || "unknown system error", _this2.code = _this2.errCode = e.code || e.errCode || "SYSTEM_ERROR", _this2.errSubject = _this2.subject = e.subject || e.errSubject, _this2.cause = e.cause, _this2.requestId = e.requestId;
  10886. return _this2;
  10887. }
  10888. (0, _createClass2.default)(te, [{
  10889. key: "toJson",
  10890. value: function toJson() {
  10891. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  10892. if (!(e >= 10)) return e++, {
  10893. errCode: this.errCode,
  10894. errMsg: this.errMsg,
  10895. errSubject: this.errSubject,
  10896. cause: this.cause && this.cause.toJson ? this.cause.toJson(e) : this.cause
  10897. };
  10898. }
  10899. }]);
  10900. return te;
  10901. }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
  10902. exports.UniCloudError = te;
  10903. var ne = {
  10904. request: function request(e) {
  10905. return uni.request(e);
  10906. },
  10907. uploadFile: function uploadFile(e) {
  10908. return uni.uploadFile(e);
  10909. },
  10910. setStorageSync: function setStorageSync(e, t) {
  10911. return uni.setStorageSync(e, t);
  10912. },
  10913. getStorageSync: function getStorageSync(e) {
  10914. return uni.getStorageSync(e);
  10915. },
  10916. removeStorageSync: function removeStorageSync(e) {
  10917. return uni.removeStorageSync(e);
  10918. },
  10919. clearStorageSync: function clearStorageSync() {
  10920. return uni.clearStorageSync();
  10921. },
  10922. connectSocket: function connectSocket(e) {
  10923. return uni.connectSocket(e);
  10924. }
  10925. };
  10926. function se() {
  10927. return {
  10928. token: ne.getStorageSync("uni_id_token") || ne.getStorageSync("uniIdToken"),
  10929. tokenExpired: ne.getStorageSync("uni_id_token_expired")
  10930. };
  10931. }
  10932. function re() {
  10933. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  10934. e = _ref2.token,
  10935. t = _ref2.tokenExpired;
  10936. e && ne.setStorageSync("uni_id_token", e), t && ne.setStorageSync("uni_id_token_expired", t);
  10937. }
  10938. var ie, oe;
  10939. function ae() {
  10940. return ie || (ie = uni.getSystemInfoSync()), ie;
  10941. }
  10942. function ce() {
  10943. var e, t;
  10944. try {
  10945. if (uni.getLaunchOptionsSync) {
  10946. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return;
  10947. var _uni$getLaunchOptions = uni.getLaunchOptionsSync(),
  10948. _n3 = _uni$getLaunchOptions.scene,
  10949. _s3 = _uni$getLaunchOptions.channel;
  10950. e = _s3, t = _n3;
  10951. }
  10952. } catch (e) {}
  10953. return {
  10954. channel: e,
  10955. scene: t
  10956. };
  10957. }
  10958. var ue = {};
  10959. function le() {
  10960. var e = uni.getLocale && uni.getLocale() || "en";
  10961. if (oe) return _objectSpread(_objectSpread(_objectSpread({}, ue), oe), {}, {
  10962. locale: e,
  10963. LOCALE: e
  10964. });
  10965. var t = ae(),
  10966. n = t.deviceId,
  10967. s = t.osName,
  10968. r = t.uniPlatform,
  10969. i = t.appId,
  10970. o = ["appId", "appLanguage", "appName", "appVersion", "appVersionCode", "appWgtVersion", "browserName", "browserVersion", "deviceBrand", "deviceId", "deviceModel", "deviceType", "osName", "osVersion", "romName", "romVersion", "ua", "hostName", "hostVersion", "uniPlatform", "uniRuntimeVersion", "uniRuntimeVersionCode", "uniCompilerVersion", "uniCompilerVersionCode"];
  10971. for (var _e3 in t) {
  10972. Object.hasOwnProperty.call(t, _e3) && -1 === o.indexOf(_e3) && delete t[_e3];
  10973. }
  10974. return oe = _objectSpread(_objectSpread({
  10975. PLATFORM: r,
  10976. OS: s,
  10977. APPID: i,
  10978. DEVICEID: n
  10979. }, ce()), t), _objectSpread(_objectSpread(_objectSpread({}, ue), oe), {}, {
  10980. locale: e,
  10981. LOCALE: e
  10982. });
  10983. }
  10984. var he = {
  10985. sign: function sign(e, t) {
  10986. var n = "";
  10987. return Object.keys(e).sort().forEach(function (t) {
  10988. e[t] && (n = n + "&" + t + "=" + e[t]);
  10989. }), n = n.slice(1), i(n, t).toString();
  10990. },
  10991. wrappedRequest: function wrappedRequest(e, t) {
  10992. return new Promise(function (n, s) {
  10993. t(Object.assign(e, {
  10994. complete: function complete(e) {
  10995. e || (e = {}), S && "web" === C && e.errMsg && 0 === e.errMsg.indexOf("request:fail") && console.warn("发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5");
  10996. var t = e.data && e.data.header && e.data.header["x-serverless-request-id"] || e.header && e.header["request-id"];
  10997. if (!e.statusCode || e.statusCode >= 400) {
  10998. var _n4 = e.data && e.data.error && e.data.error.code || "SYS_ERR",
  10999. _r = e.data && e.data.error && e.data.error.message || e.errMsg || "request:fail";
  11000. return s(new te({
  11001. code: _n4,
  11002. message: _r,
  11003. requestId: t
  11004. }));
  11005. }
  11006. var r = e.data;
  11007. if (r.error) return s(new te({
  11008. code: r.error.code,
  11009. message: r.error.message,
  11010. requestId: t
  11011. }));
  11012. r.result = r.data, r.requestId = t, delete r.data, n(r);
  11013. }
  11014. }));
  11015. });
  11016. },
  11017. toBase64: function toBase64(e) {
  11018. return a.stringify(o.parse(e));
  11019. }
  11020. };
  11021. var de = /*#__PURE__*/function () {
  11022. function de(e) {
  11023. var _this3 = this;
  11024. (0, _classCallCheck2.default)(this, de);
  11025. ["spaceId", "clientSecret"].forEach(function (t) {
  11026. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error("".concat(t, " required"));
  11027. }), this.config = Object.assign({}, {
  11028. endpoint: 0 === e.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com"
  11029. }, e), this.config.provider = "aliyun", this.config.requestUrl = this.config.endpoint + "/client", this.config.envType = this.config.envType || "public", this.config.accessTokenKey = "access_token_" + this.config.spaceId, this.adapter = ne, this._getAccessTokenPromiseHub = new v({
  11030. createPromise: function createPromise() {
  11031. return _this3.requestAuth(_this3.setupRequest({
  11032. method: "serverless.auth.user.anonymousAuthorize",
  11033. params: "{}"
  11034. }, "auth")).then(function (e) {
  11035. if (!e.result || !e.result.accessToken) throw new te({
  11036. code: "AUTH_FAILED",
  11037. message: "获取accessToken失败"
  11038. });
  11039. _this3.setAccessToken(e.result.accessToken);
  11040. });
  11041. },
  11042. retryRule: w
  11043. });
  11044. }
  11045. (0, _createClass2.default)(de, [{
  11046. key: "hasAccessToken",
  11047. get: function get() {
  11048. return !!this.accessToken;
  11049. }
  11050. }, {
  11051. key: "setAccessToken",
  11052. value: function setAccessToken(e) {
  11053. this.accessToken = e;
  11054. }
  11055. }, {
  11056. key: "requestWrapped",
  11057. value: function requestWrapped(e) {
  11058. return he.wrappedRequest(e, this.adapter.request);
  11059. }
  11060. }, {
  11061. key: "requestAuth",
  11062. value: function requestAuth(e) {
  11063. return this.requestWrapped(e);
  11064. }
  11065. }, {
  11066. key: "request",
  11067. value: function request(e, t) {
  11068. var _this4 = this;
  11069. return Promise.resolve().then(function () {
  11070. return _this4.hasAccessToken ? t ? _this4.requestWrapped(e) : _this4.requestWrapped(e).catch(function (t) {
  11071. return new Promise(function (e, n) {
  11072. !t || "GATEWAY_INVALID_TOKEN" !== t.code && "InvalidParameter.InvalidToken" !== t.code ? n(t) : e();
  11073. }).then(function () {
  11074. return _this4.getAccessToken();
  11075. }).then(function () {
  11076. var t = _this4.rebuildRequest(e);
  11077. return _this4.request(t, !0);
  11078. });
  11079. }) : _this4.getAccessToken().then(function () {
  11080. var t = _this4.rebuildRequest(e);
  11081. return _this4.request(t, !0);
  11082. });
  11083. });
  11084. }
  11085. }, {
  11086. key: "rebuildRequest",
  11087. value: function rebuildRequest(e) {
  11088. var t = Object.assign({}, e);
  11089. return t.data.token = this.accessToken, t.header["x-basement-token"] = this.accessToken, t.header["x-serverless-sign"] = he.sign(t.data, this.config.clientSecret), t;
  11090. }
  11091. }, {
  11092. key: "setupRequest",
  11093. value: function setupRequest(e, t) {
  11094. var n = Object.assign({}, e, {
  11095. spaceId: this.config.spaceId,
  11096. timestamp: Date.now()
  11097. }),
  11098. s = {
  11099. "Content-Type": "application/json"
  11100. };
  11101. return "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = he.sign(n, this.config.clientSecret), {
  11102. url: this.config.requestUrl,
  11103. method: "POST",
  11104. data: n,
  11105. dataType: "json",
  11106. header: s
  11107. };
  11108. }
  11109. }, {
  11110. key: "getAccessToken",
  11111. value: function getAccessToken() {
  11112. return this._getAccessTokenPromiseHub.exec();
  11113. }
  11114. }, {
  11115. key: "authorize",
  11116. value: function () {
  11117. var _authorize = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  11118. return _regenerator.default.wrap(function _callee$(_context) {
  11119. while (1) {
  11120. switch (_context.prev = _context.next) {
  11121. case 0:
  11122. _context.next = 2;
  11123. return this.getAccessToken();
  11124. case 2:
  11125. case "end":
  11126. return _context.stop();
  11127. }
  11128. }
  11129. }, _callee, this);
  11130. }));
  11131. function authorize() {
  11132. return _authorize.apply(this, arguments);
  11133. }
  11134. return authorize;
  11135. }()
  11136. }, {
  11137. key: "callFunction",
  11138. value: function callFunction(e) {
  11139. var t = {
  11140. method: "serverless.function.runtime.invoke",
  11141. params: JSON.stringify({
  11142. functionTarget: e.name,
  11143. functionArgs: e.data || {}
  11144. })
  11145. };
  11146. return this.request(_objectSpread(_objectSpread({}, this.setupRequest(t)), {}, {
  11147. timeout: e.timeout
  11148. }));
  11149. }
  11150. }, {
  11151. key: "getOSSUploadOptionsFromPath",
  11152. value: function getOSSUploadOptionsFromPath(e) {
  11153. var t = {
  11154. method: "serverless.file.resource.generateProximalSign",
  11155. params: JSON.stringify(e)
  11156. };
  11157. return this.request(this.setupRequest(t));
  11158. }
  11159. }, {
  11160. key: "uploadFileToOSS",
  11161. value: function uploadFileToOSS(_ref3) {
  11162. var _this5 = this;
  11163. var e = _ref3.url,
  11164. t = _ref3.formData,
  11165. n = _ref3.name,
  11166. s = _ref3.filePath,
  11167. r = _ref3.fileType,
  11168. i = _ref3.onUploadProgress;
  11169. return new Promise(function (o, a) {
  11170. var c = _this5.adapter.uploadFile({
  11171. url: e,
  11172. formData: t,
  11173. name: n,
  11174. filePath: s,
  11175. fileType: r,
  11176. header: {
  11177. "X-OSS-server-side-encrpytion": "AES256"
  11178. },
  11179. success: function success(e) {
  11180. e && e.statusCode < 400 ? o(e) : a(new te({
  11181. code: "UPLOAD_FAILED",
  11182. message: "文件上传失败"
  11183. }));
  11184. },
  11185. fail: function fail(e) {
  11186. a(new te({
  11187. code: e.code || "UPLOAD_FAILED",
  11188. message: e.message || e.errMsg || "文件上传失败"
  11189. }));
  11190. }
  11191. });
  11192. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  11193. i({
  11194. loaded: e.totalBytesSent,
  11195. total: e.totalBytesExpectedToSend
  11196. });
  11197. });
  11198. });
  11199. }
  11200. }, {
  11201. key: "reportOSSUpload",
  11202. value: function reportOSSUpload(e) {
  11203. var t = {
  11204. method: "serverless.file.resource.report",
  11205. params: JSON.stringify(e)
  11206. };
  11207. return this.request(this.setupRequest(t));
  11208. }
  11209. }, {
  11210. key: "uploadFile",
  11211. value: function () {
  11212. var _uploadFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
  11213. var e, t, _ref4$fileType, n, _ref4$cloudPathAsReal, s, r, i, o, a, c, u, l, h, d, p, g, m, y, _, _e4, w;
  11214. return _regenerator.default.wrap(function _callee2$(_context2) {
  11215. while (1) {
  11216. switch (_context2.prev = _context2.next) {
  11217. case 0:
  11218. e = _ref4.filePath, t = _ref4.cloudPath, _ref4$fileType = _ref4.fileType, n = _ref4$fileType === void 0 ? "image" : _ref4$fileType, _ref4$cloudPathAsReal = _ref4.cloudPathAsRealPath, s = _ref4$cloudPathAsReal === void 0 ? !1 : _ref4$cloudPathAsReal, r = _ref4.onUploadProgress, i = _ref4.config;
  11219. if (!("string" !== f(t))) {
  11220. _context2.next = 3;
  11221. break;
  11222. }
  11223. throw new te({
  11224. code: "INVALID_PARAM",
  11225. message: "cloudPath必须为字符串类型"
  11226. });
  11227. case 3:
  11228. if (t = t.trim()) {
  11229. _context2.next = 5;
  11230. break;
  11231. }
  11232. throw new te({
  11233. code: "INVALID_PARAM",
  11234. message: "cloudPath不可为空"
  11235. });
  11236. case 5:
  11237. if (!/:\/\//.test(t)) {
  11238. _context2.next = 7;
  11239. break;
  11240. }
  11241. throw new te({
  11242. code: "INVALID_PARAM",
  11243. message: "cloudPath不合法"
  11244. });
  11245. case 7:
  11246. o = i && i.envType || this.config.envType;
  11247. if (!(s && ("/" !== t[0] && (t = "/" + t), t.indexOf("\\") > -1))) {
  11248. _context2.next = 10;
  11249. break;
  11250. }
  11251. throw new te({
  11252. code: "INVALID_PARAM",
  11253. message: "使用cloudPath作为路径时,cloudPath不可包含“\\”"
  11254. });
  11255. case 10:
  11256. _context2.next = 12;
  11257. return this.getOSSUploadOptionsFromPath({
  11258. env: o,
  11259. filename: s ? t.split("/").pop() : t,
  11260. fileId: s ? t : void 0
  11261. });
  11262. case 12:
  11263. a = _context2.sent.result;
  11264. c = "https://" + a.cdnDomain + "/" + a.ossPath;
  11265. u = a.securityToken;
  11266. l = a.accessKeyId;
  11267. h = a.signature;
  11268. d = a.host;
  11269. p = a.ossPath;
  11270. g = a.id;
  11271. m = a.policy;
  11272. y = a.ossCallbackUrl;
  11273. _ = {
  11274. "Cache-Control": "max-age=2592000",
  11275. "Content-Disposition": "attachment",
  11276. OSSAccessKeyId: l,
  11277. Signature: h,
  11278. host: d,
  11279. id: g,
  11280. key: p,
  11281. policy: m,
  11282. success_action_status: 200
  11283. };
  11284. if (u && (_["x-oss-security-token"] = u), y) {
  11285. _e4 = JSON.stringify({
  11286. callbackUrl: y,
  11287. callbackBody: JSON.stringify({
  11288. fileId: g,
  11289. spaceId: this.config.spaceId
  11290. }),
  11291. callbackBodyType: "application/json"
  11292. });
  11293. _.callback = he.toBase64(_e4);
  11294. }
  11295. w = {
  11296. url: "https://" + a.host,
  11297. formData: _,
  11298. fileName: "file",
  11299. name: "file",
  11300. filePath: e,
  11301. fileType: n
  11302. };
  11303. _context2.next = 27;
  11304. return this.uploadFileToOSS(Object.assign({}, w, {
  11305. onUploadProgress: r
  11306. }));
  11307. case 27:
  11308. if (!y) {
  11309. _context2.next = 29;
  11310. break;
  11311. }
  11312. return _context2.abrupt("return", {
  11313. success: !0,
  11314. filePath: e,
  11315. fileID: c
  11316. });
  11317. case 29:
  11318. _context2.next = 31;
  11319. return this.reportOSSUpload({
  11320. id: g
  11321. });
  11322. case 31:
  11323. if (!_context2.sent.success) {
  11324. _context2.next = 33;
  11325. break;
  11326. }
  11327. return _context2.abrupt("return", {
  11328. success: !0,
  11329. filePath: e,
  11330. fileID: c
  11331. });
  11332. case 33:
  11333. throw new te({
  11334. code: "UPLOAD_FAILED",
  11335. message: "文件上传失败"
  11336. });
  11337. case 34:
  11338. case "end":
  11339. return _context2.stop();
  11340. }
  11341. }
  11342. }, _callee2, this);
  11343. }));
  11344. function uploadFile(_x) {
  11345. return _uploadFile.apply(this, arguments);
  11346. }
  11347. return uploadFile;
  11348. }()
  11349. }, {
  11350. key: "getTempFileURL",
  11351. value: function getTempFileURL() {
  11352. var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  11353. e = _ref5.fileList;
  11354. return new Promise(function (t, n) {
  11355. Array.isArray(e) && 0 !== e.length || n(new te({
  11356. code: "INVALID_PARAM",
  11357. message: "fileList的元素必须是非空的字符串"
  11358. })), t({
  11359. fileList: e.map(function (e) {
  11360. return {
  11361. fileID: e,
  11362. tempFileURL: e
  11363. };
  11364. })
  11365. });
  11366. });
  11367. }
  11368. }, {
  11369. key: "getFileInfo",
  11370. value: function () {
  11371. var _getFileInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  11372. var _ref6,
  11373. e,
  11374. t,
  11375. _args3 = arguments;
  11376. return _regenerator.default.wrap(function _callee3$(_context3) {
  11377. while (1) {
  11378. switch (_context3.prev = _context3.next) {
  11379. case 0:
  11380. _ref6 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, e = _ref6.fileList;
  11381. if (!(!Array.isArray(e) || 0 === e.length)) {
  11382. _context3.next = 3;
  11383. break;
  11384. }
  11385. throw new te({
  11386. code: "INVALID_PARAM",
  11387. message: "fileList的元素必须是非空的字符串"
  11388. });
  11389. case 3:
  11390. t = {
  11391. method: "serverless.file.resource.info",
  11392. params: JSON.stringify({
  11393. id: e.map(function (e) {
  11394. return e.split("?")[0];
  11395. }).join(",")
  11396. })
  11397. };
  11398. _context3.next = 6;
  11399. return this.request(this.setupRequest(t));
  11400. case 6:
  11401. _context3.t0 = _context3.sent.result;
  11402. return _context3.abrupt("return", {
  11403. fileList: _context3.t0
  11404. });
  11405. case 8:
  11406. case "end":
  11407. return _context3.stop();
  11408. }
  11409. }
  11410. }, _callee3, this);
  11411. }));
  11412. function getFileInfo() {
  11413. return _getFileInfo.apply(this, arguments);
  11414. }
  11415. return getFileInfo;
  11416. }()
  11417. }]);
  11418. return de;
  11419. }();
  11420. var pe = {
  11421. init: function init(e) {
  11422. var t = new de(e),
  11423. n = {
  11424. signInAnonymously: function signInAnonymously() {
  11425. return t.authorize();
  11426. },
  11427. getLoginState: function getLoginState() {
  11428. return Promise.resolve(!1);
  11429. }
  11430. };
  11431. return t.auth = function () {
  11432. return n;
  11433. }, t.customAuth = t.auth, t;
  11434. }
  11435. };
  11436. var fe = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  11437. var ge;
  11438. !function (e) {
  11439. e.local = "local", e.none = "none", e.session = "session";
  11440. }(ge || (ge = {}));
  11441. var me = function me() {},
  11442. ye = n(function (e, t) {
  11443. var n;
  11444. e.exports = (n = r, function (e) {
  11445. var t = n,
  11446. s = t.lib,
  11447. r = s.WordArray,
  11448. i = s.Hasher,
  11449. o = t.algo,
  11450. a = [],
  11451. c = [];
  11452. !function () {
  11453. function t(t) {
  11454. for (var n = e.sqrt(t), s = 2; s <= n; s++) {
  11455. if (!(t % s)) return !1;
  11456. }
  11457. return !0;
  11458. }
  11459. function n(e) {
  11460. return 4294967296 * (e - (0 | e)) | 0;
  11461. }
  11462. for (var s = 2, r = 0; r < 64;) {
  11463. t(s) && (r < 8 && (a[r] = n(e.pow(s, .5))), c[r] = n(e.pow(s, 1 / 3)), r++), s++;
  11464. }
  11465. }();
  11466. var u = [],
  11467. l = o.SHA256 = i.extend({
  11468. _doReset: function _doReset() {
  11469. this._hash = new r.init(a.slice(0));
  11470. },
  11471. _doProcessBlock: function _doProcessBlock(e, t) {
  11472. for (var n = this._hash.words, s = n[0], r = n[1], i = n[2], o = n[3], a = n[4], l = n[5], h = n[6], d = n[7], p = 0; p < 64; p++) {
  11473. if (p < 16) u[p] = 0 | e[t + p];else {
  11474. var f = u[p - 15],
  11475. g = (f << 25 | f >>> 7) ^ (f << 14 | f >>> 18) ^ f >>> 3,
  11476. m = u[p - 2],
  11477. y = (m << 15 | m >>> 17) ^ (m << 13 | m >>> 19) ^ m >>> 10;
  11478. u[p] = g + u[p - 7] + y + u[p - 16];
  11479. }
  11480. var _ = s & r ^ s & i ^ r & i,
  11481. w = (s << 30 | s >>> 2) ^ (s << 19 | s >>> 13) ^ (s << 10 | s >>> 22),
  11482. v = d + ((a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25)) + (a & l ^ ~a & h) + c[p] + u[p];
  11483. d = h, h = l, l = a, a = o + v | 0, o = i, i = r, r = s, s = v + (w + _) | 0;
  11484. }
  11485. n[0] = n[0] + s | 0, n[1] = n[1] + r | 0, n[2] = n[2] + i | 0, n[3] = n[3] + o | 0, n[4] = n[4] + a | 0, n[5] = n[5] + l | 0, n[6] = n[6] + h | 0, n[7] = n[7] + d | 0;
  11486. },
  11487. _doFinalize: function _doFinalize() {
  11488. var t = this._data,
  11489. n = t.words,
  11490. s = 8 * this._nDataBytes,
  11491. r = 8 * t.sigBytes;
  11492. return n[r >>> 5] |= 128 << 24 - r % 32, n[14 + (r + 64 >>> 9 << 4)] = e.floor(s / 4294967296), n[15 + (r + 64 >>> 9 << 4)] = s, t.sigBytes = 4 * n.length, this._process(), this._hash;
  11493. },
  11494. clone: function clone() {
  11495. var e = i.clone.call(this);
  11496. return e._hash = this._hash.clone(), e;
  11497. }
  11498. });
  11499. t.SHA256 = i._createHelper(l), t.HmacSHA256 = i._createHmacHelper(l);
  11500. }(Math), n.SHA256);
  11501. }),
  11502. _e = ye,
  11503. we = n(function (e, t) {
  11504. e.exports = r.HmacSHA256;
  11505. });
  11506. var ve = function ve() {
  11507. var e;
  11508. if (!Promise) {
  11509. e = function e() {}, e.promise = {};
  11510. var _t3 = function _t3() {
  11511. throw new te({
  11512. message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'
  11513. });
  11514. };
  11515. return Object.defineProperty(e.promise, "then", {
  11516. get: _t3
  11517. }), Object.defineProperty(e.promise, "catch", {
  11518. get: _t3
  11519. }), e;
  11520. }
  11521. var t = new Promise(function (t, n) {
  11522. e = function e(_e5, s) {
  11523. return _e5 ? n(_e5) : t(s);
  11524. };
  11525. });
  11526. return e.promise = t, e;
  11527. };
  11528. function Ie(e) {
  11529. return void 0 === e;
  11530. }
  11531. function Se(e) {
  11532. return "[object Null]" === Object.prototype.toString.call(e);
  11533. }
  11534. var be;
  11535. function ke(e) {
  11536. var t = (n = e, "[object Array]" === Object.prototype.toString.call(n) ? e : [e]);
  11537. var n;
  11538. var _iterator = _createForOfIteratorHelper(t),
  11539. _step;
  11540. try {
  11541. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  11542. var _e6 = _step.value;
  11543. var _t4 = _e6.isMatch,
  11544. _n5 = _e6.genAdapter,
  11545. _s4 = _e6.runtime;
  11546. if (_t4()) return {
  11547. adapter: _n5(),
  11548. runtime: _s4
  11549. };
  11550. }
  11551. } catch (err) {
  11552. _iterator.e(err);
  11553. } finally {
  11554. _iterator.f();
  11555. }
  11556. }
  11557. !function (e) {
  11558. e.WEB = "web", e.WX_MP = "wx_mp";
  11559. }(be || (be = {}));
  11560. var Ae = {
  11561. adapter: null,
  11562. runtime: void 0
  11563. },
  11564. Ce = ["anonymousUuidKey"];
  11565. var Pe = /*#__PURE__*/function (_me) {
  11566. (0, _inherits2.default)(Pe, _me);
  11567. var _super2 = _createSuper(Pe);
  11568. function Pe() {
  11569. var _this6;
  11570. (0, _classCallCheck2.default)(this, Pe);
  11571. _this6 = _super2.call(this), Ae.adapter.root.tcbObject || (Ae.adapter.root.tcbObject = {});
  11572. return _this6;
  11573. }
  11574. (0, _createClass2.default)(Pe, [{
  11575. key: "setItem",
  11576. value: function setItem(e, t) {
  11577. Ae.adapter.root.tcbObject[e] = t;
  11578. }
  11579. }, {
  11580. key: "getItem",
  11581. value: function getItem(e) {
  11582. return Ae.adapter.root.tcbObject[e];
  11583. }
  11584. }, {
  11585. key: "removeItem",
  11586. value: function removeItem(e) {
  11587. delete Ae.adapter.root.tcbObject[e];
  11588. }
  11589. }, {
  11590. key: "clear",
  11591. value: function clear() {
  11592. delete Ae.adapter.root.tcbObject;
  11593. }
  11594. }]);
  11595. return Pe;
  11596. }(me);
  11597. function Te(e, t) {
  11598. switch (e) {
  11599. case "local":
  11600. return t.localStorage || new Pe();
  11601. case "none":
  11602. return new Pe();
  11603. default:
  11604. return t.sessionStorage || new Pe();
  11605. }
  11606. }
  11607. var xe = /*#__PURE__*/function () {
  11608. function xe(e) {
  11609. (0, _classCallCheck2.default)(this, xe);
  11610. if (!this._storage) {
  11611. this._persistence = Ae.adapter.primaryStorage || e.persistence, this._storage = Te(this._persistence, Ae.adapter);
  11612. var _t5 = "access_token_".concat(e.env),
  11613. _n6 = "access_token_expire_".concat(e.env),
  11614. _s5 = "refresh_token_".concat(e.env),
  11615. _r2 = "anonymous_uuid_".concat(e.env),
  11616. _i = "login_type_".concat(e.env),
  11617. _o = "user_info_".concat(e.env);
  11618. this.keys = {
  11619. accessTokenKey: _t5,
  11620. accessTokenExpireKey: _n6,
  11621. refreshTokenKey: _s5,
  11622. anonymousUuidKey: _r2,
  11623. loginTypeKey: _i,
  11624. userInfoKey: _o
  11625. };
  11626. }
  11627. }
  11628. (0, _createClass2.default)(xe, [{
  11629. key: "updatePersistence",
  11630. value: function updatePersistence(e) {
  11631. if (e === this._persistence) return;
  11632. var t = "local" === this._persistence;
  11633. this._persistence = e;
  11634. var n = Te(e, Ae.adapter);
  11635. for (var _e7 in this.keys) {
  11636. var _s6 = this.keys[_e7];
  11637. if (t && Ce.includes(_e7)) continue;
  11638. var _r3 = this._storage.getItem(_s6);
  11639. Ie(_r3) || Se(_r3) || (n.setItem(_s6, _r3), this._storage.removeItem(_s6));
  11640. }
  11641. this._storage = n;
  11642. }
  11643. }, {
  11644. key: "setStore",
  11645. value: function setStore(e, t, n) {
  11646. if (!this._storage) return;
  11647. var s = {
  11648. version: n || "localCachev1",
  11649. content: t
  11650. },
  11651. r = JSON.stringify(s);
  11652. try {
  11653. this._storage.setItem(e, r);
  11654. } catch (e) {
  11655. throw e;
  11656. }
  11657. }
  11658. }, {
  11659. key: "getStore",
  11660. value: function getStore(e, t) {
  11661. try {
  11662. if (!this._storage) return;
  11663. } catch (e) {
  11664. return "";
  11665. }
  11666. t = t || "localCachev1";
  11667. var n = this._storage.getItem(e);
  11668. if (!n) return "";
  11669. if (n.indexOf(t) >= 0) {
  11670. return JSON.parse(n).content;
  11671. }
  11672. return "";
  11673. }
  11674. }, {
  11675. key: "removeStore",
  11676. value: function removeStore(e) {
  11677. this._storage.removeItem(e);
  11678. }
  11679. }]);
  11680. return xe;
  11681. }();
  11682. var Oe = {},
  11683. Ee = {};
  11684. function Le(e) {
  11685. return Oe[e];
  11686. }
  11687. var Re = /*#__PURE__*/(0, _createClass2.default)(function Re(e, t) {
  11688. (0, _classCallCheck2.default)(this, Re);
  11689. this.data = t || null, this.name = e;
  11690. });
  11691. var Ue = /*#__PURE__*/function (_Re) {
  11692. (0, _inherits2.default)(Ue, _Re);
  11693. var _super3 = _createSuper(Ue);
  11694. function Ue(e, t) {
  11695. var _this7;
  11696. (0, _classCallCheck2.default)(this, Ue);
  11697. _this7 = _super3.call(this, "error", {
  11698. error: e,
  11699. data: t
  11700. }), _this7.error = e;
  11701. return _this7;
  11702. }
  11703. return (0, _createClass2.default)(Ue);
  11704. }(Re);
  11705. var Ne = new ( /*#__PURE__*/function () {
  11706. function _class() {
  11707. (0, _classCallCheck2.default)(this, _class);
  11708. this._listeners = {};
  11709. }
  11710. (0, _createClass2.default)(_class, [{
  11711. key: "on",
  11712. value: function on(e, t) {
  11713. return function (e, t, n) {
  11714. n[e] = n[e] || [], n[e].push(t);
  11715. }(e, t, this._listeners), this;
  11716. }
  11717. }, {
  11718. key: "off",
  11719. value: function off(e, t) {
  11720. return function (e, t, n) {
  11721. if (n && n[e]) {
  11722. var _s7 = n[e].indexOf(t);
  11723. -1 !== _s7 && n[e].splice(_s7, 1);
  11724. }
  11725. }(e, t, this._listeners), this;
  11726. }
  11727. }, {
  11728. key: "fire",
  11729. value: function fire(e, t) {
  11730. if (e instanceof Ue) return console.error(e.error), this;
  11731. var n = "string" == typeof e ? new Re(e, t || {}) : e;
  11732. var s = n.name;
  11733. if (this._listens(s)) {
  11734. n.target = this;
  11735. var _e8 = this._listeners[s] ? (0, _toConsumableArray2.default)(this._listeners[s]) : [];
  11736. var _iterator2 = _createForOfIteratorHelper(_e8),
  11737. _step2;
  11738. try {
  11739. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  11740. var _t6 = _step2.value;
  11741. _t6.call(this, n);
  11742. }
  11743. } catch (err) {
  11744. _iterator2.e(err);
  11745. } finally {
  11746. _iterator2.f();
  11747. }
  11748. }
  11749. return this;
  11750. }
  11751. }, {
  11752. key: "_listens",
  11753. value: function _listens(e) {
  11754. return this._listeners[e] && this._listeners[e].length > 0;
  11755. }
  11756. }]);
  11757. return _class;
  11758. }())();
  11759. function De(e, t) {
  11760. Ne.on(e, t);
  11761. }
  11762. function qe(e) {
  11763. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  11764. Ne.fire(e, t);
  11765. }
  11766. function Me(e, t) {
  11767. Ne.off(e, t);
  11768. }
  11769. var Fe = "loginStateChanged",
  11770. Ke = "loginStateExpire",
  11771. je = "loginTypeChanged",
  11772. $e = "anonymousConverted",
  11773. Be = "refreshAccessToken";
  11774. var We;
  11775. !function (e) {
  11776. e.ANONYMOUS = "ANONYMOUS", e.WECHAT = "WECHAT", e.WECHAT_PUBLIC = "WECHAT-PUBLIC", e.WECHAT_OPEN = "WECHAT-OPEN", e.CUSTOM = "CUSTOM", e.EMAIL = "EMAIL", e.USERNAME = "USERNAME", e.NULL = "NULL";
  11777. }(We || (We = {}));
  11778. var He = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"],
  11779. Je = {
  11780. "X-SDK-Version": "1.3.5"
  11781. };
  11782. function ze(e, t, n) {
  11783. var s = e[t];
  11784. e[t] = function (t) {
  11785. var r = {},
  11786. i = {};
  11787. n.forEach(function (n) {
  11788. var _n$call = n.call(e, t),
  11789. s = _n$call.data,
  11790. o = _n$call.headers;
  11791. Object.assign(r, s), Object.assign(i, o);
  11792. });
  11793. var o = t.data;
  11794. return o && function () {
  11795. var e;
  11796. if (e = o, "[object FormData]" !== Object.prototype.toString.call(e)) t.data = _objectSpread(_objectSpread({}, o), r);else for (var _e9 in r) {
  11797. o.append(_e9, r[_e9]);
  11798. }
  11799. }(), t.headers = _objectSpread(_objectSpread({}, t.headers || {}), i), s.call(e, t);
  11800. };
  11801. }
  11802. function Ve() {
  11803. var e = Math.random().toString(16).slice(2);
  11804. return {
  11805. data: {
  11806. seqId: e
  11807. },
  11808. headers: _objectSpread(_objectSpread({}, Je), {}, {
  11809. "x-seqid": e
  11810. })
  11811. };
  11812. }
  11813. var Ge = /*#__PURE__*/function () {
  11814. function Ge() {
  11815. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11816. (0, _classCallCheck2.default)(this, Ge);
  11817. var t;
  11818. this.config = e, this._reqClass = new Ae.adapter.reqClass({
  11819. timeout: this.config.timeout,
  11820. timeoutMsg: "\u8BF7\u6C42\u5728".concat(this.config.timeout / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD"),
  11821. restrictedMethods: ["post"]
  11822. }), this._cache = Le(this.config.env), this._localCache = (t = this.config.env, Ee[t]), ze(this._reqClass, "post", [Ve]), ze(this._reqClass, "upload", [Ve]), ze(this._reqClass, "download", [Ve]);
  11823. }
  11824. (0, _createClass2.default)(Ge, [{
  11825. key: "post",
  11826. value: function () {
  11827. var _post = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(e) {
  11828. return _regenerator.default.wrap(function _callee4$(_context4) {
  11829. while (1) {
  11830. switch (_context4.prev = _context4.next) {
  11831. case 0:
  11832. _context4.next = 2;
  11833. return this._reqClass.post(e);
  11834. case 2:
  11835. return _context4.abrupt("return", _context4.sent);
  11836. case 3:
  11837. case "end":
  11838. return _context4.stop();
  11839. }
  11840. }
  11841. }, _callee4, this);
  11842. }));
  11843. function post(_x2) {
  11844. return _post.apply(this, arguments);
  11845. }
  11846. return post;
  11847. }()
  11848. }, {
  11849. key: "upload",
  11850. value: function () {
  11851. var _upload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(e) {
  11852. return _regenerator.default.wrap(function _callee5$(_context5) {
  11853. while (1) {
  11854. switch (_context5.prev = _context5.next) {
  11855. case 0:
  11856. _context5.next = 2;
  11857. return this._reqClass.upload(e);
  11858. case 2:
  11859. return _context5.abrupt("return", _context5.sent);
  11860. case 3:
  11861. case "end":
  11862. return _context5.stop();
  11863. }
  11864. }
  11865. }, _callee5, this);
  11866. }));
  11867. function upload(_x3) {
  11868. return _upload.apply(this, arguments);
  11869. }
  11870. return upload;
  11871. }()
  11872. }, {
  11873. key: "download",
  11874. value: function () {
  11875. var _download = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(e) {
  11876. return _regenerator.default.wrap(function _callee6$(_context6) {
  11877. while (1) {
  11878. switch (_context6.prev = _context6.next) {
  11879. case 0:
  11880. _context6.next = 2;
  11881. return this._reqClass.download(e);
  11882. case 2:
  11883. return _context6.abrupt("return", _context6.sent);
  11884. case 3:
  11885. case "end":
  11886. return _context6.stop();
  11887. }
  11888. }
  11889. }, _callee6, this);
  11890. }));
  11891. function download(_x4) {
  11892. return _download.apply(this, arguments);
  11893. }
  11894. return download;
  11895. }()
  11896. }, {
  11897. key: "refreshAccessToken",
  11898. value: function () {
  11899. var _refreshAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  11900. var e, t;
  11901. return _regenerator.default.wrap(function _callee7$(_context7) {
  11902. while (1) {
  11903. switch (_context7.prev = _context7.next) {
  11904. case 0:
  11905. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  11906. _context7.prev = 1;
  11907. _context7.next = 4;
  11908. return this._refreshAccessTokenPromise;
  11909. case 4:
  11910. e = _context7.sent;
  11911. _context7.next = 10;
  11912. break;
  11913. case 7:
  11914. _context7.prev = 7;
  11915. _context7.t0 = _context7["catch"](1);
  11916. t = _context7.t0;
  11917. case 10:
  11918. if (!(this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t)) {
  11919. _context7.next = 12;
  11920. break;
  11921. }
  11922. throw t;
  11923. case 12:
  11924. return _context7.abrupt("return", e);
  11925. case 13:
  11926. case "end":
  11927. return _context7.stop();
  11928. }
  11929. }
  11930. }, _callee7, this, [[1, 7]]);
  11931. }));
  11932. function refreshAccessToken() {
  11933. return _refreshAccessToken2.apply(this, arguments);
  11934. }
  11935. return refreshAccessToken;
  11936. }()
  11937. }, {
  11938. key: "_refreshAccessToken",
  11939. value: function () {
  11940. var _refreshAccessToken3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  11941. var _this$_cache$keys, e, t, n, s, r, i, o, a, _e10, _e11, _t7, _s8;
  11942. return _regenerator.default.wrap(function _callee8$(_context8) {
  11943. while (1) {
  11944. switch (_context8.prev = _context8.next) {
  11945. case 0:
  11946. _this$_cache$keys = this._cache.keys, e = _this$_cache$keys.accessTokenKey, t = _this$_cache$keys.accessTokenExpireKey, n = _this$_cache$keys.refreshTokenKey, s = _this$_cache$keys.loginTypeKey, r = _this$_cache$keys.anonymousUuidKey;
  11947. this._cache.removeStore(e), this._cache.removeStore(t);
  11948. i = this._cache.getStore(n);
  11949. if (i) {
  11950. _context8.next = 5;
  11951. break;
  11952. }
  11953. throw new te({
  11954. message: "未登录CloudBase"
  11955. });
  11956. case 5:
  11957. o = {
  11958. refresh_token: i
  11959. };
  11960. _context8.next = 8;
  11961. return this.request("auth.fetchAccessTokenWithRefreshToken", o);
  11962. case 8:
  11963. a = _context8.sent;
  11964. if (!a.data.code) {
  11965. _context8.next = 21;
  11966. break;
  11967. }
  11968. _e10 = a.data.code;
  11969. if (!("SIGN_PARAM_INVALID" === _e10 || "REFRESH_TOKEN_EXPIRED" === _e10 || "INVALID_REFRESH_TOKEN" === _e10)) {
  11970. _context8.next = 20;
  11971. break;
  11972. }
  11973. if (!(this._cache.getStore(s) === We.ANONYMOUS && "INVALID_REFRESH_TOKEN" === _e10)) {
  11974. _context8.next = 19;
  11975. break;
  11976. }
  11977. _e11 = this._cache.getStore(r);
  11978. _t7 = this._cache.getStore(n);
  11979. _context8.next = 17;
  11980. return this.send("auth.signInAnonymously", {
  11981. anonymous_uuid: _e11,
  11982. refresh_token: _t7
  11983. });
  11984. case 17:
  11985. _s8 = _context8.sent;
  11986. return _context8.abrupt("return", (this.setRefreshToken(_s8.refresh_token), this._refreshAccessToken()));
  11987. case 19:
  11988. qe(Ke), this._cache.removeStore(n);
  11989. case 20:
  11990. throw new te({
  11991. code: a.data.code,
  11992. message: "\u5237\u65B0access token\u5931\u8D25\uFF1A".concat(a.data.code)
  11993. });
  11994. case 21:
  11995. if (!a.data.access_token) {
  11996. _context8.next = 23;
  11997. break;
  11998. }
  11999. return _context8.abrupt("return", (qe(Be), this._cache.setStore(e, a.data.access_token), this._cache.setStore(t, a.data.access_token_expire + Date.now()), {
  12000. accessToken: a.data.access_token,
  12001. accessTokenExpire: a.data.access_token_expire
  12002. }));
  12003. case 23:
  12004. a.data.refresh_token && (this._cache.removeStore(n), this._cache.setStore(n, a.data.refresh_token), this._refreshAccessToken());
  12005. case 24:
  12006. case "end":
  12007. return _context8.stop();
  12008. }
  12009. }
  12010. }, _callee8, this);
  12011. }));
  12012. function _refreshAccessToken() {
  12013. return _refreshAccessToken3.apply(this, arguments);
  12014. }
  12015. return _refreshAccessToken;
  12016. }()
  12017. }, {
  12018. key: "getAccessToken",
  12019. value: function () {
  12020. var _getAccessToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  12021. var _this$_cache$keys2, e, t, n, s, r, i;
  12022. return _regenerator.default.wrap(function _callee9$(_context9) {
  12023. while (1) {
  12024. switch (_context9.prev = _context9.next) {
  12025. case 0:
  12026. _this$_cache$keys2 = this._cache.keys, e = _this$_cache$keys2.accessTokenKey, t = _this$_cache$keys2.accessTokenExpireKey, n = _this$_cache$keys2.refreshTokenKey;
  12027. if (this._cache.getStore(n)) {
  12028. _context9.next = 3;
  12029. break;
  12030. }
  12031. throw new te({
  12032. message: "refresh token不存在,登录状态异常"
  12033. });
  12034. case 3:
  12035. s = this._cache.getStore(e), r = this._cache.getStore(t), i = !0;
  12036. _context9.t0 = this._shouldRefreshAccessTokenHook;
  12037. if (!_context9.t0) {
  12038. _context9.next = 9;
  12039. break;
  12040. }
  12041. _context9.next = 8;
  12042. return this._shouldRefreshAccessTokenHook(s, r);
  12043. case 8:
  12044. _context9.t0 = !_context9.sent;
  12045. case 9:
  12046. _context9.t1 = _context9.t0;
  12047. if (!_context9.t1) {
  12048. _context9.next = 12;
  12049. break;
  12050. }
  12051. i = !1;
  12052. case 12:
  12053. return _context9.abrupt("return", (!s || !r || r < Date.now()) && i ? this.refreshAccessToken() : {
  12054. accessToken: s,
  12055. accessTokenExpire: r
  12056. });
  12057. case 13:
  12058. case "end":
  12059. return _context9.stop();
  12060. }
  12061. }
  12062. }, _callee9, this);
  12063. }));
  12064. function getAccessToken() {
  12065. return _getAccessToken.apply(this, arguments);
  12066. }
  12067. return getAccessToken;
  12068. }()
  12069. }, {
  12070. key: "request",
  12071. value: function () {
  12072. var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(e, t, n) {
  12073. var s, r, i, _e12, o, _e13, _e14, a, c, u, l, h, d, p, f, g;
  12074. return _regenerator.default.wrap(function _callee10$(_context10) {
  12075. while (1) {
  12076. switch (_context10.prev = _context10.next) {
  12077. case 0:
  12078. s = "x-tcb-trace_".concat(this.config.env);
  12079. r = "application/x-www-form-urlencoded";
  12080. i = _objectSpread({
  12081. action: e,
  12082. env: this.config.env,
  12083. dataVersion: "2019-08-16"
  12084. }, t);
  12085. if (!(-1 === He.indexOf(e))) {
  12086. _context10.next = 10;
  12087. break;
  12088. }
  12089. _e12 = this._cache.keys.refreshTokenKey;
  12090. _context10.t0 = this._cache.getStore(_e12);
  12091. if (!_context10.t0) {
  12092. _context10.next = 10;
  12093. break;
  12094. }
  12095. _context10.next = 9;
  12096. return this.getAccessToken();
  12097. case 9:
  12098. i.access_token = _context10.sent.accessToken;
  12099. case 10:
  12100. if ("storage.uploadFile" === e) {
  12101. o = new FormData();
  12102. for (_e13 in o) {
  12103. o.hasOwnProperty(_e13) && void 0 !== o[_e13] && o.append(_e13, i[_e13]);
  12104. }
  12105. r = "multipart/form-data";
  12106. } else {
  12107. r = "application/json", o = {};
  12108. for (_e14 in i) {
  12109. void 0 !== i[_e14] && (o[_e14] = i[_e14]);
  12110. }
  12111. }
  12112. a = {
  12113. headers: {
  12114. "content-type": r
  12115. }
  12116. };
  12117. n && n.timeout && (a.timeout = n.timeout), n && n.onUploadProgress && (a.onUploadProgress = n.onUploadProgress);
  12118. c = this._localCache.getStore(s);
  12119. c && (a.headers["X-TCB-Trace"] = c);
  12120. u = t.parse, l = t.inQuery, h = t.search;
  12121. d = {
  12122. env: this.config.env
  12123. };
  12124. u && (d.parse = !0), l && (d = _objectSpread(_objectSpread({}, l), d));
  12125. p = function (e, t) {
  12126. var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  12127. var s = /\?/.test(t);
  12128. var r = "";
  12129. for (var _e15 in n) {
  12130. "" === r ? !s && (t += "?") : r += "&", r += "".concat(_e15, "=").concat(encodeURIComponent(n[_e15]));
  12131. }
  12132. return /^http(s)?\:\/\//.test(t += r) ? t : "".concat(e).concat(t);
  12133. }(fe, "//tcb-api.tencentcloudapi.com/web", d);
  12134. h && (p += h);
  12135. _context10.next = 22;
  12136. return this.post(_objectSpread({
  12137. url: p,
  12138. data: o
  12139. }, a));
  12140. case 22:
  12141. f = _context10.sent;
  12142. g = f.header && f.header["x-tcb-trace"];
  12143. if (!(g && this._localCache.setStore(s, g), 200 !== Number(f.status) && 200 !== Number(f.statusCode) || !f.data)) {
  12144. _context10.next = 26;
  12145. break;
  12146. }
  12147. throw new te({
  12148. code: "NETWORK_ERROR",
  12149. message: "network request error"
  12150. });
  12151. case 26:
  12152. return _context10.abrupt("return", f);
  12153. case 27:
  12154. case "end":
  12155. return _context10.stop();
  12156. }
  12157. }
  12158. }, _callee10, this);
  12159. }));
  12160. function request(_x5, _x6, _x7) {
  12161. return _request.apply(this, arguments);
  12162. }
  12163. return request;
  12164. }()
  12165. }, {
  12166. key: "send",
  12167. value: function () {
  12168. var _send = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(e) {
  12169. var t,
  12170. n,
  12171. s,
  12172. _s9,
  12173. _args11 = arguments;
  12174. return _regenerator.default.wrap(function _callee11$(_context11) {
  12175. while (1) {
  12176. switch (_context11.prev = _context11.next) {
  12177. case 0:
  12178. t = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
  12179. n = _args11.length > 2 && _args11[2] !== undefined ? _args11[2] : {};
  12180. _context11.next = 4;
  12181. return this.request(e, t, _objectSpread(_objectSpread({}, n), {}, {
  12182. onUploadProgress: t.onUploadProgress
  12183. }));
  12184. case 4:
  12185. s = _context11.sent;
  12186. if (!("ACCESS_TOKEN_EXPIRED" === s.data.code && -1 === He.indexOf(e))) {
  12187. _context11.next = 14;
  12188. break;
  12189. }
  12190. _context11.next = 8;
  12191. return this.refreshAccessToken();
  12192. case 8:
  12193. _context11.next = 10;
  12194. return this.request(e, t, _objectSpread(_objectSpread({}, n), {}, {
  12195. onUploadProgress: t.onUploadProgress
  12196. }));
  12197. case 10:
  12198. _s9 = _context11.sent;
  12199. if (!_s9.data.code) {
  12200. _context11.next = 13;
  12201. break;
  12202. }
  12203. throw new te({
  12204. code: _s9.data.code,
  12205. message: _s9.data.message
  12206. });
  12207. case 13:
  12208. return _context11.abrupt("return", _s9.data);
  12209. case 14:
  12210. if (!s.data.code) {
  12211. _context11.next = 16;
  12212. break;
  12213. }
  12214. throw new te({
  12215. code: s.data.code,
  12216. message: s.data.message
  12217. });
  12218. case 16:
  12219. return _context11.abrupt("return", s.data);
  12220. case 17:
  12221. case "end":
  12222. return _context11.stop();
  12223. }
  12224. }
  12225. }, _callee11, this);
  12226. }));
  12227. function send(_x8) {
  12228. return _send.apply(this, arguments);
  12229. }
  12230. return send;
  12231. }()
  12232. }, {
  12233. key: "setRefreshToken",
  12234. value: function setRefreshToken(e) {
  12235. var _this$_cache$keys3 = this._cache.keys,
  12236. t = _this$_cache$keys3.accessTokenKey,
  12237. n = _this$_cache$keys3.accessTokenExpireKey,
  12238. s = _this$_cache$keys3.refreshTokenKey;
  12239. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  12240. }
  12241. }]);
  12242. return Ge;
  12243. }();
  12244. var Ye = {};
  12245. function Qe(e) {
  12246. return Ye[e];
  12247. }
  12248. var Xe = /*#__PURE__*/function () {
  12249. function Xe(e) {
  12250. (0, _classCallCheck2.default)(this, Xe);
  12251. this.config = e, this._cache = Le(e.env), this._request = Qe(e.env);
  12252. }
  12253. (0, _createClass2.default)(Xe, [{
  12254. key: "setRefreshToken",
  12255. value: function setRefreshToken(e) {
  12256. var _this$_cache$keys4 = this._cache.keys,
  12257. t = _this$_cache$keys4.accessTokenKey,
  12258. n = _this$_cache$keys4.accessTokenExpireKey,
  12259. s = _this$_cache$keys4.refreshTokenKey;
  12260. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  12261. }
  12262. }, {
  12263. key: "setAccessToken",
  12264. value: function setAccessToken(e, t) {
  12265. var _this$_cache$keys5 = this._cache.keys,
  12266. n = _this$_cache$keys5.accessTokenKey,
  12267. s = _this$_cache$keys5.accessTokenExpireKey;
  12268. this._cache.setStore(n, e), this._cache.setStore(s, t);
  12269. }
  12270. }, {
  12271. key: "refreshUserInfo",
  12272. value: function () {
  12273. var _refreshUserInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
  12274. var _yield$this$_request$, e;
  12275. return _regenerator.default.wrap(function _callee12$(_context12) {
  12276. while (1) {
  12277. switch (_context12.prev = _context12.next) {
  12278. case 0:
  12279. _context12.next = 2;
  12280. return this._request.send("auth.getUserInfo", {});
  12281. case 2:
  12282. _yield$this$_request$ = _context12.sent;
  12283. e = _yield$this$_request$.data;
  12284. return _context12.abrupt("return", (this.setLocalUserInfo(e), e));
  12285. case 5:
  12286. case "end":
  12287. return _context12.stop();
  12288. }
  12289. }
  12290. }, _callee12, this);
  12291. }));
  12292. function refreshUserInfo() {
  12293. return _refreshUserInfo.apply(this, arguments);
  12294. }
  12295. return refreshUserInfo;
  12296. }()
  12297. }, {
  12298. key: "setLocalUserInfo",
  12299. value: function setLocalUserInfo(e) {
  12300. var t = this._cache.keys.userInfoKey;
  12301. this._cache.setStore(t, e);
  12302. }
  12303. }]);
  12304. return Xe;
  12305. }();
  12306. var Ze = /*#__PURE__*/function () {
  12307. function Ze(e) {
  12308. (0, _classCallCheck2.default)(this, Ze);
  12309. if (!e) throw new te({
  12310. code: "PARAM_ERROR",
  12311. message: "envId is not defined"
  12312. });
  12313. this._envId = e, this._cache = Le(this._envId), this._request = Qe(this._envId), this.setUserInfo();
  12314. }
  12315. (0, _createClass2.default)(Ze, [{
  12316. key: "linkWithTicket",
  12317. value: function linkWithTicket(e) {
  12318. if ("string" != typeof e) throw new te({
  12319. code: "PARAM_ERROR",
  12320. message: "ticket must be string"
  12321. });
  12322. return this._request.send("auth.linkWithTicket", {
  12323. ticket: e
  12324. });
  12325. }
  12326. }, {
  12327. key: "linkWithRedirect",
  12328. value: function linkWithRedirect(e) {
  12329. e.signInWithRedirect();
  12330. }
  12331. }, {
  12332. key: "updatePassword",
  12333. value: function updatePassword(e, t) {
  12334. return this._request.send("auth.updatePassword", {
  12335. oldPassword: t,
  12336. newPassword: e
  12337. });
  12338. }
  12339. }, {
  12340. key: "updateEmail",
  12341. value: function updateEmail(e) {
  12342. return this._request.send("auth.updateEmail", {
  12343. newEmail: e
  12344. });
  12345. }
  12346. }, {
  12347. key: "updateUsername",
  12348. value: function updateUsername(e) {
  12349. if ("string" != typeof e) throw new te({
  12350. code: "PARAM_ERROR",
  12351. message: "username must be a string"
  12352. });
  12353. return this._request.send("auth.updateUsername", {
  12354. username: e
  12355. });
  12356. }
  12357. }, {
  12358. key: "getLinkedUidList",
  12359. value: function () {
  12360. var _getLinkedUidList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
  12361. var _yield$this$_request$2, e, t, n;
  12362. return _regenerator.default.wrap(function _callee13$(_context13) {
  12363. while (1) {
  12364. switch (_context13.prev = _context13.next) {
  12365. case 0:
  12366. _context13.next = 2;
  12367. return this._request.send("auth.getLinkedUidList", {});
  12368. case 2:
  12369. _yield$this$_request$2 = _context13.sent;
  12370. e = _yield$this$_request$2.data;
  12371. t = !1;
  12372. n = e.users;
  12373. return _context13.abrupt("return", (n.forEach(function (e) {
  12374. e.wxOpenId && e.wxPublicId && (t = !0);
  12375. }), {
  12376. users: n,
  12377. hasPrimaryUid: t
  12378. }));
  12379. case 7:
  12380. case "end":
  12381. return _context13.stop();
  12382. }
  12383. }
  12384. }, _callee13, this);
  12385. }));
  12386. function getLinkedUidList() {
  12387. return _getLinkedUidList.apply(this, arguments);
  12388. }
  12389. return getLinkedUidList;
  12390. }()
  12391. }, {
  12392. key: "setPrimaryUid",
  12393. value: function setPrimaryUid(e) {
  12394. return this._request.send("auth.setPrimaryUid", {
  12395. uid: e
  12396. });
  12397. }
  12398. }, {
  12399. key: "unlink",
  12400. value: function unlink(e) {
  12401. return this._request.send("auth.unlink", {
  12402. platform: e
  12403. });
  12404. }
  12405. }, {
  12406. key: "update",
  12407. value: function () {
  12408. var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(e) {
  12409. var t, n, s, r, i, o, _yield$this$_request$3, a;
  12410. return _regenerator.default.wrap(function _callee14$(_context14) {
  12411. while (1) {
  12412. switch (_context14.prev = _context14.next) {
  12413. case 0:
  12414. t = e.nickName;
  12415. n = e.gender;
  12416. s = e.avatarUrl;
  12417. r = e.province;
  12418. i = e.country;
  12419. o = e.city;
  12420. _context14.next = 8;
  12421. return this._request.send("auth.updateUserInfo", {
  12422. nickName: t,
  12423. gender: n,
  12424. avatarUrl: s,
  12425. province: r,
  12426. country: i,
  12427. city: o
  12428. });
  12429. case 8:
  12430. _yield$this$_request$3 = _context14.sent;
  12431. a = _yield$this$_request$3.data;
  12432. this.setLocalUserInfo(a);
  12433. case 11:
  12434. case "end":
  12435. return _context14.stop();
  12436. }
  12437. }
  12438. }, _callee14, this);
  12439. }));
  12440. function update(_x9) {
  12441. return _update.apply(this, arguments);
  12442. }
  12443. return update;
  12444. }()
  12445. }, {
  12446. key: "refresh",
  12447. value: function () {
  12448. var _refresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
  12449. var _yield$this$_request$4, e;
  12450. return _regenerator.default.wrap(function _callee15$(_context15) {
  12451. while (1) {
  12452. switch (_context15.prev = _context15.next) {
  12453. case 0:
  12454. _context15.next = 2;
  12455. return this._request.send("auth.getUserInfo", {});
  12456. case 2:
  12457. _yield$this$_request$4 = _context15.sent;
  12458. e = _yield$this$_request$4.data;
  12459. return _context15.abrupt("return", (this.setLocalUserInfo(e), e));
  12460. case 5:
  12461. case "end":
  12462. return _context15.stop();
  12463. }
  12464. }
  12465. }, _callee15, this);
  12466. }));
  12467. function refresh() {
  12468. return _refresh.apply(this, arguments);
  12469. }
  12470. return refresh;
  12471. }()
  12472. }, {
  12473. key: "setUserInfo",
  12474. value: function setUserInfo() {
  12475. var _this8 = this;
  12476. var e = this._cache.keys.userInfoKey,
  12477. t = this._cache.getStore(e);
  12478. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach(function (e) {
  12479. _this8[e] = t[e];
  12480. }), this.location = {
  12481. country: t.country,
  12482. province: t.province,
  12483. city: t.city
  12484. };
  12485. }
  12486. }, {
  12487. key: "setLocalUserInfo",
  12488. value: function setLocalUserInfo(e) {
  12489. var t = this._cache.keys.userInfoKey;
  12490. this._cache.setStore(t, e), this.setUserInfo();
  12491. }
  12492. }]);
  12493. return Ze;
  12494. }();
  12495. var et = /*#__PURE__*/function () {
  12496. function et(e) {
  12497. (0, _classCallCheck2.default)(this, et);
  12498. if (!e) throw new te({
  12499. code: "PARAM_ERROR",
  12500. message: "envId is not defined"
  12501. });
  12502. this._cache = Le(e);
  12503. var _this$_cache$keys6 = this._cache.keys,
  12504. t = _this$_cache$keys6.refreshTokenKey,
  12505. n = _this$_cache$keys6.accessTokenKey,
  12506. s = _this$_cache$keys6.accessTokenExpireKey,
  12507. r = this._cache.getStore(t),
  12508. i = this._cache.getStore(n),
  12509. o = this._cache.getStore(s);
  12510. this.credential = {
  12511. refreshToken: r,
  12512. accessToken: i,
  12513. accessTokenExpire: o
  12514. }, this.user = new Ze(e);
  12515. }
  12516. (0, _createClass2.default)(et, [{
  12517. key: "isAnonymousAuth",
  12518. get: function get() {
  12519. return this.loginType === We.ANONYMOUS;
  12520. }
  12521. }, {
  12522. key: "isCustomAuth",
  12523. get: function get() {
  12524. return this.loginType === We.CUSTOM;
  12525. }
  12526. }, {
  12527. key: "isWeixinAuth",
  12528. get: function get() {
  12529. return this.loginType === We.WECHAT || this.loginType === We.WECHAT_OPEN || this.loginType === We.WECHAT_PUBLIC;
  12530. }
  12531. }, {
  12532. key: "loginType",
  12533. get: function get() {
  12534. return this._cache.getStore(this._cache.keys.loginTypeKey);
  12535. }
  12536. }]);
  12537. return et;
  12538. }();
  12539. var tt = /*#__PURE__*/function (_Xe) {
  12540. (0, _inherits2.default)(tt, _Xe);
  12541. var _super4 = _createSuper(tt);
  12542. function tt() {
  12543. (0, _classCallCheck2.default)(this, tt);
  12544. return _super4.apply(this, arguments);
  12545. }
  12546. (0, _createClass2.default)(tt, [{
  12547. key: "signIn",
  12548. value: function () {
  12549. var _signIn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
  12550. var _this$_cache$keys7, e, t, n, s, r, _e16;
  12551. return _regenerator.default.wrap(function _callee16$(_context16) {
  12552. while (1) {
  12553. switch (_context16.prev = _context16.next) {
  12554. case 0:
  12555. this._cache.updatePersistence("local");
  12556. _this$_cache$keys7 = this._cache.keys;
  12557. e = _this$_cache$keys7.anonymousUuidKey;
  12558. t = _this$_cache$keys7.refreshTokenKey;
  12559. n = this._cache.getStore(e) || void 0;
  12560. s = this._cache.getStore(t) || void 0;
  12561. _context16.next = 8;
  12562. return this._request.send("auth.signInAnonymously", {
  12563. anonymous_uuid: n,
  12564. refresh_token: s
  12565. });
  12566. case 8:
  12567. r = _context16.sent;
  12568. if (!(r.uuid && r.refresh_token)) {
  12569. _context16.next = 20;
  12570. break;
  12571. }
  12572. this._setAnonymousUUID(r.uuid);
  12573. this.setRefreshToken(r.refresh_token);
  12574. _context16.next = 14;
  12575. return this._request.refreshAccessToken();
  12576. case 14:
  12577. qe(Fe);
  12578. qe(je, {
  12579. env: this.config.env,
  12580. loginType: We.ANONYMOUS,
  12581. persistence: "local"
  12582. });
  12583. _e16 = new et(this.config.env);
  12584. _context16.next = 19;
  12585. return _e16.user.refresh();
  12586. case 19:
  12587. return _context16.abrupt("return", _e16);
  12588. case 20:
  12589. throw new te({
  12590. message: "匿名登录失败"
  12591. });
  12592. case 21:
  12593. case "end":
  12594. return _context16.stop();
  12595. }
  12596. }
  12597. }, _callee16, this);
  12598. }));
  12599. function signIn() {
  12600. return _signIn.apply(this, arguments);
  12601. }
  12602. return signIn;
  12603. }()
  12604. }, {
  12605. key: "linkAndRetrieveDataWithTicket",
  12606. value: function () {
  12607. var _linkAndRetrieveDataWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(e) {
  12608. var _this$_cache$keys8, t, n, s, r, i;
  12609. return _regenerator.default.wrap(function _callee17$(_context17) {
  12610. while (1) {
  12611. switch (_context17.prev = _context17.next) {
  12612. case 0:
  12613. _this$_cache$keys8 = this._cache.keys;
  12614. t = _this$_cache$keys8.anonymousUuidKey;
  12615. n = _this$_cache$keys8.refreshTokenKey;
  12616. s = this._cache.getStore(t);
  12617. r = this._cache.getStore(n);
  12618. _context17.next = 7;
  12619. return this._request.send("auth.linkAndRetrieveDataWithTicket", {
  12620. anonymous_uuid: s,
  12621. refresh_token: r,
  12622. ticket: e
  12623. });
  12624. case 7:
  12625. i = _context17.sent;
  12626. if (!i.refresh_token) {
  12627. _context17.next = 16;
  12628. break;
  12629. }
  12630. this._clearAnonymousUUID();
  12631. this.setRefreshToken(i.refresh_token);
  12632. _context17.next = 13;
  12633. return this._request.refreshAccessToken();
  12634. case 13:
  12635. qe($e, {
  12636. env: this.config.env
  12637. });
  12638. qe(je, {
  12639. loginType: We.CUSTOM,
  12640. persistence: "local"
  12641. });
  12642. return _context17.abrupt("return", {
  12643. credential: {
  12644. refreshToken: i.refresh_token
  12645. }
  12646. });
  12647. case 16:
  12648. throw new te({
  12649. message: "匿名转化失败"
  12650. });
  12651. case 17:
  12652. case "end":
  12653. return _context17.stop();
  12654. }
  12655. }
  12656. }, _callee17, this);
  12657. }));
  12658. function linkAndRetrieveDataWithTicket(_x10) {
  12659. return _linkAndRetrieveDataWithTicket.apply(this, arguments);
  12660. }
  12661. return linkAndRetrieveDataWithTicket;
  12662. }()
  12663. }, {
  12664. key: "_setAnonymousUUID",
  12665. value: function _setAnonymousUUID(e) {
  12666. var _this$_cache$keys9 = this._cache.keys,
  12667. t = _this$_cache$keys9.anonymousUuidKey,
  12668. n = _this$_cache$keys9.loginTypeKey;
  12669. this._cache.removeStore(t), this._cache.setStore(t, e), this._cache.setStore(n, We.ANONYMOUS);
  12670. }
  12671. }, {
  12672. key: "_clearAnonymousUUID",
  12673. value: function _clearAnonymousUUID() {
  12674. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  12675. }
  12676. }]);
  12677. return tt;
  12678. }(Xe);
  12679. var nt = /*#__PURE__*/function (_Xe2) {
  12680. (0, _inherits2.default)(nt, _Xe2);
  12681. var _super5 = _createSuper(nt);
  12682. function nt() {
  12683. (0, _classCallCheck2.default)(this, nt);
  12684. return _super5.apply(this, arguments);
  12685. }
  12686. (0, _createClass2.default)(nt, [{
  12687. key: "signIn",
  12688. value: function () {
  12689. var _signIn2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(e) {
  12690. var t, n;
  12691. return _regenerator.default.wrap(function _callee18$(_context18) {
  12692. while (1) {
  12693. switch (_context18.prev = _context18.next) {
  12694. case 0:
  12695. if (!("string" != typeof e)) {
  12696. _context18.next = 2;
  12697. break;
  12698. }
  12699. throw new te({
  12700. code: "PARAM_ERROR",
  12701. message: "ticket must be a string"
  12702. });
  12703. case 2:
  12704. t = this._cache.keys.refreshTokenKey;
  12705. _context18.next = 5;
  12706. return this._request.send("auth.signInWithTicket", {
  12707. ticket: e,
  12708. refresh_token: this._cache.getStore(t) || ""
  12709. });
  12710. case 5:
  12711. n = _context18.sent;
  12712. if (!n.refresh_token) {
  12713. _context18.next = 15;
  12714. break;
  12715. }
  12716. this.setRefreshToken(n.refresh_token);
  12717. _context18.next = 10;
  12718. return this._request.refreshAccessToken();
  12719. case 10:
  12720. qe(Fe);
  12721. qe(je, {
  12722. env: this.config.env,
  12723. loginType: We.CUSTOM,
  12724. persistence: this.config.persistence
  12725. });
  12726. _context18.next = 14;
  12727. return this.refreshUserInfo();
  12728. case 14:
  12729. return _context18.abrupt("return", new et(this.config.env));
  12730. case 15:
  12731. throw new te({
  12732. message: "自定义登录失败"
  12733. });
  12734. case 16:
  12735. case "end":
  12736. return _context18.stop();
  12737. }
  12738. }
  12739. }, _callee18, this);
  12740. }));
  12741. function signIn(_x11) {
  12742. return _signIn2.apply(this, arguments);
  12743. }
  12744. return signIn;
  12745. }()
  12746. }]);
  12747. return nt;
  12748. }(Xe);
  12749. var st = /*#__PURE__*/function (_Xe3) {
  12750. (0, _inherits2.default)(st, _Xe3);
  12751. var _super6 = _createSuper(st);
  12752. function st() {
  12753. (0, _classCallCheck2.default)(this, st);
  12754. return _super6.apply(this, arguments);
  12755. }
  12756. (0, _createClass2.default)(st, [{
  12757. key: "signIn",
  12758. value: function () {
  12759. var _signIn3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(e, t) {
  12760. var n, s, r, i, o;
  12761. return _regenerator.default.wrap(function _callee19$(_context19) {
  12762. while (1) {
  12763. switch (_context19.prev = _context19.next) {
  12764. case 0:
  12765. if (!("string" != typeof e)) {
  12766. _context19.next = 2;
  12767. break;
  12768. }
  12769. throw new te({
  12770. code: "PARAM_ERROR",
  12771. message: "email must be a string"
  12772. });
  12773. case 2:
  12774. n = this._cache.keys.refreshTokenKey;
  12775. _context19.next = 5;
  12776. return this._request.send("auth.signIn", {
  12777. loginType: "EMAIL",
  12778. email: e,
  12779. password: t,
  12780. refresh_token: this._cache.getStore(n) || ""
  12781. });
  12782. case 5:
  12783. s = _context19.sent;
  12784. r = s.refresh_token;
  12785. i = s.access_token;
  12786. o = s.access_token_expire;
  12787. if (!r) {
  12788. _context19.next = 22;
  12789. break;
  12790. }
  12791. this.setRefreshToken(r);
  12792. if (!(i && o)) {
  12793. _context19.next = 15;
  12794. break;
  12795. }
  12796. this.setAccessToken(i, o);
  12797. _context19.next = 17;
  12798. break;
  12799. case 15:
  12800. _context19.next = 17;
  12801. return this._request.refreshAccessToken();
  12802. case 17:
  12803. _context19.next = 19;
  12804. return this.refreshUserInfo();
  12805. case 19:
  12806. qe(Fe);
  12807. qe(je, {
  12808. env: this.config.env,
  12809. loginType: We.EMAIL,
  12810. persistence: this.config.persistence
  12811. });
  12812. return _context19.abrupt("return", new et(this.config.env));
  12813. case 22:
  12814. throw s.code ? new te({
  12815. code: s.code,
  12816. message: "\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  12817. }) : new te({
  12818. message: "邮箱登录失败"
  12819. });
  12820. case 23:
  12821. case "end":
  12822. return _context19.stop();
  12823. }
  12824. }
  12825. }, _callee19, this);
  12826. }));
  12827. function signIn(_x12, _x13) {
  12828. return _signIn3.apply(this, arguments);
  12829. }
  12830. return signIn;
  12831. }()
  12832. }, {
  12833. key: "activate",
  12834. value: function () {
  12835. var _activate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(e) {
  12836. return _regenerator.default.wrap(function _callee20$(_context20) {
  12837. while (1) {
  12838. switch (_context20.prev = _context20.next) {
  12839. case 0:
  12840. return _context20.abrupt("return", this._request.send("auth.activateEndUserMail", {
  12841. token: e
  12842. }));
  12843. case 1:
  12844. case "end":
  12845. return _context20.stop();
  12846. }
  12847. }
  12848. }, _callee20, this);
  12849. }));
  12850. function activate(_x14) {
  12851. return _activate.apply(this, arguments);
  12852. }
  12853. return activate;
  12854. }()
  12855. }, {
  12856. key: "resetPasswordWithToken",
  12857. value: function () {
  12858. var _resetPasswordWithToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(e, t) {
  12859. return _regenerator.default.wrap(function _callee21$(_context21) {
  12860. while (1) {
  12861. switch (_context21.prev = _context21.next) {
  12862. case 0:
  12863. return _context21.abrupt("return", this._request.send("auth.resetPasswordWithToken", {
  12864. token: e,
  12865. newPassword: t
  12866. }));
  12867. case 1:
  12868. case "end":
  12869. return _context21.stop();
  12870. }
  12871. }
  12872. }, _callee21, this);
  12873. }));
  12874. function resetPasswordWithToken(_x15, _x16) {
  12875. return _resetPasswordWithToken.apply(this, arguments);
  12876. }
  12877. return resetPasswordWithToken;
  12878. }()
  12879. }]);
  12880. return st;
  12881. }(Xe);
  12882. var rt = /*#__PURE__*/function (_Xe4) {
  12883. (0, _inherits2.default)(rt, _Xe4);
  12884. var _super7 = _createSuper(rt);
  12885. function rt() {
  12886. (0, _classCallCheck2.default)(this, rt);
  12887. return _super7.apply(this, arguments);
  12888. }
  12889. (0, _createClass2.default)(rt, [{
  12890. key: "signIn",
  12891. value: function () {
  12892. var _signIn4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(e, t) {
  12893. var n, s, r, i, o;
  12894. return _regenerator.default.wrap(function _callee22$(_context22) {
  12895. while (1) {
  12896. switch (_context22.prev = _context22.next) {
  12897. case 0:
  12898. if (!("string" != typeof e)) {
  12899. _context22.next = 2;
  12900. break;
  12901. }
  12902. throw new te({
  12903. code: "PARAM_ERROR",
  12904. message: "username must be a string"
  12905. });
  12906. case 2:
  12907. "string" != typeof t && (t = "", console.warn("password is empty"));
  12908. n = this._cache.keys.refreshTokenKey;
  12909. _context22.next = 6;
  12910. return this._request.send("auth.signIn", {
  12911. loginType: We.USERNAME,
  12912. username: e,
  12913. password: t,
  12914. refresh_token: this._cache.getStore(n) || ""
  12915. });
  12916. case 6:
  12917. s = _context22.sent;
  12918. r = s.refresh_token;
  12919. i = s.access_token_expire;
  12920. o = s.access_token;
  12921. if (!r) {
  12922. _context22.next = 23;
  12923. break;
  12924. }
  12925. this.setRefreshToken(r);
  12926. if (!(o && i)) {
  12927. _context22.next = 16;
  12928. break;
  12929. }
  12930. this.setAccessToken(o, i);
  12931. _context22.next = 18;
  12932. break;
  12933. case 16:
  12934. _context22.next = 18;
  12935. return this._request.refreshAccessToken();
  12936. case 18:
  12937. _context22.next = 20;
  12938. return this.refreshUserInfo();
  12939. case 20:
  12940. qe(Fe);
  12941. qe(je, {
  12942. env: this.config.env,
  12943. loginType: We.USERNAME,
  12944. persistence: this.config.persistence
  12945. });
  12946. return _context22.abrupt("return", new et(this.config.env));
  12947. case 23:
  12948. throw s.code ? new te({
  12949. code: s.code,
  12950. message: "\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  12951. }) : new te({
  12952. message: "用户名密码登录失败"
  12953. });
  12954. case 24:
  12955. case "end":
  12956. return _context22.stop();
  12957. }
  12958. }
  12959. }, _callee22, this);
  12960. }));
  12961. function signIn(_x17, _x18) {
  12962. return _signIn4.apply(this, arguments);
  12963. }
  12964. return signIn;
  12965. }()
  12966. }]);
  12967. return rt;
  12968. }(Xe);
  12969. var it = /*#__PURE__*/function () {
  12970. function it(e) {
  12971. (0, _classCallCheck2.default)(this, it);
  12972. this.config = e, this._cache = Le(e.env), this._request = Qe(e.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), De(je, this._onLoginTypeChanged);
  12973. }
  12974. (0, _createClass2.default)(it, [{
  12975. key: "currentUser",
  12976. get: function get() {
  12977. var e = this.hasLoginState();
  12978. return e && e.user || null;
  12979. }
  12980. }, {
  12981. key: "loginType",
  12982. get: function get() {
  12983. return this._cache.getStore(this._cache.keys.loginTypeKey);
  12984. }
  12985. }, {
  12986. key: "anonymousAuthProvider",
  12987. value: function anonymousAuthProvider() {
  12988. return new tt(this.config);
  12989. }
  12990. }, {
  12991. key: "customAuthProvider",
  12992. value: function customAuthProvider() {
  12993. return new nt(this.config);
  12994. }
  12995. }, {
  12996. key: "emailAuthProvider",
  12997. value: function emailAuthProvider() {
  12998. return new st(this.config);
  12999. }
  13000. }, {
  13001. key: "usernameAuthProvider",
  13002. value: function usernameAuthProvider() {
  13003. return new rt(this.config);
  13004. }
  13005. }, {
  13006. key: "signInAnonymously",
  13007. value: function () {
  13008. var _signInAnonymously = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
  13009. return _regenerator.default.wrap(function _callee23$(_context23) {
  13010. while (1) {
  13011. switch (_context23.prev = _context23.next) {
  13012. case 0:
  13013. return _context23.abrupt("return", new tt(this.config).signIn());
  13014. case 1:
  13015. case "end":
  13016. return _context23.stop();
  13017. }
  13018. }
  13019. }, _callee23, this);
  13020. }));
  13021. function signInAnonymously() {
  13022. return _signInAnonymously.apply(this, arguments);
  13023. }
  13024. return signInAnonymously;
  13025. }()
  13026. }, {
  13027. key: "signInWithEmailAndPassword",
  13028. value: function () {
  13029. var _signInWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(e, t) {
  13030. return _regenerator.default.wrap(function _callee24$(_context24) {
  13031. while (1) {
  13032. switch (_context24.prev = _context24.next) {
  13033. case 0:
  13034. return _context24.abrupt("return", new st(this.config).signIn(e, t));
  13035. case 1:
  13036. case "end":
  13037. return _context24.stop();
  13038. }
  13039. }
  13040. }, _callee24, this);
  13041. }));
  13042. function signInWithEmailAndPassword(_x19, _x20) {
  13043. return _signInWithEmailAndPassword.apply(this, arguments);
  13044. }
  13045. return signInWithEmailAndPassword;
  13046. }()
  13047. }, {
  13048. key: "signInWithUsernameAndPassword",
  13049. value: function signInWithUsernameAndPassword(e, t) {
  13050. return new rt(this.config).signIn(e, t);
  13051. }
  13052. }, {
  13053. key: "linkAndRetrieveDataWithTicket",
  13054. value: function () {
  13055. var _linkAndRetrieveDataWithTicket2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(e) {
  13056. return _regenerator.default.wrap(function _callee25$(_context25) {
  13057. while (1) {
  13058. switch (_context25.prev = _context25.next) {
  13059. case 0:
  13060. this._anonymousAuthProvider || (this._anonymousAuthProvider = new tt(this.config)), De($e, this._onAnonymousConverted);
  13061. _context25.next = 3;
  13062. return this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);
  13063. case 3:
  13064. return _context25.abrupt("return", _context25.sent);
  13065. case 4:
  13066. case "end":
  13067. return _context25.stop();
  13068. }
  13069. }
  13070. }, _callee25, this);
  13071. }));
  13072. function linkAndRetrieveDataWithTicket(_x21) {
  13073. return _linkAndRetrieveDataWithTicket2.apply(this, arguments);
  13074. }
  13075. return linkAndRetrieveDataWithTicket;
  13076. }()
  13077. }, {
  13078. key: "signOut",
  13079. value: function () {
  13080. var _signOut = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
  13081. var _this$_cache$keys10, e, t, n, s, r;
  13082. return _regenerator.default.wrap(function _callee26$(_context26) {
  13083. while (1) {
  13084. switch (_context26.prev = _context26.next) {
  13085. case 0:
  13086. if (!(this.loginType === We.ANONYMOUS)) {
  13087. _context26.next = 2;
  13088. break;
  13089. }
  13090. throw new te({
  13091. message: "匿名用户不支持登出操作"
  13092. });
  13093. case 2:
  13094. _this$_cache$keys10 = this._cache.keys, e = _this$_cache$keys10.refreshTokenKey, t = _this$_cache$keys10.accessTokenKey, n = _this$_cache$keys10.accessTokenExpireKey, s = this._cache.getStore(e);
  13095. if (s) {
  13096. _context26.next = 5;
  13097. break;
  13098. }
  13099. return _context26.abrupt("return");
  13100. case 5:
  13101. _context26.next = 7;
  13102. return this._request.send("auth.logout", {
  13103. refresh_token: s
  13104. });
  13105. case 7:
  13106. r = _context26.sent;
  13107. return _context26.abrupt("return", (this._cache.removeStore(e), this._cache.removeStore(t), this._cache.removeStore(n), qe(Fe), qe(je, {
  13108. env: this.config.env,
  13109. loginType: We.NULL,
  13110. persistence: this.config.persistence
  13111. }), r));
  13112. case 9:
  13113. case "end":
  13114. return _context26.stop();
  13115. }
  13116. }
  13117. }, _callee26, this);
  13118. }));
  13119. function signOut() {
  13120. return _signOut.apply(this, arguments);
  13121. }
  13122. return signOut;
  13123. }()
  13124. }, {
  13125. key: "signUpWithEmailAndPassword",
  13126. value: function () {
  13127. var _signUpWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(e, t) {
  13128. return _regenerator.default.wrap(function _callee27$(_context27) {
  13129. while (1) {
  13130. switch (_context27.prev = _context27.next) {
  13131. case 0:
  13132. return _context27.abrupt("return", this._request.send("auth.signUpWithEmailAndPassword", {
  13133. email: e,
  13134. password: t
  13135. }));
  13136. case 1:
  13137. case "end":
  13138. return _context27.stop();
  13139. }
  13140. }
  13141. }, _callee27, this);
  13142. }));
  13143. function signUpWithEmailAndPassword(_x22, _x23) {
  13144. return _signUpWithEmailAndPassword.apply(this, arguments);
  13145. }
  13146. return signUpWithEmailAndPassword;
  13147. }()
  13148. }, {
  13149. key: "sendPasswordResetEmail",
  13150. value: function () {
  13151. var _sendPasswordResetEmail = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(e) {
  13152. return _regenerator.default.wrap(function _callee28$(_context28) {
  13153. while (1) {
  13154. switch (_context28.prev = _context28.next) {
  13155. case 0:
  13156. return _context28.abrupt("return", this._request.send("auth.sendPasswordResetEmail", {
  13157. email: e
  13158. }));
  13159. case 1:
  13160. case "end":
  13161. return _context28.stop();
  13162. }
  13163. }
  13164. }, _callee28, this);
  13165. }));
  13166. function sendPasswordResetEmail(_x24) {
  13167. return _sendPasswordResetEmail.apply(this, arguments);
  13168. }
  13169. return sendPasswordResetEmail;
  13170. }()
  13171. }, {
  13172. key: "onLoginStateChanged",
  13173. value: function onLoginStateChanged(e) {
  13174. var _this9 = this;
  13175. De(Fe, function () {
  13176. var t = _this9.hasLoginState();
  13177. e.call(_this9, t);
  13178. });
  13179. var t = this.hasLoginState();
  13180. e.call(this, t);
  13181. }
  13182. }, {
  13183. key: "onLoginStateExpired",
  13184. value: function onLoginStateExpired(e) {
  13185. De(Ke, e.bind(this));
  13186. }
  13187. }, {
  13188. key: "onAccessTokenRefreshed",
  13189. value: function onAccessTokenRefreshed(e) {
  13190. De(Be, e.bind(this));
  13191. }
  13192. }, {
  13193. key: "onAnonymousConverted",
  13194. value: function onAnonymousConverted(e) {
  13195. De($e, e.bind(this));
  13196. }
  13197. }, {
  13198. key: "onLoginTypeChanged",
  13199. value: function onLoginTypeChanged(e) {
  13200. var _this10 = this;
  13201. De(je, function () {
  13202. var t = _this10.hasLoginState();
  13203. e.call(_this10, t);
  13204. });
  13205. }
  13206. }, {
  13207. key: "getAccessToken",
  13208. value: function () {
  13209. var _getAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
  13210. return _regenerator.default.wrap(function _callee29$(_context29) {
  13211. while (1) {
  13212. switch (_context29.prev = _context29.next) {
  13213. case 0:
  13214. _context29.next = 2;
  13215. return this._request.getAccessToken();
  13216. case 2:
  13217. _context29.t0 = _context29.sent.accessToken;
  13218. _context29.t1 = this.config.env;
  13219. return _context29.abrupt("return", {
  13220. accessToken: _context29.t0,
  13221. env: _context29.t1
  13222. });
  13223. case 5:
  13224. case "end":
  13225. return _context29.stop();
  13226. }
  13227. }
  13228. }, _callee29, this);
  13229. }));
  13230. function getAccessToken() {
  13231. return _getAccessToken2.apply(this, arguments);
  13232. }
  13233. return getAccessToken;
  13234. }()
  13235. }, {
  13236. key: "hasLoginState",
  13237. value: function hasLoginState() {
  13238. var e = this._cache.keys.refreshTokenKey;
  13239. return this._cache.getStore(e) ? new et(this.config.env) : null;
  13240. }
  13241. }, {
  13242. key: "isUsernameRegistered",
  13243. value: function () {
  13244. var _isUsernameRegistered = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(e) {
  13245. var _yield$this$_request$5, t;
  13246. return _regenerator.default.wrap(function _callee30$(_context30) {
  13247. while (1) {
  13248. switch (_context30.prev = _context30.next) {
  13249. case 0:
  13250. if (!("string" != typeof e)) {
  13251. _context30.next = 2;
  13252. break;
  13253. }
  13254. throw new te({
  13255. code: "PARAM_ERROR",
  13256. message: "username must be a string"
  13257. });
  13258. case 2:
  13259. _context30.next = 4;
  13260. return this._request.send("auth.isUsernameRegistered", {
  13261. username: e
  13262. });
  13263. case 4:
  13264. _yield$this$_request$5 = _context30.sent;
  13265. t = _yield$this$_request$5.data;
  13266. return _context30.abrupt("return", t && t.isRegistered);
  13267. case 7:
  13268. case "end":
  13269. return _context30.stop();
  13270. }
  13271. }
  13272. }, _callee30, this);
  13273. }));
  13274. function isUsernameRegistered(_x25) {
  13275. return _isUsernameRegistered.apply(this, arguments);
  13276. }
  13277. return isUsernameRegistered;
  13278. }()
  13279. }, {
  13280. key: "getLoginState",
  13281. value: function getLoginState() {
  13282. return Promise.resolve(this.hasLoginState());
  13283. }
  13284. }, {
  13285. key: "signInWithTicket",
  13286. value: function () {
  13287. var _signInWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(e) {
  13288. return _regenerator.default.wrap(function _callee31$(_context31) {
  13289. while (1) {
  13290. switch (_context31.prev = _context31.next) {
  13291. case 0:
  13292. return _context31.abrupt("return", new nt(this.config).signIn(e));
  13293. case 1:
  13294. case "end":
  13295. return _context31.stop();
  13296. }
  13297. }
  13298. }, _callee31, this);
  13299. }));
  13300. function signInWithTicket(_x26) {
  13301. return _signInWithTicket.apply(this, arguments);
  13302. }
  13303. return signInWithTicket;
  13304. }()
  13305. }, {
  13306. key: "shouldRefreshAccessToken",
  13307. value: function shouldRefreshAccessToken(e) {
  13308. this._request._shouldRefreshAccessTokenHook = e.bind(this);
  13309. }
  13310. }, {
  13311. key: "getUserInfo",
  13312. value: function getUserInfo() {
  13313. return this._request.send("auth.getUserInfo", {}).then(function (e) {
  13314. return e.code ? e : _objectSpread(_objectSpread({}, e.data), {}, {
  13315. requestId: e.seqId
  13316. });
  13317. });
  13318. }
  13319. }, {
  13320. key: "getAuthHeader",
  13321. value: function getAuthHeader() {
  13322. var _this$_cache$keys11 = this._cache.keys,
  13323. e = _this$_cache$keys11.refreshTokenKey,
  13324. t = _this$_cache$keys11.accessTokenKey,
  13325. n = this._cache.getStore(e);
  13326. return {
  13327. "x-cloudbase-credentials": this._cache.getStore(t) + "/@@/" + n
  13328. };
  13329. }
  13330. }, {
  13331. key: "_onAnonymousConverted",
  13332. value: function _onAnonymousConverted(e) {
  13333. var t = e.data.env;
  13334. t === this.config.env && this._cache.updatePersistence(this.config.persistence);
  13335. }
  13336. }, {
  13337. key: "_onLoginTypeChanged",
  13338. value: function _onLoginTypeChanged(e) {
  13339. var _e$data = e.data,
  13340. t = _e$data.loginType,
  13341. n = _e$data.persistence,
  13342. s = _e$data.env;
  13343. s === this.config.env && (this._cache.updatePersistence(n), this._cache.setStore(this._cache.keys.loginTypeKey, t));
  13344. }
  13345. }]);
  13346. return it;
  13347. }();
  13348. var ot = function ot(e, t) {
  13349. t = t || ve();
  13350. var n = Qe(this.config.env),
  13351. s = e.cloudPath,
  13352. r = e.filePath,
  13353. i = e.onUploadProgress,
  13354. _e$fileType = e.fileType,
  13355. o = _e$fileType === void 0 ? "image" : _e$fileType;
  13356. return n.send("storage.getUploadMetadata", {
  13357. path: s
  13358. }).then(function (e) {
  13359. var _e$data2 = e.data,
  13360. a = _e$data2.url,
  13361. c = _e$data2.authorization,
  13362. u = _e$data2.token,
  13363. l = _e$data2.fileId,
  13364. h = _e$data2.cosFileId,
  13365. d = e.requestId,
  13366. p = {
  13367. key: s,
  13368. signature: c,
  13369. "x-cos-meta-fileid": h,
  13370. success_action_status: "201",
  13371. "x-cos-security-token": u
  13372. };
  13373. n.upload({
  13374. url: a,
  13375. data: p,
  13376. file: r,
  13377. name: s,
  13378. fileType: o,
  13379. onUploadProgress: i
  13380. }).then(function (e) {
  13381. 201 === e.statusCode ? t(null, {
  13382. fileID: l,
  13383. requestId: d
  13384. }) : t(new te({
  13385. code: "STORAGE_REQUEST_FAIL",
  13386. message: "STORAGE_REQUEST_FAIL: ".concat(e.data)
  13387. }));
  13388. }).catch(function (e) {
  13389. t(e);
  13390. });
  13391. }).catch(function (e) {
  13392. t(e);
  13393. }), t.promise;
  13394. },
  13395. at = function at(e, t) {
  13396. t = t || ve();
  13397. var n = Qe(this.config.env),
  13398. s = e.cloudPath;
  13399. return n.send("storage.getUploadMetadata", {
  13400. path: s
  13401. }).then(function (e) {
  13402. t(null, e);
  13403. }).catch(function (e) {
  13404. t(e);
  13405. }), t.promise;
  13406. },
  13407. ct = function ct(_ref7, t) {
  13408. var e = _ref7.fileList;
  13409. if (t = t || ve(), !e || !Array.isArray(e)) return {
  13410. code: "INVALID_PARAM",
  13411. message: "fileList必须是非空的数组"
  13412. };
  13413. var _iterator3 = _createForOfIteratorHelper(e),
  13414. _step3;
  13415. try {
  13416. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  13417. var _t8 = _step3.value;
  13418. if (!_t8 || "string" != typeof _t8) return {
  13419. code: "INVALID_PARAM",
  13420. message: "fileList的元素必须是非空的字符串"
  13421. };
  13422. }
  13423. } catch (err) {
  13424. _iterator3.e(err);
  13425. } finally {
  13426. _iterator3.f();
  13427. }
  13428. var n = {
  13429. fileid_list: e
  13430. };
  13431. return Qe(this.config.env).send("storage.batchDeleteFile", n).then(function (e) {
  13432. e.code ? t(null, e) : t(null, {
  13433. fileList: e.data.delete_list,
  13434. requestId: e.requestId
  13435. });
  13436. }).catch(function (e) {
  13437. t(e);
  13438. }), t.promise;
  13439. },
  13440. ut = function ut(_ref8, t) {
  13441. var e = _ref8.fileList;
  13442. t = t || ve(), e && Array.isArray(e) || t(null, {
  13443. code: "INVALID_PARAM",
  13444. message: "fileList必须是非空的数组"
  13445. });
  13446. var n = [];
  13447. var _iterator4 = _createForOfIteratorHelper(e),
  13448. _step4;
  13449. try {
  13450. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  13451. var _s10 = _step4.value;
  13452. "object" == (0, _typeof2.default)(_s10) ? (_s10.hasOwnProperty("fileID") && _s10.hasOwnProperty("maxAge") || t(null, {
  13453. code: "INVALID_PARAM",
  13454. message: "fileList的元素必须是包含fileID和maxAge的对象"
  13455. }), n.push({
  13456. fileid: _s10.fileID,
  13457. max_age: _s10.maxAge
  13458. })) : "string" == typeof _s10 ? n.push({
  13459. fileid: _s10
  13460. }) : t(null, {
  13461. code: "INVALID_PARAM",
  13462. message: "fileList的元素必须是字符串"
  13463. });
  13464. }
  13465. } catch (err) {
  13466. _iterator4.e(err);
  13467. } finally {
  13468. _iterator4.f();
  13469. }
  13470. var s = {
  13471. file_list: n
  13472. };
  13473. return Qe(this.config.env).send("storage.batchGetDownloadUrl", s).then(function (e) {
  13474. e.code ? t(null, e) : t(null, {
  13475. fileList: e.data.download_list,
  13476. requestId: e.requestId
  13477. });
  13478. }).catch(function (e) {
  13479. t(e);
  13480. }), t.promise;
  13481. },
  13482. lt = /*#__PURE__*/function () {
  13483. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(_ref9, t) {
  13484. var e, n, s, r;
  13485. return _regenerator.default.wrap(function _callee32$(_context32) {
  13486. while (1) {
  13487. switch (_context32.prev = _context32.next) {
  13488. case 0:
  13489. e = _ref9.fileID;
  13490. _context32.next = 3;
  13491. return ut.call(this, {
  13492. fileList: [{
  13493. fileID: e,
  13494. maxAge: 600
  13495. }]
  13496. });
  13497. case 3:
  13498. n = _context32.sent.fileList[0];
  13499. if (!("SUCCESS" !== n.code)) {
  13500. _context32.next = 6;
  13501. break;
  13502. }
  13503. return _context32.abrupt("return", t ? t(n) : new Promise(function (e) {
  13504. e(n);
  13505. }));
  13506. case 6:
  13507. s = Qe(this.config.env);
  13508. r = n.download_url;
  13509. if (!(r = encodeURI(r), !t)) {
  13510. _context32.next = 10;
  13511. break;
  13512. }
  13513. return _context32.abrupt("return", s.download({
  13514. url: r
  13515. }));
  13516. case 10:
  13517. _context32.t0 = t;
  13518. _context32.next = 13;
  13519. return s.download({
  13520. url: r
  13521. });
  13522. case 13:
  13523. _context32.t1 = _context32.sent;
  13524. (0, _context32.t0)(_context32.t1);
  13525. case 15:
  13526. case "end":
  13527. return _context32.stop();
  13528. }
  13529. }
  13530. }, _callee32, this);
  13531. }));
  13532. return function lt(_x27, _x28) {
  13533. return _ref10.apply(this, arguments);
  13534. };
  13535. }(),
  13536. ht = function ht(_ref11, o) {
  13537. var e = _ref11.name,
  13538. t = _ref11.data,
  13539. n = _ref11.query,
  13540. s = _ref11.parse,
  13541. r = _ref11.search,
  13542. i = _ref11.timeout;
  13543. var a = o || ve();
  13544. var c;
  13545. try {
  13546. c = t ? JSON.stringify(t) : "";
  13547. } catch (e) {
  13548. return Promise.reject(e);
  13549. }
  13550. if (!e) return Promise.reject(new te({
  13551. code: "PARAM_ERROR",
  13552. message: "函数名不能为空"
  13553. }));
  13554. var u = {
  13555. inQuery: n,
  13556. parse: s,
  13557. search: r,
  13558. function_name: e,
  13559. request_data: c
  13560. };
  13561. return Qe(this.config.env).send("functions.invokeFunction", u, {
  13562. timeout: i
  13563. }).then(function (e) {
  13564. if (e.code) a(null, e);else {
  13565. var _t9 = e.data.response_data;
  13566. if (s) a(null, {
  13567. result: _t9,
  13568. requestId: e.requestId
  13569. });else try {
  13570. _t9 = JSON.parse(e.data.response_data), a(null, {
  13571. result: _t9,
  13572. requestId: e.requestId
  13573. });
  13574. } catch (e) {
  13575. a(new te({
  13576. message: "response data must be json"
  13577. }));
  13578. }
  13579. }
  13580. return a.promise;
  13581. }).catch(function (e) {
  13582. a(e);
  13583. }), a.promise;
  13584. },
  13585. dt = {
  13586. timeout: 15e3,
  13587. persistence: "session"
  13588. },
  13589. pt = {};
  13590. var ft = /*#__PURE__*/function () {
  13591. function ft(e) {
  13592. (0, _classCallCheck2.default)(this, ft);
  13593. this.config = e || this.config, this.authObj = void 0;
  13594. }
  13595. (0, _createClass2.default)(ft, [{
  13596. key: "init",
  13597. value: function init(e) {
  13598. switch (Ae.adapter || (this.requestClient = new Ae.adapter.reqClass({
  13599. timeout: e.timeout || 5e3,
  13600. timeoutMsg: "\u8BF7\u6C42\u5728".concat((e.timeout || 5e3) / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD")
  13601. })), this.config = _objectSpread(_objectSpread({}, dt), e), !0) {
  13602. case this.config.timeout > 6e5:
  13603. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  13604. break;
  13605. case this.config.timeout < 100:
  13606. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  13607. }
  13608. return new ft(this.config);
  13609. }
  13610. }, {
  13611. key: "auth",
  13612. value: function auth() {
  13613. var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  13614. e = _ref12.persistence;
  13615. if (this.authObj) return this.authObj;
  13616. var t = e || Ae.adapter.primaryStorage || dt.persistence;
  13617. var n;
  13618. return t !== this.config.persistence && (this.config.persistence = t), function (e) {
  13619. var t = e.env;
  13620. Oe[t] = new xe(e), Ee[t] = new xe(_objectSpread(_objectSpread({}, e), {}, {
  13621. persistence: "local"
  13622. }));
  13623. }(this.config), n = this.config, Ye[n.env] = new Ge(n), this.authObj = new it(this.config), this.authObj;
  13624. }
  13625. }, {
  13626. key: "on",
  13627. value: function on(e, t) {
  13628. return De.apply(this, [e, t]);
  13629. }
  13630. }, {
  13631. key: "off",
  13632. value: function off(e, t) {
  13633. return Me.apply(this, [e, t]);
  13634. }
  13635. }, {
  13636. key: "callFunction",
  13637. value: function callFunction(e, t) {
  13638. return ht.apply(this, [e, t]);
  13639. }
  13640. }, {
  13641. key: "deleteFile",
  13642. value: function deleteFile(e, t) {
  13643. return ct.apply(this, [e, t]);
  13644. }
  13645. }, {
  13646. key: "getTempFileURL",
  13647. value: function getTempFileURL(e, t) {
  13648. return ut.apply(this, [e, t]);
  13649. }
  13650. }, {
  13651. key: "downloadFile",
  13652. value: function downloadFile(e, t) {
  13653. return lt.apply(this, [e, t]);
  13654. }
  13655. }, {
  13656. key: "uploadFile",
  13657. value: function uploadFile(e, t) {
  13658. return ot.apply(this, [e, t]);
  13659. }
  13660. }, {
  13661. key: "getUploadMetadata",
  13662. value: function getUploadMetadata(e, t) {
  13663. return at.apply(this, [e, t]);
  13664. }
  13665. }, {
  13666. key: "registerExtension",
  13667. value: function registerExtension(e) {
  13668. pt[e.name] = e;
  13669. }
  13670. }, {
  13671. key: "invokeExtension",
  13672. value: function () {
  13673. var _invokeExtension = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(e, t) {
  13674. var n;
  13675. return _regenerator.default.wrap(function _callee33$(_context33) {
  13676. while (1) {
  13677. switch (_context33.prev = _context33.next) {
  13678. case 0:
  13679. n = pt[e];
  13680. if (n) {
  13681. _context33.next = 3;
  13682. break;
  13683. }
  13684. throw new te({
  13685. message: "\u6269\u5C55".concat(e, " \u5FC5\u987B\u5148\u6CE8\u518C")
  13686. });
  13687. case 3:
  13688. _context33.next = 5;
  13689. return n.invoke(t, this);
  13690. case 5:
  13691. return _context33.abrupt("return", _context33.sent);
  13692. case 6:
  13693. case "end":
  13694. return _context33.stop();
  13695. }
  13696. }
  13697. }, _callee33, this);
  13698. }));
  13699. function invokeExtension(_x29, _x30) {
  13700. return _invokeExtension.apply(this, arguments);
  13701. }
  13702. return invokeExtension;
  13703. }()
  13704. }, {
  13705. key: "useAdapters",
  13706. value: function useAdapters(e) {
  13707. var _ref13 = ke(e) || {},
  13708. t = _ref13.adapter,
  13709. n = _ref13.runtime;
  13710. t && (Ae.adapter = t), n && (Ae.runtime = n);
  13711. }
  13712. }]);
  13713. return ft;
  13714. }();
  13715. var gt = new ft();
  13716. function mt(e, t, n) {
  13717. void 0 === n && (n = {});
  13718. var s = /\?/.test(t),
  13719. r = "";
  13720. for (var i in n) {
  13721. "" === r ? !s && (t += "?") : r += "&", r += i + "=" + encodeURIComponent(n[i]);
  13722. }
  13723. return /^http(s)?:\/\//.test(t += r) ? t : "" + e + t;
  13724. }
  13725. var yt = /*#__PURE__*/function () {
  13726. function yt() {
  13727. (0, _classCallCheck2.default)(this, yt);
  13728. }
  13729. (0, _createClass2.default)(yt, [{
  13730. key: "post",
  13731. value: function post(e) {
  13732. var t = e.url,
  13733. n = e.data,
  13734. s = e.headers,
  13735. r = e.timeout;
  13736. return new Promise(function (e, i) {
  13737. ne.request({
  13738. url: mt("https:", t),
  13739. data: n,
  13740. method: "POST",
  13741. header: s,
  13742. timeout: r,
  13743. success: function success(t) {
  13744. e(t);
  13745. },
  13746. fail: function fail(e) {
  13747. i(e);
  13748. }
  13749. });
  13750. });
  13751. }
  13752. }, {
  13753. key: "upload",
  13754. value: function upload(e) {
  13755. return new Promise(function (t, n) {
  13756. var s = e.url,
  13757. r = e.file,
  13758. i = e.data,
  13759. o = e.headers,
  13760. a = e.fileType,
  13761. c = ne.uploadFile({
  13762. url: mt("https:", s),
  13763. name: "file",
  13764. formData: Object.assign({}, i),
  13765. filePath: r,
  13766. fileType: a,
  13767. header: o,
  13768. success: function success(e) {
  13769. var n = {
  13770. statusCode: e.statusCode,
  13771. data: e.data || {}
  13772. };
  13773. 200 === e.statusCode && i.success_action_status && (n.statusCode = parseInt(i.success_action_status, 10)), t(n);
  13774. },
  13775. fail: function fail(e) {
  13776. n(new Error(e.errMsg || "uploadFile:fail"));
  13777. }
  13778. });
  13779. "function" == typeof e.onUploadProgress && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (t) {
  13780. e.onUploadProgress({
  13781. loaded: t.totalBytesSent,
  13782. total: t.totalBytesExpectedToSend
  13783. });
  13784. });
  13785. });
  13786. }
  13787. }]);
  13788. return yt;
  13789. }();
  13790. var _t = {
  13791. setItem: function setItem(e, t) {
  13792. ne.setStorageSync(e, t);
  13793. },
  13794. getItem: function getItem(e) {
  13795. return ne.getStorageSync(e);
  13796. },
  13797. removeItem: function removeItem(e) {
  13798. ne.removeStorageSync(e);
  13799. },
  13800. clear: function clear() {
  13801. ne.clearStorageSync();
  13802. }
  13803. };
  13804. var wt = {
  13805. genAdapter: function genAdapter() {
  13806. return {
  13807. root: {},
  13808. reqClass: yt,
  13809. localStorage: _t,
  13810. primaryStorage: "local"
  13811. };
  13812. },
  13813. isMatch: function isMatch() {
  13814. return !0;
  13815. },
  13816. runtime: "uni_app"
  13817. };
  13818. gt.useAdapters(wt);
  13819. var vt = gt,
  13820. It = vt.init;
  13821. vt.init = function (e) {
  13822. e.env = e.spaceId;
  13823. var t = It.call(this, e);
  13824. t.config.provider = "tencent", t.config.spaceId = e.spaceId;
  13825. var n = t.auth;
  13826. return t.auth = function (e) {
  13827. var t = n.call(this, e);
  13828. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach(function (e) {
  13829. var n;
  13830. t[e] = (n = t[e], function (e) {
  13831. e = e || {};
  13832. var _ee = ee(e),
  13833. t = _ee.success,
  13834. s = _ee.fail,
  13835. r = _ee.complete;
  13836. if (!(t || s || r)) return n.call(this, e);
  13837. n.call(this, e).then(function (e) {
  13838. t && t(e), r && r(e);
  13839. }, function (e) {
  13840. s && s(e), r && r(e);
  13841. });
  13842. }).bind(t);
  13843. }), t;
  13844. }, t.customAuth = t.auth, t;
  13845. };
  13846. var St = vt;
  13847. function bt(_x31, _x32) {
  13848. return _bt.apply(this, arguments);
  13849. }
  13850. function _bt() {
  13851. _bt = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(e, t) {
  13852. var n, _e30, s;
  13853. return _regenerator.default.wrap(function _callee59$(_context59) {
  13854. while (1) {
  13855. switch (_context59.prev = _context59.next) {
  13856. case 0:
  13857. n = "http://".concat(e, ":").concat(t, "/system/ping");
  13858. _context59.prev = 1;
  13859. _context59.next = 4;
  13860. return s = {
  13861. url: n,
  13862. timeout: 500
  13863. }, new Promise(function (e, t) {
  13864. ne.request(_objectSpread(_objectSpread({}, s), {}, {
  13865. success: function success(t) {
  13866. e(t);
  13867. },
  13868. fail: function fail(e) {
  13869. t(e);
  13870. }
  13871. }));
  13872. });
  13873. case 4:
  13874. _e30 = _context59.sent;
  13875. return _context59.abrupt("return", !(!_e30.data || 0 !== _e30.data.code));
  13876. case 8:
  13877. _context59.prev = 8;
  13878. _context59.t0 = _context59["catch"](1);
  13879. return _context59.abrupt("return", !1);
  13880. case 11:
  13881. case "end":
  13882. return _context59.stop();
  13883. }
  13884. }
  13885. }, _callee59, null, [[1, 8]]);
  13886. }));
  13887. return _bt.apply(this, arguments);
  13888. }
  13889. function kt(_x33, _x34) {
  13890. return _kt.apply(this, arguments);
  13891. }
  13892. function _kt() {
  13893. _kt = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee60(e, t) {
  13894. var n, s, _r10;
  13895. return _regenerator.default.wrap(function _callee60$(_context60) {
  13896. while (1) {
  13897. switch (_context60.prev = _context60.next) {
  13898. case 0:
  13899. s = 0;
  13900. case 1:
  13901. if (!(s < e.length)) {
  13902. _context60.next = 11;
  13903. break;
  13904. }
  13905. _r10 = e[s];
  13906. _context60.next = 5;
  13907. return bt(_r10, t);
  13908. case 5:
  13909. if (!_context60.sent) {
  13910. _context60.next = 8;
  13911. break;
  13912. }
  13913. n = _r10;
  13914. return _context60.abrupt("break", 11);
  13915. case 8:
  13916. s++;
  13917. _context60.next = 1;
  13918. break;
  13919. case 11:
  13920. return _context60.abrupt("return", {
  13921. address: n,
  13922. port: t
  13923. });
  13924. case 12:
  13925. case "end":
  13926. return _context60.stop();
  13927. }
  13928. }
  13929. }, _callee60);
  13930. }));
  13931. return _kt.apply(this, arguments);
  13932. }
  13933. var At = {
  13934. "serverless.file.resource.generateProximalSign": "storage/generate-proximal-sign",
  13935. "serverless.file.resource.report": "storage/report",
  13936. "serverless.file.resource.delete": "storage/delete",
  13937. "serverless.file.resource.getTempFileURL": "storage/get-temp-file-url"
  13938. };
  13939. var Ct = /*#__PURE__*/function () {
  13940. function Ct(e) {
  13941. (0, _classCallCheck2.default)(this, Ct);
  13942. if (["spaceId", "clientSecret"].forEach(function (t) {
  13943. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error("".concat(t, " required"));
  13944. }), !e.endpoint) throw new Error("集群空间未配置ApiEndpoint,配置后需要重新关联服务空间后生效");
  13945. this.config = Object.assign({}, e), this.config.provider = "dcloud", this.config.requestUrl = this.config.endpoint + "/client", this.config.envType = this.config.envType || "public", this.adapter = ne;
  13946. }
  13947. (0, _createClass2.default)(Ct, [{
  13948. key: "request",
  13949. value: function () {
  13950. var _request2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(e) {
  13951. var _this11 = this;
  13952. var t,
  13953. n,
  13954. _args34 = arguments;
  13955. return _regenerator.default.wrap(function _callee34$(_context34) {
  13956. while (1) {
  13957. switch (_context34.prev = _context34.next) {
  13958. case 0:
  13959. t = _args34.length > 1 && _args34[1] !== undefined ? _args34[1] : !0;
  13960. n = S && t;
  13961. if (!n) {
  13962. _context34.next = 8;
  13963. break;
  13964. }
  13965. _context34.next = 5;
  13966. return this.setupLocalRequest(e);
  13967. case 5:
  13968. _context34.t0 = _context34.sent;
  13969. _context34.next = 9;
  13970. break;
  13971. case 8:
  13972. _context34.t0 = this.setupRequest(e);
  13973. case 9:
  13974. e = _context34.t0;
  13975. return _context34.abrupt("return", Promise.resolve().then(function () {
  13976. return n ? _this11.requestLocal(e) : he.wrappedRequest(e, _this11.adapter.request);
  13977. }));
  13978. case 11:
  13979. case "end":
  13980. return _context34.stop();
  13981. }
  13982. }
  13983. }, _callee34, this);
  13984. }));
  13985. function request(_x35) {
  13986. return _request2.apply(this, arguments);
  13987. }
  13988. return request;
  13989. }()
  13990. }, {
  13991. key: "requestLocal",
  13992. value: function requestLocal(e) {
  13993. var _this12 = this;
  13994. return new Promise(function (t, n) {
  13995. _this12.adapter.request(Object.assign(e, {
  13996. complete: function complete(e) {
  13997. if (e || (e = {}), !e.statusCode || e.statusCode >= 400) {
  13998. var _t10 = e.data && e.data.code || "SYS_ERR",
  13999. _s11 = e.data && e.data.message || "request:fail";
  14000. return n(new te({
  14001. code: _t10,
  14002. message: _s11
  14003. }));
  14004. }
  14005. t({
  14006. success: !0,
  14007. result: e.data
  14008. });
  14009. }
  14010. }));
  14011. });
  14012. }
  14013. }, {
  14014. key: "setupRequest",
  14015. value: function setupRequest(e) {
  14016. var t = Object.assign({}, e, {
  14017. spaceId: this.config.spaceId,
  14018. timestamp: Date.now()
  14019. }),
  14020. n = {
  14021. "Content-Type": "application/json"
  14022. };
  14023. n["x-serverless-sign"] = he.sign(t, this.config.clientSecret);
  14024. var s = le();
  14025. n["x-client-info"] = encodeURIComponent(JSON.stringify(s));
  14026. var _se = se(),
  14027. r = _se.token;
  14028. return n["x-client-token"] = r, {
  14029. url: this.config.requestUrl,
  14030. method: "POST",
  14031. data: t,
  14032. dataType: "json",
  14033. header: JSON.parse(JSON.stringify(n))
  14034. };
  14035. }
  14036. }, {
  14037. key: "setupLocalRequest",
  14038. value: function () {
  14039. var _setupLocalRequest = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(e) {
  14040. var t, _se2, n, s, _ref14, r, i, _yield$kt, o;
  14041. return _regenerator.default.wrap(function _callee35$(_context35) {
  14042. while (1) {
  14043. switch (_context35.prev = _context35.next) {
  14044. case 0:
  14045. t = le();
  14046. _se2 = se();
  14047. n = _se2.token;
  14048. s = Object.assign({}, e, {
  14049. spaceId: this.config.spaceId,
  14050. timestamp: Date.now(),
  14051. clientInfo: t,
  14052. token: n
  14053. });
  14054. _ref14 = this.__dev__ && this.__dev__.debugInfo || {};
  14055. r = _ref14.address;
  14056. i = _ref14.servePort;
  14057. _context35.next = 9;
  14058. return kt(r, i);
  14059. case 9:
  14060. _yield$kt = _context35.sent;
  14061. o = _yield$kt.address;
  14062. return _context35.abrupt("return", {
  14063. url: "http://".concat(o, ":").concat(i, "/").concat(At[e.method]),
  14064. method: "POST",
  14065. data: s,
  14066. dataType: "json",
  14067. header: JSON.parse(JSON.stringify({
  14068. "Content-Type": "application/json"
  14069. }))
  14070. });
  14071. case 12:
  14072. case "end":
  14073. return _context35.stop();
  14074. }
  14075. }
  14076. }, _callee35, this);
  14077. }));
  14078. function setupLocalRequest(_x36) {
  14079. return _setupLocalRequest.apply(this, arguments);
  14080. }
  14081. return setupLocalRequest;
  14082. }()
  14083. }, {
  14084. key: "callFunction",
  14085. value: function callFunction(e) {
  14086. var t = {
  14087. method: "serverless.function.runtime.invoke",
  14088. params: JSON.stringify({
  14089. functionTarget: e.name,
  14090. functionArgs: e.data || {}
  14091. })
  14092. };
  14093. return this.request(t, !1);
  14094. }
  14095. }, {
  14096. key: "getUploadFileOptions",
  14097. value: function getUploadFileOptions(e) {
  14098. var t = {
  14099. method: "serverless.file.resource.generateProximalSign",
  14100. params: JSON.stringify(e)
  14101. };
  14102. return this.request(t);
  14103. }
  14104. }, {
  14105. key: "reportUploadFile",
  14106. value: function reportUploadFile(e) {
  14107. var t = {
  14108. method: "serverless.file.resource.report",
  14109. params: JSON.stringify(e)
  14110. };
  14111. return this.request(t);
  14112. }
  14113. }, {
  14114. key: "uploadFile",
  14115. value: function uploadFile(_ref15) {
  14116. var _this13 = this;
  14117. var e = _ref15.filePath,
  14118. t = _ref15.cloudPath,
  14119. _ref15$fileType = _ref15.fileType,
  14120. n = _ref15$fileType === void 0 ? "image" : _ref15$fileType,
  14121. s = _ref15.onUploadProgress;
  14122. if (!t) throw new te({
  14123. code: "CLOUDPATH_REQUIRED",
  14124. message: "cloudPath不可为空"
  14125. });
  14126. var r;
  14127. return this.getUploadFileOptions({
  14128. cloudPath: t
  14129. }).then(function (t) {
  14130. var _t$result = t.result,
  14131. i = _t$result.url,
  14132. o = _t$result.formData,
  14133. a = _t$result.name;
  14134. return r = t.result.fileUrl, new Promise(function (t, r) {
  14135. var c = _this13.adapter.uploadFile({
  14136. url: i,
  14137. formData: o,
  14138. name: a,
  14139. filePath: e,
  14140. fileType: n,
  14141. success: function success(e) {
  14142. e && e.statusCode < 400 ? t(e) : r(new te({
  14143. code: "UPLOAD_FAILED",
  14144. message: "文件上传失败"
  14145. }));
  14146. },
  14147. fail: function fail(e) {
  14148. r(new te({
  14149. code: e.code || "UPLOAD_FAILED",
  14150. message: e.message || e.errMsg || "文件上传失败"
  14151. }));
  14152. }
  14153. });
  14154. "function" == typeof s && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  14155. s({
  14156. loaded: e.totalBytesSent,
  14157. total: e.totalBytesExpectedToSend
  14158. });
  14159. });
  14160. });
  14161. }).then(function () {
  14162. return _this13.reportUploadFile({
  14163. cloudPath: t
  14164. });
  14165. }).then(function (t) {
  14166. return new Promise(function (n, s) {
  14167. t.success ? n({
  14168. success: !0,
  14169. filePath: e,
  14170. fileID: r
  14171. }) : s(new te({
  14172. code: "UPLOAD_FAILED",
  14173. message: "文件上传失败"
  14174. }));
  14175. });
  14176. });
  14177. }
  14178. }, {
  14179. key: "deleteFile",
  14180. value: function deleteFile(_ref16) {
  14181. var e = _ref16.fileList;
  14182. var t = {
  14183. method: "serverless.file.resource.delete",
  14184. params: JSON.stringify({
  14185. fileList: e
  14186. })
  14187. };
  14188. return this.request(t).then(function (e) {
  14189. if (e.success) return e.result;
  14190. throw new te({
  14191. code: "DELETE_FILE_FAILED",
  14192. message: "删除文件失败"
  14193. });
  14194. });
  14195. }
  14196. }, {
  14197. key: "getTempFileURL",
  14198. value: function getTempFileURL() {
  14199. var _ref17 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14200. e = _ref17.fileList,
  14201. t = _ref17.maxAge;
  14202. if (!Array.isArray(e) || 0 === e.length) throw new te({
  14203. code: "INVALID_PARAM",
  14204. message: "fileList的元素必须是非空的字符串"
  14205. });
  14206. var n = {
  14207. method: "serverless.file.resource.getTempFileURL",
  14208. params: JSON.stringify({
  14209. fileList: e,
  14210. maxAge: t
  14211. })
  14212. };
  14213. return this.request(n).then(function (e) {
  14214. if (e.success) return {
  14215. fileList: e.result.fileList.map(function (e) {
  14216. return {
  14217. fileID: e.fileID,
  14218. tempFileURL: e.tempFileURL
  14219. };
  14220. })
  14221. };
  14222. throw new te({
  14223. code: "GET_TEMP_FILE_URL_FAILED",
  14224. message: "获取临时文件链接失败"
  14225. });
  14226. });
  14227. }
  14228. }]);
  14229. return Ct;
  14230. }();
  14231. var Pt = {
  14232. init: function init(e) {
  14233. var t = new Ct(e),
  14234. n = {
  14235. signInAnonymously: function signInAnonymously() {
  14236. return Promise.resolve();
  14237. },
  14238. getLoginState: function getLoginState() {
  14239. return Promise.resolve(!1);
  14240. }
  14241. };
  14242. return t.auth = function () {
  14243. return n;
  14244. }, t.customAuth = t.auth, t;
  14245. }
  14246. },
  14247. Tt = n(function (e, t) {
  14248. e.exports = r.enc.Hex;
  14249. });
  14250. function xt() {
  14251. return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (e) {
  14252. var t = 16 * Math.random() | 0;
  14253. return ("x" === e ? t : 3 & t | 8).toString(16);
  14254. });
  14255. }
  14256. function Ot() {
  14257. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  14258. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14259. var n = t.data,
  14260. s = t.functionName,
  14261. r = t.method,
  14262. i = t.headers,
  14263. _t$signHeaderKeys = t.signHeaderKeys,
  14264. o = _t$signHeaderKeys === void 0 ? [] : _t$signHeaderKeys,
  14265. a = t.config,
  14266. c = Date.now(),
  14267. u = xt(),
  14268. l = Object.assign({}, i, {
  14269. "x-from-app-id": a.spaceAppId,
  14270. "x-from-env-id": a.spaceId,
  14271. "x-to-env-id": a.spaceId,
  14272. "x-from-instance-id": c,
  14273. "x-from-function-name": s,
  14274. "x-client-timestamp": c,
  14275. "x-alipay-source": "client",
  14276. "x-request-id": u,
  14277. "x-alipay-callid": u,
  14278. "x-trace-id": u
  14279. }),
  14280. h = ["x-from-app-id", "x-from-env-id", "x-to-env-id", "x-from-instance-id", "x-from-function-name", "x-client-timestamp"].concat(o),
  14281. _ref18 = e.split("?") || [],
  14282. _ref19 = (0, _slicedToArray2.default)(_ref18, 2),
  14283. _ref19$ = _ref19[0],
  14284. d = _ref19$ === void 0 ? "" : _ref19$,
  14285. _ref19$2 = _ref19[1],
  14286. p = _ref19$2 === void 0 ? "" : _ref19$2,
  14287. f = function (e) {
  14288. var t = e.signedHeaders.join(";"),
  14289. n = e.signedHeaders.map(function (t) {
  14290. return "".concat(t.toLowerCase(), ":").concat(e.headers[t], "\n");
  14291. }).join(""),
  14292. s = _e(e.body).toString(Tt),
  14293. r = "".concat(e.method.toUpperCase(), "\n").concat(e.path, "\n").concat(e.query, "\n").concat(n, "\n").concat(t, "\n").concat(s, "\n"),
  14294. i = _e(r).toString(Tt),
  14295. o = "HMAC-SHA256\n".concat(e.timestamp, "\n").concat(i, "\n"),
  14296. a = we(o, e.secretKey).toString(Tt);
  14297. return "HMAC-SHA256 Credential=".concat(e.secretId, ", SignedHeaders=").concat(t, ", Signature=").concat(a);
  14298. }({
  14299. path: d,
  14300. query: p,
  14301. method: r,
  14302. headers: l,
  14303. timestamp: c,
  14304. body: JSON.stringify(n),
  14305. secretId: a.accessKey,
  14306. secretKey: a.secretKey,
  14307. signedHeaders: h.sort()
  14308. });
  14309. return {
  14310. url: "".concat(a.endpoint).concat(e),
  14311. headers: Object.assign({}, l, {
  14312. Authorization: f
  14313. })
  14314. };
  14315. }
  14316. function Et(_ref20) {
  14317. var e = _ref20.url,
  14318. t = _ref20.data,
  14319. _ref20$method = _ref20.method,
  14320. n = _ref20$method === void 0 ? "POST" : _ref20$method,
  14321. _ref20$headers = _ref20.headers,
  14322. s = _ref20$headers === void 0 ? {} : _ref20$headers,
  14323. r = _ref20.timeout;
  14324. return new Promise(function (i, o) {
  14325. ne.request({
  14326. url: e,
  14327. method: n,
  14328. data: "object" == (0, _typeof2.default)(t) ? JSON.stringify(t) : t,
  14329. header: s,
  14330. dataType: "json",
  14331. timeout: r,
  14332. complete: function complete() {
  14333. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  14334. var t = s["x-trace-id"] || "";
  14335. if (!e.statusCode || e.statusCode >= 400) {
  14336. var _ref21 = e.data || {},
  14337. _n7 = _ref21.message,
  14338. _s12 = _ref21.errMsg,
  14339. _r4 = _ref21.trace_id;
  14340. return o(new te({
  14341. code: "SYS_ERR",
  14342. message: _n7 || _s12 || "request:fail",
  14343. requestId: _r4 || t
  14344. }));
  14345. }
  14346. i({
  14347. status: e.statusCode,
  14348. data: e.data,
  14349. headers: e.header,
  14350. requestId: t
  14351. });
  14352. }
  14353. });
  14354. });
  14355. }
  14356. function Lt(e, t) {
  14357. var n = e.path,
  14358. s = e.data,
  14359. _e$method = e.method,
  14360. r = _e$method === void 0 ? "GET" : _e$method,
  14361. _Ot = Ot(n, {
  14362. functionName: "",
  14363. data: s,
  14364. method: r,
  14365. headers: {
  14366. "x-alipay-cloud-mode": "oss",
  14367. "x-data-api-type": "oss",
  14368. "x-expire-timestamp": Date.now() + 6e4
  14369. },
  14370. signHeaderKeys: ["x-data-api-type", "x-expire-timestamp"],
  14371. config: t
  14372. }),
  14373. i = _Ot.url,
  14374. o = _Ot.headers;
  14375. return Et({
  14376. url: i,
  14377. data: s,
  14378. method: r,
  14379. headers: o
  14380. }).then(function (e) {
  14381. var t = e.data || {};
  14382. if (!t.success) throw new te({
  14383. code: e.errCode,
  14384. message: e.errMsg,
  14385. requestId: e.requestId
  14386. });
  14387. return t.data || {};
  14388. }).catch(function (e) {
  14389. throw new te({
  14390. code: e.errCode,
  14391. message: e.errMsg,
  14392. requestId: e.requestId
  14393. });
  14394. });
  14395. }
  14396. function Rt() {
  14397. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  14398. var t = e.trim().replace(/^cloud:\/\//, ""),
  14399. n = t.indexOf("/");
  14400. if (n <= 0) throw new te({
  14401. code: "INVALID_PARAM",
  14402. message: "fileID不合法"
  14403. });
  14404. var s = t.substring(0, n),
  14405. r = t.substring(n + 1);
  14406. return s !== this.config.spaceId && console.warn("file ".concat(e, " does not belong to env ").concat(this.config.spaceId)), r;
  14407. }
  14408. function Ut() {
  14409. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  14410. return "cloud://".concat(this.config.spaceId, "/").concat(e.replace(/^\/+/, ""));
  14411. }
  14412. var Nt = /*#__PURE__*/function () {
  14413. function Nt(e) {
  14414. (0, _classCallCheck2.default)(this, Nt);
  14415. this.config = e;
  14416. }
  14417. (0, _createClass2.default)(Nt, [{
  14418. key: "signedURL",
  14419. value: function signedURL(e) {
  14420. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14421. var n = "/ws/function/".concat(e),
  14422. s = this.config.wsEndpoint.replace(/^ws(s)?:\/\//, ""),
  14423. r = Object.assign({}, t, {
  14424. accessKeyId: this.config.accessKey,
  14425. signatureNonce: xt(),
  14426. timestamp: "" + Date.now()
  14427. }),
  14428. i = [n, ["accessKeyId", "authorization", "signatureNonce", "timestamp"].sort().map(function (e) {
  14429. return r[e] ? "".concat(e, "=").concat(r[e]) : null;
  14430. }).filter(Boolean).join("&"), "host:".concat(s)].join("\n"),
  14431. o = ["HMAC-SHA256", _e(i).toString(Tt)].join("\n"),
  14432. a = we(o, this.config.secretKey).toString(Tt),
  14433. c = Object.keys(r).map(function (e) {
  14434. return "".concat(e, "=").concat(encodeURIComponent(r[e]));
  14435. }).join("&");
  14436. return "".concat(this.config.wsEndpoint).concat(n, "?").concat(c, "&signature=").concat(a);
  14437. }
  14438. }]);
  14439. return Nt;
  14440. }();
  14441. var Dt = /*#__PURE__*/function () {
  14442. function Dt(e) {
  14443. (0, _classCallCheck2.default)(this, Dt);
  14444. if (["spaceId", "spaceAppId", "accessKey", "secretKey"].forEach(function (t) {
  14445. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error("".concat(t, " required"));
  14446. }), e.endpoint) {
  14447. if ("string" != typeof e.endpoint) throw new Error("endpoint must be string");
  14448. if (!/^https:\/\//.test(e.endpoint)) throw new Error("endpoint must start with https://");
  14449. e.endpoint = e.endpoint.replace(/\/$/, "");
  14450. }
  14451. this.config = Object.assign({}, e, {
  14452. endpoint: e.endpoint || "https://".concat(e.spaceId, ".api-hz.cloudbasefunction.cn"),
  14453. wsEndpoint: e.wsEndpoint || "wss://".concat(e.spaceId, ".api-hz.cloudbasefunction.cn")
  14454. }), this._websocket = new Nt(this.config);
  14455. }
  14456. (0, _createClass2.default)(Dt, [{
  14457. key: "callFunction",
  14458. value: function callFunction(e) {
  14459. return function (e, t) {
  14460. var n = e.name,
  14461. s = e.data,
  14462. _e$async = e.async,
  14463. r = _e$async === void 0 ? !1 : _e$async,
  14464. i = e.timeout,
  14465. o = "POST",
  14466. a = {
  14467. "x-to-function-name": n
  14468. };
  14469. r && (a["x-function-invoke-type"] = "async");
  14470. var _Ot2 = Ot("/functions/invokeFunction", {
  14471. functionName: n,
  14472. data: s,
  14473. method: o,
  14474. headers: a,
  14475. signHeaderKeys: ["x-to-function-name"],
  14476. config: t
  14477. }),
  14478. c = _Ot2.url,
  14479. u = _Ot2.headers;
  14480. return Et({
  14481. url: c,
  14482. data: s,
  14483. method: o,
  14484. headers: u,
  14485. timeout: i
  14486. }).then(function (e) {
  14487. var t = 0;
  14488. if (r) {
  14489. var _n8 = e.data || {};
  14490. t = "200" === _n8.errCode ? 0 : _n8.errCode, e.data = _n8.data || {}, e.errMsg = _n8.errMsg;
  14491. }
  14492. if (0 !== t) throw new te({
  14493. code: t,
  14494. message: e.errMsg,
  14495. requestId: e.requestId
  14496. });
  14497. return {
  14498. errCode: t,
  14499. success: 0 === t,
  14500. requestId: e.requestId,
  14501. result: e.data
  14502. };
  14503. }).catch(function (e) {
  14504. throw new te({
  14505. code: e.errCode,
  14506. message: e.errMsg,
  14507. requestId: e.requestId
  14508. });
  14509. });
  14510. }(e, this.config);
  14511. }
  14512. }, {
  14513. key: "uploadFileToOSS",
  14514. value: function uploadFileToOSS(_ref22) {
  14515. var e = _ref22.url,
  14516. t = _ref22.filePath,
  14517. n = _ref22.fileType,
  14518. s = _ref22.formData,
  14519. r = _ref22.onUploadProgress;
  14520. return new Promise(function (i, o) {
  14521. var a = ne.uploadFile({
  14522. url: e,
  14523. filePath: t,
  14524. fileType: n,
  14525. formData: s,
  14526. name: "file",
  14527. success: function success(e) {
  14528. e && e.statusCode < 400 ? i(e) : o(new te({
  14529. code: "UPLOAD_FAILED",
  14530. message: "文件上传失败"
  14531. }));
  14532. },
  14533. fail: function fail(e) {
  14534. o(new te({
  14535. code: e.code || "UPLOAD_FAILED",
  14536. message: e.message || e.errMsg || "文件上传失败"
  14537. }));
  14538. }
  14539. });
  14540. "function" == typeof r && a && "function" == typeof a.onProgressUpdate && a.onProgressUpdate(function (e) {
  14541. r({
  14542. loaded: e.totalBytesSent,
  14543. total: e.totalBytesExpectedToSend
  14544. });
  14545. });
  14546. });
  14547. }
  14548. }, {
  14549. key: "uploadFile",
  14550. value: function () {
  14551. var _uploadFile2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36(_ref23) {
  14552. var e, _ref23$cloudPath, t, _ref23$fileType, n, s, r, i, o, a, c;
  14553. return _regenerator.default.wrap(function _callee36$(_context36) {
  14554. while (1) {
  14555. switch (_context36.prev = _context36.next) {
  14556. case 0:
  14557. e = _ref23.filePath, _ref23$cloudPath = _ref23.cloudPath, t = _ref23$cloudPath === void 0 ? "" : _ref23$cloudPath, _ref23$fileType = _ref23.fileType, n = _ref23$fileType === void 0 ? "image" : _ref23$fileType, s = _ref23.onUploadProgress;
  14558. if (!("string" !== f(t))) {
  14559. _context36.next = 3;
  14560. break;
  14561. }
  14562. throw new te({
  14563. code: "INVALID_PARAM",
  14564. message: "cloudPath必须为字符串类型"
  14565. });
  14566. case 3:
  14567. if (t = t.trim()) {
  14568. _context36.next = 5;
  14569. break;
  14570. }
  14571. throw new te({
  14572. code: "INVALID_PARAM",
  14573. message: "cloudPath不可为空"
  14574. });
  14575. case 5:
  14576. if (!/:\/\//.test(t)) {
  14577. _context36.next = 7;
  14578. break;
  14579. }
  14580. throw new te({
  14581. code: "INVALID_PARAM",
  14582. message: "cloudPath不合法"
  14583. });
  14584. case 7:
  14585. _context36.next = 9;
  14586. return Lt({
  14587. path: "/".concat(t.replace(/^\//, ""), "?post_url")
  14588. }, this.config);
  14589. case 9:
  14590. r = _context36.sent;
  14591. i = r.file_id;
  14592. o = r.upload_url;
  14593. a = r.form_data;
  14594. c = a && a.reduce(function (e, t) {
  14595. return e[t.key] = t.value, e;
  14596. }, {});
  14597. return _context36.abrupt("return", this.uploadFileToOSS({
  14598. url: o,
  14599. filePath: e,
  14600. fileType: n,
  14601. formData: c,
  14602. onUploadProgress: s
  14603. }).then(function () {
  14604. return {
  14605. fileID: i
  14606. };
  14607. }));
  14608. case 15:
  14609. case "end":
  14610. return _context36.stop();
  14611. }
  14612. }
  14613. }, _callee36, this);
  14614. }));
  14615. function uploadFile(_x37) {
  14616. return _uploadFile2.apply(this, arguments);
  14617. }
  14618. return uploadFile;
  14619. }()
  14620. }, {
  14621. key: "getTempFileURL",
  14622. value: function () {
  14623. var _getTempFileURL = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(_ref24) {
  14624. var _this14 = this;
  14625. var e;
  14626. return _regenerator.default.wrap(function _callee37$(_context37) {
  14627. while (1) {
  14628. switch (_context37.prev = _context37.next) {
  14629. case 0:
  14630. e = _ref24.fileList;
  14631. return _context37.abrupt("return", new Promise(function (t, n) {
  14632. (!e || e.length < 0) && n(new te({
  14633. errCode: "INVALID_PARAM",
  14634. errMsg: "fileList不能为空数组"
  14635. })), e.length > 50 && n(new te({
  14636. errCode: "INVALID_PARAM",
  14637. errMsg: "fileList数组长度不能超过50"
  14638. }));
  14639. var s = [];
  14640. var _iterator5 = _createForOfIteratorHelper(e),
  14641. _step5;
  14642. try {
  14643. for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
  14644. var _t11 = _step5.value;
  14645. "string" !== f(_t11) && n(new te({
  14646. errCode: "INVALID_PARAM",
  14647. errMsg: "fileList的元素必须是非空的字符串"
  14648. }));
  14649. var _e17 = Rt.call(_this14, _t11);
  14650. s.push({
  14651. file_id: _e17,
  14652. expire: 600
  14653. });
  14654. }
  14655. } catch (err) {
  14656. _iterator5.e(err);
  14657. } finally {
  14658. _iterator5.f();
  14659. }
  14660. Lt({
  14661. path: "/?download_url",
  14662. data: {
  14663. file_list: s
  14664. },
  14665. method: "POST"
  14666. }, _this14.config).then(function (e) {
  14667. var _e$file_list = e.file_list,
  14668. n = _e$file_list === void 0 ? [] : _e$file_list;
  14669. t({
  14670. fileList: n.map(function (e) {
  14671. return {
  14672. fileID: Ut.call(_this14, e.file_id),
  14673. tempFileURL: e.download_url
  14674. };
  14675. })
  14676. });
  14677. }).catch(function (e) {
  14678. return n(e);
  14679. });
  14680. }));
  14681. case 2:
  14682. case "end":
  14683. return _context37.stop();
  14684. }
  14685. }
  14686. }, _callee37);
  14687. }));
  14688. function getTempFileURL(_x38) {
  14689. return _getTempFileURL.apply(this, arguments);
  14690. }
  14691. return getTempFileURL;
  14692. }()
  14693. }, {
  14694. key: "connectWebSocket",
  14695. value: function () {
  14696. var _connectWebSocket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38(e) {
  14697. var t, n;
  14698. return _regenerator.default.wrap(function _callee38$(_context38) {
  14699. while (1) {
  14700. switch (_context38.prev = _context38.next) {
  14701. case 0:
  14702. t = e.name, n = e.query;
  14703. return _context38.abrupt("return", ne.connectSocket({
  14704. url: this._websocket.signedURL(t, n),
  14705. complete: function complete() {}
  14706. }));
  14707. case 2:
  14708. case "end":
  14709. return _context38.stop();
  14710. }
  14711. }
  14712. }, _callee38, this);
  14713. }));
  14714. function connectWebSocket(_x39) {
  14715. return _connectWebSocket.apply(this, arguments);
  14716. }
  14717. return connectWebSocket;
  14718. }()
  14719. }]);
  14720. return Dt;
  14721. }();
  14722. var qt = {
  14723. init: function init(e) {
  14724. e.provider = "alipay";
  14725. var t = new Dt(e);
  14726. return t.auth = function () {
  14727. return {
  14728. signInAnonymously: function signInAnonymously() {
  14729. return Promise.resolve();
  14730. },
  14731. getLoginState: function getLoginState() {
  14732. return Promise.resolve(!0);
  14733. }
  14734. };
  14735. }, t;
  14736. }
  14737. };
  14738. function Mt(_ref25) {
  14739. var e = _ref25.data;
  14740. var t;
  14741. t = le();
  14742. var n = JSON.parse(JSON.stringify(e || {}));
  14743. if (Object.assign(n, {
  14744. clientInfo: t
  14745. }), !n.uniIdToken) {
  14746. var _se3 = se(),
  14747. _e18 = _se3.token;
  14748. _e18 && (n.uniIdToken = _e18);
  14749. }
  14750. return n;
  14751. }
  14752. function Ft() {
  14753. return _Ft.apply(this, arguments);
  14754. }
  14755. function _Ft() {
  14756. _Ft = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee61() {
  14757. var _this27 = this;
  14758. var e,
  14759. _this$__dev__,
  14760. t,
  14761. n,
  14762. s,
  14763. r,
  14764. i,
  14765. o,
  14766. _args8 = arguments;
  14767. return _regenerator.default.wrap(function _callee61$(_context61) {
  14768. while (1) {
  14769. switch (_context61.prev = _context61.next) {
  14770. case 0:
  14771. e = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
  14772. _context61.next = 3;
  14773. return this.__dev__.initLocalNetwork();
  14774. case 3:
  14775. _this$__dev__ = this.__dev__, t = _this$__dev__.localAddress, n = _this$__dev__.localPort, s = {
  14776. aliyun: "aliyun",
  14777. tencent: "tcb",
  14778. alipay: "alipay",
  14779. dcloud: "dcloud"
  14780. }[this.config.provider], r = this.config.spaceId, i = "http://".concat(t, ":").concat(n, "/system/check-function"), o = "http://".concat(t, ":").concat(n, "/cloudfunctions/").concat(e.name);
  14781. return _context61.abrupt("return", new Promise(function (t, n) {
  14782. ne.request({
  14783. method: "POST",
  14784. url: i,
  14785. data: {
  14786. name: e.name,
  14787. platform: C,
  14788. provider: s,
  14789. spaceId: r
  14790. },
  14791. timeout: 3e3,
  14792. success: function success(e) {
  14793. t(e);
  14794. },
  14795. fail: function fail() {
  14796. t({
  14797. data: {
  14798. code: "NETWORK_ERROR",
  14799. message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"
  14800. }
  14801. });
  14802. }
  14803. });
  14804. }).then(function () {
  14805. var _ref67 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14806. e = _ref67.data;
  14807. var _ref68 = e || {},
  14808. t = _ref68.code,
  14809. n = _ref68.message;
  14810. return {
  14811. code: 0 === t ? 0 : t || "SYS_ERR",
  14812. message: n || "SYS_ERR"
  14813. };
  14814. }).then(function (_ref69) {
  14815. var t = _ref69.code,
  14816. n = _ref69.message;
  14817. if (0 !== t) {
  14818. switch (t) {
  14819. case "MODULE_ENCRYPTED":
  14820. console.error("\u6B64\u4E91\u51FD\u6570\uFF08".concat(e.name, "\uFF09\u4F9D\u8D56\u52A0\u5BC6\u516C\u5171\u6A21\u5757\u4E0D\u53EF\u672C\u5730\u8C03\u8BD5\uFF0C\u81EA\u52A8\u5207\u6362\u4E3A\u4E91\u7AEF\u5DF2\u90E8\u7F72\u7684\u4E91\u51FD\u6570"));
  14821. break;
  14822. case "FUNCTION_ENCRYPTED":
  14823. console.error("\u6B64\u4E91\u51FD\u6570\uFF08".concat(e.name, "\uFF09\u5DF2\u52A0\u5BC6\u4E0D\u53EF\u672C\u5730\u8C03\u8BD5\uFF0C\u81EA\u52A8\u5207\u6362\u4E3A\u4E91\u7AEF\u5DF2\u90E8\u7F72\u7684\u4E91\u51FD\u6570"));
  14824. break;
  14825. case "ACTION_ENCRYPTED":
  14826. console.error(n || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  14827. break;
  14828. case "NETWORK_ERROR":
  14829. console.error(n || "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下");
  14830. break;
  14831. case "SWITCH_TO_CLOUD":
  14832. break;
  14833. default:
  14834. {
  14835. var _e31 = "\u68C0\u6D4B\u672C\u5730\u8C03\u8BD5\u670D\u52A1\u51FA\u73B0\u9519\u8BEF\uFF1A".concat(n, "\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u73AF\u5883\u6216\u91CD\u542F\u5BA2\u6237\u7AEF\u518D\u8BD5");
  14836. throw console.error(_e31), new Error(_e31);
  14837. }
  14838. }
  14839. return _this27._callCloudFunction(e);
  14840. }
  14841. return new Promise(function (t, n) {
  14842. var r = Mt.call(_this27, {
  14843. data: e.data
  14844. });
  14845. ne.request({
  14846. method: "POST",
  14847. url: o,
  14848. data: {
  14849. provider: s,
  14850. platform: C,
  14851. param: r
  14852. },
  14853. timeout: e.timeout,
  14854. success: function success() {
  14855. var _ref70 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14856. e = _ref70.statusCode,
  14857. s = _ref70.data;
  14858. return !e || e >= 400 ? n(new te({
  14859. code: s.code || "SYS_ERR",
  14860. message: s.message || "request:fail"
  14861. })) : t({
  14862. result: s
  14863. });
  14864. },
  14865. fail: function fail(e) {
  14866. n(new te({
  14867. code: e.code || e.errCode || "SYS_ERR",
  14868. message: e.message || e.errMsg || "request:fail"
  14869. }));
  14870. }
  14871. });
  14872. });
  14873. }));
  14874. case 5:
  14875. case "end":
  14876. return _context61.stop();
  14877. }
  14878. }
  14879. }, _callee61, this);
  14880. }));
  14881. return _Ft.apply(this, arguments);
  14882. }
  14883. var Kt = [{
  14884. rule: /fc_function_not_found|FUNCTION_NOT_FOUND/,
  14885. content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",
  14886. mode: "append"
  14887. }];
  14888. var jt = /[\\^$.*+?()[\]{}|]/g,
  14889. $t = RegExp(jt.source);
  14890. function Bt(e, t, n) {
  14891. return e.replace(new RegExp((s = t) && $t.test(s) ? s.replace(jt, "\\$&") : s, "g"), n);
  14892. var s;
  14893. }
  14894. var Wt = "none",
  14895. Ht = "request",
  14896. Jt = "response",
  14897. zt = "both";
  14898. var Vt = /*#__PURE__*/function () {
  14899. function Vt() {
  14900. var _ref26 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14901. e = _ref26.secretType,
  14902. t = _ref26.uniCloudIns;
  14903. (0, _classCallCheck2.default)(this, Vt);
  14904. this.clientType = "", this.secretType = e || Wt, this.uniCloudIns = t;
  14905. var _this$uniCloudIns$con = this.uniCloudIns.config,
  14906. n = _this$uniCloudIns$con.provider,
  14907. s = _this$uniCloudIns$con.spaceId;
  14908. var r;
  14909. this.provider = n, this.spaceId = s, this.scopedGlobalCache = (r = this.uniCloudIns, L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", r.config.spaceId)));
  14910. }
  14911. (0, _createClass2.default)(Vt, [{
  14912. key: "getSystemInfo",
  14913. value: function getSystemInfo() {
  14914. return this._systemInfo || (this._systemInfo = ae()), this._systemInfo;
  14915. }
  14916. }, {
  14917. key: "appId",
  14918. get: function get() {
  14919. return this.getSystemInfo().appId;
  14920. }
  14921. }, {
  14922. key: "deviceId",
  14923. get: function get() {
  14924. return this.getSystemInfo().deviceId;
  14925. }
  14926. }, {
  14927. key: "encryptData",
  14928. value: function () {
  14929. var _encryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39(e) {
  14930. return _regenerator.default.wrap(function _callee39$(_context39) {
  14931. while (1) {
  14932. switch (_context39.prev = _context39.next) {
  14933. case 0:
  14934. return _context39.abrupt("return", this.secretType === Wt ? e : this.platformEncryptData(e));
  14935. case 1:
  14936. case "end":
  14937. return _context39.stop();
  14938. }
  14939. }
  14940. }, _callee39, this);
  14941. }));
  14942. function encryptData(_x40) {
  14943. return _encryptData.apply(this, arguments);
  14944. }
  14945. return encryptData;
  14946. }()
  14947. }, {
  14948. key: "decryptResult",
  14949. value: function () {
  14950. var _decryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40(e) {
  14951. var _ref27, t, n;
  14952. return _regenerator.default.wrap(function _callee40$(_context40) {
  14953. while (1) {
  14954. switch (_context40.prev = _context40.next) {
  14955. case 0:
  14956. if (!(this.secretType === Wt)) {
  14957. _context40.next = 2;
  14958. break;
  14959. }
  14960. return _context40.abrupt("return", e);
  14961. case 2:
  14962. _ref27 = e || {}, t = _ref27.errCode, n = _ref27.content;
  14963. return _context40.abrupt("return", t || !n ? e : this.secretType === Ht ? n : this.platformDecryptResult(e));
  14964. case 4:
  14965. case "end":
  14966. return _context40.stop();
  14967. }
  14968. }
  14969. }, _callee40, this);
  14970. }));
  14971. function decryptResult(_x41) {
  14972. return _decryptResult.apply(this, arguments);
  14973. }
  14974. return decryptResult;
  14975. }()
  14976. }, {
  14977. key: "wrapVerifyClientCallFunction",
  14978. value: function wrapVerifyClientCallFunction(e) {
  14979. var t = this;
  14980. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41() {
  14981. var _ref29,
  14982. n,
  14983. _ref29$data,
  14984. s,
  14985. r,
  14986. _args41 = arguments;
  14987. return _regenerator.default.wrap(function _callee41$(_context41) {
  14988. while (1) {
  14989. switch (_context41.prev = _context41.next) {
  14990. case 0:
  14991. _ref29 = _args41.length > 0 && _args41[0] !== undefined ? _args41[0] : {}, n = _ref29.name, _ref29$data = _ref29.data, s = _ref29$data === void 0 ? {} : _ref29$data;
  14992. _context41.next = 3;
  14993. return t.prepare();
  14994. case 3:
  14995. _context41.next = 5;
  14996. return t.platformGetSignOption();
  14997. case 5:
  14998. (s = JSON.parse(JSON.stringify(s)))._uniCloudOptions = _context41.sent;
  14999. _context41.next = 8;
  15000. return e({
  15001. name: n,
  15002. data: s
  15003. });
  15004. case 8:
  15005. r = _context41.sent;
  15006. _context41.t0 = t.isClientKeyNotFound(r);
  15007. if (!_context41.t0) {
  15008. _context41.next = 19;
  15009. break;
  15010. }
  15011. _context41.next = 13;
  15012. return t.prepare({
  15013. forceUpdate: !0
  15014. });
  15015. case 13:
  15016. _context41.next = 15;
  15017. return t.platformGetSignOption();
  15018. case 15:
  15019. s._uniCloudOptions = _context41.sent;
  15020. _context41.next = 18;
  15021. return e({
  15022. name: n,
  15023. data: s
  15024. });
  15025. case 18:
  15026. r = _context41.sent;
  15027. case 19:
  15028. return _context41.abrupt("return", r);
  15029. case 20:
  15030. case "end":
  15031. return _context41.stop();
  15032. }
  15033. }
  15034. }, _callee41);
  15035. }));
  15036. }
  15037. }, {
  15038. key: "wrapEncryptDataCallFunction",
  15039. value: function wrapEncryptDataCallFunction(e) {
  15040. var t = this;
  15041. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42() {
  15042. var _ref31,
  15043. n,
  15044. _ref31$data,
  15045. s,
  15046. r,
  15047. i,
  15048. _r5,
  15049. _args42 = arguments;
  15050. return _regenerator.default.wrap(function _callee42$(_context42) {
  15051. while (1) {
  15052. switch (_context42.prev = _context42.next) {
  15053. case 0:
  15054. _ref31 = _args42.length > 0 && _args42[0] !== undefined ? _args42[0] : {}, n = _ref31.name, _ref31$data = _ref31.data, s = _ref31$data === void 0 ? {} : _ref31$data;
  15055. _context42.next = 3;
  15056. return t.prepare();
  15057. case 3:
  15058. _context42.next = 5;
  15059. return t.encryptData(s);
  15060. case 5:
  15061. r = _context42.sent;
  15062. _context42.next = 8;
  15063. return e({
  15064. name: n,
  15065. data: r
  15066. });
  15067. case 8:
  15068. i = _context42.sent;
  15069. if (!t.isClientKeyNotFound(i)) {
  15070. _context42.next = 21;
  15071. break;
  15072. }
  15073. _context42.next = 12;
  15074. return t.prepare({
  15075. forceUpdate: !0
  15076. });
  15077. case 12:
  15078. _context42.next = 14;
  15079. return t.encryptData(s);
  15080. case 14:
  15081. _r5 = _context42.sent;
  15082. _context42.next = 17;
  15083. return t.platformGetSignOption();
  15084. case 17:
  15085. s._uniCloudOptions = _context42.sent;
  15086. _context42.next = 20;
  15087. return e({
  15088. name: n,
  15089. data: _r5
  15090. });
  15091. case 20:
  15092. i = _context42.sent;
  15093. case 21:
  15094. _context42.next = 23;
  15095. return t.decryptResult(i.result);
  15096. case 23:
  15097. i.result = _context42.sent;
  15098. return _context42.abrupt("return", i);
  15099. case 25:
  15100. case "end":
  15101. return _context42.stop();
  15102. }
  15103. }
  15104. }, _callee42);
  15105. }));
  15106. }
  15107. }]);
  15108. return Vt;
  15109. }();
  15110. /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
  15111. function Gt(e) {
  15112. return parseInt(e) === e;
  15113. }
  15114. function Yt(e) {
  15115. if (!Gt(e.length)) return !1;
  15116. for (var t = 0; t < e.length; t++) {
  15117. if (!Gt(e[t]) || e[t] < 0 || e[t] > 255) return !1;
  15118. }
  15119. return !0;
  15120. }
  15121. function Qt(e, t) {
  15122. if (e.buffer && "Uint8Array" === e.name) return t && (e = e.slice ? e.slice() : Array.prototype.slice.call(e)), e;
  15123. if (Array.isArray(e)) {
  15124. if (!Yt(e)) throw new Error("Array contains invalid value: " + e);
  15125. return new Uint8Array(e);
  15126. }
  15127. if (Gt(e.length) && Yt(e)) return new Uint8Array(e);
  15128. throw new Error("unsupported array-like object");
  15129. }
  15130. function Xt(e) {
  15131. return new Uint8Array(e);
  15132. }
  15133. function Zt(e, t, n, s, r) {
  15134. null == s && null == r || (e = e.slice ? e.slice(s, r) : Array.prototype.slice.call(e, s, r)), t.set(e, n);
  15135. }
  15136. var en,
  15137. tn = {
  15138. toBytes: function toBytes(e) {
  15139. var t = [],
  15140. n = 0;
  15141. for (e = encodeURI(e); n < e.length;) {
  15142. var s = e.charCodeAt(n++);
  15143. 37 === s ? (t.push(parseInt(e.substr(n, 2), 16)), n += 2) : t.push(s);
  15144. }
  15145. return Qt(t);
  15146. },
  15147. fromBytes: function fromBytes(e) {
  15148. for (var t = [], n = 0; n < e.length;) {
  15149. var s = e[n];
  15150. s < 128 ? (t.push(String.fromCharCode(s)), n++) : s > 191 && s < 224 ? (t.push(String.fromCharCode((31 & s) << 6 | 63 & e[n + 1])), n += 2) : (t.push(String.fromCharCode((15 & s) << 12 | (63 & e[n + 1]) << 6 | 63 & e[n + 2])), n += 3);
  15151. }
  15152. return t.join("");
  15153. }
  15154. },
  15155. nn = (en = "0123456789abcdef", {
  15156. toBytes: function toBytes(e) {
  15157. for (var t = [], n = 0; n < e.length; n += 2) {
  15158. t.push(parseInt(e.substr(n, 2), 16));
  15159. }
  15160. return t;
  15161. },
  15162. fromBytes: function fromBytes(e) {
  15163. for (var t = [], n = 0; n < e.length; n++) {
  15164. var s = e[n];
  15165. t.push(en[(240 & s) >> 4] + en[15 & s]);
  15166. }
  15167. return t.join("");
  15168. }
  15169. }),
  15170. sn = {
  15171. 16: 10,
  15172. 24: 12,
  15173. 32: 14
  15174. },
  15175. rn = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145],
  15176. on = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22],
  15177. an = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125],
  15178. cn = [3328402341, 4168907908, 4000806809, 4135287693, 4294111757, 3597364157, 3731845041, 2445657428, 1613770832, 33620227, 3462883241, 1445669757, 3892248089, 3050821474, 1303096294, 3967186586, 2412431941, 528646813, 2311702848, 4202528135, 4026202645, 2992200171, 2387036105, 4226871307, 1101901292, 3017069671, 1604494077, 1169141738, 597466303, 1403299063, 3832705686, 2613100635, 1974974402, 3791519004, 1033081774, 1277568618, 1815492186, 2118074177, 4126668546, 2211236943, 1748251740, 1369810420, 3521504564, 4193382664, 3799085459, 2883115123, 1647391059, 706024767, 134480908, 2512897874, 1176707941, 2646852446, 806885416, 932615841, 168101135, 798661301, 235341577, 605164086, 461406363, 3756188221, 3454790438, 1311188841, 2142417613, 3933566367, 302582043, 495158174, 1479289972, 874125870, 907746093, 3698224818, 3025820398, 1537253627, 2756858614, 1983593293, 3084310113, 2108928974, 1378429307, 3722699582, 1580150641, 327451799, 2790478837, 3117535592, 0, 3253595436, 1075847264, 3825007647, 2041688520, 3059440621, 3563743934, 2378943302, 1740553945, 1916352843, 2487896798, 2555137236, 2958579944, 2244988746, 3151024235, 3320835882, 1336584933, 3992714006, 2252555205, 2588757463, 1714631509, 293963156, 2319795663, 3925473552, 67240454, 4269768577, 2689618160, 2017213508, 631218106, 1269344483, 2723238387, 1571005438, 2151694528, 93294474, 1066570413, 563977660, 1882732616, 4059428100, 1673313503, 2008463041, 2950355573, 1109467491, 537923632, 3858759450, 4260623118, 3218264685, 2177748300, 403442708, 638784309, 3287084079, 3193921505, 899127202, 2286175436, 773265209, 2479146071, 1437050866, 4236148354, 2050833735, 3362022572, 3126681063, 840505643, 3866325909, 3227541664, 427917720, 2655997905, 2749160575, 1143087718, 1412049534, 999329963, 193497219, 2353415882, 3354324521, 1807268051, 672404540, 2816401017, 3160301282, 369822493, 2916866934, 3688947771, 1681011286, 1949973070, 336202270, 2454276571, 201721354, 1210328172, 3093060836, 2680341085, 3184776046, 1135389935, 3294782118, 965841320, 831886756, 3554993207, 4068047243, 3588745010, 2345191491, 1849112409, 3664604599, 26054028, 2983581028, 2622377682, 1235855840, 3630984372, 2891339514, 4092916743, 3488279077, 3395642799, 4101667470, 1202630377, 268961816, 1874508501, 4034427016, 1243948399, 1546530418, 941366308, 1470539505, 1941222599, 2546386513, 3421038627, 2715671932, 3899946140, 1042226977, 2521517021, 1639824860, 227249030, 260737669, 3765465232, 2084453954, 1907733956, 3429263018, 2420656344, 100860677, 4160157185, 470683154, 3261161891, 1781871967, 2924959737, 1773779408, 394692241, 2579611992, 974986535, 664706745, 3655459128, 3958962195, 731420851, 571543859, 3530123707, 2849626480, 126783113, 865375399, 765172662, 1008606754, 361203602, 3387549984, 2278477385, 2857719295, 1344809080, 2782912378, 59542671, 1503764984, 160008576, 437062935, 1707065306, 3622233649, 2218934982, 3496503480, 2185314755, 697932208, 1512910199, 504303377, 2075177163, 2824099068, 1841019862, 739644986],
  15179. un = [2781242211, 2230877308, 2582542199, 2381740923, 234877682, 3184946027, 2984144751, 1418839493, 1348481072, 50462977, 2848876391, 2102799147, 434634494, 1656084439, 3863849899, 2599188086, 1167051466, 2636087938, 1082771913, 2281340285, 368048890, 3954334041, 3381544775, 201060592, 3963727277, 1739838676, 4250903202, 3930435503, 3206782108, 4149453988, 2531553906, 1536934080, 3262494647, 484572669, 2923271059, 1783375398, 1517041206, 1098792767, 49674231, 1334037708, 1550332980, 4098991525, 886171109, 150598129, 2481090929, 1940642008, 1398944049, 1059722517, 201851908, 1385547719, 1699095331, 1587397571, 674240536, 2704774806, 252314885, 3039795866, 151914247, 908333586, 2602270848, 1038082786, 651029483, 1766729511, 3447698098, 2682942837, 454166793, 2652734339, 1951935532, 775166490, 758520603, 3000790638, 4004797018, 4217086112, 4137964114, 1299594043, 1639438038, 3464344499, 2068982057, 1054729187, 1901997871, 2534638724, 4121318227, 1757008337, 0, 750906861, 1614815264, 535035132, 3363418545, 3988151131, 3201591914, 1183697867, 3647454910, 1265776953, 3734260298, 3566750796, 3903871064, 1250283471, 1807470800, 717615087, 3847203498, 384695291, 3313910595, 3617213773, 1432761139, 2484176261, 3481945413, 283769337, 100925954, 2180939647, 4037038160, 1148730428, 3123027871, 3813386408, 4087501137, 4267549603, 3229630528, 2315620239, 2906624658, 3156319645, 1215313976, 82966005, 3747855548, 3245848246, 1974459098, 1665278241, 807407632, 451280895, 251524083, 1841287890, 1283575245, 337120268, 891687699, 801369324, 3787349855, 2721421207, 3431482436, 959321879, 1469301956, 4065699751, 2197585534, 1199193405, 2898814052, 3887750493, 724703513, 2514908019, 2696962144, 2551808385, 3516813135, 2141445340, 1715741218, 2119445034, 2872807568, 2198571144, 3398190662, 700968686, 3547052216, 1009259540, 2041044702, 3803995742, 487983883, 1991105499, 1004265696, 1449407026, 1316239930, 504629770, 3683797321, 168560134, 1816667172, 3837287516, 1570751170, 1857934291, 4014189740, 2797888098, 2822345105, 2754712981, 936633572, 2347923833, 852879335, 1133234376, 1500395319, 3084545389, 2348912013, 1689376213, 3533459022, 3762923945, 3034082412, 4205598294, 133428468, 634383082, 2949277029, 2398386810, 3913789102, 403703816, 3580869306, 2297460856, 1867130149, 1918643758, 607656988, 4049053350, 3346248884, 1368901318, 600565992, 2090982877, 2632479860, 557719327, 3717614411, 3697393085, 2249034635, 2232388234, 2430627952, 1115438654, 3295786421, 2865522278, 3633334344, 84280067, 33027830, 303828494, 2747425121, 1600795957, 4188952407, 3496589753, 2434238086, 1486471617, 658119965, 3106381470, 953803233, 334231800, 3005978776, 857870609, 3151128937, 1890179545, 2298973838, 2805175444, 3056442267, 574365214, 2450884487, 550103529, 1233637070, 4289353045, 2018519080, 2057691103, 2399374476, 4166623649, 2148108681, 387583245, 3664101311, 836232934, 3330556482, 3100665960, 3280093505, 2955516313, 2002398509, 287182607, 3413881008, 4238890068, 3597515707, 975967766],
  15180. ln = [1671808611, 2089089148, 2006576759, 2072901243, 4061003762, 1807603307, 1873927791, 3310653893, 810573872, 16974337, 1739181671, 729634347, 4263110654, 3613570519, 2883997099, 1989864566, 3393556426, 2191335298, 3376449993, 2106063485, 4195741690, 1508618841, 1204391495, 4027317232, 2917941677, 3563566036, 2734514082, 2951366063, 2629772188, 2767672228, 1922491506, 3227229120, 3082974647, 4246528509, 2477669779, 644500518, 911895606, 1061256767, 4144166391, 3427763148, 878471220, 2784252325, 3845444069, 4043897329, 1905517169, 3631459288, 827548209, 356461077, 67897348, 3344078279, 593839651, 3277757891, 405286936, 2527147926, 84871685, 2595565466, 118033927, 305538066, 2157648768, 3795705826, 3945188843, 661212711, 2999812018, 1973414517, 152769033, 2208177539, 745822252, 439235610, 455947803, 1857215598, 1525593178, 2700827552, 1391895634, 994932283, 3596728278, 3016654259, 695947817, 3812548067, 795958831, 2224493444, 1408607827, 3513301457, 0, 3979133421, 543178784, 4229948412, 2982705585, 1542305371, 1790891114, 3410398667, 3201918910, 961245753, 1256100938, 1289001036, 1491644504, 3477767631, 3496721360, 4012557807, 2867154858, 4212583931, 1137018435, 1305975373, 861234739, 2241073541, 1171229253, 4178635257, 33948674, 2139225727, 1357946960, 1011120188, 2679776671, 2833468328, 1374921297, 2751356323, 1086357568, 2408187279, 2460827538, 2646352285, 944271416, 4110742005, 3168756668, 3066132406, 3665145818, 560153121, 271589392, 4279952895, 4077846003, 3530407890, 3444343245, 202643468, 322250259, 3962553324, 1608629855, 2543990167, 1154254916, 389623319, 3294073796, 2817676711, 2122513534, 1028094525, 1689045092, 1575467613, 422261273, 1939203699, 1621147744, 2174228865, 1339137615, 3699352540, 577127458, 712922154, 2427141008, 2290289544, 1187679302, 3995715566, 3100863416, 339486740, 3732514782, 1591917662, 186455563, 3681988059, 3762019296, 844522546, 978220090, 169743370, 1239126601, 101321734, 611076132, 1558493276, 3260915650, 3547250131, 2901361580, 1655096418, 2443721105, 2510565781, 3828863972, 2039214713, 3878868455, 3359869896, 928607799, 1840765549, 2374762893, 3580146133, 1322425422, 2850048425, 1823791212, 1459268694, 4094161908, 3928346602, 1706019429, 2056189050, 2934523822, 135794696, 3134549946, 2022240376, 628050469, 779246638, 472135708, 2800834470, 3032970164, 3327236038, 3894660072, 3715932637, 1956440180, 522272287, 1272813131, 3185336765, 2340818315, 2323976074, 1888542832, 1044544574, 3049550261, 1722469478, 1222152264, 50660867, 4127324150, 236067854, 1638122081, 895445557, 1475980887, 3117443513, 2257655686, 3243809217, 489110045, 2662934430, 3778599393, 4162055160, 2561878936, 288563729, 1773916777, 3648039385, 2391345038, 2493985684, 2612407707, 505560094, 2274497927, 3911240169, 3460925390, 1442818645, 678973480, 3749357023, 2358182796, 2717407649, 2306869641, 219617805, 3218761151, 3862026214, 1120306242, 1756942440, 1103331905, 2578459033, 762796589, 252780047, 2966125488, 1425844308, 3151392187, 372911126],
  15181. hn = [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760, 2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704, 4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573, 3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021, 2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428, 1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848, 3149649517, 370555436],
  15182. dn = [1374988112, 2118214995, 437757123, 975658646, 1001089995, 530400753, 2902087851, 1273168787, 540080725, 2910219766, 2295101073, 4110568485, 1340463100, 3307916247, 641025152, 3043140495, 3736164937, 632953703, 1172967064, 1576976609, 3274667266, 2169303058, 2370213795, 1809054150, 59727847, 361929877, 3211623147, 2505202138, 3569255213, 1484005843, 1239443753, 2395588676, 1975683434, 4102977912, 2572697195, 666464733, 3202437046, 4035489047, 3374361702, 2110667444, 1675577880, 3843699074, 2538681184, 1649639237, 2976151520, 3144396420, 4269907996, 4178062228, 1883793496, 2403728665, 2497604743, 1383856311, 2876494627, 1917518562, 3810496343, 1716890410, 3001755655, 800440835, 2261089178, 3543599269, 807962610, 599762354, 33778362, 3977675356, 2328828971, 2809771154, 4077384432, 1315562145, 1708848333, 101039829, 3509871135, 3299278474, 875451293, 2733856160, 92987698, 2767645557, 193195065, 1080094634, 1584504582, 3178106961, 1042385657, 2531067453, 3711829422, 1306967366, 2438237621, 1908694277, 67556463, 1615861247, 429456164, 3602770327, 2302690252, 1742315127, 2968011453, 126454664, 3877198648, 2043211483, 2709260871, 2084704233, 4169408201, 0, 159417987, 841739592, 504459436, 1817866830, 4245618683, 260388950, 1034867998, 908933415, 168810852, 1750902305, 2606453969, 607530554, 202008497, 2472011535, 3035535058, 463180190, 2160117071, 1641816226, 1517767529, 470948374, 3801332234, 3231722213, 1008918595, 303765277, 235474187, 4069246893, 766945465, 337553864, 1475418501, 2943682380, 4003061179, 2743034109, 4144047775, 1551037884, 1147550661, 1543208500, 2336434550, 3408119516, 3069049960, 3102011747, 3610369226, 1113818384, 328671808, 2227573024, 2236228733, 3535486456, 2935566865, 3341394285, 496906059, 3702665459, 226906860, 2009195472, 733156972, 2842737049, 294930682, 1206477858, 2835123396, 2700099354, 1451044056, 573804783, 2269728455, 3644379585, 2362090238, 2564033334, 2801107407, 2776292904, 3669462566, 1068351396, 742039012, 1350078989, 1784663195, 1417561698, 4136440770, 2430122216, 775550814, 2193862645, 2673705150, 1775276924, 1876241833, 3475313331, 3366754619, 270040487, 3902563182, 3678124923, 3441850377, 1851332852, 3969562369, 2203032232, 3868552805, 2868897406, 566021896, 4011190502, 3135740889, 1248802510, 3936291284, 699432150, 832877231, 708780849, 3332740144, 899835584, 1951317047, 4236429990, 3767586992, 866637845, 4043610186, 1106041591, 2144161806, 395441711, 1984812685, 1139781709, 3433712980, 3835036895, 2664543715, 1282050075, 3240894392, 1181045119, 2640243204, 25965917, 4203181171, 4211818798, 3009879386, 2463879762, 3910161971, 1842759443, 2597806476, 933301370, 1509430414, 3943906441, 3467192302, 3076639029, 3776767469, 2051518780, 2631065433, 1441952575, 404016761, 1942435775, 1408749034, 1610459739, 3745345300, 2017778566, 3400528769, 3110650942, 941896748, 3265478751, 371049330, 3168937228, 675039627, 4279080257, 967311729, 135050206, 3635733660, 1683407248, 2076935265, 3576870512, 1215061108, 3501741890],
  15183. pn = [1347548327, 1400783205, 3273267108, 2520393566, 3409685355, 4045380933, 2880240216, 2471224067, 1428173050, 4138563181, 2441661558, 636813900, 4233094615, 3620022987, 2149987652, 2411029155, 1239331162, 1730525723, 2554718734, 3781033664, 46346101, 310463728, 2743944855, 3328955385, 3875770207, 2501218972, 3955191162, 3667219033, 768917123, 3545789473, 692707433, 1150208456, 1786102409, 2029293177, 1805211710, 3710368113, 3065962831, 401639597, 1724457132, 3028143674, 409198410, 2196052529, 1620529459, 1164071807, 3769721975, 2226875310, 486441376, 2499348523, 1483753576, 428819965, 2274680428, 3075636216, 598438867, 3799141122, 1474502543, 711349675, 129166120, 53458370, 2592523643, 2782082824, 4063242375, 2988687269, 3120694122, 1559041666, 730517276, 2460449204, 4042459122, 2706270690, 3446004468, 3573941694, 533804130, 2328143614, 2637442643, 2695033685, 839224033, 1973745387, 957055980, 2856345839, 106852767, 1371368976, 4181598602, 1033297158, 2933734917, 1179510461, 3046200461, 91341917, 1862534868, 4284502037, 605657339, 2547432937, 3431546947, 2003294622, 3182487618, 2282195339, 954669403, 3682191598, 1201765386, 3917234703, 3388507166, 0, 2198438022, 1211247597, 2887651696, 1315723890, 4227665663, 1443857720, 507358933, 657861945, 1678381017, 560487590, 3516619604, 975451694, 2970356327, 261314535, 3535072918, 2652609425, 1333838021, 2724322336, 1767536459, 370938394, 182621114, 3854606378, 1128014560, 487725847, 185469197, 2918353863, 3106780840, 3356761769, 2237133081, 1286567175, 3152976349, 4255350624, 2683765030, 3160175349, 3309594171, 878443390, 1988838185, 3704300486, 1756818940, 1673061617, 3403100636, 272786309, 1075025698, 545572369, 2105887268, 4174560061, 296679730, 1841768865, 1260232239, 4091327024, 3960309330, 3497509347, 1814803222, 2578018489, 4195456072, 575138148, 3299409036, 446754879, 3629546796, 4011996048, 3347532110, 3252238545, 4270639778, 915985419, 3483825537, 681933534, 651868046, 2755636671, 3828103837, 223377554, 2607439820, 1649704518, 3270937875, 3901806776, 1580087799, 4118987695, 3198115200, 2087309459, 2842678573, 3016697106, 1003007129, 2802849917, 1860738147, 2077965243, 164439672, 4100872472, 32283319, 2827177882, 1709610350, 2125135846, 136428751, 3874428392, 3652904859, 3460984630, 3572145929, 3593056380, 2939266226, 824852259, 818324884, 3224740454, 930369212, 2801566410, 2967507152, 355706840, 1257309336, 4148292826, 243256656, 790073846, 2373340630, 1296297904, 1422699085, 3756299780, 3818836405, 457992840, 3099667487, 2135319889, 77422314, 1560382517, 1945798516, 788204353, 1521706781, 1385356242, 870912086, 325965383, 2358957921, 2050466060, 2388260884, 2313884476, 4006521127, 901210569, 3990953189, 1014646705, 1503449823, 1062597235, 2031621326, 3212035895, 3931371469, 1533017514, 350174575, 2256028891, 2177544179, 1052338372, 741876788, 1606591296, 1914052035, 213705253, 2334669897, 1107234197, 1899603969, 3725069491, 2631447780, 2422494913, 1635502980, 1893020342, 1950903388, 1120974935],
  15184. fn = [2807058932, 1699970625, 2764249623, 1586903591, 1808481195, 1173430173, 1487645946, 59984867, 4199882800, 1844882806, 1989249228, 1277555970, 3623636965, 3419915562, 1149249077, 2744104290, 1514790577, 459744698, 244860394, 3235995134, 1963115311, 4027744588, 2544078150, 4190530515, 1608975247, 2627016082, 2062270317, 1507497298, 2200818878, 567498868, 1764313568, 3359936201, 2305455554, 2037970062, 1047239e3, 1910319033, 1337376481, 2904027272, 2892417312, 984907214, 1243112415, 830661914, 861968209, 2135253587, 2011214180, 2927934315, 2686254721, 731183368, 1750626376, 4246310725, 1820824798, 4172763771, 3542330227, 48394827, 2404901663, 2871682645, 671593195, 3254988725, 2073724613, 145085239, 2280796200, 2779915199, 1790575107, 2187128086, 472615631, 3029510009, 4075877127, 3802222185, 4107101658, 3201631749, 1646252340, 4270507174, 1402811438, 1436590835, 3778151818, 3950355702, 3963161475, 4020912224, 2667994737, 273792366, 2331590177, 104699613, 95345982, 3175501286, 2377486676, 1560637892, 3564045318, 369057872, 4213447064, 3919042237, 1137477952, 2658625497, 1119727848, 2340947849, 1530455833, 4007360968, 172466556, 266959938, 516552836, 0, 2256734592, 3980931627, 1890328081, 1917742170, 4294704398, 945164165, 3575528878, 958871085, 3647212047, 2787207260, 1423022939, 775562294, 1739656202, 3876557655, 2530391278, 2443058075, 3310321856, 547512796, 1265195639, 437656594, 3121275539, 719700128, 3762502690, 387781147, 218828297, 3350065803, 2830708150, 2848461854, 428169201, 122466165, 3720081049, 1627235199, 648017665, 4122762354, 1002783846, 2117360635, 695634755, 3336358691, 4234721005, 4049844452, 3704280881, 2232435299, 574624663, 287343814, 612205898, 1039717051, 840019705, 2708326185, 793451934, 821288114, 1391201670, 3822090177, 376187827, 3113855344, 1224348052, 1679968233, 2361698556, 1058709744, 752375421, 2431590963, 1321699145, 3519142200, 2734591178, 188127444, 2177869557, 3727205754, 2384911031, 3215212461, 2648976442, 2450346104, 3432737375, 1180849278, 331544205, 3102249176, 4150144569, 2952102595, 2159976285, 2474404304, 766078933, 313773861, 2570832044, 2108100632, 1668212892, 3145456443, 2013908262, 418672217, 3070356634, 2594734927, 1852171925, 3867060991, 3473416636, 3907448597, 2614737639, 919489135, 164948639, 2094410160, 2997825956, 590424639, 2486224549, 1723872674, 3157750862, 3399941250, 3501252752, 3625268135, 2555048196, 3673637356, 1343127501, 4130281361, 3599595085, 2957853679, 1297403050, 81781910, 3051593425, 2283490410, 532201772, 1367295589, 3926170974, 895287692, 1953757831, 1093597963, 492483431, 3528626907, 1446242576, 1192455638, 1636604631, 209336225, 344873464, 1015671571, 669961897, 3375740769, 3857572124, 2973530695, 3747192018, 1933530610, 3464042516, 935293895, 3454686199, 2858115069, 1863638845, 3683022916, 4085369519, 3292445032, 875313188, 1080017571, 3279033885, 621591778, 1233856572, 2504130317, 24197544, 3017672716, 3835484340, 3247465558, 2220981195, 3060847922, 1551124588, 1463996600],
  15185. gn = [4104605777, 1097159550, 396673818, 660510266, 2875968315, 2638606623, 4200115116, 3808662347, 821712160, 1986918061, 3430322568, 38544885, 3856137295, 718002117, 893681702, 1654886325, 2975484382, 3122358053, 3926825029, 4274053469, 796197571, 1290801793, 1184342925, 3556361835, 2405426947, 2459735317, 1836772287, 1381620373, 3196267988, 1948373848, 3764988233, 3385345166, 3263785589, 2390325492, 1480485785, 3111247143, 3780097726, 2293045232, 548169417, 3459953789, 3746175075, 439452389, 1362321559, 1400849762, 1685577905, 1806599355, 2174754046, 137073913, 1214797936, 1174215055, 3731654548, 2079897426, 1943217067, 1258480242, 529487843, 1437280870, 3945269170, 3049390895, 3313212038, 923313619, 679998e3, 3215307299, 57326082, 377642221, 3474729866, 2041877159, 133361907, 1776460110, 3673476453, 96392454, 878845905, 2801699524, 777231668, 4082475170, 2330014213, 4142626212, 2213296395, 1626319424, 1906247262, 1846563261, 562755902, 3708173718, 1040559837, 3871163981, 1418573201, 3294430577, 114585348, 1343618912, 2566595609, 3186202582, 1078185097, 3651041127, 3896688048, 2307622919, 425408743, 3371096953, 2081048481, 1108339068, 2216610296, 0, 2156299017, 736970802, 292596766, 1517440620, 251657213, 2235061775, 2933202493, 758720310, 265905162, 1554391400, 1532285339, 908999204, 174567692, 1474760595, 4002861748, 2610011675, 3234156416, 3693126241, 2001430874, 303699484, 2478443234, 2687165888, 585122620, 454499602, 151849742, 2345119218, 3064510765, 514443284, 4044981591, 1963412655, 2581445614, 2137062819, 19308535, 1928707164, 1715193156, 4219352155, 1126790795, 600235211, 3992742070, 3841024952, 836553431, 1669664834, 2535604243, 3323011204, 1243905413, 3141400786, 4180808110, 698445255, 2653899549, 2989552604, 2253581325, 3252932727, 3004591147, 1891211689, 2487810577, 3915653703, 4237083816, 4030667424, 2100090966, 865136418, 1229899655, 953270745, 3399679628, 3557504664, 4118925222, 2061379749, 3079546586, 2915017791, 983426092, 2022837584, 1607244650, 2118541908, 2366882550, 3635996816, 972512814, 3283088770, 1568718495, 3499326569, 3576539503, 621982671, 2895723464, 410887952, 2623762152, 1002142683, 645401037, 1494807662, 2595684844, 1335535747, 2507040230, 4293295786, 3167684641, 367585007, 3885750714, 1865862730, 2668221674, 2960971305, 2763173681, 1059270954, 2777952454, 2724642869, 1320957812, 2194319100, 2429595872, 2815956275, 77089521, 3973773121, 3444575871, 2448830231, 1305906550, 4021308739, 2857194700, 2516901860, 3518358430, 1787304780, 740276417, 1699839814, 1592394909, 2352307457, 2272556026, 188821243, 1729977011, 3687994002, 274084841, 3594982253, 3613494426, 2701949495, 4162096729, 322734571, 2837966542, 1640576439, 484830689, 1202797690, 3537852828, 4067639125, 349075736, 3342319475, 4157467219, 4255800159, 1030690015, 1155237496, 2951971274, 1757691577, 607398968, 2738905026, 499347990, 3794078908, 1011452712, 227885567, 2818666809, 213114376, 3034881240, 1455525988, 3414450555, 850817237, 1817998408, 3092726480],
  15186. mn = [0, 235474187, 470948374, 303765277, 941896748, 908933415, 607530554, 708780849, 1883793496, 2118214995, 1817866830, 1649639237, 1215061108, 1181045119, 1417561698, 1517767529, 3767586992, 4003061179, 4236429990, 4069246893, 3635733660, 3602770327, 3299278474, 3400528769, 2430122216, 2664543715, 2362090238, 2193862645, 2835123396, 2801107407, 3035535058, 3135740889, 3678124923, 3576870512, 3341394285, 3374361702, 3810496343, 3977675356, 4279080257, 4043610186, 2876494627, 2776292904, 3076639029, 3110650942, 2472011535, 2640243204, 2403728665, 2169303058, 1001089995, 899835584, 666464733, 699432150, 59727847, 226906860, 530400753, 294930682, 1273168787, 1172967064, 1475418501, 1509430414, 1942435775, 2110667444, 1876241833, 1641816226, 2910219766, 2743034109, 2976151520, 3211623147, 2505202138, 2606453969, 2302690252, 2269728455, 3711829422, 3543599269, 3240894392, 3475313331, 3843699074, 3943906441, 4178062228, 4144047775, 1306967366, 1139781709, 1374988112, 1610459739, 1975683434, 2076935265, 1775276924, 1742315127, 1034867998, 866637845, 566021896, 800440835, 92987698, 193195065, 429456164, 395441711, 1984812685, 2017778566, 1784663195, 1683407248, 1315562145, 1080094634, 1383856311, 1551037884, 101039829, 135050206, 437757123, 337553864, 1042385657, 807962610, 573804783, 742039012, 2531067453, 2564033334, 2328828971, 2227573024, 2935566865, 2700099354, 3001755655, 3168937228, 3868552805, 3902563182, 4203181171, 4102977912, 3736164937, 3501741890, 3265478751, 3433712980, 1106041591, 1340463100, 1576976609, 1408749034, 2043211483, 2009195472, 1708848333, 1809054150, 832877231, 1068351396, 766945465, 599762354, 159417987, 126454664, 361929877, 463180190, 2709260871, 2943682380, 3178106961, 3009879386, 2572697195, 2538681184, 2236228733, 2336434550, 3509871135, 3745345300, 3441850377, 3274667266, 3910161971, 3877198648, 4110568485, 4211818798, 2597806476, 2497604743, 2261089178, 2295101073, 2733856160, 2902087851, 3202437046, 2968011453, 3936291284, 3835036895, 4136440770, 4169408201, 3535486456, 3702665459, 3467192302, 3231722213, 2051518780, 1951317047, 1716890410, 1750902305, 1113818384, 1282050075, 1584504582, 1350078989, 168810852, 67556463, 371049330, 404016761, 841739592, 1008918595, 775550814, 540080725, 3969562369, 3801332234, 4035489047, 4269907996, 3569255213, 3669462566, 3366754619, 3332740144, 2631065433, 2463879762, 2160117071, 2395588676, 2767645557, 2868897406, 3102011747, 3069049960, 202008497, 33778362, 270040487, 504459436, 875451293, 975658646, 675039627, 641025152, 2084704233, 1917518562, 1615861247, 1851332852, 1147550661, 1248802510, 1484005843, 1451044056, 933301370, 967311729, 733156972, 632953703, 260388950, 25965917, 328671808, 496906059, 1206477858, 1239443753, 1543208500, 1441952575, 2144161806, 1908694277, 1675577880, 1842759443, 3610369226, 3644379585, 3408119516, 3307916247, 4011190502, 3776767469, 4077384432, 4245618683, 2809771154, 2842737049, 3144396420, 3043140495, 2673705150, 2438237621, 2203032232, 2370213795],
  15187. yn = [0, 185469197, 370938394, 487725847, 741876788, 657861945, 975451694, 824852259, 1483753576, 1400783205, 1315723890, 1164071807, 1950903388, 2135319889, 1649704518, 1767536459, 2967507152, 3152976349, 2801566410, 2918353863, 2631447780, 2547432937, 2328143614, 2177544179, 3901806776, 3818836405, 4270639778, 4118987695, 3299409036, 3483825537, 3535072918, 3652904859, 2077965243, 1893020342, 1841768865, 1724457132, 1474502543, 1559041666, 1107234197, 1257309336, 598438867, 681933534, 901210569, 1052338372, 261314535, 77422314, 428819965, 310463728, 3409685355, 3224740454, 3710368113, 3593056380, 3875770207, 3960309330, 4045380933, 4195456072, 2471224067, 2554718734, 2237133081, 2388260884, 3212035895, 3028143674, 2842678573, 2724322336, 4138563181, 4255350624, 3769721975, 3955191162, 3667219033, 3516619604, 3431546947, 3347532110, 2933734917, 2782082824, 3099667487, 3016697106, 2196052529, 2313884476, 2499348523, 2683765030, 1179510461, 1296297904, 1347548327, 1533017514, 1786102409, 1635502980, 2087309459, 2003294622, 507358933, 355706840, 136428751, 53458370, 839224033, 957055980, 605657339, 790073846, 2373340630, 2256028891, 2607439820, 2422494913, 2706270690, 2856345839, 3075636216, 3160175349, 3573941694, 3725069491, 3273267108, 3356761769, 4181598602, 4063242375, 4011996048, 3828103837, 1033297158, 915985419, 730517276, 545572369, 296679730, 446754879, 129166120, 213705253, 1709610350, 1860738147, 1945798516, 2029293177, 1239331162, 1120974935, 1606591296, 1422699085, 4148292826, 4233094615, 3781033664, 3931371469, 3682191598, 3497509347, 3446004468, 3328955385, 2939266226, 2755636671, 3106780840, 2988687269, 2198438022, 2282195339, 2501218972, 2652609425, 1201765386, 1286567175, 1371368976, 1521706781, 1805211710, 1620529459, 2105887268, 1988838185, 533804130, 350174575, 164439672, 46346101, 870912086, 954669403, 636813900, 788204353, 2358957921, 2274680428, 2592523643, 2441661558, 2695033685, 2880240216, 3065962831, 3182487618, 3572145929, 3756299780, 3270937875, 3388507166, 4174560061, 4091327024, 4006521127, 3854606378, 1014646705, 930369212, 711349675, 560487590, 272786309, 457992840, 106852767, 223377554, 1678381017, 1862534868, 1914052035, 2031621326, 1211247597, 1128014560, 1580087799, 1428173050, 32283319, 182621114, 401639597, 486441376, 768917123, 651868046, 1003007129, 818324884, 1503449823, 1385356242, 1333838021, 1150208456, 1973745387, 2125135846, 1673061617, 1756818940, 2970356327, 3120694122, 2802849917, 2887651696, 2637442643, 2520393566, 2334669897, 2149987652, 3917234703, 3799141122, 4284502037, 4100872472, 3309594171, 3460984630, 3545789473, 3629546796, 2050466060, 1899603969, 1814803222, 1730525723, 1443857720, 1560382517, 1075025698, 1260232239, 575138148, 692707433, 878443390, 1062597235, 243256656, 91341917, 409198410, 325965383, 3403100636, 3252238545, 3704300486, 3620022987, 3874428392, 3990953189, 4042459122, 4227665663, 2460449204, 2578018489, 2226875310, 2411029155, 3198115200, 3046200461, 2827177882, 2743944855],
  15188. _n = [0, 218828297, 437656594, 387781147, 875313188, 958871085, 775562294, 590424639, 1750626376, 1699970625, 1917742170, 2135253587, 1551124588, 1367295589, 1180849278, 1265195639, 3501252752, 3720081049, 3399941250, 3350065803, 3835484340, 3919042237, 4270507174, 4085369519, 3102249176, 3051593425, 2734591178, 2952102595, 2361698556, 2177869557, 2530391278, 2614737639, 3145456443, 3060847922, 2708326185, 2892417312, 2404901663, 2187128086, 2504130317, 2555048196, 3542330227, 3727205754, 3375740769, 3292445032, 3876557655, 3926170974, 4246310725, 4027744588, 1808481195, 1723872674, 1910319033, 2094410160, 1608975247, 1391201670, 1173430173, 1224348052, 59984867, 244860394, 428169201, 344873464, 935293895, 984907214, 766078933, 547512796, 1844882806, 1627235199, 2011214180, 2062270317, 1507497298, 1423022939, 1137477952, 1321699145, 95345982, 145085239, 532201772, 313773861, 830661914, 1015671571, 731183368, 648017665, 3175501286, 2957853679, 2807058932, 2858115069, 2305455554, 2220981195, 2474404304, 2658625497, 3575528878, 3625268135, 3473416636, 3254988725, 3778151818, 3963161475, 4213447064, 4130281361, 3599595085, 3683022916, 3432737375, 3247465558, 3802222185, 4020912224, 4172763771, 4122762354, 3201631749, 3017672716, 2764249623, 2848461854, 2331590177, 2280796200, 2431590963, 2648976442, 104699613, 188127444, 472615631, 287343814, 840019705, 1058709744, 671593195, 621591778, 1852171925, 1668212892, 1953757831, 2037970062, 1514790577, 1463996600, 1080017571, 1297403050, 3673637356, 3623636965, 3235995134, 3454686199, 4007360968, 3822090177, 4107101658, 4190530515, 2997825956, 3215212461, 2830708150, 2779915199, 2256734592, 2340947849, 2627016082, 2443058075, 172466556, 122466165, 273792366, 492483431, 1047239e3, 861968209, 612205898, 695634755, 1646252340, 1863638845, 2013908262, 1963115311, 1446242576, 1530455833, 1277555970, 1093597963, 1636604631, 1820824798, 2073724613, 1989249228, 1436590835, 1487645946, 1337376481, 1119727848, 164948639, 81781910, 331544205, 516552836, 1039717051, 821288114, 669961897, 719700128, 2973530695, 3157750862, 2871682645, 2787207260, 2232435299, 2283490410, 2667994737, 2450346104, 3647212047, 3564045318, 3279033885, 3464042516, 3980931627, 3762502690, 4150144569, 4199882800, 3070356634, 3121275539, 2904027272, 2686254721, 2200818878, 2384911031, 2570832044, 2486224549, 3747192018, 3528626907, 3310321856, 3359936201, 3950355702, 3867060991, 4049844452, 4234721005, 1739656202, 1790575107, 2108100632, 1890328081, 1402811438, 1586903591, 1233856572, 1149249077, 266959938, 48394827, 369057872, 418672217, 1002783846, 919489135, 567498868, 752375421, 209336225, 24197544, 376187827, 459744698, 945164165, 895287692, 574624663, 793451934, 1679968233, 1764313568, 2117360635, 1933530610, 1343127501, 1560637892, 1243112415, 1192455638, 3704280881, 3519142200, 3336358691, 3419915562, 3907448597, 3857572124, 4075877127, 4294704398, 3029510009, 3113855344, 2927934315, 2744104290, 2159976285, 2377486676, 2594734927, 2544078150],
  15189. wn = [0, 151849742, 303699484, 454499602, 607398968, 758720310, 908999204, 1059270954, 1214797936, 1097159550, 1517440620, 1400849762, 1817998408, 1699839814, 2118541908, 2001430874, 2429595872, 2581445614, 2194319100, 2345119218, 3034881240, 3186202582, 2801699524, 2951971274, 3635996816, 3518358430, 3399679628, 3283088770, 4237083816, 4118925222, 4002861748, 3885750714, 1002142683, 850817237, 698445255, 548169417, 529487843, 377642221, 227885567, 77089521, 1943217067, 2061379749, 1640576439, 1757691577, 1474760595, 1592394909, 1174215055, 1290801793, 2875968315, 2724642869, 3111247143, 2960971305, 2405426947, 2253581325, 2638606623, 2487810577, 3808662347, 3926825029, 4044981591, 4162096729, 3342319475, 3459953789, 3576539503, 3693126241, 1986918061, 2137062819, 1685577905, 1836772287, 1381620373, 1532285339, 1078185097, 1229899655, 1040559837, 923313619, 740276417, 621982671, 439452389, 322734571, 137073913, 19308535, 3871163981, 4021308739, 4104605777, 4255800159, 3263785589, 3414450555, 3499326569, 3651041127, 2933202493, 2815956275, 3167684641, 3049390895, 2330014213, 2213296395, 2566595609, 2448830231, 1305906550, 1155237496, 1607244650, 1455525988, 1776460110, 1626319424, 2079897426, 1928707164, 96392454, 213114376, 396673818, 514443284, 562755902, 679998e3, 865136418, 983426092, 3708173718, 3557504664, 3474729866, 3323011204, 4180808110, 4030667424, 3945269170, 3794078908, 2507040230, 2623762152, 2272556026, 2390325492, 2975484382, 3092726480, 2738905026, 2857194700, 3973773121, 3856137295, 4274053469, 4157467219, 3371096953, 3252932727, 3673476453, 3556361835, 2763173681, 2915017791, 3064510765, 3215307299, 2156299017, 2307622919, 2459735317, 2610011675, 2081048481, 1963412655, 1846563261, 1729977011, 1480485785, 1362321559, 1243905413, 1126790795, 878845905, 1030690015, 645401037, 796197571, 274084841, 425408743, 38544885, 188821243, 3613494426, 3731654548, 3313212038, 3430322568, 4082475170, 4200115116, 3780097726, 3896688048, 2668221674, 2516901860, 2366882550, 2216610296, 3141400786, 2989552604, 2837966542, 2687165888, 1202797690, 1320957812, 1437280870, 1554391400, 1669664834, 1787304780, 1906247262, 2022837584, 265905162, 114585348, 499347990, 349075736, 736970802, 585122620, 972512814, 821712160, 2595684844, 2478443234, 2293045232, 2174754046, 3196267988, 3079546586, 2895723464, 2777952454, 3537852828, 3687994002, 3234156416, 3385345166, 4142626212, 4293295786, 3841024952, 3992742070, 174567692, 57326082, 410887952, 292596766, 777231668, 660510266, 1011452712, 893681702, 1108339068, 1258480242, 1343618912, 1494807662, 1715193156, 1865862730, 1948373848, 2100090966, 2701949495, 2818666809, 3004591147, 3122358053, 2235061775, 2352307457, 2535604243, 2653899549, 3915653703, 3764988233, 4219352155, 4067639125, 3444575871, 3294430577, 3746175075, 3594982253, 836553431, 953270745, 600235211, 718002117, 367585007, 484830689, 133361907, 251657213, 2041877159, 1891211689, 1806599355, 1654886325, 1568718495, 1418573201, 1335535747, 1184342925];
  15190. function vn(e) {
  15191. for (var t = [], n = 0; n < e.length; n += 4) {
  15192. t.push(e[n] << 24 | e[n + 1] << 16 | e[n + 2] << 8 | e[n + 3]);
  15193. }
  15194. return t;
  15195. }
  15196. var In = /*#__PURE__*/function () {
  15197. function In(e) {
  15198. (0, _classCallCheck2.default)(this, In);
  15199. if (!(this instanceof In)) throw Error("AES must be instanitated with `new`");
  15200. Object.defineProperty(this, "key", {
  15201. value: Qt(e, !0)
  15202. }), this._prepare();
  15203. }
  15204. (0, _createClass2.default)(In, [{
  15205. key: "_prepare",
  15206. value: function _prepare() {
  15207. var e = sn[this.key.length];
  15208. if (null == e) throw new Error("invalid key size (must be 16, 24 or 32 bytes)");
  15209. this._Ke = [], this._Kd = [];
  15210. for (var t = 0; t <= e; t++) {
  15211. this._Ke.push([0, 0, 0, 0]), this._Kd.push([0, 0, 0, 0]);
  15212. }
  15213. var n,
  15214. s = 4 * (e + 1),
  15215. r = this.key.length / 4,
  15216. i = vn(this.key);
  15217. for (t = 0; t < r; t++) {
  15218. n = t >> 2, this._Ke[n][t % 4] = i[t], this._Kd[e - n][t % 4] = i[t];
  15219. }
  15220. for (var o, a = 0, c = r; c < s;) {
  15221. if (o = i[r - 1], i[0] ^= on[o >> 16 & 255] << 24 ^ on[o >> 8 & 255] << 16 ^ on[255 & o] << 8 ^ on[o >> 24 & 255] ^ rn[a] << 24, a += 1, 8 != r) for (t = 1; t < r; t++) {
  15222. i[t] ^= i[t - 1];
  15223. } else {
  15224. for (t = 1; t < r / 2; t++) {
  15225. i[t] ^= i[t - 1];
  15226. }
  15227. o = i[r / 2 - 1], i[r / 2] ^= on[255 & o] ^ on[o >> 8 & 255] << 8 ^ on[o >> 16 & 255] << 16 ^ on[o >> 24 & 255] << 24;
  15228. for (t = r / 2 + 1; t < r; t++) {
  15229. i[t] ^= i[t - 1];
  15230. }
  15231. }
  15232. for (t = 0; t < r && c < s;) {
  15233. u = c >> 2, l = c % 4, this._Ke[u][l] = i[t], this._Kd[e - u][l] = i[t++], c++;
  15234. }
  15235. }
  15236. for (var u = 1; u < e; u++) {
  15237. for (var l = 0; l < 4; l++) {
  15238. o = this._Kd[u][l], this._Kd[u][l] = mn[o >> 24 & 255] ^ yn[o >> 16 & 255] ^ _n[o >> 8 & 255] ^ wn[255 & o];
  15239. }
  15240. }
  15241. }
  15242. }, {
  15243. key: "encrypt",
  15244. value: function encrypt(e) {
  15245. if (16 != e.length) throw new Error("invalid plaintext size (must be 16 bytes)");
  15246. for (var t = this._Ke.length - 1, n = [0, 0, 0, 0], s = vn(e), r = 0; r < 4; r++) {
  15247. s[r] ^= this._Ke[0][r];
  15248. }
  15249. for (var i = 1; i < t; i++) {
  15250. for (r = 0; r < 4; r++) {
  15251. n[r] = cn[s[r] >> 24 & 255] ^ un[s[(r + 1) % 4] >> 16 & 255] ^ ln[s[(r + 2) % 4] >> 8 & 255] ^ hn[255 & s[(r + 3) % 4]] ^ this._Ke[i][r];
  15252. }
  15253. s = n.slice();
  15254. }
  15255. var o,
  15256. a = Xt(16);
  15257. for (r = 0; r < 4; r++) {
  15258. o = this._Ke[t][r], a[4 * r] = 255 & (on[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (on[s[(r + 1) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (on[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (on[255 & s[(r + 3) % 4]] ^ o);
  15259. }
  15260. return a;
  15261. }
  15262. }, {
  15263. key: "decrypt",
  15264. value: function decrypt(e) {
  15265. if (16 != e.length) throw new Error("invalid ciphertext size (must be 16 bytes)");
  15266. for (var t = this._Kd.length - 1, n = [0, 0, 0, 0], s = vn(e), r = 0; r < 4; r++) {
  15267. s[r] ^= this._Kd[0][r];
  15268. }
  15269. for (var i = 1; i < t; i++) {
  15270. for (r = 0; r < 4; r++) {
  15271. n[r] = dn[s[r] >> 24 & 255] ^ pn[s[(r + 3) % 4] >> 16 & 255] ^ fn[s[(r + 2) % 4] >> 8 & 255] ^ gn[255 & s[(r + 1) % 4]] ^ this._Kd[i][r];
  15272. }
  15273. s = n.slice();
  15274. }
  15275. var o,
  15276. a = Xt(16);
  15277. for (r = 0; r < 4; r++) {
  15278. o = this._Kd[t][r], a[4 * r] = 255 & (an[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (an[s[(r + 3) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (an[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (an[255 & s[(r + 1) % 4]] ^ o);
  15279. }
  15280. return a;
  15281. }
  15282. }]);
  15283. return In;
  15284. }();
  15285. var Sn = /*#__PURE__*/function () {
  15286. function Sn(e) {
  15287. (0, _classCallCheck2.default)(this, Sn);
  15288. if (!(this instanceof Sn)) throw Error("AES must be instanitated with `new`");
  15289. this.description = "Electronic Code Block", this.name = "ecb", this._aes = new In(e);
  15290. }
  15291. (0, _createClass2.default)(Sn, [{
  15292. key: "encrypt",
  15293. value: function encrypt(e) {
  15294. if ((e = Qt(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  15295. for (var t = Xt(e.length), n = Xt(16), s = 0; s < e.length; s += 16) {
  15296. Zt(e, n, 0, s, s + 16), Zt(n = this._aes.encrypt(n), t, s);
  15297. }
  15298. return t;
  15299. }
  15300. }, {
  15301. key: "decrypt",
  15302. value: function decrypt(e) {
  15303. if ((e = Qt(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  15304. for (var t = Xt(e.length), n = Xt(16), s = 0; s < e.length; s += 16) {
  15305. Zt(e, n, 0, s, s + 16), Zt(n = this._aes.decrypt(n), t, s);
  15306. }
  15307. return t;
  15308. }
  15309. }]);
  15310. return Sn;
  15311. }();
  15312. var bn = /*#__PURE__*/function () {
  15313. function bn(e, t) {
  15314. (0, _classCallCheck2.default)(this, bn);
  15315. if (!(this instanceof bn)) throw Error("AES must be instanitated with `new`");
  15316. if (this.description = "Cipher Block Chaining", this.name = "cbc", t) {
  15317. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  15318. } else t = Xt(16);
  15319. this._lastCipherblock = Qt(t, !0), this._aes = new In(e);
  15320. }
  15321. (0, _createClass2.default)(bn, [{
  15322. key: "encrypt",
  15323. value: function encrypt(e) {
  15324. if ((e = Qt(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  15325. for (var t = Xt(e.length), n = Xt(16), s = 0; s < e.length; s += 16) {
  15326. Zt(e, n, 0, s, s + 16);
  15327. for (var r = 0; r < 16; r++) {
  15328. n[r] ^= this._lastCipherblock[r];
  15329. }
  15330. this._lastCipherblock = this._aes.encrypt(n), Zt(this._lastCipherblock, t, s);
  15331. }
  15332. return t;
  15333. }
  15334. }, {
  15335. key: "decrypt",
  15336. value: function decrypt(e) {
  15337. if ((e = Qt(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  15338. for (var t = Xt(e.length), n = Xt(16), s = 0; s < e.length; s += 16) {
  15339. Zt(e, n, 0, s, s + 16), n = this._aes.decrypt(n);
  15340. for (var r = 0; r < 16; r++) {
  15341. t[s + r] = n[r] ^ this._lastCipherblock[r];
  15342. }
  15343. Zt(e, this._lastCipherblock, 0, s, s + 16);
  15344. }
  15345. return t;
  15346. }
  15347. }]);
  15348. return bn;
  15349. }();
  15350. var kn = /*#__PURE__*/function () {
  15351. function kn(e, t, n) {
  15352. (0, _classCallCheck2.default)(this, kn);
  15353. if (!(this instanceof kn)) throw Error("AES must be instanitated with `new`");
  15354. if (this.description = "Cipher Feedback", this.name = "cfb", t) {
  15355. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 size)");
  15356. } else t = Xt(16);
  15357. n || (n = 1), this.segmentSize = n, this._shiftRegister = Qt(t, !0), this._aes = new In(e);
  15358. }
  15359. (0, _createClass2.default)(kn, [{
  15360. key: "encrypt",
  15361. value: function encrypt(e) {
  15362. if (e.length % this.segmentSize != 0) throw new Error("invalid plaintext size (must be segmentSize bytes)");
  15363. for (var t, n = Qt(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  15364. t = this._aes.encrypt(this._shiftRegister);
  15365. for (var r = 0; r < this.segmentSize; r++) {
  15366. n[s + r] ^= t[r];
  15367. }
  15368. Zt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Zt(n, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  15369. }
  15370. return n;
  15371. }
  15372. }, {
  15373. key: "decrypt",
  15374. value: function decrypt(e) {
  15375. if (e.length % this.segmentSize != 0) throw new Error("invalid ciphertext size (must be segmentSize bytes)");
  15376. for (var t, n = Qt(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  15377. t = this._aes.encrypt(this._shiftRegister);
  15378. for (var r = 0; r < this.segmentSize; r++) {
  15379. n[s + r] ^= t[r];
  15380. }
  15381. Zt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Zt(e, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  15382. }
  15383. return n;
  15384. }
  15385. }]);
  15386. return kn;
  15387. }();
  15388. var An = /*#__PURE__*/function () {
  15389. function An(e, t) {
  15390. (0, _classCallCheck2.default)(this, An);
  15391. if (!(this instanceof An)) throw Error("AES must be instanitated with `new`");
  15392. if (this.description = "Output Feedback", this.name = "ofb", t) {
  15393. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  15394. } else t = Xt(16);
  15395. this._lastPrecipher = Qt(t, !0), this._lastPrecipherIndex = 16, this._aes = new In(e);
  15396. }
  15397. (0, _createClass2.default)(An, [{
  15398. key: "encrypt",
  15399. value: function encrypt(e) {
  15400. for (var t = Qt(e, !0), n = 0; n < t.length; n++) {
  15401. 16 === this._lastPrecipherIndex && (this._lastPrecipher = this._aes.encrypt(this._lastPrecipher), this._lastPrecipherIndex = 0), t[n] ^= this._lastPrecipher[this._lastPrecipherIndex++];
  15402. }
  15403. return t;
  15404. }
  15405. }, {
  15406. key: "decrypt",
  15407. value: function decrypt(e) {
  15408. return this.encrypt(e);
  15409. }
  15410. }]);
  15411. return An;
  15412. }();
  15413. var Cn = /*#__PURE__*/function () {
  15414. function Cn(e) {
  15415. (0, _classCallCheck2.default)(this, Cn);
  15416. if (!(this instanceof Cn)) throw Error("Counter must be instanitated with `new`");
  15417. 0 === e || e || (e = 1), "number" == typeof e ? (this._counter = Xt(16), this.setValue(e)) : this.setBytes(e);
  15418. }
  15419. (0, _createClass2.default)(Cn, [{
  15420. key: "setValue",
  15421. value: function setValue(e) {
  15422. if ("number" != typeof e || parseInt(e) != e) throw new Error("invalid counter value (must be an integer)");
  15423. if (e > Number.MAX_SAFE_INTEGER) throw new Error("integer value out of safe range");
  15424. for (var t = 15; t >= 0; --t) {
  15425. this._counter[t] = e % 256, e = parseInt(e / 256);
  15426. }
  15427. }
  15428. }, {
  15429. key: "setBytes",
  15430. value: function setBytes(e) {
  15431. if (16 != (e = Qt(e, !0)).length) throw new Error("invalid counter bytes size (must be 16 bytes)");
  15432. this._counter = e;
  15433. }
  15434. }, {
  15435. key: "increment",
  15436. value: function increment() {
  15437. for (var e = 15; e >= 0; e--) {
  15438. if (255 !== this._counter[e]) {
  15439. this._counter[e]++;
  15440. break;
  15441. }
  15442. this._counter[e] = 0;
  15443. }
  15444. }
  15445. }]);
  15446. return Cn;
  15447. }();
  15448. var Pn = /*#__PURE__*/function () {
  15449. function Pn(e, t) {
  15450. (0, _classCallCheck2.default)(this, Pn);
  15451. if (!(this instanceof Pn)) throw Error("AES must be instanitated with `new`");
  15452. this.description = "Counter", this.name = "ctr", t instanceof Cn || (t = new Cn(t)), this._counter = t, this._remainingCounter = null, this._remainingCounterIndex = 16, this._aes = new In(e);
  15453. }
  15454. (0, _createClass2.default)(Pn, [{
  15455. key: "encrypt",
  15456. value: function encrypt(e) {
  15457. for (var t = Qt(e, !0), n = 0; n < t.length; n++) {
  15458. 16 === this._remainingCounterIndex && (this._remainingCounter = this._aes.encrypt(this._counter._counter), this._remainingCounterIndex = 0, this._counter.increment()), t[n] ^= this._remainingCounter[this._remainingCounterIndex++];
  15459. }
  15460. return t;
  15461. }
  15462. }, {
  15463. key: "decrypt",
  15464. value: function decrypt(e) {
  15465. return this.encrypt(e);
  15466. }
  15467. }]);
  15468. return Pn;
  15469. }();
  15470. var Tn = {
  15471. AES: In,
  15472. Counter: Cn,
  15473. ModeOfOperation: {
  15474. ecb: Sn,
  15475. cbc: bn,
  15476. cfb: kn,
  15477. ofb: An,
  15478. ctr: Pn
  15479. },
  15480. utils: {
  15481. hex: nn,
  15482. utf8: tn
  15483. },
  15484. padding: {
  15485. pkcs7: {
  15486. pad: function pad(e) {
  15487. var t = 16 - (e = Qt(e, !0)).length % 16,
  15488. n = Xt(e.length + t);
  15489. Zt(e, n);
  15490. for (var s = e.length; s < n.length; s++) {
  15491. n[s] = t;
  15492. }
  15493. return n;
  15494. },
  15495. strip: function strip(e) {
  15496. if ((e = Qt(e, !0)).length < 16) throw new Error("PKCS#7 invalid length");
  15497. var t = e[e.length - 1];
  15498. if (t > 16) throw new Error("PKCS#7 padding byte out of range");
  15499. for (var n = e.length - t, s = 0; s < t; s++) {
  15500. if (e[n + s] !== t) throw new Error("PKCS#7 invalid padding byte");
  15501. }
  15502. var r = Xt(n);
  15503. return Zt(e, r, 0, 0, n), r;
  15504. }
  15505. }
  15506. },
  15507. _arrayTest: {
  15508. coerceArray: Qt,
  15509. createArray: Xt,
  15510. copyArray: Zt
  15511. }
  15512. };
  15513. function xn(e, t, n) {
  15514. var s = new Uint8Array(uni.base64ToArrayBuffer(t)),
  15515. r = Tn.utils.utf8.toBytes(n),
  15516. i = Tn.utils.utf8.toBytes(e),
  15517. o = new Tn.ModeOfOperation.cbc(s, r),
  15518. a = Tn.padding.pkcs7.pad(i),
  15519. c = o.encrypt(a);
  15520. return uni.arrayBufferToBase64(c);
  15521. }
  15522. var On = {
  15523. code: 2e4,
  15524. message: "System error"
  15525. },
  15526. En = {
  15527. code: 20101,
  15528. message: "Invalid client"
  15529. },
  15530. Ln = {
  15531. code: 20102,
  15532. message: "Get encrypt key failed"
  15533. },
  15534. Rn = {
  15535. 10001: "Secure network is not supported on current playground or unimpsdk",
  15536. 10003: "Config missing in current app. If the problem pesist, please contact DCloud.",
  15537. 10009: "Encrypt payload failed",
  15538. 10010: "Decrypt response failed"
  15539. };
  15540. function Un(e) {
  15541. var _ref32 = e || {},
  15542. t = _ref32.errSubject,
  15543. n = _ref32.subject,
  15544. s = _ref32.errCode,
  15545. r = _ref32.errMsg,
  15546. i = _ref32.code,
  15547. o = _ref32.message,
  15548. a = _ref32.cause;
  15549. return new te({
  15550. subject: t || n || "uni-secure-network",
  15551. code: s || i || On.code,
  15552. message: r || o,
  15553. cause: a
  15554. });
  15555. }
  15556. var Nn,
  15557. Dn,
  15558. qn = null;
  15559. var Mn = /*#__PURE__*/function (_Vt) {
  15560. (0, _inherits2.default)(Mn, _Vt);
  15561. var _super8 = _createSuper(Mn);
  15562. function Mn(e) {
  15563. var _this15;
  15564. (0, _classCallCheck2.default)(this, Mn);
  15565. _this15 = _super8.call(this, e), _this15.clientType = "mp-weixin", _this15.userEncryptKey = null;
  15566. return _this15;
  15567. }
  15568. (0, _createClass2.default)(Mn, [{
  15569. key: "isLogin",
  15570. value: function isLogin() {
  15571. return !!this.scopedGlobalCache.mpWeixinCode || !!this.scopedGlobalCache.mpWeixinOpenid;
  15572. }
  15573. }, {
  15574. key: "prepare",
  15575. value: function () {
  15576. var _prepare2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43() {
  15577. return _regenerator.default.wrap(function _callee43$(_context43) {
  15578. while (1) {
  15579. switch (_context43.prev = _context43.next) {
  15580. case 0:
  15581. if (this.isLogin()) {
  15582. _context43.next = 7;
  15583. break;
  15584. }
  15585. if (this.scopedGlobalCache.initPromise) {
  15586. _context43.next = 3;
  15587. break;
  15588. }
  15589. throw new Error("`uniCloud.initSecureNetworkByWeixin` has not yet been called");
  15590. case 3:
  15591. _context43.next = 5;
  15592. return this.scopedGlobalCache.initPromise;
  15593. case 5:
  15594. if (this.isLogin()) {
  15595. _context43.next = 7;
  15596. break;
  15597. }
  15598. throw new Error("uniCloud.initSecureNetworkByWeixin` has not yet been called or successfully excuted");
  15599. case 7:
  15600. case "end":
  15601. return _context43.stop();
  15602. }
  15603. }
  15604. }, _callee43, this);
  15605. }));
  15606. function prepare() {
  15607. return _prepare2.apply(this, arguments);
  15608. }
  15609. return prepare;
  15610. }()
  15611. }, {
  15612. key: "getUserEncryptKey",
  15613. value: function () {
  15614. var _getUserEncryptKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44() {
  15615. var _this16 = this;
  15616. var e;
  15617. return _regenerator.default.wrap(function _callee44$(_context44) {
  15618. while (1) {
  15619. switch (_context44.prev = _context44.next) {
  15620. case 0:
  15621. if (!this.userEncryptKey) {
  15622. _context44.next = 2;
  15623. break;
  15624. }
  15625. return _context44.abrupt("return", this.userEncryptKey);
  15626. case 2:
  15627. if (!(qn && qn.expireTime)) {
  15628. _context44.next = 6;
  15629. break;
  15630. }
  15631. e = Date.now();
  15632. if (!(qn.expireTime - e > 0)) {
  15633. _context44.next = 6;
  15634. break;
  15635. }
  15636. return _context44.abrupt("return", (this.userEncryptKey = qn, this.userEncryptKey));
  15637. case 6:
  15638. return _context44.abrupt("return", new Promise(function (e, t) {
  15639. uni.getUserCryptoManager().getLatestUserKey({
  15640. success: function success(t) {
  15641. qn = t, _this16.userEncryptKey = t, e(_this16.userEncryptKey);
  15642. },
  15643. fail: function fail(e) {
  15644. t(Un(_objectSpread(_objectSpread({}, Ln), {}, {
  15645. cause: e
  15646. })));
  15647. }
  15648. });
  15649. }));
  15650. case 7:
  15651. case "end":
  15652. return _context44.stop();
  15653. }
  15654. }
  15655. }, _callee44, this);
  15656. }));
  15657. function getUserEncryptKey() {
  15658. return _getUserEncryptKey.apply(this, arguments);
  15659. }
  15660. return getUserEncryptKey;
  15661. }()
  15662. }, {
  15663. key: "getWxAppId",
  15664. value: function getWxAppId() {
  15665. return wx.getAccountInfoSync().miniProgram.appId;
  15666. }
  15667. }, {
  15668. key: "platformGetSignOption",
  15669. value: function () {
  15670. var _platformGetSignOption = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45() {
  15671. var _yield$this$getUserEn, e, t, n;
  15672. return _regenerator.default.wrap(function _callee45$(_context45) {
  15673. while (1) {
  15674. switch (_context45.prev = _context45.next) {
  15675. case 0:
  15676. _context45.next = 2;
  15677. return this.getUserEncryptKey();
  15678. case 2:
  15679. _yield$this$getUserEn = _context45.sent;
  15680. e = _yield$this$getUserEn.encryptKey;
  15681. t = _yield$this$getUserEn.iv;
  15682. n = _yield$this$getUserEn.version;
  15683. return _context45.abrupt("return", {
  15684. verifyClientSign: xn(JSON.stringify({
  15685. data: JSON.stringify({}),
  15686. appId: this.appId,
  15687. deviceId: this.deviceId,
  15688. wxAppId: this.getWxAppId(),
  15689. simulator: "devtools" === ae().platform,
  15690. timestamp: Date.now()
  15691. }), e, t),
  15692. encryptKeyId: n,
  15693. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  15694. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  15695. });
  15696. case 7:
  15697. case "end":
  15698. return _context45.stop();
  15699. }
  15700. }
  15701. }, _callee45, this);
  15702. }));
  15703. function platformGetSignOption() {
  15704. return _platformGetSignOption.apply(this, arguments);
  15705. }
  15706. return platformGetSignOption;
  15707. }()
  15708. }, {
  15709. key: "platformEncryptData",
  15710. value: function () {
  15711. var _platformEncryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46(e) {
  15712. var _yield$this$getUserEn2, t, n, s, r;
  15713. return _regenerator.default.wrap(function _callee46$(_context46) {
  15714. while (1) {
  15715. switch (_context46.prev = _context46.next) {
  15716. case 0:
  15717. _context46.next = 2;
  15718. return this.getUserEncryptKey();
  15719. case 2:
  15720. _yield$this$getUserEn2 = _context46.sent;
  15721. t = _yield$this$getUserEn2.encryptKey;
  15722. n = _yield$this$getUserEn2.iv;
  15723. s = _yield$this$getUserEn2.version;
  15724. r = {
  15725. secretType: this.secretType,
  15726. encryptKeyId: s,
  15727. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  15728. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  15729. };
  15730. return _context46.abrupt("return", this.secretType === Jt ? {
  15731. content: e,
  15732. _uniCloudOptions: r
  15733. } : {
  15734. content: xn(JSON.stringify({
  15735. data: JSON.stringify(e),
  15736. appId: this.appId,
  15737. deviceId: this.deviceId,
  15738. wxAppId: this.getWxAppId(),
  15739. simulator: "devtools" === ae().platform,
  15740. timestamp: Date.now()
  15741. }), t, n),
  15742. _uniCloudOptions: r
  15743. });
  15744. case 8:
  15745. case "end":
  15746. return _context46.stop();
  15747. }
  15748. }
  15749. }, _callee46, this);
  15750. }));
  15751. function platformEncryptData(_x42) {
  15752. return _platformEncryptData.apply(this, arguments);
  15753. }
  15754. return platformEncryptData;
  15755. }()
  15756. }, {
  15757. key: "platformDecryptResult",
  15758. value: function () {
  15759. var _platformDecryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee47(e) {
  15760. var t, _yield$this$getUserEn3, n, s;
  15761. return _regenerator.default.wrap(function _callee47$(_context47) {
  15762. while (1) {
  15763. switch (_context47.prev = _context47.next) {
  15764. case 0:
  15765. t = e.content;
  15766. _context47.next = 3;
  15767. return this.getUserEncryptKey();
  15768. case 3:
  15769. _yield$this$getUserEn3 = _context47.sent;
  15770. n = _yield$this$getUserEn3.encryptKey;
  15771. s = _yield$this$getUserEn3.iv;
  15772. return _context47.abrupt("return", JSON.parse(function (e, t, n) {
  15773. var s = new Uint8Array(uni.base64ToArrayBuffer(e)),
  15774. r = new Uint8Array(uni.base64ToArrayBuffer(t)),
  15775. i = Tn.utils.utf8.toBytes(n),
  15776. o = new Tn.ModeOfOperation.cbc(r, i),
  15777. a = Tn.padding.pkcs7.strip(o.decrypt(s));
  15778. return Tn.utils.utf8.fromBytes(a);
  15779. }(t, n, s)));
  15780. case 7:
  15781. case "end":
  15782. return _context47.stop();
  15783. }
  15784. }
  15785. }, _callee47, this);
  15786. }));
  15787. function platformDecryptResult(_x43) {
  15788. return _platformDecryptResult.apply(this, arguments);
  15789. }
  15790. return platformDecryptResult;
  15791. }()
  15792. }, {
  15793. key: "isClientKeyNotFound",
  15794. value: function isClientKeyNotFound() {
  15795. return !1;
  15796. }
  15797. }]);
  15798. return Mn;
  15799. }(Vt);
  15800. function Fn(e) {
  15801. var t = ["hasClientKey", "encryptGetClientKeyPayload", "setClientKey", "encrypt", "decrypt"],
  15802. n = {};
  15803. var _loop = function _loop(_s13) {
  15804. var r = t[_s13];
  15805. n[r] = function () {
  15806. for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) {
  15807. t[_key] = arguments[_key];
  15808. }
  15809. return new Promise(function (n, s) {
  15810. "function" == typeof e[r] ? e[r].apply(e, t.concat([function () {
  15811. var _ref33 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15812. e = _ref33.type,
  15813. t = _ref33.data,
  15814. r = _ref33.errCode,
  15815. i = _ref33.errMsg,
  15816. o = _ref33.errSubject,
  15817. a = _ref33.message;
  15818. "success" === e ? n(t) : s(Un({
  15819. errCode: r,
  15820. errMsg: Rn[r] || i || a,
  15821. errSubject: o
  15822. }));
  15823. }])) : s(Un({
  15824. message: "请检查manifest.json内是否开启安全网络模块,另外注意标准基座不支持安全网络模块"
  15825. }));
  15826. });
  15827. };
  15828. };
  15829. for (var _s13 = 0; _s13 < t.length; _s13++) {
  15830. _loop(_s13);
  15831. }
  15832. return n;
  15833. }
  15834. var Kn = /*#__PURE__*/function (_Vt2) {
  15835. (0, _inherits2.default)(Kn, _Vt2);
  15836. var _super9 = _createSuper(Kn);
  15837. function Kn(e) {
  15838. var _this17;
  15839. (0, _classCallCheck2.default)(this, Kn);
  15840. _this17 = _super9.call(this, e), _this17.clientType = "app", _this17.appUtils = _objectSpread({}, Fn(uni.requireNativePlugin("plus"))), _this17.systemInfo = Nn || (Nn = ae());
  15841. return _this17;
  15842. }
  15843. (0, _createClass2.default)(Kn, [{
  15844. key: "hasClientKey",
  15845. value: function () {
  15846. var _hasClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee48() {
  15847. return _regenerator.default.wrap(function _callee48$(_context48) {
  15848. while (1) {
  15849. switch (_context48.prev = _context48.next) {
  15850. case 0:
  15851. _context48.next = 2;
  15852. return this.appUtils.hasClientKey({
  15853. provider: this.provider,
  15854. spaceId: this.spaceId
  15855. });
  15856. case 2:
  15857. this._hasClientKey = _context48.sent;
  15858. return _context48.abrupt("return", this._hasClientKey);
  15859. case 4:
  15860. case "end":
  15861. return _context48.stop();
  15862. }
  15863. }
  15864. }, _callee48, this);
  15865. }));
  15866. function hasClientKey() {
  15867. return _hasClientKey.apply(this, arguments);
  15868. }
  15869. return hasClientKey;
  15870. }()
  15871. }, {
  15872. key: "getAppClientKey",
  15873. value: function () {
  15874. var _getAppClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee49() {
  15875. var _yield$this$appUtils$, e, t, n, s, r;
  15876. return _regenerator.default.wrap(function _callee49$(_context49) {
  15877. while (1) {
  15878. switch (_context49.prev = _context49.next) {
  15879. case 0:
  15880. _context49.next = 2;
  15881. return this.appUtils.encryptGetClientKeyPayload({
  15882. data: JSON.stringify({})
  15883. });
  15884. case 2:
  15885. _yield$this$appUtils$ = _context49.sent;
  15886. e = _yield$this$appUtils$.data;
  15887. t = _yield$this$appUtils$.key;
  15888. _context49.next = 7;
  15889. return this.uniCloudIns.callFunction({
  15890. name: "DCloud-clientDB",
  15891. data: {
  15892. redirectTo: "encryption",
  15893. action: "getAppClientKey",
  15894. data: e,
  15895. key: t
  15896. }
  15897. });
  15898. case 7:
  15899. _context49.t0 = _context49.sent.result;
  15900. if (_context49.t0) {
  15901. _context49.next = 10;
  15902. break;
  15903. }
  15904. _context49.t0 = {};
  15905. case 10:
  15906. n = _context49.t0;
  15907. if (!(0 !== n.errCode)) {
  15908. _context49.next = 13;
  15909. break;
  15910. }
  15911. throw function (e) {
  15912. return new te({
  15913. subject: e.errSubject || "uni-secure-network",
  15914. code: e.errCode || e.code || On.code,
  15915. message: e.errMsg || e.message
  15916. });
  15917. }(n);
  15918. case 13:
  15919. s = n.clientKey, r = n.key;
  15920. _context49.next = 16;
  15921. return this.appUtils.setClientKey({
  15922. provider: this.provider,
  15923. spaceId: this.spaceId,
  15924. clientKey: s,
  15925. key: r
  15926. });
  15927. case 16:
  15928. case "end":
  15929. return _context49.stop();
  15930. }
  15931. }
  15932. }, _callee49, this);
  15933. }));
  15934. function getAppClientKey() {
  15935. return _getAppClientKey.apply(this, arguments);
  15936. }
  15937. return getAppClientKey;
  15938. }()
  15939. }, {
  15940. key: "ensureClientKey",
  15941. value: function () {
  15942. var _ensureClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee50() {
  15943. var _this18 = this;
  15944. var _ref34,
  15945. _ref34$forceUpdate,
  15946. e,
  15947. _args50 = arguments;
  15948. return _regenerator.default.wrap(function _callee50$(_context50) {
  15949. while (1) {
  15950. switch (_context50.prev = _context50.next) {
  15951. case 0:
  15952. _ref34 = _args50.length > 0 && _args50[0] !== undefined ? _args50[0] : {}, _ref34$forceUpdate = _ref34.forceUpdate, e = _ref34$forceUpdate === void 0 ? !1 : _ref34$forceUpdate;
  15953. _context50.t1 = !0;
  15954. _context50.next = 4;
  15955. return this.hasClientKey();
  15956. case 4:
  15957. _context50.t2 = _context50.sent;
  15958. _context50.t0 = _context50.t1 !== _context50.t2;
  15959. if (_context50.t0) {
  15960. _context50.next = 8;
  15961. break;
  15962. }
  15963. _context50.t0 = e;
  15964. case 8:
  15965. if (!_context50.t0) {
  15966. _context50.next = 10;
  15967. break;
  15968. }
  15969. return _context50.abrupt("return", (e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus === h || !e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus !== p || (this.scopedGlobalCache.initPromise = this.getAppClientKey(), this.scopedGlobalCache.initPromise.then(function (e) {
  15970. _this18.scopedGlobalCache.initStatus = d;
  15971. }).catch(function (e) {
  15972. throw _this18.scopedGlobalCache.initStatus = p, e;
  15973. }), this.scopedGlobalCache.initStatus = h), this.scopedGlobalCache.initPromise));
  15974. case 10:
  15975. case "end":
  15976. return _context50.stop();
  15977. }
  15978. }
  15979. }, _callee50, this);
  15980. }));
  15981. function ensureClientKey() {
  15982. return _ensureClientKey.apply(this, arguments);
  15983. }
  15984. return ensureClientKey;
  15985. }()
  15986. }, {
  15987. key: "prepare",
  15988. value: function () {
  15989. var _prepare3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee51() {
  15990. var _ref35,
  15991. _ref35$forceUpdate,
  15992. e,
  15993. _args51 = arguments;
  15994. return _regenerator.default.wrap(function _callee51$(_context51) {
  15995. while (1) {
  15996. switch (_context51.prev = _context51.next) {
  15997. case 0:
  15998. _ref35 = _args51.length > 0 && _args51[0] !== undefined ? _args51[0] : {}, _ref35$forceUpdate = _ref35.forceUpdate, e = _ref35$forceUpdate === void 0 ? !1 : _ref35$forceUpdate;
  15999. _context51.next = 3;
  16000. return this.ensureClientKey({
  16001. forceUpdate: e
  16002. });
  16003. case 3:
  16004. case "end":
  16005. return _context51.stop();
  16006. }
  16007. }
  16008. }, _callee51, this);
  16009. }));
  16010. function prepare() {
  16011. return _prepare3.apply(this, arguments);
  16012. }
  16013. return prepare;
  16014. }()
  16015. }, {
  16016. key: "platformGetSignOption",
  16017. value: function () {
  16018. var _platformGetSignOption2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee52() {
  16019. var _yield$this$appUtils$2, e, t;
  16020. return _regenerator.default.wrap(function _callee52$(_context52) {
  16021. while (1) {
  16022. switch (_context52.prev = _context52.next) {
  16023. case 0:
  16024. _context52.next = 2;
  16025. return this.appUtils.encrypt({
  16026. provider: this.provider,
  16027. spaceId: this.spaceId,
  16028. data: JSON.stringify({})
  16029. });
  16030. case 2:
  16031. _yield$this$appUtils$2 = _context52.sent;
  16032. e = _yield$this$appUtils$2.data;
  16033. t = _yield$this$appUtils$2.key;
  16034. return _context52.abrupt("return", {
  16035. verifyClientSign: e,
  16036. encryptKeyId: t
  16037. });
  16038. case 6:
  16039. case "end":
  16040. return _context52.stop();
  16041. }
  16042. }
  16043. }, _callee52, this);
  16044. }));
  16045. function platformGetSignOption() {
  16046. return _platformGetSignOption2.apply(this, arguments);
  16047. }
  16048. return platformGetSignOption;
  16049. }()
  16050. }, {
  16051. key: "platformEncryptData",
  16052. value: function () {
  16053. var _platformEncryptData2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee53(e) {
  16054. var _yield$this$appUtils$3, t, n, s;
  16055. return _regenerator.default.wrap(function _callee53$(_context53) {
  16056. while (1) {
  16057. switch (_context53.prev = _context53.next) {
  16058. case 0:
  16059. _context53.next = 2;
  16060. return this.appUtils.encrypt({
  16061. provider: this.provider,
  16062. spaceId: this.spaceId,
  16063. data: JSON.stringify(e)
  16064. });
  16065. case 2:
  16066. _yield$this$appUtils$3 = _context53.sent;
  16067. t = _yield$this$appUtils$3.data;
  16068. n = _yield$this$appUtils$3.key;
  16069. s = {
  16070. secretType: this.secretType,
  16071. encryptKeyId: n
  16072. };
  16073. return _context53.abrupt("return", this.secretType === Jt ? {
  16074. content: e,
  16075. _uniCloudOptions: s
  16076. } : {
  16077. content: t,
  16078. _uniCloudOptions: s
  16079. });
  16080. case 7:
  16081. case "end":
  16082. return _context53.stop();
  16083. }
  16084. }
  16085. }, _callee53, this);
  16086. }));
  16087. function platformEncryptData(_x44) {
  16088. return _platformEncryptData2.apply(this, arguments);
  16089. }
  16090. return platformEncryptData;
  16091. }()
  16092. }, {
  16093. key: "platformDecryptResult",
  16094. value: function () {
  16095. var _platformDecryptResult2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee54(e) {
  16096. var t, _e$_uniCloudOptions, n, s, r;
  16097. return _regenerator.default.wrap(function _callee54$(_context54) {
  16098. while (1) {
  16099. switch (_context54.prev = _context54.next) {
  16100. case 0:
  16101. t = e.content;
  16102. _e$_uniCloudOptions = e._uniCloudOptions;
  16103. n = _e$_uniCloudOptions === void 0 ? {} : _e$_uniCloudOptions;
  16104. s = n.encryptKeyId;
  16105. _context54.next = 6;
  16106. return this.appUtils.decrypt({
  16107. provider: this.provider,
  16108. spaceId: this.spaceId,
  16109. data: t,
  16110. key: s
  16111. });
  16112. case 6:
  16113. r = _context54.sent;
  16114. return _context54.abrupt("return", JSON.parse(r.data));
  16115. case 8:
  16116. case "end":
  16117. return _context54.stop();
  16118. }
  16119. }
  16120. }, _callee54, this);
  16121. }));
  16122. function platformDecryptResult(_x45) {
  16123. return _platformDecryptResult2.apply(this, arguments);
  16124. }
  16125. return platformDecryptResult;
  16126. }()
  16127. }, {
  16128. key: "isClientKeyNotFound",
  16129. value: function isClientKeyNotFound() {
  16130. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  16131. var t = e.result || {};
  16132. return 70009 === t.errCode && "uni-secure-network" === t.errSubject;
  16133. }
  16134. }]);
  16135. return Kn;
  16136. }(Vt);
  16137. function jn() {
  16138. var _ref36 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16139. e = _ref36.secretType;
  16140. return e === Ht || e === Jt || e === zt;
  16141. }
  16142. function $n() {
  16143. var _ref37 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16144. e = _ref37.name,
  16145. _ref37$data = _ref37.data,
  16146. t = _ref37$data === void 0 ? {} : _ref37$data;
  16147. return "app" === C && "DCloud-clientDB" === e && "encryption" === t.redirectTo && "getAppClientKey" === t.action;
  16148. }
  16149. function Bn() {
  16150. var _ref38 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16151. e = _ref38.provider,
  16152. t = _ref38.spaceId,
  16153. n = _ref38.functionName;
  16154. var _ae = ae(),
  16155. s = _ae.appId,
  16156. r = _ae.uniPlatform,
  16157. i = _ae.osName;
  16158. var o = r;
  16159. "app" === r && (o = i);
  16160. var a = function () {
  16161. var _ref39 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16162. e = _ref39.provider,
  16163. t = _ref39.spaceId;
  16164. var n = A;
  16165. if (!n) return {};
  16166. e = function (e) {
  16167. return "tencent" === e ? "tcb" : e;
  16168. }(e);
  16169. var s = n.find(function (n) {
  16170. return n.provider === e && n.spaceId === t;
  16171. });
  16172. return s && s.config;
  16173. }({
  16174. provider: e,
  16175. spaceId: t
  16176. });
  16177. if (!a || !a.accessControl || !a.accessControl.enable) return !1;
  16178. var c = a.accessControl.function || {},
  16179. u = Object.keys(c);
  16180. if (0 === u.length) return !0;
  16181. var l = function (e, t) {
  16182. var n, s, r;
  16183. for (var _i2 = 0; _i2 < e.length; _i2++) {
  16184. var _o2 = e[_i2];
  16185. _o2 !== t ? "*" !== _o2 ? _o2.split(",").map(function (e) {
  16186. return e.trim();
  16187. }).indexOf(t) > -1 && (s = _o2) : r = _o2 : n = _o2;
  16188. }
  16189. return n || s || r;
  16190. }(u, n);
  16191. if (!l) return !1;
  16192. if ((c[l] || []).find(function () {
  16193. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  16194. return e.appId === s && (e.platform || "").toLowerCase() === o.toLowerCase();
  16195. })) return !0;
  16196. throw console.error("\u6B64\u5E94\u7528[appId: ".concat(s, ", platform: ").concat(o, "]\u4E0D\u5728\u4E91\u7AEF\u914D\u7F6E\u7684\u5141\u8BB8\u8BBF\u95EE\u7684\u5E94\u7528\u5217\u8868\u5185\uFF0C\u53C2\u8003\uFF1Ahttps://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client")), Un(En);
  16197. }
  16198. function Wn(_ref40) {
  16199. var e = _ref40.functionName,
  16200. t = _ref40.result,
  16201. n = _ref40.logPvd;
  16202. if (S && this.__dev__.debugLog && t && t.requestId) {
  16203. var _s14 = JSON.stringify({
  16204. spaceId: this.config.spaceId,
  16205. functionName: e,
  16206. requestId: t.requestId
  16207. });
  16208. console.log("[".concat(n, "-request]").concat(_s14, "[/").concat(n, "-request]"));
  16209. }
  16210. }
  16211. function Hn(e) {
  16212. var t = e.callFunction,
  16213. n = function n(_n9) {
  16214. var _this19 = this;
  16215. var s = _n9.name;
  16216. _n9.data = Mt.call(e, {
  16217. data: _n9.data
  16218. });
  16219. var r = {
  16220. aliyun: "aliyun",
  16221. tencent: "tcb",
  16222. tcb: "tcb",
  16223. alipay: "alipay",
  16224. dcloud: "dcloud"
  16225. }[this.config.provider],
  16226. i = jn(_n9),
  16227. o = $n(_n9),
  16228. a = i || o;
  16229. return t.call(this, _n9).then(function (e) {
  16230. return e.errCode = 0, !a && Wn.call(_this19, {
  16231. functionName: s,
  16232. result: e,
  16233. logPvd: r
  16234. }), Promise.resolve(e);
  16235. }, function (e) {
  16236. return !a && Wn.call(_this19, {
  16237. functionName: s,
  16238. result: e,
  16239. logPvd: r
  16240. }), e && e.message && (e.message = function () {
  16241. var _ref41 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16242. _ref41$message = _ref41.message,
  16243. e = _ref41$message === void 0 ? "" : _ref41$message,
  16244. _ref41$extraInfo = _ref41.extraInfo,
  16245. t = _ref41$extraInfo === void 0 ? {} : _ref41$extraInfo,
  16246. _ref41$formatter = _ref41.formatter,
  16247. n = _ref41$formatter === void 0 ? [] : _ref41$formatter;
  16248. for (var _s15 = 0; _s15 < n.length; _s15++) {
  16249. var _n$_s = n[_s15],
  16250. _r6 = _n$_s.rule,
  16251. _i3 = _n$_s.content,
  16252. _o3 = _n$_s.mode,
  16253. _a = e.match(_r6);
  16254. if (!_a) continue;
  16255. var _c = _i3;
  16256. for (var _e19 = 1; _e19 < _a.length; _e19++) {
  16257. _c = Bt(_c, "{$".concat(_e19, "}"), _a[_e19]);
  16258. }
  16259. for (var _e20 in t) {
  16260. _c = Bt(_c, "{".concat(_e20, "}"), t[_e20]);
  16261. }
  16262. return "replace" === _o3 ? _c : e + _c;
  16263. }
  16264. return e;
  16265. }({
  16266. message: "[".concat(_n9.name, "]: ").concat(e.message),
  16267. formatter: Kt,
  16268. extraInfo: {
  16269. functionName: s
  16270. }
  16271. })), Promise.reject(e);
  16272. });
  16273. };
  16274. e.callFunction = function (t) {
  16275. var _e$config = e.config,
  16276. s = _e$config.provider,
  16277. r = _e$config.spaceId,
  16278. i = t.name;
  16279. var o, a;
  16280. if (t.data = t.data || {}, S && e.__dev__.debugInfo && !e.__dev__.debugInfo.forceRemote && T ? (e._callCloudFunction || (e._callCloudFunction = n, e._callLocalFunction = Ft), o = Ft) : o = n, o = o.bind(e), $n(t)) a = n.call(e, t);else if (function (_ref42) {
  16281. var e = _ref42.name,
  16282. _ref42$data = _ref42.data,
  16283. t = _ref42$data === void 0 ? {} : _ref42$data;
  16284. return "mp-weixin" === C && "uni-id-co" === e && "secureNetworkHandshakeByWeixin" === t.method;
  16285. }(t)) a = o.call(e, t);else if (jn(t)) {
  16286. a = new Dn({
  16287. secretType: t.secretType,
  16288. uniCloudIns: e
  16289. }).wrapEncryptDataCallFunction(n.bind(e))(t);
  16290. } else if (Bn({
  16291. provider: s,
  16292. spaceId: r,
  16293. functionName: i
  16294. })) {
  16295. a = new Dn({
  16296. secretType: t.secretType,
  16297. uniCloudIns: e
  16298. }).wrapVerifyClientCallFunction(n.bind(e))(t);
  16299. } else a = o(t);
  16300. return Object.defineProperty(a, "result", {
  16301. get: function get() {
  16302. return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {};
  16303. }
  16304. }), a.then(function (e) {
  16305. return "undefined" != typeof UTSJSONObject && (e.result = new UTSJSONObject(e.result)), e;
  16306. });
  16307. };
  16308. }
  16309. Dn = "mp-weixin" !== C && "app" !== C ? /*#__PURE__*/function () {
  16310. function _class2() {
  16311. (0, _classCallCheck2.default)(this, _class2);
  16312. throw Un({
  16313. message: "Platform ".concat(C, " is not supported by secure network")
  16314. });
  16315. }
  16316. return (0, _createClass2.default)(_class2);
  16317. }() : k ? "mp-weixin" === C ? Mn : Kn : /*#__PURE__*/function () {
  16318. function _class3() {
  16319. (0, _classCallCheck2.default)(this, _class3);
  16320. throw Un({
  16321. message: "Platform ".concat(C, " is not enabled, please check whether secure network module is enabled in your manifest.json")
  16322. });
  16323. }
  16324. return (0, _createClass2.default)(_class3);
  16325. }();
  16326. var Jn = Symbol("CLIENT_DB_INTERNAL");
  16327. function zn(e, t) {
  16328. return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = Jn, e.inspect = null, e.__ob__ = void 0, new Proxy(e, {
  16329. get: function get(e, n, s) {
  16330. if ("_uniClient" === n) return null;
  16331. if ("symbol" == (0, _typeof2.default)(n)) return e[n];
  16332. if (n in e || "string" != typeof n) {
  16333. var _t12 = e[n];
  16334. return "function" == typeof _t12 ? _t12.bind(e) : _t12;
  16335. }
  16336. return t.get(e, n, s);
  16337. }
  16338. });
  16339. }
  16340. function Vn(e) {
  16341. return {
  16342. on: function on(t, n) {
  16343. e[t] = e[t] || [], e[t].indexOf(n) > -1 || e[t].push(n);
  16344. },
  16345. off: function off(t, n) {
  16346. e[t] = e[t] || [];
  16347. var s = e[t].indexOf(n);
  16348. -1 !== s && e[t].splice(s, 1);
  16349. }
  16350. };
  16351. }
  16352. var Gn = ["db.Geo", "db.command", "command.aggregate"];
  16353. function Yn(e, t) {
  16354. return Gn.indexOf("".concat(e, ".").concat(t)) > -1;
  16355. }
  16356. function Qn(e) {
  16357. switch (f(e)) {
  16358. case "array":
  16359. return e.map(function (e) {
  16360. return Qn(e);
  16361. });
  16362. case "object":
  16363. return e._internalType === Jn || Object.keys(e).forEach(function (t) {
  16364. e[t] = Qn(e[t]);
  16365. }), e;
  16366. case "regexp":
  16367. return {
  16368. $regexp: {
  16369. source: e.source,
  16370. flags: e.flags
  16371. }
  16372. };
  16373. case "date":
  16374. return {
  16375. $date: e.toISOString()
  16376. };
  16377. default:
  16378. return e;
  16379. }
  16380. }
  16381. function Xn(e) {
  16382. return e && e.content && e.content.$method;
  16383. }
  16384. var Zn = /*#__PURE__*/function () {
  16385. function Zn(e, t, n) {
  16386. (0, _classCallCheck2.default)(this, Zn);
  16387. this.content = e, this.prevStage = t || null, this.udb = null, this._database = n;
  16388. }
  16389. (0, _createClass2.default)(Zn, [{
  16390. key: "toJSON",
  16391. value: function toJSON() {
  16392. var e = this;
  16393. var t = [e.content];
  16394. for (; e.prevStage;) {
  16395. e = e.prevStage, t.push(e.content);
  16396. }
  16397. return {
  16398. $db: t.reverse().map(function (e) {
  16399. return {
  16400. $method: e.$method,
  16401. $param: Qn(e.$param)
  16402. };
  16403. })
  16404. };
  16405. }
  16406. }, {
  16407. key: "toString",
  16408. value: function toString() {
  16409. return JSON.stringify(this.toJSON());
  16410. }
  16411. }, {
  16412. key: "getAction",
  16413. value: function getAction() {
  16414. var e = this.toJSON().$db.find(function (e) {
  16415. return "action" === e.$method;
  16416. });
  16417. return e && e.$param && e.$param[0];
  16418. }
  16419. }, {
  16420. key: "getCommand",
  16421. value: function getCommand() {
  16422. return {
  16423. $db: this.toJSON().$db.filter(function (e) {
  16424. return "action" !== e.$method;
  16425. })
  16426. };
  16427. }
  16428. }, {
  16429. key: "isAggregate",
  16430. get: function get() {
  16431. var e = this;
  16432. for (; e;) {
  16433. var t = Xn(e),
  16434. _n10 = Xn(e.prevStage);
  16435. if ("aggregate" === t && "collection" === _n10 || "pipeline" === t) return !0;
  16436. e = e.prevStage;
  16437. }
  16438. return !1;
  16439. }
  16440. }, {
  16441. key: "isCommand",
  16442. get: function get() {
  16443. var e = this;
  16444. for (; e;) {
  16445. if ("command" === Xn(e)) return !0;
  16446. e = e.prevStage;
  16447. }
  16448. return !1;
  16449. }
  16450. }, {
  16451. key: "isAggregateCommand",
  16452. get: function get() {
  16453. var e = this;
  16454. for (; e;) {
  16455. var t = Xn(e),
  16456. _n11 = Xn(e.prevStage);
  16457. if ("aggregate" === t && "command" === _n11) return !0;
  16458. e = e.prevStage;
  16459. }
  16460. return !1;
  16461. }
  16462. }, {
  16463. key: "getNextStageFn",
  16464. value: function getNextStageFn(e) {
  16465. var t = this;
  16466. return function () {
  16467. return es({
  16468. $method: e,
  16469. $param: Qn(Array.from(arguments))
  16470. }, t, t._database);
  16471. };
  16472. }
  16473. }, {
  16474. key: "count",
  16475. get: function get() {
  16476. return this.isAggregate ? this.getNextStageFn("count") : function () {
  16477. return this._send("count", Array.from(arguments));
  16478. };
  16479. }
  16480. }, {
  16481. key: "remove",
  16482. get: function get() {
  16483. return this.isCommand ? this.getNextStageFn("remove") : function () {
  16484. return this._send("remove", Array.from(arguments));
  16485. };
  16486. }
  16487. }, {
  16488. key: "get",
  16489. value: function get() {
  16490. return this._send("get", Array.from(arguments));
  16491. }
  16492. }, {
  16493. key: "add",
  16494. get: function get() {
  16495. return this.isCommand ? this.getNextStageFn("add") : function () {
  16496. return this._send("add", Array.from(arguments));
  16497. };
  16498. }
  16499. }, {
  16500. key: "update",
  16501. value: function update() {
  16502. return this._send("update", Array.from(arguments));
  16503. }
  16504. }, {
  16505. key: "end",
  16506. value: function end() {
  16507. return this._send("end", Array.from(arguments));
  16508. }
  16509. }, {
  16510. key: "set",
  16511. get: function get() {
  16512. return this.isCommand ? this.getNextStageFn("set") : function () {
  16513. throw new Error("JQL禁止使用set方法");
  16514. };
  16515. }
  16516. }, {
  16517. key: "_send",
  16518. value: function _send(e, t) {
  16519. var n = this.getAction(),
  16520. s = this.getCommand();
  16521. if (s.$db.push({
  16522. $method: e,
  16523. $param: Qn(t)
  16524. }), S) {
  16525. var _e21 = s.$db.find(function (e) {
  16526. return "collection" === e.$method;
  16527. }),
  16528. _t13 = _e21 && _e21.$param;
  16529. _t13 && 1 === _t13.length && "string" == typeof _e21.$param[0] && _e21.$param[0].indexOf(",") > -1 && console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  16530. }
  16531. return this._database._callCloudFunction({
  16532. action: n,
  16533. command: s
  16534. });
  16535. }
  16536. }]);
  16537. return Zn;
  16538. }();
  16539. function es(e, t, n) {
  16540. return zn(new Zn(e, t, n), {
  16541. get: function get(e, t) {
  16542. var s = "db";
  16543. return e && e.content && (s = e.content.$method), Yn(s, t) ? es({
  16544. $method: t
  16545. }, e, n) : function () {
  16546. return es({
  16547. $method: t,
  16548. $param: Qn(Array.from(arguments))
  16549. }, e, n);
  16550. };
  16551. }
  16552. });
  16553. }
  16554. function ts(_ref43) {
  16555. var e = _ref43.path,
  16556. t = _ref43.method;
  16557. return /*#__PURE__*/function () {
  16558. function _class4() {
  16559. (0, _classCallCheck2.default)(this, _class4);
  16560. this.param = Array.from(arguments);
  16561. }
  16562. (0, _createClass2.default)(_class4, [{
  16563. key: "toJSON",
  16564. value: function toJSON() {
  16565. return {
  16566. $newDb: [].concat((0, _toConsumableArray2.default)(e.map(function (e) {
  16567. return {
  16568. $method: e
  16569. };
  16570. })), [{
  16571. $method: t,
  16572. $param: this.param
  16573. }])
  16574. };
  16575. }
  16576. }, {
  16577. key: "toString",
  16578. value: function toString() {
  16579. return JSON.stringify(this.toJSON());
  16580. }
  16581. }]);
  16582. return _class4;
  16583. }();
  16584. }
  16585. function ns(e) {
  16586. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  16587. return zn(new e(t), {
  16588. get: function get(e, t) {
  16589. return Yn("db", t) ? es({
  16590. $method: t
  16591. }, null, e) : function () {
  16592. return es({
  16593. $method: t,
  16594. $param: Qn(Array.from(arguments))
  16595. }, null, e);
  16596. };
  16597. }
  16598. });
  16599. }
  16600. var ss = /*#__PURE__*/function (_ref44) {
  16601. (0, _inherits2.default)(ss, _ref44);
  16602. var _super10 = _createSuper(ss);
  16603. function ss() {
  16604. (0, _classCallCheck2.default)(this, ss);
  16605. return _super10.apply(this, arguments);
  16606. }
  16607. (0, _createClass2.default)(ss, [{
  16608. key: "_parseResult",
  16609. value: function _parseResult(e) {
  16610. return this._isJQL ? e.result : e;
  16611. }
  16612. }, {
  16613. key: "_callCloudFunction",
  16614. value: function _callCloudFunction(_ref45) {
  16615. var _this20 = this;
  16616. var e = _ref45.action,
  16617. t = _ref45.command,
  16618. n = _ref45.multiCommand,
  16619. s = _ref45.queryList;
  16620. function r(e, t) {
  16621. if (n && s) for (var _n12 = 0; _n12 < s.length; _n12++) {
  16622. var _r7 = s[_n12];
  16623. _r7.udb && "function" == typeof _r7.udb.setResult && (t ? _r7.udb.setResult(t) : _r7.udb.setResult(e.result.dataList[_n12]));
  16624. }
  16625. }
  16626. var i = this,
  16627. o = this._isJQL ? "databaseForJQL" : "database";
  16628. function a(e) {
  16629. return i._callback("error", [e]), q(M(o, "fail"), e).then(function () {
  16630. return q(M(o, "complete"), e);
  16631. }).then(function () {
  16632. return r(null, e), Y(j, {
  16633. type: W,
  16634. content: e
  16635. }), Promise.reject(e);
  16636. });
  16637. }
  16638. var c = q(M(o, "invoke")),
  16639. u = this._uniClient;
  16640. return c.then(function () {
  16641. return u.callFunction({
  16642. name: "DCloud-clientDB",
  16643. type: l,
  16644. data: {
  16645. action: e,
  16646. command: t,
  16647. multiCommand: n
  16648. }
  16649. });
  16650. }).then(function (e) {
  16651. var _e$result = e.result,
  16652. t = _e$result.code,
  16653. n = _e$result.message,
  16654. s = _e$result.token,
  16655. c = _e$result.tokenExpired,
  16656. _e$result$systemInfo = _e$result.systemInfo,
  16657. u = _e$result$systemInfo === void 0 ? [] : _e$result$systemInfo;
  16658. if (u) for (var _e22 = 0; _e22 < u.length; _e22++) {
  16659. var _u$_e = u[_e22],
  16660. _t14 = _u$_e.level,
  16661. _n13 = _u$_e.message,
  16662. _s16 = _u$_e.detail,
  16663. _r8 = console["app" === C && "warn" === _t14 ? "error" : _t14] || console.log;
  16664. var _i4 = "[System Info]" + _n13;
  16665. _s16 && (_i4 = "".concat(_i4, "\n\u8BE6\u7EC6\u4FE1\u606F\uFF1A").concat(_s16)), _r8(_i4);
  16666. }
  16667. if (t) {
  16668. return a(new te({
  16669. code: t,
  16670. message: n,
  16671. requestId: e.requestId
  16672. }));
  16673. }
  16674. e.result.errCode = e.result.errCode || e.result.code, e.result.errMsg = e.result.errMsg || e.result.message, s && c && (re({
  16675. token: s,
  16676. tokenExpired: c
  16677. }), _this20._callbackAuth("refreshToken", [{
  16678. token: s,
  16679. tokenExpired: c
  16680. }]), _this20._callback("refreshToken", [{
  16681. token: s,
  16682. tokenExpired: c
  16683. }]), Y(B, {
  16684. token: s,
  16685. tokenExpired: c
  16686. }));
  16687. var l = [{
  16688. prop: "affectedDocs",
  16689. tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"
  16690. }, {
  16691. prop: "code",
  16692. tips: "code不再推荐使用,请使用errCode替代"
  16693. }, {
  16694. prop: "message",
  16695. tips: "message不再推荐使用,请使用errMsg替代"
  16696. }];
  16697. var _loop2 = function _loop2(_t15) {
  16698. var _l$_t = l[_t15],
  16699. n = _l$_t.prop,
  16700. s = _l$_t.tips;
  16701. if (n in e.result) {
  16702. var _t16 = e.result[n];
  16703. Object.defineProperty(e.result, n, {
  16704. get: function get() {
  16705. return console.warn(s), _t16;
  16706. }
  16707. });
  16708. }
  16709. };
  16710. for (var _t15 = 0; _t15 < l.length; _t15++) {
  16711. _loop2(_t15);
  16712. }
  16713. return function (e) {
  16714. return q(M(o, "success"), e).then(function () {
  16715. return q(M(o, "complete"), e);
  16716. }).then(function () {
  16717. r(e, null);
  16718. var t = i._parseResult(e);
  16719. return Y(j, {
  16720. type: W,
  16721. content: t
  16722. }), Promise.resolve(t);
  16723. });
  16724. }(e);
  16725. }, function (e) {
  16726. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  16727. return a(new te({
  16728. code: e.code || "SYSTEM_ERROR",
  16729. message: e.message,
  16730. requestId: e.requestId
  16731. }));
  16732. });
  16733. }
  16734. }]);
  16735. return ss;
  16736. }( /*#__PURE__*/function () {
  16737. function _class5() {
  16738. var _ref46 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16739. _ref46$uniClient = _ref46.uniClient,
  16740. e = _ref46$uniClient === void 0 ? {} : _ref46$uniClient,
  16741. _ref46$isJQL = _ref46.isJQL,
  16742. t = _ref46$isJQL === void 0 ? !1 : _ref46$isJQL;
  16743. (0, _classCallCheck2.default)(this, _class5);
  16744. this._uniClient = e, this._authCallBacks = {}, this._dbCallBacks = {}, e._isDefault && (this._dbCallBacks = L("_globalUniCloudDatabaseCallback")), t || (this.auth = Vn(this._authCallBacks)), this._isJQL = t, Object.assign(this, Vn(this._dbCallBacks)), this.env = zn({}, {
  16745. get: function get(e, t) {
  16746. return {
  16747. $env: t
  16748. };
  16749. }
  16750. }), this.Geo = zn({}, {
  16751. get: function get(e, t) {
  16752. return ts({
  16753. path: ["Geo"],
  16754. method: t
  16755. });
  16756. }
  16757. }), this.serverDate = ts({
  16758. path: [],
  16759. method: "serverDate"
  16760. }), this.RegExp = ts({
  16761. path: [],
  16762. method: "RegExp"
  16763. });
  16764. }
  16765. (0, _createClass2.default)(_class5, [{
  16766. key: "getCloudEnv",
  16767. value: function getCloudEnv(e) {
  16768. if ("string" != typeof e || !e.trim()) throw new Error("getCloudEnv参数错误");
  16769. return {
  16770. $env: e.replace("$cloudEnv_", "")
  16771. };
  16772. }
  16773. }, {
  16774. key: "_callback",
  16775. value: function _callback(e, t) {
  16776. var n = this._dbCallBacks;
  16777. n[e] && n[e].forEach(function (e) {
  16778. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  16779. });
  16780. }
  16781. }, {
  16782. key: "_callbackAuth",
  16783. value: function _callbackAuth(e, t) {
  16784. var n = this._authCallBacks;
  16785. n[e] && n[e].forEach(function (e) {
  16786. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  16787. });
  16788. }
  16789. }, {
  16790. key: "multiSend",
  16791. value: function multiSend() {
  16792. var e = Array.from(arguments),
  16793. t = e.map(function (e) {
  16794. var t = e.getAction(),
  16795. n = e.getCommand();
  16796. if ("getTemp" !== n.$db[n.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp");
  16797. return {
  16798. action: t,
  16799. command: n
  16800. };
  16801. });
  16802. return this._callCloudFunction({
  16803. multiCommand: t,
  16804. queryList: e
  16805. });
  16806. }
  16807. }]);
  16808. return _class5;
  16809. }());
  16810. var rs = "token无效,跳转登录页面",
  16811. is = "token过期,跳转登录页面",
  16812. os = {
  16813. TOKEN_INVALID_TOKEN_EXPIRED: is,
  16814. TOKEN_INVALID_INVALID_CLIENTID: rs,
  16815. TOKEN_INVALID: rs,
  16816. TOKEN_INVALID_WRONG_TOKEN: rs,
  16817. TOKEN_INVALID_ANONYMOUS_USER: rs
  16818. },
  16819. as = {
  16820. "uni-id-token-expired": is,
  16821. "uni-id-check-token-failed": rs,
  16822. "uni-id-token-not-exist": rs,
  16823. "uni-id-check-device-feature-failed": rs
  16824. };
  16825. function cs(e, t) {
  16826. var n = "";
  16827. return n = e ? "".concat(e, "/").concat(t) : t, n.replace(/^\//, "");
  16828. }
  16829. function us() {
  16830. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  16831. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
  16832. var n = [],
  16833. s = [];
  16834. return e.forEach(function (e) {
  16835. !0 === e.needLogin ? n.push(cs(t, e.path)) : !1 === e.needLogin && s.push(cs(t, e.path));
  16836. }), {
  16837. needLoginPage: n,
  16838. notNeedLoginPage: s
  16839. };
  16840. }
  16841. function ls(e) {
  16842. return e.split("?")[0].replace(/^\//, "");
  16843. }
  16844. function hs() {
  16845. return function (e) {
  16846. var t = e && e.$page && e.$page.fullPath || "";
  16847. return t ? ("/" !== t.charAt(0) && (t = "/" + t), t) : t;
  16848. }(function () {
  16849. var e = getCurrentPages();
  16850. return e[e.length - 1];
  16851. }());
  16852. }
  16853. function ds() {
  16854. return ls(hs());
  16855. }
  16856. function ps() {
  16857. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  16858. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  16859. if (!e) return !1;
  16860. if (!(t && t.list && t.list.length)) return !1;
  16861. var n = t.list,
  16862. s = ls(e);
  16863. return n.some(function (e) {
  16864. return e.pagePath === s;
  16865. });
  16866. }
  16867. var fs = !!_pages.default.uniIdRouter;
  16868. var _ref47 = function () {
  16869. var _ref28 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pages.default,
  16870. _ref28$pages = _ref28.pages,
  16871. t = _ref28$pages === void 0 ? [] : _ref28$pages,
  16872. _ref28$subPackages = _ref28.subPackages,
  16873. n = _ref28$subPackages === void 0 ? [] : _ref28$subPackages,
  16874. _ref28$uniIdRouter = _ref28.uniIdRouter,
  16875. s = _ref28$uniIdRouter === void 0 ? {} : _ref28$uniIdRouter,
  16876. _ref28$tabBar = _ref28.tabBar,
  16877. r = _ref28$tabBar === void 0 ? {} : _ref28$tabBar;
  16878. var i = s.loginPage,
  16879. _s$needLogin = s.needLogin,
  16880. o = _s$needLogin === void 0 ? [] : _s$needLogin,
  16881. _s$resToLogin = s.resToLogin,
  16882. a = _s$resToLogin === void 0 ? !0 : _s$resToLogin,
  16883. _us = us(t),
  16884. c = _us.needLoginPage,
  16885. u = _us.notNeedLoginPage,
  16886. _ref30 = function () {
  16887. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  16888. var t = [],
  16889. n = [];
  16890. return e.forEach(function (e) {
  16891. var s = e.root,
  16892. _e$pages = e.pages,
  16893. r = _e$pages === void 0 ? [] : _e$pages,
  16894. _us2 = us(r, s),
  16895. i = _us2.needLoginPage,
  16896. o = _us2.notNeedLoginPage;
  16897. t.push.apply(t, (0, _toConsumableArray2.default)(i)), n.push.apply(n, (0, _toConsumableArray2.default)(o));
  16898. }), {
  16899. needLoginPage: t,
  16900. notNeedLoginPage: n
  16901. };
  16902. }(n),
  16903. l = _ref30.needLoginPage,
  16904. h = _ref30.notNeedLoginPage;
  16905. return {
  16906. loginPage: i,
  16907. routerNeedLogin: o,
  16908. resToLogin: a,
  16909. needLoginPage: [].concat((0, _toConsumableArray2.default)(c), (0, _toConsumableArray2.default)(l)),
  16910. notNeedLoginPage: [].concat((0, _toConsumableArray2.default)(u), (0, _toConsumableArray2.default)(h)),
  16911. loginPageInTabBar: ps(i, r)
  16912. };
  16913. }(),
  16914. gs = _ref47.loginPage,
  16915. ms = _ref47.routerNeedLogin,
  16916. ys = _ref47.resToLogin,
  16917. _s = _ref47.needLoginPage,
  16918. ws = _ref47.notNeedLoginPage,
  16919. vs = _ref47.loginPageInTabBar;
  16920. if (_s.indexOf(gs) > -1) throw new Error("Login page [".concat(gs, "] should not be \"needLogin\", please check your pages.json"));
  16921. function Is(e) {
  16922. var t = ds();
  16923. if ("/" === e.charAt(0)) return e;
  16924. var _e$split = e.split("?"),
  16925. _e$split2 = (0, _slicedToArray2.default)(_e$split, 2),
  16926. n = _e$split2[0],
  16927. s = _e$split2[1],
  16928. r = n.replace(/^\//, "").split("/"),
  16929. i = t.split("/");
  16930. i.pop();
  16931. for (var _e23 = 0; _e23 < r.length; _e23++) {
  16932. var _t17 = r[_e23];
  16933. ".." === _t17 ? i.pop() : "." !== _t17 && i.push(_t17);
  16934. }
  16935. return "" === i[0] && i.shift(), "/" + i.join("/") + (s ? "?" + s : "");
  16936. }
  16937. function Ss(e) {
  16938. var t = ls(Is(e));
  16939. return !(ws.indexOf(t) > -1) && (_s.indexOf(t) > -1 || ms.some(function (t) {
  16940. return function (e, t) {
  16941. return new RegExp(t).test(e);
  16942. }(e, t);
  16943. }));
  16944. }
  16945. function bs(_ref48) {
  16946. var e = _ref48.redirect;
  16947. var t = ls(e),
  16948. n = ls(gs);
  16949. return ds() !== n && t !== n;
  16950. }
  16951. function ks() {
  16952. var _ref49 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16953. e = _ref49.api,
  16954. t = _ref49.redirect;
  16955. if (!t || !bs({
  16956. redirect: t
  16957. })) return;
  16958. var n = function (e, t) {
  16959. return "/" !== e.charAt(0) && (e = "/" + e), t ? e.indexOf("?") > -1 ? e + "&uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e + "?uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e;
  16960. }(gs, t);
  16961. vs ? "navigateTo" !== e && "redirectTo" !== e || (e = "switchTab") : "switchTab" === e && (e = "navigateTo");
  16962. var s = {
  16963. navigateTo: uni.navigateTo,
  16964. redirectTo: uni.redirectTo,
  16965. switchTab: uni.switchTab,
  16966. reLaunch: uni.reLaunch
  16967. };
  16968. setTimeout(function () {
  16969. s[e]({
  16970. url: n
  16971. });
  16972. }, 0);
  16973. }
  16974. function As() {
  16975. var _ref50 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16976. e = _ref50.url;
  16977. var t = {
  16978. abortLoginPageJump: !1,
  16979. autoToLoginPage: !1
  16980. },
  16981. n = function () {
  16982. var _se4 = se(),
  16983. e = _se4.token,
  16984. t = _se4.tokenExpired;
  16985. var n;
  16986. if (e) {
  16987. if (t < Date.now()) {
  16988. var _e24 = "uni-id-token-expired";
  16989. n = {
  16990. errCode: _e24,
  16991. errMsg: as[_e24]
  16992. };
  16993. }
  16994. } else {
  16995. var _e25 = "uni-id-check-token-failed";
  16996. n = {
  16997. errCode: _e25,
  16998. errMsg: as[_e25]
  16999. };
  17000. }
  17001. return n;
  17002. }();
  17003. if (Ss(e) && n) {
  17004. n.uniIdRedirectUrl = e;
  17005. if (z($).length > 0) return setTimeout(function () {
  17006. Y($, n);
  17007. }, 0), t.abortLoginPageJump = !0, t;
  17008. t.autoToLoginPage = !0;
  17009. }
  17010. return t;
  17011. }
  17012. function Cs() {
  17013. !function () {
  17014. var e = hs(),
  17015. _As = As({
  17016. url: e
  17017. }),
  17018. t = _As.abortLoginPageJump,
  17019. n = _As.autoToLoginPage;
  17020. t || n && ks({
  17021. api: "redirectTo",
  17022. redirect: e
  17023. });
  17024. }();
  17025. var e = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  17026. var _loop3 = function _loop3(_t18) {
  17027. var n = e[_t18];
  17028. uni.addInterceptor(n, {
  17029. invoke: function invoke(e) {
  17030. var _As2 = As({
  17031. url: e.url
  17032. }),
  17033. t = _As2.abortLoginPageJump,
  17034. s = _As2.autoToLoginPage;
  17035. return t ? e : s ? (ks({
  17036. api: n,
  17037. redirect: Is(e.url)
  17038. }), !1) : e;
  17039. }
  17040. });
  17041. };
  17042. for (var _t18 = 0; _t18 < e.length; _t18++) {
  17043. _loop3(_t18);
  17044. }
  17045. }
  17046. function Ps() {
  17047. this.onResponse(function (e) {
  17048. var t = e.type,
  17049. n = e.content;
  17050. var s = !1;
  17051. switch (t) {
  17052. case "cloudobject":
  17053. s = function (e) {
  17054. if ("object" != (0, _typeof2.default)(e)) return !1;
  17055. var _ref51 = e || {},
  17056. t = _ref51.errCode;
  17057. return t in as;
  17058. }(n);
  17059. break;
  17060. case "clientdb":
  17061. s = function (e) {
  17062. if ("object" != (0, _typeof2.default)(e)) return !1;
  17063. var _ref52 = e || {},
  17064. t = _ref52.errCode;
  17065. return t in os;
  17066. }(n);
  17067. }
  17068. s && function () {
  17069. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17070. var t = z($);
  17071. Z().then(function () {
  17072. var n = hs();
  17073. if (n && bs({
  17074. redirect: n
  17075. })) return t.length > 0 ? Y($, Object.assign({
  17076. uniIdRedirectUrl: n
  17077. }, e)) : void (gs && ks({
  17078. api: "navigateTo",
  17079. redirect: n
  17080. }));
  17081. });
  17082. }(n);
  17083. });
  17084. }
  17085. function Ts(e) {
  17086. !function (e) {
  17087. e.onResponse = function (e) {
  17088. V(j, e);
  17089. }, e.offResponse = function (e) {
  17090. G(j, e);
  17091. };
  17092. }(e), function (e) {
  17093. e.onNeedLogin = function (e) {
  17094. V($, e);
  17095. }, e.offNeedLogin = function (e) {
  17096. G($, e);
  17097. }, fs && (L("_globalUniCloudStatus").needLoginInit || (L("_globalUniCloudStatus").needLoginInit = !0, Z().then(function () {
  17098. Cs.call(e);
  17099. }), ys && Ps.call(e)));
  17100. }(e), function (e) {
  17101. e.onRefreshToken = function (e) {
  17102. V(B, e);
  17103. }, e.offRefreshToken = function (e) {
  17104. G(B, e);
  17105. };
  17106. }(e);
  17107. }
  17108. var xs;
  17109. var Os = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  17110. Es = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  17111. function Ls() {
  17112. var e = se().token || "",
  17113. t = e.split(".");
  17114. if (!e || 3 !== t.length) return {
  17115. uid: null,
  17116. role: [],
  17117. permission: [],
  17118. tokenExpired: 0
  17119. };
  17120. var n;
  17121. try {
  17122. n = JSON.parse((s = t[1], decodeURIComponent(xs(s).split("").map(function (e) {
  17123. return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);
  17124. }).join(""))));
  17125. } catch (e) {
  17126. throw new Error("获取当前用户信息出错,详细错误信息为:" + e.message);
  17127. }
  17128. var s;
  17129. return n.tokenExpired = 1e3 * n.exp, delete n.exp, delete n.iat, n;
  17130. }
  17131. xs = "function" != typeof atob ? function (e) {
  17132. if (e = String(e).replace(/[\t\n\f\r ]+/g, ""), !Es.test(e)) throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  17133. var t;
  17134. e += "==".slice(2 - (3 & e.length));
  17135. for (var n, s, r = "", i = 0; i < e.length;) {
  17136. t = Os.indexOf(e.charAt(i++)) << 18 | Os.indexOf(e.charAt(i++)) << 12 | (n = Os.indexOf(e.charAt(i++))) << 6 | (s = Os.indexOf(e.charAt(i++))), r += 64 === n ? String.fromCharCode(t >> 16 & 255) : 64 === s ? String.fromCharCode(t >> 16 & 255, t >> 8 & 255) : String.fromCharCode(t >> 16 & 255, t >> 8 & 255, 255 & t);
  17137. }
  17138. return r;
  17139. } : atob;
  17140. var Rs = n(function (e, t) {
  17141. Object.defineProperty(t, "__esModule", {
  17142. value: !0
  17143. });
  17144. var n = "chooseAndUploadFile:ok",
  17145. s = "chooseAndUploadFile:fail";
  17146. function r(e, t) {
  17147. return e.tempFiles.forEach(function (e, n) {
  17148. e.name || (e.name = e.path.substring(e.path.lastIndexOf("/") + 1)), t && (e.fileType = t), e.cloudPath = Date.now() + "_" + n + e.name.substring(e.name.lastIndexOf("."));
  17149. }), e.tempFilePaths || (e.tempFilePaths = e.tempFiles.map(function (e) {
  17150. return e.path;
  17151. })), e;
  17152. }
  17153. function i(e, t, _ref53) {
  17154. var s = _ref53.onChooseFile,
  17155. r = _ref53.onUploadProgress;
  17156. return t.then(function (e) {
  17157. if (s) {
  17158. var _t19 = s(e);
  17159. if (void 0 !== _t19) return Promise.resolve(_t19).then(function (t) {
  17160. return void 0 === t ? e : t;
  17161. });
  17162. }
  17163. return e;
  17164. }).then(function (t) {
  17165. return !1 === t ? {
  17166. errMsg: n,
  17167. tempFilePaths: [],
  17168. tempFiles: []
  17169. } : function (e, t) {
  17170. var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
  17171. var r = arguments.length > 3 ? arguments[3] : undefined;
  17172. (t = Object.assign({}, t)).errMsg = n;
  17173. var i = t.tempFiles,
  17174. o = i.length;
  17175. var a = 0;
  17176. return new Promise(function (n) {
  17177. for (; a < s;) {
  17178. c();
  17179. }
  17180. function c() {
  17181. var s = a++;
  17182. if (s >= o) return void (!i.find(function (e) {
  17183. return !e.url && !e.errMsg;
  17184. }) && n(t));
  17185. var u = i[s];
  17186. e.uploadFile({
  17187. provider: u.provider,
  17188. filePath: u.path,
  17189. cloudPath: u.cloudPath,
  17190. fileType: u.fileType,
  17191. cloudPathAsRealPath: u.cloudPathAsRealPath,
  17192. onUploadProgress: function onUploadProgress(e) {
  17193. e.index = s, e.tempFile = u, e.tempFilePath = u.path, r && r(e);
  17194. }
  17195. }).then(function (e) {
  17196. u.url = e.fileID, s < o && c();
  17197. }).catch(function (e) {
  17198. u.errMsg = e.errMsg || e.message, s < o && c();
  17199. });
  17200. }
  17201. });
  17202. }(e, t, 5, r);
  17203. });
  17204. }
  17205. t.initChooseAndUploadFile = function (e) {
  17206. return function () {
  17207. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  17208. type: "all"
  17209. };
  17210. return "image" === t.type ? i(e, function (e) {
  17211. var t = e.count,
  17212. n = e.sizeType,
  17213. _e$sourceType = e.sourceType,
  17214. i = _e$sourceType === void 0 ? ["album", "camera"] : _e$sourceType,
  17215. o = e.extension;
  17216. return new Promise(function (e, a) {
  17217. uni.chooseImage({
  17218. count: t,
  17219. sizeType: n,
  17220. sourceType: i,
  17221. extension: o,
  17222. success: function success(t) {
  17223. e(r(t, "image"));
  17224. },
  17225. fail: function fail(e) {
  17226. a({
  17227. errMsg: e.errMsg.replace("chooseImage:fail", s)
  17228. });
  17229. }
  17230. });
  17231. });
  17232. }(t), t) : "video" === t.type ? i(e, function (e) {
  17233. var t = e.camera,
  17234. n = e.compressed,
  17235. i = e.maxDuration,
  17236. _e$sourceType2 = e.sourceType,
  17237. o = _e$sourceType2 === void 0 ? ["album", "camera"] : _e$sourceType2,
  17238. a = e.extension;
  17239. return new Promise(function (e, c) {
  17240. uni.chooseVideo({
  17241. camera: t,
  17242. compressed: n,
  17243. maxDuration: i,
  17244. sourceType: o,
  17245. extension: a,
  17246. success: function success(t) {
  17247. var n = t.tempFilePath,
  17248. s = t.duration,
  17249. i = t.size,
  17250. o = t.height,
  17251. a = t.width;
  17252. e(r({
  17253. errMsg: "chooseVideo:ok",
  17254. tempFilePaths: [n],
  17255. tempFiles: [{
  17256. name: t.tempFile && t.tempFile.name || "",
  17257. path: n,
  17258. size: i,
  17259. type: t.tempFile && t.tempFile.type || "",
  17260. width: a,
  17261. height: o,
  17262. duration: s,
  17263. fileType: "video",
  17264. cloudPath: ""
  17265. }]
  17266. }, "video"));
  17267. },
  17268. fail: function fail(e) {
  17269. c({
  17270. errMsg: e.errMsg.replace("chooseVideo:fail", s)
  17271. });
  17272. }
  17273. });
  17274. });
  17275. }(t), t) : i(e, function (e) {
  17276. var t = e.count,
  17277. n = e.extension;
  17278. return new Promise(function (e, i) {
  17279. var o = uni.chooseFile;
  17280. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o = wx.chooseMessageFile), "function" != typeof o) return i({
  17281. errMsg: s + " 请指定 type 类型,该平台仅支持选择 image 或 video。"
  17282. });
  17283. o({
  17284. type: "all",
  17285. count: t,
  17286. extension: n,
  17287. success: function success(t) {
  17288. e(r(t));
  17289. },
  17290. fail: function fail(e) {
  17291. i({
  17292. errMsg: e.errMsg.replace("chooseFile:fail", s)
  17293. });
  17294. }
  17295. });
  17296. });
  17297. }(t), t);
  17298. };
  17299. };
  17300. }),
  17301. Us = t(Rs);
  17302. var Ns = "manual";
  17303. function Ds(e) {
  17304. return {
  17305. props: {
  17306. localdata: {
  17307. type: Array,
  17308. default: function _default() {
  17309. return [];
  17310. }
  17311. },
  17312. options: {
  17313. type: [Object, Array],
  17314. default: function _default() {
  17315. return {};
  17316. }
  17317. },
  17318. spaceInfo: {
  17319. type: Object,
  17320. default: function _default() {
  17321. return {};
  17322. }
  17323. },
  17324. collection: {
  17325. type: [String, Array],
  17326. default: ""
  17327. },
  17328. action: {
  17329. type: String,
  17330. default: ""
  17331. },
  17332. field: {
  17333. type: String,
  17334. default: ""
  17335. },
  17336. orderby: {
  17337. type: String,
  17338. default: ""
  17339. },
  17340. where: {
  17341. type: [String, Object],
  17342. default: ""
  17343. },
  17344. pageData: {
  17345. type: String,
  17346. default: "add"
  17347. },
  17348. pageCurrent: {
  17349. type: Number,
  17350. default: 1
  17351. },
  17352. pageSize: {
  17353. type: Number,
  17354. default: 20
  17355. },
  17356. getcount: {
  17357. type: [Boolean, String],
  17358. default: !1
  17359. },
  17360. gettree: {
  17361. type: [Boolean, String],
  17362. default: !1
  17363. },
  17364. gettreepath: {
  17365. type: [Boolean, String],
  17366. default: !1
  17367. },
  17368. startwith: {
  17369. type: String,
  17370. default: ""
  17371. },
  17372. limitlevel: {
  17373. type: Number,
  17374. default: 10
  17375. },
  17376. groupby: {
  17377. type: String,
  17378. default: ""
  17379. },
  17380. groupField: {
  17381. type: String,
  17382. default: ""
  17383. },
  17384. distinct: {
  17385. type: [Boolean, String],
  17386. default: !1
  17387. },
  17388. foreignKey: {
  17389. type: String,
  17390. default: ""
  17391. },
  17392. loadtime: {
  17393. type: String,
  17394. default: "auto"
  17395. },
  17396. manual: {
  17397. type: Boolean,
  17398. default: !1
  17399. }
  17400. },
  17401. data: function data() {
  17402. return {
  17403. mixinDatacomLoading: !1,
  17404. mixinDatacomHasMore: !1,
  17405. mixinDatacomResData: [],
  17406. mixinDatacomErrorMessage: "",
  17407. mixinDatacomPage: {},
  17408. mixinDatacomError: null
  17409. };
  17410. },
  17411. created: function created() {
  17412. var _this21 = this;
  17413. this.mixinDatacomPage = {
  17414. current: this.pageCurrent,
  17415. size: this.pageSize,
  17416. count: 0
  17417. }, this.$watch(function () {
  17418. var e = [];
  17419. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach(function (t) {
  17420. e.push(_this21[t]);
  17421. }), e;
  17422. }, function (e, t) {
  17423. if (_this21.loadtime === Ns) return;
  17424. var n = !1;
  17425. var s = [];
  17426. for (var _r9 = 2; _r9 < e.length; _r9++) {
  17427. e[_r9] !== t[_r9] && (s.push(e[_r9]), n = !0);
  17428. }
  17429. e[0] !== t[0] && (_this21.mixinDatacomPage.current = _this21.pageCurrent), _this21.mixinDatacomPage.size = _this21.pageSize, _this21.onMixinDatacomPropsChange(n, s);
  17430. });
  17431. },
  17432. methods: {
  17433. onMixinDatacomPropsChange: function onMixinDatacomPropsChange(e, t) {},
  17434. mixinDatacomEasyGet: function mixinDatacomEasyGet() {
  17435. var _this22 = this;
  17436. var _ref54 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17437. _ref54$getone = _ref54.getone,
  17438. e = _ref54$getone === void 0 ? !1 : _ref54$getone,
  17439. t = _ref54.success,
  17440. n = _ref54.fail;
  17441. this.mixinDatacomLoading || (this.mixinDatacomLoading = !0, this.mixinDatacomErrorMessage = "", this.mixinDatacomError = null, this.mixinDatacomGet().then(function (n) {
  17442. _this22.mixinDatacomLoading = !1;
  17443. var _n$result = n.result,
  17444. s = _n$result.data,
  17445. r = _n$result.count;
  17446. _this22.getcount && (_this22.mixinDatacomPage.count = r), _this22.mixinDatacomHasMore = s.length < _this22.pageSize;
  17447. var i = e ? s.length ? s[0] : void 0 : s;
  17448. _this22.mixinDatacomResData = i, t && t(i);
  17449. }).catch(function (e) {
  17450. _this22.mixinDatacomLoading = !1, _this22.mixinDatacomErrorMessage = e, _this22.mixinDatacomError = e, n && n(e);
  17451. }));
  17452. },
  17453. mixinDatacomGet: function mixinDatacomGet() {
  17454. var _n14;
  17455. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17456. var n;
  17457. t = t || {}, n = "undefined" != typeof __uniX && __uniX ? e.databaseForJQL(this.spaceInfo) : e.database(this.spaceInfo);
  17458. var s = t.action || this.action;
  17459. s && (n = n.action(s));
  17460. var r = t.collection || this.collection;
  17461. n = Array.isArray(r) ? (_n14 = n).collection.apply(_n14, (0, _toConsumableArray2.default)(r)) : n.collection(r);
  17462. var i = t.where || this.where;
  17463. i && Object.keys(i).length && (n = n.where(i));
  17464. var o = t.field || this.field;
  17465. o && (n = n.field(o));
  17466. var a = t.foreignKey || this.foreignKey;
  17467. a && (n = n.foreignKey(a));
  17468. var c = t.groupby || this.groupby;
  17469. c && (n = n.groupBy(c));
  17470. var u = t.groupField || this.groupField;
  17471. u && (n = n.groupField(u));
  17472. !0 === (void 0 !== t.distinct ? t.distinct : this.distinct) && (n = n.distinct());
  17473. var l = t.orderby || this.orderby;
  17474. l && (n = n.orderBy(l));
  17475. var h = void 0 !== t.pageCurrent ? t.pageCurrent : this.mixinDatacomPage.current,
  17476. d = void 0 !== t.pageSize ? t.pageSize : this.mixinDatacomPage.size,
  17477. p = void 0 !== t.getcount ? t.getcount : this.getcount,
  17478. f = void 0 !== t.gettree ? t.gettree : this.gettree,
  17479. g = void 0 !== t.gettreepath ? t.gettreepath : this.gettreepath,
  17480. m = {
  17481. getCount: p
  17482. },
  17483. y = {
  17484. limitLevel: void 0 !== t.limitlevel ? t.limitlevel : this.limitlevel,
  17485. startWith: void 0 !== t.startwith ? t.startwith : this.startwith
  17486. };
  17487. return f && (m.getTree = y), g && (m.getTreePath = y), n = n.skip(d * (h - 1)).limit(d).get(m), n;
  17488. }
  17489. }
  17490. };
  17491. }
  17492. function qs(e) {
  17493. return function (t) {
  17494. var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  17495. n = function (e) {
  17496. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  17497. return e.customUI = t.customUI || e.customUI, e.parseSystemError = t.parseSystemError || e.parseSystemError, Object.assign(e.loadingOptions, t.loadingOptions), Object.assign(e.errorOptions, t.errorOptions), "object" == (0, _typeof2.default)(t.secretMethods) && (e.secretMethods = t.secretMethods), e;
  17498. }({
  17499. customUI: !1,
  17500. loadingOptions: {
  17501. title: "加载中...",
  17502. mask: !0
  17503. },
  17504. errorOptions: {
  17505. type: "modal",
  17506. retry: !1
  17507. }
  17508. }, n);
  17509. var _n15 = n,
  17510. s = _n15.customUI,
  17511. r = _n15.loadingOptions,
  17512. i = _n15.errorOptions,
  17513. o = _n15.parseSystemError,
  17514. a = !s;
  17515. return new Proxy({}, {
  17516. get: function get(s, c) {
  17517. switch (c) {
  17518. case "toString":
  17519. return "[object UniCloudObject]";
  17520. case "toJSON":
  17521. return {};
  17522. }
  17523. return function () {
  17524. var _ref55 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17525. e = _ref55.fn,
  17526. t = _ref55.interceptorName,
  17527. n = _ref55.getCallbackArgs;
  17528. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee55() {
  17529. var _len2,
  17530. s,
  17531. _key2,
  17532. r,
  17533. i,
  17534. o,
  17535. _args = arguments;
  17536. return _regenerator.default.wrap(function _callee55$(_context55) {
  17537. while (1) {
  17538. switch (_context55.prev = _context55.next) {
  17539. case 0:
  17540. for (_len2 = _args.length, s = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  17541. s[_key2] = _args[_key2];
  17542. }
  17543. r = n ? n({
  17544. params: s
  17545. }) : {};
  17546. _context55.prev = 2;
  17547. _context55.next = 5;
  17548. return q(M(t, "invoke"), _objectSpread({}, r));
  17549. case 5:
  17550. _context55.next = 7;
  17551. return e.apply(void 0, s);
  17552. case 7:
  17553. i = _context55.sent;
  17554. _context55.next = 10;
  17555. return q(M(t, "success"), _objectSpread(_objectSpread({}, r), {}, {
  17556. result: i
  17557. }));
  17558. case 10:
  17559. return _context55.abrupt("return", i);
  17560. case 13:
  17561. _context55.prev = 13;
  17562. _context55.t0 = _context55["catch"](2);
  17563. o = _context55.t0;
  17564. _context55.next = 18;
  17565. return q(M(t, "fail"), _objectSpread(_objectSpread({}, r), {}, {
  17566. error: o
  17567. }));
  17568. case 18:
  17569. throw o;
  17570. case 19:
  17571. _context55.prev = 19;
  17572. _context55.next = 22;
  17573. return q(M(t, "complete"), o ? _objectSpread(_objectSpread({}, r), {}, {
  17574. error: o
  17575. }) : _objectSpread(_objectSpread({}, r), {}, {
  17576. result: i
  17577. }));
  17578. case 22:
  17579. return _context55.finish(19);
  17580. case 23:
  17581. case "end":
  17582. return _context55.stop();
  17583. }
  17584. }
  17585. }, _callee55, null, [[2, 13, 19, 23]]);
  17586. }));
  17587. }({
  17588. fn: function () {
  17589. var _s17 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee57() {
  17590. var h,
  17591. _len3,
  17592. l,
  17593. _key3,
  17594. d,
  17595. p,
  17596. _ref57,
  17597. f,
  17598. g,
  17599. m,
  17600. y,
  17601. _e26,
  17602. _yield,
  17603. _t20,
  17604. _n16,
  17605. _args4 = arguments;
  17606. return _regenerator.default.wrap(function _callee57$(_context57) {
  17607. while (1) {
  17608. switch (_context57.prev = _context57.next) {
  17609. case 0:
  17610. a && uni.showLoading({
  17611. title: r.title,
  17612. mask: r.mask
  17613. });
  17614. for (_len3 = _args4.length, l = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  17615. l[_key3] = _args4[_key3];
  17616. }
  17617. d = {
  17618. name: t,
  17619. type: u,
  17620. data: {
  17621. method: c,
  17622. params: l
  17623. }
  17624. };
  17625. "object" == (0, _typeof2.default)(n.secretMethods) && function (e, t) {
  17626. var n = t.data.method,
  17627. s = e.secretMethods || {},
  17628. r = s[n] || s["*"];
  17629. r && (t.secretType = r);
  17630. }(n, d);
  17631. p = !1;
  17632. _context57.prev = 5;
  17633. _context57.next = 8;
  17634. return e.callFunction(d);
  17635. case 8:
  17636. h = _context57.sent;
  17637. _context57.next = 14;
  17638. break;
  17639. case 11:
  17640. _context57.prev = 11;
  17641. _context57.t0 = _context57["catch"](5);
  17642. p = !0, h = {
  17643. result: new te(_context57.t0)
  17644. };
  17645. case 14:
  17646. _ref57 = h.result || {}, f = _ref57.errSubject, g = _ref57.errCode, m = _ref57.errMsg, y = _ref57.newToken;
  17647. if (!(a && uni.hideLoading(), y && y.token && y.tokenExpired && (re(y), Y(B, _objectSpread({}, y))), g)) {
  17648. _context57.next = 39;
  17649. break;
  17650. }
  17651. _e26 = m;
  17652. if (!(p && o)) {
  17653. _context57.next = 24;
  17654. break;
  17655. }
  17656. _context57.next = 20;
  17657. return o({
  17658. objectName: t,
  17659. methodName: c,
  17660. params: l,
  17661. errSubject: f,
  17662. errCode: g,
  17663. errMsg: m
  17664. });
  17665. case 20:
  17666. _context57.t1 = _context57.sent.errMsg;
  17667. if (_context57.t1) {
  17668. _context57.next = 23;
  17669. break;
  17670. }
  17671. _context57.t1 = m;
  17672. case 23:
  17673. _e26 = _context57.t1;
  17674. case 24:
  17675. if (!a) {
  17676. _context57.next = 37;
  17677. break;
  17678. }
  17679. if (!("toast" === i.type)) {
  17680. _context57.next = 29;
  17681. break;
  17682. }
  17683. uni.showToast({
  17684. title: _e26,
  17685. icon: "none"
  17686. });
  17687. _context57.next = 37;
  17688. break;
  17689. case 29:
  17690. if (!("modal" !== i.type)) {
  17691. _context57.next = 31;
  17692. break;
  17693. }
  17694. throw new Error("Invalid errorOptions.type: ".concat(i.type));
  17695. case 31:
  17696. _context57.next = 33;
  17697. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee56() {
  17698. var _ref59,
  17699. e,
  17700. t,
  17701. n,
  17702. s,
  17703. r,
  17704. _args2 = arguments;
  17705. return _regenerator.default.wrap(function _callee56$(_context56) {
  17706. while (1) {
  17707. switch (_context56.prev = _context56.next) {
  17708. case 0:
  17709. _ref59 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, e = _ref59.title, t = _ref59.content, n = _ref59.showCancel, s = _ref59.cancelText, r = _ref59.confirmText;
  17710. return _context56.abrupt("return", new Promise(function (i, o) {
  17711. uni.showModal({
  17712. title: e,
  17713. content: t,
  17714. showCancel: n,
  17715. cancelText: s,
  17716. confirmText: r,
  17717. success: function success(e) {
  17718. i(e);
  17719. },
  17720. fail: function fail() {
  17721. i({
  17722. confirm: !1,
  17723. cancel: !0
  17724. });
  17725. }
  17726. });
  17727. }));
  17728. case 2:
  17729. case "end":
  17730. return _context56.stop();
  17731. }
  17732. }
  17733. }, _callee56);
  17734. }))({
  17735. title: "提示",
  17736. content: _e26,
  17737. showCancel: i.retry,
  17738. cancelText: "取消",
  17739. confirmText: i.retry ? "重试" : "确定"
  17740. });
  17741. case 33:
  17742. _yield = _context57.sent;
  17743. _t20 = _yield.confirm;
  17744. if (!(i.retry && _t20)) {
  17745. _context57.next = 37;
  17746. break;
  17747. }
  17748. return _context57.abrupt("return", s.apply(void 0, l));
  17749. case 37:
  17750. _n16 = new te({
  17751. subject: f,
  17752. code: g,
  17753. message: m,
  17754. requestId: h.requestId
  17755. });
  17756. throw _n16.detail = h.result, Y(j, {
  17757. type: J,
  17758. content: _n16
  17759. }), _n16;
  17760. case 39:
  17761. return _context57.abrupt("return", (Y(j, {
  17762. type: J,
  17763. content: h.result
  17764. }), h.result));
  17765. case 40:
  17766. case "end":
  17767. return _context57.stop();
  17768. }
  17769. }
  17770. }, _callee57, null, [[5, 11]]);
  17771. }));
  17772. function s() {
  17773. return _s17.apply(this, arguments);
  17774. }
  17775. return s;
  17776. }(),
  17777. interceptorName: "callObject",
  17778. getCallbackArgs: function getCallbackArgs() {
  17779. var _ref60 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17780. e = _ref60.params;
  17781. return {
  17782. objectName: t,
  17783. methodName: c,
  17784. params: e
  17785. };
  17786. }
  17787. });
  17788. }
  17789. });
  17790. };
  17791. }
  17792. function Ms(e) {
  17793. return L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e.config.spaceId));
  17794. }
  17795. function Fs() {
  17796. return _Fs.apply(this, arguments);
  17797. }
  17798. function _Fs() {
  17799. _Fs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee62() {
  17800. var _ref71,
  17801. e,
  17802. _ref71$callLoginByWei,
  17803. t,
  17804. n,
  17805. s,
  17806. r,
  17807. _args9 = arguments;
  17808. return _regenerator.default.wrap(function _callee62$(_context62) {
  17809. while (1) {
  17810. switch (_context62.prev = _context62.next) {
  17811. case 0:
  17812. _ref71 = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {}, e = _ref71.openid, _ref71$callLoginByWei = _ref71.callLoginByWeixin, t = _ref71$callLoginByWei === void 0 ? !1 : _ref71$callLoginByWei;
  17813. n = Ms(this);
  17814. if (!("mp-weixin" !== C)) {
  17815. _context62.next = 4;
  17816. break;
  17817. }
  17818. throw new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `".concat(C, "`"));
  17819. case 4:
  17820. if (!(e && t)) {
  17821. _context62.next = 6;
  17822. break;
  17823. }
  17824. throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");
  17825. case 6:
  17826. if (!e) {
  17827. _context62.next = 8;
  17828. break;
  17829. }
  17830. return _context62.abrupt("return", (n.mpWeixinOpenid = e, {}));
  17831. case 8:
  17832. _context62.next = 10;
  17833. return new Promise(function (e, t) {
  17834. uni.login({
  17835. success: function success(t) {
  17836. e(t.code);
  17837. },
  17838. fail: function fail(e) {
  17839. t(new Error(e.errMsg));
  17840. }
  17841. });
  17842. });
  17843. case 10:
  17844. s = _context62.sent;
  17845. r = this.importObject("uni-id-co", {
  17846. customUI: !0
  17847. });
  17848. _context62.next = 14;
  17849. return r.secureNetworkHandshakeByWeixin({
  17850. code: s,
  17851. callLoginByWeixin: t
  17852. });
  17853. case 14:
  17854. n.mpWeixinCode = s;
  17855. return _context62.abrupt("return", {
  17856. code: s
  17857. });
  17858. case 16:
  17859. case "end":
  17860. return _context62.stop();
  17861. }
  17862. }
  17863. }, _callee62, this);
  17864. }));
  17865. return _Fs.apply(this, arguments);
  17866. }
  17867. function Ks(_x46) {
  17868. return _Ks.apply(this, arguments);
  17869. }
  17870. function _Ks() {
  17871. _Ks = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee63(e) {
  17872. var t;
  17873. return _regenerator.default.wrap(function _callee63$(_context63) {
  17874. while (1) {
  17875. switch (_context63.prev = _context63.next) {
  17876. case 0:
  17877. t = Ms(this);
  17878. return _context63.abrupt("return", (t.initPromise || (t.initPromise = Fs.call(this, e).then(function (e) {
  17879. return e;
  17880. }).catch(function (e) {
  17881. throw delete t.initPromise, e;
  17882. })), t.initPromise));
  17883. case 2:
  17884. case "end":
  17885. return _context63.stop();
  17886. }
  17887. }
  17888. }, _callee63, this);
  17889. }));
  17890. return _Ks.apply(this, arguments);
  17891. }
  17892. function js(e) {
  17893. return function () {
  17894. var _ref61 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17895. t = _ref61.openid,
  17896. _ref61$callLoginByWei = _ref61.callLoginByWeixin,
  17897. n = _ref61$callLoginByWei === void 0 ? !1 : _ref61$callLoginByWei;
  17898. return Ks.call(e, {
  17899. openid: t,
  17900. callLoginByWeixin: n
  17901. });
  17902. };
  17903. }
  17904. function $s(e) {
  17905. !function (e) {
  17906. ue = e;
  17907. }(e);
  17908. }
  17909. function Bs(e) {
  17910. var t = {
  17911. getSystemInfo: uni.getSystemInfo,
  17912. getPushClientId: uni.getPushClientId
  17913. };
  17914. return function (n) {
  17915. return new Promise(function (s, r) {
  17916. t[e](_objectSpread(_objectSpread({}, n), {}, {
  17917. success: function success(e) {
  17918. s(e);
  17919. },
  17920. fail: function fail(e) {
  17921. r(e);
  17922. }
  17923. }));
  17924. });
  17925. };
  17926. }
  17927. var Ws = /*#__PURE__*/function (_ref62) {
  17928. (0, _inherits2.default)(Ws, _ref62);
  17929. var _super11 = _createSuper(Ws);
  17930. function Ws() {
  17931. var _this23;
  17932. (0, _classCallCheck2.default)(this, Ws);
  17933. _this23 = _super11.call(this), _this23._uniPushMessageCallback = _this23._receivePushMessage.bind((0, _assertThisInitialized2.default)(_this23)), _this23._currentMessageId = -1, _this23._payloadQueue = [];
  17934. return _this23;
  17935. }
  17936. (0, _createClass2.default)(Ws, [{
  17937. key: "init",
  17938. value: function init() {
  17939. var _this24 = this;
  17940. return Promise.all([Bs("getSystemInfo")(), Bs("getPushClientId")()]).then(function () {
  17941. var _ref63 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [],
  17942. _ref64 = (0, _slicedToArray2.default)(_ref63, 2),
  17943. _ref64$ = _ref64[0];
  17944. _ref64$ = _ref64$ === void 0 ? {} : _ref64$;
  17945. var e = _ref64$.appId,
  17946. _ref64$2 = _ref64[1];
  17947. _ref64$2 = _ref64$2 === void 0 ? {} : _ref64$2;
  17948. var t = _ref64$2.cid;
  17949. if (!e) throw new Error("Invalid appId, please check the manifest.json file");
  17950. if (!t) throw new Error("Invalid push client id");
  17951. _this24._appId = e, _this24._pushClientId = t, _this24._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), _this24.emit("open"), _this24._initMessageListener();
  17952. }, function (e) {
  17953. throw _this24.emit("error", e), _this24.close(), e;
  17954. });
  17955. }
  17956. }, {
  17957. key: "open",
  17958. value: function () {
  17959. var _open = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee58() {
  17960. return _regenerator.default.wrap(function _callee58$(_context58) {
  17961. while (1) {
  17962. switch (_context58.prev = _context58.next) {
  17963. case 0:
  17964. return _context58.abrupt("return", this.init());
  17965. case 1:
  17966. case "end":
  17967. return _context58.stop();
  17968. }
  17969. }
  17970. }, _callee58, this);
  17971. }));
  17972. function open() {
  17973. return _open.apply(this, arguments);
  17974. }
  17975. return open;
  17976. }()
  17977. }, {
  17978. key: "_isUniCloudSSE",
  17979. value: function _isUniCloudSSE(e) {
  17980. if ("receive" !== e.type) return !1;
  17981. var t = e && e.data && e.data.payload;
  17982. return !(!t || "UNI_CLOUD_SSE" !== t.channel || t.seqId !== this._seqId);
  17983. }
  17984. }, {
  17985. key: "_receivePushMessage",
  17986. value: function _receivePushMessage(e) {
  17987. if (!this._isUniCloudSSE(e)) return;
  17988. var t = e && e.data && e.data.payload,
  17989. n = t.action,
  17990. s = t.messageId,
  17991. r = t.message;
  17992. this._payloadQueue.push({
  17993. action: n,
  17994. messageId: s,
  17995. message: r
  17996. }), this._consumMessage();
  17997. }
  17998. }, {
  17999. key: "_consumMessage",
  18000. value: function _consumMessage() {
  18001. var _this25 = this;
  18002. for (;;) {
  18003. var _e27 = this._payloadQueue.find(function (e) {
  18004. return e.messageId === _this25._currentMessageId + 1;
  18005. });
  18006. if (!_e27) break;
  18007. this._currentMessageId++, this._parseMessagePayload(_e27);
  18008. }
  18009. }
  18010. }, {
  18011. key: "_parseMessagePayload",
  18012. value: function _parseMessagePayload(e) {
  18013. var t = e.action,
  18014. n = e.messageId,
  18015. s = e.message;
  18016. "end" === t ? this._end({
  18017. messageId: n,
  18018. message: s
  18019. }) : "message" === t && this._appendMessage({
  18020. messageId: n,
  18021. message: s
  18022. });
  18023. }
  18024. }, {
  18025. key: "_appendMessage",
  18026. value: function _appendMessage() {
  18027. var _ref65 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18028. e = _ref65.messageId,
  18029. t = _ref65.message;
  18030. this.emit("message", t);
  18031. }
  18032. }, {
  18033. key: "_end",
  18034. value: function _end() {
  18035. var _ref66 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18036. e = _ref66.messageId,
  18037. t = _ref66.message;
  18038. this.emit("end", t), this.close();
  18039. }
  18040. }, {
  18041. key: "_initMessageListener",
  18042. value: function _initMessageListener() {
  18043. uni.onPushMessage(this._uniPushMessageCallback);
  18044. }
  18045. }, {
  18046. key: "_destroy",
  18047. value: function _destroy() {
  18048. uni.offPushMessage(this._uniPushMessageCallback);
  18049. }
  18050. }, {
  18051. key: "toJSON",
  18052. value: function toJSON() {
  18053. return {
  18054. appId: this._appId,
  18055. pushClientId: this._pushClientId,
  18056. seqId: this._seqId
  18057. };
  18058. }
  18059. }, {
  18060. key: "close",
  18061. value: function close() {
  18062. this._destroy(), this.emit("close");
  18063. }
  18064. }]);
  18065. return Ws;
  18066. }( /*#__PURE__*/function () {
  18067. function _class6() {
  18068. (0, _classCallCheck2.default)(this, _class6);
  18069. this._callback = {};
  18070. }
  18071. (0, _createClass2.default)(_class6, [{
  18072. key: "addListener",
  18073. value: function addListener(e, t) {
  18074. this._callback[e] || (this._callback[e] = []), this._callback[e].push(t);
  18075. }
  18076. }, {
  18077. key: "on",
  18078. value: function on(e, t) {
  18079. return this.addListener(e, t);
  18080. }
  18081. }, {
  18082. key: "removeListener",
  18083. value: function removeListener(e, t) {
  18084. if (!t) throw new Error('The "listener" argument must be of type function. Received undefined');
  18085. var n = this._callback[e];
  18086. if (!n) return;
  18087. var s = function (e, t) {
  18088. for (var _n17 = e.length - 1; _n17 >= 0; _n17--) {
  18089. if (e[_n17] === t) return _n17;
  18090. }
  18091. return -1;
  18092. }(n, t);
  18093. n.splice(s, 1);
  18094. }
  18095. }, {
  18096. key: "off",
  18097. value: function off(e, t) {
  18098. return this.removeListener(e, t);
  18099. }
  18100. }, {
  18101. key: "removeAllListener",
  18102. value: function removeAllListener(e) {
  18103. delete this._callback[e];
  18104. }
  18105. }, {
  18106. key: "emit",
  18107. value: function emit(e) {
  18108. var n = this._callback[e];
  18109. for (var _len4 = arguments.length, t = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  18110. t[_key4 - 1] = arguments[_key4];
  18111. }
  18112. if (n) for (var _e28 = 0; _e28 < n.length; _e28++) {
  18113. n[_e28].apply(n, t);
  18114. }
  18115. }
  18116. }]);
  18117. return _class6;
  18118. }());
  18119. function Hs(_x47) {
  18120. return _Hs.apply(this, arguments);
  18121. }
  18122. function _Hs() {
  18123. _Hs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee64(e) {
  18124. var _ae2, _e32, _t22, t, _t$debugInfo, n, s, _yield$kt2, r, i, o;
  18125. return _regenerator.default.wrap(function _callee64$(_context64) {
  18126. while (1) {
  18127. switch (_context64.prev = _context64.next) {
  18128. case 0:
  18129. if (S) {
  18130. _context64.next = 2;
  18131. break;
  18132. }
  18133. return _context64.abrupt("return", Promise.resolve());
  18134. case 2:
  18135. if ("app" === C) {
  18136. _ae2 = ae(), _e32 = _ae2.osName, _t22 = _ae2.osVersion;
  18137. "ios" === _e32 && function (e) {
  18138. if (!e || "string" != typeof e) return 0;
  18139. var t = e.match(/^(\d+)./);
  18140. return t && t[1] ? parseInt(t[1]) : 0;
  18141. }(_t22) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发期间需要,发行后不需要)");
  18142. }
  18143. t = e.__dev__;
  18144. if (t.debugInfo) {
  18145. _context64.next = 6;
  18146. break;
  18147. }
  18148. return _context64.abrupt("return");
  18149. case 6:
  18150. _t$debugInfo = t.debugInfo;
  18151. n = _t$debugInfo.address;
  18152. s = _t$debugInfo.servePort;
  18153. _context64.next = 11;
  18154. return kt(n, s);
  18155. case 11:
  18156. _yield$kt2 = _context64.sent;
  18157. r = _yield$kt2.address;
  18158. if (!r) {
  18159. _context64.next = 15;
  18160. break;
  18161. }
  18162. return _context64.abrupt("return", (t.localAddress = r, void (t.localPort = s)));
  18163. case 15:
  18164. i = console["app" === C ? "error" : "warn"];
  18165. o = "";
  18166. if (!("remote" === t.debugInfo.initialLaunchType ? (t.debugInfo.forceRemote = !0, o = "当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。") : o = "无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。", o += "\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs\n- 检查是否错误的使用拦截器修改uni.request方法的参数", "web" === C && (o += "\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"), 0 === C.indexOf("mp-") && (o += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t.debugInfo.forceRemote)) {
  18167. _context64.next = 19;
  18168. break;
  18169. }
  18170. throw new Error(o);
  18171. case 19:
  18172. i(o);
  18173. case 20:
  18174. case "end":
  18175. return _context64.stop();
  18176. }
  18177. }
  18178. }, _callee64);
  18179. }));
  18180. return _Hs.apply(this, arguments);
  18181. }
  18182. function Js(e) {
  18183. e._initPromiseHub || (e._initPromiseHub = new v({
  18184. createPromise: function createPromise() {
  18185. var t = Promise.resolve();
  18186. var n;
  18187. n = 1, t = new Promise(function (e) {
  18188. setTimeout(function () {
  18189. e();
  18190. }, n);
  18191. });
  18192. var s = e.auth();
  18193. return t.then(function () {
  18194. return s.getLoginState();
  18195. }).then(function (e) {
  18196. return e ? Promise.resolve() : s.signInAnonymously();
  18197. });
  18198. }
  18199. }));
  18200. }
  18201. var zs = {
  18202. tcb: St,
  18203. tencent: St,
  18204. aliyun: pe,
  18205. private: Pt,
  18206. dcloud: Pt,
  18207. alipay: qt
  18208. };
  18209. var Vs = new ( /*#__PURE__*/function () {
  18210. function _class7() {
  18211. (0, _classCallCheck2.default)(this, _class7);
  18212. }
  18213. (0, _createClass2.default)(_class7, [{
  18214. key: "init",
  18215. value: function init(e) {
  18216. var t = {};
  18217. var n = zs[e.provider];
  18218. if (!n) throw new Error("未提供正确的provider参数");
  18219. t = n.init(e), S && function (e) {
  18220. if (!S) return;
  18221. var t = {};
  18222. e.__dev__ = t, t.debugLog = S && ("web" === C && navigator.userAgent.indexOf("HBuilderX") > 0 || "app" === C);
  18223. var n = P;
  18224. n && !n.code && (t.debugInfo = n);
  18225. var s = new v({
  18226. createPromise: function createPromise() {
  18227. return Hs(e);
  18228. }
  18229. });
  18230. t.initLocalNetwork = function () {
  18231. return s.exec();
  18232. };
  18233. }(t), Js(t), Hn(t), function (e) {
  18234. var t = e.uploadFile;
  18235. e.uploadFile = function (e) {
  18236. return t.call(this, e);
  18237. };
  18238. }(t), function (e) {
  18239. e.database = function (t) {
  18240. if (t && Object.keys(t).length > 0) return e.init(t).database();
  18241. if (this._database) return this._database;
  18242. var n = ns(ss, {
  18243. uniClient: e
  18244. });
  18245. return this._database = n, n;
  18246. }, e.databaseForJQL = function (t) {
  18247. if (t && Object.keys(t).length > 0) return e.init(t).databaseForJQL();
  18248. if (this._databaseForJQL) return this._databaseForJQL;
  18249. var n = ns(ss, {
  18250. uniClient: e,
  18251. isJQL: !0
  18252. });
  18253. return this._databaseForJQL = n, n;
  18254. };
  18255. }(t), function (e) {
  18256. e.getCurrentUserInfo = Ls, e.chooseAndUploadFile = Us.initChooseAndUploadFile(e), Object.assign(e, {
  18257. get mixinDatacom() {
  18258. return Ds(e);
  18259. }
  18260. }), e.SSEChannel = Ws, e.initSecureNetworkByWeixin = js(e), e.setCustomClientInfo = $s, e.importObject = qs(e);
  18261. }(t);
  18262. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach(function (e) {
  18263. if (!t[e]) return;
  18264. var n = t[e];
  18265. t[e] = function () {
  18266. return n.apply(t, Array.from(arguments));
  18267. }, t[e] = function (e, t) {
  18268. return function (n) {
  18269. var _this26 = this;
  18270. var s = !1;
  18271. if ("callFunction" === t) {
  18272. var _e29 = n && n.type || c;
  18273. s = _e29 !== c;
  18274. }
  18275. var r = "callFunction" === t && !s,
  18276. i = this._initPromiseHub.exec();
  18277. n = n || {};
  18278. var _ee2 = ee(n),
  18279. o = _ee2.success,
  18280. a = _ee2.fail,
  18281. u = _ee2.complete,
  18282. l = i.then(function () {
  18283. return s ? Promise.resolve() : q(M(t, "invoke"), n);
  18284. }).then(function () {
  18285. return e.call(_this26, n);
  18286. }).then(function (e) {
  18287. return s ? Promise.resolve(e) : q(M(t, "success"), e).then(function () {
  18288. return q(M(t, "complete"), e);
  18289. }).then(function () {
  18290. return r && Y(j, {
  18291. type: H,
  18292. content: e
  18293. }), Promise.resolve(e);
  18294. });
  18295. }, function (e) {
  18296. return s ? Promise.reject(e) : q(M(t, "fail"), e).then(function () {
  18297. return q(M(t, "complete"), e);
  18298. }).then(function () {
  18299. return Y(j, {
  18300. type: H,
  18301. content: e
  18302. }), Promise.reject(e);
  18303. });
  18304. });
  18305. if (!(o || a || u)) return l;
  18306. l.then(function (e) {
  18307. o && o(e), u && u(e), r && Y(j, {
  18308. type: H,
  18309. content: e
  18310. });
  18311. }, function (e) {
  18312. a && a(e), u && u(e), r && Y(j, {
  18313. type: H,
  18314. content: e
  18315. });
  18316. });
  18317. };
  18318. }(t[e], e).bind(t);
  18319. }), t.init = this.init, t;
  18320. }
  18321. }]);
  18322. return _class7;
  18323. }())();
  18324. (function () {
  18325. var e = T;
  18326. var t = {};
  18327. if (e && 1 === e.length) t = e[0], Vs = Vs.init(t), Vs._isDefault = !0;else {
  18328. var _t21 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  18329. var _n18;
  18330. _n18 = e && e.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : x ? "应用未关联服务空间,请在uniCloud目录右键关联服务空间" : "uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间", _t21.forEach(function (e) {
  18331. Vs[e] = function () {
  18332. return console.error(_n18), Promise.reject(new te({
  18333. code: "SYS_ERR",
  18334. message: _n18
  18335. }));
  18336. };
  18337. });
  18338. }
  18339. Object.assign(Vs, {
  18340. get mixinDatacom() {
  18341. return Ds(Vs);
  18342. }
  18343. }), Ts(Vs), Vs.addInterceptor = N, Vs.removeInterceptor = D, Vs.interceptObject = F, S && "web" === C && (window.uniCloud = Vs);
  18344. })();
  18345. var Gs = Vs;
  18346. exports.default = Gs;
  18347. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3), __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"]))
  18348. /***/ }),
  18349. /* 29 */
  18350. /*!************************************************************************************************!*\
  18351. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  18352. \************************************************************************************************/
  18353. /*! no static exports found */
  18354. /***/ (function(module, exports, __webpack_require__) {
  18355. // TODO(Babel 8): Remove this file.
  18356. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 30)();
  18357. module.exports = runtime;
  18358. /***/ }),
  18359. /* 30 */
  18360. /*!*******************************************************************!*\
  18361. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  18362. \*******************************************************************/
  18363. /*! no static exports found */
  18364. /***/ (function(module, exports, __webpack_require__) {
  18365. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  18366. function _regeneratorRuntime() {
  18367. "use strict";
  18368. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  18369. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  18370. return e;
  18371. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18372. var t,
  18373. e = {},
  18374. r = Object.prototype,
  18375. n = r.hasOwnProperty,
  18376. o = Object.defineProperty || function (t, e, r) {
  18377. t[e] = r.value;
  18378. },
  18379. i = "function" == typeof Symbol ? Symbol : {},
  18380. a = i.iterator || "@@iterator",
  18381. c = i.asyncIterator || "@@asyncIterator",
  18382. u = i.toStringTag || "@@toStringTag";
  18383. function define(t, e, r) {
  18384. return Object.defineProperty(t, e, {
  18385. value: r,
  18386. enumerable: !0,
  18387. configurable: !0,
  18388. writable: !0
  18389. }), t[e];
  18390. }
  18391. try {
  18392. define({}, "");
  18393. } catch (t) {
  18394. define = function define(t, e, r) {
  18395. return t[e] = r;
  18396. };
  18397. }
  18398. function wrap(t, e, r, n) {
  18399. var i = e && e.prototype instanceof Generator ? e : Generator,
  18400. a = Object.create(i.prototype),
  18401. c = new Context(n || []);
  18402. return o(a, "_invoke", {
  18403. value: makeInvokeMethod(t, r, c)
  18404. }), a;
  18405. }
  18406. function tryCatch(t, e, r) {
  18407. try {
  18408. return {
  18409. type: "normal",
  18410. arg: t.call(e, r)
  18411. };
  18412. } catch (t) {
  18413. return {
  18414. type: "throw",
  18415. arg: t
  18416. };
  18417. }
  18418. }
  18419. e.wrap = wrap;
  18420. var h = "suspendedStart",
  18421. l = "suspendedYield",
  18422. f = "executing",
  18423. s = "completed",
  18424. y = {};
  18425. function Generator() {}
  18426. function GeneratorFunction() {}
  18427. function GeneratorFunctionPrototype() {}
  18428. var p = {};
  18429. define(p, a, function () {
  18430. return this;
  18431. });
  18432. var d = Object.getPrototypeOf,
  18433. v = d && d(d(values([])));
  18434. v && v !== r && n.call(v, a) && (p = v);
  18435. var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
  18436. function defineIteratorMethods(t) {
  18437. ["next", "throw", "return"].forEach(function (e) {
  18438. define(t, e, function (t) {
  18439. return this._invoke(e, t);
  18440. });
  18441. });
  18442. }
  18443. function AsyncIterator(t, e) {
  18444. function invoke(r, o, i, a) {
  18445. var c = tryCatch(t[r], t, o);
  18446. if ("throw" !== c.type) {
  18447. var u = c.arg,
  18448. h = u.value;
  18449. return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
  18450. invoke("next", t, i, a);
  18451. }, function (t) {
  18452. invoke("throw", t, i, a);
  18453. }) : e.resolve(h).then(function (t) {
  18454. u.value = t, i(u);
  18455. }, function (t) {
  18456. return invoke("throw", t, i, a);
  18457. });
  18458. }
  18459. a(c.arg);
  18460. }
  18461. var r;
  18462. o(this, "_invoke", {
  18463. value: function value(t, n) {
  18464. function callInvokeWithMethodAndArg() {
  18465. return new e(function (e, r) {
  18466. invoke(t, n, e, r);
  18467. });
  18468. }
  18469. return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  18470. }
  18471. });
  18472. }
  18473. function makeInvokeMethod(e, r, n) {
  18474. var o = h;
  18475. return function (i, a) {
  18476. if (o === f) throw Error("Generator is already running");
  18477. if (o === s) {
  18478. if ("throw" === i) throw a;
  18479. return {
  18480. value: t,
  18481. done: !0
  18482. };
  18483. }
  18484. for (n.method = i, n.arg = a;;) {
  18485. var c = n.delegate;
  18486. if (c) {
  18487. var u = maybeInvokeDelegate(c, n);
  18488. if (u) {
  18489. if (u === y) continue;
  18490. return u;
  18491. }
  18492. }
  18493. if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
  18494. if (o === h) throw o = s, n.arg;
  18495. n.dispatchException(n.arg);
  18496. } else "return" === n.method && n.abrupt("return", n.arg);
  18497. o = f;
  18498. var p = tryCatch(e, r, n);
  18499. if ("normal" === p.type) {
  18500. if (o = n.done ? s : l, p.arg === y) continue;
  18501. return {
  18502. value: p.arg,
  18503. done: n.done
  18504. };
  18505. }
  18506. "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
  18507. }
  18508. };
  18509. }
  18510. function maybeInvokeDelegate(e, r) {
  18511. var n = r.method,
  18512. o = e.iterator[n];
  18513. if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
  18514. var i = tryCatch(o, e.iterator, r.arg);
  18515. if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
  18516. var a = i.arg;
  18517. return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
  18518. }
  18519. function pushTryEntry(t) {
  18520. var e = {
  18521. tryLoc: t[0]
  18522. };
  18523. 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
  18524. }
  18525. function resetTryEntry(t) {
  18526. var e = t.completion || {};
  18527. e.type = "normal", delete e.arg, t.completion = e;
  18528. }
  18529. function Context(t) {
  18530. this.tryEntries = [{
  18531. tryLoc: "root"
  18532. }], t.forEach(pushTryEntry, this), this.reset(!0);
  18533. }
  18534. function values(e) {
  18535. if (e || "" === e) {
  18536. var r = e[a];
  18537. if (r) return r.call(e);
  18538. if ("function" == typeof e.next) return e;
  18539. if (!isNaN(e.length)) {
  18540. var o = -1,
  18541. i = function next() {
  18542. for (; ++o < e.length;) {
  18543. if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
  18544. }
  18545. return next.value = t, next.done = !0, next;
  18546. };
  18547. return i.next = i;
  18548. }
  18549. }
  18550. throw new TypeError(_typeof(e) + " is not iterable");
  18551. }
  18552. return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
  18553. value: GeneratorFunctionPrototype,
  18554. configurable: !0
  18555. }), o(GeneratorFunctionPrototype, "constructor", {
  18556. value: GeneratorFunction,
  18557. configurable: !0
  18558. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
  18559. var e = "function" == typeof t && t.constructor;
  18560. return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
  18561. }, e.mark = function (t) {
  18562. return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
  18563. }, e.awrap = function (t) {
  18564. return {
  18565. __await: t
  18566. };
  18567. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
  18568. return this;
  18569. }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
  18570. void 0 === i && (i = Promise);
  18571. var a = new AsyncIterator(wrap(t, r, n, o), i);
  18572. return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
  18573. return t.done ? t.value : a.next();
  18574. });
  18575. }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
  18576. return this;
  18577. }), define(g, "toString", function () {
  18578. return "[object Generator]";
  18579. }), e.keys = function (t) {
  18580. var e = Object(t),
  18581. r = [];
  18582. for (var n in e) {
  18583. r.push(n);
  18584. }
  18585. return r.reverse(), function next() {
  18586. for (; r.length;) {
  18587. var t = r.pop();
  18588. if (t in e) return next.value = t, next.done = !1, next;
  18589. }
  18590. return next.done = !0, next;
  18591. };
  18592. }, e.values = values, Context.prototype = {
  18593. constructor: Context,
  18594. reset: function reset(e) {
  18595. if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) {
  18596. "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
  18597. }
  18598. },
  18599. stop: function stop() {
  18600. this.done = !0;
  18601. var t = this.tryEntries[0].completion;
  18602. if ("throw" === t.type) throw t.arg;
  18603. return this.rval;
  18604. },
  18605. dispatchException: function dispatchException(e) {
  18606. if (this.done) throw e;
  18607. var r = this;
  18608. function handle(n, o) {
  18609. return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
  18610. }
  18611. for (var o = this.tryEntries.length - 1; o >= 0; --o) {
  18612. var i = this.tryEntries[o],
  18613. a = i.completion;
  18614. if ("root" === i.tryLoc) return handle("end");
  18615. if (i.tryLoc <= this.prev) {
  18616. var c = n.call(i, "catchLoc"),
  18617. u = n.call(i, "finallyLoc");
  18618. if (c && u) {
  18619. if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
  18620. if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
  18621. } else if (c) {
  18622. if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
  18623. } else {
  18624. if (!u) throw Error("try statement without catch or finally");
  18625. if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
  18626. }
  18627. }
  18628. }
  18629. },
  18630. abrupt: function abrupt(t, e) {
  18631. for (var r = this.tryEntries.length - 1; r >= 0; --r) {
  18632. var o = this.tryEntries[r];
  18633. if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
  18634. var i = o;
  18635. break;
  18636. }
  18637. }
  18638. i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
  18639. var a = i ? i.completion : {};
  18640. return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
  18641. },
  18642. complete: function complete(t, e) {
  18643. if ("throw" === t.type) throw t.arg;
  18644. return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
  18645. },
  18646. finish: function finish(t) {
  18647. for (var e = this.tryEntries.length - 1; e >= 0; --e) {
  18648. var r = this.tryEntries[e];
  18649. if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
  18650. }
  18651. },
  18652. "catch": function _catch(t) {
  18653. for (var e = this.tryEntries.length - 1; e >= 0; --e) {
  18654. var r = this.tryEntries[e];
  18655. if (r.tryLoc === t) {
  18656. var n = r.completion;
  18657. if ("throw" === n.type) {
  18658. var o = n.arg;
  18659. resetTryEntry(r);
  18660. }
  18661. return o;
  18662. }
  18663. }
  18664. throw Error("illegal catch attempt");
  18665. },
  18666. delegateYield: function delegateYield(e, r, n) {
  18667. return this.delegate = {
  18668. iterator: values(e),
  18669. resultName: r,
  18670. nextLoc: n
  18671. }, "next" === this.method && (this.arg = t), y;
  18672. }
  18673. }, e;
  18674. }
  18675. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18676. /***/ }),
  18677. /* 31 */
  18678. /*!**********************************************************************!*\
  18679. !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
  18680. \**********************************************************************/
  18681. /*! no static exports found */
  18682. /***/ (function(module, exports) {
  18683. function _assertThisInitialized(self) {
  18684. if (self === void 0) {
  18685. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  18686. }
  18687. return self;
  18688. }
  18689. module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18690. /***/ }),
  18691. /* 32 */
  18692. /*!*****************************************************************!*\
  18693. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  18694. \*****************************************************************/
  18695. /*! no static exports found */
  18696. /***/ (function(module, exports) {
  18697. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  18698. try {
  18699. var info = gen[key](arg);
  18700. var value = info.value;
  18701. } catch (error) {
  18702. reject(error);
  18703. return;
  18704. }
  18705. if (info.done) {
  18706. resolve(value);
  18707. } else {
  18708. Promise.resolve(value).then(_next, _throw);
  18709. }
  18710. }
  18711. function _asyncToGenerator(fn) {
  18712. return function () {
  18713. var self = this,
  18714. args = arguments;
  18715. return new Promise(function (resolve, reject) {
  18716. var gen = fn.apply(self, args);
  18717. function _next(value) {
  18718. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  18719. }
  18720. function _throw(err) {
  18721. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  18722. }
  18723. _next(undefined);
  18724. });
  18725. };
  18726. }
  18727. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18728. /***/ }),
  18729. /* 33 */
  18730. /*!*********************************************************!*\
  18731. !*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
  18732. \*********************************************************/
  18733. /*! no static exports found */
  18734. /***/ (function(module, exports, __webpack_require__) {
  18735. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  18736. function _inherits(subClass, superClass) {
  18737. if (typeof superClass !== "function" && superClass !== null) {
  18738. throw new TypeError("Super expression must either be null or a function");
  18739. }
  18740. subClass.prototype = Object.create(superClass && superClass.prototype, {
  18741. constructor: {
  18742. value: subClass,
  18743. writable: true,
  18744. configurable: true
  18745. }
  18746. });
  18747. Object.defineProperty(subClass, "prototype", {
  18748. writable: false
  18749. });
  18750. if (superClass) setPrototypeOf(subClass, superClass);
  18751. }
  18752. module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18753. /***/ }),
  18754. /* 34 */
  18755. /*!**************************************************************************!*\
  18756. !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
  18757. \**************************************************************************/
  18758. /*! no static exports found */
  18759. /***/ (function(module, exports, __webpack_require__) {
  18760. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  18761. var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ 31);
  18762. function _possibleConstructorReturn(self, call) {
  18763. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  18764. return call;
  18765. } else if (call !== void 0) {
  18766. throw new TypeError("Derived constructors may only return object or undefined");
  18767. }
  18768. return assertThisInitialized(self);
  18769. }
  18770. module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18771. /***/ }),
  18772. /* 35 */
  18773. /*!***************************************************************!*\
  18774. !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
  18775. \***************************************************************/
  18776. /*! no static exports found */
  18777. /***/ (function(module, exports) {
  18778. function _getPrototypeOf(o) {
  18779. module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  18780. return o.__proto__ || Object.getPrototypeOf(o);
  18781. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18782. return _getPrototypeOf(o);
  18783. }
  18784. module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18785. /***/ }),
  18786. /* 36 */
  18787. /*!****************************************************************!*\
  18788. !*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
  18789. \****************************************************************/
  18790. /*! no static exports found */
  18791. /***/ (function(module, exports, __webpack_require__) {
  18792. var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ 35);
  18793. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  18794. var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ 37);
  18795. var construct = __webpack_require__(/*! ./construct.js */ 15);
  18796. function _wrapNativeSuper(Class) {
  18797. var _cache = typeof Map === "function" ? new Map() : undefined;
  18798. module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
  18799. if (Class === null || !isNativeFunction(Class)) return Class;
  18800. if (typeof Class !== "function") {
  18801. throw new TypeError("Super expression must either be null or a function");
  18802. }
  18803. if (typeof _cache !== "undefined") {
  18804. if (_cache.has(Class)) return _cache.get(Class);
  18805. _cache.set(Class, Wrapper);
  18806. }
  18807. function Wrapper() {
  18808. return construct(Class, arguments, getPrototypeOf(this).constructor);
  18809. }
  18810. Wrapper.prototype = Object.create(Class.prototype, {
  18811. constructor: {
  18812. value: Wrapper,
  18813. enumerable: false,
  18814. writable: true,
  18815. configurable: true
  18816. }
  18817. });
  18818. return setPrototypeOf(Wrapper, Class);
  18819. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18820. return _wrapNativeSuper(Class);
  18821. }
  18822. module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18823. /***/ }),
  18824. /* 37 */
  18825. /*!*****************************************************************!*\
  18826. !*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
  18827. \*****************************************************************/
  18828. /*! no static exports found */
  18829. /***/ (function(module, exports) {
  18830. function _isNativeFunction(fn) {
  18831. try {
  18832. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  18833. } catch (e) {
  18834. return typeof fn === "function";
  18835. }
  18836. }
  18837. module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18838. /***/ }),
  18839. /* 38 */
  18840. /*!*****************************************************************************************!*\
  18841. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages.json?{"type":"origin-pages-json"} ***!
  18842. \*****************************************************************************************/
  18843. /*! no static exports found */
  18844. /***/ (function(module, exports, __webpack_require__) {
  18845. "use strict";
  18846. Object.defineProperty(exports, "__esModule", {
  18847. value: true
  18848. });
  18849. exports.default = void 0;
  18850. var _default = {
  18851. "pages": [{
  18852. "path": "pages/chooseIdentity/index",
  18853. "style": {
  18854. "navigationStyle": "custom",
  18855. "navigationBarTitleText": "选择身份",
  18856. "app-plus": {
  18857. "titleNView": {
  18858. "buttons": [{
  18859. "text": "",
  18860. "fontSrc": "/static/uni.ttf",
  18861. "fontSize": "22px",
  18862. "color": "#FFFFFF"
  18863. }]
  18864. }
  18865. },
  18866. "usingComponents": {
  18867. "van-button": "/wxcomponents/weapp/dist/button/index",
  18868. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  18869. "van-field": "/wxcomponents/weapp/dist/field/index",
  18870. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  18871. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  18872. "van-dialog": "/wxcomponents/weapp/dist/dialog/index"
  18873. }
  18874. }
  18875. }, {
  18876. "path": "pages/login/login",
  18877. "style": {
  18878. "navigationBarTitleText": "登录",
  18879. "app-plus": {
  18880. "titleNView": {
  18881. "buttons": [{
  18882. "text": "",
  18883. "fontSrc": "/static/uni.ttf",
  18884. "fontSize": "22px",
  18885. "color": "#FFFFFF"
  18886. }]
  18887. }
  18888. },
  18889. "usingComponents": {
  18890. "van-button": "/wxcomponents/weapp/dist/button/index",
  18891. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  18892. "van-field": "/wxcomponents/weapp/dist/field/index",
  18893. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  18894. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  18895. "van-dialog": "/wxcomponents/weapp/dist/dialog/index"
  18896. }
  18897. }
  18898. }, {
  18899. "path": "pages/index/index",
  18900. "style": {
  18901. "navigationBarTitleText": "首页"
  18902. }
  18903. }, {
  18904. "path": "pages/mine/mine",
  18905. "style": {
  18906. "navigationStyle": "custom",
  18907. "navigationBarTitleText": "我的",
  18908. "app-plus": {
  18909. "bounce": "vertical",
  18910. "titleNView": {
  18911. "buttons": [{
  18912. "text": "",
  18913. "fontSrc": "/static/uni.ttf",
  18914. "fontSize": "22px",
  18915. "color": "#FFFFFF"
  18916. }]
  18917. }
  18918. },
  18919. "usingComponents": {
  18920. "van-button": "/wxcomponents/weapp/dist/button/index",
  18921. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  18922. "van-field": "/wxcomponents/weapp/dist/field/index",
  18923. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  18924. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  18925. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  18926. "van-icon": "/wxcomponents/weapp/dist/icon/index"
  18927. }
  18928. }
  18929. }],
  18930. "subPackages": [{
  18931. "root": "pages/subPackages",
  18932. "pages": [{
  18933. "path": "carmange/add",
  18934. "style": {
  18935. "navigationBarTitleText": "添加车辆",
  18936. "enablePullDownRefresh": true,
  18937. "onReachBottomDistance": 100,
  18938. "app-plus": {
  18939. "bounce": "vertical",
  18940. "titleNView": {
  18941. "buttons": [{
  18942. "text": "",
  18943. "fontSrc": "/static/uni.ttf",
  18944. "fontSize": "22px",
  18945. "color": "#FFFFFF"
  18946. }]
  18947. }
  18948. },
  18949. "component": true,
  18950. "usingComponents": {
  18951. "van-button": "/wxcomponents/weapp/dist/button/index",
  18952. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  18953. "van-field": "/wxcomponents/weapp/dist/field/index",
  18954. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  18955. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  18956. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  18957. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  18958. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  18959. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  18960. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  18961. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  18962. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  18963. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  18964. }
  18965. }
  18966. }, {
  18967. "path": "carmange/index",
  18968. "style": {
  18969. "navigationBarTitleText": "车辆管理",
  18970. "enablePullDownRefresh": true,
  18971. "onReachBottomDistance": 100,
  18972. "app-plus": {
  18973. "bounce": "vertical",
  18974. "titleNView": {
  18975. "buttons": [{
  18976. "text": "",
  18977. "fontSrc": "/static/uni.ttf",
  18978. "fontSize": "22px",
  18979. "color": "#FFFFFF"
  18980. }]
  18981. }
  18982. },
  18983. "component": true,
  18984. "usingComponents": {
  18985. "van-button": "/wxcomponents/weapp/dist/button/index",
  18986. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  18987. "van-field": "/wxcomponents/weapp/dist/field/index",
  18988. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  18989. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  18990. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  18991. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  18992. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  18993. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  18994. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  18995. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  18996. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  18997. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  18998. }
  18999. }
  19000. }, {
  19001. "path": "yy_history/code",
  19002. "style": {
  19003. "navigationBarTitleText": "预约码",
  19004. "enablePullDownRefresh": true,
  19005. "onReachBottomDistance": 100,
  19006. "app-plus": {
  19007. "bounce": "vertical",
  19008. "titleNView": {
  19009. "buttons": [{
  19010. "text": "",
  19011. "fontSrc": "/static/uni.ttf",
  19012. "fontSize": "22px",
  19013. "color": "#FFFFFF"
  19014. }]
  19015. }
  19016. },
  19017. "component": true,
  19018. "usingComponents": {
  19019. "van-button": "/wxcomponents/weapp/dist/button/index",
  19020. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19021. "van-field": "/wxcomponents/weapp/dist/field/index",
  19022. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19023. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19024. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19025. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19026. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19027. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  19028. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  19029. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  19030. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  19031. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  19032. }
  19033. }
  19034. }, {
  19035. "path": "yy_history/edit",
  19036. "style": {
  19037. "navigationBarTitleText": "修改预约",
  19038. "enablePullDownRefresh": true,
  19039. "onReachBottomDistance": 100,
  19040. "app-plus": {
  19041. "bounce": "vertical",
  19042. "titleNView": {
  19043. "buttons": [{
  19044. "text": "",
  19045. "fontSrc": "/static/uni.ttf",
  19046. "fontSize": "22px",
  19047. "color": "#FFFFFF"
  19048. }]
  19049. }
  19050. },
  19051. "component": true,
  19052. "usingComponents": {
  19053. "van-button": "/wxcomponents/weapp/dist/button/index",
  19054. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19055. "van-field": "/wxcomponents/weapp/dist/field/index",
  19056. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19057. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19058. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19059. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19060. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19061. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  19062. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  19063. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  19064. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  19065. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  19066. }
  19067. }
  19068. }, {
  19069. "path": "sj_history/edit",
  19070. "style": {
  19071. "navigationBarTitleText": "修改预约",
  19072. "enablePullDownRefresh": true,
  19073. "onReachBottomDistance": 100,
  19074. "app-plus": {
  19075. "bounce": "vertical",
  19076. "titleNView": {
  19077. "buttons": [{
  19078. "text": "",
  19079. "fontSrc": "/static/uni.ttf",
  19080. "fontSize": "22px",
  19081. "color": "#FFFFFF"
  19082. }]
  19083. }
  19084. },
  19085. "component": true,
  19086. "usingComponents": {
  19087. "van-button": "/wxcomponents/weapp/dist/button/index",
  19088. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19089. "van-field": "/wxcomponents/weapp/dist/field/index",
  19090. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19091. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19092. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19093. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19094. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19095. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  19096. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  19097. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  19098. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  19099. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  19100. }
  19101. }
  19102. }, {
  19103. "path": "yy_history/index",
  19104. "style": {
  19105. "navigationBarTitleText": "预约历史",
  19106. "enablePullDownRefresh": true,
  19107. "onReachBottomDistance": 100,
  19108. "app-plus": {
  19109. "bounce": "vertical",
  19110. "titleNView": {
  19111. "buttons": [{
  19112. "text": "",
  19113. "fontSrc": "/static/uni.ttf",
  19114. "fontSize": "22px",
  19115. "color": "#FFFFFF"
  19116. }]
  19117. }
  19118. },
  19119. "component": true,
  19120. "usingComponents": {
  19121. "van-button": "/wxcomponents/weapp/dist/button/index",
  19122. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19123. "van-field": "/wxcomponents/weapp/dist/field/index",
  19124. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19125. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19126. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19127. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19128. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19129. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  19130. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  19131. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  19132. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  19133. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  19134. }
  19135. }
  19136. }, {
  19137. "path": "sj_history/index",
  19138. "style": {
  19139. "navigationBarTitleText": "预约历史",
  19140. "enablePullDownRefresh": true,
  19141. "onReachBottomDistance": 100,
  19142. "app-plus": {
  19143. "bounce": "vertical",
  19144. "titleNView": {
  19145. "buttons": [{
  19146. "text": "",
  19147. "fontSrc": "/static/uni.ttf",
  19148. "fontSize": "22px",
  19149. "color": "#FFFFFF"
  19150. }]
  19151. }
  19152. },
  19153. "component": true,
  19154. "usingComponents": {
  19155. "van-button": "/wxcomponents/weapp/dist/button/index",
  19156. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19157. "van-field": "/wxcomponents/weapp/dist/field/index",
  19158. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19159. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19160. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19161. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19162. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19163. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  19164. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  19165. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  19166. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  19167. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  19168. }
  19169. }
  19170. }, {
  19171. "path": "sj_yy/index",
  19172. "style": {
  19173. "navigationBarTitleText": "司机预约",
  19174. "enablePullDownRefresh": true,
  19175. "onReachBottomDistance": 100,
  19176. "app-plus": {
  19177. "bounce": "vertical",
  19178. "titleNView": {
  19179. "buttons": [{
  19180. "text": "",
  19181. "fontSrc": "/static/uni.ttf",
  19182. "fontSize": "22px",
  19183. "color": "#FFFFFF"
  19184. }]
  19185. }
  19186. },
  19187. "component": true,
  19188. "usingComponents": {
  19189. "van-button": "/wxcomponents/weapp/dist/button/index",
  19190. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19191. "van-field": "/wxcomponents/weapp/dist/field/index",
  19192. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19193. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19194. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19195. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19196. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19197. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  19198. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  19199. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  19200. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  19201. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  19202. }
  19203. }
  19204. }, {
  19205. "path": "qy_yy/index",
  19206. "style": {
  19207. "navigationBarTitleText": "企业预约",
  19208. "enablePullDownRefresh": true,
  19209. "onReachBottomDistance": 100,
  19210. "app-plus": {
  19211. "bounce": "vertical",
  19212. "titleNView": {
  19213. "buttons": [{
  19214. "text": "",
  19215. "fontSrc": "/static/uni.ttf",
  19216. "fontSize": "22px",
  19217. "color": "#FFFFFF"
  19218. }]
  19219. }
  19220. },
  19221. "component": true,
  19222. "usingComponents": {
  19223. "van-button": "/wxcomponents/weapp/dist/button/index",
  19224. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19225. "van-field": "/wxcomponents/weapp/dist/field/index",
  19226. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19227. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19228. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19229. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19230. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19231. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  19232. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  19233. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  19234. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  19235. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  19236. }
  19237. }
  19238. }, {
  19239. "path": "choosecar/index",
  19240. "style": {
  19241. "navigationBarTitleText": "车型选择",
  19242. "enablePullDownRefresh": true,
  19243. "onReachBottomDistance": 100,
  19244. "app-plus": {
  19245. "bounce": "vertical",
  19246. "titleNView": {
  19247. "buttons": [{
  19248. "text": "",
  19249. "fontSrc": "/static/uni.ttf",
  19250. "fontSize": "22px",
  19251. "color": "#FFFFFF"
  19252. }]
  19253. }
  19254. },
  19255. "component": true,
  19256. "usingComponents": {
  19257. "van-button": "/wxcomponents/weapp/dist/button/index",
  19258. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19259. "van-field": "/wxcomponents/weapp/dist/field/index",
  19260. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19261. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19262. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19263. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19264. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19265. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  19266. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  19267. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  19268. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  19269. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  19270. }
  19271. }
  19272. }, {
  19273. "path": "phoneRegister/index",
  19274. "style": {
  19275. "navigationBarTitleText": "授权手机号快捷登录",
  19276. "enablePullDownRefresh": true,
  19277. "onReachBottomDistance": 100,
  19278. "app-plus": {
  19279. "bounce": "vertical",
  19280. "titleNView": {
  19281. "buttons": [{
  19282. "text": "",
  19283. "fontSrc": "/static/uni.ttf",
  19284. "fontSize": "22px",
  19285. "color": "#FFFFFF"
  19286. }]
  19287. }
  19288. },
  19289. "component": true,
  19290. "usingComponents": {
  19291. "van-button": "/wxcomponents/weapp/dist/button/index",
  19292. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19293. "van-field": "/wxcomponents/weapp/dist/field/index",
  19294. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19295. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19296. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19297. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19298. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19299. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  19300. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  19301. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  19302. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  19303. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  19304. }
  19305. }
  19306. }, {
  19307. "path": "password/index",
  19308. "style": {
  19309. "navigationBarTitleText": "修改密码",
  19310. "enablePullDownRefresh": true,
  19311. "onReachBottomDistance": 100,
  19312. "app-plus": {
  19313. "bounce": "vertical",
  19314. "titleNView": {
  19315. "buttons": [{
  19316. "text": "",
  19317. "fontSrc": "/static/uni.ttf",
  19318. "fontSize": "22px",
  19319. "color": "#FFFFFF"
  19320. }]
  19321. }
  19322. },
  19323. "component": true,
  19324. "usingComponents": {
  19325. "van-radio": "/wxcomponents/weapp/dist/radio/index",
  19326. "van-radio-group": "/wxcomponents/weapp/dist/radio-group/index",
  19327. "van-empty": "/wxcomponents/weapp/dist/empty/index",
  19328. "van-button": "/wxcomponents/weapp/dist/button/index",
  19329. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19330. "van-field": "/wxcomponents/weapp/dist/field/index",
  19331. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19332. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19333. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19334. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19335. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19336. "van-tabs": "/wxcomponents/weapp/dist/tabs/index"
  19337. }
  19338. }
  19339. }],
  19340. "network": "all"
  19341. }],
  19342. "globalStyle": {
  19343. "pageOrientation": "portrait",
  19344. "navigationBarTitleText": "Hello uniapp",
  19345. "navigationBarTextStyle": "black",
  19346. "navigationBarBackgroundColor": "#FFFFFF",
  19347. "backgroundColor": "#FFFFFF",
  19348. "backgroundColorTop": "#FFFFFF",
  19349. "backgroundColorBottom": "#F4F5F6",
  19350. "usingComponents": {
  19351. "van-empty": "/wxcomponents/weapp/dist/empty/index",
  19352. "van-button": "/wxcomponents/weapp/dist/button/index",
  19353. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19354. "van-field": "/wxcomponents/weapp/dist/field/index",
  19355. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19356. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19357. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19358. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19359. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19360. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  19361. "van-row": "/wxcomponents/weapp/dist/row/index",
  19362. "van-col": "/wxcomponents/weapp/dist/col/index"
  19363. }
  19364. },
  19365. "tabBar": {
  19366. "color": "#7A7E83",
  19367. "selectedColor": "#2527AA",
  19368. "borderStyle": "black",
  19369. "backgroundColor": "#F8F8F8",
  19370. "list": [{
  19371. "pagePath": "pages/index/index",
  19372. "iconPath": "static/home.png",
  19373. "selectedIconPath": "static/homeselect.png",
  19374. "text": "首页"
  19375. }, {
  19376. "pagePath": "pages/mine/mine",
  19377. "iconPath": "static/mine.png",
  19378. "selectedIconPath": "static/mineselect.png",
  19379. "text": "我的"
  19380. }]
  19381. },
  19382. "window": {
  19383. "backgroundTextStyle": "dark",
  19384. "navigationBarBackgroundColor": "#ffffff",
  19385. "navigationBarTitleText": "Demo",
  19386. "navigationBarTextStyle": "black",
  19387. "enablePullDownRefresh": true
  19388. },
  19389. "condition": {
  19390. "current": 0,
  19391. "list": [{
  19392. "name": "",
  19393. "path": "",
  19394. "query": ""
  19395. }]
  19396. },
  19397. "lazyCodeLoading": "requiredComponents"
  19398. };
  19399. exports.default = _default;
  19400. /***/ }),
  19401. /* 39 */
  19402. /*!****************************************************************************!*\
  19403. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages.json?{"type":"stat"} ***!
  19404. \****************************************************************************/
  19405. /*! no static exports found */
  19406. /***/ (function(module, exports, __webpack_require__) {
  19407. "use strict";
  19408. Object.defineProperty(exports, "__esModule", {
  19409. value: true
  19410. });
  19411. exports.default = void 0;
  19412. var _default = {
  19413. "appid": "__UNI__8C5F0F6"
  19414. };
  19415. exports.default = _default;
  19416. /***/ }),
  19417. /* 40 */
  19418. /*!*****************************************************************************!*\
  19419. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages.json?{"type":"style"} ***!
  19420. \*****************************************************************************/
  19421. /*! no static exports found */
  19422. /***/ (function(module, exports, __webpack_require__) {
  19423. "use strict";
  19424. Object.defineProperty(exports, "__esModule", {
  19425. value: true
  19426. });
  19427. exports.default = void 0;
  19428. var _default = {
  19429. "pages": {
  19430. "pages/chooseIdentity/index": {
  19431. "navigationStyle": "custom",
  19432. "navigationBarTitleText": "选择身份"
  19433. },
  19434. "pages/login/login": {
  19435. "navigationBarTitleText": "登录"
  19436. },
  19437. "pages/index/index": {
  19438. "navigationBarTitleText": "首页"
  19439. },
  19440. "pages/mine/mine": {
  19441. "navigationStyle": "custom",
  19442. "navigationBarTitleText": "我的"
  19443. },
  19444. "pages/subPackages/carmange/add": {
  19445. "navigationBarTitleText": "添加车辆",
  19446. "enablePullDownRefresh": true,
  19447. "onReachBottomDistance": 100,
  19448. "component": true
  19449. },
  19450. "pages/subPackages/carmange/index": {
  19451. "navigationBarTitleText": "车辆管理",
  19452. "enablePullDownRefresh": true,
  19453. "onReachBottomDistance": 100,
  19454. "component": true
  19455. },
  19456. "pages/subPackages/yy_history/code": {
  19457. "navigationBarTitleText": "预约码",
  19458. "enablePullDownRefresh": true,
  19459. "onReachBottomDistance": 100,
  19460. "component": true
  19461. },
  19462. "pages/subPackages/yy_history/edit": {
  19463. "navigationBarTitleText": "修改预约",
  19464. "enablePullDownRefresh": true,
  19465. "onReachBottomDistance": 100,
  19466. "component": true
  19467. },
  19468. "pages/subPackages/sj_history/edit": {
  19469. "navigationBarTitleText": "修改预约",
  19470. "enablePullDownRefresh": true,
  19471. "onReachBottomDistance": 100,
  19472. "component": true
  19473. },
  19474. "pages/subPackages/yy_history/index": {
  19475. "navigationBarTitleText": "预约历史",
  19476. "enablePullDownRefresh": true,
  19477. "onReachBottomDistance": 100,
  19478. "component": true
  19479. },
  19480. "pages/subPackages/sj_history/index": {
  19481. "navigationBarTitleText": "预约历史",
  19482. "enablePullDownRefresh": true,
  19483. "onReachBottomDistance": 100,
  19484. "component": true
  19485. },
  19486. "pages/subPackages/sj_yy/index": {
  19487. "navigationBarTitleText": "司机预约",
  19488. "enablePullDownRefresh": true,
  19489. "onReachBottomDistance": 100,
  19490. "component": true
  19491. },
  19492. "pages/subPackages/qy_yy/index": {
  19493. "navigationBarTitleText": "企业预约",
  19494. "enablePullDownRefresh": true,
  19495. "onReachBottomDistance": 100,
  19496. "component": true
  19497. },
  19498. "pages/subPackages/choosecar/index": {
  19499. "navigationBarTitleText": "车型选择",
  19500. "enablePullDownRefresh": true,
  19501. "onReachBottomDistance": 100,
  19502. "component": true
  19503. },
  19504. "pages/subPackages/phoneRegister/index": {
  19505. "navigationBarTitleText": "授权手机号快捷登录",
  19506. "enablePullDownRefresh": true,
  19507. "onReachBottomDistance": 100,
  19508. "component": true
  19509. },
  19510. "pages/subPackages/password/index": {
  19511. "navigationBarTitleText": "修改密码",
  19512. "enablePullDownRefresh": true,
  19513. "onReachBottomDistance": 100,
  19514. "component": true
  19515. }
  19516. },
  19517. "globalStyle": {
  19518. "pageOrientation": "portrait",
  19519. "navigationBarTitleText": "Hello uniapp",
  19520. "navigationBarTextStyle": "black",
  19521. "navigationBarBackgroundColor": "#FFFFFF",
  19522. "backgroundColor": "#FFFFFF",
  19523. "backgroundColorTop": "#FFFFFF",
  19524. "backgroundColorBottom": "#F4F5F6"
  19525. }
  19526. };
  19527. exports.default = _default;
  19528. /***/ }),
  19529. /* 41 */,
  19530. /* 42 */,
  19531. /* 43 */,
  19532. /* 44 */,
  19533. /* 45 */,
  19534. /* 46 */
  19535. /*!**********************************************************************************************************!*\
  19536. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  19537. \**********************************************************************************************************/
  19538. /*! exports provided: default */
  19539. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  19540. "use strict";
  19541. __webpack_require__.r(__webpack_exports__);
  19542. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  19543. /* globals __VUE_SSR_CONTEXT__ */
  19544. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  19545. // This module is a runtime utility for cleaner component module output and will
  19546. // be included in the final webpack user bundle.
  19547. function normalizeComponent (
  19548. scriptExports,
  19549. render,
  19550. staticRenderFns,
  19551. functionalTemplate,
  19552. injectStyles,
  19553. scopeId,
  19554. moduleIdentifier, /* server only */
  19555. shadowMode, /* vue-cli only */
  19556. components, // fixed by xxxxxx auto components
  19557. renderjs // fixed by xxxxxx renderjs
  19558. ) {
  19559. // Vue.extend constructor export interop
  19560. var options = typeof scriptExports === 'function'
  19561. ? scriptExports.options
  19562. : scriptExports
  19563. // fixed by xxxxxx auto components
  19564. if (components) {
  19565. if (!options.components) {
  19566. options.components = {}
  19567. }
  19568. var hasOwn = Object.prototype.hasOwnProperty
  19569. for (var name in components) {
  19570. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  19571. options.components[name] = components[name]
  19572. }
  19573. }
  19574. }
  19575. // fixed by xxxxxx renderjs
  19576. if (renderjs) {
  19577. if(typeof renderjs.beforeCreate === 'function'){
  19578. renderjs.beforeCreate = [renderjs.beforeCreate]
  19579. }
  19580. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  19581. this[renderjs.__module] = this
  19582. });
  19583. (options.mixins || (options.mixins = [])).push(renderjs)
  19584. }
  19585. // render functions
  19586. if (render) {
  19587. options.render = render
  19588. options.staticRenderFns = staticRenderFns
  19589. options._compiled = true
  19590. }
  19591. // functional template
  19592. if (functionalTemplate) {
  19593. options.functional = true
  19594. }
  19595. // scopedId
  19596. if (scopeId) {
  19597. options._scopeId = 'data-v-' + scopeId
  19598. }
  19599. var hook
  19600. if (moduleIdentifier) { // server build
  19601. hook = function (context) {
  19602. // 2.3 injection
  19603. context =
  19604. context || // cached call
  19605. (this.$vnode && this.$vnode.ssrContext) || // stateful
  19606. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  19607. // 2.2 with runInNewContext: true
  19608. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  19609. context = __VUE_SSR_CONTEXT__
  19610. }
  19611. // inject component styles
  19612. if (injectStyles) {
  19613. injectStyles.call(this, context)
  19614. }
  19615. // register component module identifier for async chunk inferrence
  19616. if (context && context._registeredComponents) {
  19617. context._registeredComponents.add(moduleIdentifier)
  19618. }
  19619. }
  19620. // used by ssr in case component is cached and beforeCreate
  19621. // never gets called
  19622. options._ssrRegister = hook
  19623. } else if (injectStyles) {
  19624. hook = shadowMode
  19625. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  19626. : injectStyles
  19627. }
  19628. if (hook) {
  19629. if (options.functional) {
  19630. // for template-only hot-reload because in that case the render fn doesn't
  19631. // go through the normalizer
  19632. options._injectStyles = hook
  19633. // register for functioal component in vue file
  19634. var originalRender = options.render
  19635. options.render = function renderWithStyleInjection (h, context) {
  19636. hook.call(context)
  19637. return originalRender(h, context)
  19638. }
  19639. } else {
  19640. // inject component registration as beforeCreate hook
  19641. var existing = options.beforeCreate
  19642. options.beforeCreate = existing
  19643. ? [].concat(existing, hook)
  19644. : [hook]
  19645. }
  19646. }
  19647. return {
  19648. exports: scriptExports,
  19649. options: options
  19650. }
  19651. }
  19652. /***/ }),
  19653. /* 47 */
  19654. /*!****************************************************************!*\
  19655. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/store/index.js ***!
  19656. \****************************************************************/
  19657. /*! no static exports found */
  19658. /***/ (function(module, exports, __webpack_require__) {
  19659. "use strict";
  19660. /* WEBPACK VAR INJECTION */(function(uni) {
  19661. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  19662. Object.defineProperty(exports, "__esModule", {
  19663. value: true
  19664. });
  19665. exports.default = void 0;
  19666. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  19667. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 48));
  19668. _vue.default.use(_vuex.default);
  19669. var store = new _vuex.default.Store({
  19670. state: {
  19671. userInfo: null,
  19672. token: null,
  19673. isRefresh: true,
  19674. kickbackData: []
  19675. },
  19676. getters: {
  19677. kickbackDataLen: function kickbackDataLen(state) {
  19678. return state.kickbackData.length;
  19679. }
  19680. },
  19681. mutations: {
  19682. setData: function setData(state, _ref) {
  19683. var payload = _ref.payload;
  19684. for (var v in payload) {
  19685. state[v] = payload[v];
  19686. uni.setStorageSync(v, payload[v]);
  19687. }
  19688. }
  19689. },
  19690. actions: {}
  19691. });
  19692. var _default = store;
  19693. exports.default = _default;
  19694. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  19695. /***/ }),
  19696. /* 48 */
  19697. /*!**************************************************************************************!*\
  19698. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
  19699. \**************************************************************************************/
  19700. /*! no static exports found */
  19701. /***/ (function(module, exports, __webpack_require__) {
  19702. "use strict";
  19703. /* WEBPACK VAR INJECTION */(function(global) {/*!
  19704. * vuex v3.6.2
  19705. * (c) 2021 Evan You
  19706. * @license MIT
  19707. */
  19708. function applyMixin (Vue) {
  19709. var version = Number(Vue.version.split('.')[0]);
  19710. if (version >= 2) {
  19711. Vue.mixin({ beforeCreate: vuexInit });
  19712. } else {
  19713. // override init and inject vuex init procedure
  19714. // for 1.x backwards compatibility.
  19715. var _init = Vue.prototype._init;
  19716. Vue.prototype._init = function (options) {
  19717. if ( options === void 0 ) options = {};
  19718. options.init = options.init
  19719. ? [vuexInit].concat(options.init)
  19720. : vuexInit;
  19721. _init.call(this, options);
  19722. };
  19723. }
  19724. /**
  19725. * Vuex init hook, injected into each instances init hooks list.
  19726. */
  19727. function vuexInit () {
  19728. var options = this.$options;
  19729. // store injection
  19730. if (options.store) {
  19731. this.$store = typeof options.store === 'function'
  19732. ? options.store()
  19733. : options.store;
  19734. } else if (options.parent && options.parent.$store) {
  19735. this.$store = options.parent.$store;
  19736. }
  19737. }
  19738. }
  19739. var target = typeof window !== 'undefined'
  19740. ? window
  19741. : typeof global !== 'undefined'
  19742. ? global
  19743. : {};
  19744. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  19745. function devtoolPlugin (store) {
  19746. if (!devtoolHook) { return }
  19747. store._devtoolHook = devtoolHook;
  19748. devtoolHook.emit('vuex:init', store);
  19749. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  19750. store.replaceState(targetState);
  19751. });
  19752. store.subscribe(function (mutation, state) {
  19753. devtoolHook.emit('vuex:mutation', mutation, state);
  19754. }, { prepend: true });
  19755. store.subscribeAction(function (action, state) {
  19756. devtoolHook.emit('vuex:action', action, state);
  19757. }, { prepend: true });
  19758. }
  19759. /**
  19760. * Get the first item that pass the test
  19761. * by second argument function
  19762. *
  19763. * @param {Array} list
  19764. * @param {Function} f
  19765. * @return {*}
  19766. */
  19767. function find (list, f) {
  19768. return list.filter(f)[0]
  19769. }
  19770. /**
  19771. * Deep copy the given object considering circular structure.
  19772. * This function caches all nested objects and its copies.
  19773. * If it detects circular structure, use cached copy to avoid infinite loop.
  19774. *
  19775. * @param {*} obj
  19776. * @param {Array<Object>} cache
  19777. * @return {*}
  19778. */
  19779. function deepCopy (obj, cache) {
  19780. if ( cache === void 0 ) cache = [];
  19781. // just return if obj is immutable value
  19782. if (obj === null || typeof obj !== 'object') {
  19783. return obj
  19784. }
  19785. // if obj is hit, it is in circular structure
  19786. var hit = find(cache, function (c) { return c.original === obj; });
  19787. if (hit) {
  19788. return hit.copy
  19789. }
  19790. var copy = Array.isArray(obj) ? [] : {};
  19791. // put the copy into cache at first
  19792. // because we want to refer it in recursive deepCopy
  19793. cache.push({
  19794. original: obj,
  19795. copy: copy
  19796. });
  19797. Object.keys(obj).forEach(function (key) {
  19798. copy[key] = deepCopy(obj[key], cache);
  19799. });
  19800. return copy
  19801. }
  19802. /**
  19803. * forEach for object
  19804. */
  19805. function forEachValue (obj, fn) {
  19806. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  19807. }
  19808. function isObject (obj) {
  19809. return obj !== null && typeof obj === 'object'
  19810. }
  19811. function isPromise (val) {
  19812. return val && typeof val.then === 'function'
  19813. }
  19814. function assert (condition, msg) {
  19815. if (!condition) { throw new Error(("[vuex] " + msg)) }
  19816. }
  19817. function partial (fn, arg) {
  19818. return function () {
  19819. return fn(arg)
  19820. }
  19821. }
  19822. // Base data struct for store's module, package with some attribute and method
  19823. var Module = function Module (rawModule, runtime) {
  19824. this.runtime = runtime;
  19825. // Store some children item
  19826. this._children = Object.create(null);
  19827. // Store the origin module object which passed by programmer
  19828. this._rawModule = rawModule;
  19829. var rawState = rawModule.state;
  19830. // Store the origin module's state
  19831. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  19832. };
  19833. var prototypeAccessors = { namespaced: { configurable: true } };
  19834. prototypeAccessors.namespaced.get = function () {
  19835. return !!this._rawModule.namespaced
  19836. };
  19837. Module.prototype.addChild = function addChild (key, module) {
  19838. this._children[key] = module;
  19839. };
  19840. Module.prototype.removeChild = function removeChild (key) {
  19841. delete this._children[key];
  19842. };
  19843. Module.prototype.getChild = function getChild (key) {
  19844. return this._children[key]
  19845. };
  19846. Module.prototype.hasChild = function hasChild (key) {
  19847. return key in this._children
  19848. };
  19849. Module.prototype.update = function update (rawModule) {
  19850. this._rawModule.namespaced = rawModule.namespaced;
  19851. if (rawModule.actions) {
  19852. this._rawModule.actions = rawModule.actions;
  19853. }
  19854. if (rawModule.mutations) {
  19855. this._rawModule.mutations = rawModule.mutations;
  19856. }
  19857. if (rawModule.getters) {
  19858. this._rawModule.getters = rawModule.getters;
  19859. }
  19860. };
  19861. Module.prototype.forEachChild = function forEachChild (fn) {
  19862. forEachValue(this._children, fn);
  19863. };
  19864. Module.prototype.forEachGetter = function forEachGetter (fn) {
  19865. if (this._rawModule.getters) {
  19866. forEachValue(this._rawModule.getters, fn);
  19867. }
  19868. };
  19869. Module.prototype.forEachAction = function forEachAction (fn) {
  19870. if (this._rawModule.actions) {
  19871. forEachValue(this._rawModule.actions, fn);
  19872. }
  19873. };
  19874. Module.prototype.forEachMutation = function forEachMutation (fn) {
  19875. if (this._rawModule.mutations) {
  19876. forEachValue(this._rawModule.mutations, fn);
  19877. }
  19878. };
  19879. Object.defineProperties( Module.prototype, prototypeAccessors );
  19880. var ModuleCollection = function ModuleCollection (rawRootModule) {
  19881. // register root module (Vuex.Store options)
  19882. this.register([], rawRootModule, false);
  19883. };
  19884. ModuleCollection.prototype.get = function get (path) {
  19885. return path.reduce(function (module, key) {
  19886. return module.getChild(key)
  19887. }, this.root)
  19888. };
  19889. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  19890. var module = this.root;
  19891. return path.reduce(function (namespace, key) {
  19892. module = module.getChild(key);
  19893. return namespace + (module.namespaced ? key + '/' : '')
  19894. }, '')
  19895. };
  19896. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  19897. update([], this.root, rawRootModule);
  19898. };
  19899. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  19900. var this$1 = this;
  19901. if ( runtime === void 0 ) runtime = true;
  19902. if ((true)) {
  19903. assertRawModule(path, rawModule);
  19904. }
  19905. var newModule = new Module(rawModule, runtime);
  19906. if (path.length === 0) {
  19907. this.root = newModule;
  19908. } else {
  19909. var parent = this.get(path.slice(0, -1));
  19910. parent.addChild(path[path.length - 1], newModule);
  19911. }
  19912. // register nested modules
  19913. if (rawModule.modules) {
  19914. forEachValue(rawModule.modules, function (rawChildModule, key) {
  19915. this$1.register(path.concat(key), rawChildModule, runtime);
  19916. });
  19917. }
  19918. };
  19919. ModuleCollection.prototype.unregister = function unregister (path) {
  19920. var parent = this.get(path.slice(0, -1));
  19921. var key = path[path.length - 1];
  19922. var child = parent.getChild(key);
  19923. if (!child) {
  19924. if ((true)) {
  19925. console.warn(
  19926. "[vuex] trying to unregister module '" + key + "', which is " +
  19927. "not registered"
  19928. );
  19929. }
  19930. return
  19931. }
  19932. if (!child.runtime) {
  19933. return
  19934. }
  19935. parent.removeChild(key);
  19936. };
  19937. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  19938. var parent = this.get(path.slice(0, -1));
  19939. var key = path[path.length - 1];
  19940. if (parent) {
  19941. return parent.hasChild(key)
  19942. }
  19943. return false
  19944. };
  19945. function update (path, targetModule, newModule) {
  19946. if ((true)) {
  19947. assertRawModule(path, newModule);
  19948. }
  19949. // update target module
  19950. targetModule.update(newModule);
  19951. // update nested modules
  19952. if (newModule.modules) {
  19953. for (var key in newModule.modules) {
  19954. if (!targetModule.getChild(key)) {
  19955. if ((true)) {
  19956. console.warn(
  19957. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  19958. 'manual reload is needed'
  19959. );
  19960. }
  19961. return
  19962. }
  19963. update(
  19964. path.concat(key),
  19965. targetModule.getChild(key),
  19966. newModule.modules[key]
  19967. );
  19968. }
  19969. }
  19970. }
  19971. var functionAssert = {
  19972. assert: function (value) { return typeof value === 'function'; },
  19973. expected: 'function'
  19974. };
  19975. var objectAssert = {
  19976. assert: function (value) { return typeof value === 'function' ||
  19977. (typeof value === 'object' && typeof value.handler === 'function'); },
  19978. expected: 'function or object with "handler" function'
  19979. };
  19980. var assertTypes = {
  19981. getters: functionAssert,
  19982. mutations: functionAssert,
  19983. actions: objectAssert
  19984. };
  19985. function assertRawModule (path, rawModule) {
  19986. Object.keys(assertTypes).forEach(function (key) {
  19987. if (!rawModule[key]) { return }
  19988. var assertOptions = assertTypes[key];
  19989. forEachValue(rawModule[key], function (value, type) {
  19990. assert(
  19991. assertOptions.assert(value),
  19992. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  19993. );
  19994. });
  19995. });
  19996. }
  19997. function makeAssertionMessage (path, key, type, value, expected) {
  19998. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  19999. if (path.length > 0) {
  20000. buf += " in module \"" + (path.join('.')) + "\"";
  20001. }
  20002. buf += " is " + (JSON.stringify(value)) + ".";
  20003. return buf
  20004. }
  20005. var Vue; // bind on install
  20006. var Store = function Store (options) {
  20007. var this$1 = this;
  20008. if ( options === void 0 ) options = {};
  20009. // Auto install if it is not done yet and `window` has `Vue`.
  20010. // To allow users to avoid auto-installation in some cases,
  20011. // this code should be placed here. See #731
  20012. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  20013. install(window.Vue);
  20014. }
  20015. if ((true)) {
  20016. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  20017. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  20018. assert(this instanceof Store, "store must be called with the new operator.");
  20019. }
  20020. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  20021. var strict = options.strict; if ( strict === void 0 ) strict = false;
  20022. // store internal state
  20023. this._committing = false;
  20024. this._actions = Object.create(null);
  20025. this._actionSubscribers = [];
  20026. this._mutations = Object.create(null);
  20027. this._wrappedGetters = Object.create(null);
  20028. this._modules = new ModuleCollection(options);
  20029. this._modulesNamespaceMap = Object.create(null);
  20030. this._subscribers = [];
  20031. this._watcherVM = new Vue();
  20032. this._makeLocalGettersCache = Object.create(null);
  20033. // bind commit and dispatch to self
  20034. var store = this;
  20035. var ref = this;
  20036. var dispatch = ref.dispatch;
  20037. var commit = ref.commit;
  20038. this.dispatch = function boundDispatch (type, payload) {
  20039. return dispatch.call(store, type, payload)
  20040. };
  20041. this.commit = function boundCommit (type, payload, options) {
  20042. return commit.call(store, type, payload, options)
  20043. };
  20044. // strict mode
  20045. this.strict = strict;
  20046. var state = this._modules.root.state;
  20047. // init root module.
  20048. // this also recursively registers all sub-modules
  20049. // and collects all module getters inside this._wrappedGetters
  20050. installModule(this, state, [], this._modules.root);
  20051. // initialize the store vm, which is responsible for the reactivity
  20052. // (also registers _wrappedGetters as computed properties)
  20053. resetStoreVM(this, state);
  20054. // apply plugins
  20055. plugins.forEach(function (plugin) { return plugin(this$1); });
  20056. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  20057. if (useDevtools) {
  20058. devtoolPlugin(this);
  20059. }
  20060. };
  20061. var prototypeAccessors$1 = { state: { configurable: true } };
  20062. prototypeAccessors$1.state.get = function () {
  20063. return this._vm._data.$$state
  20064. };
  20065. prototypeAccessors$1.state.set = function (v) {
  20066. if ((true)) {
  20067. assert(false, "use store.replaceState() to explicit replace store state.");
  20068. }
  20069. };
  20070. Store.prototype.commit = function commit (_type, _payload, _options) {
  20071. var this$1 = this;
  20072. // check object-style commit
  20073. var ref = unifyObjectStyle(_type, _payload, _options);
  20074. var type = ref.type;
  20075. var payload = ref.payload;
  20076. var options = ref.options;
  20077. var mutation = { type: type, payload: payload };
  20078. var entry = this._mutations[type];
  20079. if (!entry) {
  20080. if ((true)) {
  20081. console.error(("[vuex] unknown mutation type: " + type));
  20082. }
  20083. return
  20084. }
  20085. this._withCommit(function () {
  20086. entry.forEach(function commitIterator (handler) {
  20087. handler(payload);
  20088. });
  20089. });
  20090. this._subscribers
  20091. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  20092. .forEach(function (sub) { return sub(mutation, this$1.state); });
  20093. if (
  20094. ( true) &&
  20095. options && options.silent
  20096. ) {
  20097. console.warn(
  20098. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  20099. 'Use the filter functionality in the vue-devtools'
  20100. );
  20101. }
  20102. };
  20103. Store.prototype.dispatch = function dispatch (_type, _payload) {
  20104. var this$1 = this;
  20105. // check object-style dispatch
  20106. var ref = unifyObjectStyle(_type, _payload);
  20107. var type = ref.type;
  20108. var payload = ref.payload;
  20109. var action = { type: type, payload: payload };
  20110. var entry = this._actions[type];
  20111. if (!entry) {
  20112. if ((true)) {
  20113. console.error(("[vuex] unknown action type: " + type));
  20114. }
  20115. return
  20116. }
  20117. try {
  20118. this._actionSubscribers
  20119. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  20120. .filter(function (sub) { return sub.before; })
  20121. .forEach(function (sub) { return sub.before(action, this$1.state); });
  20122. } catch (e) {
  20123. if ((true)) {
  20124. console.warn("[vuex] error in before action subscribers: ");
  20125. console.error(e);
  20126. }
  20127. }
  20128. var result = entry.length > 1
  20129. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  20130. : entry[0](payload);
  20131. return new Promise(function (resolve, reject) {
  20132. result.then(function (res) {
  20133. try {
  20134. this$1._actionSubscribers
  20135. .filter(function (sub) { return sub.after; })
  20136. .forEach(function (sub) { return sub.after(action, this$1.state); });
  20137. } catch (e) {
  20138. if ((true)) {
  20139. console.warn("[vuex] error in after action subscribers: ");
  20140. console.error(e);
  20141. }
  20142. }
  20143. resolve(res);
  20144. }, function (error) {
  20145. try {
  20146. this$1._actionSubscribers
  20147. .filter(function (sub) { return sub.error; })
  20148. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  20149. } catch (e) {
  20150. if ((true)) {
  20151. console.warn("[vuex] error in error action subscribers: ");
  20152. console.error(e);
  20153. }
  20154. }
  20155. reject(error);
  20156. });
  20157. })
  20158. };
  20159. Store.prototype.subscribe = function subscribe (fn, options) {
  20160. return genericSubscribe(fn, this._subscribers, options)
  20161. };
  20162. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  20163. var subs = typeof fn === 'function' ? { before: fn } : fn;
  20164. return genericSubscribe(subs, this._actionSubscribers, options)
  20165. };
  20166. Store.prototype.watch = function watch (getter, cb, options) {
  20167. var this$1 = this;
  20168. if ((true)) {
  20169. assert(typeof getter === 'function', "store.watch only accepts a function.");
  20170. }
  20171. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  20172. };
  20173. Store.prototype.replaceState = function replaceState (state) {
  20174. var this$1 = this;
  20175. this._withCommit(function () {
  20176. this$1._vm._data.$$state = state;
  20177. });
  20178. };
  20179. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  20180. if ( options === void 0 ) options = {};
  20181. if (typeof path === 'string') { path = [path]; }
  20182. if ((true)) {
  20183. assert(Array.isArray(path), "module path must be a string or an Array.");
  20184. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  20185. }
  20186. this._modules.register(path, rawModule);
  20187. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  20188. // reset store to update getters...
  20189. resetStoreVM(this, this.state);
  20190. };
  20191. Store.prototype.unregisterModule = function unregisterModule (path) {
  20192. var this$1 = this;
  20193. if (typeof path === 'string') { path = [path]; }
  20194. if ((true)) {
  20195. assert(Array.isArray(path), "module path must be a string or an Array.");
  20196. }
  20197. this._modules.unregister(path);
  20198. this._withCommit(function () {
  20199. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  20200. Vue.delete(parentState, path[path.length - 1]);
  20201. });
  20202. resetStore(this);
  20203. };
  20204. Store.prototype.hasModule = function hasModule (path) {
  20205. if (typeof path === 'string') { path = [path]; }
  20206. if ((true)) {
  20207. assert(Array.isArray(path), "module path must be a string or an Array.");
  20208. }
  20209. return this._modules.isRegistered(path)
  20210. };
  20211. Store.prototype[[104,111,116,85,112,100,97,116,101].map(function (item) {return String.fromCharCode(item)}).join('')] = function (newOptions) {
  20212. this._modules.update(newOptions);
  20213. resetStore(this, true);
  20214. };
  20215. Store.prototype._withCommit = function _withCommit (fn) {
  20216. var committing = this._committing;
  20217. this._committing = true;
  20218. fn();
  20219. this._committing = committing;
  20220. };
  20221. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  20222. function genericSubscribe (fn, subs, options) {
  20223. if (subs.indexOf(fn) < 0) {
  20224. options && options.prepend
  20225. ? subs.unshift(fn)
  20226. : subs.push(fn);
  20227. }
  20228. return function () {
  20229. var i = subs.indexOf(fn);
  20230. if (i > -1) {
  20231. subs.splice(i, 1);
  20232. }
  20233. }
  20234. }
  20235. function resetStore (store, hot) {
  20236. store._actions = Object.create(null);
  20237. store._mutations = Object.create(null);
  20238. store._wrappedGetters = Object.create(null);
  20239. store._modulesNamespaceMap = Object.create(null);
  20240. var state = store.state;
  20241. // init all modules
  20242. installModule(store, state, [], store._modules.root, true);
  20243. // reset vm
  20244. resetStoreVM(store, state, hot);
  20245. }
  20246. function resetStoreVM (store, state, hot) {
  20247. var oldVm = store._vm;
  20248. // bind store public getters
  20249. store.getters = {};
  20250. // reset local getters cache
  20251. store._makeLocalGettersCache = Object.create(null);
  20252. var wrappedGetters = store._wrappedGetters;
  20253. var computed = {};
  20254. forEachValue(wrappedGetters, function (fn, key) {
  20255. // use computed to leverage its lazy-caching mechanism
  20256. // direct inline function use will lead to closure preserving oldVm.
  20257. // using partial to return function with only arguments preserved in closure environment.
  20258. computed[key] = partial(fn, store);
  20259. Object.defineProperty(store.getters, key, {
  20260. get: function () { return store._vm[key]; },
  20261. enumerable: true // for local getters
  20262. });
  20263. });
  20264. // use a Vue instance to store the state tree
  20265. // suppress warnings just in case the user has added
  20266. // some funky global mixins
  20267. var silent = Vue.config.silent;
  20268. Vue.config.silent = true;
  20269. store._vm = new Vue({
  20270. data: {
  20271. $$state: state
  20272. },
  20273. computed: computed
  20274. });
  20275. Vue.config.silent = silent;
  20276. // enable strict mode for new vm
  20277. if (store.strict) {
  20278. enableStrictMode(store);
  20279. }
  20280. if (oldVm) {
  20281. if (hot) {
  20282. // dispatch changes in all subscribed watchers
  20283. // to force getter re-evaluation for hot reloading.
  20284. store._withCommit(function () {
  20285. oldVm._data.$$state = null;
  20286. });
  20287. }
  20288. Vue.nextTick(function () { return oldVm.$destroy(); });
  20289. }
  20290. }
  20291. function installModule (store, rootState, path, module, hot) {
  20292. var isRoot = !path.length;
  20293. var namespace = store._modules.getNamespace(path);
  20294. // register in namespace map
  20295. if (module.namespaced) {
  20296. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  20297. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  20298. }
  20299. store._modulesNamespaceMap[namespace] = module;
  20300. }
  20301. // set state
  20302. if (!isRoot && !hot) {
  20303. var parentState = getNestedState(rootState, path.slice(0, -1));
  20304. var moduleName = path[path.length - 1];
  20305. store._withCommit(function () {
  20306. if ((true)) {
  20307. if (moduleName in parentState) {
  20308. console.warn(
  20309. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  20310. );
  20311. }
  20312. }
  20313. Vue.set(parentState, moduleName, module.state);
  20314. });
  20315. }
  20316. var local = module.context = makeLocalContext(store, namespace, path);
  20317. module.forEachMutation(function (mutation, key) {
  20318. var namespacedType = namespace + key;
  20319. registerMutation(store, namespacedType, mutation, local);
  20320. });
  20321. module.forEachAction(function (action, key) {
  20322. var type = action.root ? key : namespace + key;
  20323. var handler = action.handler || action;
  20324. registerAction(store, type, handler, local);
  20325. });
  20326. module.forEachGetter(function (getter, key) {
  20327. var namespacedType = namespace + key;
  20328. registerGetter(store, namespacedType, getter, local);
  20329. });
  20330. module.forEachChild(function (child, key) {
  20331. installModule(store, rootState, path.concat(key), child, hot);
  20332. });
  20333. }
  20334. /**
  20335. * make localized dispatch, commit, getters and state
  20336. * if there is no namespace, just use root ones
  20337. */
  20338. function makeLocalContext (store, namespace, path) {
  20339. var noNamespace = namespace === '';
  20340. var local = {
  20341. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  20342. var args = unifyObjectStyle(_type, _payload, _options);
  20343. var payload = args.payload;
  20344. var options = args.options;
  20345. var type = args.type;
  20346. if (!options || !options.root) {
  20347. type = namespace + type;
  20348. if (( true) && !store._actions[type]) {
  20349. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  20350. return
  20351. }
  20352. }
  20353. return store.dispatch(type, payload)
  20354. },
  20355. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  20356. var args = unifyObjectStyle(_type, _payload, _options);
  20357. var payload = args.payload;
  20358. var options = args.options;
  20359. var type = args.type;
  20360. if (!options || !options.root) {
  20361. type = namespace + type;
  20362. if (( true) && !store._mutations[type]) {
  20363. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  20364. return
  20365. }
  20366. }
  20367. store.commit(type, payload, options);
  20368. }
  20369. };
  20370. // getters and state object must be gotten lazily
  20371. // because they will be changed by vm update
  20372. Object.defineProperties(local, {
  20373. getters: {
  20374. get: noNamespace
  20375. ? function () { return store.getters; }
  20376. : function () { return makeLocalGetters(store, namespace); }
  20377. },
  20378. state: {
  20379. get: function () { return getNestedState(store.state, path); }
  20380. }
  20381. });
  20382. return local
  20383. }
  20384. function makeLocalGetters (store, namespace) {
  20385. if (!store._makeLocalGettersCache[namespace]) {
  20386. var gettersProxy = {};
  20387. var splitPos = namespace.length;
  20388. Object.keys(store.getters).forEach(function (type) {
  20389. // skip if the target getter is not match this namespace
  20390. if (type.slice(0, splitPos) !== namespace) { return }
  20391. // extract local getter type
  20392. var localType = type.slice(splitPos);
  20393. // Add a port to the getters proxy.
  20394. // Define as getter property because
  20395. // we do not want to evaluate the getters in this time.
  20396. Object.defineProperty(gettersProxy, localType, {
  20397. get: function () { return store.getters[type]; },
  20398. enumerable: true
  20399. });
  20400. });
  20401. store._makeLocalGettersCache[namespace] = gettersProxy;
  20402. }
  20403. return store._makeLocalGettersCache[namespace]
  20404. }
  20405. function registerMutation (store, type, handler, local) {
  20406. var entry = store._mutations[type] || (store._mutations[type] = []);
  20407. entry.push(function wrappedMutationHandler (payload) {
  20408. handler.call(store, local.state, payload);
  20409. });
  20410. }
  20411. function registerAction (store, type, handler, local) {
  20412. var entry = store._actions[type] || (store._actions[type] = []);
  20413. entry.push(function wrappedActionHandler (payload) {
  20414. var res = handler.call(store, {
  20415. dispatch: local.dispatch,
  20416. commit: local.commit,
  20417. getters: local.getters,
  20418. state: local.state,
  20419. rootGetters: store.getters,
  20420. rootState: store.state
  20421. }, payload);
  20422. if (!isPromise(res)) {
  20423. res = Promise.resolve(res);
  20424. }
  20425. if (store._devtoolHook) {
  20426. return res.catch(function (err) {
  20427. store._devtoolHook.emit('vuex:error', err);
  20428. throw err
  20429. })
  20430. } else {
  20431. return res
  20432. }
  20433. });
  20434. }
  20435. function registerGetter (store, type, rawGetter, local) {
  20436. if (store._wrappedGetters[type]) {
  20437. if ((true)) {
  20438. console.error(("[vuex] duplicate getter key: " + type));
  20439. }
  20440. return
  20441. }
  20442. store._wrappedGetters[type] = function wrappedGetter (store) {
  20443. return rawGetter(
  20444. local.state, // local state
  20445. local.getters, // local getters
  20446. store.state, // root state
  20447. store.getters // root getters
  20448. )
  20449. };
  20450. }
  20451. function enableStrictMode (store) {
  20452. store._vm.$watch(function () { return this._data.$$state }, function () {
  20453. if ((true)) {
  20454. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  20455. }
  20456. }, { deep: true, sync: true });
  20457. }
  20458. function getNestedState (state, path) {
  20459. return path.reduce(function (state, key) { return state[key]; }, state)
  20460. }
  20461. function unifyObjectStyle (type, payload, options) {
  20462. if (isObject(type) && type.type) {
  20463. options = payload;
  20464. payload = type;
  20465. type = type.type;
  20466. }
  20467. if ((true)) {
  20468. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  20469. }
  20470. return { type: type, payload: payload, options: options }
  20471. }
  20472. function install (_Vue) {
  20473. if (Vue && _Vue === Vue) {
  20474. if ((true)) {
  20475. console.error(
  20476. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  20477. );
  20478. }
  20479. return
  20480. }
  20481. Vue = _Vue;
  20482. applyMixin(Vue);
  20483. }
  20484. /**
  20485. * Reduce the code which written in Vue.js for getting the state.
  20486. * @param {String} [namespace] - Module's namespace
  20487. * @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.
  20488. * @param {Object}
  20489. */
  20490. var mapState = normalizeNamespace(function (namespace, states) {
  20491. var res = {};
  20492. if (( true) && !isValidMap(states)) {
  20493. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  20494. }
  20495. normalizeMap(states).forEach(function (ref) {
  20496. var key = ref.key;
  20497. var val = ref.val;
  20498. res[key] = function mappedState () {
  20499. var state = this.$store.state;
  20500. var getters = this.$store.getters;
  20501. if (namespace) {
  20502. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  20503. if (!module) {
  20504. return
  20505. }
  20506. state = module.context.state;
  20507. getters = module.context.getters;
  20508. }
  20509. return typeof val === 'function'
  20510. ? val.call(this, state, getters)
  20511. : state[val]
  20512. };
  20513. // mark vuex getter for devtools
  20514. res[key].vuex = true;
  20515. });
  20516. return res
  20517. });
  20518. /**
  20519. * Reduce the code which written in Vue.js for committing the mutation
  20520. * @param {String} [namespace] - Module's namespace
  20521. * @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.
  20522. * @return {Object}
  20523. */
  20524. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  20525. var res = {};
  20526. if (( true) && !isValidMap(mutations)) {
  20527. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  20528. }
  20529. normalizeMap(mutations).forEach(function (ref) {
  20530. var key = ref.key;
  20531. var val = ref.val;
  20532. res[key] = function mappedMutation () {
  20533. var args = [], len = arguments.length;
  20534. while ( len-- ) args[ len ] = arguments[ len ];
  20535. // Get the commit method from store
  20536. var commit = this.$store.commit;
  20537. if (namespace) {
  20538. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  20539. if (!module) {
  20540. return
  20541. }
  20542. commit = module.context.commit;
  20543. }
  20544. return typeof val === 'function'
  20545. ? val.apply(this, [commit].concat(args))
  20546. : commit.apply(this.$store, [val].concat(args))
  20547. };
  20548. });
  20549. return res
  20550. });
  20551. /**
  20552. * Reduce the code which written in Vue.js for getting the getters
  20553. * @param {String} [namespace] - Module's namespace
  20554. * @param {Object|Array} getters
  20555. * @return {Object}
  20556. */
  20557. var mapGetters = normalizeNamespace(function (namespace, getters) {
  20558. var res = {};
  20559. if (( true) && !isValidMap(getters)) {
  20560. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  20561. }
  20562. normalizeMap(getters).forEach(function (ref) {
  20563. var key = ref.key;
  20564. var val = ref.val;
  20565. // The namespace has been mutated by normalizeNamespace
  20566. val = namespace + val;
  20567. res[key] = function mappedGetter () {
  20568. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  20569. return
  20570. }
  20571. if (( true) && !(val in this.$store.getters)) {
  20572. console.error(("[vuex] unknown getter: " + val));
  20573. return
  20574. }
  20575. return this.$store.getters[val]
  20576. };
  20577. // mark vuex getter for devtools
  20578. res[key].vuex = true;
  20579. });
  20580. return res
  20581. });
  20582. /**
  20583. * Reduce the code which written in Vue.js for dispatch the action
  20584. * @param {String} [namespace] - Module's namespace
  20585. * @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.
  20586. * @return {Object}
  20587. */
  20588. var mapActions = normalizeNamespace(function (namespace, actions) {
  20589. var res = {};
  20590. if (( true) && !isValidMap(actions)) {
  20591. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  20592. }
  20593. normalizeMap(actions).forEach(function (ref) {
  20594. var key = ref.key;
  20595. var val = ref.val;
  20596. res[key] = function mappedAction () {
  20597. var args = [], len = arguments.length;
  20598. while ( len-- ) args[ len ] = arguments[ len ];
  20599. // get dispatch function from store
  20600. var dispatch = this.$store.dispatch;
  20601. if (namespace) {
  20602. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  20603. if (!module) {
  20604. return
  20605. }
  20606. dispatch = module.context.dispatch;
  20607. }
  20608. return typeof val === 'function'
  20609. ? val.apply(this, [dispatch].concat(args))
  20610. : dispatch.apply(this.$store, [val].concat(args))
  20611. };
  20612. });
  20613. return res
  20614. });
  20615. /**
  20616. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  20617. * @param {String} namespace
  20618. * @return {Object}
  20619. */
  20620. var createNamespacedHelpers = function (namespace) { return ({
  20621. mapState: mapState.bind(null, namespace),
  20622. mapGetters: mapGetters.bind(null, namespace),
  20623. mapMutations: mapMutations.bind(null, namespace),
  20624. mapActions: mapActions.bind(null, namespace)
  20625. }); };
  20626. /**
  20627. * Normalize the map
  20628. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  20629. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  20630. * @param {Array|Object} map
  20631. * @return {Object}
  20632. */
  20633. function normalizeMap (map) {
  20634. if (!isValidMap(map)) {
  20635. return []
  20636. }
  20637. return Array.isArray(map)
  20638. ? map.map(function (key) { return ({ key: key, val: key }); })
  20639. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  20640. }
  20641. /**
  20642. * Validate whether given map is valid or not
  20643. * @param {*} map
  20644. * @return {Boolean}
  20645. */
  20646. function isValidMap (map) {
  20647. return Array.isArray(map) || isObject(map)
  20648. }
  20649. /**
  20650. * 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.
  20651. * @param {Function} fn
  20652. * @return {Function}
  20653. */
  20654. function normalizeNamespace (fn) {
  20655. return function (namespace, map) {
  20656. if (typeof namespace !== 'string') {
  20657. map = namespace;
  20658. namespace = '';
  20659. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  20660. namespace += '/';
  20661. }
  20662. return fn(namespace, map)
  20663. }
  20664. }
  20665. /**
  20666. * Search a special module from store by namespace. if module not exist, print error message.
  20667. * @param {Object} store
  20668. * @param {String} helper
  20669. * @param {String} namespace
  20670. * @return {Object}
  20671. */
  20672. function getModuleByNamespace (store, helper, namespace) {
  20673. var module = store._modulesNamespaceMap[namespace];
  20674. if (( true) && !module) {
  20675. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  20676. }
  20677. return module
  20678. }
  20679. // Credits: borrowed code from fcomb/redux-logger
  20680. function createLogger (ref) {
  20681. if ( ref === void 0 ) ref = {};
  20682. var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  20683. var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  20684. var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  20685. var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  20686. var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  20687. var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  20688. var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  20689. var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  20690. var logger = ref.logger; if ( logger === void 0 ) logger = console;
  20691. return function (store) {
  20692. var prevState = deepCopy(store.state);
  20693. if (typeof logger === 'undefined') {
  20694. return
  20695. }
  20696. if (logMutations) {
  20697. store.subscribe(function (mutation, state) {
  20698. var nextState = deepCopy(state);
  20699. if (filter(mutation, prevState, nextState)) {
  20700. var formattedTime = getFormattedTime();
  20701. var formattedMutation = mutationTransformer(mutation);
  20702. var message = "mutation " + (mutation.type) + formattedTime;
  20703. startMessage(logger, message, collapsed);
  20704. logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
  20705. logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
  20706. logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
  20707. endMessage(logger);
  20708. }
  20709. prevState = nextState;
  20710. });
  20711. }
  20712. if (logActions) {
  20713. store.subscribeAction(function (action, state) {
  20714. if (actionFilter(action, state)) {
  20715. var formattedTime = getFormattedTime();
  20716. var formattedAction = actionTransformer(action);
  20717. var message = "action " + (action.type) + formattedTime;
  20718. startMessage(logger, message, collapsed);
  20719. logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
  20720. endMessage(logger);
  20721. }
  20722. });
  20723. }
  20724. }
  20725. }
  20726. function startMessage (logger, message, collapsed) {
  20727. var startMessage = collapsed
  20728. ? logger.groupCollapsed
  20729. : logger.group;
  20730. // render
  20731. try {
  20732. startMessage.call(logger, message);
  20733. } catch (e) {
  20734. logger.log(message);
  20735. }
  20736. }
  20737. function endMessage (logger) {
  20738. try {
  20739. logger.groupEnd();
  20740. } catch (e) {
  20741. logger.log('—— log end ——');
  20742. }
  20743. }
  20744. function getFormattedTime () {
  20745. var time = new Date();
  20746. return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
  20747. }
  20748. function repeat (str, times) {
  20749. return (new Array(times + 1)).join(str)
  20750. }
  20751. function pad (num, maxLength) {
  20752. return repeat('0', maxLength - num.toString().length) + num
  20753. }
  20754. var index_cjs = {
  20755. Store: Store,
  20756. install: install,
  20757. version: '3.6.2',
  20758. mapState: mapState,
  20759. mapMutations: mapMutations,
  20760. mapGetters: mapGetters,
  20761. mapActions: mapActions,
  20762. createNamespacedHelpers: createNamespacedHelpers,
  20763. createLogger: createLogger
  20764. };
  20765. module.exports = index_cjs;
  20766. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  20767. /***/ }),
  20768. /* 49 */
  20769. /*!***********************************************************************!*\
  20770. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages/utils/common.js ***!
  20771. \***********************************************************************/
  20772. /*! no static exports found */
  20773. /***/ (function(module, exports, __webpack_require__) {
  20774. "use strict";
  20775. Object.defineProperty(exports, "__esModule", {
  20776. value: true
  20777. });
  20778. exports.default = void 0;
  20779. exports.getUrlParameter = getUrlParameter;
  20780. /**
  20781. * 获取url参数值
  20782. * @param {*} url
  20783. * @param {*} name
  20784. */
  20785. function getUrlParameter(url, name) {
  20786. var regexSearch = '[\\?&#]' + name + '=([^&#]*)';
  20787. var regex = new RegExp(regexSearch);
  20788. var results = regex.exec(url);
  20789. console.log(results, 'results');
  20790. return results ? window.decodeURIComponent(results[1]) : '';
  20791. }
  20792. var _default = {
  20793. transDate: function transDate(val, pattern) {
  20794. if (val) {
  20795. var time = new Date();
  20796. time.setTime(val);
  20797. if (Date.parse(val)) {
  20798. time = new Date(val);
  20799. }
  20800. if (time instanceof Date) {
  20801. return this.formatDate(pattern || 'yyyy-MM-dd', time);
  20802. }
  20803. }
  20804. return '';
  20805. },
  20806. transBaseDateTime: function transBaseDateTime(val, pattern) {
  20807. if (val) {
  20808. var time = new Date();
  20809. time.setTime(val);
  20810. if (Date.parse(val)) {
  20811. time = new Date(val);
  20812. }
  20813. if (time instanceof Date) {
  20814. return this.formatDate(pattern || 'yyyy年MM月dd日 hh:mm', time);
  20815. }
  20816. }
  20817. return '';
  20818. },
  20819. transBaseToDateTime: function transBaseToDateTime(val, pattern) {
  20820. if (val) {
  20821. var time = new Date();
  20822. time.setTime(val);
  20823. if (Date.parse(val)) {
  20824. time = new Date(val);
  20825. }
  20826. if (time instanceof Date) {
  20827. return this.formatDate(pattern || 'MM月dd日 hh:mm', time);
  20828. }
  20829. }
  20830. return '';
  20831. },
  20832. transServDate: function transServDate(val) {
  20833. return this.transDate(val, 'yyyy-MM-dd hh:mm:ss');
  20834. },
  20835. transServDay: function transServDay(val) {
  20836. return this.transDate(val, 'yyyy-MM-dd');
  20837. },
  20838. isArrayFn: function isArrayFn(value) {
  20839. if (typeof Array.isArray === 'function') {
  20840. return Array.isArray(value);
  20841. } else {
  20842. return Object.prototype.toString.call(value) === '[object Array]';
  20843. }
  20844. },
  20845. transDcMap: function transDcMap(arr) {
  20846. var tMap = {};
  20847. arr.forEach(function (item) {
  20848. tMap[item.value] = item.label;
  20849. });
  20850. return tMap;
  20851. },
  20852. castEval: function castEval(val) {
  20853. // return JSON.parse(val)
  20854. if (val) {
  20855. return eval('(' + val + ')');
  20856. } else {
  20857. return '';
  20858. }
  20859. },
  20860. castString: function castString(val) {
  20861. return JSON.stringify(val);
  20862. },
  20863. // 金额格式化,整数部分每3位用逗号分隔,支持带有正负号以及小数部分
  20864. formatMoney: function formatMoney(amt) {
  20865. if (!amt) return '';
  20866. if (amt.length <= 3) {
  20867. return amt;
  20868. }
  20869. if (!/^(\+|-)?(\d+)(\.\d+)?$/.test(amt)) {
  20870. return amt;
  20871. }
  20872. var a = RegExp.$1;
  20873. var b = RegExp.$2;
  20874. var c = RegExp.$3;
  20875. var re = new RegExp();
  20876. re.compile('(\\d)(\\d{3})(,|$)');
  20877. while (re.test(b)) {
  20878. b = b.replace(re, '$1,$2$3');
  20879. }
  20880. return a + '' + b + '' + c;
  20881. },
  20882. formatDate: function formatDate(fmt, date) {
  20883. // author: meizz
  20884. var o = {
  20885. 'M+': date.getMonth() + 1,
  20886. // 月份
  20887. 'd+': date.getDate(),
  20888. // 日
  20889. 'h+': date.getHours(),
  20890. // 小时
  20891. 'm+': date.getMinutes(),
  20892. // 分
  20893. 's+': date.getSeconds(),
  20894. // 秒
  20895. 'q+': Math.floor((date.getMonth() + 3) / 3),
  20896. // 季度
  20897. 'S': date.getMilliseconds() // 毫秒
  20898. };
  20899. if (/(y+)/.test(fmt)) {
  20900. fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
  20901. }
  20902. for (var k in o) {
  20903. if (new RegExp('(' + k + ')').test(fmt)) {
  20904. fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
  20905. }
  20906. }
  20907. return fmt;
  20908. },
  20909. replaceThumbnail: function replaceThumbnail(urlPath) {
  20910. if (urlPath != null) {
  20911. urlPath = urlPath.replace('/server/FileController/download/', this.$constant.BASE_URI + '/wx/fileController/downloadThumbnail/');
  20912. }
  20913. if (urlPath != null) {
  20914. urlPath = urlPath.replace('/h5Server/FileController/download/', this.$constant.BASE_URI + '/wx/fileController/downloadThumbnail/');
  20915. }
  20916. return urlPath;
  20917. },
  20918. goBack: function goBack() {
  20919. // window.history.go(-1)
  20920. // self.location = document.referrer
  20921. history.back();
  20922. },
  20923. uuid: function uuid(len, radix) {
  20924. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  20925. var uuid = [];
  20926. var i;
  20927. radix = radix || chars.length;
  20928. if (len) {
  20929. // Compact form
  20930. for (i = 0; i < len; i++) {
  20931. uuid[i] = chars[0 | Math.random() * radix];
  20932. }
  20933. } else {
  20934. // rfc4122, version 4 form
  20935. var r;
  20936. // rfc4122 requires these characters
  20937. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  20938. uuid[14] = '4';
  20939. // Fill in random data. At i==19 set the high bits of clock sequence as
  20940. // per rfc4122, sec. 4.1.5
  20941. for (i = 0; i < 36; i++) {
  20942. if (!uuid[i]) {
  20943. r = 0 | Math.random() * 16;
  20944. uuid[i] = chars[i === 19 ? r & 0x3 | 0x8 : r];
  20945. }
  20946. }
  20947. }
  20948. return uuid.join('');
  20949. },
  20950. handleDicList: function handleDicList(params) {
  20951. // 处理字典值数组
  20952. var obj = {};
  20953. for (var key in params) {
  20954. if (JSON.parse(params[key].dictValue)) {
  20955. obj[key] = JSON.parse(params[key].dictValue);
  20956. } else {
  20957. obj[key] = [];
  20958. }
  20959. }
  20960. return obj;
  20961. }
  20962. };
  20963. exports.default = _default;
  20964. /***/ }),
  20965. /* 50 */
  20966. /*!*************************************************************************!*\
  20967. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages/utils/constant.js ***!
  20968. \*************************************************************************/
  20969. /*! no static exports found */
  20970. /***/ (function(module, exports, __webpack_require__) {
  20971. "use strict";
  20972. Object.defineProperty(exports, "__esModule", {
  20973. value: true
  20974. });
  20975. exports.default = exports.BASE_URI = void 0;
  20976. // 系统常量
  20977. var BASE_URI = "https://www.idea-co-sf.com/dockApi"; // 测试
  20978. // export const BASE_URI = "http://192.168.2.107:9011"; // 许峰本地
  20979. // export const BASE_URI = "https://hswkxc.idea-sf.com/gardenApi"; // 正式
  20980. // export const BASE_URI = "http://192.168.3.94:9010"; // 老潘本地
  20981. // export const BASE_URI = "http://192.168.2.107:9011"; // 洮洮本地
  20982. // export const BASE_URI = "http://192.168.2.103:9010"; // 老崔本地
  20983. // export const BASE_URI = "http://192.168.2.106:9011"; // 许峰本地
  20984. // export const BASE_URI = "http://192.168.2.112:9010"; // 陈凡本地
  20985. exports.BASE_URI = BASE_URI;
  20986. var _default = {
  20987. /* 系统常量*/
  20988. // 基础地址
  20989. BASE_URI: BASE_URI
  20990. };
  20991. exports.default = _default;
  20992. /***/ }),
  20993. /* 51 */
  20994. /*!******************************************************************!*\
  20995. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/js_sdk/common.js ***!
  20996. \******************************************************************/
  20997. /*! no static exports found */
  20998. /***/ (function(module, exports, __webpack_require__) {
  20999. "use strict";
  21000. /* WEBPACK VAR INJECTION */(function(uni) {
  21001. Object.defineProperty(exports, "__esModule", {
  21002. value: true
  21003. });
  21004. exports.default = void 0;
  21005. exports.getUrlParameter = getUrlParameter;
  21006. exports.showToast = showToast;
  21007. /**
  21008. * 获取url参数值
  21009. * @param {*} url
  21010. * @param {*} name
  21011. */
  21012. function getUrlParameter(url, name) {
  21013. var regexSearch = '[\\?&#]' + name + '=([^&#]*)';
  21014. var regex = new RegExp(regexSearch);
  21015. var results = regex.exec(url);
  21016. return results ? window.decodeURIComponent(results[1]) : '';
  21017. }
  21018. function showToast(e) {
  21019. uni.showToast({
  21020. title: e,
  21021. icon: 'none',
  21022. mask: true,
  21023. duration: 1000
  21024. });
  21025. }
  21026. var _default = {
  21027. transDate: function transDate(val, pattern) {
  21028. if (val) {
  21029. var time = new Date();
  21030. time.setTime(val);
  21031. if (Date.parse(val)) {
  21032. time = new Date(val);
  21033. }
  21034. if (time instanceof Date) {
  21035. return this.formatDate(pattern || 'yyyy-MM-dd', time);
  21036. }
  21037. }
  21038. return '';
  21039. },
  21040. transBaseDateTime: function transBaseDateTime(val, pattern) {
  21041. if (val) {
  21042. var time = new Date();
  21043. time.setTime(val);
  21044. if (Date.parse(val)) {
  21045. time = new Date(val);
  21046. }
  21047. if (time instanceof Date) {
  21048. return this.formatDate(pattern || 'yyyy年MM月dd日 hh:mm', time);
  21049. }
  21050. }
  21051. return '';
  21052. },
  21053. transBaseToDateTime: function transBaseToDateTime(val, pattern) {
  21054. if (val) {
  21055. var time = new Date();
  21056. time.setTime(val);
  21057. if (Date.parse(val)) {
  21058. time = new Date(val);
  21059. }
  21060. if (time instanceof Date) {
  21061. return this.formatDate(pattern || 'MM月dd日 hh:mm', time);
  21062. }
  21063. }
  21064. return '';
  21065. },
  21066. transServDate: function transServDate(val) {
  21067. return this.transDate(val, 'yyyy-MM-dd hh:mm:ss');
  21068. },
  21069. transServDay: function transServDay(val) {
  21070. return this.transDate(val, 'yyyy-MM-dd');
  21071. },
  21072. isArrayFn: function isArrayFn(value) {
  21073. if (typeof Array.isArray === 'function') {
  21074. return Array.isArray(value);
  21075. } else {
  21076. return Object.prototype.toString.call(value) === '[object Array]';
  21077. }
  21078. },
  21079. transDcMap: function transDcMap(arr) {
  21080. var tMap = {};
  21081. arr.forEach(function (item) {
  21082. tMap[item.value] = item.label;
  21083. });
  21084. return tMap;
  21085. },
  21086. castEval: function castEval(val) {
  21087. // return JSON.parse(val)
  21088. if (val) {
  21089. return eval('(' + val + ')');
  21090. } else {
  21091. return '';
  21092. }
  21093. },
  21094. castString: function castString(val) {
  21095. return JSON.stringify(val);
  21096. },
  21097. // 金额格式化,整数部分每3位用逗号分隔,支持带有正负号以及小数部分
  21098. formatMoney: function formatMoney(amt) {
  21099. if (!amt) return '';
  21100. if (amt.length <= 3) {
  21101. return amt;
  21102. }
  21103. if (!/^(\+|-)?(\d+)(\.\d+)?$/.test(amt)) {
  21104. return amt;
  21105. }
  21106. var a = RegExp.$1;
  21107. var b = RegExp.$2;
  21108. var c = RegExp.$3;
  21109. var re = new RegExp();
  21110. re.compile('(\\d)(\\d{3})(,|$)');
  21111. while (re.test(b)) {
  21112. b = b.replace(re, '$1,$2$3');
  21113. }
  21114. return a + '' + b + '' + c;
  21115. },
  21116. formatDate: function formatDate(fmt, date) {
  21117. // author: meizz
  21118. var o = {
  21119. 'M+': date.getMonth() + 1,
  21120. // 月份
  21121. 'd+': date.getDate(),
  21122. // 日
  21123. 'h+': date.getHours(),
  21124. // 小时
  21125. 'm+': date.getMinutes(),
  21126. // 分
  21127. 's+': date.getSeconds(),
  21128. // 秒
  21129. 'q+': Math.floor((date.getMonth() + 3) / 3),
  21130. // 季度
  21131. 'S': date.getMilliseconds() // 毫秒
  21132. };
  21133. if (/(y+)/.test(fmt)) {
  21134. fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
  21135. }
  21136. for (var k in o) {
  21137. if (new RegExp('(' + k + ')').test(fmt)) {
  21138. fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
  21139. }
  21140. }
  21141. return fmt;
  21142. },
  21143. replaceThumbnail: function replaceThumbnail(urlPath) {
  21144. if (urlPath != null) {
  21145. urlPath = urlPath.replace('/server/FileController/download/', this.$constant.BASE_URI + '/wx/fileController/downloadThumbnail/');
  21146. }
  21147. if (urlPath != null) {
  21148. urlPath = urlPath.replace('/h5Server/FileController/download/', this.$constant.BASE_URI + '/wx/fileController/downloadThumbnail/');
  21149. }
  21150. return urlPath;
  21151. },
  21152. goBack: function goBack() {
  21153. // window.history.go(-1)
  21154. // self.location = document.referrer
  21155. history.back();
  21156. },
  21157. uuid: function uuid(len, radix) {
  21158. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  21159. var uuid = [];
  21160. var i;
  21161. radix = radix || chars.length;
  21162. if (len) {
  21163. // Compact form
  21164. for (i = 0; i < len; i++) {
  21165. uuid[i] = chars[0 | Math.random() * radix];
  21166. }
  21167. } else {
  21168. // rfc4122, version 4 form
  21169. var r;
  21170. // rfc4122 requires these characters
  21171. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  21172. uuid[14] = '4';
  21173. // Fill in random data. At i==19 set the high bits of clock sequence as
  21174. // per rfc4122, sec. 4.1.5
  21175. for (i = 0; i < 36; i++) {
  21176. if (!uuid[i]) {
  21177. r = 0 | Math.random() * 16;
  21178. uuid[i] = chars[i === 19 ? r & 0x3 | 0x8 : r];
  21179. }
  21180. }
  21181. }
  21182. return uuid.join('');
  21183. }
  21184. };
  21185. exports.default = _default;
  21186. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  21187. /***/ }),
  21188. /* 52 */
  21189. /*!****************************************************************!*\
  21190. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/js_sdk/auth.js ***!
  21191. \****************************************************************/
  21192. /*! no static exports found */
  21193. /***/ (function(module, exports, __webpack_require__) {
  21194. "use strict";
  21195. /* WEBPACK VAR INJECTION */(function(uni) {
  21196. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21197. Object.defineProperty(exports, "__esModule", {
  21198. value: true
  21199. });
  21200. exports.default = void 0;
  21201. var _common = _interopRequireDefault(__webpack_require__(/*! ./common.js */ 51));
  21202. var _default = {
  21203. TYPE_FRAME: 'FRAME',
  21204. TYPE_BIZ: 'BIZ',
  21205. TYPE_USER: 'USER',
  21206. TYPE_PERSON_BIZ: 'BIZ_PERSON',
  21207. // ------------------------------ User -----------------------------------
  21208. uid: function uid() {
  21209. return this.currUser() ? this.currUser().id : null;
  21210. },
  21211. setUser: function setUser(value) {
  21212. uni.setStorage({
  21213. key: 'laocui_user_token',
  21214. data: value,
  21215. success: function success() {}
  21216. });
  21217. },
  21218. setUserInfo: function setUserInfo(value) {
  21219. uni.setStorage({
  21220. key: 'laocui_user_info',
  21221. data: JSON.stringify(value),
  21222. success: function success() {}
  21223. });
  21224. },
  21225. currUser: function currUser() {
  21226. return _common.default.castEval(localStorage.getItem(this.userKey()) || '');
  21227. },
  21228. removeUser: function removeUser() {
  21229. uni.removeStorage(this.userKey());
  21230. },
  21231. // ------------------------------ Biz -----------------------------------
  21232. bid: function bid() {
  21233. return this.currBiz() ? this.currBiz().id : null;
  21234. },
  21235. setBiz: function setBiz(value) {
  21236. sessionStorage.setItem(this.bizKey(), JSON.stringify(value));
  21237. },
  21238. removeBiz: function removeBiz() {
  21239. sessionStorage.removeItem(this.bizKey());
  21240. },
  21241. currBiz: function currBiz() {
  21242. return _common.default.castEval(sessionStorage.getItem(this.bizKey()) || null);
  21243. },
  21244. // ------------------------------ Token -----------------------------------
  21245. setToken: function setToken(token) {
  21246. localStorage.setItem(this.tokenKey(), token);
  21247. },
  21248. getToken: function getToken() {
  21249. return localStorage.getItem(this.tokenKey()) || null;
  21250. },
  21251. removeToken: function removeToken() {
  21252. localStorage.removeItem(this.tokenKey());
  21253. },
  21254. // ------------------------------ key -----------------------------------
  21255. // bizKey: function() {
  21256. // const key = this.hashCode(window.location.host + '_biz_' + this.getUserType())
  21257. // return key
  21258. // },
  21259. //
  21260. // userKey: function() {
  21261. // const key = this.hashCode(window.location.host + '_user_' + this.getUserType())
  21262. // return key
  21263. // },
  21264. //
  21265. // tokenKey: function() {
  21266. // const key = this.hashCode(window.location.host + '_token_' + this.getUserType())
  21267. // return key
  21268. // },
  21269. // Frame
  21270. setLoginInfo: function setLoginInfo(value) {
  21271. localStorage.setItem('KEY_ADMIN_USER_LOGIN_INFO', JSON.stringify(value));
  21272. },
  21273. getLoginInfo: function getLoginInfo() {
  21274. return _common.default.castEval(localStorage.getItem('KEY_ADMIN_USER_LOGIN_INFO') || null);
  21275. },
  21276. removeLoginInfo: function removeLoginInfo() {
  21277. localStorage.removeItem('KEY_ADMIN_USER_LOGIN_INFO');
  21278. },
  21279. // Biz
  21280. setBizLoginInfo: function setBizLoginInfo(value) {
  21281. localStorage.setItem('KEY_BIZ_USER_LOGIN_INFO', JSON.stringify(value));
  21282. },
  21283. getBizLoginInfo: function getBizLoginInfo() {
  21284. return _common.default.castEval(localStorage.getItem('KEY_BIZ_USER_LOGIN_INFO') || null);
  21285. },
  21286. removeBizLoginInfo: function removeBizLoginInfo() {
  21287. localStorage.removeItem('KEY_BIZ_USER_LOGIN_INFO');
  21288. },
  21289. setUserType: function setUserType(value) {
  21290. localStorage.setItem('KEY_USER_TYPE', value);
  21291. },
  21292. getUserType: function getUserType() {
  21293. return localStorage.getItem('KEY_USER_TYPE') || 'TYPE_FRAME';
  21294. },
  21295. hashCode: function hashCode(str) {
  21296. var hash = 0;
  21297. if (str.length === 0) return hash;
  21298. for (var i = 0; i < str.length; i++) {
  21299. var char = str.charCodeAt(i);
  21300. hash = (hash << 5) - hash + char;
  21301. hash = hash & hash; // Convert to 32bit integer
  21302. }
  21303. return hash;
  21304. },
  21305. /*
  21306. 定时缓存
  21307. */
  21308. setTimingLocalStorage: function setTimingLocalStorage(key, value, ttl_ms) {
  21309. var data = {
  21310. value: value,
  21311. expirse: new Date(ttl_ms).getTime()
  21312. };
  21313. localStorage.setItem(key, JSON.stringify(data));
  21314. },
  21315. getTimingLocalStorage: function getTimingLocalStorage(key) {
  21316. var data = JSON.parse(localStorage.getItem(key));
  21317. if (data !== null) {
  21318. if (data.expirse == null || data.expirse != null && data.expirse < new Date().getTime()) {
  21319. localStorage.removeItem(key);
  21320. } else {
  21321. return JSON.parse(data.value);
  21322. }
  21323. }
  21324. return null;
  21325. }
  21326. };
  21327. exports.default = _default;
  21328. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  21329. /***/ }),
  21330. /* 53 */
  21331. /*!*********************************************************************************!*\
  21332. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/js_sdk/request/requestConfig.js ***!
  21333. \*********************************************************************************/
  21334. /*! no static exports found */
  21335. /***/ (function(module, exports, __webpack_require__) {
  21336. "use strict";
  21337. /* WEBPACK VAR INJECTION */(function(uni) {
  21338. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21339. Object.defineProperty(exports, "__esModule", {
  21340. value: true
  21341. });
  21342. exports.default = void 0;
  21343. var _request = _interopRequireDefault(__webpack_require__(/*! ./request */ 54));
  21344. var _config = _interopRequireDefault(__webpack_require__(/*! config */ 55));
  21345. // import store from "../../store/index.js";
  21346. uni.getStorage({
  21347. key: 'storage_key',
  21348. success: function success(res) {
  21349. console.log(res.data);
  21350. }
  21351. });
  21352. //可以new多个request来支持多个域名请求
  21353. var $http = new _request.default({
  21354. //接口请求地址
  21355. baseUrl: _config.default.baseUrl,
  21356. //服务器本地上传文件地址
  21357. fileUrl: _config.default.baseUrl,
  21358. //设置请求头
  21359. headers: {
  21360. 'Content-Type': 'application/x-www-form-urlencoded;',
  21361. 'ApiVersion': _config.default.version,
  21362. 'Device': _config.default.device,
  21363. 'Platform': _config.default.platform,
  21364. "Authorization": 'Bearer ' + uni.getStorageSync('laocui_user_token')
  21365. },
  21366. //以下是默认值可不写
  21367. //是否提示--默认提示
  21368. isPrompt: true,
  21369. //是否显示请求动画
  21370. load: true,
  21371. //是否使用处理数据模板
  21372. isFactory: true,
  21373. //列表接口是否有加载判断
  21374. loadMore: true
  21375. });
  21376. //当前接口请求数
  21377. var requestNum = 0;
  21378. //请求开始拦截器
  21379. $http.requestStart = function (options) {
  21380. if (requestNum <= 0) {
  21381. uni.showNavigationBarLoading();
  21382. if (options.load) {
  21383. //打开加载动画
  21384. uni.showLoading({
  21385. title: '加载中',
  21386. mask: true
  21387. });
  21388. }
  21389. }
  21390. requestNum += 1;
  21391. //请求前加入token
  21392. options.headers['Authorization'] = 'Bearer ' + uni.getStorageSync('laocui_user_token');
  21393. // console.log("请求开始前", options);
  21394. return options;
  21395. };
  21396. //请求结束
  21397. $http.requestEnd = function (options, resolve) {
  21398. //判断当前接口是否需要加载动画
  21399. requestNum = requestNum - 1;
  21400. if (requestNum <= 0) {
  21401. uni.hideLoading();
  21402. uni.hideNavigationBarLoading();
  21403. }
  21404. if (resolve.errMsg && (resolve.errMsg != "request:ok" || resolve.statusCode && resolve.statusCode != 200)) {
  21405. uni.showToast({
  21406. title: "网络错误,请检查一下网络",
  21407. mask: true,
  21408. icon: "none"
  21409. });
  21410. }
  21411. };
  21412. //登录弹窗次数
  21413. var loginPopupNum = 0;
  21414. //所有接口数据处理(可在接口里设置不调用此方法)
  21415. $http.dataFactory = function (options, resolve) {
  21416. //设置回调默认值
  21417. var callback = {
  21418. //success数据是否请求成功状态
  21419. success: false,
  21420. //这里返回的数据就是调用请求方法收到的数据
  21421. result: ""
  21422. };
  21423. // 特殊接口处理 接口报请先登录 跳转登录
  21424. if (resolve.data.code === 101) {
  21425. uni.showModal({
  21426. title: '提示',
  21427. content: resolve.data.msg,
  21428. showCancel: false,
  21429. success: function success() {
  21430. uni.setStorageSync('token', null);
  21431. uni.navigateTo({
  21432. url: '/pages/login/login'
  21433. });
  21434. }
  21435. });
  21436. return false;
  21437. }
  21438. //判断数据是否请求成功
  21439. if (resolve.data.errmsg == "成功") {
  21440. callback.success = true;
  21441. callback.result = resolve.data;
  21442. } else if (resolve.data.errno == 303) {
  21443. uni.redirectTo({
  21444. url: '/pages/login/login'
  21445. });
  21446. this.$showToast('令牌过期,请重新登陆');
  21447. } else {
  21448. uni.showToast({
  21449. title: resolve.data.errmsg,
  21450. icon: "none",
  21451. mask: true,
  21452. duration: 2000
  21453. });
  21454. //设置可以提示的时候
  21455. // if (options.isPrompt) {
  21456. // setTimeout(function () {
  21457. //提示后台接口抛出的错误信息
  21458. // uni.showToast({
  21459. // title: resolve.data.msg,
  21460. // icon: "none",
  21461. // duration: 3000
  21462. // });
  21463. // }, 500);
  21464. // }
  21465. callback.result = resolve.data;
  21466. }
  21467. uni.stopPullDownRefresh();
  21468. return callback;
  21469. };
  21470. var _default = $http;
  21471. exports.default = _default;
  21472. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  21473. /***/ }),
  21474. /* 54 */
  21475. /*!***************************************************************************!*\
  21476. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/js_sdk/request/request.js ***!
  21477. \***************************************************************************/
  21478. /*! no static exports found */
  21479. /***/ (function(module, exports, __webpack_require__) {
  21480. "use strict";
  21481. /* WEBPACK VAR INJECTION */(function(uni) {
  21482. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21483. Object.defineProperty(exports, "__esModule", {
  21484. value: true
  21485. });
  21486. exports.default = void 0;
  21487. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  21488. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  21489. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  21490. var request = /*#__PURE__*/function () {
  21491. function request(options) {
  21492. (0, _classCallCheck2.default)(this, request);
  21493. //请求公共地址
  21494. this.baseUrl = options.baseUrl || "";
  21495. //公共文件上传请求地址
  21496. this.fileUrl = options.fileUrl || "";
  21497. //默认请求头
  21498. this.headers = options.headers || {};
  21499. //默认配置
  21500. this.config = {
  21501. isPrompt: options.isPrompt === false ? false : true,
  21502. load: options.load === false ? false : true,
  21503. isFactory: options.isFactory === false ? false : true,
  21504. loadMore: options.loadMore === false ? false : true
  21505. };
  21506. }
  21507. // 获取默认信息
  21508. (0, _createClass2.default)(request, [{
  21509. key: "getDefault",
  21510. value: function getDefault(url, options, type) {
  21511. //判断url是不是链接
  21512. var urlType = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~/])+$/.test(url);
  21513. var httpUrl;
  21514. if (type == "file") {
  21515. httpUrl = urlType ? url : this.fileUrl + url;
  21516. } else {
  21517. httpUrl = urlType ? url : this.baseUrl + url;
  21518. }
  21519. var config = Object.assign({}, this.config, options);
  21520. //请求地址
  21521. config.httpUrl = httpUrl;
  21522. //请求头
  21523. config.headers = Object.assign(this.headers, options.headers);
  21524. return config;
  21525. }
  21526. //post请求
  21527. }, {
  21528. key: "post",
  21529. value: function post() {
  21530. var _this2 = this;
  21531. var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  21532. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  21533. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  21534. var requestInfo = this.getDefault(url, options, "data");
  21535. requestInfo.data = data;
  21536. return new Promise(function (resolve, reject) {
  21537. _this2.getRequest("POST", requestInfo, function (state, response) {
  21538. //是否用外部的数据处理方法
  21539. if (state && requestInfo.isFactory && _this2.dataFactory) {
  21540. //数据处理
  21541. var factoryInfo = _this2.dataFactory(requestInfo, response);
  21542. // console.log(factoryInfo)
  21543. return resolve(factoryInfo.result);
  21544. // factoryInfo.success ? resolve(factoryInfo.result) : reject(factoryInfo.result);
  21545. } else {
  21546. // console.log(response, response)
  21547. state ? resolve(response) : reject(response);
  21548. }
  21549. });
  21550. });
  21551. }
  21552. //get请求
  21553. }, {
  21554. key: "get",
  21555. value: function get() {
  21556. var _this3 = this;
  21557. var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  21558. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  21559. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  21560. var requestInfo = this.getDefault(url, options, "data");
  21561. requestInfo.data = data;
  21562. return new Promise(function (resolve, reject) {
  21563. _this3.getRequest("GET", requestInfo, function (state, response) {
  21564. //是否用外部的数据处理方法
  21565. if (state && requestInfo.isFactory && _this3.dataFactory) {
  21566. //数据处理
  21567. var factoryInfo = _this3.dataFactory(requestInfo, response);
  21568. factoryInfo.success ? resolve(factoryInfo.result) : reject(factoryInfo.result);
  21569. } else {
  21570. state ? resolve(response) : reject(response);
  21571. }
  21572. });
  21573. });
  21574. }
  21575. //put请求
  21576. }, {
  21577. key: "put",
  21578. value: function put() {
  21579. var _this4 = this;
  21580. var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  21581. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  21582. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  21583. var requestInfo = this.getDefault(url, options, "data");
  21584. requestInfo.data = data;
  21585. return new Promise(function (resolve, reject) {
  21586. _this4.getRequest("PUT", requestInfo, function (state, response) {
  21587. //是否用外部的数据处理方法
  21588. if (state && requestInfo.isFactory && _this4.dataFactory) {
  21589. //数据处理
  21590. var factoryInfo = _this4.dataFactory(requestInfo, response);
  21591. factoryInfo.success ? resolve(factoryInfo.result) : reject(factoryInfo.result);
  21592. } else {
  21593. state ? resolve(response) : reject(response);
  21594. }
  21595. });
  21596. });
  21597. }
  21598. //delete请求
  21599. }, {
  21600. key: "delete",
  21601. value: function _delete() {
  21602. var _this5 = this;
  21603. var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  21604. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  21605. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  21606. var requestInfo = this.getDefault(url, options, "data");
  21607. requestInfo.data = data;
  21608. return new Promise(function (resolve, reject) {
  21609. _this5.getRequest("DELETE", requestInfo, function (state, response) {
  21610. //是否用外部的数据处理方法
  21611. if (state && requestInfo.isFactory && _this5.dataFactory) {
  21612. //数据处理
  21613. var factoryInfo = _this5.dataFactory(requestInfo, response);
  21614. factoryInfo.success ? resolve(factoryInfo.result) : reject(factoryInfo.result);
  21615. } else {
  21616. state ? resolve(response) : reject(response);
  21617. }
  21618. });
  21619. });
  21620. }
  21621. //接口请求方法
  21622. }, {
  21623. key: "getRequest",
  21624. value: function getRequest(ajaxType, options, callback) {
  21625. var _this6 = this;
  21626. //请求前回调
  21627. if (this.requestStart) {
  21628. options.method = ajaxType;
  21629. var requestStart = this.requestStart(options);
  21630. if ((0, _typeof2.default)(requestStart) == "object") {
  21631. options.data = requestStart.data;
  21632. options.headers = requestStart.headers;
  21633. options.isPrompt = requestStart.isPrompt;
  21634. options.load = requestStart.load;
  21635. options.isFactory = requestStart.isFactory;
  21636. } else {
  21637. callback(false, "请求开始拦截器未通过");
  21638. return;
  21639. }
  21640. }
  21641. // console.log(options.data)
  21642. uni.request({
  21643. url: options.httpUrl,
  21644. data: options.data,
  21645. method: ajaxType,
  21646. //请求类型
  21647. header: options.headers,
  21648. //加入请求头
  21649. success: function success(res) {
  21650. // ;
  21651. //请求完成回调
  21652. _this6.requestEnd && _this6.requestEnd(options, res);
  21653. callback(true, res);
  21654. },
  21655. fail: function fail(err) {
  21656. // console.log(err);
  21657. //请求完成回调
  21658. _this6.requestEnd && _this6.requestEnd(options, err);
  21659. callback(false, err);
  21660. }
  21661. });
  21662. }
  21663. //jsonp请求(只限于H5使用)
  21664. }, {
  21665. key: "jsonp",
  21666. value: function jsonp() {
  21667. var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  21668. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  21669. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  21670. var requestInfo = this.getDefault(url, options, "data");
  21671. var dataStr = '';
  21672. Object.keys(data).forEach(function (key) {
  21673. dataStr += key + '=' + data[key] + '&';
  21674. });
  21675. //匹配最后一个&并去除
  21676. if (dataStr !== '') {
  21677. dataStr = dataStr.substr(0, dataStr.lastIndexOf('&'));
  21678. }
  21679. requestInfo.httpUrl = requestInfo.httpUrl + '?' + dataStr;
  21680. var _this = this;
  21681. return new Promise(function (resolve, reject) {
  21682. var callbackName = "callback" + Math.ceil(Math.random() * 1000000);
  21683. if (_this.requestStart) {
  21684. requestInfo.data = data;
  21685. var requestStart = _this.requestStart(requestInfo);
  21686. if ((0, _typeof2.default)(requestStart) == "object") {
  21687. requestInfo.data = requestStart.data;
  21688. requestInfo.headers = requestStart.headers;
  21689. requestInfo.isPrompt = requestStart.isPrompt;
  21690. requestInfo.load = requestStart.load;
  21691. requestInfo.isFactory = requestStart.isFactory;
  21692. } else {
  21693. reject("请求开始拦截器未通过");
  21694. return;
  21695. }
  21696. }
  21697. window[callbackName] = function (data) {
  21698. resolve(data);
  21699. };
  21700. var script = document.createElement("script");
  21701. script.src = requestInfo.httpUrl + "&callback=" + callbackName;
  21702. document.head.appendChild(script);
  21703. // 及时删除,防止加载过多的JS
  21704. document.head.removeChild(script);
  21705. //请求完成回调
  21706. _this.requestEnd && _this.requestEnd(requestInfo, {});
  21707. });
  21708. }
  21709. //本地服务器图片上传
  21710. }, {
  21711. key: "urlImgUpload",
  21712. value: function urlImgUpload() {
  21713. var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  21714. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  21715. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  21716. var requestInfo = this.getDefault(url, options, "file");
  21717. requestInfo.data = data;
  21718. var _this = this;
  21719. return new Promise(function (resolve, reject) {
  21720. uni.chooseImage({
  21721. count: data.count || 9,
  21722. //默认9
  21723. sizeType: data.sizeType || ['original', 'compressed'],
  21724. //可以指定是原图还是压缩图,默认二者都有
  21725. sourceType: data.sourceType || ['album', 'camera'],
  21726. //从相册选择
  21727. success: function success(res) {
  21728. _this.urlFileUpload(requestInfo, res.tempFiles, function (state, response) {
  21729. state ? resolve(response) : reject(response);
  21730. });
  21731. }
  21732. });
  21733. });
  21734. }
  21735. //本地服务器文件上传方法
  21736. }, {
  21737. key: "urlFileUpload",
  21738. value: function urlFileUpload(options, files, callback) {
  21739. var _this = this;
  21740. //请求前回调
  21741. if (this.requestStart) {
  21742. options.method = "FILE";
  21743. var requestStart = this.requestStart(options);
  21744. if ((0, _typeof2.default)(requestStart) == "object") {
  21745. if ((0, _typeof2.default)(requestStart) == "object") {
  21746. options.data = requestStart.data;
  21747. options.headers = requestStart.headers;
  21748. options.isPrompt = requestStart.isPrompt;
  21749. options.load = requestStart.load;
  21750. options.isFactory = requestStart.isFactory;
  21751. } else {
  21752. callback(false, "请求开始拦截器未通过");
  21753. return;
  21754. }
  21755. }
  21756. }
  21757. var len = files.length - 1;
  21758. var fileList = new Array();
  21759. fileUpload(0);
  21760. function fileUpload(i) {
  21761. var config = {
  21762. url: options.httpUrl,
  21763. filePath: files[i].path,
  21764. header: options.headers,
  21765. //加入请求头
  21766. name: options.name || "file",
  21767. success: function success(response) {
  21768. response.data = JSON.parse(response.data);
  21769. //请求完成回调
  21770. _this.requestEnd && _this.requestEnd(options, response);
  21771. //是否用外部的数据处理方法
  21772. if (options.isFactory && _this.dataFactory) {
  21773. //数据处理
  21774. var factoryInfo = _this.dataFactory(options, response);
  21775. if (factoryInfo.success) {
  21776. fileList.push(factoryInfo.result);
  21777. if (len <= i) {
  21778. callback(true, fileList);
  21779. } else {
  21780. fileUpload(i + 1);
  21781. }
  21782. } else {
  21783. callback(false, factoryInfo.result);
  21784. }
  21785. } else {
  21786. fileList.push(response.data);
  21787. if (len <= i) {
  21788. callback(true, fileList);
  21789. } else {
  21790. fileUpload(i + 1);
  21791. }
  21792. }
  21793. },
  21794. fail: function fail(err) {
  21795. //请求完成回调
  21796. _this.requestEnd && _this.requestEnd(options, err);
  21797. callback(false, err);
  21798. }
  21799. };
  21800. if (options.data) {
  21801. config.formData = options.data;
  21802. }
  21803. uni.uploadFile(config);
  21804. }
  21805. }
  21806. }]);
  21807. return request;
  21808. }();
  21809. exports.default = request;
  21810. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  21811. /***/ }),
  21812. /* 55 */
  21813. /*!***********************************************************!*\
  21814. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/config.js ***!
  21815. \***********************************************************/
  21816. /*! no static exports found */
  21817. /***/ (function(module, exports, __webpack_require__) {
  21818. "use strict";
  21819. /* WEBPACK VAR INJECTION */(function(uni) {
  21820. Object.defineProperty(exports, "__esModule", {
  21821. value: true
  21822. });
  21823. exports.default = void 0;
  21824. var _constant = __webpack_require__(/*! ./pages/utils/constant.js */ 50);
  21825. // console.log(BASE_URI)
  21826. var baseUrl = _constant.BASE_URI;
  21827. var device, platform;
  21828. device = uni.getSystemInfoSync().brand + ' ' + uni.getSystemInfoSync().model;
  21829. platform = 'wxmini';
  21830. // app版本
  21831. var version = "1.0";
  21832. // 高德地图 key
  21833. var key = "53ea64b17287b1f7323e9f29870af813";
  21834. var _default = {
  21835. device: device,
  21836. version: version,
  21837. platform: platform,
  21838. key: key,
  21839. baseUrl: baseUrl
  21840. };
  21841. exports.default = _default;
  21842. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  21843. /***/ }),
  21844. /* 56 */,
  21845. /* 57 */,
  21846. /* 58 */,
  21847. /* 59 */,
  21848. /* 60 */
  21849. /*!*********************************************************************************!*\
  21850. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/common/assets/image/logobig.png ***!
  21851. \*********************************************************************************/
  21852. /*! no static exports found */
  21853. /***/ (function(module, exports, __webpack_require__) {
  21854. module.exports = __webpack_require__.p + "assets/logobig.5f60e82f.png";
  21855. /***/ }),
  21856. /* 61 */
  21857. /*!*****************************************************************************!*\
  21858. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages/chooseIdentity/sj.png ***!
  21859. \*****************************************************************************/
  21860. /*! no static exports found */
  21861. /***/ (function(module, exports) {
  21862. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAACl9JREFUWEetWW1QVOcVft67u9zdZYFdYReMRDAIqPGLEUo00QiYCEYTbTQ/2thMmjhpqp026TSNnbFDzY+o+dE/iYmjYz5ME9uEpJNaFu2wKMaIihJFEQU0fhDZXUD2++vufTvvXRd3BXbv2p6ZnQv3nvOc5z33/TjnXIL/QVpabDoEyVIaxmJwdC4opgPIBSE6BkspdRHABuAKJegAIce4NNpSVWVy369bch+GxGK21VFCNhDQWoCoU8OgfkphJsCe1hM7m+rr68VU7FMhTFoah56lnPgWgBmpOJlIl1J0AbS+ps70JXshcjBlEW5psk2nlOwGwVI5oKnqUKBFydFXHn/S1JPMNinh5qbB9aDiB4QQbSIwx/BNXL/8HVwjA1BrsjC1ZCFyJpck8z/6nIJ6APpqTW3uvkRGExKur6/nllRu3AaCPyQCcI3cQsfRfejvOzVGrXjucswsfxpD1j5odTnIzisCIVyyQexobXtv80Rze1zCEtlHNu0G6C8ToV/pOox2y26EhWAyEtJzfU4BHln+GxiMBUn0yd7Wtnc3jEd6XMKWJvt2AG8kQj3f9gU62/4hi2isklKlxuPPbIYpf1ZiW4p3quuMYziMIczmLAH9JBHa5e/NOH14b8pkowYqPh21P9sOXVZuQgwK8Rf3zuk4wkcO2YoFER0EJH0iJFt/Fyxf/gWUprR9joFjC3LZurdAuInnNKXUyxHMq6o19UYBYgmT5iZ7MwGqJiIrhAJo3Pc6PE52eEUkGBJw2+mEPxiCguOQka5FZroWhCTdgLBg6UsomV+bbGocrq4zVkf36VHUZrNtHSEk4aTsOXdIWmRREYQwfrQPQqTxe366Ro0cfZZEOhAMwePzQ6vmoebT4sjxmgys3rAbHKdISJqIdF3VCulwgUSY7QqLKzd2EoKEK6Hdsgc95w6Ogg+OOOD1B/DYwgUoKS6U7t/st+Lc+W543V7wKhUcHi/C4TBCgoDcbAM0PB9HjhHWpOuTrYfu6loj40YlwhazbQUI+Xcyq47WT9B95l+jat5gEFs2b0RpyUNjTC/3XJXuFU8vhCiKOHW6Ex9+0gAxGIqbLs9t+hsUyvjIj8uD0qeq60yNEuFms+0rQsiaZIQvdTTizJEPJTVKKTZuegHz585MZjb63O32YtuO92GzDkr32C6x6sV3ZdlT4J81tcY1hKWINAC7nKxr4HonWr7aKjnIyzVi69bXZTmLVTp9phO7dn0m3SoofQyL6n4rE4P6CQ8jaT5oX0UovpFjFQx40PD+i9KCff7na2AwZKL7Uh+8Hh80Wg2mFeajomLeKFR7+zn0XbkOvz+AjIx0zJ0zA0VFBdi8eQeGb4/gJ0+8iqKH2QYgTwjBKtLcZNtGQP4ozwQ4tP9N6NL8eO21l3DixPeYPbsE6ela+Hx+OJ1uTJv24CjU1as3kJWVAbWah8PpwsWuXlRVLcTHHzWg7WQHVr24E9qMbLmuARE7WDJ+EIQ8Kdeq7/R+lM1QY0H5bMnE6fHju7N9qKooBa9SSvfCwQBuX7qA7NllCAQFWNovobq8FGpeJT3/sd+KTz9vRsVTf5br9o4ebWKEe0AIK20SShoXQGnWJVy4cB6FRQ+goDBf0t/V0Ip9jSfx++eXYU3VfOme++Y1KNQaaHJM+LTxBD5oOIpXnl2M9Ssqpedswf79czOW1yzGLe9kWP15ydxHnlPaS5rNdgchyExmka+9geKsXgzYR6A2FkCvj5g0NJ/BXz+z4O1Nq7G4LDJu36AVgs+HjAcLceh4F7buacSWl1dg+cK723zv+U5Mz9fDH+Zx3LYomfsoYRexNNlZUpD0HJ2ivYmSrB4pOsicDKJQAWLE9LbHB0PG3fxeFAQMXzyLnDkLJEdDDg+yM7UsQgA7sgkBddlAwgH4BB5tdpmE2cEhl7BW6UGl8WRkpDoTIHJAOBz5n81dZWT+UmkQwGDnaRjnVUQjAwSCdwmzI9plBcQQbnnz0O2QvZdTYjHbnSDIkPNOZus7YdQMAtpsIByTZbGoqSNHbsjjhqOvG9rJ+dAa78xNQQBCwl0XbIAeG8IiRbu9HN7whMlhHC1KqVP2omOWShLCw4YLMOgpCE2LRIyJggPSEhyvLOoswlHh0xAasePiSCmGAjlyYhV9U73E0mQzAyRJjhePWZAzjIdyhiJRY9FVKqSrZ8AOwecHFQQQpRJKNQ/ekCVdpekTFqXBiZwCR7qL5CydeMeUHmJzOGk5dG8IdOoAygtvSFyjwhZa5859oEotsmbNQcjpwNCp4yh6ZhlM5XPjIGzOdFzonyw/snc0Keh20nLQvpJS3E3BZMKU5NkwxeAco+28eh3umwNQqHkYSouQlil1rUYlLBKcujIVvlDkEElFKMHTKSU/seAcEVFW0I9MTSAVn7j4owkDjqTb/jiYd5If9qS5yf41AVan5JntZoow5k3tR4ZaXpl/1T4JPwxOStWNpE8p/bqmzvTTlBL48TzxigAWTfkeSE+QxFARfpcPx/vvZnIps45N4NlytTTZu+6nyZdGfHhU/QWgNQC6PEAV28wkgOAHgh6Ewhy+tS5OmWckuug6euK9OayxMrrOWxptaylHvkgVUU3cWKj+aqwZUQB8BsDrIkcxJTg8cH+9RErpczV1JolbXJlvMdstqXYotcSBSu2BCBSrfjkVoNIASj6yR8fIkVtLICJxhXzvyCloS02tqWZMmc8UWVtVpDibrFMZC6pTulBhbJf1Yo5ZFyEoxlfNiQxZR1PJoSy2DTtOq8q6noBL2KqKdZKhcqI857Qswm22SvjCCbu2cThJW1VRbctB+w7QxG1WpnvtRh8a//MRNj83E2XFiU+ukxf78ae9bagsX46qR1dAoUgyNUTsqF5hHFO6JWi3/no3QOLarS63A/0D13Dl2mX80H8ZnV1nEQj4pXEumVeA3619ZAzxYacP7+w/hv2W85KeUqmEQW9AQf50TJtajPy8ApiMDyDHYIJCEUlRAbq3tW2n/HYrM2HdoMm5S99uP3fsjaFhK+zDVvgDXgiCAJ8vUgWPjDgkAqwAjUp56QN4Yfk8zC3KxYHjPfjgm3a4vJHTkEWV4zhotRoolQqwPgXDYS0t1q4yZGZj9oyKd3TagTdTamjHTqTyx1atB0ffZx1NUaRwudzIzNRJThwOJ0IhQaqKY0kze57nIQghhFmGdkeYHiv59fosqFRKBINBsP4cGwDrVIKKv2r/tvH+PhnEkp6/ZGWxEmSX2+Wu0mgi0WHCyvpAIACOI+B5NXw+H3g+LdIEDAQlPfYLhcLSld1jJZbBoB/FcLs94NPSDnOEbjhz/OBoW3WiVZy0losxJLMWPLE2Xauux52mocfjhdfrk1TYq2ZkWQQZKUaQRTf6N9Nh0WQyaZIBCgUHCtodpuEtHUfNDf/Xz173jJYrX7KylgAve32BOo/bM+6HRVZVM/LsFycU/uwcfRPhuN3trQfMcolGMVKJ8Ji3ZJy1VKcR/VWgeJQjpIwCDxHARBGpEQngpoAVQC+h5JxI6FEf5zhs7+q670+3/wVUuSN+R4aMeAAAAABJRU5ErkJggg=="
  21863. /***/ }),
  21864. /* 62 */
  21865. /*!*****************************************************************************!*\
  21866. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages/chooseIdentity/qy.png ***!
  21867. \*****************************************************************************/
  21868. /*! no static exports found */
  21869. /***/ (function(module, exports) {
  21870. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAABa9JREFUWEfFmU1sVFUUgL/zoFChpUNTZkoQiLWloAJhoS5QU8QoP2L4T1zgwtgARqMuRF1oalwosAATIzWoC12YaPmJRqgapNG4ICwQlPJXIaAJzBRkpoUKbXlH75sOM533pu/NTIW7e+/dc+73zj333nPOFYpoGtOybqHBtnlYYBZKrQoRgTKjVqFblBjCaYVDlvJLucV+CcuVQoeV/AVVEjEWqtIoygKE0rx0KNdU2CvCx1s+pLWpSex85PMAVonHWCE27yBMz2eQnH2VdrVoCoVpAdEgOgMBJ2JaqzbbRWgIojTfPqrsF4u1FWE55SfrC5yI6hpVmkUY46esmO+qXBVhfUVEPh9KT07gpia1Xl7PewKvFgOSr6zCpq3beCOXb3sCO7DrHBd4Nt8Bh6O/Kp9ubabRC9oTOB7VjQIbMgdXhUvH4PJJ6P+neKyRd0BlPVROB/GgUNgcisggBjOqq6vxWeCzbCQDG/u1eNBsDRNmQ9U9OfU+k+3Tg4ATMa1T5ZDA2GwVp3YPj2Wz9RpL1y31BlalRyxmV4SlI9UjA1glfoF9IszzEj/2hftt2SQYXwdigd0Lnb/D9Xi638TKTdxZ9RaWdR3bLuWvi29z/m/XLDPj6dwzp0pbqJpHU/v0TeB4TFeJ8mUu0WxgAzltBVgj0xI9F+HsD+nn+6eVOrCpZqAPnnQvgKGAjawKq0Jhabnpw2ZXeGUdvyHk9KZsYKsE6lcO/r3rXXD62/S7B6e7V9OB4+4DzQ8Y5XhFtWETdTQmYroIJWMot51dwCOhflUWcAJO7xl+CzsahcUVYdnjAMejulNg2VB7gJcPT5oL46Ykpcy213k4ufWl2nD4cEqXwu5QRJaJCRG7bDr9oi4vYKOsZOzAousvfBfxdQnHIlwbZzFBujp1idp8PZR1zTdPYIHSUBL4Rh/0dvlp8f4eCNh4hcUSiUfVxAuv+Q3lBTy5AcompiUvHoXOI+nnqQ0QmTkwAzcgegTO/eQeKSiwiTMkEdXvgMfzBfbcJbIW3QMvJmFTzb4BBz8oHBholcQFPYVQOyzA2dvaS26tB94vAljpMC6REBiXLzDm4FgOI0rSkldjcG5fxrb2Algjhs/CqnQblzA5lW8g7+XDYyIwvja96C4dhd7uNOCURyAyKwlt3KFYH3YOvWKA/WYl6Pegi84Bjke1S6DcT7mfhe0+uNg+eGsbVQ5V94JZoGYeL3dAT7RwH1alq+BF5wQ/y5MwqdYTg7MZPjxlPowNZ/hwH5zYCWQl9oEtbBZdIqp7gQX5WjhI8FOzGEZnLecTLWBmI7MFBobvjUu40iEv+EKCn5pFMLpisLZigBU2mqP5SbX5Jl8Lm/6T50FZdcZJ154MgFKtaiZMuC/9fOU8/NlWuA+L8lRxwU+AWMIsvBGjwLYHshGP+k4gl0gFP+Z/41HdJZAjs0paJFe05jczQb4HAVbYFYrI8oID+CAgQfsEAR4UwDsHyAXahyryBbGwyYBDd4OMAL0B8T+Cxci+wEr7lmZmmsJKZhK6UpSvclklCPBdT0BpZVrDtctwptXfzn7AKqwOhcVhy07zf8xVoQwCXL/aHeycyJmHp3/EJ83fH6pmvivNN+IDZdXDXpXK2wGsOBXNOZll2MClqtsBDAxdqkpNUjyqm7LLrLca2KRDoYi4UrfA5dZbCZx3udVY2lSDls7offdMW98GJ8T/n5uJ/qY+VELNY6M2b93G63kVtDPZdjReWYOwTcRd0RzWf1B61GLdiuaywq4MMmFa1l6rE+37SEQ8K5vFg2tbf39J4+pPSm+WVXPp9M3l0oLOtdfK/27VmoYqGuYFrxxXizdDYXYM67VXJoRT6XyeBao8J8pCvxKX6weSF4utImyvCLM3KGhKTx4WdtvOubq1mWcLcwXmoNSoEE7liApXRIkidCgcsZSfyy3airm6/RcvgnQJJF0SGAAAAABJRU5ErkJggg=="
  21871. /***/ }),
  21872. /* 63 */,
  21873. /* 64 */,
  21874. /* 65 */,
  21875. /* 66 */,
  21876. /* 67 */,
  21877. /* 68 */,
  21878. /* 69 */,
  21879. /* 70 */,
  21880. /* 71 */
  21881. /*!************************************************************************!*\
  21882. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages/login/topimg.png ***!
  21883. \************************************************************************/
  21884. /*! no static exports found */
  21885. /***/ (function(module, exports, __webpack_require__) {
  21886. module.exports = __webpack_require__.p + "assets/topimg.1cfd10a1.png";
  21887. /***/ }),
  21888. /* 72 */
  21889. /*!*********************************************************************************!*\
  21890. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/common/assets/image/comicon.png ***!
  21891. \*********************************************************************************/
  21892. /*! no static exports found */
  21893. /***/ (function(module, exports) {
  21894. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAEuElEQVR4Xu2aXWgcVRTH/+dOdNNG0yagKAqKoi+RggVFBKX6oC8Rq5AgSCFsdia7iQ+iIgUfXEHESP2ga+vO3Nk8GH0xVRFRH1QQQcX6UEEfikUUMeJHCTYq3ZjMPXLLbolpdjd3PrTN3oFA2Jz7n3N/93/O3Dsbgr3aEiDLpz0BC6iDQywgCyhZE7EOsg6yDkpGwDooGT/bg6yDrIOSEbAOSsbP9qD/ykGu644CuIGIdgHYYrhuJ5n5IwBfSClfMxybaXgiB42MjDiDg4PXR1H0rBDi1jQyVUp97DjOwwsLC0fm5uaiNDSTaCQCNDExcTczvwDgyiRJrDP2eyJ60Pf9t1LWNZaLDahYLF4cRdFhIrqicdffmXm/EOJtpdRJk0yEEFuY+U4ADwEYbIw9rpS6MQzD70y00o6NBcjzvPMAvApgpJHQt1EU7a7Val8nSXB8fPw6x3HeAHCN1mHmd4lodxAEy0l0k4yNBagxkfcAXA7gZ2beI6X8IEkizbGFQuEWIYRu1JcAmGfmYSnll2lox9GIBch13WEiehnAgF5lpdSeWq22ECeBtWPGxsa253K5GWa+B8AJpVQhDMNDaWjH0YgFyPO8BwDsA5AD8GIul3ukUqksxUlg7ZhyudwzPz8/TUS6Hy0T0V7f959LQzuORlxAjwMoN25YDoLgiTg3bzXG87xM9U1ytYA60LKALCCTgjoz1jro/3CQPqP19/dv6+3tbbsA9XqdFxcXT6w9c236Jl0sFi9TSu1n5r52C0RES0qpqTAMf1wdt+kBua57LRF9DmB7BwfrM9vOIAiOtgLEzFIIEWykkxDRD9Vq9deNxG40JpMe5Hne1cz8PhH1d0ikTkS3+b5/rI2DNjqXZpw+nnwSRdFTfX19R5NuYLMCtFUpdZMQoqfd7JhZ1ev1z2ZnZ/9KEdApKWb+jYgO5HK55yuVyqIp5WZ8JoDiJtMct7oHMfNP+mcjmvrVCxFdtCp2iZmnpZR6Zx7rOusB6SONyVGmVCrtUErtY2b9hlOfFbWb7pJSvqN/NaW06QBpAPl8/sKenp5pAKUGkCMA7giC4LgF1CCQz+evchznTSLaAeAXZr5XSvmpBdQgMDk5ecHy8nKViO4H8CcRlXzff8UCahDQu/mBgYEnAewFEBHRY77v67IzujLpQY3Vux2Afnfd8iKiaGVl5cOZmZk/2jzmjZp02jqZAEpzJ236FLOADAokjTNdJg7yPO9SZn4awNYOJfa3EOLRarU6n/bKa72zFpDBIq8b2mpizEyjo6Oilf7Q0BCXy2XV/HvXAXJd92YhxDAzO+tBUkp9FYbh6Ud51wFa83XTGYyY+ZCUsvltb/eVWKFQmBJCPAPg/BZl9noQBPd1bYl5nreTmXe1KjEA34RhePo/QrquxEybvwXUgZgFZAGdIrD5zmKmvWJtfBql0ZU7aVPwaYDO5CxmOpFN7SAiOqiUOpgUyurx+u0fgCn9WRL91Tpxe1kaDkqTTZZasZq9BdRhSWIBcl13kogms1zuDLRfCoLggKluLECmNzmX4y2gLErsXHaEae7WQdZBpp75d7x1kHWQdVAyAtZByfjZHmQdZB2UjIB1UDJ+tgd14PcP4hYGdl6JvtEAAAAASUVORK5CYII="
  21895. /***/ }),
  21896. /* 73 */
  21897. /*!*********************************************************************************!*\
  21898. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/common/assets/image/pswicon.svg ***!
  21899. \*********************************************************************************/
  21900. /*! no static exports found */
  21901. /***/ (function(module, exports, __webpack_require__) {
  21902. module.exports = __webpack_require__.p + "static/img/pswicon.5cb4118b.svg";
  21903. /***/ }),
  21904. /* 74 */
  21905. /*!*********************************************************************************!*\
  21906. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/common/assets/image/yzmicon.svg ***!
  21907. \*********************************************************************************/
  21908. /*! no static exports found */
  21909. /***/ (function(module, exports, __webpack_require__) {
  21910. module.exports = __webpack_require__.p + "static/img/yzmicon.83dc7c55.svg";
  21911. /***/ }),
  21912. /* 75 */,
  21913. /* 76 */,
  21914. /* 77 */
  21915. /*!******************************************************************************************!*\
  21916. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/wxcomponents/weapp/dist/dialog/dialog.js ***!
  21917. \******************************************************************************************/
  21918. /*! no static exports found */
  21919. /***/ (function(module, exports, __webpack_require__) {
  21920. "use strict";
  21921. /* WEBPACK VAR INJECTION */(function(wx) {
  21922. Object.defineProperty(exports, "__esModule", {
  21923. value: true
  21924. });
  21925. exports.default = void 0;
  21926. var queue = [];
  21927. var defaultOptions = {
  21928. show: false,
  21929. title: '',
  21930. width: null,
  21931. theme: 'default',
  21932. message: '',
  21933. zIndex: 100,
  21934. overlay: true,
  21935. selector: '#van-dialog',
  21936. className: '',
  21937. asyncClose: false,
  21938. beforeClose: null,
  21939. transition: 'scale',
  21940. customStyle: '',
  21941. messageAlign: '',
  21942. overlayStyle: '',
  21943. confirmButtonText: '确认',
  21944. cancelButtonText: '取消',
  21945. showConfirmButton: true,
  21946. showCancelButton: false,
  21947. closeOnClickOverlay: false,
  21948. confirmButtonOpenType: ''
  21949. };
  21950. var currentOptions = Object.assign({}, defaultOptions);
  21951. function getContext() {
  21952. var pages = getCurrentPages();
  21953. return pages[pages.length - 1];
  21954. }
  21955. var Dialog = function Dialog(options) {
  21956. options = Object.assign(Object.assign({}, currentOptions), options);
  21957. return new Promise(function (resolve, reject) {
  21958. var context = (typeof options.context === 'function' ? options.context() : options.context) || getContext();
  21959. var dialog = context.selectComponent(options.selector);
  21960. delete options.context;
  21961. delete options.selector;
  21962. if (dialog) {
  21963. dialog.setData(Object.assign({
  21964. callback: function callback(action, instance) {
  21965. action === 'confirm' ? resolve(instance) : reject(instance);
  21966. }
  21967. }, options));
  21968. wx.nextTick(function () {
  21969. dialog.setData({
  21970. show: true
  21971. });
  21972. });
  21973. queue.push(dialog);
  21974. } else {
  21975. console.warn('未找到 van-dialog 节点,请确认 selector 及 context 是否正确');
  21976. }
  21977. });
  21978. };
  21979. Dialog.alert = function (options) {
  21980. return Dialog(options);
  21981. };
  21982. Dialog.confirm = function (options) {
  21983. return Dialog(Object.assign({
  21984. showCancelButton: true
  21985. }, options));
  21986. };
  21987. Dialog.close = function () {
  21988. queue.forEach(function (dialog) {
  21989. dialog.close();
  21990. });
  21991. queue = [];
  21992. };
  21993. Dialog.stopLoading = function () {
  21994. queue.forEach(function (dialog) {
  21995. dialog.stopLoading();
  21996. });
  21997. };
  21998. Dialog.currentOptions = currentOptions;
  21999. Dialog.defaultOptions = defaultOptions;
  22000. Dialog.setDefaultOptions = function (options) {
  22001. currentOptions = Object.assign(Object.assign({}, currentOptions), options);
  22002. Dialog.currentOptions = currentOptions;
  22003. };
  22004. Dialog.resetDefaultOptions = function () {
  22005. currentOptions = Object.assign({}, defaultOptions);
  22006. Dialog.currentOptions = currentOptions;
  22007. };
  22008. Dialog.resetDefaultOptions();
  22009. var _default = Dialog;
  22010. exports.default = _default;
  22011. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  22012. /***/ }),
  22013. /* 78 */
  22014. /*!****************************************************************!*\
  22015. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/js_sdk/http.js ***!
  22016. \****************************************************************/
  22017. /*! no static exports found */
  22018. /***/ (function(module, exports, __webpack_require__) {
  22019. "use strict";
  22020. /* WEBPACK VAR INJECTION */(function(uni) {
  22021. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  22022. Object.defineProperty(exports, "__esModule", {
  22023. value: true
  22024. });
  22025. exports.addInterview = addInterview;
  22026. exports.addRectificationManagement = addRectificationManagement;
  22027. exports.addRepair = addRepair;
  22028. exports.addSafetySelfCheckingManage = addSafetySelfCheckingManage;
  22029. exports.addSafetySelfCheckingPlan = addSafetySelfCheckingPlan;
  22030. exports.addZaiti = addZaiti;
  22031. exports.addyixiang = addyixiang;
  22032. exports.bindWxOpenId = bindWxOpenId;
  22033. exports.cancelAppoint = cancelAppoint;
  22034. exports.clickCollect = clickCollect;
  22035. exports.companyECdit = companyECdit;
  22036. exports.companyExamineAdd = companyExamineAdd;
  22037. exports.confirmAudit = confirmAudit;
  22038. exports.editInterview = editInterview;
  22039. exports.editPassword = editPassword;
  22040. exports.editRepair = editRepair;
  22041. exports.editSave = editSave;
  22042. exports.editWanderAboutStatus = editWanderAboutStatus;
  22043. exports.findAllSimpleCompanies = findAllSimpleCompanies;
  22044. exports.findCompanyInfoList = findCompanyInfoList;
  22045. exports.findCompanyList = findCompanyList;
  22046. exports.findCompanyTags = findCompanyTags;
  22047. exports.findDeptList = findDeptList;
  22048. exports.findListBySaleManagementId = findListBySaleManagementId;
  22049. exports.findLongPanList = findLongPanList;
  22050. exports.findLouDongList = findLouDongList;
  22051. exports.findRectificationManagementInOutById = findRectificationManagementInOutById;
  22052. exports.findRectificationManagementInOutList = findRectificationManagementInOutList;
  22053. exports.findRoomByCondition = findRoomByCondition;
  22054. exports.findRoomInfoListByIds = findRoomInfoListByIds;
  22055. exports.findSafetySelfCheckingManageList = findSafetySelfCheckingManageList;
  22056. exports.findSafetySelfCheckingManagetById = findSafetySelfCheckingManagetById;
  22057. exports.findSafetySelfCheckingPlanById = findSafetySelfCheckingPlanById;
  22058. exports.findSafetySelfCheckingPlanList = findSafetySelfCheckingPlanList;
  22059. exports.findSuccessListBySaleManagementId = findSuccessListBySaleManagementId;
  22060. exports.findTrackUserList = findTrackUserList;
  22061. exports.findUserListByRoleWuye = findUserListByRoleWuye;
  22062. exports.findYuanQuList = findYuanQuList;
  22063. exports.getActivationRanking = getActivationRanking;
  22064. exports.getActivityById = getActivityById;
  22065. exports.getActivityById1 = getActivityById1;
  22066. exports.getAppUserMain = getAppUserMain;
  22067. exports.getBuildDetails = getBuildDetails;
  22068. exports.getByCodes = getByCodes;
  22069. exports.getBySaveStatus = getBySaveStatus;
  22070. exports.getCompanyAll = getCompanyAll;
  22071. exports.getCompanyById = getCompanyById;
  22072. exports.getCompanyHouseDetails = getCompanyHouseDetails;
  22073. exports.getCompanyTags = getCompanyTags;
  22074. exports.getCompanyTagsByQybq = getCompanyTagsByQybq;
  22075. exports.getDetial = getDetial;
  22076. exports.getDispatchToPerson = getDispatchToPerson;
  22077. exports.getInterviewDetails = getInterviewDetails;
  22078. exports.getInterviewList = getInterviewList;
  22079. exports.getMeetingAppointListAppCount = getMeetingAppointListAppCount;
  22080. exports.getPartyBranchList = getPartyBranchList;
  22081. exports.getRepairDispatchById = getRepairDispatchById;
  22082. exports.getRepairList = getRepairList;
  22083. exports.getRoomInfo = getRoomInfo;
  22084. exports.getRoomNameByCompanyId = getRoomNameByCompanyId;
  22085. exports.getSelectDeptTwo = getSelectDeptTwo;
  22086. exports.getSelectUserTwo = getSelectUserTwo;
  22087. exports.getTreeData2 = getTreeData2;
  22088. exports.getTreeData4 = getTreeData4;
  22089. exports.getTreeData6 = getTreeData6;
  22090. exports.getUserInfo = getUserInfo;
  22091. exports.getUserLocalStorageInfo = getUserLocalStorageInfo;
  22092. exports.getUserPower = getUserPower;
  22093. exports.getVenueAppointListAppCount = getVenueAppointListAppCount;
  22094. exports.getWxCompanyTags = getWxCompanyTags;
  22095. exports.getWxUserById = getWxUserById;
  22096. exports.handleList = handleList;
  22097. exports.insertRegisSignInfo = insertRegisSignInfo;
  22098. exports.interviewEscalationListAll = interviewEscalationListAll;
  22099. exports.list = list;
  22100. exports.listAllUserMain = listAllUserMain;
  22101. exports.listApp = listApp;
  22102. exports.listByModel = listByModel;
  22103. exports.listVo = listVo;
  22104. exports.login = login;
  22105. exports.readList = readList;
  22106. exports.removeTagsBind = removeTagsBind;
  22107. exports.repairList = repairList;
  22108. exports.repairList2 = repairList2;
  22109. exports.richScan = richScan;
  22110. exports.saleControllerGetById = saleControllerGetById;
  22111. exports.selectByCompanyId = selectByCompanyId;
  22112. exports.tagCategoryList = tagCategoryList;
  22113. exports.tagInfoList = tagInfoList;
  22114. exports.tagsBind = tagsBind;
  22115. exports.unbindWxId = unbindWxId;
  22116. exports.updateListRectificationManagement = updateListRectificationManagement;
  22117. exports.updateSafetySelfCheckingManage = updateSafetySelfCheckingManage;
  22118. exports.uploadPDF = uploadPDF;
  22119. exports.userList = userList;
  22120. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  22121. var _requestConfig = _interopRequireDefault(__webpack_require__(/*! ./request/requestConfig */ 53));
  22122. var _constant = __webpack_require__(/*! ../pages/utils/constant.js */ 50);
  22123. var _qs = _interopRequireDefault(__webpack_require__(/*! qs */ 79));
  22124. 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; }
  22125. 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; }
  22126. var baseUri = '/smartParkH5Server';
  22127. var parkActivity = '/wx/meetingAppoint';
  22128. function login(data) {
  22129. return _requestConfig.default.post('/wx/auth/login_by_app_main?' + _qs.default.stringify(data), {}, {});
  22130. }
  22131. function addRectificationManagement(data) {
  22132. return _requestConfig.default.post('/wx/RectificationController/addRectificationManagement', data, {});
  22133. }
  22134. function bindWxOpenId(data) {
  22135. return _requestConfig.default.post('/wx/frameUser/bindWxOpenId', data, {});
  22136. }
  22137. function getMeetingAppointListAppCount(data) {
  22138. return _requestConfig.default.post('/wx/meetingAppoint/getMeetingAppointListAppCount', {
  22139. states: '1,3'
  22140. }, {});
  22141. }
  22142. function getVenueAppointListAppCount(data) {
  22143. return _requestConfig.default.post('/wx/WxParkVenueAppointController/getVenueAppointListAppCount', {
  22144. states: '1,3'
  22145. }, {});
  22146. }
  22147. function editWanderAboutStatus(data) {
  22148. return _requestConfig.default.post('/wx/repair/editWanderAboutStatus', data, {});
  22149. }
  22150. function unbindWxId(data) {
  22151. return _requestConfig.default.post('/wx/frameUser/unbindWxOpenId', data, {});
  22152. }
  22153. function getUserLocalStorageInfo() {
  22154. var userInfo = JSON.parse(uni.getStorageSync("laocui_user_info"));
  22155. return userInfo;
  22156. }
  22157. function uploadPDF() {
  22158. uni.showLoading({
  22159. title: '加载中',
  22160. mask: true
  22161. });
  22162. return new Promise(function (resolve, reject) {
  22163. uni.chooseMessageFile({
  22164. count: 1,
  22165. //默认100
  22166. type: 'file',
  22167. success: function success(res) {
  22168. uni.uploadFile({
  22169. url: _constant.BASE_URI + "/wx/fileController/upload",
  22170. filePath: res.tempFiles[0].path,
  22171. name: "file",
  22172. formData: {
  22173. user: "test"
  22174. },
  22175. success: function success(successRes) {
  22176. // 上传完成需要更新 fileList
  22177. var data = JSON.parse(successRes.data);
  22178. uni.showToast({
  22179. title: '提交成功',
  22180. duration: 500
  22181. });
  22182. resolve({
  22183. url: data.data[0],
  22184. name: res.tempFiles[0].name
  22185. });
  22186. },
  22187. fail: function fail(res) {}
  22188. });
  22189. },
  22190. fail: function fail(e) {
  22191. uni.showToast({
  22192. title: '提交成功',
  22193. duration: 0
  22194. });
  22195. }
  22196. });
  22197. });
  22198. }
  22199. function getBuildDetails(data) {
  22200. return _requestConfig.default.post('/wx/MnpBuildingController/getById', data, {});
  22201. }
  22202. function addZaiti(data) {
  22203. return _requestConfig.default.post('/wx/ParkRoomController/add', data, {});
  22204. }
  22205. function getPartyBranchList(data) {
  22206. return _requestConfig.default.post('/wx/partyBranch/getPartyBranchList', data, {});
  22207. }
  22208. function selectByCompanyId(data) {
  22209. return _requestConfig.default.post('/wx/SocialCarrierController/selectByCompanyId', data, {});
  22210. }
  22211. function getRoomNameByCompanyId(data) {
  22212. return _requestConfig.default.post('/wx/ParkContractManageController/getRoomNameByCompanyId', data, {});
  22213. }
  22214. function getTreeData2(data) {
  22215. return _requestConfig.default.post('/wx/ParkInfoController/getTreeData2', data, {});
  22216. }
  22217. function getTreeData6(data) {
  22218. return _requestConfig.default.post('/wx/ParkInfoController/getTreeData6', data, {});
  22219. }
  22220. function getTreeData4(data) {
  22221. return _requestConfig.default.post('/wx/ParkInfoController/getTreeData4', data, {});
  22222. }
  22223. function getActivationRanking(data) {
  22224. return _requestConfig.default.post('/wx/partyBranch/getActivationRanking', data, {});
  22225. }
  22226. function findRectificationManagementInOutList(data) {
  22227. return _requestConfig.default.post('/wx/RectificationController/findRectificationManagementInOutList', data, {});
  22228. }
  22229. function findRectificationManagementInOutById(e) {
  22230. return _requestConfig.default.post('/wx/RectificationController/findRectificationManagementInOutById', {
  22231. id: e
  22232. }, {});
  22233. }
  22234. function repairList(data) {
  22235. return _requestConfig.default.post('/wx/repair/serviceList', data, {});
  22236. }
  22237. function repairList2(data) {
  22238. return _requestConfig.default.post('/wx/repair/list', data, {});
  22239. }
  22240. function addSafetySelfCheckingManage(data) {
  22241. return _requestConfig.default.post('/wx/SafetyController/addSafetySelfCheckingManage', data, {});
  22242. }
  22243. function updateSafetySelfCheckingManage(data) {
  22244. return _requestConfig.default.post('/wx/SafetyController/updateSafetySelfCheckingManage', data, {});
  22245. }
  22246. function editRepair(data) {
  22247. return _requestConfig.default.post('/wx/repair/edit', data, {});
  22248. }
  22249. function addRepair(data) {
  22250. return _requestConfig.default.post('/wx/repair/add', data, {});
  22251. }
  22252. function getRepairDispatchById(id) {
  22253. return _requestConfig.default.post('/wx/repair/getById', {
  22254. id: id
  22255. }, {});
  22256. }
  22257. function getDispatchToPerson(data) {
  22258. return _requestConfig.default.post('/wx/repair/getDispatchToPerson', data, {});
  22259. }
  22260. function getCompanyById(data) {
  22261. return _requestConfig.default.post('/wx/repair/getCompanyById', data, {});
  22262. }
  22263. function getWxCompanyTags(e) {
  22264. return _requestConfig.default.post('/wx/MnpTagInfoController/tagInfoList', e, {});
  22265. }
  22266. function tagsBind(e) {
  22267. return _requestConfig.default.post('/wx/MnpTagInfoController/bind', e, {});
  22268. }
  22269. function getDetial(e) {
  22270. return _requestConfig.default.post('/wx/meetingAppoint/meetingAppointDetail', e, {});
  22271. }
  22272. function saleControllerGetById(e) {
  22273. return _requestConfig.default.post('/wx/SaleController/getById', {
  22274. id: e
  22275. }, {});
  22276. }
  22277. function getAppUserMain(data) {
  22278. return _requestConfig.default.post('/wx/company/getById', data, {});
  22279. }
  22280. function confirmAudit(data) {
  22281. return _requestConfig.default.post('/wx/meetingAppoint/confirmAudit', data, {});
  22282. }
  22283. function getCompanyTags(e) {
  22284. return _requestConfig.default.post('/wx/MnpTagInfoController/getCompanyTags', e, {});
  22285. }
  22286. function getCompanyTagsByQybq(qybq) {
  22287. return _requestConfig.default.post('/wx/MnpTagInfoController/getCompanyTagsByQybq', {
  22288. qybq: qybq
  22289. }, {});
  22290. }
  22291. function companyECdit(data) {
  22292. return _requestConfig.default.post('/wx/company/edit', data, {});
  22293. }
  22294. function tagInfoList(e) {
  22295. return _requestConfig.default.post('/wx/MnpTagInfoController/tagInfoList', e, {});
  22296. }
  22297. function findDeptList() {
  22298. return _requestConfig.default.post('/wx/SaleController/findDeptList', {}, {});
  22299. }
  22300. function tagCategoryList() {
  22301. return _requestConfig.default.post('/wx/MnpTagController/tagCategoryList', {}, {});
  22302. }
  22303. function interviewEscalationListAll(id) {
  22304. return _requestConfig.default.post('/wx/interviewEscalation/listAll', {
  22305. companyId: id
  22306. }, {});
  22307. }
  22308. function getUserInfo(data) {
  22309. var laocui_user_info = JSON.parse(uni.getStorageSync('laocui_user_info'));
  22310. return _requestConfig.default.post('/wx/frameUser/getMyInfo?userId=' + laocui_user_info.user.id, {}, {});
  22311. }
  22312. function getWxUserById(userId) {
  22313. return _requestConfig.default.get('/wx/frameUser/getWxUserById?userId=' + userId, {});
  22314. }
  22315. function getRoomInfo(e) {
  22316. return _requestConfig.default.post('/wx/ParkRoomController/getById', {
  22317. id: e
  22318. }, {});
  22319. }
  22320. function getCompanyHouseDetails(e) {
  22321. return _requestConfig.default.post('/wx/company/getById', {
  22322. id: e
  22323. }, {});
  22324. }
  22325. function handleList(e) {
  22326. return _requestConfig.default.post('/wx/workPaneController/handleList', e, {});
  22327. }
  22328. function readList(e) {
  22329. return _requestConfig.default.post('/wx/workPaneController/readList', e, {});
  22330. }
  22331. // handleList?
  22332. function findCompanyTags(e) {
  22333. return _requestConfig.default.post('/wx/MnpTagInfoController/getCompanyTags/' + e, {}, {});
  22334. }
  22335. function removeTagsBind(e) {
  22336. return _requestConfig.default.post('/wx/MnpTagInfoController/removeBind', e, {});
  22337. }
  22338. function addInterview(e) {
  22339. return _requestConfig.default.post("/wx/interviewEscalation/add", e, {});
  22340. }
  22341. function editInterview(e) {
  22342. return _requestConfig.default.post("/wx/interviewEscalation/edit", e, {});
  22343. }
  22344. function getInterviewList(e) {
  22345. return _requestConfig.default.post("/wx/interviewEscalation/list", e, {});
  22346. }
  22347. function getInterviewDetails(e) {
  22348. return _requestConfig.default.post("/wx/interviewEscalation/getById", {
  22349. id: e
  22350. }, {});
  22351. }
  22352. function findSafetySelfCheckingPlanById(e) {
  22353. return _requestConfig.default.post("/wx/SafetyController/findSafetySelfCheckingPlanById", {
  22354. id: e
  22355. }, {});
  22356. }
  22357. //
  22358. function findSafetySelfCheckingPlanList(e) {
  22359. return _requestConfig.default.post("/wx/SafetyController/findSafetySelfCheckingPlanList", e, {});
  22360. }
  22361. function getBySaveStatus(e) {
  22362. return _requestConfig.default.post("/wx/interviewEscalation/getBySaveStatus", {
  22363. createdBy: e
  22364. }, {});
  22365. }
  22366. function companyExamineAdd(e) {
  22367. return _requestConfig.default.post("/wx/company/add", e, {});
  22368. }
  22369. function listByModel(e) {
  22370. return _requestConfig.default.post('/wx/SaleController/findSaleManagementListByRoomId', e, {});
  22371. }
  22372. function listVo(e) {
  22373. // 查询园区列表,不需要参数
  22374. return _requestConfig.default.post('/wx/company/listVo', e, {});
  22375. }
  22376. // /wx/SafetyController/addSafetySelfCheckingPlan
  22377. function addSafetySelfCheckingPlan(e) {
  22378. // 查询园区列表,不需要参数
  22379. return _requestConfig.default.post('/wx/SafetyController/addSafetySelfCheckingPlan', _objectSpread({}, e), {});
  22380. }
  22381. function findSafetySelfCheckingManagetById(e) {
  22382. // 查询园区列表,不需要参数
  22383. return _requestConfig.default.post('/wx/SafetyController/findSafetySelfCheckingManagetById', {
  22384. id: e
  22385. }, {});
  22386. }
  22387. function findSafetySelfCheckingManageList(e) {
  22388. // 查询园区列表,不需要参数
  22389. return _requestConfig.default.post('/wx/SafetyController/findSafetySelfCheckingManageList', e, {});
  22390. }
  22391. function findYuanQuList() {
  22392. // 查询园区列表,不需要参数
  22393. return _requestConfig.default.post('/wx/SaleController/findYuanQuList', {}, {});
  22394. }
  22395. function findLongPanList(id) {
  22396. // 用园区ID查询楼盘列表
  22397. return _requestConfig.default.post('/wx/SaleController/findLouPanList', {
  22398. id: id
  22399. }, {});
  22400. }
  22401. function findLouDongList(id) {
  22402. // 用园区ID查询楼盘列表
  22403. return _requestConfig.default.post('/wx/SaleController/findLouDongList', {
  22404. id: id
  22405. }, {});
  22406. }
  22407. function clickCollect(e) {
  22408. return _requestConfig.default.post('/wx/parkActivity/clickCollect', e, {});
  22409. }
  22410. function insertRegisSignInfo(e) {
  22411. return _requestConfig.default.post('/wx/parkActivity/insertRegisSignInfo', e, {});
  22412. }
  22413. function richScan(e) {
  22414. return _requestConfig.default.post('/wx/parkActivity/richScan', e, {});
  22415. }
  22416. function getActivityById(id, signInCode, userId) {
  22417. return _requestConfig.default.get('/wx/parkActivity/getBySignInCode?id=' + id + '&userId=' + userId + "&signInCode=" + signInCode, {}, {});
  22418. }
  22419. function getActivityById1(id, signInCode, userId) {
  22420. // /wx/parkActivity/getActivityById?id=1183797041860444160&userId=SCNjNSP7LJ9aarv1cNw
  22421. return _requestConfig.default.get('/wx/parkActivity/getActivityById?id=' + id + '&userId=' + userId, {}, {});
  22422. }
  22423. // /wx/userPower/getUserPower?userId=1088765543780974592
  22424. function getUserPower(e) {
  22425. return _requestConfig.default.post('/wx/userPower/getUserPower', {
  22426. userId: e
  22427. }, {});
  22428. }
  22429. function editPassword(e) {
  22430. return _requestConfig.default.post('/wx/frameUser/editPassword', e, {});
  22431. }
  22432. function updateListRectificationManagement(e) {
  22433. return _requestConfig.default.post('/wx/RectificationController/updateListRectificationManagement', e, {});
  22434. }
  22435. function findListBySaleManagementId(e) {
  22436. return _requestConfig.default.post('/wx/SaleController/findListBySaleManagementId', e, {});
  22437. }
  22438. function findSuccessListBySaleManagementId(e) {
  22439. return _requestConfig.default.post('/wx/SaleController/findSuccessListBySaleManagementId', e, {});
  22440. }
  22441. // /wx/RectificationController/findUserListByRoleWuye
  22442. function findUserListByRoleWuye() {
  22443. // 用园区ID查询楼盘列表
  22444. return _requestConfig.default.post('/wx/RectificationController/findUserListByRoleWuye', {}, {});
  22445. }
  22446. function listAllUserMain() {
  22447. // 用园区ID查询楼盘列表
  22448. return _requestConfig.default.post('/wx/UserMainExpandController/listAllUserMain', {}, {});
  22449. }
  22450. function userList(e) {
  22451. // http://192.168.2.112:9011/wx/frameUser/userList
  22452. return _requestConfig.default.post('/wx/frameUser/userList', e, {});
  22453. }
  22454. function findAllSimpleCompanies(e) {
  22455. // http://192.168.2.112:9011/wx/frameUser/userList
  22456. return _requestConfig.default.post('/wx/company/findAllSimpleCompanies', {
  22457. searchInfo: e.qymc,
  22458. pageNum: 1,
  22459. pageSize: 10000
  22460. }, {});
  22461. }
  22462. function findTrackUserList() {
  22463. // http://192.168.2.112:9011/wx/frameUser/userList
  22464. return _requestConfig.default.post('/wx/SaleController/findTrackUserList', {}, {});
  22465. }
  22466. function getSelectUserTwo(e) {
  22467. // 用园区ID查询楼盘列表
  22468. return _requestConfig.default.post('/wx/frameUser/getSelectUserTwo', {
  22469. searchName: e
  22470. }, {});
  22471. }
  22472. function getSelectDeptTwo(e) {
  22473. // 用园区ID查询楼盘列表
  22474. return _requestConfig.default.post('/wx/frameUser/getSelectDeptTwo', {
  22475. searchName: e
  22476. }, {});
  22477. }
  22478. function findRoomInfoListByIds(e) {
  22479. // 用园区ID查询楼盘列表
  22480. return _requestConfig.default.post('/wx/SaleController/findRoomInfoListByIds', {
  22481. ids: e
  22482. }, {});
  22483. }
  22484. function findCompanyList() {
  22485. // 用园区ID查询楼盘列表
  22486. return _requestConfig.default.post('/wx/SaleController/findCompanyList', {}, {});
  22487. }
  22488. function addyixiang(e) {
  22489. return _requestConfig.default.post('/wx/SaleController/add', e, {});
  22490. }
  22491. function editSave(e) {
  22492. return _requestConfig.default.post('/wx/SaleController/editSave', e, {});
  22493. }
  22494. function findCompanyInfoList(data) {
  22495. return _requestConfig.default.post("/wx/SaleController/findCompanyInfoList", data, {});
  22496. }
  22497. function findRoomByCondition(params) {
  22498. // 用园区ID查询楼盘列表
  22499. return _requestConfig.default.post('/wx/SaleController/findRoomByCondition', params, {});
  22500. }
  22501. function getCompanyAll(qymc) {
  22502. return _requestConfig.default.post('/wx/company/listAll', {
  22503. qymc: qymc ? qymc : ""
  22504. }, {});
  22505. }
  22506. function getByCodes(params) {
  22507. // 用园区ID查询楼盘列表
  22508. return _requestConfig.default.post('/wx/sysDict/getByCodes', {
  22509. codes: params
  22510. }, {});
  22511. }
  22512. function list(data) {
  22513. return _requestConfig.default.post(parkActivity + '/getMeetingAppointList', data, {});
  22514. }
  22515. function listApp(data) {
  22516. return _requestConfig.default.post(parkActivity + '/getMeetingAppointListApp', data, {});
  22517. }
  22518. function cancelAppoint(data) {
  22519. return _requestConfig.default.post(parkActivity + '/cancelAppoint', data, {});
  22520. }
  22521. // /wx/SaleController/
  22522. function getRepairList(data) {
  22523. return _requestConfig.default.post('/wx/repair/list', data, {});
  22524. }
  22525. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  22526. /***/ }),
  22527. /* 79 */
  22528. /*!**************************************!*\
  22529. !*** ./node_modules/qs/lib/index.js ***!
  22530. \**************************************/
  22531. /*! no static exports found */
  22532. /***/ (function(module, exports, __webpack_require__) {
  22533. "use strict";
  22534. var stringify = __webpack_require__(/*! ./stringify */ 80);
  22535. var parse = __webpack_require__(/*! ./parse */ 94);
  22536. var formats = __webpack_require__(/*! ./formats */ 93);
  22537. module.exports = {
  22538. formats: formats,
  22539. parse: parse,
  22540. stringify: stringify
  22541. };
  22542. /***/ }),
  22543. /* 80 */
  22544. /*!******************************************!*\
  22545. !*** ./node_modules/qs/lib/stringify.js ***!
  22546. \******************************************/
  22547. /*! no static exports found */
  22548. /***/ (function(module, exports, __webpack_require__) {
  22549. "use strict";
  22550. var getSideChannel = __webpack_require__(/*! side-channel */ 81);
  22551. var utils = __webpack_require__(/*! ./utils */ 92);
  22552. var formats = __webpack_require__(/*! ./formats */ 93);
  22553. var has = Object.prototype.hasOwnProperty;
  22554. var arrayPrefixGenerators = {
  22555. brackets: function brackets(prefix) {
  22556. return prefix + '[]';
  22557. },
  22558. comma: 'comma',
  22559. indices: function indices(prefix, key) {
  22560. return prefix + '[' + key + ']';
  22561. },
  22562. repeat: function repeat(prefix) {
  22563. return prefix;
  22564. }
  22565. };
  22566. var isArray = Array.isArray;
  22567. var split = String.prototype.split;
  22568. var push = Array.prototype.push;
  22569. var pushToArray = function (arr, valueOrArray) {
  22570. push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
  22571. };
  22572. var toISO = Date.prototype.toISOString;
  22573. var defaultFormat = formats['default'];
  22574. var defaults = {
  22575. addQueryPrefix: false,
  22576. allowDots: false,
  22577. charset: 'utf-8',
  22578. charsetSentinel: false,
  22579. delimiter: '&',
  22580. encode: true,
  22581. encoder: utils.encode,
  22582. encodeValuesOnly: false,
  22583. format: defaultFormat,
  22584. formatter: formats.formatters[defaultFormat],
  22585. // deprecated
  22586. indices: false,
  22587. serializeDate: function serializeDate(date) {
  22588. return toISO.call(date);
  22589. },
  22590. skipNulls: false,
  22591. strictNullHandling: false
  22592. };
  22593. var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
  22594. return typeof v === 'string'
  22595. || typeof v === 'number'
  22596. || typeof v === 'boolean'
  22597. || typeof v === 'symbol'
  22598. || typeof v === 'bigint';
  22599. };
  22600. var sentinel = {};
  22601. var stringify = function stringify(
  22602. object,
  22603. prefix,
  22604. generateArrayPrefix,
  22605. commaRoundTrip,
  22606. strictNullHandling,
  22607. skipNulls,
  22608. encoder,
  22609. filter,
  22610. sort,
  22611. allowDots,
  22612. serializeDate,
  22613. format,
  22614. formatter,
  22615. encodeValuesOnly,
  22616. charset,
  22617. sideChannel
  22618. ) {
  22619. var obj = object;
  22620. var tmpSc = sideChannel;
  22621. var step = 0;
  22622. var findFlag = false;
  22623. while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
  22624. // Where object last appeared in the ref tree
  22625. var pos = tmpSc.get(object);
  22626. step += 1;
  22627. if (typeof pos !== 'undefined') {
  22628. if (pos === step) {
  22629. throw new RangeError('Cyclic object value');
  22630. } else {
  22631. findFlag = true; // Break while
  22632. }
  22633. }
  22634. if (typeof tmpSc.get(sentinel) === 'undefined') {
  22635. step = 0;
  22636. }
  22637. }
  22638. if (typeof filter === 'function') {
  22639. obj = filter(prefix, obj);
  22640. } else if (obj instanceof Date) {
  22641. obj = serializeDate(obj);
  22642. } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
  22643. obj = utils.maybeMap(obj, function (value) {
  22644. if (value instanceof Date) {
  22645. return serializeDate(value);
  22646. }
  22647. return value;
  22648. });
  22649. }
  22650. if (obj === null) {
  22651. if (strictNullHandling) {
  22652. return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
  22653. }
  22654. obj = '';
  22655. }
  22656. if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
  22657. if (encoder) {
  22658. var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
  22659. if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
  22660. var valuesArray = split.call(String(obj), ',');
  22661. var valuesJoined = '';
  22662. for (var i = 0; i < valuesArray.length; ++i) {
  22663. valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format));
  22664. }
  22665. return [formatter(keyValue) + (commaRoundTrip && isArray(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
  22666. }
  22667. return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
  22668. }
  22669. return [formatter(prefix) + '=' + formatter(String(obj))];
  22670. }
  22671. var values = [];
  22672. if (typeof obj === 'undefined') {
  22673. return values;
  22674. }
  22675. var objKeys;
  22676. if (generateArrayPrefix === 'comma' && isArray(obj)) {
  22677. // we need to join elements in
  22678. objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
  22679. } else if (isArray(filter)) {
  22680. objKeys = filter;
  22681. } else {
  22682. var keys = Object.keys(obj);
  22683. objKeys = sort ? keys.sort(sort) : keys;
  22684. }
  22685. var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix;
  22686. for (var j = 0; j < objKeys.length; ++j) {
  22687. var key = objKeys[j];
  22688. var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
  22689. if (skipNulls && value === null) {
  22690. continue;
  22691. }
  22692. var keyPrefix = isArray(obj)
  22693. ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
  22694. : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
  22695. sideChannel.set(object, step);
  22696. var valueSideChannel = getSideChannel();
  22697. valueSideChannel.set(sentinel, sideChannel);
  22698. pushToArray(values, stringify(
  22699. value,
  22700. keyPrefix,
  22701. generateArrayPrefix,
  22702. commaRoundTrip,
  22703. strictNullHandling,
  22704. skipNulls,
  22705. encoder,
  22706. filter,
  22707. sort,
  22708. allowDots,
  22709. serializeDate,
  22710. format,
  22711. formatter,
  22712. encodeValuesOnly,
  22713. charset,
  22714. valueSideChannel
  22715. ));
  22716. }
  22717. return values;
  22718. };
  22719. var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
  22720. if (!opts) {
  22721. return defaults;
  22722. }
  22723. if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
  22724. throw new TypeError('Encoder has to be a function.');
  22725. }
  22726. var charset = opts.charset || defaults.charset;
  22727. if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
  22728. throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
  22729. }
  22730. var format = formats['default'];
  22731. if (typeof opts.format !== 'undefined') {
  22732. if (!has.call(formats.formatters, opts.format)) {
  22733. throw new TypeError('Unknown format option provided.');
  22734. }
  22735. format = opts.format;
  22736. }
  22737. var formatter = formats.formatters[format];
  22738. var filter = defaults.filter;
  22739. if (typeof opts.filter === 'function' || isArray(opts.filter)) {
  22740. filter = opts.filter;
  22741. }
  22742. return {
  22743. addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
  22744. allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
  22745. charset: charset,
  22746. charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
  22747. delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
  22748. encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
  22749. encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
  22750. encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
  22751. filter: filter,
  22752. format: format,
  22753. formatter: formatter,
  22754. serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
  22755. skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
  22756. sort: typeof opts.sort === 'function' ? opts.sort : null,
  22757. strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
  22758. };
  22759. };
  22760. module.exports = function (object, opts) {
  22761. var obj = object;
  22762. var options = normalizeStringifyOptions(opts);
  22763. var objKeys;
  22764. var filter;
  22765. if (typeof options.filter === 'function') {
  22766. filter = options.filter;
  22767. obj = filter('', obj);
  22768. } else if (isArray(options.filter)) {
  22769. filter = options.filter;
  22770. objKeys = filter;
  22771. }
  22772. var keys = [];
  22773. if (typeof obj !== 'object' || obj === null) {
  22774. return '';
  22775. }
  22776. var arrayFormat;
  22777. if (opts && opts.arrayFormat in arrayPrefixGenerators) {
  22778. arrayFormat = opts.arrayFormat;
  22779. } else if (opts && 'indices' in opts) {
  22780. arrayFormat = opts.indices ? 'indices' : 'repeat';
  22781. } else {
  22782. arrayFormat = 'indices';
  22783. }
  22784. var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
  22785. if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
  22786. throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
  22787. }
  22788. var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
  22789. if (!objKeys) {
  22790. objKeys = Object.keys(obj);
  22791. }
  22792. if (options.sort) {
  22793. objKeys.sort(options.sort);
  22794. }
  22795. var sideChannel = getSideChannel();
  22796. for (var i = 0; i < objKeys.length; ++i) {
  22797. var key = objKeys[i];
  22798. if (options.skipNulls && obj[key] === null) {
  22799. continue;
  22800. }
  22801. pushToArray(keys, stringify(
  22802. obj[key],
  22803. key,
  22804. generateArrayPrefix,
  22805. commaRoundTrip,
  22806. options.strictNullHandling,
  22807. options.skipNulls,
  22808. options.encode ? options.encoder : null,
  22809. options.filter,
  22810. options.sort,
  22811. options.allowDots,
  22812. options.serializeDate,
  22813. options.format,
  22814. options.formatter,
  22815. options.encodeValuesOnly,
  22816. options.charset,
  22817. sideChannel
  22818. ));
  22819. }
  22820. var joined = keys.join(options.delimiter);
  22821. var prefix = options.addQueryPrefix === true ? '?' : '';
  22822. if (options.charsetSentinel) {
  22823. if (options.charset === 'iso-8859-1') {
  22824. // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
  22825. prefix += 'utf8=%26%2310003%3B&';
  22826. } else {
  22827. // encodeURIComponent('✓')
  22828. prefix += 'utf8=%E2%9C%93&';
  22829. }
  22830. }
  22831. return joined.length > 0 ? prefix + joined : '';
  22832. };
  22833. /***/ }),
  22834. /* 81 */
  22835. /*!********************************************!*\
  22836. !*** ./node_modules/side-channel/index.js ***!
  22837. \********************************************/
  22838. /*! no static exports found */
  22839. /***/ (function(module, exports, __webpack_require__) {
  22840. "use strict";
  22841. var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 82);
  22842. var callBound = __webpack_require__(/*! call-bind/callBound */ 88);
  22843. var inspect = __webpack_require__(/*! object-inspect */ 90);
  22844. var $TypeError = GetIntrinsic('%TypeError%');
  22845. var $WeakMap = GetIntrinsic('%WeakMap%', true);
  22846. var $Map = GetIntrinsic('%Map%', true);
  22847. var $weakMapGet = callBound('WeakMap.prototype.get', true);
  22848. var $weakMapSet = callBound('WeakMap.prototype.set', true);
  22849. var $weakMapHas = callBound('WeakMap.prototype.has', true);
  22850. var $mapGet = callBound('Map.prototype.get', true);
  22851. var $mapSet = callBound('Map.prototype.set', true);
  22852. var $mapHas = callBound('Map.prototype.has', true);
  22853. /*
  22854. * This function traverses the list returning the node corresponding to the
  22855. * given key.
  22856. *
  22857. * That node is also moved to the head of the list, so that if it's accessed
  22858. * again we don't need to traverse the whole list. By doing so, all the recently
  22859. * used nodes can be accessed relatively quickly.
  22860. */
  22861. var listGetNode = function (list, key) { // eslint-disable-line consistent-return
  22862. for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
  22863. if (curr.key === key) {
  22864. prev.next = curr.next;
  22865. curr.next = list.next;
  22866. list.next = curr; // eslint-disable-line no-param-reassign
  22867. return curr;
  22868. }
  22869. }
  22870. };
  22871. var listGet = function (objects, key) {
  22872. var node = listGetNode(objects, key);
  22873. return node && node.value;
  22874. };
  22875. var listSet = function (objects, key, value) {
  22876. var node = listGetNode(objects, key);
  22877. if (node) {
  22878. node.value = value;
  22879. } else {
  22880. // Prepend the new node to the beginning of the list
  22881. objects.next = { // eslint-disable-line no-param-reassign
  22882. key: key,
  22883. next: objects.next,
  22884. value: value
  22885. };
  22886. }
  22887. };
  22888. var listHas = function (objects, key) {
  22889. return !!listGetNode(objects, key);
  22890. };
  22891. module.exports = function getSideChannel() {
  22892. var $wm;
  22893. var $m;
  22894. var $o;
  22895. var channel = {
  22896. assert: function (key) {
  22897. if (!channel.has(key)) {
  22898. throw new $TypeError('Side channel does not contain ' + inspect(key));
  22899. }
  22900. },
  22901. get: function (key) { // eslint-disable-line consistent-return
  22902. if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
  22903. if ($wm) {
  22904. return $weakMapGet($wm, key);
  22905. }
  22906. } else if ($Map) {
  22907. if ($m) {
  22908. return $mapGet($m, key);
  22909. }
  22910. } else {
  22911. if ($o) { // eslint-disable-line no-lonely-if
  22912. return listGet($o, key);
  22913. }
  22914. }
  22915. },
  22916. has: function (key) {
  22917. if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
  22918. if ($wm) {
  22919. return $weakMapHas($wm, key);
  22920. }
  22921. } else if ($Map) {
  22922. if ($m) {
  22923. return $mapHas($m, key);
  22924. }
  22925. } else {
  22926. if ($o) { // eslint-disable-line no-lonely-if
  22927. return listHas($o, key);
  22928. }
  22929. }
  22930. return false;
  22931. },
  22932. set: function (key, value) {
  22933. if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
  22934. if (!$wm) {
  22935. $wm = new $WeakMap();
  22936. }
  22937. $weakMapSet($wm, key, value);
  22938. } else if ($Map) {
  22939. if (!$m) {
  22940. $m = new $Map();
  22941. }
  22942. $mapSet($m, key, value);
  22943. } else {
  22944. if (!$o) {
  22945. /*
  22946. * Initialize the linked list as an empty node, so that we don't have
  22947. * to special-case handling of the first node: we can always refer to
  22948. * it as (previous node).next, instead of something like (list).head
  22949. */
  22950. $o = { key: {}, next: null };
  22951. }
  22952. listSet($o, key, value);
  22953. }
  22954. }
  22955. };
  22956. return channel;
  22957. };
  22958. /***/ }),
  22959. /* 82 */
  22960. /*!*********************************************!*\
  22961. !*** ./node_modules/get-intrinsic/index.js ***!
  22962. \*********************************************/
  22963. /*! no static exports found */
  22964. /***/ (function(module, exports, __webpack_require__) {
  22965. "use strict";
  22966. var undefined;
  22967. var $SyntaxError = SyntaxError;
  22968. var $Function = Function;
  22969. var $TypeError = TypeError;
  22970. // eslint-disable-next-line consistent-return
  22971. var getEvalledConstructor = function (expressionSyntax) {
  22972. try {
  22973. return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
  22974. } catch (e) {}
  22975. };
  22976. var $gOPD = Object.getOwnPropertyDescriptor;
  22977. if ($gOPD) {
  22978. try {
  22979. $gOPD({}, '');
  22980. } catch (e) {
  22981. $gOPD = null; // this is IE 8, which has a broken gOPD
  22982. }
  22983. }
  22984. var throwTypeError = function () {
  22985. throw new $TypeError();
  22986. };
  22987. var ThrowTypeError = $gOPD
  22988. ? (function () {
  22989. try {
  22990. // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
  22991. arguments.callee; // IE 8 does not throw here
  22992. return throwTypeError;
  22993. } catch (calleeThrows) {
  22994. try {
  22995. // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
  22996. return $gOPD(arguments, 'callee').get;
  22997. } catch (gOPDthrows) {
  22998. return throwTypeError;
  22999. }
  23000. }
  23001. }())
  23002. : throwTypeError;
  23003. var hasSymbols = __webpack_require__(/*! has-symbols */ 83)();
  23004. var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
  23005. var needsEval = {};
  23006. var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
  23007. var INTRINSICS = {
  23008. '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
  23009. '%Array%': Array,
  23010. '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
  23011. '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
  23012. '%AsyncFromSyncIteratorPrototype%': undefined,
  23013. '%AsyncFunction%': needsEval,
  23014. '%AsyncGenerator%': needsEval,
  23015. '%AsyncGeneratorFunction%': needsEval,
  23016. '%AsyncIteratorPrototype%': needsEval,
  23017. '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
  23018. '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
  23019. '%Boolean%': Boolean,
  23020. '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
  23021. '%Date%': Date,
  23022. '%decodeURI%': decodeURI,
  23023. '%decodeURIComponent%': decodeURIComponent,
  23024. '%encodeURI%': encodeURI,
  23025. '%encodeURIComponent%': encodeURIComponent,
  23026. '%Error%': Error,
  23027. '%eval%': eval, // eslint-disable-line no-eval
  23028. '%EvalError%': EvalError,
  23029. '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
  23030. '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
  23031. '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
  23032. '%Function%': $Function,
  23033. '%GeneratorFunction%': needsEval,
  23034. '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
  23035. '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
  23036. '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
  23037. '%isFinite%': isFinite,
  23038. '%isNaN%': isNaN,
  23039. '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
  23040. '%JSON%': typeof JSON === 'object' ? JSON : undefined,
  23041. '%Map%': typeof Map === 'undefined' ? undefined : Map,
  23042. '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
  23043. '%Math%': Math,
  23044. '%Number%': Number,
  23045. '%Object%': Object,
  23046. '%parseFloat%': parseFloat,
  23047. '%parseInt%': parseInt,
  23048. '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
  23049. '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
  23050. '%RangeError%': RangeError,
  23051. '%ReferenceError%': ReferenceError,
  23052. '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
  23053. '%RegExp%': RegExp,
  23054. '%Set%': typeof Set === 'undefined' ? undefined : Set,
  23055. '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
  23056. '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
  23057. '%String%': String,
  23058. '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
  23059. '%Symbol%': hasSymbols ? Symbol : undefined,
  23060. '%SyntaxError%': $SyntaxError,
  23061. '%ThrowTypeError%': ThrowTypeError,
  23062. '%TypedArray%': TypedArray,
  23063. '%TypeError%': $TypeError,
  23064. '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
  23065. '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
  23066. '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
  23067. '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
  23068. '%URIError%': URIError,
  23069. '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
  23070. '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
  23071. '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
  23072. };
  23073. var doEval = function doEval(name) {
  23074. var value;
  23075. if (name === '%AsyncFunction%') {
  23076. value = getEvalledConstructor('async function () {}');
  23077. } else if (name === '%GeneratorFunction%') {
  23078. value = getEvalledConstructor('function* () {}');
  23079. } else if (name === '%AsyncGeneratorFunction%') {
  23080. value = getEvalledConstructor('async function* () {}');
  23081. } else if (name === '%AsyncGenerator%') {
  23082. var fn = doEval('%AsyncGeneratorFunction%');
  23083. if (fn) {
  23084. value = fn.prototype;
  23085. }
  23086. } else if (name === '%AsyncIteratorPrototype%') {
  23087. var gen = doEval('%AsyncGenerator%');
  23088. if (gen) {
  23089. value = getProto(gen.prototype);
  23090. }
  23091. }
  23092. INTRINSICS[name] = value;
  23093. return value;
  23094. };
  23095. var LEGACY_ALIASES = {
  23096. '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
  23097. '%ArrayPrototype%': ['Array', 'prototype'],
  23098. '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
  23099. '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
  23100. '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
  23101. '%ArrayProto_values%': ['Array', 'prototype', 'values'],
  23102. '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
  23103. '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
  23104. '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
  23105. '%BooleanPrototype%': ['Boolean', 'prototype'],
  23106. '%DataViewPrototype%': ['DataView', 'prototype'],
  23107. '%DatePrototype%': ['Date', 'prototype'],
  23108. '%ErrorPrototype%': ['Error', 'prototype'],
  23109. '%EvalErrorPrototype%': ['EvalError', 'prototype'],
  23110. '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
  23111. '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
  23112. '%FunctionPrototype%': ['Function', 'prototype'],
  23113. '%Generator%': ['GeneratorFunction', 'prototype'],
  23114. '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
  23115. '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
  23116. '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
  23117. '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
  23118. '%JSONParse%': ['JSON', 'parse'],
  23119. '%JSONStringify%': ['JSON', 'stringify'],
  23120. '%MapPrototype%': ['Map', 'prototype'],
  23121. '%NumberPrototype%': ['Number', 'prototype'],
  23122. '%ObjectPrototype%': ['Object', 'prototype'],
  23123. '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
  23124. '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
  23125. '%PromisePrototype%': ['Promise', 'prototype'],
  23126. '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
  23127. '%Promise_all%': ['Promise', 'all'],
  23128. '%Promise_reject%': ['Promise', 'reject'],
  23129. '%Promise_resolve%': ['Promise', 'resolve'],
  23130. '%RangeErrorPrototype%': ['RangeError', 'prototype'],
  23131. '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
  23132. '%RegExpPrototype%': ['RegExp', 'prototype'],
  23133. '%SetPrototype%': ['Set', 'prototype'],
  23134. '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
  23135. '%StringPrototype%': ['String', 'prototype'],
  23136. '%SymbolPrototype%': ['Symbol', 'prototype'],
  23137. '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
  23138. '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
  23139. '%TypeErrorPrototype%': ['TypeError', 'prototype'],
  23140. '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
  23141. '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
  23142. '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
  23143. '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
  23144. '%URIErrorPrototype%': ['URIError', 'prototype'],
  23145. '%WeakMapPrototype%': ['WeakMap', 'prototype'],
  23146. '%WeakSetPrototype%': ['WeakSet', 'prototype']
  23147. };
  23148. var bind = __webpack_require__(/*! function-bind */ 85);
  23149. var hasOwn = __webpack_require__(/*! has */ 87);
  23150. var $concat = bind.call(Function.call, Array.prototype.concat);
  23151. var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
  23152. var $replace = bind.call(Function.call, String.prototype.replace);
  23153. var $strSlice = bind.call(Function.call, String.prototype.slice);
  23154. var $exec = bind.call(Function.call, RegExp.prototype.exec);
  23155. /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
  23156. var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
  23157. var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
  23158. var stringToPath = function stringToPath(string) {
  23159. var first = $strSlice(string, 0, 1);
  23160. var last = $strSlice(string, -1);
  23161. if (first === '%' && last !== '%') {
  23162. throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
  23163. } else if (last === '%' && first !== '%') {
  23164. throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
  23165. }
  23166. var result = [];
  23167. $replace(string, rePropName, function (match, number, quote, subString) {
  23168. result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
  23169. });
  23170. return result;
  23171. };
  23172. /* end adaptation */
  23173. var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
  23174. var intrinsicName = name;
  23175. var alias;
  23176. if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
  23177. alias = LEGACY_ALIASES[intrinsicName];
  23178. intrinsicName = '%' + alias[0] + '%';
  23179. }
  23180. if (hasOwn(INTRINSICS, intrinsicName)) {
  23181. var value = INTRINSICS[intrinsicName];
  23182. if (value === needsEval) {
  23183. value = doEval(intrinsicName);
  23184. }
  23185. if (typeof value === 'undefined' && !allowMissing) {
  23186. throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
  23187. }
  23188. return {
  23189. alias: alias,
  23190. name: intrinsicName,
  23191. value: value
  23192. };
  23193. }
  23194. throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
  23195. };
  23196. module.exports = function GetIntrinsic(name, allowMissing) {
  23197. if (typeof name !== 'string' || name.length === 0) {
  23198. throw new $TypeError('intrinsic name must be a non-empty string');
  23199. }
  23200. if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
  23201. throw new $TypeError('"allowMissing" argument must be a boolean');
  23202. }
  23203. if ($exec(/^%?[^%]*%?$/, name) === null) {
  23204. throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
  23205. }
  23206. var parts = stringToPath(name);
  23207. var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
  23208. var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
  23209. var intrinsicRealName = intrinsic.name;
  23210. var value = intrinsic.value;
  23211. var skipFurtherCaching = false;
  23212. var alias = intrinsic.alias;
  23213. if (alias) {
  23214. intrinsicBaseName = alias[0];
  23215. $spliceApply(parts, $concat([0, 1], alias));
  23216. }
  23217. for (var i = 1, isOwn = true; i < parts.length; i += 1) {
  23218. var part = parts[i];
  23219. var first = $strSlice(part, 0, 1);
  23220. var last = $strSlice(part, -1);
  23221. if (
  23222. (
  23223. (first === '"' || first === "'" || first === '`')
  23224. || (last === '"' || last === "'" || last === '`')
  23225. )
  23226. && first !== last
  23227. ) {
  23228. throw new $SyntaxError('property names with quotes must have matching quotes');
  23229. }
  23230. if (part === 'constructor' || !isOwn) {
  23231. skipFurtherCaching = true;
  23232. }
  23233. intrinsicBaseName += '.' + part;
  23234. intrinsicRealName = '%' + intrinsicBaseName + '%';
  23235. if (hasOwn(INTRINSICS, intrinsicRealName)) {
  23236. value = INTRINSICS[intrinsicRealName];
  23237. } else if (value != null) {
  23238. if (!(part in value)) {
  23239. if (!allowMissing) {
  23240. throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
  23241. }
  23242. return void undefined;
  23243. }
  23244. if ($gOPD && (i + 1) >= parts.length) {
  23245. var desc = $gOPD(value, part);
  23246. isOwn = !!desc;
  23247. // By convention, when a data property is converted to an accessor
  23248. // property to emulate a data property that does not suffer from
  23249. // the override mistake, that accessor's getter is marked with
  23250. // an `originalValue` property. Here, when we detect this, we
  23251. // uphold the illusion by pretending to see that original data
  23252. // property, i.e., returning the value rather than the getter
  23253. // itself.
  23254. if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
  23255. value = desc.get;
  23256. } else {
  23257. value = value[part];
  23258. }
  23259. } else {
  23260. isOwn = hasOwn(value, part);
  23261. value = value[part];
  23262. }
  23263. if (isOwn && !skipFurtherCaching) {
  23264. INTRINSICS[intrinsicRealName] = value;
  23265. }
  23266. }
  23267. }
  23268. return value;
  23269. };
  23270. /***/ }),
  23271. /* 83 */
  23272. /*!*******************************************!*\
  23273. !*** ./node_modules/has-symbols/index.js ***!
  23274. \*******************************************/
  23275. /*! no static exports found */
  23276. /***/ (function(module, exports, __webpack_require__) {
  23277. "use strict";
  23278. var origSymbol = typeof Symbol !== 'undefined' && Symbol;
  23279. var hasSymbolSham = __webpack_require__(/*! ./shams */ 84);
  23280. module.exports = function hasNativeSymbols() {
  23281. if (typeof origSymbol !== 'function') { return false; }
  23282. if (typeof Symbol !== 'function') { return false; }
  23283. if (typeof origSymbol('foo') !== 'symbol') { return false; }
  23284. if (typeof Symbol('bar') !== 'symbol') { return false; }
  23285. return hasSymbolSham();
  23286. };
  23287. /***/ }),
  23288. /* 84 */
  23289. /*!*******************************************!*\
  23290. !*** ./node_modules/has-symbols/shams.js ***!
  23291. \*******************************************/
  23292. /*! no static exports found */
  23293. /***/ (function(module, exports, __webpack_require__) {
  23294. "use strict";
  23295. /* eslint complexity: [2, 18], max-statements: [2, 33] */
  23296. module.exports = function hasSymbols() {
  23297. if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
  23298. if (typeof Symbol.iterator === 'symbol') { return true; }
  23299. var obj = {};
  23300. var sym = Symbol('test');
  23301. var symObj = Object(sym);
  23302. if (typeof sym === 'string') { return false; }
  23303. if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
  23304. if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
  23305. // temp disabled per https://github.com/ljharb/object.assign/issues/17
  23306. // if (sym instanceof Symbol) { return false; }
  23307. // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
  23308. // if (!(symObj instanceof Symbol)) { return false; }
  23309. // if (typeof Symbol.prototype.toString !== 'function') { return false; }
  23310. // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
  23311. var symVal = 42;
  23312. obj[sym] = symVal;
  23313. for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
  23314. if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
  23315. if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
  23316. var syms = Object.getOwnPropertySymbols(obj);
  23317. if (syms.length !== 1 || syms[0] !== sym) { return false; }
  23318. if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
  23319. if (typeof Object.getOwnPropertyDescriptor === 'function') {
  23320. var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
  23321. if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
  23322. }
  23323. return true;
  23324. };
  23325. /***/ }),
  23326. /* 85 */
  23327. /*!*********************************************!*\
  23328. !*** ./node_modules/function-bind/index.js ***!
  23329. \*********************************************/
  23330. /*! no static exports found */
  23331. /***/ (function(module, exports, __webpack_require__) {
  23332. "use strict";
  23333. var implementation = __webpack_require__(/*! ./implementation */ 86);
  23334. module.exports = Function.prototype.bind || implementation;
  23335. /***/ }),
  23336. /* 86 */
  23337. /*!******************************************************!*\
  23338. !*** ./node_modules/function-bind/implementation.js ***!
  23339. \******************************************************/
  23340. /*! no static exports found */
  23341. /***/ (function(module, exports, __webpack_require__) {
  23342. "use strict";
  23343. /* eslint no-invalid-this: 1 */
  23344. var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
  23345. var slice = Array.prototype.slice;
  23346. var toStr = Object.prototype.toString;
  23347. var funcType = '[object Function]';
  23348. module.exports = function bind(that) {
  23349. var target = this;
  23350. if (typeof target !== 'function' || toStr.call(target) !== funcType) {
  23351. throw new TypeError(ERROR_MESSAGE + target);
  23352. }
  23353. var args = slice.call(arguments, 1);
  23354. var bound;
  23355. var binder = function () {
  23356. if (this instanceof bound) {
  23357. var result = target.apply(
  23358. this,
  23359. args.concat(slice.call(arguments))
  23360. );
  23361. if (Object(result) === result) {
  23362. return result;
  23363. }
  23364. return this;
  23365. } else {
  23366. return target.apply(
  23367. that,
  23368. args.concat(slice.call(arguments))
  23369. );
  23370. }
  23371. };
  23372. var boundLength = Math.max(0, target.length - args.length);
  23373. var boundArgs = [];
  23374. for (var i = 0; i < boundLength; i++) {
  23375. boundArgs.push('$' + i);
  23376. }
  23377. bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
  23378. if (target.prototype) {
  23379. var Empty = function Empty() {};
  23380. Empty.prototype = target.prototype;
  23381. bound.prototype = new Empty();
  23382. Empty.prototype = null;
  23383. }
  23384. return bound;
  23385. };
  23386. /***/ }),
  23387. /* 87 */
  23388. /*!***************************************!*\
  23389. !*** ./node_modules/has/src/index.js ***!
  23390. \***************************************/
  23391. /*! no static exports found */
  23392. /***/ (function(module, exports, __webpack_require__) {
  23393. "use strict";
  23394. var bind = __webpack_require__(/*! function-bind */ 85);
  23395. module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
  23396. /***/ }),
  23397. /* 88 */
  23398. /*!*********************************************!*\
  23399. !*** ./node_modules/call-bind/callBound.js ***!
  23400. \*********************************************/
  23401. /*! no static exports found */
  23402. /***/ (function(module, exports, __webpack_require__) {
  23403. "use strict";
  23404. var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 82);
  23405. var callBind = __webpack_require__(/*! ./ */ 89);
  23406. var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
  23407. module.exports = function callBoundIntrinsic(name, allowMissing) {
  23408. var intrinsic = GetIntrinsic(name, !!allowMissing);
  23409. if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
  23410. return callBind(intrinsic);
  23411. }
  23412. return intrinsic;
  23413. };
  23414. /***/ }),
  23415. /* 89 */
  23416. /*!*****************************************!*\
  23417. !*** ./node_modules/call-bind/index.js ***!
  23418. \*****************************************/
  23419. /*! no static exports found */
  23420. /***/ (function(module, exports, __webpack_require__) {
  23421. "use strict";
  23422. var bind = __webpack_require__(/*! function-bind */ 85);
  23423. var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 82);
  23424. var $apply = GetIntrinsic('%Function.prototype.apply%');
  23425. var $call = GetIntrinsic('%Function.prototype.call%');
  23426. var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
  23427. var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
  23428. var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
  23429. var $max = GetIntrinsic('%Math.max%');
  23430. if ($defineProperty) {
  23431. try {
  23432. $defineProperty({}, 'a', { value: 1 });
  23433. } catch (e) {
  23434. // IE 8 has a broken defineProperty
  23435. $defineProperty = null;
  23436. }
  23437. }
  23438. module.exports = function callBind(originalFunction) {
  23439. var func = $reflectApply(bind, $call, arguments);
  23440. if ($gOPD && $defineProperty) {
  23441. var desc = $gOPD(func, 'length');
  23442. if (desc.configurable) {
  23443. // original length, plus the receiver, minus any additional arguments (after the receiver)
  23444. $defineProperty(
  23445. func,
  23446. 'length',
  23447. { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
  23448. );
  23449. }
  23450. }
  23451. return func;
  23452. };
  23453. var applyBind = function applyBind() {
  23454. return $reflectApply(bind, $apply, arguments);
  23455. };
  23456. if ($defineProperty) {
  23457. $defineProperty(module.exports, 'apply', { value: applyBind });
  23458. } else {
  23459. module.exports.apply = applyBind;
  23460. }
  23461. /***/ }),
  23462. /* 90 */
  23463. /*!**********************************************!*\
  23464. !*** ./node_modules/object-inspect/index.js ***!
  23465. \**********************************************/
  23466. /*! no static exports found */
  23467. /***/ (function(module, exports, __webpack_require__) {
  23468. var hasMap = typeof Map === 'function' && Map.prototype;
  23469. var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
  23470. var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
  23471. var mapForEach = hasMap && Map.prototype.forEach;
  23472. var hasSet = typeof Set === 'function' && Set.prototype;
  23473. var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
  23474. var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
  23475. var setForEach = hasSet && Set.prototype.forEach;
  23476. var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
  23477. var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
  23478. var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
  23479. var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
  23480. var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
  23481. var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
  23482. var booleanValueOf = Boolean.prototype.valueOf;
  23483. var objectToString = Object.prototype.toString;
  23484. var functionToString = Function.prototype.toString;
  23485. var $match = String.prototype.match;
  23486. var $slice = String.prototype.slice;
  23487. var $replace = String.prototype.replace;
  23488. var $toUpperCase = String.prototype.toUpperCase;
  23489. var $toLowerCase = String.prototype.toLowerCase;
  23490. var $test = RegExp.prototype.test;
  23491. var $concat = Array.prototype.concat;
  23492. var $join = Array.prototype.join;
  23493. var $arrSlice = Array.prototype.slice;
  23494. var $floor = Math.floor;
  23495. var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
  23496. var gOPS = Object.getOwnPropertySymbols;
  23497. var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
  23498. var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
  23499. // ie, `has-tostringtag/shams
  23500. var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
  23501. ? Symbol.toStringTag
  23502. : null;
  23503. var isEnumerable = Object.prototype.propertyIsEnumerable;
  23504. var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
  23505. [].__proto__ === Array.prototype // eslint-disable-line no-proto
  23506. ? function (O) {
  23507. return O.__proto__; // eslint-disable-line no-proto
  23508. }
  23509. : null
  23510. );
  23511. function addNumericSeparator(num, str) {
  23512. if (
  23513. num === Infinity
  23514. || num === -Infinity
  23515. || num !== num
  23516. || (num && num > -1000 && num < 1000)
  23517. || $test.call(/e/, str)
  23518. ) {
  23519. return str;
  23520. }
  23521. var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
  23522. if (typeof num === 'number') {
  23523. var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
  23524. if (int !== num) {
  23525. var intStr = String(int);
  23526. var dec = $slice.call(str, intStr.length + 1);
  23527. return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
  23528. }
  23529. }
  23530. return $replace.call(str, sepRegex, '$&_');
  23531. }
  23532. var utilInspect = __webpack_require__(/*! ./util.inspect */ 91);
  23533. var inspectCustom = utilInspect.custom;
  23534. var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
  23535. module.exports = function inspect_(obj, options, depth, seen) {
  23536. var opts = options || {};
  23537. if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
  23538. throw new TypeError('option "quoteStyle" must be "single" or "double"');
  23539. }
  23540. if (
  23541. has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
  23542. ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
  23543. : opts.maxStringLength !== null
  23544. )
  23545. ) {
  23546. throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
  23547. }
  23548. var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
  23549. if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
  23550. throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
  23551. }
  23552. if (
  23553. has(opts, 'indent')
  23554. && opts.indent !== null
  23555. && opts.indent !== '\t'
  23556. && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
  23557. ) {
  23558. throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
  23559. }
  23560. if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
  23561. throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
  23562. }
  23563. var numericSeparator = opts.numericSeparator;
  23564. if (typeof obj === 'undefined') {
  23565. return 'undefined';
  23566. }
  23567. if (obj === null) {
  23568. return 'null';
  23569. }
  23570. if (typeof obj === 'boolean') {
  23571. return obj ? 'true' : 'false';
  23572. }
  23573. if (typeof obj === 'string') {
  23574. return inspectString(obj, opts);
  23575. }
  23576. if (typeof obj === 'number') {
  23577. if (obj === 0) {
  23578. return Infinity / obj > 0 ? '0' : '-0';
  23579. }
  23580. var str = String(obj);
  23581. return numericSeparator ? addNumericSeparator(obj, str) : str;
  23582. }
  23583. if (typeof obj === 'bigint') {
  23584. var bigIntStr = String(obj) + 'n';
  23585. return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
  23586. }
  23587. var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
  23588. if (typeof depth === 'undefined') { depth = 0; }
  23589. if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
  23590. return isArray(obj) ? '[Array]' : '[Object]';
  23591. }
  23592. var indent = getIndent(opts, depth);
  23593. if (typeof seen === 'undefined') {
  23594. seen = [];
  23595. } else if (indexOf(seen, obj) >= 0) {
  23596. return '[Circular]';
  23597. }
  23598. function inspect(value, from, noIndent) {
  23599. if (from) {
  23600. seen = $arrSlice.call(seen);
  23601. seen.push(from);
  23602. }
  23603. if (noIndent) {
  23604. var newOpts = {
  23605. depth: opts.depth
  23606. };
  23607. if (has(opts, 'quoteStyle')) {
  23608. newOpts.quoteStyle = opts.quoteStyle;
  23609. }
  23610. return inspect_(value, newOpts, depth + 1, seen);
  23611. }
  23612. return inspect_(value, opts, depth + 1, seen);
  23613. }
  23614. if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable
  23615. var name = nameOf(obj);
  23616. var keys = arrObjKeys(obj, inspect);
  23617. return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
  23618. }
  23619. if (isSymbol(obj)) {
  23620. var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
  23621. return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
  23622. }
  23623. if (isElement(obj)) {
  23624. var s = '<' + $toLowerCase.call(String(obj.nodeName));
  23625. var attrs = obj.attributes || [];
  23626. for (var i = 0; i < attrs.length; i++) {
  23627. s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
  23628. }
  23629. s += '>';
  23630. if (obj.childNodes && obj.childNodes.length) { s += '...'; }
  23631. s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
  23632. return s;
  23633. }
  23634. if (isArray(obj)) {
  23635. if (obj.length === 0) { return '[]'; }
  23636. var xs = arrObjKeys(obj, inspect);
  23637. if (indent && !singleLineValues(xs)) {
  23638. return '[' + indentedJoin(xs, indent) + ']';
  23639. }
  23640. return '[ ' + $join.call(xs, ', ') + ' ]';
  23641. }
  23642. if (isError(obj)) {
  23643. var parts = arrObjKeys(obj, inspect);
  23644. if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
  23645. return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
  23646. }
  23647. if (parts.length === 0) { return '[' + String(obj) + ']'; }
  23648. return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
  23649. }
  23650. if (typeof obj === 'object' && customInspect) {
  23651. if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
  23652. return utilInspect(obj, { depth: maxDepth - depth });
  23653. } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
  23654. return obj.inspect();
  23655. }
  23656. }
  23657. if (isMap(obj)) {
  23658. var mapParts = [];
  23659. mapForEach.call(obj, function (value, key) {
  23660. mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
  23661. });
  23662. return collectionOf('Map', mapSize.call(obj), mapParts, indent);
  23663. }
  23664. if (isSet(obj)) {
  23665. var setParts = [];
  23666. setForEach.call(obj, function (value) {
  23667. setParts.push(inspect(value, obj));
  23668. });
  23669. return collectionOf('Set', setSize.call(obj), setParts, indent);
  23670. }
  23671. if (isWeakMap(obj)) {
  23672. return weakCollectionOf('WeakMap');
  23673. }
  23674. if (isWeakSet(obj)) {
  23675. return weakCollectionOf('WeakSet');
  23676. }
  23677. if (isWeakRef(obj)) {
  23678. return weakCollectionOf('WeakRef');
  23679. }
  23680. if (isNumber(obj)) {
  23681. return markBoxed(inspect(Number(obj)));
  23682. }
  23683. if (isBigInt(obj)) {
  23684. return markBoxed(inspect(bigIntValueOf.call(obj)));
  23685. }
  23686. if (isBoolean(obj)) {
  23687. return markBoxed(booleanValueOf.call(obj));
  23688. }
  23689. if (isString(obj)) {
  23690. return markBoxed(inspect(String(obj)));
  23691. }
  23692. if (!isDate(obj) && !isRegExp(obj)) {
  23693. var ys = arrObjKeys(obj, inspect);
  23694. var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
  23695. var protoTag = obj instanceof Object ? '' : 'null prototype';
  23696. var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
  23697. var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
  23698. var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
  23699. if (ys.length === 0) { return tag + '{}'; }
  23700. if (indent) {
  23701. return tag + '{' + indentedJoin(ys, indent) + '}';
  23702. }
  23703. return tag + '{ ' + $join.call(ys, ', ') + ' }';
  23704. }
  23705. return String(obj);
  23706. };
  23707. function wrapQuotes(s, defaultStyle, opts) {
  23708. var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
  23709. return quoteChar + s + quoteChar;
  23710. }
  23711. function quote(s) {
  23712. return $replace.call(String(s), /"/g, '&quot;');
  23713. }
  23714. function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  23715. function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  23716. function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  23717. function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  23718. function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  23719. function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  23720. function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  23721. // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
  23722. function isSymbol(obj) {
  23723. if (hasShammedSymbols) {
  23724. return obj && typeof obj === 'object' && obj instanceof Symbol;
  23725. }
  23726. if (typeof obj === 'symbol') {
  23727. return true;
  23728. }
  23729. if (!obj || typeof obj !== 'object' || !symToString) {
  23730. return false;
  23731. }
  23732. try {
  23733. symToString.call(obj);
  23734. return true;
  23735. } catch (e) {}
  23736. return false;
  23737. }
  23738. function isBigInt(obj) {
  23739. if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
  23740. return false;
  23741. }
  23742. try {
  23743. bigIntValueOf.call(obj);
  23744. return true;
  23745. } catch (e) {}
  23746. return false;
  23747. }
  23748. var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
  23749. function has(obj, key) {
  23750. return hasOwn.call(obj, key);
  23751. }
  23752. function toStr(obj) {
  23753. return objectToString.call(obj);
  23754. }
  23755. function nameOf(f) {
  23756. if (f.name) { return f.name; }
  23757. var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
  23758. if (m) { return m[1]; }
  23759. return null;
  23760. }
  23761. function indexOf(xs, x) {
  23762. if (xs.indexOf) { return xs.indexOf(x); }
  23763. for (var i = 0, l = xs.length; i < l; i++) {
  23764. if (xs[i] === x) { return i; }
  23765. }
  23766. return -1;
  23767. }
  23768. function isMap(x) {
  23769. if (!mapSize || !x || typeof x !== 'object') {
  23770. return false;
  23771. }
  23772. try {
  23773. mapSize.call(x);
  23774. try {
  23775. setSize.call(x);
  23776. } catch (s) {
  23777. return true;
  23778. }
  23779. return x instanceof Map; // core-js workaround, pre-v2.5.0
  23780. } catch (e) {}
  23781. return false;
  23782. }
  23783. function isWeakMap(x) {
  23784. if (!weakMapHas || !x || typeof x !== 'object') {
  23785. return false;
  23786. }
  23787. try {
  23788. weakMapHas.call(x, weakMapHas);
  23789. try {
  23790. weakSetHas.call(x, weakSetHas);
  23791. } catch (s) {
  23792. return true;
  23793. }
  23794. return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
  23795. } catch (e) {}
  23796. return false;
  23797. }
  23798. function isWeakRef(x) {
  23799. if (!weakRefDeref || !x || typeof x !== 'object') {
  23800. return false;
  23801. }
  23802. try {
  23803. weakRefDeref.call(x);
  23804. return true;
  23805. } catch (e) {}
  23806. return false;
  23807. }
  23808. function isSet(x) {
  23809. if (!setSize || !x || typeof x !== 'object') {
  23810. return false;
  23811. }
  23812. try {
  23813. setSize.call(x);
  23814. try {
  23815. mapSize.call(x);
  23816. } catch (m) {
  23817. return true;
  23818. }
  23819. return x instanceof Set; // core-js workaround, pre-v2.5.0
  23820. } catch (e) {}
  23821. return false;
  23822. }
  23823. function isWeakSet(x) {
  23824. if (!weakSetHas || !x || typeof x !== 'object') {
  23825. return false;
  23826. }
  23827. try {
  23828. weakSetHas.call(x, weakSetHas);
  23829. try {
  23830. weakMapHas.call(x, weakMapHas);
  23831. } catch (s) {
  23832. return true;
  23833. }
  23834. return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
  23835. } catch (e) {}
  23836. return false;
  23837. }
  23838. function isElement(x) {
  23839. if (!x || typeof x !== 'object') { return false; }
  23840. if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
  23841. return true;
  23842. }
  23843. return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
  23844. }
  23845. function inspectString(str, opts) {
  23846. if (str.length > opts.maxStringLength) {
  23847. var remaining = str.length - opts.maxStringLength;
  23848. var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
  23849. return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
  23850. }
  23851. // eslint-disable-next-line no-control-regex
  23852. var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
  23853. return wrapQuotes(s, 'single', opts);
  23854. }
  23855. function lowbyte(c) {
  23856. var n = c.charCodeAt(0);
  23857. var x = {
  23858. 8: 'b',
  23859. 9: 't',
  23860. 10: 'n',
  23861. 12: 'f',
  23862. 13: 'r'
  23863. }[n];
  23864. if (x) { return '\\' + x; }
  23865. return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
  23866. }
  23867. function markBoxed(str) {
  23868. return 'Object(' + str + ')';
  23869. }
  23870. function weakCollectionOf(type) {
  23871. return type + ' { ? }';
  23872. }
  23873. function collectionOf(type, size, entries, indent) {
  23874. var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
  23875. return type + ' (' + size + ') {' + joinedEntries + '}';
  23876. }
  23877. function singleLineValues(xs) {
  23878. for (var i = 0; i < xs.length; i++) {
  23879. if (indexOf(xs[i], '\n') >= 0) {
  23880. return false;
  23881. }
  23882. }
  23883. return true;
  23884. }
  23885. function getIndent(opts, depth) {
  23886. var baseIndent;
  23887. if (opts.indent === '\t') {
  23888. baseIndent = '\t';
  23889. } else if (typeof opts.indent === 'number' && opts.indent > 0) {
  23890. baseIndent = $join.call(Array(opts.indent + 1), ' ');
  23891. } else {
  23892. return null;
  23893. }
  23894. return {
  23895. base: baseIndent,
  23896. prev: $join.call(Array(depth + 1), baseIndent)
  23897. };
  23898. }
  23899. function indentedJoin(xs, indent) {
  23900. if (xs.length === 0) { return ''; }
  23901. var lineJoiner = '\n' + indent.prev + indent.base;
  23902. return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
  23903. }
  23904. function arrObjKeys(obj, inspect) {
  23905. var isArr = isArray(obj);
  23906. var xs = [];
  23907. if (isArr) {
  23908. xs.length = obj.length;
  23909. for (var i = 0; i < obj.length; i++) {
  23910. xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
  23911. }
  23912. }
  23913. var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
  23914. var symMap;
  23915. if (hasShammedSymbols) {
  23916. symMap = {};
  23917. for (var k = 0; k < syms.length; k++) {
  23918. symMap['$' + syms[k]] = syms[k];
  23919. }
  23920. }
  23921. for (var key in obj) { // eslint-disable-line no-restricted-syntax
  23922. if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
  23923. if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
  23924. if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
  23925. // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
  23926. continue; // eslint-disable-line no-restricted-syntax, no-continue
  23927. } else if ($test.call(/[^\w$]/, key)) {
  23928. xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
  23929. } else {
  23930. xs.push(key + ': ' + inspect(obj[key], obj));
  23931. }
  23932. }
  23933. if (typeof gOPS === 'function') {
  23934. for (var j = 0; j < syms.length; j++) {
  23935. if (isEnumerable.call(obj, syms[j])) {
  23936. xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
  23937. }
  23938. }
  23939. }
  23940. return xs;
  23941. }
  23942. /***/ }),
  23943. /* 91 */
  23944. /*!********************************!*\
  23945. !*** ./util.inspect (ignored) ***!
  23946. \********************************/
  23947. /*! no static exports found */
  23948. /***/ (function(module, exports) {
  23949. /* (ignored) */
  23950. /***/ }),
  23951. /* 92 */
  23952. /*!**************************************!*\
  23953. !*** ./node_modules/qs/lib/utils.js ***!
  23954. \**************************************/
  23955. /*! no static exports found */
  23956. /***/ (function(module, exports, __webpack_require__) {
  23957. "use strict";
  23958. var formats = __webpack_require__(/*! ./formats */ 93);
  23959. var has = Object.prototype.hasOwnProperty;
  23960. var isArray = Array.isArray;
  23961. var hexTable = (function () {
  23962. var array = [];
  23963. for (var i = 0; i < 256; ++i) {
  23964. array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
  23965. }
  23966. return array;
  23967. }());
  23968. var compactQueue = function compactQueue(queue) {
  23969. while (queue.length > 1) {
  23970. var item = queue.pop();
  23971. var obj = item.obj[item.prop];
  23972. if (isArray(obj)) {
  23973. var compacted = [];
  23974. for (var j = 0; j < obj.length; ++j) {
  23975. if (typeof obj[j] !== 'undefined') {
  23976. compacted.push(obj[j]);
  23977. }
  23978. }
  23979. item.obj[item.prop] = compacted;
  23980. }
  23981. }
  23982. };
  23983. var arrayToObject = function arrayToObject(source, options) {
  23984. var obj = options && options.plainObjects ? Object.create(null) : {};
  23985. for (var i = 0; i < source.length; ++i) {
  23986. if (typeof source[i] !== 'undefined') {
  23987. obj[i] = source[i];
  23988. }
  23989. }
  23990. return obj;
  23991. };
  23992. var merge = function merge(target, source, options) {
  23993. /* eslint no-param-reassign: 0 */
  23994. if (!source) {
  23995. return target;
  23996. }
  23997. if (typeof source !== 'object') {
  23998. if (isArray(target)) {
  23999. target.push(source);
  24000. } else if (target && typeof target === 'object') {
  24001. if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
  24002. target[source] = true;
  24003. }
  24004. } else {
  24005. return [target, source];
  24006. }
  24007. return target;
  24008. }
  24009. if (!target || typeof target !== 'object') {
  24010. return [target].concat(source);
  24011. }
  24012. var mergeTarget = target;
  24013. if (isArray(target) && !isArray(source)) {
  24014. mergeTarget = arrayToObject(target, options);
  24015. }
  24016. if (isArray(target) && isArray(source)) {
  24017. source.forEach(function (item, i) {
  24018. if (has.call(target, i)) {
  24019. var targetItem = target[i];
  24020. if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
  24021. target[i] = merge(targetItem, item, options);
  24022. } else {
  24023. target.push(item);
  24024. }
  24025. } else {
  24026. target[i] = item;
  24027. }
  24028. });
  24029. return target;
  24030. }
  24031. return Object.keys(source).reduce(function (acc, key) {
  24032. var value = source[key];
  24033. if (has.call(acc, key)) {
  24034. acc[key] = merge(acc[key], value, options);
  24035. } else {
  24036. acc[key] = value;
  24037. }
  24038. return acc;
  24039. }, mergeTarget);
  24040. };
  24041. var assign = function assignSingleSource(target, source) {
  24042. return Object.keys(source).reduce(function (acc, key) {
  24043. acc[key] = source[key];
  24044. return acc;
  24045. }, target);
  24046. };
  24047. var decode = function (str, decoder, charset) {
  24048. var strWithoutPlus = str.replace(/\+/g, ' ');
  24049. if (charset === 'iso-8859-1') {
  24050. // unescape never throws, no try...catch needed:
  24051. return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
  24052. }
  24053. // utf-8
  24054. try {
  24055. return decodeURIComponent(strWithoutPlus);
  24056. } catch (e) {
  24057. return strWithoutPlus;
  24058. }
  24059. };
  24060. var encode = function encode(str, defaultEncoder, charset, kind, format) {
  24061. // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
  24062. // It has been adapted here for stricter adherence to RFC 3986
  24063. if (str.length === 0) {
  24064. return str;
  24065. }
  24066. var string = str;
  24067. if (typeof str === 'symbol') {
  24068. string = Symbol.prototype.toString.call(str);
  24069. } else if (typeof str !== 'string') {
  24070. string = String(str);
  24071. }
  24072. if (charset === 'iso-8859-1') {
  24073. return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
  24074. return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
  24075. });
  24076. }
  24077. var out = '';
  24078. for (var i = 0; i < string.length; ++i) {
  24079. var c = string.charCodeAt(i);
  24080. if (
  24081. c === 0x2D // -
  24082. || c === 0x2E // .
  24083. || c === 0x5F // _
  24084. || c === 0x7E // ~
  24085. || (c >= 0x30 && c <= 0x39) // 0-9
  24086. || (c >= 0x41 && c <= 0x5A) // a-z
  24087. || (c >= 0x61 && c <= 0x7A) // A-Z
  24088. || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
  24089. ) {
  24090. out += string.charAt(i);
  24091. continue;
  24092. }
  24093. if (c < 0x80) {
  24094. out = out + hexTable[c];
  24095. continue;
  24096. }
  24097. if (c < 0x800) {
  24098. out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
  24099. continue;
  24100. }
  24101. if (c < 0xD800 || c >= 0xE000) {
  24102. out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
  24103. continue;
  24104. }
  24105. i += 1;
  24106. c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
  24107. /* eslint operator-linebreak: [2, "before"] */
  24108. out += hexTable[0xF0 | (c >> 18)]
  24109. + hexTable[0x80 | ((c >> 12) & 0x3F)]
  24110. + hexTable[0x80 | ((c >> 6) & 0x3F)]
  24111. + hexTable[0x80 | (c & 0x3F)];
  24112. }
  24113. return out;
  24114. };
  24115. var compact = function compact(value) {
  24116. var queue = [{ obj: { o: value }, prop: 'o' }];
  24117. var refs = [];
  24118. for (var i = 0; i < queue.length; ++i) {
  24119. var item = queue[i];
  24120. var obj = item.obj[item.prop];
  24121. var keys = Object.keys(obj);
  24122. for (var j = 0; j < keys.length; ++j) {
  24123. var key = keys[j];
  24124. var val = obj[key];
  24125. if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
  24126. queue.push({ obj: obj, prop: key });
  24127. refs.push(val);
  24128. }
  24129. }
  24130. }
  24131. compactQueue(queue);
  24132. return value;
  24133. };
  24134. var isRegExp = function isRegExp(obj) {
  24135. return Object.prototype.toString.call(obj) === '[object RegExp]';
  24136. };
  24137. var isBuffer = function isBuffer(obj) {
  24138. if (!obj || typeof obj !== 'object') {
  24139. return false;
  24140. }
  24141. return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
  24142. };
  24143. var combine = function combine(a, b) {
  24144. return [].concat(a, b);
  24145. };
  24146. var maybeMap = function maybeMap(val, fn) {
  24147. if (isArray(val)) {
  24148. var mapped = [];
  24149. for (var i = 0; i < val.length; i += 1) {
  24150. mapped.push(fn(val[i]));
  24151. }
  24152. return mapped;
  24153. }
  24154. return fn(val);
  24155. };
  24156. module.exports = {
  24157. arrayToObject: arrayToObject,
  24158. assign: assign,
  24159. combine: combine,
  24160. compact: compact,
  24161. decode: decode,
  24162. encode: encode,
  24163. isBuffer: isBuffer,
  24164. isRegExp: isRegExp,
  24165. maybeMap: maybeMap,
  24166. merge: merge
  24167. };
  24168. /***/ }),
  24169. /* 93 */
  24170. /*!****************************************!*\
  24171. !*** ./node_modules/qs/lib/formats.js ***!
  24172. \****************************************/
  24173. /*! no static exports found */
  24174. /***/ (function(module, exports, __webpack_require__) {
  24175. "use strict";
  24176. var replace = String.prototype.replace;
  24177. var percentTwenties = /%20/g;
  24178. var Format = {
  24179. RFC1738: 'RFC1738',
  24180. RFC3986: 'RFC3986'
  24181. };
  24182. module.exports = {
  24183. 'default': Format.RFC3986,
  24184. formatters: {
  24185. RFC1738: function (value) {
  24186. return replace.call(value, percentTwenties, '+');
  24187. },
  24188. RFC3986: function (value) {
  24189. return String(value);
  24190. }
  24191. },
  24192. RFC1738: Format.RFC1738,
  24193. RFC3986: Format.RFC3986
  24194. };
  24195. /***/ }),
  24196. /* 94 */
  24197. /*!**************************************!*\
  24198. !*** ./node_modules/qs/lib/parse.js ***!
  24199. \**************************************/
  24200. /*! no static exports found */
  24201. /***/ (function(module, exports, __webpack_require__) {
  24202. "use strict";
  24203. var utils = __webpack_require__(/*! ./utils */ 92);
  24204. var has = Object.prototype.hasOwnProperty;
  24205. var isArray = Array.isArray;
  24206. var defaults = {
  24207. allowDots: false,
  24208. allowPrototypes: false,
  24209. allowSparse: false,
  24210. arrayLimit: 20,
  24211. charset: 'utf-8',
  24212. charsetSentinel: false,
  24213. comma: false,
  24214. decoder: utils.decode,
  24215. delimiter: '&',
  24216. depth: 5,
  24217. ignoreQueryPrefix: false,
  24218. interpretNumericEntities: false,
  24219. parameterLimit: 1000,
  24220. parseArrays: true,
  24221. plainObjects: false,
  24222. strictNullHandling: false
  24223. };
  24224. var interpretNumericEntities = function (str) {
  24225. return str.replace(/&#(\d+);/g, function ($0, numberStr) {
  24226. return String.fromCharCode(parseInt(numberStr, 10));
  24227. });
  24228. };
  24229. var parseArrayValue = function (val, options) {
  24230. if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
  24231. return val.split(',');
  24232. }
  24233. return val;
  24234. };
  24235. // This is what browsers will submit when the ✓ character occurs in an
  24236. // application/x-www-form-urlencoded body and the encoding of the page containing
  24237. // the form is iso-8859-1, or when the submitted form has an accept-charset
  24238. // attribute of iso-8859-1. Presumably also with other charsets that do not contain
  24239. // the ✓ character, such as us-ascii.
  24240. var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
  24241. // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
  24242. var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
  24243. var parseValues = function parseQueryStringValues(str, options) {
  24244. var obj = {};
  24245. var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
  24246. var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
  24247. var parts = cleanStr.split(options.delimiter, limit);
  24248. var skipIndex = -1; // Keep track of where the utf8 sentinel was found
  24249. var i;
  24250. var charset = options.charset;
  24251. if (options.charsetSentinel) {
  24252. for (i = 0; i < parts.length; ++i) {
  24253. if (parts[i].indexOf('utf8=') === 0) {
  24254. if (parts[i] === charsetSentinel) {
  24255. charset = 'utf-8';
  24256. } else if (parts[i] === isoSentinel) {
  24257. charset = 'iso-8859-1';
  24258. }
  24259. skipIndex = i;
  24260. i = parts.length; // The eslint settings do not allow break;
  24261. }
  24262. }
  24263. }
  24264. for (i = 0; i < parts.length; ++i) {
  24265. if (i === skipIndex) {
  24266. continue;
  24267. }
  24268. var part = parts[i];
  24269. var bracketEqualsPos = part.indexOf(']=');
  24270. var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
  24271. var key, val;
  24272. if (pos === -1) {
  24273. key = options.decoder(part, defaults.decoder, charset, 'key');
  24274. val = options.strictNullHandling ? null : '';
  24275. } else {
  24276. key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
  24277. val = utils.maybeMap(
  24278. parseArrayValue(part.slice(pos + 1), options),
  24279. function (encodedVal) {
  24280. return options.decoder(encodedVal, defaults.decoder, charset, 'value');
  24281. }
  24282. );
  24283. }
  24284. if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
  24285. val = interpretNumericEntities(val);
  24286. }
  24287. if (part.indexOf('[]=') > -1) {
  24288. val = isArray(val) ? [val] : val;
  24289. }
  24290. if (has.call(obj, key)) {
  24291. obj[key] = utils.combine(obj[key], val);
  24292. } else {
  24293. obj[key] = val;
  24294. }
  24295. }
  24296. return obj;
  24297. };
  24298. var parseObject = function (chain, val, options, valuesParsed) {
  24299. var leaf = valuesParsed ? val : parseArrayValue(val, options);
  24300. for (var i = chain.length - 1; i >= 0; --i) {
  24301. var obj;
  24302. var root = chain[i];
  24303. if (root === '[]' && options.parseArrays) {
  24304. obj = [].concat(leaf);
  24305. } else {
  24306. obj = options.plainObjects ? Object.create(null) : {};
  24307. var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
  24308. var index = parseInt(cleanRoot, 10);
  24309. if (!options.parseArrays && cleanRoot === '') {
  24310. obj = { 0: leaf };
  24311. } else if (
  24312. !isNaN(index)
  24313. && root !== cleanRoot
  24314. && String(index) === cleanRoot
  24315. && index >= 0
  24316. && (options.parseArrays && index <= options.arrayLimit)
  24317. ) {
  24318. obj = [];
  24319. obj[index] = leaf;
  24320. } else if (cleanRoot !== '__proto__') {
  24321. obj[cleanRoot] = leaf;
  24322. }
  24323. }
  24324. leaf = obj;
  24325. }
  24326. return leaf;
  24327. };
  24328. var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
  24329. if (!givenKey) {
  24330. return;
  24331. }
  24332. // Transform dot notation to bracket notation
  24333. var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
  24334. // The regex chunks
  24335. var brackets = /(\[[^[\]]*])/;
  24336. var child = /(\[[^[\]]*])/g;
  24337. // Get the parent
  24338. var segment = options.depth > 0 && brackets.exec(key);
  24339. var parent = segment ? key.slice(0, segment.index) : key;
  24340. // Stash the parent if it exists
  24341. var keys = [];
  24342. if (parent) {
  24343. // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
  24344. if (!options.plainObjects && has.call(Object.prototype, parent)) {
  24345. if (!options.allowPrototypes) {
  24346. return;
  24347. }
  24348. }
  24349. keys.push(parent);
  24350. }
  24351. // Loop through children appending to the array until we hit depth
  24352. var i = 0;
  24353. while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
  24354. i += 1;
  24355. if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
  24356. if (!options.allowPrototypes) {
  24357. return;
  24358. }
  24359. }
  24360. keys.push(segment[1]);
  24361. }
  24362. // If there's a remainder, just add whatever is left
  24363. if (segment) {
  24364. keys.push('[' + key.slice(segment.index) + ']');
  24365. }
  24366. return parseObject(keys, val, options, valuesParsed);
  24367. };
  24368. var normalizeParseOptions = function normalizeParseOptions(opts) {
  24369. if (!opts) {
  24370. return defaults;
  24371. }
  24372. if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
  24373. throw new TypeError('Decoder has to be a function.');
  24374. }
  24375. if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
  24376. throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
  24377. }
  24378. var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
  24379. return {
  24380. allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
  24381. allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
  24382. allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
  24383. arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
  24384. charset: charset,
  24385. charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
  24386. comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
  24387. decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
  24388. delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
  24389. // eslint-disable-next-line no-implicit-coercion, no-extra-parens
  24390. depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
  24391. ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
  24392. interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
  24393. parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
  24394. parseArrays: opts.parseArrays !== false,
  24395. plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
  24396. strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
  24397. };
  24398. };
  24399. module.exports = function (str, opts) {
  24400. var options = normalizeParseOptions(opts);
  24401. if (str === '' || str === null || typeof str === 'undefined') {
  24402. return options.plainObjects ? Object.create(null) : {};
  24403. }
  24404. var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
  24405. var obj = options.plainObjects ? Object.create(null) : {};
  24406. // Iterate over the keys and setup the new object
  24407. var keys = Object.keys(tempObj);
  24408. for (var i = 0; i < keys.length; ++i) {
  24409. var key = keys[i];
  24410. var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
  24411. obj = utils.merge(obj, newObj, options);
  24412. }
  24413. if (options.allowSparse === true) {
  24414. return obj;
  24415. }
  24416. return utils.compact(obj);
  24417. };
  24418. /***/ }),
  24419. /* 95 */
  24420. /*!*************************************************************************!*\
  24421. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/js_sdk/zww-md5/w_md5.js ***!
  24422. \*************************************************************************/
  24423. /*! no static exports found */
  24424. /***/ (function(module, exports, __webpack_require__) {
  24425. "use strict";
  24426. Object.defineProperty(exports, "__esModule", {
  24427. value: true
  24428. });
  24429. exports.default = void 0;
  24430. var w_md5 = {};
  24431. function hex_md5(string, bit) {
  24432. function md5_RotateLeft(lValue, iShiftBits) {
  24433. return lValue << iShiftBits | lValue >>> 32 - iShiftBits;
  24434. }
  24435. function md5_AddUnsigned(lX, lY) {
  24436. var lX4, lY4, lX8, lY8, lResult;
  24437. lX8 = lX & 0x80000000;
  24438. lY8 = lY & 0x80000000;
  24439. lX4 = lX & 0x40000000;
  24440. lY4 = lY & 0x40000000;
  24441. lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
  24442. if (lX4 & lY4) {
  24443. return lResult ^ 0x80000000 ^ lX8 ^ lY8;
  24444. }
  24445. if (lX4 | lY4) {
  24446. if (lResult & 0x40000000) {
  24447. return lResult ^ 0xC0000000 ^ lX8 ^ lY8;
  24448. } else {
  24449. return lResult ^ 0x40000000 ^ lX8 ^ lY8;
  24450. }
  24451. } else {
  24452. return lResult ^ lX8 ^ lY8;
  24453. }
  24454. }
  24455. function md5_F(x, y, z) {
  24456. return x & y | ~x & z;
  24457. }
  24458. function md5_G(x, y, z) {
  24459. return x & z | y & ~z;
  24460. }
  24461. function md5_H(x, y, z) {
  24462. return x ^ y ^ z;
  24463. }
  24464. function md5_I(x, y, z) {
  24465. return y ^ (x | ~z);
  24466. }
  24467. function md5_FF(a, b, c, d, x, s, ac) {
  24468. a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_F(b, c, d), x), ac));
  24469. return md5_AddUnsigned(md5_RotateLeft(a, s), b);
  24470. }
  24471. ;
  24472. function md5_GG(a, b, c, d, x, s, ac) {
  24473. a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_G(b, c, d), x), ac));
  24474. return md5_AddUnsigned(md5_RotateLeft(a, s), b);
  24475. }
  24476. ;
  24477. function md5_HH(a, b, c, d, x, s, ac) {
  24478. a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_H(b, c, d), x), ac));
  24479. return md5_AddUnsigned(md5_RotateLeft(a, s), b);
  24480. }
  24481. ;
  24482. function md5_II(a, b, c, d, x, s, ac) {
  24483. a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_I(b, c, d), x), ac));
  24484. return md5_AddUnsigned(md5_RotateLeft(a, s), b);
  24485. }
  24486. ;
  24487. function md5_ConvertToWordArray(string) {
  24488. var lWordCount;
  24489. var lMessageLength = string.length;
  24490. var lNumberOfWords_temp1 = lMessageLength + 8;
  24491. var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - lNumberOfWords_temp1 % 64) / 64;
  24492. var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16;
  24493. var lWordArray = Array(lNumberOfWords - 1);
  24494. var lBytePosition = 0;
  24495. var lByteCount = 0;
  24496. while (lByteCount < lMessageLength) {
  24497. lWordCount = (lByteCount - lByteCount % 4) / 4;
  24498. lBytePosition = lByteCount % 4 * 8;
  24499. lWordArray[lWordCount] = lWordArray[lWordCount] | string.charCodeAt(lByteCount) << lBytePosition;
  24500. lByteCount++;
  24501. }
  24502. lWordCount = (lByteCount - lByteCount % 4) / 4;
  24503. lBytePosition = lByteCount % 4 * 8;
  24504. lWordArray[lWordCount] = lWordArray[lWordCount] | 0x80 << lBytePosition;
  24505. lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
  24506. lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
  24507. return lWordArray;
  24508. }
  24509. ;
  24510. function md5_WordToHex(lValue) {
  24511. var WordToHexValue = "",
  24512. WordToHexValue_temp = "",
  24513. lByte,
  24514. lCount;
  24515. for (lCount = 0; lCount <= 3; lCount++) {
  24516. lByte = lValue >>> lCount * 8 & 255;
  24517. WordToHexValue_temp = "0" + lByte.toString(16);
  24518. WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2);
  24519. }
  24520. return WordToHexValue;
  24521. }
  24522. ;
  24523. function md5_Utf8Encode(string) {
  24524. string = string.replace(/\r\n/g, "\n");
  24525. var utftext = "";
  24526. for (var n = 0; n < string.length; n++) {
  24527. var c = string.charCodeAt(n);
  24528. if (c < 128) {
  24529. utftext += String.fromCharCode(c);
  24530. } else if (c > 127 && c < 2048) {
  24531. utftext += String.fromCharCode(c >> 6 | 192);
  24532. utftext += String.fromCharCode(c & 63 | 128);
  24533. } else {
  24534. utftext += String.fromCharCode(c >> 12 | 224);
  24535. utftext += String.fromCharCode(c >> 6 & 63 | 128);
  24536. utftext += String.fromCharCode(c & 63 | 128);
  24537. }
  24538. }
  24539. return utftext;
  24540. }
  24541. ;
  24542. var x = Array();
  24543. var k, AA, BB, CC, DD, a, b, c, d;
  24544. var S11 = 7,
  24545. S12 = 12,
  24546. S13 = 17,
  24547. S14 = 22;
  24548. var S21 = 5,
  24549. S22 = 9,
  24550. S23 = 14,
  24551. S24 = 20;
  24552. var S31 = 4,
  24553. S32 = 11,
  24554. S33 = 16,
  24555. S34 = 23;
  24556. var S41 = 6,
  24557. S42 = 10,
  24558. S43 = 15,
  24559. S44 = 21;
  24560. string = md5_Utf8Encode(string);
  24561. x = md5_ConvertToWordArray(string);
  24562. a = 0x67452301;
  24563. b = 0xEFCDAB89;
  24564. c = 0x98BADCFE;
  24565. d = 0x10325476;
  24566. for (k = 0; k < x.length; k += 16) {
  24567. AA = a;
  24568. BB = b;
  24569. CC = c;
  24570. DD = d;
  24571. a = md5_FF(a, b, c, d, x[k + 0], S11, 0xD76AA478);
  24572. d = md5_FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756);
  24573. c = md5_FF(c, d, a, b, x[k + 2], S13, 0x242070DB);
  24574. b = md5_FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);
  24575. a = md5_FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF);
  24576. d = md5_FF(d, a, b, c, x[k + 5], S12, 0x4787C62A);
  24577. c = md5_FF(c, d, a, b, x[k + 6], S13, 0xA8304613);
  24578. b = md5_FF(b, c, d, a, x[k + 7], S14, 0xFD469501);
  24579. a = md5_FF(a, b, c, d, x[k + 8], S11, 0x698098D8);
  24580. d = md5_FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);
  24581. c = md5_FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);
  24582. b = md5_FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE);
  24583. a = md5_FF(a, b, c, d, x[k + 12], S11, 0x6B901122);
  24584. d = md5_FF(d, a, b, c, x[k + 13], S12, 0xFD987193);
  24585. c = md5_FF(c, d, a, b, x[k + 14], S13, 0xA679438E);
  24586. b = md5_FF(b, c, d, a, x[k + 15], S14, 0x49B40821);
  24587. a = md5_GG(a, b, c, d, x[k + 1], S21, 0xF61E2562);
  24588. d = md5_GG(d, a, b, c, x[k + 6], S22, 0xC040B340);
  24589. c = md5_GG(c, d, a, b, x[k + 11], S23, 0x265E5A51);
  24590. b = md5_GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);
  24591. a = md5_GG(a, b, c, d, x[k + 5], S21, 0xD62F105D);
  24592. d = md5_GG(d, a, b, c, x[k + 10], S22, 0x2441453);
  24593. c = md5_GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681);
  24594. b = md5_GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);
  24595. a = md5_GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6);
  24596. d = md5_GG(d, a, b, c, x[k + 14], S22, 0xC33707D6);
  24597. c = md5_GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87);
  24598. b = md5_GG(b, c, d, a, x[k + 8], S24, 0x455A14ED);
  24599. a = md5_GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905);
  24600. d = md5_GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);
  24601. c = md5_GG(c, d, a, b, x[k + 7], S23, 0x676F02D9);
  24602. b = md5_GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);
  24603. a = md5_HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942);
  24604. d = md5_HH(d, a, b, c, x[k + 8], S32, 0x8771F681);
  24605. c = md5_HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122);
  24606. b = md5_HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C);
  24607. a = md5_HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44);
  24608. d = md5_HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);
  24609. c = md5_HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);
  24610. b = md5_HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);
  24611. a = md5_HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6);
  24612. d = md5_HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA);
  24613. c = md5_HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085);
  24614. b = md5_HH(b, c, d, a, x[k + 6], S34, 0x4881D05);
  24615. a = md5_HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039);
  24616. d = md5_HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);
  24617. c = md5_HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);
  24618. b = md5_HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665);
  24619. a = md5_II(a, b, c, d, x[k + 0], S41, 0xF4292244);
  24620. d = md5_II(d, a, b, c, x[k + 7], S42, 0x432AFF97);
  24621. c = md5_II(c, d, a, b, x[k + 14], S43, 0xAB9423A7);
  24622. b = md5_II(b, c, d, a, x[k + 5], S44, 0xFC93A039);
  24623. a = md5_II(a, b, c, d, x[k + 12], S41, 0x655B59C3);
  24624. d = md5_II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);
  24625. c = md5_II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);
  24626. b = md5_II(b, c, d, a, x[k + 1], S44, 0x85845DD1);
  24627. a = md5_II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F);
  24628. d = md5_II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);
  24629. c = md5_II(c, d, a, b, x[k + 6], S43, 0xA3014314);
  24630. b = md5_II(b, c, d, a, x[k + 13], S44, 0x4E0811A1);
  24631. a = md5_II(a, b, c, d, x[k + 4], S41, 0xF7537E82);
  24632. d = md5_II(d, a, b, c, x[k + 11], S42, 0xBD3AF235);
  24633. c = md5_II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);
  24634. b = md5_II(b, c, d, a, x[k + 9], S44, 0xEB86D391);
  24635. a = md5_AddUnsigned(a, AA);
  24636. b = md5_AddUnsigned(b, BB);
  24637. c = md5_AddUnsigned(c, CC);
  24638. d = md5_AddUnsigned(d, DD);
  24639. }
  24640. if (bit == 32) {
  24641. return (md5_WordToHex(a) + md5_WordToHex(b) + md5_WordToHex(c) + md5_WordToHex(d)).toLowerCase();
  24642. }
  24643. return (md5_WordToHex(b) + md5_WordToHex(c)).toLowerCase();
  24644. }
  24645. //16位小写
  24646. w_md5.hex_md5_16 = function (string) {
  24647. return hex_md5(string, 16);
  24648. };
  24649. //16位大写
  24650. w_md5.hex_md5_16Upper = function (string) {
  24651. return hex_md5(string, 16).toUpperCase();
  24652. };
  24653. //32位小写
  24654. w_md5.hex_md5_32 = function (string) {
  24655. return hex_md5(string, 32);
  24656. };
  24657. //32位大写
  24658. w_md5.hex_md5_32Upper = function (string) {
  24659. return hex_md5(string, 32).toUpperCase();
  24660. };
  24661. var _default = w_md5;
  24662. exports.default = _default;
  24663. /***/ }),
  24664. /* 96 */,
  24665. /* 97 */,
  24666. /* 98 */,
  24667. /* 99 */,
  24668. /* 100 */,
  24669. /* 101 */,
  24670. /* 102 */,
  24671. /* 103 */,
  24672. /* 104 */
  24673. /*!*************************************************************************!*\
  24674. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/js_sdk/localUserInfo.js ***!
  24675. \*************************************************************************/
  24676. /*! no static exports found */
  24677. /***/ (function(module, exports, __webpack_require__) {
  24678. "use strict";
  24679. /* WEBPACK VAR INJECTION */(function(uni) {
  24680. Object.defineProperty(exports, "__esModule", {
  24681. value: true
  24682. });
  24683. exports.getUserLocalStorageInfo = getUserLocalStorageInfo;
  24684. function getUserLocalStorageInfo() {
  24685. var userInfo = JSON.parse(uni.getStorageSync("laocui_user_info"));
  24686. return userInfo;
  24687. }
  24688. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  24689. /***/ }),
  24690. /* 105 */,
  24691. /* 106 */,
  24692. /* 107 */,
  24693. /* 108 */,
  24694. /* 109 */,
  24695. /* 110 */,
  24696. /* 111 */
  24697. /*!************************************************************************!*\
  24698. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/static/mine/banner.png ***!
  24699. \************************************************************************/
  24700. /*! no static exports found */
  24701. /***/ (function(module, exports, __webpack_require__) {
  24702. module.exports = __webpack_require__.p + "static/mine/banner.png";
  24703. /***/ }),
  24704. /* 112 */
  24705. /*!**********************************************************************!*\
  24706. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/static/mine/head.png ***!
  24707. \**********************************************************************/
  24708. /*! no static exports found */
  24709. /***/ (function(module, exports) {
  24710. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAGGZJREFUeF7tXQd4VEXXfs/2TSVi6L0GEBBRUBBRURH8FCygyG8XKSJSRBGlCoLwUSJSFJAiSpEi+IEIUoWAKNJEek1M6CSkbN/5n7mbhJTd7L279+7dqPM8S0J25pwz5525d2ZOGcLfoDB2NQaO6HrQuOqBoT5IUw/MXQXQRAIsEoRIMEQCiMrtbhaAbM+HsgF3NkiTAuY+DsIxaLXHAP1xIsos7eqh0tYBxhjBbm8IYm1BeACEVmCopEw/WBpAu8CwBYy2wWD4g4iYMryUoVoqAGaMRcPleAbM3RFgbQGKV0Yd/qiyywBtA7F10JqWl4YZHrYAM8Y0cNoeAWMvgqgzALM/9Yf4ewuIVoGxhdAZNxKRO8T8RbELO4CZLfM2aPQvgvA8GCqL6oXalQh/wYVvYKAFRMbDaotTkH/YAMyYrTEc7iEg6gpAF05KkiCLE0RLocUnRMZDEtopVlV1gJnDci9AQwB0BKC6PDJpmoGwFsw9jvQRSTLRDIiMagplVmsdaDEJwBMBSV56Gq2BDgOJTKfUEDnkADPGIuG0DQPwNgCTGp1WgacVYFOhM40h4vvu0JWQASzsX132bmDuiQAptG8NneIC4iQsxti7MJgWh2o/HRKAGWPl4LQtB9AmIMX8/Rr9DJ3xGSK6pHTXFAeYOayPAGwhQOWV7kzpos8uAvQi6U0blJRbMYAZYzrYbWOgwWAAGiU7UYppuwGaAJ1hGBE5leiHIgCzzMx4GHXfgaiVEkL/7WgylgS9qTMRXZa7b7IDzJilOpy0HkCC3ML+rekRTkKL9kSm03L2U1aAmd3eFOT+AUBFOYX8x9AipMLt7EiGqANy9Vk2gJnD0QZwrQFQRi7h/pF0iK6DaTqRXv+zHP2XBWDmtHUCY4vD0OIjh47UoMEtVc+TzvhdsMyDBpg5LPcBwjs33Mx5wepG7fY2QNue9PptwQgSFMC579yt/z6Wg4GgxLY3oKM2RMaDgXIIGGBmtdaCDklg+PcAI1Dti2rHLsJFrcgU2Oo6IIBZZmY5mPQ7ANQVJeO/lYLVwAnojPcGcrQpGWDGmBZO22YA9wUr9b/tJWiAsR3Qm+4nIpeEVtIN7MxhHQ/gPSlMQlnXZsnBmRN/4szxw/jrzEmkpZzFlYupsFpyYLV4LHUmcyRM5gjcWqESKlapgco16qBW/dtQo25DGE3hvFak8aQ3vi9Fn5JmMHNYHwWwNhzPlg/9thPb1q3A3p2b4XQ6pOggv65Ob8Cd97bD/R2fQaM77g6IhsKNuGPfY6Q38V2LqCIaYJaTUwUGzT4w3CqKcggqud1u/LJ1PdZ88wVSzpyQlWO12gno1L0nWrR9RFa6wRNjV+BgzSgiIkUMLVEAM8b0cNo2hZM999jBvfhq+jicO3lETD8DrlMroTFeePN91GnYNGAasjeU8D4WB7DL2htuzJBd0AAIupxOLJk9CeuXLwygdYBNiPBEtx54+pW+0Gi0ARKRuZkGfUhrmumPql+A2Y0bt8KsPwbQLf6IKf191o10TBn2Fo7/8bvSrLzS5+/lt0d9CnMED3NSu7BrsDjqU0zMlZIk8Q+w3TIXRK+q3R2+Ep44pCdSz8tqTZPcrWq162PwuM9RpqxK0TMFJSZ8QTpTz4ABZnZ7S5Cb+/Wq6pGRmXEdH739AtKSz/gBhIExj3M1E4YuQfgD/8ljxoQ/MlB+BV7Z7xgvxrNKzboYnrgI5si8YEXJ40SuBm7oNK2IDL/4Ilhi75jdsgdEd8klTSB07DYrPh70Ck4d8XEcyxg8EHrACwQwxrifej7++b8LNIURk0ubETg3/t9Gd9yDweM/h1ardhAG7SG9saVkgJnD2h6A6P1WIOCJaTN9zGDs3rKueNU8YAOYgWL4llRHGBBEeLjz83jxrQ+CJSdH+w6+9sY+ZzBzWLmZStXjyI3ffYOF08Z6ZmjuP54JJf2xKocWC9LIA7nPBxNwz4OPyU1eKr3tpDe19dbIq6ZybbxB2SGlSli0/uW0FAx5rRP4IzocSx7AUTGxGP/l94iNK6uymKwt6c3biwrhA2Ar96vix5KqlU8Gv44/ft+FPEWqJogvxvnvZqBVu/+g99BP1BbxB9KbeABfoVIMYGbPbgbS7lUz0m//L9sxaWhvQdBwBbioXKNnLEXN+repCTIDczUnQ+S+gkJ4AdjyOYjeUEtSfr489PXO+OtcbjBegZmilkw++RaQLaHpnfhg8gJ1RST6knTG13wCzBgzwWlLU9MFJ2nTWsz8+N18GcN1Bnt7ugyZOFdtK1Q6dMaKRJS/cCk0g5kt5yloNCvUHIaDX34MF5LPlgqAhX13AZN6/cbN8eHUEJ6RewPK7X6ajBEr874qDLDTugoMPOGJKmVv0mZMHfZWId6laQZzwUfNWCo4D6hWCN+RzvRkMYDZ9etlEGW+CMCglnDj33kNh/ftLjUAe1aBhZej9z78BHoOGaeWCjlfO7Is5SkuLp3/J38GM6flNTCao5Zkl9KSMej/vOzMwnmR5WWVrzcY8dm32xARFa2WKvnW43UymOcWAdi2GIw9p5ZUy+dNw+pFs4qxD+dHtGcC83PswpuRVweMxAP/6aKWKvlR3xLSGbsVBthh4Wn7Kqgl1cD/aw9+elW0lEaAGzS9C0Mnz1dLlZxvGulNQpoMYegxmy0BGqas70sJ3U0+fRxDe+SvC0rXO9jLi5h7fUxfsR1RMSrG4bmpARmNRz0Au6w94Ubx52OIxuB3X83EivmfeeUW7jPY12P6jXfHok171TYk/N3Riwymzz0AO9V9/47s261Ee28gNt4Qjc1cNkWW0gBa3v8o+g7jacBUKrnvYQ/Adus5EKqpIUp25g30fqo1mLt4Ls8wX0Dnq8vbQisyOhYzV+4AaVRyhmE4TwZTdco9nsxRy7iwZ9sGTBs9IOjHs8lkQmRUFK5eKdEHTZEx7A1gzmj0zGWoWa+RIjxFEGXQGSOI2bKaQKOTLWWACMaFqiz87GNsXPV10AC/8uqrqFChAiZOmACnU5GENSV2zRvI3Xu/h0efeVGqSuSr73Y2JbXPnz944ymcP3UsKIDvaN4cPXv1Emhs3boFi7/+Rj4liaTkDWAeBsPdbFUr/FyaOWzvA+xjNYSwWS3o8Z+7BJuvD4T9OtGVKVMGI0aNQkRERD6JL2bNwt693KQduuIN4Lhby+PTpTwQU61CQ4g5bfPA2MtqiMAd2Lk7rK8iZovUf+BANGjQoBAJq9WKsWPG4NJFfrQemuJL1unLtyNGLXcebh9mDvXcc35cuQiLpvs+mPcH8EMPP4QuXZ/1imBycjI+GTcODkdgkYaBDAtv8r4zbhaatlAtRed6/ojeBTBVYiXnThqOretKMD8zQG+KQLfnunrdCrdo0QI6vd4nFidPnlRsFtvdWqxYthR2C7+hx1OE3XARH5nn3hiEx55VKzCEdvMZzFfQTQIZscG2KfGAI5e4KSISiYlTg2Ule3sXI7zzzhDk3Ch5W6ay+fAgMaf1DBhqyK4BEQR7PN4C1pyS82ObTGYkTlNxJVpCP/q/PQCWnJsz2FtVbvznTgCqFMJZYg7LVTUiBzOuXUHfLl59tQvpgh9gJE6bpop+/DHt368fLBZLidUiIqPx+ZrCTgz+6Mr4/SX+iOYShjy1/tGDezF2gP9DgNIOMAdrxsqfER2rSvStVTWAf96wGl98MrTYYK1cuTLaPfQQqlarBg0RUtPS0OKuu/zuh2Uc9aJJ/bpnDypWrAg3Y0g+fx4//fQTUv/6q1j7UdOXgGcKUKFwgNV5RHszEba9/3507doF9oxLsGelI6pCTehMecHWxS02Kigsd7l8M4rRac1GVtppGKLjoI8th2VLl2H7tsJRP28Nn4wWbXksX6gLu6baImvOf4dh2w/53p2oXr063n3vXWSmHIE5riKMsfFFgsx4fK+XfUjIdZbLsMB2iO9/bRmXYbmehugqDTBxwkScPXvT9ff5XoPRoYsKZ0meRZaVX8XWMNR64tH6B3/lyfI8ZcjQoShrdMJcpgL0ET4c1sJoEnvTlyMnE5brF3DVpsX4cTcPcPg+mO+HVSgHVTvoKGhkMBgMwko54+whxNUKo2w2xRDxP8Kunz6A2BqN0a9v3/xTNPWC0zwHHT8CCHkyqL7P3IeM61cFFVaqVEkwGPDRb47z5/fnX8kqzJR8lnl9GDViBFJTU4W/N2p+D4ZMUMUjeb0qxgb+znr5kaZwuz1pF7UaDSYnJoJvicK5CBYjEesAm80GvkfmgXS88KRqY79QISKIaCFfRQ8FaGwoFZt9IwO9nix8IctLr7yMVq1alyxGWExe/0Ls3LEDCxfcjDS8Jb48EpeoYTakodzg3xUaTUjP0i6lJmPQC4WjGCIjIzF85Ehw+25pLunp6Rg1Yjhycm6ecPHEp7P/92vou+V2P6uKy87Z44cxrDe/JrhwiY+Px0svv4y69eoV+oI/6jQavi9RPzdHnmAemQo71J04fhzz583DFS9+YQs2HIRGG+IseYLLjicmOKROd0f27xFSI3krPMFKnTp1hJMs/ntKcjIe79QJdeuGV+7xEydO4PvVq1GlalXBI4WfZHHzpC/vlM9X7w51vJLH6Y4rOdRus/t2bcXkD98U/ch69rnn8GC7dqLrh6Li5k2bsHTJEtGsuOsOd+EJWclzmxUADrHjO897xfNfiS2NGjVCv/79xVYPSb1piYn4448/RPOauGAtKlQJoVW2iON7T1DoQle2r1+F2RM/FK0cnU6HKVMTYTCqFrpcSFa7zY5BAwfAbreL7sPHs1ehaq3CawvRjQOpqEEv0uaFroQ4+GzTmqWYnzhakth9+/VD48aqWGSKyXno0CF89qk0J4SQR/4XDD7zPKatqWChuXPwx5VfYdF0fvWD+NKwYUO8PcB7BIR4KvLUTJwyFX/+yY/wxZfhny5C3UbNxDcIqia7QHqzcH9kgQj/0AWgrft2PhbPmii5CwMHDUL9BHUvNT169CimTJIeVPbh1AWo3/hOyX0OqIHXAHC75TVQaFI4/G/JXCydPVmy7DVq1sSQ999XLVcl3wJxf2u+JZJaeEA4DwwPSSH2OumKpnAIYRKW7xfPwbI5UwLq65NPPYVHO3QIqG2wjdb/8ANWrbxpw5ZCb+jkeWjQtIWUJoHWtcNir0QxMYIlR5U0St8vno1lcwJzheWHH33efBNNmobWrHjwwAHMmD7dd5iNHzhCBrCvNErCQitE59LBzGAup9FoxHtDhqBylSqBjnJJ7VJSUjBh/HhwK1Gg5YMpC5DQJATvYH7+bIxYlidn4RkcolSGa5d+iSVfSF+oFFRudHQ0er/5JmrXrh2ozkW1O3XyJGbMmIGszExR9X1VGpb4FerddkdQNEQ0LjmVoTCLnba5YEzRWIsfli/ANzMniJC35CparRbdX3gBrVv7MTMGyCkpKQmLFi6EyyXpukCv3EZOX4zaCQoHkPhLRioAHIJ0whtWfY2vPpMvYpV7Y3bq1EmI8JejZGdlYc2aNdi6ZYsc5AQaY2YtR/W6haMgZSPuISQunbBQ02HldzUo5ue5/cdVmD1B/FGlGEVwb5CHHn5Y+JjNgV0wyaMUftq4UfjwEFQ5y0ezvhUuv1SwrCe9qdj2QpWU/vt3b8OkD/oo0td6dWrh9W6dYYwpC0P0LdD4uRXF7XLCnnkNthtXMXfxdzh2Upl7mZQ/yZKQ0t8zi207AVbYr0YmSE7+eQCj3npeJmqFydSsXgWvPHEz5klrMEFrMHs+Rs/MdtkscNnzPjdn6rw123DmnKg7HyXLPnza16jb8HbJ7cQ1oCTSG70uRHzfuuK0PgGG1eIYSKvFbwp9/3VlkoQVBViKZEoC/PGcVahaUyFrEqET6UxrvPW15IuxHLZfASb75u3Khb8woLsynrrhCvDkrzcgvkJlKeNNXF2GfWQw+dx/lQwws98Np3C1nazOUJkZ6ejzlDJbm2pVK6HH04+AuaSlbiCtHrNXbMT55OLBY+I0XXKtmSt3IipWdodCBrhbkz5ily/ufoFjdss8EMkaWOOw2/FqB2VMZ+XKl8fojz6CPfMq7FnXYc/JhMuaDZbrg52nCNJooTVFwhARDUNUHAzRZTFi2DBcVChxy7z1+8BvGJe1MDafDGbvzm25jPwDnJlZDib9UQBxcgr30iNN4JbhAKGoTBzgj8aM8SoqX1jxwhdc3srwDz9UBGB+v+H8DTLnmiO6Dos9gaKjL5WEi1+AhRW1AhdE9+rcCtmZGXKOGYFWSQD7Y6YUwDyt8MxVO/2xl/a9XBdECwAzpoXTxoNeZXtxDn6pIy6knJPWKRG1wxFg7mzHne5kLDuhM7YlIr9nqKJmsACyxVIDOuJXb8vyqB7drztOHN4vW58jDCZUjI1H5XIV0b1/j4DoLk6cg+SLqUjLuIwcu3wnWfVua4ZhiYsCkqlYI/5odrjvILP5ZgByCZRFAyyAbMvuDI2WW7wltfPGn1/V/ntSYPE6kUYz6sRXQ9VbKqBKXDnUKVcd5WNuXg6Zc1dZQCtRRBdDxK+eaEdeLt64ipOXziHl+iUkX7uAk5fPI9tWcsIVX3pu3rod+o+W5qTngxa/1/ZJ0hlFn09I1ILgJD8FhKCdlOdOGoGt65aLGtUc0EaV6qBJlXqoV646KpYp+Xp1W+0ouOKlRSpqL1thPFVySiQ+s49fPIeDKcdxOPWkaMAfeOwZvDpwlKi++qk0lfQmSZ6H0gFmTA+nbQ+AoM7dvp07FWu+me21PwadHg0r1sbtVesLP/0BWpSI26yFtUkZ8YlbGIPpYDo0Fr+vtEKs0tIv48+0U9iffEwA3OHynsb4ieffQJfX3g4SYLYHOtO9RCRpgy8Z4Nz3cTVo6edgssQXtQnrtTo0qFgLzaomoGWtJojOT74SmF4clcxwVMtL4FIyDf35bOhTA3v85lHOtGbjl9MHsS/5KI6knS4Edvc+7+HRp/2njPIpJcN5uFgbMpsle/sFBLAAstVaF1rwU65bA4Fg1+Z1mDF2MOKj49C+UWu0rt0MUaabKYEDoVm0jaMiBznC90x2M+iTs6FPk29BxWXgYCed2o8fDyfhcuY19Bk6Afe0C/SWcHYVLmpFJtPxQHQSMMACyPbsO0HaTQBipDJPOfA7zq/+Hi1rNRUi/JUq/HHtqBoBV6zh5sLLxaDNcAjgSn0sS5HT5XYLs7pap8dRpWkAJ3dEN+CmdmQw/CaFb8G6QQEsgOxwtAVcPM+HUZQQGZnAoWPAeU/+in9MqVYJaFwfiBV95Z0N0LYnvb5w0i2JCgsaYAFkj2mRx1L6dqWw2YF9fwJnkvnJiUQx/ybVea7hmlWBZg2BkgPpbCBXV9JFejUBStGGLADnzuQ2IPdqMFb8ICT1IrB7P2AN3O1USqfCvq7JCLS8HajsNV44HWCdSW8Oaubm6UA2gD3v5Kym0OjWgUG4N0+Yqb8fBo4p4wYT9kD6EzChFnB7I0BITyGUNDBNBzIYZLNMyAqwgKnFUh1a+hFuV31s2wNcuOyvm//s7yvEA/e3BDSaI9CxDkRmWQ/oZQfYM3FZPHbs/gmnkxV2BP6bjI261Q+iUcIDFBt7Te4eKQKwAPK6dUY4aA4ysrqDMcX4yK2QkNIjYoiJWgQD60EdOyqyQFFc8Wzthm5Iz/oSTqe0w+GQaloFZnqdBWViXqGODymao0xxgIXZvHlHfVy6sgw2+7+PbK4Qk+kAKpTrQm3vPqH00AoJwALII0dq0LzVO8jMGgmHM7DQA6W1oTR9vc6K6KgR2Jv0Xxo5svh1qwrwDxnAebKzTUmVkZ4+FTnZT8P9D3k3a4ghMnIFKpTpT61aKeO26WNwhBzgfKA3bG6H65nTYbXVV2Dghg9Js+kIysb2pXZtA/NuCLInqgGcu50irN/8ErIsg5GTo2hkVpB6kt480nwE5oiJ6PjgfOKrZZWKqgAX7DPbuP0xZNx4FzmWNqV2W8WBjDBvwy3RE+nBtutUwrQQ27ABOP/RvT2pBS5deQNOdzfY7PIaiJXSuNGQA51mMcrHzaY2bX5Rik0gdMMO4Hygt2zRwaF9DhkZXWB3dITTqQukg4q10ekcMOjWIa7McmhdS+iBB0J/7biIzoUtwIUe37/9FotLGS8gJ+dxOFz3wW5X59DEYLBCr92OiIjvUavyAkpICC5xhwiAgq1SKgAu2km2PaktLl9tBdDjsDuaw+6QOegnl6PRYINe/xvgXotyt+6iNvdsDVbhoW5fKgEuBviOHZXg0t6NzBu1kJUTD4P+HoBqwO2OgJuZ4Hbr4XZr4XJ5fIO0Wp6u3QWNxgENWaHR5ADsLKz23YiJvoToqNPQGnfTvXeUereT/wdi29kqXXm2EQAAAABJRU5ErkJggg=="
  24711. /***/ }),
  24712. /* 113 */
  24713. /*!*****************************************************************************!*\
  24714. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/static/mine/versionicon.png ***!
  24715. \*****************************************************************************/
  24716. /*! no static exports found */
  24717. /***/ (function(module, exports) {
  24718. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAABVBJREFUWEftWd9rHFUU/s7sJtmHtrTa7EyTWaiYgmCEFhQrVnTNpD9QHwqtTWgKCoopKiIIrX+BLRREVFpRUGilUSsNNNI2mbhKI1YU2oeIBSMWdpLOJNqGmkI2uzNH7syu3d1kd2Z2t0Kg85adc+/55tzvfOeeE8Iye2iZ4cVdwHf6xOqOcDw+en8TWCPCFoA7CaSAoLjAGSaDTYDGmTGWBenT011/1PNRNQJORdW4vYcl7pdAW8IAcMBjzPTBlBX5GkjmwqwVtqEBt8vDXQQ6RkQdZc7mAR53mCYkwrx45zBiEnEHQJ0AYsX2DL7CzK9NWltHw4AOATgVSyi5dwHqLzhgxhyAARB/bpjRi0DSBbr4ScVUJbcZTHuJ0FcKno+lzeibldeW7hYIcGvrN0qL1HyaiDa71GTkADoyl7l5eHZ252yYCK1efXr1ipZVBwB+iwhRbz++mHEWds7MPGP67eUL2AUbaU4R6IH85uNZOL2WtW3cb/Nq72X5fGcTpJNELl0gKJKxF5J+oH0AuzS4ANDD+cgOZpzr+2ZmnhdUqPtpbf1yRYt0z0kiPFuItGFFk9XoURVwQhk5WuAsMwYNK7LbP7NTsXXx3JMCwLXp6Pf+3ExFVdk+XQANCE53768UjYqAhRpIJOkFGmScG4/5RVZRzq5vQlMKwPq8w6tZZJOmueNqtePwIr3mxwI9HHa0SupRAbD46txvQrpEgmVhbwrCWVXRvyJgV6l84ZRharv9+ONxOnJJJKLgs2FGH1rqNJcErMb1vSThhBddOmRYXW/7ORTvE4r+Z1F0C0uupk3tviDrVXn0HSI+KGxtRs+UpX1Rvm5JwAlFvwBgi9DZucw/iaDSpSr6WQK2l0X4nGFqO4IAFpK3MrbyWl6nx9Km9oQv4NbWcx2xSPT3vCp8Yljay0GcCRv3WCmSImCtJ1X4K8t2MgidCj5UWf+YCC+Jv+ft3IaZme0Txf4XRbg9rr8iSTiW18akYXZ/FxSwsGtbeWYtxVpcmbqVvTUY9HT+A6yMPEUgkbhwHPRPTmsfVQWsyvrxfPmcT5uRNf6yFOZzgtgK7bdvCFow44Rhaft8AI9cIqKNAP+SNrsfCeKi2MYtvbFVb4jf5uZvvhc2wl7yjvwsihUzXzas7k1VASdk/Zq4zzqMgUlL6w0LWJX1M7crF4YMS3su7B7tsn5SIvSI+3Ta0tZVB6zonDf4LG1qL4Z1ViZtgSWt2E9C0T8F8IL4LW1qJXm2KOkSyw5wnZRoRIRDUUKV60u6RgAOlXT1ylr9gEPKWnt8uF+SpKO1Fo56AaslhcPZPzm91S1ihWdR0tVTmj0NLbkAhVaJ0KU577Smy0+9gGu6/Ainany4jyTpuEuLENfLegGXXi/t3ilr20B5HQh0gc+RtNE0n/41SBEppgQzTxhW94Yg6xTl2wej7Fyu6QIvHLTJuhYhjHhR5vEgLZJ7OsroAQIf8pKWDhpm12E/wOUtks3onrI0tz0LGGHPrKwJHTKsyE7/JhRou/e8OxKY+nvbFT+wQIOaUM9RKqbKuVTRAGUo41zv9WtG/UF6Fg1v871NFw9SchTpCcrpSuA9ztoDDR6kFCKx1KiKj8xl5mocVa04ANCdGVXdjtDiYaBou0RXAHJOGGbTT9WHgdlHwVLf/zIMLD5WoR4S8fuFWVvRu3kGj3PZuJWIO6jCuNVher2SGlSiku8wcOmFqWibvLArQpFXxTggaJLl7cZstj+csppPBVGcULIWBIi4ezSTpBFJj1f/l4HzwwI7ennbHsRHsU2NEQ7rpnH2dwE3LpZL77TsIvwvQyHlS9/f8ZQAAAAASUVORK5CYII="
  24719. /***/ }),
  24720. /* 114 */
  24721. /*!******************************************************************************!*\
  24722. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/static/mine/editpassword.png ***!
  24723. \******************************************************************************/
  24724. /*! no static exports found */
  24725. /***/ (function(module, exports) {
  24726. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAAA/BJREFUWEftmE9oHGUYxp/3m80m8Q/UJJsZsxMQbKGCl0APETw0ZJIaqwdBhELFFhU8KBbsIVKlCoUq6qGHnixY0YOot9TSZHdZoYIBPQgWKhhIYGdkJtPGHgrdNbPzlplxcbPu7ny72e0azFz2sO/3vr/v+f7M+wxhhz20w3jx/wROpb5+oJ8eOgSBSTDtBWFPsHLMsAFaAfnLlp3IAVPF7a7othQeHc09miSeJ8JRAAPNYJhxm8AXSkwfrK8bTrvgbQLnB8ZV7yyDXidCoro4AyaYbxDBY5BGgF4DV4SPdwrryjlgymsVvGXgVOo7bUBJLgB0oFKMGctg/3yJN7Oue9iuhhh7cGFEDPY/BSFeJuBg1ZhLJX/jiOu+cLsV6JaAA9h+JZkn0P6/i6yVGa/+4RhZmaJjatZQCJ8CeCSK5x+K5T/nWoFuATif0FXvKhFNtlssGBceUDG0QBSp7TO+shzjiMyEgxhp4LSaOyWIz0TCIFv0N55rRZmtQPmBcc3LAPRkCF3GMcs1PpeBlgKO9m3/angTMOyiX5qo3asyxf61t+8fvE7ACIN/M+2Zx2RySAHrauYsEc1HavjHLXf2okzyuJj0yOIzIqF8w0wXTGf6jbh46S2ha9lCeD0x1gqOsq+d60gGRiYmVuGx4cX9Sp9yPTogdMZypt+VSdytmFjgh0eWDiQS4qcImJ+wnJnlbsHI5I0FDpKkU4vPB7+We+hbmaTdjIkFHh7OpQf7aG83ISq572zyys2b01azWk2BdTX7JoCPa/uFbsEzI+gtTpqOca5RjYbAQ0OX9fv6kqv3CrYCGECX/NJ4o3u+IbCuZQ4SKB8l4p/L7H8iSGxpbDqltM++ppB4q9JQMXjKtGe+r5dfCph9/0VzffbLTgHWy5PWlo4JiM9CebYN3CRBpybRU+DQiQjSZU59ZcI9A9a1zEcEOhkuLcMjwomCbZyPW4meAKe1zGEBulQNF0B7pc199q25tWbQPQHWtdxpAr9XCyZzaHsDrC69QiQCC7Tl8cv+hOXO/vKfUxgI3fRV0D8GVdYC9UThSMEAurwKgsbAFdNWnpXpn3sIDIxr2cBOBc74YsE2jsfdEMH/u8CN3u311NPVzO9EYUu6MxROa9mXiPGaV+a37Rv1m5jaifZ0S8js2e4ClzFnusaVdkBkx+ijS0dJiC861K3RvGlPfyhbvJ246i9LbbWXaTUzKYh+rDQxAF8D0a12YGLHMO8B6PGKu2nmzpt4unxC17xfq75UxtbtRAAzXzOdxESjl01TE5oeuqxTX/I0CPfENYOxwpt/vW9tPG02mnysze+Eap3MsQvcSTXr5dpVuNsK3wXVCjlLaPN+NwAAAABJRU5ErkJggg=="
  24727. /***/ }),
  24728. /* 115 */
  24729. /*!****************************************************************************!*\
  24730. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/static/mine/youjiantou.png ***!
  24731. \****************************************************************************/
  24732. /*! no static exports found */
  24733. /***/ (function(module, exports) {
  24734. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAAAgFJREFUWEft189qE1EUx/FzklyDmCgkryEkkHtDxGg6glAq7dMoLipuxAqib+I/XGgHi7MJIeTeZFcspStREZ8ggWSOXIlQBt10zhlauLOf4TO/+cLMIFywAy+YFwJY+omFhcPCmQVCEiEJ7iSSJKlEUbSUXvbv9XM1PBqNLiul3iPiZ631syLQucDOuQgAYgBQiLjb6XT2pNG5wB43m8120jR95dEA8ERr/VgSnRvscdPpdJuIXns0Ee0ZY3al0CzgItFsYI92zt0DgDcAcElqaVawR1trtxDx7Rr93BjzkDMPdrA0WgR8Cu3zqBIR29JiYI+eTCabpVLpnUcDwAut9YO8eYiC/4F+qbW+nwctDs6iieiRMebpWdGFgJ1z14hoiIjX/atca715bsHj8fhquVz+hIhdADhUSt1ptVq/ziWYG+tvUiyJ4XBYr1arB+tlj5RSgzzLsnwP/++xrrExIt4AgKM0TaNut/vzrBmcPo99YUksexJJktTq9fo+ANwkomMiGnAty56Ex9ZqtX1E/INdLBZRv9//wZEBexJFYVmSiOP4SrPZ/AgAtwDgZD6fDySWZUnCYxuNxgdEvO2xlUplo91uf+fOgC0Ja+0GIvq/5q/L5TLq9XrfJLEsSVhr765Wqy9FYFnA0otmr8/+4pC+gQAOC2cWCEmEJDIL/AZuWc4tuG4XogAAAABJRU5ErkJggg=="
  24735. /***/ }),
  24736. /* 116 */
  24737. /*!*************************************************************************!*\
  24738. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/static/mine/outicon.png ***!
  24739. \*************************************************************************/
  24740. /*! no static exports found */
  24741. /***/ (function(module, exports) {
  24742. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAABQpJREFUWEftmXGIFHUUx79vZtUlFM7LvZm7mwUPCgwKDC5CSvC8mdRUMLjSoD/6w/8KukDRoEgpSSjIwNB/wj9MlCQsSu3csfUP/xBUMhQSMjyYubuZ20sFLde7mXnx2905Nr3dmdm9/UO4/WvZmffeZ76/936/92YJj9mHHjNezAG3esVaonAm893C+dLiHcS4Yo8b38/mQ7QEOKua7wDYzwwv+Pd+5+jdjROzBd0SYE09+zGBdwnIKUz1OM664Tng2VJA+JlTuErNxDmsqWd3EPMgA3ttV/9qppWJo3BWyX3JRAMIsNMe14/EXeEEwPlUt+IflghbhHNmvmK7xvONAmuKeZcICyu+9tqu8UEc6JjA+ZTW4R8lCQMlpwzHD/j10YJxvlHg7szQAEnyoRAazPss13g/CjoWsKbkPiOinWVWvu7BW1dvq4qTEsJXd+bMckmSToOglpXGVtvVv6kHHQncrebWS6CfK06Gi/6DFYXCeqee07jAwkfXk0PLpJR8saJ0cZL9F1x3zbVa/iOA8+ms6v8BYCmAoucFK8cmXrkUtWxJgMtKDw1Isny87JfPW46xsiFgTTHfI8I+YRwwfTri9n8UBdvoPtytmEfDgvaZN426xo8zxaqjcD6VVfw/QVgqisxy5R6gr9gy4PZTGs2bf5MIKQbO2Y7elwi4SzF1mZArFxrtsp3+3XFgG1W4ZKeYh4nwlvj+z+Rk9tatV+2HY9ZUWFNznxNomzAo+t7ThcLaG60GrhYJwLuWo38dGzir5i4C1Cu2MdsxnokL24zCQD6VVf27ANIB49iIq7+ZANi8X8+w3gN0KUNbZJKPgnHHcuXOuLkvfE4LxXzNdo3nYgG3tZ1oW5RedLuR/A0DaGpulVf0hp07yXrh6TwuFbreGQtYVU8vnYd5N5sBTpJC1fdmVfMQgLfFb5ajP1JjMxbdYwcshsi03C6SXxzwsZqSRhV92E5TzJ+IsAHAsOXoPbFSopT8ijlWakoYpuXqxmwBRfnRVNMiQANw3nL0R47o2vuwYp4gwiZm3LNdeTHQ50UFa/Z6dSrWWtmawOGoLiAC8IYRxzjZLFCU/f97F3/jiLsm7BKnTWsCt7ef0p4Iz3bGD7arvxYVsNnrmpK7SkTPMjBhO3J2pv27bnupVdJCgHie1Ds2sfpys1C17LsUc7NMOFYudNpnuf0zTh91gUsTgSz9Vt4s+ILtpla2IpfFQbUwvehqpdiKRf9BT60hIXri6DAPSVJ5I2fwF7ZjbJ9tlau2MqHuh5bbv6dWjEjgyjEtVBZTh5i7BmuN9408iBj3QTRYtuVLlpNaUW8VI4GFm84lZ3plWcpPj+Wl/lja01x65NPdHf6BcPXEkDBFUyui3sPFAhbQ6pLcqpRM4hQK3yWcm2Rp6/h4/19JldWUX18E/INEtLwsLBzf8/tG/15zPcpXbGDhqCuTe1mW6Hg4lovenhnfMkv7R8ZX/x4VrKvjzEsSSdvEgRTey8w3Ai/YGAdW2CQCFgaZzEl1gbTgQHXQSkFeJ+AcQNc4YAeSPBFwoEqAyoTlBIjWSxy5058AfHDSv729UHjjXtTDhtcTA4eGWsZcCxmfENAbN9i0qsAvzLx7xDUuJLVtGDgMVCrIFG0GsIFAy2oBiH2cIZnseUfiLv9MvpoGrnZa+m8DbU+RTG3wKQ2Zi1McTLju/BtJxqR6qs8qcNLlbeT+OeBGVEti8x9q9mtLhchgzwAAAABJRU5ErkJggg=="
  24743. /***/ })
  24744. ]]);
  24745. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map