vendor.js 771 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!*********************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  5. \*********************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", {
  10. value: true
  11. });
  12. exports.default = void 0;
  13. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet'];
  14. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  15. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  16. return this;
  17. }();
  18. var key = ['w', 'x'].join('');
  19. var oldWx = target[key];
  20. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  21. function isWxKey(key) {
  22. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  23. return false;
  24. }
  25. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  26. }
  27. function initWx() {
  28. var newWx = {};
  29. for (var _key in oldWx) {
  30. if (isWxKey(_key)) {
  31. // TODO wrapper function
  32. newWx[_key] = oldWx[_key];
  33. }
  34. }
  35. return newWx;
  36. }
  37. target[key] = initWx();
  38. var _default = target[key];
  39. exports.default = _default;
  40. /***/ }),
  41. /***/ 10:
  42. /*!****************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  44. \****************************************************************/
  45. /*! no static exports found */
  46. /***/ (function(module, exports) {
  47. function _nonIterableRest() {
  48. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  49. }
  50. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  51. /***/ }),
  52. /***/ 11:
  53. /*!***************************************************************!*\
  54. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  55. \***************************************************************/
  56. /*! no static exports found */
  57. /***/ (function(module, exports, __webpack_require__) {
  58. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  59. function _defineProperty(obj, key, value) {
  60. key = toPropertyKey(key);
  61. if (key in obj) {
  62. Object.defineProperty(obj, key, {
  63. value: value,
  64. enumerable: true,
  65. configurable: true,
  66. writable: true
  67. });
  68. } else {
  69. obj[key] = value;
  70. }
  71. return obj;
  72. }
  73. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  74. /***/ }),
  75. /***/ 12:
  76. /*!**************************************************************!*\
  77. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  78. \**************************************************************/
  79. /*! no static exports found */
  80. /***/ (function(module, exports, __webpack_require__) {
  81. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  82. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  83. function _toPropertyKey(arg) {
  84. var key = toPrimitive(arg, "string");
  85. return _typeof(key) === "symbol" ? key : String(key);
  86. }
  87. module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  88. /***/ }),
  89. /***/ 13:
  90. /*!*******************************************************!*\
  91. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  92. \*******************************************************/
  93. /*! no static exports found */
  94. /***/ (function(module, exports) {
  95. function _typeof(obj) {
  96. "@babel/helpers - typeof";
  97. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  98. return typeof obj;
  99. } : function (obj) {
  100. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  101. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
  102. }
  103. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  104. /***/ }),
  105. /***/ 14:
  106. /*!************************************************************!*\
  107. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  108. \************************************************************/
  109. /*! no static exports found */
  110. /***/ (function(module, exports, __webpack_require__) {
  111. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  112. function _toPrimitive(input, hint) {
  113. if (_typeof(input) !== "object" || input === null) return input;
  114. var prim = input[Symbol.toPrimitive];
  115. if (prim !== undefined) {
  116. var res = prim.call(input, hint || "default");
  117. if (_typeof(res) !== "object") return res;
  118. throw new TypeError("@@toPrimitive must return a primitive value.");
  119. }
  120. return (hint === "string" ? String : Number)(input);
  121. }
  122. module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  123. /***/ }),
  124. /***/ 15:
  125. /*!**********************************************************!*\
  126. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  127. \**********************************************************/
  128. /*! no static exports found */
  129. /***/ (function(module, exports, __webpack_require__) {
  130. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  131. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  132. function _construct(Parent, args, Class) {
  133. if (isNativeReflectConstruct()) {
  134. module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
  135. } else {
  136. module.exports = _construct = function _construct(Parent, args, Class) {
  137. var a = [null];
  138. a.push.apply(a, args);
  139. var Constructor = Function.bind.apply(Parent, a);
  140. var instance = new Constructor();
  141. if (Class) setPrototypeOf(instance, Class.prototype);
  142. return instance;
  143. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  144. }
  145. return _construct.apply(null, arguments);
  146. }
  147. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  148. /***/ }),
  149. /***/ 16:
  150. /*!***************************************************************!*\
  151. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  152. \***************************************************************/
  153. /*! no static exports found */
  154. /***/ (function(module, exports) {
  155. function _setPrototypeOf(o, p) {
  156. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  157. o.__proto__ = p;
  158. return o;
  159. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  160. return _setPrototypeOf(o, p);
  161. }
  162. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  163. /***/ }),
  164. /***/ 17:
  165. /*!*************************************************************************!*\
  166. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  167. \*************************************************************************/
  168. /*! no static exports found */
  169. /***/ (function(module, exports) {
  170. function _isNativeReflectConstruct() {
  171. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  172. if (Reflect.construct.sham) return false;
  173. if (typeof Proxy === "function") return true;
  174. try {
  175. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  176. return true;
  177. } catch (e) {
  178. return false;
  179. }
  180. }
  181. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  182. /***/ }),
  183. /***/ 18:
  184. /*!******************************************************************!*\
  185. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  186. \******************************************************************/
  187. /*! no static exports found */
  188. /***/ (function(module, exports, __webpack_require__) {
  189. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  190. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  191. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  192. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  193. function _toConsumableArray(arr) {
  194. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  195. }
  196. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  197. /***/ }),
  198. /***/ 184:
  199. /*!*******************************************!*\
  200. !*** E:/项目资料/智慧社区/Applet/api/integral.js ***!
  201. \*******************************************/
  202. /*! no static exports found */
  203. /***/ (function(module, exports, __webpack_require__) {
  204. "use strict";
  205. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  206. Object.defineProperty(exports, "__esModule", {
  207. value: true
  208. });
  209. exports.default = void 0;
  210. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  211. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  212. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  213. var getIntegral = /*#__PURE__*/function () {
  214. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
  215. var res;
  216. return _regenerator.default.wrap(function _callee$(_context) {
  217. while (1) {
  218. switch (_context.prev = _context.next) {
  219. case 0:
  220. _context.next = 2;
  221. return _request.default.get({
  222. url: "/wx/points/point",
  223. data: data
  224. });
  225. case 2:
  226. res = _context.sent;
  227. return _context.abrupt("return", res.data);
  228. case 4:
  229. case "end":
  230. return _context.stop();
  231. }
  232. }
  233. }, _callee);
  234. }));
  235. return function getIntegral(_x) {
  236. return _ref.apply(this, arguments);
  237. };
  238. }();
  239. var getRanking = /*#__PURE__*/function () {
  240. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(data) {
  241. var res;
  242. return _regenerator.default.wrap(function _callee2$(_context2) {
  243. while (1) {
  244. switch (_context2.prev = _context2.next) {
  245. case 0:
  246. _context2.next = 2;
  247. return _request.default.get({
  248. url: '/wx/points/ranking-list'
  249. });
  250. case 2:
  251. res = _context2.sent;
  252. return _context2.abrupt("return", res.data);
  253. case 4:
  254. case "end":
  255. return _context2.stop();
  256. }
  257. }
  258. }, _callee2);
  259. }));
  260. return function getRanking(_x2) {
  261. return _ref2.apply(this, arguments);
  262. };
  263. }();
  264. var _default = {
  265. getIntegral: getIntegral,
  266. getRanking: getRanking
  267. };
  268. exports.default = _default;
  269. /***/ }),
  270. /***/ 19:
  271. /*!******************************************************************!*\
  272. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  273. \******************************************************************/
  274. /*! no static exports found */
  275. /***/ (function(module, exports, __webpack_require__) {
  276. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  277. function _arrayWithoutHoles(arr) {
  278. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  279. }
  280. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  281. /***/ }),
  282. /***/ 193:
  283. /*!*******************************************!*\
  284. !*** E:/项目资料/智慧社区/Applet/api/activity.js ***!
  285. \*******************************************/
  286. /*! no static exports found */
  287. /***/ (function(module, exports, __webpack_require__) {
  288. "use strict";
  289. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  290. Object.defineProperty(exports, "__esModule", {
  291. value: true
  292. });
  293. exports.default = void 0;
  294. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  295. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  296. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  297. var getActivity = /*#__PURE__*/function () {
  298. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
  299. var res;
  300. return _regenerator.default.wrap(function _callee$(_context) {
  301. while (1) {
  302. switch (_context.prev = _context.next) {
  303. case 0:
  304. _context.next = 2;
  305. return _request.default.get({
  306. url: "/activity/list",
  307. data: data
  308. });
  309. case 2:
  310. res = _context.sent;
  311. return _context.abrupt("return", res.data);
  312. case 4:
  313. case "end":
  314. return _context.stop();
  315. }
  316. }
  317. }, _callee);
  318. }));
  319. return function getActivity(_x) {
  320. return _ref.apply(this, arguments);
  321. };
  322. }();
  323. var getdetails = /*#__PURE__*/function () {
  324. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref2) {
  325. var activityId, res;
  326. return _regenerator.default.wrap(function _callee2$(_context2) {
  327. while (1) {
  328. switch (_context2.prev = _context2.next) {
  329. case 0:
  330. activityId = _ref2.activityId;
  331. _context2.next = 3;
  332. return _request.default.get({
  333. url: "/activity/".concat(activityId)
  334. });
  335. case 3:
  336. res = _context2.sent;
  337. return _context2.abrupt("return", res.data);
  338. case 5:
  339. case "end":
  340. return _context2.stop();
  341. }
  342. }
  343. }, _callee2);
  344. }));
  345. return function getdetails(_x2) {
  346. return _ref3.apply(this, arguments);
  347. };
  348. }();
  349. var getstatus = /*#__PURE__*/function () {
  350. var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(_ref4) {
  351. var activityId, res;
  352. return _regenerator.default.wrap(function _callee3$(_context3) {
  353. while (1) {
  354. switch (_context3.prev = _context3.next) {
  355. case 0:
  356. activityId = _ref4.activityId;
  357. _context3.next = 3;
  358. return _request.default.get({
  359. url: "/activity/status/".concat(activityId)
  360. });
  361. case 3:
  362. res = _context3.sent;
  363. return _context3.abrupt("return", res.data);
  364. case 5:
  365. case "end":
  366. return _context3.stop();
  367. }
  368. }
  369. }, _callee3);
  370. }));
  371. return function getstatus(_x3) {
  372. return _ref5.apply(this, arguments);
  373. };
  374. }();
  375. var report = /*#__PURE__*/function () {
  376. var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(_ref6) {
  377. var activityId, res;
  378. return _regenerator.default.wrap(function _callee4$(_context4) {
  379. while (1) {
  380. switch (_context4.prev = _context4.next) {
  381. case 0:
  382. activityId = _ref6.activityId;
  383. _context4.next = 3;
  384. return _request.default.post({
  385. url: "/activity/report/".concat(activityId)
  386. });
  387. case 3:
  388. res = _context4.sent;
  389. return _context4.abrupt("return", res.data);
  390. case 5:
  391. case "end":
  392. return _context4.stop();
  393. }
  394. }
  395. }, _callee4);
  396. }));
  397. return function report(_x4) {
  398. return _ref7.apply(this, arguments);
  399. };
  400. }();
  401. var offReport = /*#__PURE__*/function () {
  402. var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(_ref8) {
  403. var activityId, res;
  404. return _regenerator.default.wrap(function _callee5$(_context5) {
  405. while (1) {
  406. switch (_context5.prev = _context5.next) {
  407. case 0:
  408. activityId = _ref8.activityId;
  409. _context5.next = 3;
  410. return _request.default.del({
  411. url: "/activity/report-cancel/".concat(activityId)
  412. });
  413. case 3:
  414. res = _context5.sent;
  415. return _context5.abrupt("return", res.data);
  416. case 5:
  417. case "end":
  418. return _context5.stop();
  419. }
  420. }
  421. }, _callee5);
  422. }));
  423. return function offReport(_x5) {
  424. return _ref9.apply(this, arguments);
  425. };
  426. }();
  427. var signIn = /*#__PURE__*/function () {
  428. var _ref11 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(_ref10) {
  429. var activityId, res;
  430. return _regenerator.default.wrap(function _callee6$(_context6) {
  431. while (1) {
  432. switch (_context6.prev = _context6.next) {
  433. case 0:
  434. activityId = _ref10.activityId;
  435. _context6.next = 3;
  436. return _request.default.post({
  437. url: "/activity/sign-in/".concat(activityId)
  438. });
  439. case 3:
  440. res = _context6.sent;
  441. return _context6.abrupt("return", res.data);
  442. case 5:
  443. case "end":
  444. return _context6.stop();
  445. }
  446. }
  447. }, _callee6);
  448. }));
  449. return function signIn(_x6) {
  450. return _ref11.apply(this, arguments);
  451. };
  452. }();
  453. var uploadImgs = /*#__PURE__*/function () {
  454. var _ref12 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(data) {
  455. var res;
  456. return _regenerator.default.wrap(function _callee7$(_context7) {
  457. while (1) {
  458. switch (_context7.prev = _context7.next) {
  459. case 0:
  460. _context7.next = 2;
  461. return _request.default.post({
  462. url: "/activity/submit-photo",
  463. data: data
  464. });
  465. case 2:
  466. res = _context7.sent;
  467. return _context7.abrupt("return", res.data);
  468. case 4:
  469. case "end":
  470. return _context7.stop();
  471. }
  472. }
  473. }, _callee7);
  474. }));
  475. return function uploadImgs(_x7) {
  476. return _ref12.apply(this, arguments);
  477. };
  478. }();
  479. var getPhotos = /*#__PURE__*/function () {
  480. var _ref14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(_ref13) {
  481. var activityId, res;
  482. return _regenerator.default.wrap(function _callee8$(_context8) {
  483. while (1) {
  484. switch (_context8.prev = _context8.next) {
  485. case 0:
  486. activityId = _ref13.activityId;
  487. _context8.next = 3;
  488. return _request.default.get({
  489. url: "/activity/log-details/".concat(activityId)
  490. });
  491. case 3:
  492. res = _context8.sent;
  493. return _context8.abrupt("return", res.data);
  494. case 5:
  495. case "end":
  496. return _context8.stop();
  497. }
  498. }
  499. }, _callee8);
  500. }));
  501. return function getPhotos(_x8) {
  502. return _ref14.apply(this, arguments);
  503. };
  504. }();
  505. var getTypeList = /*#__PURE__*/function () {
  506. var _ref16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(_ref15) {
  507. var alias, res;
  508. return _regenerator.default.wrap(function _callee9$(_context9) {
  509. while (1) {
  510. switch (_context9.prev = _context9.next) {
  511. case 0:
  512. alias = _ref15.alias;
  513. _context9.next = 3;
  514. return _request.default.get({
  515. url: "/cms/type/sublist/".concat(alias)
  516. });
  517. case 3:
  518. res = _context9.sent;
  519. return _context9.abrupt("return", res.data);
  520. case 5:
  521. case "end":
  522. return _context9.stop();
  523. }
  524. }
  525. }, _callee9);
  526. }));
  527. return function getTypeList(_x9) {
  528. return _ref16.apply(this, arguments);
  529. };
  530. }();
  531. var _default = {
  532. getActivity: getActivity,
  533. getdetails: getdetails,
  534. getstatus: getstatus,
  535. report: report,
  536. offReport: offReport,
  537. signIn: signIn,
  538. uploadImgs: uploadImgs,
  539. getPhotos: getPhotos,
  540. getTypeList: getTypeList
  541. };
  542. exports.default = _default;
  543. /***/ }),
  544. /***/ 2:
  545. /*!************************************************************!*\
  546. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  547. \************************************************************/
  548. /*! no static exports found */
  549. /***/ (function(module, exports, __webpack_require__) {
  550. "use strict";
  551. /* WEBPACK VAR INJECTION */(function(wx, global) {
  552. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  553. Object.defineProperty(exports, "__esModule", {
  554. value: true
  555. });
  556. exports.createApp = createApp;
  557. exports.createComponent = createComponent;
  558. exports.createPage = createPage;
  559. exports.createPlugin = createPlugin;
  560. exports.createSubpackageApp = createSubpackageApp;
  561. exports.default = void 0;
  562. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  563. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  564. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  565. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  566. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  567. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  568. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  569. 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; }
  570. 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; }
  571. var realAtob;
  572. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  573. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  574. if (typeof atob !== 'function') {
  575. realAtob = function realAtob(str) {
  576. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  577. if (!b64re.test(str)) {
  578. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  579. }
  580. // Adding the padding if missing, for semplicity
  581. str += '=='.slice(2 - (str.length & 3));
  582. var bitmap;
  583. var result = '';
  584. var r1;
  585. var r2;
  586. var i = 0;
  587. for (; i < str.length;) {
  588. 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++)));
  589. 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);
  590. }
  591. return result;
  592. };
  593. } else {
  594. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  595. realAtob = atob;
  596. }
  597. function b64DecodeUnicode(str) {
  598. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  599. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  600. }).join(''));
  601. }
  602. function getCurrentUserInfo() {
  603. var token = wx.getStorageSync('uni_id_token') || '';
  604. var tokenArr = token.split('.');
  605. if (!token || tokenArr.length !== 3) {
  606. return {
  607. uid: null,
  608. role: [],
  609. permission: [],
  610. tokenExpired: 0
  611. };
  612. }
  613. var userInfo;
  614. try {
  615. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  616. } catch (error) {
  617. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  618. }
  619. userInfo.tokenExpired = userInfo.exp * 1000;
  620. delete userInfo.exp;
  621. delete userInfo.iat;
  622. return userInfo;
  623. }
  624. function uniIdMixin(Vue) {
  625. Vue.prototype.uniIDHasRole = function (roleId) {
  626. var _getCurrentUserInfo = getCurrentUserInfo(),
  627. role = _getCurrentUserInfo.role;
  628. return role.indexOf(roleId) > -1;
  629. };
  630. Vue.prototype.uniIDHasPermission = function (permissionId) {
  631. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  632. permission = _getCurrentUserInfo2.permission;
  633. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  634. };
  635. Vue.prototype.uniIDTokenValid = function () {
  636. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  637. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  638. return tokenExpired > Date.now();
  639. };
  640. }
  641. var _toString = Object.prototype.toString;
  642. var hasOwnProperty = Object.prototype.hasOwnProperty;
  643. function isFn(fn) {
  644. return typeof fn === 'function';
  645. }
  646. function isStr(str) {
  647. return typeof str === 'string';
  648. }
  649. function isObject(obj) {
  650. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  651. }
  652. function isPlainObject(obj) {
  653. return _toString.call(obj) === '[object Object]';
  654. }
  655. function hasOwn(obj, key) {
  656. return hasOwnProperty.call(obj, key);
  657. }
  658. function noop() {}
  659. /**
  660. * Create a cached version of a pure function.
  661. */
  662. function cached(fn) {
  663. var cache = Object.create(null);
  664. return function cachedFn(str) {
  665. var hit = cache[str];
  666. return hit || (cache[str] = fn(str));
  667. };
  668. }
  669. /**
  670. * Camelize a hyphen-delimited string.
  671. */
  672. var camelizeRE = /-(\w)/g;
  673. var camelize = cached(function (str) {
  674. return str.replace(camelizeRE, function (_, c) {
  675. return c ? c.toUpperCase() : '';
  676. });
  677. });
  678. function sortObject(obj) {
  679. var sortObj = {};
  680. if (isPlainObject(obj)) {
  681. Object.keys(obj).sort().forEach(function (key) {
  682. sortObj[key] = obj[key];
  683. });
  684. }
  685. return !Object.keys(sortObj) ? obj : sortObj;
  686. }
  687. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  688. var globalInterceptors = {};
  689. var scopedInterceptors = {};
  690. function mergeHook(parentVal, childVal) {
  691. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  692. return res ? dedupeHooks(res) : res;
  693. }
  694. function dedupeHooks(hooks) {
  695. var res = [];
  696. for (var i = 0; i < hooks.length; i++) {
  697. if (res.indexOf(hooks[i]) === -1) {
  698. res.push(hooks[i]);
  699. }
  700. }
  701. return res;
  702. }
  703. function removeHook(hooks, hook) {
  704. var index = hooks.indexOf(hook);
  705. if (index !== -1) {
  706. hooks.splice(index, 1);
  707. }
  708. }
  709. function mergeInterceptorHook(interceptor, option) {
  710. Object.keys(option).forEach(function (hook) {
  711. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  712. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  713. }
  714. });
  715. }
  716. function removeInterceptorHook(interceptor, option) {
  717. if (!interceptor || !option) {
  718. return;
  719. }
  720. Object.keys(option).forEach(function (hook) {
  721. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  722. removeHook(interceptor[hook], option[hook]);
  723. }
  724. });
  725. }
  726. function addInterceptor(method, option) {
  727. if (typeof method === 'string' && isPlainObject(option)) {
  728. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  729. } else if (isPlainObject(method)) {
  730. mergeInterceptorHook(globalInterceptors, method);
  731. }
  732. }
  733. function removeInterceptor(method, option) {
  734. if (typeof method === 'string') {
  735. if (isPlainObject(option)) {
  736. removeInterceptorHook(scopedInterceptors[method], option);
  737. } else {
  738. delete scopedInterceptors[method];
  739. }
  740. } else if (isPlainObject(method)) {
  741. removeInterceptorHook(globalInterceptors, method);
  742. }
  743. }
  744. function wrapperHook(hook, params) {
  745. return function (data) {
  746. return hook(data, params) || data;
  747. };
  748. }
  749. function isPromise(obj) {
  750. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  751. }
  752. function queue(hooks, data, params) {
  753. var promise = false;
  754. for (var i = 0; i < hooks.length; i++) {
  755. var hook = hooks[i];
  756. if (promise) {
  757. promise = Promise.resolve(wrapperHook(hook, params));
  758. } else {
  759. var res = hook(data, params);
  760. if (isPromise(res)) {
  761. promise = Promise.resolve(res);
  762. }
  763. if (res === false) {
  764. return {
  765. then: function then() {}
  766. };
  767. }
  768. }
  769. }
  770. return promise || {
  771. then: function then(callback) {
  772. return callback(data);
  773. }
  774. };
  775. }
  776. function wrapperOptions(interceptor) {
  777. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  778. ['success', 'fail', 'complete'].forEach(function (name) {
  779. if (Array.isArray(interceptor[name])) {
  780. var oldCallback = options[name];
  781. options[name] = function callbackInterceptor(res) {
  782. queue(interceptor[name], res, options).then(function (res) {
  783. /* eslint-disable no-mixed-operators */
  784. return isFn(oldCallback) && oldCallback(res) || res;
  785. });
  786. };
  787. }
  788. });
  789. return options;
  790. }
  791. function wrapperReturnValue(method, returnValue) {
  792. var returnValueHooks = [];
  793. if (Array.isArray(globalInterceptors.returnValue)) {
  794. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  795. }
  796. var interceptor = scopedInterceptors[method];
  797. if (interceptor && Array.isArray(interceptor.returnValue)) {
  798. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  799. }
  800. returnValueHooks.forEach(function (hook) {
  801. returnValue = hook(returnValue) || returnValue;
  802. });
  803. return returnValue;
  804. }
  805. function getApiInterceptorHooks(method) {
  806. var interceptor = Object.create(null);
  807. Object.keys(globalInterceptors).forEach(function (hook) {
  808. if (hook !== 'returnValue') {
  809. interceptor[hook] = globalInterceptors[hook].slice();
  810. }
  811. });
  812. var scopedInterceptor = scopedInterceptors[method];
  813. if (scopedInterceptor) {
  814. Object.keys(scopedInterceptor).forEach(function (hook) {
  815. if (hook !== 'returnValue') {
  816. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  817. }
  818. });
  819. }
  820. return interceptor;
  821. }
  822. function invokeApi(method, api, options) {
  823. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  824. params[_key - 3] = arguments[_key];
  825. }
  826. var interceptor = getApiInterceptorHooks(method);
  827. if (interceptor && Object.keys(interceptor).length) {
  828. if (Array.isArray(interceptor.invoke)) {
  829. var res = queue(interceptor.invoke, options);
  830. return res.then(function (options) {
  831. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  832. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  833. });
  834. } else {
  835. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  836. }
  837. }
  838. return api.apply(void 0, [options].concat(params));
  839. }
  840. var promiseInterceptor = {
  841. returnValue: function returnValue(res) {
  842. if (!isPromise(res)) {
  843. return res;
  844. }
  845. return new Promise(function (resolve, reject) {
  846. res.then(function (res) {
  847. if (res[0]) {
  848. reject(res[0]);
  849. } else {
  850. resolve(res[1]);
  851. }
  852. });
  853. });
  854. }
  855. };
  856. 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/;
  857. var CONTEXT_API_RE = /^create|Manager$/;
  858. // Context例外情况
  859. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  860. // 同步例外情况
  861. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  862. var CALLBACK_API_RE = /^on|^off/;
  863. function isContextApi(name) {
  864. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  865. }
  866. function isSyncApi(name) {
  867. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  868. }
  869. function isCallbackApi(name) {
  870. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  871. }
  872. function handlePromise(promise) {
  873. return promise.then(function (data) {
  874. return [null, data];
  875. }).catch(function (err) {
  876. return [err];
  877. });
  878. }
  879. function shouldPromise(name) {
  880. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  881. return false;
  882. }
  883. return true;
  884. }
  885. /* eslint-disable no-extend-native */
  886. if (!Promise.prototype.finally) {
  887. Promise.prototype.finally = function (callback) {
  888. var promise = this.constructor;
  889. return this.then(function (value) {
  890. return promise.resolve(callback()).then(function () {
  891. return value;
  892. });
  893. }, function (reason) {
  894. return promise.resolve(callback()).then(function () {
  895. throw reason;
  896. });
  897. });
  898. };
  899. }
  900. function promisify(name, api) {
  901. if (!shouldPromise(name) || !isFn(api)) {
  902. return api;
  903. }
  904. return function promiseApi() {
  905. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  906. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  907. params[_key2 - 1] = arguments[_key2];
  908. }
  909. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  910. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  911. }
  912. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  913. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  914. success: resolve,
  915. fail: reject
  916. })].concat(params));
  917. })));
  918. };
  919. }
  920. var EPS = 1e-4;
  921. var BASE_DEVICE_WIDTH = 750;
  922. var isIOS = false;
  923. var deviceWidth = 0;
  924. var deviceDPR = 0;
  925. function checkDeviceWidth() {
  926. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  927. platform = _wx$getSystemInfoSync.platform,
  928. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  929. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  930. deviceWidth = windowWidth;
  931. deviceDPR = pixelRatio;
  932. isIOS = platform === 'ios';
  933. }
  934. function upx2px(number, newDeviceWidth) {
  935. if (deviceWidth === 0) {
  936. checkDeviceWidth();
  937. }
  938. number = Number(number);
  939. if (number === 0) {
  940. return 0;
  941. }
  942. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  943. if (result < 0) {
  944. result = -result;
  945. }
  946. result = Math.floor(result + EPS);
  947. if (result === 0) {
  948. if (deviceDPR === 1 || !isIOS) {
  949. result = 1;
  950. } else {
  951. result = 0.5;
  952. }
  953. }
  954. return number < 0 ? -result : result;
  955. }
  956. var LOCALE_ZH_HANS = 'zh-Hans';
  957. var LOCALE_ZH_HANT = 'zh-Hant';
  958. var LOCALE_EN = 'en';
  959. var LOCALE_FR = 'fr';
  960. var LOCALE_ES = 'es';
  961. var messages = {};
  962. var locale;
  963. {
  964. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  965. }
  966. function initI18nMessages() {
  967. if (!isEnableLocale()) {
  968. return;
  969. }
  970. var localeKeys = Object.keys(__uniConfig.locales);
  971. if (localeKeys.length) {
  972. localeKeys.forEach(function (locale) {
  973. var curMessages = messages[locale];
  974. var userMessages = __uniConfig.locales[locale];
  975. if (curMessages) {
  976. Object.assign(curMessages, userMessages);
  977. } else {
  978. messages[locale] = userMessages;
  979. }
  980. });
  981. }
  982. }
  983. initI18nMessages();
  984. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  985. var t = i18n.t;
  986. var i18nMixin = i18n.mixin = {
  987. beforeCreate: function beforeCreate() {
  988. var _this = this;
  989. var unwatch = i18n.i18n.watchLocale(function () {
  990. _this.$forceUpdate();
  991. });
  992. this.$once('hook:beforeDestroy', function () {
  993. unwatch();
  994. });
  995. },
  996. methods: {
  997. $$t: function $$t(key, values) {
  998. return t(key, values);
  999. }
  1000. }
  1001. };
  1002. var setLocale = i18n.setLocale;
  1003. var getLocale = i18n.getLocale;
  1004. function initAppLocale(Vue, appVm, locale) {
  1005. var state = Vue.observable({
  1006. locale: locale || i18n.getLocale()
  1007. });
  1008. var localeWatchers = [];
  1009. appVm.$watchLocale = function (fn) {
  1010. localeWatchers.push(fn);
  1011. };
  1012. Object.defineProperty(appVm, '$locale', {
  1013. get: function get() {
  1014. return state.locale;
  1015. },
  1016. set: function set(v) {
  1017. state.locale = v;
  1018. localeWatchers.forEach(function (watch) {
  1019. return watch(v);
  1020. });
  1021. }
  1022. });
  1023. }
  1024. function isEnableLocale() {
  1025. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  1026. }
  1027. function include(str, parts) {
  1028. return !!parts.find(function (part) {
  1029. return str.indexOf(part) !== -1;
  1030. });
  1031. }
  1032. function startsWith(str, parts) {
  1033. return parts.find(function (part) {
  1034. return str.indexOf(part) === 0;
  1035. });
  1036. }
  1037. function normalizeLocale(locale, messages) {
  1038. if (!locale) {
  1039. return;
  1040. }
  1041. locale = locale.trim().replace(/_/g, '-');
  1042. if (messages && messages[locale]) {
  1043. return locale;
  1044. }
  1045. locale = locale.toLowerCase();
  1046. if (locale === 'chinese') {
  1047. // 支付宝
  1048. return LOCALE_ZH_HANS;
  1049. }
  1050. if (locale.indexOf('zh') === 0) {
  1051. if (locale.indexOf('-hans') > -1) {
  1052. return LOCALE_ZH_HANS;
  1053. }
  1054. if (locale.indexOf('-hant') > -1) {
  1055. return LOCALE_ZH_HANT;
  1056. }
  1057. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  1058. return LOCALE_ZH_HANT;
  1059. }
  1060. return LOCALE_ZH_HANS;
  1061. }
  1062. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  1063. if (lang) {
  1064. return lang;
  1065. }
  1066. }
  1067. // export function initI18n() {
  1068. // const localeKeys = Object.keys(__uniConfig.locales || {})
  1069. // if (localeKeys.length) {
  1070. // localeKeys.forEach((locale) =>
  1071. // i18n.add(locale, __uniConfig.locales[locale])
  1072. // )
  1073. // }
  1074. // }
  1075. function getLocale$1() {
  1076. // 优先使用 $locale
  1077. if (isFn(getApp)) {
  1078. var app = getApp({
  1079. allowDefault: true
  1080. });
  1081. if (app && app.$vm) {
  1082. return app.$vm.$locale;
  1083. }
  1084. }
  1085. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  1086. }
  1087. function setLocale$1(locale) {
  1088. var app = isFn(getApp) ? getApp() : false;
  1089. if (!app) {
  1090. return false;
  1091. }
  1092. var oldLocale = app.$vm.$locale;
  1093. if (oldLocale !== locale) {
  1094. app.$vm.$locale = locale;
  1095. onLocaleChangeCallbacks.forEach(function (fn) {
  1096. return fn({
  1097. locale: locale
  1098. });
  1099. });
  1100. return true;
  1101. }
  1102. return false;
  1103. }
  1104. var onLocaleChangeCallbacks = [];
  1105. function onLocaleChange(fn) {
  1106. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  1107. onLocaleChangeCallbacks.push(fn);
  1108. }
  1109. }
  1110. if (typeof global !== 'undefined') {
  1111. global.getLocale = getLocale$1;
  1112. }
  1113. var interceptors = {
  1114. promiseInterceptor: promiseInterceptor
  1115. };
  1116. var baseApi = /*#__PURE__*/Object.freeze({
  1117. __proto__: null,
  1118. upx2px: upx2px,
  1119. getLocale: getLocale$1,
  1120. setLocale: setLocale$1,
  1121. onLocaleChange: onLocaleChange,
  1122. addInterceptor: addInterceptor,
  1123. removeInterceptor: removeInterceptor,
  1124. interceptors: interceptors
  1125. });
  1126. function findExistsPageIndex(url) {
  1127. var pages = getCurrentPages();
  1128. var len = pages.length;
  1129. while (len--) {
  1130. var page = pages[len];
  1131. if (page.$page && page.$page.fullPath === url) {
  1132. return len;
  1133. }
  1134. }
  1135. return -1;
  1136. }
  1137. var redirectTo = {
  1138. name: function name(fromArgs) {
  1139. if (fromArgs.exists === 'back' && fromArgs.delta) {
  1140. return 'navigateBack';
  1141. }
  1142. return 'redirectTo';
  1143. },
  1144. args: function args(fromArgs) {
  1145. if (fromArgs.exists === 'back' && fromArgs.url) {
  1146. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  1147. if (existsPageIndex !== -1) {
  1148. var delta = getCurrentPages().length - 1 - existsPageIndex;
  1149. if (delta > 0) {
  1150. fromArgs.delta = delta;
  1151. }
  1152. }
  1153. }
  1154. }
  1155. };
  1156. var previewImage = {
  1157. args: function args(fromArgs) {
  1158. var currentIndex = parseInt(fromArgs.current);
  1159. if (isNaN(currentIndex)) {
  1160. return;
  1161. }
  1162. var urls = fromArgs.urls;
  1163. if (!Array.isArray(urls)) {
  1164. return;
  1165. }
  1166. var len = urls.length;
  1167. if (!len) {
  1168. return;
  1169. }
  1170. if (currentIndex < 0) {
  1171. currentIndex = 0;
  1172. } else if (currentIndex >= len) {
  1173. currentIndex = len - 1;
  1174. }
  1175. if (currentIndex > 0) {
  1176. fromArgs.current = urls[currentIndex];
  1177. fromArgs.urls = urls.filter(function (item, index) {
  1178. return index < currentIndex ? item !== urls[currentIndex] : true;
  1179. });
  1180. } else {
  1181. fromArgs.current = urls[0];
  1182. }
  1183. return {
  1184. indicator: false,
  1185. loop: false
  1186. };
  1187. }
  1188. };
  1189. var UUID_KEY = '__DC_STAT_UUID';
  1190. var deviceId;
  1191. function useDeviceId(result) {
  1192. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  1193. if (!deviceId) {
  1194. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  1195. wx.setStorage({
  1196. key: UUID_KEY,
  1197. data: deviceId
  1198. });
  1199. }
  1200. result.deviceId = deviceId;
  1201. }
  1202. function addSafeAreaInsets(result) {
  1203. if (result.safeArea) {
  1204. var safeArea = result.safeArea;
  1205. result.safeAreaInsets = {
  1206. top: safeArea.top,
  1207. left: safeArea.left,
  1208. right: result.windowWidth - safeArea.right,
  1209. bottom: result.screenHeight - safeArea.bottom
  1210. };
  1211. }
  1212. }
  1213. function populateParameters(result) {
  1214. var _result$brand = result.brand,
  1215. brand = _result$brand === void 0 ? '' : _result$brand,
  1216. _result$model = result.model,
  1217. model = _result$model === void 0 ? '' : _result$model,
  1218. _result$system = result.system,
  1219. system = _result$system === void 0 ? '' : _result$system,
  1220. _result$language = result.language,
  1221. language = _result$language === void 0 ? '' : _result$language,
  1222. theme = result.theme,
  1223. version = result.version,
  1224. platform = result.platform,
  1225. fontSizeSetting = result.fontSizeSetting,
  1226. SDKVersion = result.SDKVersion,
  1227. pixelRatio = result.pixelRatio,
  1228. deviceOrientation = result.deviceOrientation;
  1229. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  1230. var extraParam = {};
  1231. // osName osVersion
  1232. var osName = '';
  1233. var osVersion = '';
  1234. {
  1235. osName = system.split(' ')[0] || '';
  1236. osVersion = system.split(' ')[1] || '';
  1237. }
  1238. var hostVersion = version;
  1239. // deviceType
  1240. var deviceType = getGetDeviceType(result, model);
  1241. // deviceModel
  1242. var deviceBrand = getDeviceBrand(brand);
  1243. // hostName
  1244. var _hostName = getHostName(result);
  1245. // deviceOrientation
  1246. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  1247. // devicePixelRatio
  1248. var _devicePixelRatio = pixelRatio;
  1249. // SDKVersion
  1250. var _SDKVersion = SDKVersion;
  1251. // hostLanguage
  1252. var hostLanguage = language.replace(/_/g, '-');
  1253. // wx.getAccountInfoSync
  1254. var parameters = {
  1255. appId: "__UNI__6047036",
  1256. appName: "Applet",
  1257. appVersion: "1.0.0",
  1258. appVersionCode: "100",
  1259. appLanguage: getAppLanguage(hostLanguage),
  1260. uniCompileVersion: "3.8.4",
  1261. uniRuntimeVersion: "3.8.4",
  1262. uniPlatform: undefined || "mp-weixin",
  1263. deviceBrand: deviceBrand,
  1264. deviceModel: model,
  1265. deviceType: deviceType,
  1266. devicePixelRatio: _devicePixelRatio,
  1267. deviceOrientation: _deviceOrientation,
  1268. osName: osName.toLocaleLowerCase(),
  1269. osVersion: osVersion,
  1270. hostTheme: theme,
  1271. hostVersion: hostVersion,
  1272. hostLanguage: hostLanguage,
  1273. hostName: _hostName,
  1274. hostSDKVersion: _SDKVersion,
  1275. hostFontSizeSetting: fontSizeSetting,
  1276. windowTop: 0,
  1277. windowBottom: 0,
  1278. // TODO
  1279. osLanguage: undefined,
  1280. osTheme: undefined,
  1281. ua: undefined,
  1282. hostPackageName: undefined,
  1283. browserName: undefined,
  1284. browserVersion: undefined
  1285. };
  1286. Object.assign(result, parameters, extraParam);
  1287. }
  1288. function getGetDeviceType(result, model) {
  1289. var deviceType = result.deviceType || 'phone';
  1290. {
  1291. var deviceTypeMaps = {
  1292. ipad: 'pad',
  1293. windows: 'pc',
  1294. mac: 'pc'
  1295. };
  1296. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  1297. var _model = model.toLocaleLowerCase();
  1298. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  1299. var _m = deviceTypeMapsKeys[index];
  1300. if (_model.indexOf(_m) !== -1) {
  1301. deviceType = deviceTypeMaps[_m];
  1302. break;
  1303. }
  1304. }
  1305. }
  1306. return deviceType;
  1307. }
  1308. function getDeviceBrand(brand) {
  1309. var deviceBrand = brand;
  1310. if (deviceBrand) {
  1311. deviceBrand = brand.toLocaleLowerCase();
  1312. }
  1313. return deviceBrand;
  1314. }
  1315. function getAppLanguage(defaultLanguage) {
  1316. return getLocale$1 ? getLocale$1() : defaultLanguage;
  1317. }
  1318. function getHostName(result) {
  1319. var _platform = 'WeChat';
  1320. var _hostName = result.hostName || _platform; // mp-jd
  1321. {
  1322. if (result.environment) {
  1323. _hostName = result.environment;
  1324. } else if (result.host && result.host.env) {
  1325. _hostName = result.host.env;
  1326. }
  1327. }
  1328. return _hostName;
  1329. }
  1330. var getSystemInfo = {
  1331. returnValue: function returnValue(result) {
  1332. useDeviceId(result);
  1333. addSafeAreaInsets(result);
  1334. populateParameters(result);
  1335. }
  1336. };
  1337. var showActionSheet = {
  1338. args: function args(fromArgs) {
  1339. if ((0, _typeof2.default)(fromArgs) === 'object') {
  1340. fromArgs.alertText = fromArgs.title;
  1341. }
  1342. }
  1343. };
  1344. var getAppBaseInfo = {
  1345. returnValue: function returnValue(result) {
  1346. var _result = result,
  1347. version = _result.version,
  1348. language = _result.language,
  1349. SDKVersion = _result.SDKVersion,
  1350. theme = _result.theme;
  1351. var _hostName = getHostName(result);
  1352. var hostLanguage = language.replace('_', '-');
  1353. result = sortObject(Object.assign(result, {
  1354. appId: "__UNI__6047036",
  1355. appName: "Applet",
  1356. appVersion: "1.0.0",
  1357. appVersionCode: "100",
  1358. appLanguage: getAppLanguage(hostLanguage),
  1359. hostVersion: version,
  1360. hostLanguage: hostLanguage,
  1361. hostName: _hostName,
  1362. hostSDKVersion: SDKVersion,
  1363. hostTheme: theme
  1364. }));
  1365. }
  1366. };
  1367. var getDeviceInfo = {
  1368. returnValue: function returnValue(result) {
  1369. var _result2 = result,
  1370. brand = _result2.brand,
  1371. model = _result2.model;
  1372. var deviceType = getGetDeviceType(result, model);
  1373. var deviceBrand = getDeviceBrand(brand);
  1374. useDeviceId(result);
  1375. result = sortObject(Object.assign(result, {
  1376. deviceType: deviceType,
  1377. deviceBrand: deviceBrand,
  1378. deviceModel: model
  1379. }));
  1380. }
  1381. };
  1382. var getWindowInfo = {
  1383. returnValue: function returnValue(result) {
  1384. addSafeAreaInsets(result);
  1385. result = sortObject(Object.assign(result, {
  1386. windowTop: 0,
  1387. windowBottom: 0
  1388. }));
  1389. }
  1390. };
  1391. var getAppAuthorizeSetting = {
  1392. returnValue: function returnValue(result) {
  1393. var locationReducedAccuracy = result.locationReducedAccuracy;
  1394. result.locationAccuracy = 'unsupported';
  1395. if (locationReducedAccuracy === true) {
  1396. result.locationAccuracy = 'reduced';
  1397. } else if (locationReducedAccuracy === false) {
  1398. result.locationAccuracy = 'full';
  1399. }
  1400. }
  1401. };
  1402. // import navigateTo from 'uni-helpers/navigate-to'
  1403. var compressImage = {
  1404. args: function args(fromArgs) {
  1405. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  1406. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  1407. fromArgs.compressHeight = fromArgs.compressedHeight;
  1408. }
  1409. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  1410. fromArgs.compressWidth = fromArgs.compressedWidth;
  1411. }
  1412. }
  1413. };
  1414. var protocols = {
  1415. redirectTo: redirectTo,
  1416. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  1417. previewImage: previewImage,
  1418. getSystemInfo: getSystemInfo,
  1419. getSystemInfoSync: getSystemInfo,
  1420. showActionSheet: showActionSheet,
  1421. getAppBaseInfo: getAppBaseInfo,
  1422. getDeviceInfo: getDeviceInfo,
  1423. getWindowInfo: getWindowInfo,
  1424. getAppAuthorizeSetting: getAppAuthorizeSetting,
  1425. compressImage: compressImage
  1426. };
  1427. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  1428. var canIUses = [];
  1429. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  1430. function processCallback(methodName, method, returnValue) {
  1431. return function (res) {
  1432. return method(processReturnValue(methodName, res, returnValue));
  1433. };
  1434. }
  1435. function processArgs(methodName, fromArgs) {
  1436. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  1437. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  1438. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  1439. if (isPlainObject(fromArgs)) {
  1440. // 一般 api 的参数解析
  1441. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  1442. if (isFn(argsOption)) {
  1443. argsOption = argsOption(fromArgs, toArgs) || {};
  1444. }
  1445. for (var key in fromArgs) {
  1446. if (hasOwn(argsOption, key)) {
  1447. var keyOption = argsOption[key];
  1448. if (isFn(keyOption)) {
  1449. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  1450. }
  1451. if (!keyOption) {
  1452. // 不支持的参数
  1453. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  1454. } else if (isStr(keyOption)) {
  1455. // 重写参数 key
  1456. toArgs[keyOption] = fromArgs[key];
  1457. } else if (isPlainObject(keyOption)) {
  1458. // {name:newName,value:value}可重新指定参数 key:value
  1459. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  1460. }
  1461. } else if (CALLBACKS.indexOf(key) !== -1) {
  1462. if (isFn(fromArgs[key])) {
  1463. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  1464. }
  1465. } else {
  1466. if (!keepFromArgs) {
  1467. toArgs[key] = fromArgs[key];
  1468. }
  1469. }
  1470. }
  1471. return toArgs;
  1472. } else if (isFn(fromArgs)) {
  1473. fromArgs = processCallback(methodName, fromArgs, returnValue);
  1474. }
  1475. return fromArgs;
  1476. }
  1477. function processReturnValue(methodName, res, returnValue) {
  1478. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  1479. if (isFn(protocols.returnValue)) {
  1480. // 处理通用 returnValue
  1481. res = protocols.returnValue(methodName, res);
  1482. }
  1483. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  1484. }
  1485. function wrapper(methodName, method) {
  1486. if (hasOwn(protocols, methodName)) {
  1487. var protocol = protocols[methodName];
  1488. if (!protocol) {
  1489. // 暂不支持的 api
  1490. return function () {
  1491. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  1492. };
  1493. }
  1494. return function (arg1, arg2) {
  1495. // 目前 api 最多两个参数
  1496. var options = protocol;
  1497. if (isFn(protocol)) {
  1498. options = protocol(arg1);
  1499. }
  1500. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  1501. var args = [arg1];
  1502. if (typeof arg2 !== 'undefined') {
  1503. args.push(arg2);
  1504. }
  1505. if (isFn(options.name)) {
  1506. methodName = options.name(arg1);
  1507. } else if (isStr(options.name)) {
  1508. methodName = options.name;
  1509. }
  1510. var returnValue = wx[methodName].apply(wx, args);
  1511. if (isSyncApi(methodName)) {
  1512. // 同步 api
  1513. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1514. }
  1515. return returnValue;
  1516. };
  1517. }
  1518. return method;
  1519. }
  1520. var todoApis = Object.create(null);
  1521. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  1522. function createTodoApi(name) {
  1523. return function todoApi(_ref) {
  1524. var fail = _ref.fail,
  1525. complete = _ref.complete;
  1526. var res = {
  1527. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  1528. };
  1529. isFn(fail) && fail(res);
  1530. isFn(complete) && complete(res);
  1531. };
  1532. }
  1533. TODOS.forEach(function (name) {
  1534. todoApis[name] = createTodoApi(name);
  1535. });
  1536. var providers = {
  1537. oauth: ['weixin'],
  1538. share: ['weixin'],
  1539. payment: ['wxpay'],
  1540. push: ['weixin']
  1541. };
  1542. function getProvider(_ref2) {
  1543. var service = _ref2.service,
  1544. success = _ref2.success,
  1545. fail = _ref2.fail,
  1546. complete = _ref2.complete;
  1547. var res = false;
  1548. if (providers[service]) {
  1549. res = {
  1550. errMsg: 'getProvider:ok',
  1551. service: service,
  1552. provider: providers[service]
  1553. };
  1554. isFn(success) && success(res);
  1555. } else {
  1556. res = {
  1557. errMsg: 'getProvider:fail service not found'
  1558. };
  1559. isFn(fail) && fail(res);
  1560. }
  1561. isFn(complete) && complete(res);
  1562. }
  1563. var extraApi = /*#__PURE__*/Object.freeze({
  1564. __proto__: null,
  1565. getProvider: getProvider
  1566. });
  1567. var getEmitter = function () {
  1568. var Emitter;
  1569. return function getUniEmitter() {
  1570. if (!Emitter) {
  1571. Emitter = new _vue.default();
  1572. }
  1573. return Emitter;
  1574. };
  1575. }();
  1576. function apply(ctx, method, args) {
  1577. return ctx[method].apply(ctx, args);
  1578. }
  1579. function $on() {
  1580. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  1581. }
  1582. function $off() {
  1583. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  1584. }
  1585. function $once() {
  1586. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  1587. }
  1588. function $emit() {
  1589. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  1590. }
  1591. var eventApi = /*#__PURE__*/Object.freeze({
  1592. __proto__: null,
  1593. $on: $on,
  1594. $off: $off,
  1595. $once: $once,
  1596. $emit: $emit
  1597. });
  1598. /**
  1599. * 框架内 try-catch
  1600. */
  1601. /**
  1602. * 开发者 try-catch
  1603. */
  1604. function tryCatch(fn) {
  1605. return function () {
  1606. try {
  1607. return fn.apply(fn, arguments);
  1608. } catch (e) {
  1609. // TODO
  1610. console.error(e);
  1611. }
  1612. };
  1613. }
  1614. function getApiCallbacks(params) {
  1615. var apiCallbacks = {};
  1616. for (var name in params) {
  1617. var param = params[name];
  1618. if (isFn(param)) {
  1619. apiCallbacks[name] = tryCatch(param);
  1620. delete params[name];
  1621. }
  1622. }
  1623. return apiCallbacks;
  1624. }
  1625. var cid;
  1626. var cidErrMsg;
  1627. var enabled;
  1628. function normalizePushMessage(message) {
  1629. try {
  1630. return JSON.parse(message);
  1631. } catch (e) {}
  1632. return message;
  1633. }
  1634. function invokePushCallback(args) {
  1635. if (args.type === 'enabled') {
  1636. enabled = true;
  1637. } else if (args.type === 'clientId') {
  1638. cid = args.cid;
  1639. cidErrMsg = args.errMsg;
  1640. invokeGetPushCidCallbacks(cid, args.errMsg);
  1641. } else if (args.type === 'pushMsg') {
  1642. var message = {
  1643. type: 'receive',
  1644. data: normalizePushMessage(args.message)
  1645. };
  1646. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  1647. var callback = onPushMessageCallbacks[i];
  1648. callback(message);
  1649. // 该消息已被阻止
  1650. if (message.stopped) {
  1651. break;
  1652. }
  1653. }
  1654. } else if (args.type === 'click') {
  1655. onPushMessageCallbacks.forEach(function (callback) {
  1656. callback({
  1657. type: 'click',
  1658. data: normalizePushMessage(args.message)
  1659. });
  1660. });
  1661. }
  1662. }
  1663. var getPushCidCallbacks = [];
  1664. function invokeGetPushCidCallbacks(cid, errMsg) {
  1665. getPushCidCallbacks.forEach(function (callback) {
  1666. callback(cid, errMsg);
  1667. });
  1668. getPushCidCallbacks.length = 0;
  1669. }
  1670. function getPushClientId(args) {
  1671. if (!isPlainObject(args)) {
  1672. args = {};
  1673. }
  1674. var _getApiCallbacks = getApiCallbacks(args),
  1675. success = _getApiCallbacks.success,
  1676. fail = _getApiCallbacks.fail,
  1677. complete = _getApiCallbacks.complete;
  1678. var hasSuccess = isFn(success);
  1679. var hasFail = isFn(fail);
  1680. var hasComplete = isFn(complete);
  1681. Promise.resolve().then(function () {
  1682. if (typeof enabled === 'undefined') {
  1683. enabled = false;
  1684. cid = '';
  1685. cidErrMsg = 'uniPush is not enabled';
  1686. }
  1687. getPushCidCallbacks.push(function (cid, errMsg) {
  1688. var res;
  1689. if (cid) {
  1690. res = {
  1691. errMsg: 'getPushClientId:ok',
  1692. cid: cid
  1693. };
  1694. hasSuccess && success(res);
  1695. } else {
  1696. res = {
  1697. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  1698. };
  1699. hasFail && fail(res);
  1700. }
  1701. hasComplete && complete(res);
  1702. });
  1703. if (typeof cid !== 'undefined') {
  1704. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1705. }
  1706. });
  1707. }
  1708. var onPushMessageCallbacks = [];
  1709. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1710. var onPushMessage = function onPushMessage(fn) {
  1711. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1712. onPushMessageCallbacks.push(fn);
  1713. }
  1714. };
  1715. var offPushMessage = function offPushMessage(fn) {
  1716. if (!fn) {
  1717. onPushMessageCallbacks.length = 0;
  1718. } else {
  1719. var index = onPushMessageCallbacks.indexOf(fn);
  1720. if (index > -1) {
  1721. onPushMessageCallbacks.splice(index, 1);
  1722. }
  1723. }
  1724. };
  1725. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  1726. if (!baseInfo) {
  1727. baseInfo = wx.getSystemInfoSync();
  1728. }
  1729. var host = baseInfo ? baseInfo.host : null;
  1730. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  1731. var api = /*#__PURE__*/Object.freeze({
  1732. __proto__: null,
  1733. shareVideoMessage: shareVideoMessage,
  1734. getPushClientId: getPushClientId,
  1735. onPushMessage: onPushMessage,
  1736. offPushMessage: offPushMessage,
  1737. invokePushCallback: invokePushCallback
  1738. });
  1739. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1740. function findVmByVueId(vm, vuePid) {
  1741. var $children = vm.$children;
  1742. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1743. for (var i = $children.length - 1; i >= 0; i--) {
  1744. var childVm = $children[i];
  1745. if (childVm.$scope._$vueId === vuePid) {
  1746. return childVm;
  1747. }
  1748. }
  1749. // 反向递归查找
  1750. var parentVm;
  1751. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1752. parentVm = findVmByVueId($children[_i], vuePid);
  1753. if (parentVm) {
  1754. return parentVm;
  1755. }
  1756. }
  1757. }
  1758. function initBehavior(options) {
  1759. return Behavior(options);
  1760. }
  1761. function isPage() {
  1762. return !!this.route;
  1763. }
  1764. function initRelation(detail) {
  1765. this.triggerEvent('__l', detail);
  1766. }
  1767. function selectAllComponents(mpInstance, selector, $refs) {
  1768. var components = mpInstance.selectAllComponents(selector) || [];
  1769. components.forEach(function (component) {
  1770. var ref = component.dataset.ref;
  1771. $refs[ref] = component.$vm || toSkip(component);
  1772. {
  1773. if (component.dataset.vueGeneric === 'scoped') {
  1774. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1775. selectAllComponents(scopedComponent, selector, $refs);
  1776. });
  1777. }
  1778. }
  1779. });
  1780. }
  1781. function syncRefs(refs, newRefs) {
  1782. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  1783. var newKeys = Object.keys(newRefs);
  1784. newKeys.forEach(function (key) {
  1785. var oldValue = refs[key];
  1786. var newValue = newRefs[key];
  1787. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  1788. return oldValue.includes(value);
  1789. })) {
  1790. return;
  1791. }
  1792. refs[key] = newValue;
  1793. oldKeys.delete(key);
  1794. });
  1795. oldKeys.forEach(function (key) {
  1796. delete refs[key];
  1797. });
  1798. return refs;
  1799. }
  1800. function initRefs(vm) {
  1801. var mpInstance = vm.$scope;
  1802. var refs = {};
  1803. Object.defineProperty(vm, '$refs', {
  1804. get: function get() {
  1805. var $refs = {};
  1806. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1807. // TODO 暂不考虑 for 中的 scoped
  1808. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  1809. forComponents.forEach(function (component) {
  1810. var ref = component.dataset.ref;
  1811. if (!$refs[ref]) {
  1812. $refs[ref] = [];
  1813. }
  1814. $refs[ref].push(component.$vm || toSkip(component));
  1815. });
  1816. return syncRefs(refs, $refs);
  1817. }
  1818. });
  1819. }
  1820. function handleLink(event) {
  1821. var _ref3 = event.detail || event.value,
  1822. vuePid = _ref3.vuePid,
  1823. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  1824. var parentVm;
  1825. if (vuePid) {
  1826. parentVm = findVmByVueId(this.$vm, vuePid);
  1827. }
  1828. if (!parentVm) {
  1829. parentVm = this.$vm;
  1830. }
  1831. vueOptions.parent = parentVm;
  1832. }
  1833. function markMPComponent(component) {
  1834. // 在 Vue 中标记为小程序组件
  1835. var IS_MP = '__v_isMPComponent';
  1836. Object.defineProperty(component, IS_MP, {
  1837. configurable: true,
  1838. enumerable: false,
  1839. value: true
  1840. });
  1841. return component;
  1842. }
  1843. function toSkip(obj) {
  1844. var OB = '__ob__';
  1845. var SKIP = '__v_skip';
  1846. if (isObject(obj) && Object.isExtensible(obj)) {
  1847. // 避免被 @vue/composition-api 观测
  1848. Object.defineProperty(obj, OB, {
  1849. configurable: true,
  1850. enumerable: false,
  1851. value: (0, _defineProperty2.default)({}, SKIP, true)
  1852. });
  1853. }
  1854. return obj;
  1855. }
  1856. var WORKLET_RE = /_(.*)_worklet_factory_/;
  1857. function initWorkletMethods(mpMethods, vueMethods) {
  1858. if (vueMethods) {
  1859. Object.keys(vueMethods).forEach(function (name) {
  1860. var matches = name.match(WORKLET_RE);
  1861. if (matches) {
  1862. var workletName = matches[1];
  1863. mpMethods[name] = vueMethods[name];
  1864. mpMethods[workletName] = vueMethods[workletName];
  1865. }
  1866. });
  1867. }
  1868. }
  1869. var MPPage = Page;
  1870. var MPComponent = Component;
  1871. var customizeRE = /:/g;
  1872. var customize = cached(function (str) {
  1873. return camelize(str.replace(customizeRE, '-'));
  1874. });
  1875. function initTriggerEvent(mpInstance) {
  1876. var oldTriggerEvent = mpInstance.triggerEvent;
  1877. var newTriggerEvent = function newTriggerEvent(event) {
  1878. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  1879. args[_key3 - 1] = arguments[_key3];
  1880. }
  1881. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  1882. if (this.$vm || this.dataset && this.dataset.comType) {
  1883. event = customize(event);
  1884. } else {
  1885. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  1886. var newEvent = customize(event);
  1887. if (newEvent !== event) {
  1888. oldTriggerEvent.apply(this, [newEvent].concat(args));
  1889. }
  1890. }
  1891. return oldTriggerEvent.apply(this, [event].concat(args));
  1892. };
  1893. try {
  1894. // 京东小程序 triggerEvent 为只读
  1895. mpInstance.triggerEvent = newTriggerEvent;
  1896. } catch (error) {
  1897. mpInstance._triggerEvent = newTriggerEvent;
  1898. }
  1899. }
  1900. function initHook(name, options, isComponent) {
  1901. var oldHook = options[name];
  1902. options[name] = function () {
  1903. markMPComponent(this);
  1904. initTriggerEvent(this);
  1905. if (oldHook) {
  1906. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1907. args[_key4] = arguments[_key4];
  1908. }
  1909. return oldHook.apply(this, args);
  1910. }
  1911. };
  1912. }
  1913. if (!MPPage.__$wrappered) {
  1914. MPPage.__$wrappered = true;
  1915. Page = function Page() {
  1916. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1917. initHook('onLoad', options);
  1918. return MPPage(options);
  1919. };
  1920. Page.after = MPPage.after;
  1921. Component = function Component() {
  1922. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1923. initHook('created', options);
  1924. return MPComponent(options);
  1925. };
  1926. }
  1927. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  1928. function initMocks(vm, mocks) {
  1929. var mpInstance = vm.$mp[vm.mpType];
  1930. mocks.forEach(function (mock) {
  1931. if (hasOwn(mpInstance, mock)) {
  1932. vm[mock] = mpInstance[mock];
  1933. }
  1934. });
  1935. }
  1936. function hasHook(hook, vueOptions) {
  1937. if (!vueOptions) {
  1938. return true;
  1939. }
  1940. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1941. return true;
  1942. }
  1943. vueOptions = vueOptions.default || vueOptions;
  1944. if (isFn(vueOptions)) {
  1945. if (isFn(vueOptions.extendOptions[hook])) {
  1946. return true;
  1947. }
  1948. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  1949. return true;
  1950. }
  1951. return false;
  1952. }
  1953. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  1954. return true;
  1955. }
  1956. var mixins = vueOptions.mixins;
  1957. if (Array.isArray(mixins)) {
  1958. return !!mixins.find(function (mixin) {
  1959. return hasHook(hook, mixin);
  1960. });
  1961. }
  1962. }
  1963. function initHooks(mpOptions, hooks, vueOptions) {
  1964. hooks.forEach(function (hook) {
  1965. if (hasHook(hook, vueOptions)) {
  1966. mpOptions[hook] = function (args) {
  1967. return this.$vm && this.$vm.__call_hook(hook, args);
  1968. };
  1969. }
  1970. });
  1971. }
  1972. function initUnknownHooks(mpOptions, vueOptions) {
  1973. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1974. findHooks(vueOptions).forEach(function (hook) {
  1975. return initHook$1(mpOptions, hook, excludes);
  1976. });
  1977. }
  1978. function findHooks(vueOptions) {
  1979. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1980. if (vueOptions) {
  1981. Object.keys(vueOptions).forEach(function (name) {
  1982. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  1983. hooks.push(name);
  1984. }
  1985. });
  1986. }
  1987. return hooks;
  1988. }
  1989. function initHook$1(mpOptions, hook, excludes) {
  1990. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  1991. mpOptions[hook] = function (args) {
  1992. return this.$vm && this.$vm.__call_hook(hook, args);
  1993. };
  1994. }
  1995. }
  1996. function initVueComponent(Vue, vueOptions) {
  1997. vueOptions = vueOptions.default || vueOptions;
  1998. var VueComponent;
  1999. if (isFn(vueOptions)) {
  2000. VueComponent = vueOptions;
  2001. } else {
  2002. VueComponent = Vue.extend(vueOptions);
  2003. }
  2004. vueOptions = VueComponent.options;
  2005. return [VueComponent, vueOptions];
  2006. }
  2007. function initSlots(vm, vueSlots) {
  2008. if (Array.isArray(vueSlots) && vueSlots.length) {
  2009. var $slots = Object.create(null);
  2010. vueSlots.forEach(function (slotName) {
  2011. $slots[slotName] = true;
  2012. });
  2013. vm.$scopedSlots = vm.$slots = $slots;
  2014. }
  2015. }
  2016. function initVueIds(vueIds, mpInstance) {
  2017. vueIds = (vueIds || '').split(',');
  2018. var len = vueIds.length;
  2019. if (len === 1) {
  2020. mpInstance._$vueId = vueIds[0];
  2021. } else if (len === 2) {
  2022. mpInstance._$vueId = vueIds[0];
  2023. mpInstance._$vuePid = vueIds[1];
  2024. }
  2025. }
  2026. function initData(vueOptions, context) {
  2027. var data = vueOptions.data || {};
  2028. var methods = vueOptions.methods || {};
  2029. if (typeof data === 'function') {
  2030. try {
  2031. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  2032. } catch (e) {
  2033. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  2034. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  2035. }
  2036. }
  2037. } else {
  2038. try {
  2039. // 对 data 格式化
  2040. data = JSON.parse(JSON.stringify(data));
  2041. } catch (e) {}
  2042. }
  2043. if (!isPlainObject(data)) {
  2044. data = {};
  2045. }
  2046. Object.keys(methods).forEach(function (methodName) {
  2047. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  2048. data[methodName] = methods[methodName];
  2049. }
  2050. });
  2051. return data;
  2052. }
  2053. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  2054. function createObserver(name) {
  2055. return function observer(newVal, oldVal) {
  2056. if (this.$vm) {
  2057. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  2058. }
  2059. };
  2060. }
  2061. function initBehaviors(vueOptions, initBehavior) {
  2062. var vueBehaviors = vueOptions.behaviors;
  2063. var vueExtends = vueOptions.extends;
  2064. var vueMixins = vueOptions.mixins;
  2065. var vueProps = vueOptions.props;
  2066. if (!vueProps) {
  2067. vueOptions.props = vueProps = [];
  2068. }
  2069. var behaviors = [];
  2070. if (Array.isArray(vueBehaviors)) {
  2071. vueBehaviors.forEach(function (behavior) {
  2072. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  2073. if (behavior === 'uni://form-field') {
  2074. if (Array.isArray(vueProps)) {
  2075. vueProps.push('name');
  2076. vueProps.push('value');
  2077. } else {
  2078. vueProps.name = {
  2079. type: String,
  2080. default: ''
  2081. };
  2082. vueProps.value = {
  2083. type: [String, Number, Boolean, Array, Object, Date],
  2084. default: ''
  2085. };
  2086. }
  2087. }
  2088. });
  2089. }
  2090. if (isPlainObject(vueExtends) && vueExtends.props) {
  2091. behaviors.push(initBehavior({
  2092. properties: initProperties(vueExtends.props, true)
  2093. }));
  2094. }
  2095. if (Array.isArray(vueMixins)) {
  2096. vueMixins.forEach(function (vueMixin) {
  2097. if (isPlainObject(vueMixin) && vueMixin.props) {
  2098. behaviors.push(initBehavior({
  2099. properties: initProperties(vueMixin.props, true)
  2100. }));
  2101. }
  2102. });
  2103. }
  2104. return behaviors;
  2105. }
  2106. function parsePropType(key, type, defaultValue, file) {
  2107. // [String]=>String
  2108. if (Array.isArray(type) && type.length === 1) {
  2109. return type[0];
  2110. }
  2111. return type;
  2112. }
  2113. function initProperties(props) {
  2114. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  2115. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  2116. var options = arguments.length > 3 ? arguments[3] : undefined;
  2117. var properties = {};
  2118. if (!isBehavior) {
  2119. properties.vueId = {
  2120. type: String,
  2121. value: ''
  2122. };
  2123. {
  2124. if (options.virtualHost) {
  2125. properties.virtualHostStyle = {
  2126. type: null,
  2127. value: ''
  2128. };
  2129. properties.virtualHostClass = {
  2130. type: null,
  2131. value: ''
  2132. };
  2133. }
  2134. }
  2135. // scopedSlotsCompiler auto
  2136. properties.scopedSlotsCompiler = {
  2137. type: String,
  2138. value: ''
  2139. };
  2140. properties.vueSlots = {
  2141. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  2142. type: null,
  2143. value: [],
  2144. observer: function observer(newVal, oldVal) {
  2145. var $slots = Object.create(null);
  2146. newVal.forEach(function (slotName) {
  2147. $slots[slotName] = true;
  2148. });
  2149. this.setData({
  2150. $slots: $slots
  2151. });
  2152. }
  2153. };
  2154. }
  2155. if (Array.isArray(props)) {
  2156. // ['title']
  2157. props.forEach(function (key) {
  2158. properties[key] = {
  2159. type: null,
  2160. observer: createObserver(key)
  2161. };
  2162. });
  2163. } else if (isPlainObject(props)) {
  2164. // {title:{type:String,default:''},content:String}
  2165. Object.keys(props).forEach(function (key) {
  2166. var opts = props[key];
  2167. if (isPlainObject(opts)) {
  2168. // title:{type:String,default:''}
  2169. var value = opts.default;
  2170. if (isFn(value)) {
  2171. value = value();
  2172. }
  2173. opts.type = parsePropType(key, opts.type);
  2174. properties[key] = {
  2175. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  2176. value: value,
  2177. observer: createObserver(key)
  2178. };
  2179. } else {
  2180. // content:String
  2181. var type = parsePropType(key, opts);
  2182. properties[key] = {
  2183. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  2184. observer: createObserver(key)
  2185. };
  2186. }
  2187. });
  2188. }
  2189. return properties;
  2190. }
  2191. function wrapper$1(event) {
  2192. // TODO 又得兼容 mpvue 的 mp 对象
  2193. try {
  2194. event.mp = JSON.parse(JSON.stringify(event));
  2195. } catch (e) {}
  2196. event.stopPropagation = noop;
  2197. event.preventDefault = noop;
  2198. event.target = event.target || {};
  2199. if (!hasOwn(event, 'detail')) {
  2200. event.detail = {};
  2201. }
  2202. if (hasOwn(event, 'markerId')) {
  2203. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  2204. event.detail.markerId = event.markerId;
  2205. }
  2206. if (isPlainObject(event.detail)) {
  2207. event.target = Object.assign({}, event.target, event.detail);
  2208. }
  2209. return event;
  2210. }
  2211. function getExtraValue(vm, dataPathsArray) {
  2212. var context = vm;
  2213. dataPathsArray.forEach(function (dataPathArray) {
  2214. var dataPath = dataPathArray[0];
  2215. var value = dataPathArray[2];
  2216. if (dataPath || typeof value !== 'undefined') {
  2217. // ['','',index,'disable']
  2218. var propPath = dataPathArray[1];
  2219. var valuePath = dataPathArray[3];
  2220. var vFor;
  2221. if (Number.isInteger(dataPath)) {
  2222. vFor = dataPath;
  2223. } else if (!dataPath) {
  2224. vFor = context;
  2225. } else if (typeof dataPath === 'string' && dataPath) {
  2226. if (dataPath.indexOf('#s#') === 0) {
  2227. vFor = dataPath.substr(3);
  2228. } else {
  2229. vFor = vm.__get_value(dataPath, context);
  2230. }
  2231. }
  2232. if (Number.isInteger(vFor)) {
  2233. context = value;
  2234. } else if (!propPath) {
  2235. context = vFor[value];
  2236. } else {
  2237. if (Array.isArray(vFor)) {
  2238. context = vFor.find(function (vForItem) {
  2239. return vm.__get_value(propPath, vForItem) === value;
  2240. });
  2241. } else if (isPlainObject(vFor)) {
  2242. context = Object.keys(vFor).find(function (vForKey) {
  2243. return vm.__get_value(propPath, vFor[vForKey]) === value;
  2244. });
  2245. } else {
  2246. console.error('v-for 暂不支持循环数据:', vFor);
  2247. }
  2248. }
  2249. if (valuePath) {
  2250. context = vm.__get_value(valuePath, context);
  2251. }
  2252. }
  2253. });
  2254. return context;
  2255. }
  2256. function processEventExtra(vm, extra, event, __args__) {
  2257. var extraObj = {};
  2258. if (Array.isArray(extra) && extra.length) {
  2259. /**
  2260. *[
  2261. * ['data.items', 'data.id', item.data.id],
  2262. * ['metas', 'id', meta.id]
  2263. *],
  2264. *[
  2265. * ['data.items', 'data.id', item.data.id],
  2266. * ['metas', 'id', meta.id]
  2267. *],
  2268. *'test'
  2269. */
  2270. extra.forEach(function (dataPath, index) {
  2271. if (typeof dataPath === 'string') {
  2272. if (!dataPath) {
  2273. // model,prop.sync
  2274. extraObj['$' + index] = vm;
  2275. } else {
  2276. if (dataPath === '$event') {
  2277. // $event
  2278. extraObj['$' + index] = event;
  2279. } else if (dataPath === 'arguments') {
  2280. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  2281. } else if (dataPath.indexOf('$event.') === 0) {
  2282. // $event.target.value
  2283. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  2284. } else {
  2285. extraObj['$' + index] = vm.__get_value(dataPath);
  2286. }
  2287. }
  2288. } else {
  2289. extraObj['$' + index] = getExtraValue(vm, dataPath);
  2290. }
  2291. });
  2292. }
  2293. return extraObj;
  2294. }
  2295. function getObjByArray(arr) {
  2296. var obj = {};
  2297. for (var i = 1; i < arr.length; i++) {
  2298. var element = arr[i];
  2299. obj[element[0]] = element[1];
  2300. }
  2301. return obj;
  2302. }
  2303. function processEventArgs(vm, event) {
  2304. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  2305. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  2306. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  2307. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  2308. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  2309. // fixed 用户直接触发 mpInstance.triggerEvent
  2310. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  2311. if (isCustom) {
  2312. // 自定义事件
  2313. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  2314. if (!args.length) {
  2315. // 无参数,直接传入 event 或 detail 数组
  2316. if (isCustomMPEvent) {
  2317. return [event];
  2318. }
  2319. return __args__;
  2320. }
  2321. }
  2322. var extraObj = processEventExtra(vm, extra, event, __args__);
  2323. var ret = [];
  2324. args.forEach(function (arg) {
  2325. if (arg === '$event') {
  2326. if (methodName === '__set_model' && !isCustom) {
  2327. // input v-model value
  2328. ret.push(event.target.value);
  2329. } else {
  2330. if (isCustom && !isCustomMPEvent) {
  2331. ret.push(__args__[0]);
  2332. } else {
  2333. // wxcomponent 组件或内置组件
  2334. ret.push(event);
  2335. }
  2336. }
  2337. } else {
  2338. if (Array.isArray(arg) && arg[0] === 'o') {
  2339. ret.push(getObjByArray(arg));
  2340. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  2341. ret.push(extraObj[arg]);
  2342. } else {
  2343. ret.push(arg);
  2344. }
  2345. }
  2346. });
  2347. return ret;
  2348. }
  2349. var ONCE = '~';
  2350. var CUSTOM = '^';
  2351. function isMatchEventType(eventType, optType) {
  2352. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  2353. }
  2354. function getContextVm(vm) {
  2355. var $parent = vm.$parent;
  2356. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  2357. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  2358. $parent = $parent.$parent;
  2359. }
  2360. return $parent && $parent.$parent;
  2361. }
  2362. function handleEvent(event) {
  2363. var _this2 = this;
  2364. event = wrapper$1(event);
  2365. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  2366. var dataset = (event.currentTarget || event.target).dataset;
  2367. if (!dataset) {
  2368. return console.warn('事件信息不存在');
  2369. }
  2370. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  2371. if (!eventOpts) {
  2372. return console.warn('事件信息不存在');
  2373. }
  2374. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  2375. var eventType = event.type;
  2376. var ret = [];
  2377. eventOpts.forEach(function (eventOpt) {
  2378. var type = eventOpt[0];
  2379. var eventsArray = eventOpt[1];
  2380. var isCustom = type.charAt(0) === CUSTOM;
  2381. type = isCustom ? type.slice(1) : type;
  2382. var isOnce = type.charAt(0) === ONCE;
  2383. type = isOnce ? type.slice(1) : type;
  2384. if (eventsArray && isMatchEventType(eventType, type)) {
  2385. eventsArray.forEach(function (eventArray) {
  2386. var methodName = eventArray[0];
  2387. if (methodName) {
  2388. var handlerCtx = _this2.$vm;
  2389. if (handlerCtx.$options.generic) {
  2390. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  2391. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  2392. }
  2393. if (methodName === '$emit') {
  2394. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  2395. return;
  2396. }
  2397. var handler = handlerCtx[methodName];
  2398. if (!isFn(handler)) {
  2399. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  2400. var path = _this2.route || _this2.is;
  2401. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  2402. }
  2403. if (isOnce) {
  2404. if (handler.once) {
  2405. return;
  2406. }
  2407. handler.once = true;
  2408. }
  2409. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  2410. params = Array.isArray(params) ? params : [];
  2411. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  2412. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  2413. // eslint-disable-next-line no-sparse-arrays
  2414. params = params.concat([,,,,,,,,,, event]);
  2415. }
  2416. ret.push(handler.apply(handlerCtx, params));
  2417. }
  2418. });
  2419. }
  2420. });
  2421. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  2422. return ret[0];
  2423. }
  2424. }
  2425. var eventChannels = {};
  2426. var eventChannelStack = [];
  2427. function getEventChannel(id) {
  2428. if (id) {
  2429. var eventChannel = eventChannels[id];
  2430. delete eventChannels[id];
  2431. return eventChannel;
  2432. }
  2433. return eventChannelStack.shift();
  2434. }
  2435. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  2436. function initEventChannel() {
  2437. _vue.default.prototype.getOpenerEventChannel = function () {
  2438. // 微信小程序使用自身getOpenerEventChannel
  2439. {
  2440. return this.$scope.getOpenerEventChannel();
  2441. }
  2442. };
  2443. var callHook = _vue.default.prototype.__call_hook;
  2444. _vue.default.prototype.__call_hook = function (hook, args) {
  2445. if (hook === 'onLoad' && args && args.__id__) {
  2446. this.__eventChannel__ = getEventChannel(args.__id__);
  2447. delete args.__id__;
  2448. }
  2449. return callHook.call(this, hook, args);
  2450. };
  2451. }
  2452. function initScopedSlotsParams() {
  2453. var center = {};
  2454. var parents = {};
  2455. function currentId(fn) {
  2456. var vueIds = this.$options.propsData.vueId;
  2457. if (vueIds) {
  2458. var vueId = vueIds.split(',')[0];
  2459. fn(vueId);
  2460. }
  2461. }
  2462. _vue.default.prototype.$hasSSP = function (vueId) {
  2463. var slot = center[vueId];
  2464. if (!slot) {
  2465. parents[vueId] = this;
  2466. this.$on('hook:destroyed', function () {
  2467. delete parents[vueId];
  2468. });
  2469. }
  2470. return slot;
  2471. };
  2472. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  2473. var slot = center[vueId];
  2474. if (slot) {
  2475. var params = slot[name] || [];
  2476. if (needAll) {
  2477. return params;
  2478. }
  2479. return params[0];
  2480. }
  2481. };
  2482. _vue.default.prototype.$setSSP = function (name, value) {
  2483. var index = 0;
  2484. currentId.call(this, function (vueId) {
  2485. var slot = center[vueId];
  2486. var params = slot[name] = slot[name] || [];
  2487. params.push(value);
  2488. index = params.length - 1;
  2489. });
  2490. return index;
  2491. };
  2492. _vue.default.prototype.$initSSP = function () {
  2493. currentId.call(this, function (vueId) {
  2494. center[vueId] = {};
  2495. });
  2496. };
  2497. _vue.default.prototype.$callSSP = function () {
  2498. currentId.call(this, function (vueId) {
  2499. if (parents[vueId]) {
  2500. parents[vueId].$forceUpdate();
  2501. }
  2502. });
  2503. };
  2504. _vue.default.mixin({
  2505. destroyed: function destroyed() {
  2506. var propsData = this.$options.propsData;
  2507. var vueId = propsData && propsData.vueId;
  2508. if (vueId) {
  2509. delete center[vueId];
  2510. delete parents[vueId];
  2511. }
  2512. }
  2513. });
  2514. }
  2515. function parseBaseApp(vm, _ref4) {
  2516. var mocks = _ref4.mocks,
  2517. initRefs = _ref4.initRefs;
  2518. initEventChannel();
  2519. {
  2520. initScopedSlotsParams();
  2521. }
  2522. if (vm.$options.store) {
  2523. _vue.default.prototype.$store = vm.$options.store;
  2524. }
  2525. uniIdMixin(_vue.default);
  2526. _vue.default.prototype.mpHost = "mp-weixin";
  2527. _vue.default.mixin({
  2528. beforeCreate: function beforeCreate() {
  2529. if (!this.$options.mpType) {
  2530. return;
  2531. }
  2532. this.mpType = this.$options.mpType;
  2533. this.$mp = (0, _defineProperty2.default)({
  2534. data: {}
  2535. }, this.mpType, this.$options.mpInstance);
  2536. this.$scope = this.$options.mpInstance;
  2537. delete this.$options.mpType;
  2538. delete this.$options.mpInstance;
  2539. if (this.mpType === 'page' && typeof getApp === 'function') {
  2540. // hack vue-i18n
  2541. var app = getApp();
  2542. if (app.$vm && app.$vm.$i18n) {
  2543. this._i18n = app.$vm.$i18n;
  2544. }
  2545. }
  2546. if (this.mpType !== 'app') {
  2547. initRefs(this);
  2548. initMocks(this, mocks);
  2549. }
  2550. }
  2551. });
  2552. var appOptions = {
  2553. onLaunch: function onLaunch(args) {
  2554. if (this.$vm) {
  2555. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  2556. return;
  2557. }
  2558. {
  2559. if (wx.canIUse && !wx.canIUse('nextTick')) {
  2560. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  2561. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  2562. }
  2563. }
  2564. this.$vm = vm;
  2565. this.$vm.$mp = {
  2566. app: this
  2567. };
  2568. this.$vm.$scope = this;
  2569. // vm 上也挂载 globalData
  2570. this.$vm.globalData = this.globalData;
  2571. this.$vm._isMounted = true;
  2572. this.$vm.__call_hook('mounted', args);
  2573. this.$vm.__call_hook('onLaunch', args);
  2574. }
  2575. };
  2576. // 兼容旧版本 globalData
  2577. appOptions.globalData = vm.$options.globalData || {};
  2578. // 将 methods 中的方法挂在 getApp() 中
  2579. var methods = vm.$options.methods;
  2580. if (methods) {
  2581. Object.keys(methods).forEach(function (name) {
  2582. appOptions[name] = methods[name];
  2583. });
  2584. }
  2585. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  2586. initHooks(appOptions, hooks);
  2587. initUnknownHooks(appOptions, vm.$options);
  2588. return appOptions;
  2589. }
  2590. function parseApp(vm) {
  2591. return parseBaseApp(vm, {
  2592. mocks: mocks,
  2593. initRefs: initRefs
  2594. });
  2595. }
  2596. function createApp(vm) {
  2597. App(parseApp(vm));
  2598. return vm;
  2599. }
  2600. var encodeReserveRE = /[!'()*]/g;
  2601. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  2602. return '%' + c.charCodeAt(0).toString(16);
  2603. };
  2604. var commaRE = /%2C/g;
  2605. // fixed encodeURIComponent which is more conformant to RFC3986:
  2606. // - escapes [!'()*]
  2607. // - preserve commas
  2608. var encode = function encode(str) {
  2609. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  2610. };
  2611. function stringifyQuery(obj) {
  2612. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  2613. var res = obj ? Object.keys(obj).map(function (key) {
  2614. var val = obj[key];
  2615. if (val === undefined) {
  2616. return '';
  2617. }
  2618. if (val === null) {
  2619. return encodeStr(key);
  2620. }
  2621. if (Array.isArray(val)) {
  2622. var result = [];
  2623. val.forEach(function (val2) {
  2624. if (val2 === undefined) {
  2625. return;
  2626. }
  2627. if (val2 === null) {
  2628. result.push(encodeStr(key));
  2629. } else {
  2630. result.push(encodeStr(key) + '=' + encodeStr(val2));
  2631. }
  2632. });
  2633. return result.join('&');
  2634. }
  2635. return encodeStr(key) + '=' + encodeStr(val);
  2636. }).filter(function (x) {
  2637. return x.length > 0;
  2638. }).join('&') : null;
  2639. return res ? "?".concat(res) : '';
  2640. }
  2641. function parseBaseComponent(vueComponentOptions) {
  2642. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  2643. isPage = _ref5.isPage,
  2644. initRelation = _ref5.initRelation;
  2645. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  2646. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  2647. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  2648. VueComponent = _initVueComponent2[0],
  2649. vueOptions = _initVueComponent2[1];
  2650. var options = _objectSpread({
  2651. multipleSlots: true,
  2652. // styleIsolation: 'apply-shared',
  2653. addGlobalClass: true
  2654. }, vueOptions.options || {});
  2655. {
  2656. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  2657. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  2658. Object.assign(options, vueOptions['mp-weixin'].options);
  2659. }
  2660. }
  2661. var componentOptions = {
  2662. options: options,
  2663. data: initData(vueOptions, _vue.default.prototype),
  2664. behaviors: initBehaviors(vueOptions, initBehavior),
  2665. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  2666. lifetimes: {
  2667. attached: function attached() {
  2668. var properties = this.properties;
  2669. var options = {
  2670. mpType: isPage.call(this) ? 'page' : 'component',
  2671. mpInstance: this,
  2672. propsData: properties
  2673. };
  2674. initVueIds(properties.vueId, this);
  2675. // 处理父子关系
  2676. initRelation.call(this, {
  2677. vuePid: this._$vuePid,
  2678. vueOptions: options
  2679. });
  2680. // 初始化 vue 实例
  2681. this.$vm = new VueComponent(options);
  2682. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  2683. initSlots(this.$vm, properties.vueSlots);
  2684. // 触发首次 setData
  2685. this.$vm.$mount();
  2686. },
  2687. ready: function ready() {
  2688. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  2689. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  2690. if (this.$vm) {
  2691. this.$vm._isMounted = true;
  2692. this.$vm.__call_hook('mounted');
  2693. this.$vm.__call_hook('onReady');
  2694. }
  2695. },
  2696. detached: function detached() {
  2697. this.$vm && this.$vm.$destroy();
  2698. }
  2699. },
  2700. pageLifetimes: {
  2701. show: function show(args) {
  2702. this.$vm && this.$vm.__call_hook('onPageShow', args);
  2703. },
  2704. hide: function hide() {
  2705. this.$vm && this.$vm.__call_hook('onPageHide');
  2706. },
  2707. resize: function resize(size) {
  2708. this.$vm && this.$vm.__call_hook('onPageResize', size);
  2709. }
  2710. },
  2711. methods: {
  2712. __l: handleLink,
  2713. __e: handleEvent
  2714. }
  2715. };
  2716. // externalClasses
  2717. if (vueOptions.externalClasses) {
  2718. componentOptions.externalClasses = vueOptions.externalClasses;
  2719. }
  2720. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2721. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2722. componentOptions.methods[callMethod] = function (args) {
  2723. return this.$vm[callMethod](args);
  2724. };
  2725. });
  2726. }
  2727. if (needVueOptions) {
  2728. return [componentOptions, vueOptions, VueComponent];
  2729. }
  2730. if (isPage) {
  2731. return componentOptions;
  2732. }
  2733. return [componentOptions, VueComponent];
  2734. }
  2735. function parseComponent(vueComponentOptions, needVueOptions) {
  2736. return parseBaseComponent(vueComponentOptions, {
  2737. isPage: isPage,
  2738. initRelation: initRelation
  2739. }, needVueOptions);
  2740. }
  2741. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  2742. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  2743. function parseBasePage(vuePageOptions) {
  2744. var _parseComponent = parseComponent(vuePageOptions, true),
  2745. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  2746. pageOptions = _parseComponent2[0],
  2747. vueOptions = _parseComponent2[1];
  2748. initHooks(pageOptions.methods, hooks$1, vueOptions);
  2749. pageOptions.methods.onLoad = function (query) {
  2750. this.options = query;
  2751. var copyQuery = Object.assign({}, query);
  2752. delete copyQuery.__id__;
  2753. this.$page = {
  2754. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  2755. };
  2756. this.$vm.$mp.query = query; // 兼容 mpvue
  2757. this.$vm.__call_hook('onLoad', query);
  2758. };
  2759. {
  2760. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  2761. }
  2762. {
  2763. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  2764. }
  2765. return pageOptions;
  2766. }
  2767. function parsePage(vuePageOptions) {
  2768. return parseBasePage(vuePageOptions);
  2769. }
  2770. function createPage(vuePageOptions) {
  2771. {
  2772. return Component(parsePage(vuePageOptions));
  2773. }
  2774. }
  2775. function createComponent(vueOptions) {
  2776. {
  2777. return Component(parseComponent(vueOptions));
  2778. }
  2779. }
  2780. function createSubpackageApp(vm) {
  2781. var appOptions = parseApp(vm);
  2782. var app = getApp({
  2783. allowDefault: true
  2784. });
  2785. vm.$scope = app;
  2786. var globalData = app.globalData;
  2787. if (globalData) {
  2788. Object.keys(appOptions.globalData).forEach(function (name) {
  2789. if (!hasOwn(globalData, name)) {
  2790. globalData[name] = appOptions.globalData[name];
  2791. }
  2792. });
  2793. }
  2794. Object.keys(appOptions).forEach(function (name) {
  2795. if (!hasOwn(app, name)) {
  2796. app[name] = appOptions[name];
  2797. }
  2798. });
  2799. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2800. wx.onAppShow(function () {
  2801. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2802. args[_key5] = arguments[_key5];
  2803. }
  2804. vm.__call_hook('onShow', args);
  2805. });
  2806. }
  2807. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2808. wx.onAppHide(function () {
  2809. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2810. args[_key6] = arguments[_key6];
  2811. }
  2812. vm.__call_hook('onHide', args);
  2813. });
  2814. }
  2815. if (isFn(appOptions.onLaunch)) {
  2816. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2817. vm.__call_hook('onLaunch', args);
  2818. }
  2819. return vm;
  2820. }
  2821. function createPlugin(vm) {
  2822. var appOptions = parseApp(vm);
  2823. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2824. wx.onAppShow(function () {
  2825. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2826. args[_key7] = arguments[_key7];
  2827. }
  2828. vm.__call_hook('onShow', args);
  2829. });
  2830. }
  2831. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2832. wx.onAppHide(function () {
  2833. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2834. args[_key8] = arguments[_key8];
  2835. }
  2836. vm.__call_hook('onHide', args);
  2837. });
  2838. }
  2839. if (isFn(appOptions.onLaunch)) {
  2840. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2841. vm.__call_hook('onLaunch', args);
  2842. }
  2843. return vm;
  2844. }
  2845. todos.forEach(function (todoApi) {
  2846. protocols[todoApi] = false;
  2847. });
  2848. canIUses.forEach(function (canIUseApi) {
  2849. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  2850. if (!wx.canIUse(apiName)) {
  2851. protocols[canIUseApi] = false;
  2852. }
  2853. });
  2854. var uni = {};
  2855. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2856. uni = new Proxy({}, {
  2857. get: function get(target, name) {
  2858. if (hasOwn(target, name)) {
  2859. return target[name];
  2860. }
  2861. if (baseApi[name]) {
  2862. return baseApi[name];
  2863. }
  2864. if (api[name]) {
  2865. return promisify(name, api[name]);
  2866. }
  2867. {
  2868. if (extraApi[name]) {
  2869. return promisify(name, extraApi[name]);
  2870. }
  2871. if (todoApis[name]) {
  2872. return promisify(name, todoApis[name]);
  2873. }
  2874. }
  2875. if (eventApi[name]) {
  2876. return eventApi[name];
  2877. }
  2878. return promisify(name, wrapper(name, wx[name]));
  2879. },
  2880. set: function set(target, name, value) {
  2881. target[name] = value;
  2882. return true;
  2883. }
  2884. });
  2885. } else {
  2886. Object.keys(baseApi).forEach(function (name) {
  2887. uni[name] = baseApi[name];
  2888. });
  2889. {
  2890. Object.keys(todoApis).forEach(function (name) {
  2891. uni[name] = promisify(name, todoApis[name]);
  2892. });
  2893. Object.keys(extraApi).forEach(function (name) {
  2894. uni[name] = promisify(name, todoApis[name]);
  2895. });
  2896. }
  2897. Object.keys(eventApi).forEach(function (name) {
  2898. uni[name] = eventApi[name];
  2899. });
  2900. Object.keys(api).forEach(function (name) {
  2901. uni[name] = promisify(name, api[name]);
  2902. });
  2903. Object.keys(wx).forEach(function (name) {
  2904. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2905. uni[name] = promisify(name, wrapper(name, wx[name]));
  2906. }
  2907. });
  2908. }
  2909. wx.createApp = createApp;
  2910. wx.createPage = createPage;
  2911. wx.createComponent = createComponent;
  2912. wx.createSubpackageApp = createSubpackageApp;
  2913. wx.createPlugin = createPlugin;
  2914. var uni$1 = uni;
  2915. var _default = uni$1;
  2916. exports.default = _default;
  2917. /* 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)))
  2918. /***/ }),
  2919. /***/ 20:
  2920. /*!****************************************************************!*\
  2921. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  2922. \****************************************************************/
  2923. /*! no static exports found */
  2924. /***/ (function(module, exports) {
  2925. function _iterableToArray(iter) {
  2926. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  2927. }
  2928. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2929. /***/ }),
  2930. /***/ 21:
  2931. /*!******************************************************************!*\
  2932. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  2933. \******************************************************************/
  2934. /*! no static exports found */
  2935. /***/ (function(module, exports) {
  2936. function _nonIterableSpread() {
  2937. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2938. }
  2939. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2940. /***/ }),
  2941. /***/ 22:
  2942. /*!*************************************************************!*\
  2943. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  2944. \*************************************************************/
  2945. /*! no static exports found */
  2946. /***/ (function(module, exports, __webpack_require__) {
  2947. "use strict";
  2948. /* WEBPACK VAR INJECTION */(function(uni, global) {
  2949. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2950. Object.defineProperty(exports, "__esModule", {
  2951. value: true
  2952. });
  2953. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  2954. exports.compileI18nJsonStr = compileI18nJsonStr;
  2955. exports.hasI18nJson = hasI18nJson;
  2956. exports.initVueI18n = initVueI18n;
  2957. exports.isI18nStr = isI18nStr;
  2958. exports.isString = void 0;
  2959. exports.normalizeLocale = normalizeLocale;
  2960. exports.parseI18nJson = parseI18nJson;
  2961. exports.resolveLocale = resolveLocale;
  2962. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  2963. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  2964. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  2965. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2966. var isObject = function isObject(val) {
  2967. return val !== null && (0, _typeof2.default)(val) === 'object';
  2968. };
  2969. var defaultDelimiters = ['{', '}'];
  2970. var BaseFormatter = /*#__PURE__*/function () {
  2971. function BaseFormatter() {
  2972. (0, _classCallCheck2.default)(this, BaseFormatter);
  2973. this._caches = Object.create(null);
  2974. }
  2975. (0, _createClass2.default)(BaseFormatter, [{
  2976. key: "interpolate",
  2977. value: function interpolate(message, values) {
  2978. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  2979. if (!values) {
  2980. return [message];
  2981. }
  2982. var tokens = this._caches[message];
  2983. if (!tokens) {
  2984. tokens = parse(message, delimiters);
  2985. this._caches[message] = tokens;
  2986. }
  2987. return compile(tokens, values);
  2988. }
  2989. }]);
  2990. return BaseFormatter;
  2991. }();
  2992. exports.Formatter = BaseFormatter;
  2993. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2994. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2995. function parse(format, _ref) {
  2996. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  2997. startDelimiter = _ref2[0],
  2998. endDelimiter = _ref2[1];
  2999. var tokens = [];
  3000. var position = 0;
  3001. var text = '';
  3002. while (position < format.length) {
  3003. var char = format[position++];
  3004. if (char === startDelimiter) {
  3005. if (text) {
  3006. tokens.push({
  3007. type: 'text',
  3008. value: text
  3009. });
  3010. }
  3011. text = '';
  3012. var sub = '';
  3013. char = format[position++];
  3014. while (char !== undefined && char !== endDelimiter) {
  3015. sub += char;
  3016. char = format[position++];
  3017. }
  3018. var isClosed = char === endDelimiter;
  3019. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  3020. tokens.push({
  3021. value: sub,
  3022. type: type
  3023. });
  3024. }
  3025. // else if (char === '%') {
  3026. // // when found rails i18n syntax, skip text capture
  3027. // if (format[position] !== '{') {
  3028. // text += char
  3029. // }
  3030. // }
  3031. else {
  3032. text += char;
  3033. }
  3034. }
  3035. text && tokens.push({
  3036. type: 'text',
  3037. value: text
  3038. });
  3039. return tokens;
  3040. }
  3041. function compile(tokens, values) {
  3042. var compiled = [];
  3043. var index = 0;
  3044. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  3045. if (mode === 'unknown') {
  3046. return compiled;
  3047. }
  3048. while (index < tokens.length) {
  3049. var token = tokens[index];
  3050. switch (token.type) {
  3051. case 'text':
  3052. compiled.push(token.value);
  3053. break;
  3054. case 'list':
  3055. compiled.push(values[parseInt(token.value, 10)]);
  3056. break;
  3057. case 'named':
  3058. if (mode === 'named') {
  3059. compiled.push(values[token.value]);
  3060. } else {
  3061. if (true) {
  3062. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  3063. }
  3064. }
  3065. break;
  3066. case 'unknown':
  3067. if (true) {
  3068. console.warn("Detect 'unknown' type of token!");
  3069. }
  3070. break;
  3071. }
  3072. index++;
  3073. }
  3074. return compiled;
  3075. }
  3076. var LOCALE_ZH_HANS = 'zh-Hans';
  3077. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  3078. var LOCALE_ZH_HANT = 'zh-Hant';
  3079. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  3080. var LOCALE_EN = 'en';
  3081. exports.LOCALE_EN = LOCALE_EN;
  3082. var LOCALE_FR = 'fr';
  3083. exports.LOCALE_FR = LOCALE_FR;
  3084. var LOCALE_ES = 'es';
  3085. exports.LOCALE_ES = LOCALE_ES;
  3086. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3087. var hasOwn = function hasOwn(val, key) {
  3088. return hasOwnProperty.call(val, key);
  3089. };
  3090. var defaultFormatter = new BaseFormatter();
  3091. function include(str, parts) {
  3092. return !!parts.find(function (part) {
  3093. return str.indexOf(part) !== -1;
  3094. });
  3095. }
  3096. function startsWith(str, parts) {
  3097. return parts.find(function (part) {
  3098. return str.indexOf(part) === 0;
  3099. });
  3100. }
  3101. function normalizeLocale(locale, messages) {
  3102. if (!locale) {
  3103. return;
  3104. }
  3105. locale = locale.trim().replace(/_/g, '-');
  3106. if (messages && messages[locale]) {
  3107. return locale;
  3108. }
  3109. locale = locale.toLowerCase();
  3110. if (locale === 'chinese') {
  3111. // 支付宝
  3112. return LOCALE_ZH_HANS;
  3113. }
  3114. if (locale.indexOf('zh') === 0) {
  3115. if (locale.indexOf('-hans') > -1) {
  3116. return LOCALE_ZH_HANS;
  3117. }
  3118. if (locale.indexOf('-hant') > -1) {
  3119. return LOCALE_ZH_HANT;
  3120. }
  3121. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  3122. return LOCALE_ZH_HANT;
  3123. }
  3124. return LOCALE_ZH_HANS;
  3125. }
  3126. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  3127. if (messages && Object.keys(messages).length > 0) {
  3128. locales = Object.keys(messages);
  3129. }
  3130. var lang = startsWith(locale, locales);
  3131. if (lang) {
  3132. return lang;
  3133. }
  3134. }
  3135. var I18n = /*#__PURE__*/function () {
  3136. function I18n(_ref3) {
  3137. var locale = _ref3.locale,
  3138. fallbackLocale = _ref3.fallbackLocale,
  3139. messages = _ref3.messages,
  3140. watcher = _ref3.watcher,
  3141. formater = _ref3.formater;
  3142. (0, _classCallCheck2.default)(this, I18n);
  3143. this.locale = LOCALE_EN;
  3144. this.fallbackLocale = LOCALE_EN;
  3145. this.message = {};
  3146. this.messages = {};
  3147. this.watchers = [];
  3148. if (fallbackLocale) {
  3149. this.fallbackLocale = fallbackLocale;
  3150. }
  3151. this.formater = formater || defaultFormatter;
  3152. this.messages = messages || {};
  3153. this.setLocale(locale || LOCALE_EN);
  3154. if (watcher) {
  3155. this.watchLocale(watcher);
  3156. }
  3157. }
  3158. (0, _createClass2.default)(I18n, [{
  3159. key: "setLocale",
  3160. value: function setLocale(locale) {
  3161. var _this = this;
  3162. var oldLocale = this.locale;
  3163. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  3164. if (!this.messages[this.locale]) {
  3165. // 可能初始化时不存在
  3166. this.messages[this.locale] = {};
  3167. }
  3168. this.message = this.messages[this.locale];
  3169. // 仅发生变化时,通知
  3170. if (oldLocale !== this.locale) {
  3171. this.watchers.forEach(function (watcher) {
  3172. watcher(_this.locale, oldLocale);
  3173. });
  3174. }
  3175. }
  3176. }, {
  3177. key: "getLocale",
  3178. value: function getLocale() {
  3179. return this.locale;
  3180. }
  3181. }, {
  3182. key: "watchLocale",
  3183. value: function watchLocale(fn) {
  3184. var _this2 = this;
  3185. var index = this.watchers.push(fn) - 1;
  3186. return function () {
  3187. _this2.watchers.splice(index, 1);
  3188. };
  3189. }
  3190. }, {
  3191. key: "add",
  3192. value: function add(locale, message) {
  3193. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  3194. var curMessages = this.messages[locale];
  3195. if (curMessages) {
  3196. if (override) {
  3197. Object.assign(curMessages, message);
  3198. } else {
  3199. Object.keys(message).forEach(function (key) {
  3200. if (!hasOwn(curMessages, key)) {
  3201. curMessages[key] = message[key];
  3202. }
  3203. });
  3204. }
  3205. } else {
  3206. this.messages[locale] = message;
  3207. }
  3208. }
  3209. }, {
  3210. key: "f",
  3211. value: function f(message, values, delimiters) {
  3212. return this.formater.interpolate(message, values, delimiters).join('');
  3213. }
  3214. }, {
  3215. key: "t",
  3216. value: function t(key, locale, values) {
  3217. var message = this.message;
  3218. if (typeof locale === 'string') {
  3219. locale = normalizeLocale(locale, this.messages);
  3220. locale && (message = this.messages[locale]);
  3221. } else {
  3222. values = locale;
  3223. }
  3224. if (!hasOwn(message, key)) {
  3225. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  3226. return key;
  3227. }
  3228. return this.formater.interpolate(message[key], values).join('');
  3229. }
  3230. }]);
  3231. return I18n;
  3232. }();
  3233. exports.I18n = I18n;
  3234. function watchAppLocale(appVm, i18n) {
  3235. // 需要保证 watch 的触发在组件渲染之前
  3236. if (appVm.$watchLocale) {
  3237. // vue2
  3238. appVm.$watchLocale(function (newLocale) {
  3239. i18n.setLocale(newLocale);
  3240. });
  3241. } else {
  3242. appVm.$watch(function () {
  3243. return appVm.$locale;
  3244. }, function (newLocale) {
  3245. i18n.setLocale(newLocale);
  3246. });
  3247. }
  3248. }
  3249. function getDefaultLocale() {
  3250. if (typeof uni !== 'undefined' && uni.getLocale) {
  3251. return uni.getLocale();
  3252. }
  3253. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  3254. if (typeof global !== 'undefined' && global.getLocale) {
  3255. return global.getLocale();
  3256. }
  3257. return LOCALE_EN;
  3258. }
  3259. function initVueI18n(locale) {
  3260. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3261. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  3262. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  3263. // 兼容旧版本入参
  3264. if (typeof locale !== 'string') {
  3265. var _ref4 = [messages, locale];
  3266. locale = _ref4[0];
  3267. messages = _ref4[1];
  3268. }
  3269. if (typeof locale !== 'string') {
  3270. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  3271. locale = getDefaultLocale();
  3272. }
  3273. if (typeof fallbackLocale !== 'string') {
  3274. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  3275. }
  3276. var i18n = new I18n({
  3277. locale: locale,
  3278. fallbackLocale: fallbackLocale,
  3279. messages: messages,
  3280. watcher: watcher
  3281. });
  3282. var _t = function t(key, values) {
  3283. if (typeof getApp !== 'function') {
  3284. // app view
  3285. /* eslint-disable no-func-assign */
  3286. _t = function t(key, values) {
  3287. return i18n.t(key, values);
  3288. };
  3289. } else {
  3290. var isWatchedAppLocale = false;
  3291. _t = function t(key, values) {
  3292. var appVm = getApp().$vm;
  3293. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  3294. // options: {
  3295. // type: Array,
  3296. // default () {
  3297. // return [{
  3298. // icon: 'shop',
  3299. // text: t("uni-goods-nav.options.shop"),
  3300. // }, {
  3301. // icon: 'cart',
  3302. // text: t("uni-goods-nav.options.cart")
  3303. // }]
  3304. // }
  3305. // },
  3306. if (appVm) {
  3307. // 触发响应式
  3308. appVm.$locale;
  3309. if (!isWatchedAppLocale) {
  3310. isWatchedAppLocale = true;
  3311. watchAppLocale(appVm, i18n);
  3312. }
  3313. }
  3314. return i18n.t(key, values);
  3315. };
  3316. }
  3317. return _t(key, values);
  3318. };
  3319. return {
  3320. i18n: i18n,
  3321. f: function f(message, values, delimiters) {
  3322. return i18n.f(message, values, delimiters);
  3323. },
  3324. t: function t(key, values) {
  3325. return _t(key, values);
  3326. },
  3327. add: function add(locale, message) {
  3328. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  3329. return i18n.add(locale, message, override);
  3330. },
  3331. watch: function watch(fn) {
  3332. return i18n.watchLocale(fn);
  3333. },
  3334. getLocale: function getLocale() {
  3335. return i18n.getLocale();
  3336. },
  3337. setLocale: function setLocale(newLocale) {
  3338. return i18n.setLocale(newLocale);
  3339. }
  3340. };
  3341. }
  3342. var isString = function isString(val) {
  3343. return typeof val === 'string';
  3344. };
  3345. exports.isString = isString;
  3346. var formater;
  3347. function hasI18nJson(jsonObj, delimiters) {
  3348. if (!formater) {
  3349. formater = new BaseFormatter();
  3350. }
  3351. return walkJsonObj(jsonObj, function (jsonObj, key) {
  3352. var value = jsonObj[key];
  3353. if (isString(value)) {
  3354. if (isI18nStr(value, delimiters)) {
  3355. return true;
  3356. }
  3357. } else {
  3358. return hasI18nJson(value, delimiters);
  3359. }
  3360. });
  3361. }
  3362. function parseI18nJson(jsonObj, values, delimiters) {
  3363. if (!formater) {
  3364. formater = new BaseFormatter();
  3365. }
  3366. walkJsonObj(jsonObj, function (jsonObj, key) {
  3367. var value = jsonObj[key];
  3368. if (isString(value)) {
  3369. if (isI18nStr(value, delimiters)) {
  3370. jsonObj[key] = compileStr(value, values, delimiters);
  3371. }
  3372. } else {
  3373. parseI18nJson(value, values, delimiters);
  3374. }
  3375. });
  3376. return jsonObj;
  3377. }
  3378. function compileI18nJsonStr(jsonStr, _ref5) {
  3379. var locale = _ref5.locale,
  3380. locales = _ref5.locales,
  3381. delimiters = _ref5.delimiters;
  3382. if (!isI18nStr(jsonStr, delimiters)) {
  3383. return jsonStr;
  3384. }
  3385. if (!formater) {
  3386. formater = new BaseFormatter();
  3387. }
  3388. var localeValues = [];
  3389. Object.keys(locales).forEach(function (name) {
  3390. if (name !== locale) {
  3391. localeValues.push({
  3392. locale: name,
  3393. values: locales[name]
  3394. });
  3395. }
  3396. });
  3397. localeValues.unshift({
  3398. locale: locale,
  3399. values: locales[locale]
  3400. });
  3401. try {
  3402. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  3403. } catch (e) {}
  3404. return jsonStr;
  3405. }
  3406. function isI18nStr(value, delimiters) {
  3407. return value.indexOf(delimiters[0]) > -1;
  3408. }
  3409. function compileStr(value, values, delimiters) {
  3410. return formater.interpolate(value, values, delimiters).join('');
  3411. }
  3412. function compileValue(jsonObj, key, localeValues, delimiters) {
  3413. var value = jsonObj[key];
  3414. if (isString(value)) {
  3415. // 存在国际化
  3416. if (isI18nStr(value, delimiters)) {
  3417. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  3418. if (localeValues.length > 1) {
  3419. // 格式化国际化语言
  3420. var valueLocales = jsonObj[key + 'Locales'] = {};
  3421. localeValues.forEach(function (localValue) {
  3422. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  3423. });
  3424. }
  3425. }
  3426. } else {
  3427. compileJsonObj(value, localeValues, delimiters);
  3428. }
  3429. }
  3430. function compileJsonObj(jsonObj, localeValues, delimiters) {
  3431. walkJsonObj(jsonObj, function (jsonObj, key) {
  3432. compileValue(jsonObj, key, localeValues, delimiters);
  3433. });
  3434. return jsonObj;
  3435. }
  3436. function walkJsonObj(jsonObj, walk) {
  3437. if (Array.isArray(jsonObj)) {
  3438. for (var i = 0; i < jsonObj.length; i++) {
  3439. if (walk(jsonObj, i)) {
  3440. return true;
  3441. }
  3442. }
  3443. } else if (isObject(jsonObj)) {
  3444. for (var key in jsonObj) {
  3445. if (walk(jsonObj, key)) {
  3446. return true;
  3447. }
  3448. }
  3449. }
  3450. return false;
  3451. }
  3452. function resolveLocale(locales) {
  3453. return function (locale) {
  3454. if (!locale) {
  3455. return locale;
  3456. }
  3457. locale = normalizeLocale(locale) || locale;
  3458. return resolveLocaleChain(locale).find(function (locale) {
  3459. return locales.indexOf(locale) > -1;
  3460. });
  3461. };
  3462. }
  3463. function resolveLocaleChain(locale) {
  3464. var chain = [];
  3465. var tokens = locale.split('-');
  3466. while (tokens.length) {
  3467. chain.push(tokens.join('-'));
  3468. tokens.pop();
  3469. }
  3470. return chain;
  3471. }
  3472. /* 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)))
  3473. /***/ }),
  3474. /***/ 23:
  3475. /*!***************************************************************!*\
  3476. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  3477. \***************************************************************/
  3478. /*! no static exports found */
  3479. /***/ (function(module, exports) {
  3480. function _classCallCheck(instance, Constructor) {
  3481. if (!(instance instanceof Constructor)) {
  3482. throw new TypeError("Cannot call a class as a function");
  3483. }
  3484. }
  3485. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3486. /***/ }),
  3487. /***/ 24:
  3488. /*!************************************************************!*\
  3489. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  3490. \************************************************************/
  3491. /*! no static exports found */
  3492. /***/ (function(module, exports, __webpack_require__) {
  3493. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  3494. function _defineProperties(target, props) {
  3495. for (var i = 0; i < props.length; i++) {
  3496. var descriptor = props[i];
  3497. descriptor.enumerable = descriptor.enumerable || false;
  3498. descriptor.configurable = true;
  3499. if ("value" in descriptor) descriptor.writable = true;
  3500. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  3501. }
  3502. }
  3503. function _createClass(Constructor, protoProps, staticProps) {
  3504. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  3505. if (staticProps) _defineProperties(Constructor, staticProps);
  3506. Object.defineProperty(Constructor, "prototype", {
  3507. writable: false
  3508. });
  3509. return Constructor;
  3510. }
  3511. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3512. /***/ }),
  3513. /***/ 242:
  3514. /*!*****************************************!*\
  3515. !*** E:/项目资料/智慧社区/Applet/api/report.js ***!
  3516. \*****************************************/
  3517. /*! no static exports found */
  3518. /***/ (function(module, exports, __webpack_require__) {
  3519. "use strict";
  3520. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  3521. Object.defineProperty(exports, "__esModule", {
  3522. value: true
  3523. });
  3524. exports.default = void 0;
  3525. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  3526. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  3527. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  3528. var getDict = /*#__PURE__*/function () {
  3529. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(dictType) {
  3530. var res;
  3531. return _regenerator.default.wrap(function _callee$(_context) {
  3532. while (1) {
  3533. switch (_context.prev = _context.next) {
  3534. case 0:
  3535. _context.next = 2;
  3536. return _request.default.get({
  3537. url: "/dict/data/type/".concat(dictType)
  3538. });
  3539. case 2:
  3540. res = _context.sent;
  3541. return _context.abrupt("return", res.data);
  3542. case 4:
  3543. case "end":
  3544. return _context.stop();
  3545. }
  3546. }
  3547. }, _callee);
  3548. }));
  3549. return function getDict(_x) {
  3550. return _ref.apply(this, arguments);
  3551. };
  3552. }();
  3553. var submitgb = /*#__PURE__*/function () {
  3554. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(data) {
  3555. var res;
  3556. return _regenerator.default.wrap(function _callee2$(_context2) {
  3557. while (1) {
  3558. switch (_context2.prev = _context2.next) {
  3559. case 0:
  3560. _context2.next = 2;
  3561. return _request.default.post({
  3562. url: "/dangjian/xiachenganbu",
  3563. data: data
  3564. });
  3565. case 2:
  3566. res = _context2.sent;
  3567. return _context2.abrupt("return", res.data);
  3568. case 4:
  3569. case "end":
  3570. return _context2.stop();
  3571. }
  3572. }
  3573. }, _callee2);
  3574. }));
  3575. return function submitgb(_x2) {
  3576. return _ref2.apply(this, arguments);
  3577. };
  3578. }();
  3579. var updategb = /*#__PURE__*/function () {
  3580. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(data) {
  3581. var res;
  3582. return _regenerator.default.wrap(function _callee3$(_context3) {
  3583. while (1) {
  3584. switch (_context3.prev = _context3.next) {
  3585. case 0:
  3586. _context3.next = 2;
  3587. return _request.default.post({
  3588. url: "/dangjian/xiachenganbu-update",
  3589. data: data
  3590. });
  3591. case 2:
  3592. res = _context3.sent;
  3593. return _context3.abrupt("return", res.data);
  3594. case 4:
  3595. case "end":
  3596. return _context3.stop();
  3597. }
  3598. }
  3599. }, _callee3);
  3600. }));
  3601. return function updategb(_x3) {
  3602. return _ref3.apply(this, arguments);
  3603. };
  3604. }();
  3605. var submitdy = /*#__PURE__*/function () {
  3606. var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(data) {
  3607. var res;
  3608. return _regenerator.default.wrap(function _callee4$(_context4) {
  3609. while (1) {
  3610. switch (_context4.prev = _context4.next) {
  3611. case 0:
  3612. _context4.next = 2;
  3613. return _request.default.post({
  3614. url: "/dangjian/dangyuan",
  3615. data: data
  3616. });
  3617. case 2:
  3618. res = _context4.sent;
  3619. return _context4.abrupt("return", res.data);
  3620. case 4:
  3621. case "end":
  3622. return _context4.stop();
  3623. }
  3624. }
  3625. }, _callee4);
  3626. }));
  3627. return function submitdy(_x4) {
  3628. return _ref4.apply(this, arguments);
  3629. };
  3630. }();
  3631. var updatedy = /*#__PURE__*/function () {
  3632. var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(data) {
  3633. var res;
  3634. return _regenerator.default.wrap(function _callee5$(_context5) {
  3635. while (1) {
  3636. switch (_context5.prev = _context5.next) {
  3637. case 0:
  3638. _context5.next = 2;
  3639. return _request.default.post({
  3640. url: "/dangjian/dangyuan-update",
  3641. data: data
  3642. });
  3643. case 2:
  3644. res = _context5.sent;
  3645. return _context5.abrupt("return", res.data);
  3646. case 4:
  3647. case "end":
  3648. return _context5.stop();
  3649. }
  3650. }
  3651. }, _callee5);
  3652. }));
  3653. return function updatedy(_x5) {
  3654. return _ref5.apply(this, arguments);
  3655. };
  3656. }();
  3657. var getGbStatus = /*#__PURE__*/function () {
  3658. var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
  3659. var res;
  3660. return _regenerator.default.wrap(function _callee6$(_context6) {
  3661. while (1) {
  3662. switch (_context6.prev = _context6.next) {
  3663. case 0:
  3664. _context6.next = 2;
  3665. return _request.default.get({
  3666. url: "/dangjian/xiachenganbu-status"
  3667. });
  3668. case 2:
  3669. res = _context6.sent;
  3670. return _context6.abrupt("return", res.data);
  3671. case 4:
  3672. case "end":
  3673. return _context6.stop();
  3674. }
  3675. }
  3676. }, _callee6);
  3677. }));
  3678. return function getGbStatus() {
  3679. return _ref6.apply(this, arguments);
  3680. };
  3681. }();
  3682. var getDyStatus = /*#__PURE__*/function () {
  3683. var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  3684. var res;
  3685. return _regenerator.default.wrap(function _callee7$(_context7) {
  3686. while (1) {
  3687. switch (_context7.prev = _context7.next) {
  3688. case 0:
  3689. _context7.next = 2;
  3690. return _request.default.get({
  3691. url: "/dangjian/dangyuan-status"
  3692. });
  3693. case 2:
  3694. res = _context7.sent;
  3695. return _context7.abrupt("return", res.data);
  3696. case 4:
  3697. case "end":
  3698. return _context7.stop();
  3699. }
  3700. }
  3701. }, _callee7);
  3702. }));
  3703. return function getDyStatus() {
  3704. return _ref7.apply(this, arguments);
  3705. };
  3706. }();
  3707. var getCommunity = /*#__PURE__*/function () {
  3708. var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  3709. var res;
  3710. return _regenerator.default.wrap(function _callee8$(_context8) {
  3711. while (1) {
  3712. switch (_context8.prev = _context8.next) {
  3713. case 0:
  3714. _context8.next = 2;
  3715. return _request.default.get({
  3716. url: "/wx/addr/community"
  3717. });
  3718. case 2:
  3719. res = _context8.sent;
  3720. return _context8.abrupt("return", res.data);
  3721. case 4:
  3722. case "end":
  3723. return _context8.stop();
  3724. }
  3725. }
  3726. }, _callee8);
  3727. }));
  3728. return function getCommunity() {
  3729. return _ref8.apply(this, arguments);
  3730. };
  3731. }();
  3732. // 签到
  3733. // 查询是否是党员
  3734. var getisdy = /*#__PURE__*/function () {
  3735. var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  3736. var res;
  3737. return _regenerator.default.wrap(function _callee9$(_context9) {
  3738. while (1) {
  3739. switch (_context9.prev = _context9.next) {
  3740. case 0:
  3741. _context9.next = 2;
  3742. return _request.default.get({
  3743. url: "/dangjian/is-dangyuan"
  3744. });
  3745. case 2:
  3746. res = _context9.sent;
  3747. return _context9.abrupt("return", res.data);
  3748. case 4:
  3749. case "end":
  3750. return _context9.stop();
  3751. }
  3752. }
  3753. }, _callee9);
  3754. }));
  3755. return function getisdy() {
  3756. return _ref9.apply(this, arguments);
  3757. };
  3758. }();
  3759. // 查询是否签到
  3760. var getqdstatus = /*#__PURE__*/function () {
  3761. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
  3762. var res;
  3763. return _regenerator.default.wrap(function _callee10$(_context10) {
  3764. while (1) {
  3765. switch (_context10.prev = _context10.next) {
  3766. case 0:
  3767. _context10.next = 2;
  3768. return _request.default.get({
  3769. url: "/dangjian/clockin-status"
  3770. });
  3771. case 2:
  3772. res = _context10.sent;
  3773. return _context10.abrupt("return", res.data);
  3774. case 4:
  3775. case "end":
  3776. return _context10.stop();
  3777. }
  3778. }
  3779. }, _callee10);
  3780. }));
  3781. return function getqdstatus() {
  3782. return _ref10.apply(this, arguments);
  3783. };
  3784. }();
  3785. // 签到
  3786. var clockin = /*#__PURE__*/function () {
  3787. var _ref11 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(data) {
  3788. var res;
  3789. return _regenerator.default.wrap(function _callee11$(_context11) {
  3790. while (1) {
  3791. switch (_context11.prev = _context11.next) {
  3792. case 0:
  3793. _context11.next = 2;
  3794. return _request.default.post({
  3795. url: "/dangjian/clockin",
  3796. data: data
  3797. });
  3798. case 2:
  3799. res = _context11.sent;
  3800. return _context11.abrupt("return", res.data);
  3801. case 4:
  3802. case "end":
  3803. return _context11.stop();
  3804. }
  3805. }
  3806. }, _callee11);
  3807. }));
  3808. return function clockin(_x6) {
  3809. return _ref11.apply(this, arguments);
  3810. };
  3811. }();
  3812. var _default = {
  3813. getDict: getDict,
  3814. submitgb: submitgb,
  3815. submitdy: submitdy,
  3816. getDyStatus: getDyStatus,
  3817. getGbStatus: getGbStatus,
  3818. getCommunity: getCommunity,
  3819. updatedy: updatedy,
  3820. updategb: updategb,
  3821. getisdy: getisdy,
  3822. getqdstatus: getqdstatus,
  3823. clockin: clockin
  3824. };
  3825. exports.default = _default;
  3826. /***/ }),
  3827. /***/ 25:
  3828. /*!******************************************************************************************!*\
  3829. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  3830. \******************************************************************************************/
  3831. /*! exports provided: default */
  3832. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3833. "use strict";
  3834. __webpack_require__.r(__webpack_exports__);
  3835. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3836. * Vue.js v2.6.11
  3837. * (c) 2014-2023 Evan You
  3838. * Released under the MIT License.
  3839. */
  3840. /* */
  3841. var emptyObject = Object.freeze({});
  3842. // These helpers produce better VM code in JS engines due to their
  3843. // explicitness and function inlining.
  3844. function isUndef (v) {
  3845. return v === undefined || v === null
  3846. }
  3847. function isDef (v) {
  3848. return v !== undefined && v !== null
  3849. }
  3850. function isTrue (v) {
  3851. return v === true
  3852. }
  3853. function isFalse (v) {
  3854. return v === false
  3855. }
  3856. /**
  3857. * Check if value is primitive.
  3858. */
  3859. function isPrimitive (value) {
  3860. return (
  3861. typeof value === 'string' ||
  3862. typeof value === 'number' ||
  3863. // $flow-disable-line
  3864. typeof value === 'symbol' ||
  3865. typeof value === 'boolean'
  3866. )
  3867. }
  3868. /**
  3869. * Quick object check - this is primarily used to tell
  3870. * Objects from primitive values when we know the value
  3871. * is a JSON-compliant type.
  3872. */
  3873. function isObject (obj) {
  3874. return obj !== null && typeof obj === 'object'
  3875. }
  3876. /**
  3877. * Get the raw type string of a value, e.g., [object Object].
  3878. */
  3879. var _toString = Object.prototype.toString;
  3880. function toRawType (value) {
  3881. return _toString.call(value).slice(8, -1)
  3882. }
  3883. /**
  3884. * Strict object type check. Only returns true
  3885. * for plain JavaScript objects.
  3886. */
  3887. function isPlainObject (obj) {
  3888. return _toString.call(obj) === '[object Object]'
  3889. }
  3890. function isRegExp (v) {
  3891. return _toString.call(v) === '[object RegExp]'
  3892. }
  3893. /**
  3894. * Check if val is a valid array index.
  3895. */
  3896. function isValidArrayIndex (val) {
  3897. var n = parseFloat(String(val));
  3898. return n >= 0 && Math.floor(n) === n && isFinite(val)
  3899. }
  3900. function isPromise (val) {
  3901. return (
  3902. isDef(val) &&
  3903. typeof val.then === 'function' &&
  3904. typeof val.catch === 'function'
  3905. )
  3906. }
  3907. /**
  3908. * Convert a value to a string that is actually rendered.
  3909. */
  3910. function toString (val) {
  3911. return val == null
  3912. ? ''
  3913. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  3914. ? JSON.stringify(val, null, 2)
  3915. : String(val)
  3916. }
  3917. /**
  3918. * Convert an input value to a number for persistence.
  3919. * If the conversion fails, return original string.
  3920. */
  3921. function toNumber (val) {
  3922. var n = parseFloat(val);
  3923. return isNaN(n) ? val : n
  3924. }
  3925. /**
  3926. * Make a map and return a function for checking if a key
  3927. * is in that map.
  3928. */
  3929. function makeMap (
  3930. str,
  3931. expectsLowerCase
  3932. ) {
  3933. var map = Object.create(null);
  3934. var list = str.split(',');
  3935. for (var i = 0; i < list.length; i++) {
  3936. map[list[i]] = true;
  3937. }
  3938. return expectsLowerCase
  3939. ? function (val) { return map[val.toLowerCase()]; }
  3940. : function (val) { return map[val]; }
  3941. }
  3942. /**
  3943. * Check if a tag is a built-in tag.
  3944. */
  3945. var isBuiltInTag = makeMap('slot,component', true);
  3946. /**
  3947. * Check if an attribute is a reserved attribute.
  3948. */
  3949. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  3950. /**
  3951. * Remove an item from an array.
  3952. */
  3953. function remove (arr, item) {
  3954. if (arr.length) {
  3955. var index = arr.indexOf(item);
  3956. if (index > -1) {
  3957. return arr.splice(index, 1)
  3958. }
  3959. }
  3960. }
  3961. /**
  3962. * Check whether an object has the property.
  3963. */
  3964. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3965. function hasOwn (obj, key) {
  3966. return hasOwnProperty.call(obj, key)
  3967. }
  3968. /**
  3969. * Create a cached version of a pure function.
  3970. */
  3971. function cached (fn) {
  3972. var cache = Object.create(null);
  3973. return (function cachedFn (str) {
  3974. var hit = cache[str];
  3975. return hit || (cache[str] = fn(str))
  3976. })
  3977. }
  3978. /**
  3979. * Camelize a hyphen-delimited string.
  3980. */
  3981. var camelizeRE = /-(\w)/g;
  3982. var camelize = cached(function (str) {
  3983. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  3984. });
  3985. /**
  3986. * Capitalize a string.
  3987. */
  3988. var capitalize = cached(function (str) {
  3989. return str.charAt(0).toUpperCase() + str.slice(1)
  3990. });
  3991. /**
  3992. * Hyphenate a camelCase string.
  3993. */
  3994. var hyphenateRE = /\B([A-Z])/g;
  3995. var hyphenate = cached(function (str) {
  3996. return str.replace(hyphenateRE, '-$1').toLowerCase()
  3997. });
  3998. /**
  3999. * Simple bind polyfill for environments that do not support it,
  4000. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  4001. * since native bind is now performant enough in most browsers.
  4002. * But removing it would mean breaking code that was able to run in
  4003. * PhantomJS 1.x, so this must be kept for backward compatibility.
  4004. */
  4005. /* istanbul ignore next */
  4006. function polyfillBind (fn, ctx) {
  4007. function boundFn (a) {
  4008. var l = arguments.length;
  4009. return l
  4010. ? l > 1
  4011. ? fn.apply(ctx, arguments)
  4012. : fn.call(ctx, a)
  4013. : fn.call(ctx)
  4014. }
  4015. boundFn._length = fn.length;
  4016. return boundFn
  4017. }
  4018. function nativeBind (fn, ctx) {
  4019. return fn.bind(ctx)
  4020. }
  4021. var bind = Function.prototype.bind
  4022. ? nativeBind
  4023. : polyfillBind;
  4024. /**
  4025. * Convert an Array-like object to a real Array.
  4026. */
  4027. function toArray (list, start) {
  4028. start = start || 0;
  4029. var i = list.length - start;
  4030. var ret = new Array(i);
  4031. while (i--) {
  4032. ret[i] = list[i + start];
  4033. }
  4034. return ret
  4035. }
  4036. /**
  4037. * Mix properties into target object.
  4038. */
  4039. function extend (to, _from) {
  4040. for (var key in _from) {
  4041. to[key] = _from[key];
  4042. }
  4043. return to
  4044. }
  4045. /**
  4046. * Merge an Array of Objects into a single Object.
  4047. */
  4048. function toObject (arr) {
  4049. var res = {};
  4050. for (var i = 0; i < arr.length; i++) {
  4051. if (arr[i]) {
  4052. extend(res, arr[i]);
  4053. }
  4054. }
  4055. return res
  4056. }
  4057. /* eslint-disable no-unused-vars */
  4058. /**
  4059. * Perform no operation.
  4060. * Stubbing args to make Flow happy without leaving useless transpiled code
  4061. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  4062. */
  4063. function noop (a, b, c) {}
  4064. /**
  4065. * Always return false.
  4066. */
  4067. var no = function (a, b, c) { return false; };
  4068. /* eslint-enable no-unused-vars */
  4069. /**
  4070. * Return the same value.
  4071. */
  4072. var identity = function (_) { return _; };
  4073. /**
  4074. * Check if two values are loosely equal - that is,
  4075. * if they are plain objects, do they have the same shape?
  4076. */
  4077. function looseEqual (a, b) {
  4078. if (a === b) { return true }
  4079. var isObjectA = isObject(a);
  4080. var isObjectB = isObject(b);
  4081. if (isObjectA && isObjectB) {
  4082. try {
  4083. var isArrayA = Array.isArray(a);
  4084. var isArrayB = Array.isArray(b);
  4085. if (isArrayA && isArrayB) {
  4086. return a.length === b.length && a.every(function (e, i) {
  4087. return looseEqual(e, b[i])
  4088. })
  4089. } else if (a instanceof Date && b instanceof Date) {
  4090. return a.getTime() === b.getTime()
  4091. } else if (!isArrayA && !isArrayB) {
  4092. var keysA = Object.keys(a);
  4093. var keysB = Object.keys(b);
  4094. return keysA.length === keysB.length && keysA.every(function (key) {
  4095. return looseEqual(a[key], b[key])
  4096. })
  4097. } else {
  4098. /* istanbul ignore next */
  4099. return false
  4100. }
  4101. } catch (e) {
  4102. /* istanbul ignore next */
  4103. return false
  4104. }
  4105. } else if (!isObjectA && !isObjectB) {
  4106. return String(a) === String(b)
  4107. } else {
  4108. return false
  4109. }
  4110. }
  4111. /**
  4112. * Return the first index at which a loosely equal value can be
  4113. * found in the array (if value is a plain object, the array must
  4114. * contain an object of the same shape), or -1 if it is not present.
  4115. */
  4116. function looseIndexOf (arr, val) {
  4117. for (var i = 0; i < arr.length; i++) {
  4118. if (looseEqual(arr[i], val)) { return i }
  4119. }
  4120. return -1
  4121. }
  4122. /**
  4123. * Ensure a function is called only once.
  4124. */
  4125. function once (fn) {
  4126. var called = false;
  4127. return function () {
  4128. if (!called) {
  4129. called = true;
  4130. fn.apply(this, arguments);
  4131. }
  4132. }
  4133. }
  4134. var ASSET_TYPES = [
  4135. 'component',
  4136. 'directive',
  4137. 'filter'
  4138. ];
  4139. var LIFECYCLE_HOOKS = [
  4140. 'beforeCreate',
  4141. 'created',
  4142. 'beforeMount',
  4143. 'mounted',
  4144. 'beforeUpdate',
  4145. 'updated',
  4146. 'beforeDestroy',
  4147. 'destroyed',
  4148. 'activated',
  4149. 'deactivated',
  4150. 'errorCaptured',
  4151. 'serverPrefetch'
  4152. ];
  4153. /* */
  4154. var config = ({
  4155. /**
  4156. * Option merge strategies (used in core/util/options)
  4157. */
  4158. // $flow-disable-line
  4159. optionMergeStrategies: Object.create(null),
  4160. /**
  4161. * Whether to suppress warnings.
  4162. */
  4163. silent: false,
  4164. /**
  4165. * Show production mode tip message on boot?
  4166. */
  4167. productionTip: "development" !== 'production',
  4168. /**
  4169. * Whether to enable devtools
  4170. */
  4171. devtools: "development" !== 'production',
  4172. /**
  4173. * Whether to record perf
  4174. */
  4175. performance: false,
  4176. /**
  4177. * Error handler for watcher errors
  4178. */
  4179. errorHandler: null,
  4180. /**
  4181. * Warn handler for watcher warns
  4182. */
  4183. warnHandler: null,
  4184. /**
  4185. * Ignore certain custom elements
  4186. */
  4187. ignoredElements: [],
  4188. /**
  4189. * Custom user key aliases for v-on
  4190. */
  4191. // $flow-disable-line
  4192. keyCodes: Object.create(null),
  4193. /**
  4194. * Check if a tag is reserved so that it cannot be registered as a
  4195. * component. This is platform-dependent and may be overwritten.
  4196. */
  4197. isReservedTag: no,
  4198. /**
  4199. * Check if an attribute is reserved so that it cannot be used as a component
  4200. * prop. This is platform-dependent and may be overwritten.
  4201. */
  4202. isReservedAttr: no,
  4203. /**
  4204. * Check if a tag is an unknown element.
  4205. * Platform-dependent.
  4206. */
  4207. isUnknownElement: no,
  4208. /**
  4209. * Get the namespace of an element
  4210. */
  4211. getTagNamespace: noop,
  4212. /**
  4213. * Parse the real tag name for the specific platform.
  4214. */
  4215. parsePlatformTagName: identity,
  4216. /**
  4217. * Check if an attribute must be bound using property, e.g. value
  4218. * Platform-dependent.
  4219. */
  4220. mustUseProp: no,
  4221. /**
  4222. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  4223. * This will significantly reduce performance if set to false.
  4224. */
  4225. async: true,
  4226. /**
  4227. * Exposed for legacy reasons
  4228. */
  4229. _lifecycleHooks: LIFECYCLE_HOOKS
  4230. });
  4231. /* */
  4232. /**
  4233. * unicode letters used for parsing html tags, component names and property paths.
  4234. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  4235. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  4236. */
  4237. 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/;
  4238. /**
  4239. * Check if a string starts with $ or _
  4240. */
  4241. function isReserved (str) {
  4242. var c = (str + '').charCodeAt(0);
  4243. return c === 0x24 || c === 0x5F
  4244. }
  4245. /**
  4246. * Define a property.
  4247. */
  4248. function def (obj, key, val, enumerable) {
  4249. Object.defineProperty(obj, key, {
  4250. value: val,
  4251. enumerable: !!enumerable,
  4252. writable: true,
  4253. configurable: true
  4254. });
  4255. }
  4256. /**
  4257. * Parse simple path.
  4258. */
  4259. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  4260. function parsePath (path) {
  4261. if (bailRE.test(path)) {
  4262. return
  4263. }
  4264. var segments = path.split('.');
  4265. return function (obj) {
  4266. for (var i = 0; i < segments.length; i++) {
  4267. if (!obj) { return }
  4268. obj = obj[segments[i]];
  4269. }
  4270. return obj
  4271. }
  4272. }
  4273. /* */
  4274. // can we use __proto__?
  4275. var hasProto = '__proto__' in {};
  4276. // Browser environment sniffing
  4277. var inBrowser = typeof window !== 'undefined';
  4278. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  4279. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  4280. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  4281. var isIE = UA && /msie|trident/.test(UA);
  4282. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  4283. var isEdge = UA && UA.indexOf('edge/') > 0;
  4284. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  4285. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  4286. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  4287. var isPhantomJS = UA && /phantomjs/.test(UA);
  4288. var isFF = UA && UA.match(/firefox\/(\d+)/);
  4289. // Firefox has a "watch" function on Object.prototype...
  4290. var nativeWatch = ({}).watch;
  4291. if (inBrowser) {
  4292. try {
  4293. var opts = {};
  4294. Object.defineProperty(opts, 'passive', ({
  4295. get: function get () {
  4296. }
  4297. })); // https://github.com/facebook/flow/issues/285
  4298. window.addEventListener('test-passive', null, opts);
  4299. } catch (e) {}
  4300. }
  4301. // this needs to be lazy-evaled because vue may be required before
  4302. // vue-server-renderer can set VUE_ENV
  4303. var _isServer;
  4304. var isServerRendering = function () {
  4305. if (_isServer === undefined) {
  4306. /* istanbul ignore if */
  4307. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  4308. // detect presence of vue-server-renderer and avoid
  4309. // Webpack shimming the process
  4310. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  4311. } else {
  4312. _isServer = false;
  4313. }
  4314. }
  4315. return _isServer
  4316. };
  4317. // detect devtools
  4318. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  4319. /* istanbul ignore next */
  4320. function isNative (Ctor) {
  4321. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  4322. }
  4323. var hasSymbol =
  4324. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  4325. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  4326. var _Set;
  4327. /* istanbul ignore if */ // $flow-disable-line
  4328. if (typeof Set !== 'undefined' && isNative(Set)) {
  4329. // use native Set when available.
  4330. _Set = Set;
  4331. } else {
  4332. // a non-standard Set polyfill that only works with primitive keys.
  4333. _Set = /*@__PURE__*/(function () {
  4334. function Set () {
  4335. this.set = Object.create(null);
  4336. }
  4337. Set.prototype.has = function has (key) {
  4338. return this.set[key] === true
  4339. };
  4340. Set.prototype.add = function add (key) {
  4341. this.set[key] = true;
  4342. };
  4343. Set.prototype.clear = function clear () {
  4344. this.set = Object.create(null);
  4345. };
  4346. return Set;
  4347. }());
  4348. }
  4349. /* */
  4350. var warn = noop;
  4351. var tip = noop;
  4352. var generateComponentTrace = (noop); // work around flow check
  4353. var formatComponentName = (noop);
  4354. if (true) {
  4355. var hasConsole = typeof console !== 'undefined';
  4356. var classifyRE = /(?:^|[-_])(\w)/g;
  4357. var classify = function (str) { return str
  4358. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  4359. .replace(/[-_]/g, ''); };
  4360. warn = function (msg, vm) {
  4361. var trace = vm ? generateComponentTrace(vm) : '';
  4362. if (config.warnHandler) {
  4363. config.warnHandler.call(null, msg, vm, trace);
  4364. } else if (hasConsole && (!config.silent)) {
  4365. console.error(("[Vue warn]: " + msg + trace));
  4366. }
  4367. };
  4368. tip = function (msg, vm) {
  4369. if (hasConsole && (!config.silent)) {
  4370. console.warn("[Vue tip]: " + msg + (
  4371. vm ? generateComponentTrace(vm) : ''
  4372. ));
  4373. }
  4374. };
  4375. formatComponentName = function (vm, includeFile) {
  4376. if (vm.$root === vm) {
  4377. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  4378. return ('') + vm.$options.__file
  4379. }
  4380. return '<Root>'
  4381. }
  4382. var options = typeof vm === 'function' && vm.cid != null
  4383. ? vm.options
  4384. : vm._isVue
  4385. ? vm.$options || vm.constructor.options
  4386. : vm;
  4387. var name = options.name || options._componentTag;
  4388. var file = options.__file;
  4389. if (!name && file) {
  4390. var match = file.match(/([^/\\]+)\.vue$/);
  4391. name = match && match[1];
  4392. }
  4393. return (
  4394. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  4395. (file && includeFile !== false ? (" at " + file) : '')
  4396. )
  4397. };
  4398. var repeat = function (str, n) {
  4399. var res = '';
  4400. while (n) {
  4401. if (n % 2 === 1) { res += str; }
  4402. if (n > 1) { str += str; }
  4403. n >>= 1;
  4404. }
  4405. return res
  4406. };
  4407. generateComponentTrace = function (vm) {
  4408. if (vm._isVue && vm.$parent) {
  4409. var tree = [];
  4410. var currentRecursiveSequence = 0;
  4411. while (vm && vm.$options.name !== 'PageBody') {
  4412. if (tree.length > 0) {
  4413. var last = tree[tree.length - 1];
  4414. if (last.constructor === vm.constructor) {
  4415. currentRecursiveSequence++;
  4416. vm = vm.$parent;
  4417. continue
  4418. } else if (currentRecursiveSequence > 0) {
  4419. tree[tree.length - 1] = [last, currentRecursiveSequence];
  4420. currentRecursiveSequence = 0;
  4421. }
  4422. }
  4423. !vm.$options.isReserved && tree.push(vm);
  4424. vm = vm.$parent;
  4425. }
  4426. return '\n\nfound in\n\n' + tree
  4427. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  4428. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  4429. : formatComponentName(vm))); })
  4430. .join('\n')
  4431. } else {
  4432. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  4433. }
  4434. };
  4435. }
  4436. /* */
  4437. var uid = 0;
  4438. /**
  4439. * A dep is an observable that can have multiple
  4440. * directives subscribing to it.
  4441. */
  4442. var Dep = function Dep () {
  4443. this.id = uid++;
  4444. this.subs = [];
  4445. };
  4446. Dep.prototype.addSub = function addSub (sub) {
  4447. this.subs.push(sub);
  4448. };
  4449. Dep.prototype.removeSub = function removeSub (sub) {
  4450. remove(this.subs, sub);
  4451. };
  4452. Dep.prototype.depend = function depend () {
  4453. if (Dep.SharedObject.target) {
  4454. Dep.SharedObject.target.addDep(this);
  4455. }
  4456. };
  4457. Dep.prototype.notify = function notify () {
  4458. // stabilize the subscriber list first
  4459. var subs = this.subs.slice();
  4460. if ( true && !config.async) {
  4461. // subs aren't sorted in scheduler if not running async
  4462. // we need to sort them now to make sure they fire in correct
  4463. // order
  4464. subs.sort(function (a, b) { return a.id - b.id; });
  4465. }
  4466. for (var i = 0, l = subs.length; i < l; i++) {
  4467. subs[i].update();
  4468. }
  4469. };
  4470. // The current target watcher being evaluated.
  4471. // This is globally unique because only one watcher
  4472. // can be evaluated at a time.
  4473. // fixed by xxxxxx (nvue shared vuex)
  4474. /* eslint-disable no-undef */
  4475. Dep.SharedObject = {};
  4476. Dep.SharedObject.target = null;
  4477. Dep.SharedObject.targetStack = [];
  4478. function pushTarget (target) {
  4479. Dep.SharedObject.targetStack.push(target);
  4480. Dep.SharedObject.target = target;
  4481. Dep.target = target;
  4482. }
  4483. function popTarget () {
  4484. Dep.SharedObject.targetStack.pop();
  4485. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  4486. Dep.target = Dep.SharedObject.target;
  4487. }
  4488. /* */
  4489. var VNode = function VNode (
  4490. tag,
  4491. data,
  4492. children,
  4493. text,
  4494. elm,
  4495. context,
  4496. componentOptions,
  4497. asyncFactory
  4498. ) {
  4499. this.tag = tag;
  4500. this.data = data;
  4501. this.children = children;
  4502. this.text = text;
  4503. this.elm = elm;
  4504. this.ns = undefined;
  4505. this.context = context;
  4506. this.fnContext = undefined;
  4507. this.fnOptions = undefined;
  4508. this.fnScopeId = undefined;
  4509. this.key = data && data.key;
  4510. this.componentOptions = componentOptions;
  4511. this.componentInstance = undefined;
  4512. this.parent = undefined;
  4513. this.raw = false;
  4514. this.isStatic = false;
  4515. this.isRootInsert = true;
  4516. this.isComment = false;
  4517. this.isCloned = false;
  4518. this.isOnce = false;
  4519. this.asyncFactory = asyncFactory;
  4520. this.asyncMeta = undefined;
  4521. this.isAsyncPlaceholder = false;
  4522. };
  4523. var prototypeAccessors = { child: { configurable: true } };
  4524. // DEPRECATED: alias for componentInstance for backwards compat.
  4525. /* istanbul ignore next */
  4526. prototypeAccessors.child.get = function () {
  4527. return this.componentInstance
  4528. };
  4529. Object.defineProperties( VNode.prototype, prototypeAccessors );
  4530. var createEmptyVNode = function (text) {
  4531. if ( text === void 0 ) text = '';
  4532. var node = new VNode();
  4533. node.text = text;
  4534. node.isComment = true;
  4535. return node
  4536. };
  4537. function createTextVNode (val) {
  4538. return new VNode(undefined, undefined, undefined, String(val))
  4539. }
  4540. // optimized shallow clone
  4541. // used for static nodes and slot nodes because they may be reused across
  4542. // multiple renders, cloning them avoids errors when DOM manipulations rely
  4543. // on their elm reference.
  4544. function cloneVNode (vnode) {
  4545. var cloned = new VNode(
  4546. vnode.tag,
  4547. vnode.data,
  4548. // #7975
  4549. // clone children array to avoid mutating original in case of cloning
  4550. // a child.
  4551. vnode.children && vnode.children.slice(),
  4552. vnode.text,
  4553. vnode.elm,
  4554. vnode.context,
  4555. vnode.componentOptions,
  4556. vnode.asyncFactory
  4557. );
  4558. cloned.ns = vnode.ns;
  4559. cloned.isStatic = vnode.isStatic;
  4560. cloned.key = vnode.key;
  4561. cloned.isComment = vnode.isComment;
  4562. cloned.fnContext = vnode.fnContext;
  4563. cloned.fnOptions = vnode.fnOptions;
  4564. cloned.fnScopeId = vnode.fnScopeId;
  4565. cloned.asyncMeta = vnode.asyncMeta;
  4566. cloned.isCloned = true;
  4567. return cloned
  4568. }
  4569. /*
  4570. * not type checking this file because flow doesn't play well with
  4571. * dynamically accessing methods on Array prototype
  4572. */
  4573. var arrayProto = Array.prototype;
  4574. var arrayMethods = Object.create(arrayProto);
  4575. var methodsToPatch = [
  4576. 'push',
  4577. 'pop',
  4578. 'shift',
  4579. 'unshift',
  4580. 'splice',
  4581. 'sort',
  4582. 'reverse'
  4583. ];
  4584. /**
  4585. * Intercept mutating methods and emit events
  4586. */
  4587. methodsToPatch.forEach(function (method) {
  4588. // cache original method
  4589. var original = arrayProto[method];
  4590. def(arrayMethods, method, function mutator () {
  4591. var args = [], len = arguments.length;
  4592. while ( len-- ) args[ len ] = arguments[ len ];
  4593. var result = original.apply(this, args);
  4594. var ob = this.__ob__;
  4595. var inserted;
  4596. switch (method) {
  4597. case 'push':
  4598. case 'unshift':
  4599. inserted = args;
  4600. break
  4601. case 'splice':
  4602. inserted = args.slice(2);
  4603. break
  4604. }
  4605. if (inserted) { ob.observeArray(inserted); }
  4606. // notify change
  4607. ob.dep.notify();
  4608. return result
  4609. });
  4610. });
  4611. /* */
  4612. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  4613. /**
  4614. * In some cases we may want to disable observation inside a component's
  4615. * update computation.
  4616. */
  4617. var shouldObserve = true;
  4618. function toggleObserving (value) {
  4619. shouldObserve = value;
  4620. }
  4621. /**
  4622. * Observer class that is attached to each observed
  4623. * object. Once attached, the observer converts the target
  4624. * object's property keys into getter/setters that
  4625. * collect dependencies and dispatch updates.
  4626. */
  4627. var Observer = function Observer (value) {
  4628. this.value = value;
  4629. this.dep = new Dep();
  4630. this.vmCount = 0;
  4631. def(value, '__ob__', this);
  4632. if (Array.isArray(value)) {
  4633. if (hasProto) {
  4634. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  4635. if(value.push !== value.__proto__.push){
  4636. copyAugment(value, arrayMethods, arrayKeys);
  4637. } else {
  4638. protoAugment(value, arrayMethods);
  4639. }
  4640. }
  4641. } else {
  4642. copyAugment(value, arrayMethods, arrayKeys);
  4643. }
  4644. this.observeArray(value);
  4645. } else {
  4646. this.walk(value);
  4647. }
  4648. };
  4649. /**
  4650. * Walk through all properties and convert them into
  4651. * getter/setters. This method should only be called when
  4652. * value type is Object.
  4653. */
  4654. Observer.prototype.walk = function walk (obj) {
  4655. var keys = Object.keys(obj);
  4656. for (var i = 0; i < keys.length; i++) {
  4657. defineReactive$$1(obj, keys[i]);
  4658. }
  4659. };
  4660. /**
  4661. * Observe a list of Array items.
  4662. */
  4663. Observer.prototype.observeArray = function observeArray (items) {
  4664. for (var i = 0, l = items.length; i < l; i++) {
  4665. observe(items[i]);
  4666. }
  4667. };
  4668. // helpers
  4669. /**
  4670. * Augment a target Object or Array by intercepting
  4671. * the prototype chain using __proto__
  4672. */
  4673. function protoAugment (target, src) {
  4674. /* eslint-disable no-proto */
  4675. target.__proto__ = src;
  4676. /* eslint-enable no-proto */
  4677. }
  4678. /**
  4679. * Augment a target Object or Array by defining
  4680. * hidden properties.
  4681. */
  4682. /* istanbul ignore next */
  4683. function copyAugment (target, src, keys) {
  4684. for (var i = 0, l = keys.length; i < l; i++) {
  4685. var key = keys[i];
  4686. def(target, key, src[key]);
  4687. }
  4688. }
  4689. /**
  4690. * Attempt to create an observer instance for a value,
  4691. * returns the new observer if successfully observed,
  4692. * or the existing observer if the value already has one.
  4693. */
  4694. function observe (value, asRootData) {
  4695. if (!isObject(value) || value instanceof VNode) {
  4696. return
  4697. }
  4698. var ob;
  4699. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  4700. ob = value.__ob__;
  4701. } else if (
  4702. shouldObserve &&
  4703. !isServerRendering() &&
  4704. (Array.isArray(value) || isPlainObject(value)) &&
  4705. Object.isExtensible(value) &&
  4706. !value._isVue &&
  4707. !value.__v_isMPComponent
  4708. ) {
  4709. ob = new Observer(value);
  4710. }
  4711. if (asRootData && ob) {
  4712. ob.vmCount++;
  4713. }
  4714. return ob
  4715. }
  4716. /**
  4717. * Define a reactive property on an Object.
  4718. */
  4719. function defineReactive$$1 (
  4720. obj,
  4721. key,
  4722. val,
  4723. customSetter,
  4724. shallow
  4725. ) {
  4726. var dep = new Dep();
  4727. var property = Object.getOwnPropertyDescriptor(obj, key);
  4728. if (property && property.configurable === false) {
  4729. return
  4730. }
  4731. // cater for pre-defined getter/setters
  4732. var getter = property && property.get;
  4733. var setter = property && property.set;
  4734. if ((!getter || setter) && arguments.length === 2) {
  4735. val = obj[key];
  4736. }
  4737. var childOb = !shallow && observe(val);
  4738. Object.defineProperty(obj, key, {
  4739. enumerable: true,
  4740. configurable: true,
  4741. get: function reactiveGetter () {
  4742. var value = getter ? getter.call(obj) : val;
  4743. if (Dep.SharedObject.target) { // fixed by xxxxxx
  4744. dep.depend();
  4745. if (childOb) {
  4746. childOb.dep.depend();
  4747. if (Array.isArray(value)) {
  4748. dependArray(value);
  4749. }
  4750. }
  4751. }
  4752. return value
  4753. },
  4754. set: function reactiveSetter (newVal) {
  4755. var value = getter ? getter.call(obj) : val;
  4756. /* eslint-disable no-self-compare */
  4757. if (newVal === value || (newVal !== newVal && value !== value)) {
  4758. return
  4759. }
  4760. /* eslint-enable no-self-compare */
  4761. if ( true && customSetter) {
  4762. customSetter();
  4763. }
  4764. // #7981: for accessor properties without setter
  4765. if (getter && !setter) { return }
  4766. if (setter) {
  4767. setter.call(obj, newVal);
  4768. } else {
  4769. val = newVal;
  4770. }
  4771. childOb = !shallow && observe(newVal);
  4772. dep.notify();
  4773. }
  4774. });
  4775. }
  4776. /**
  4777. * Set a property on an object. Adds the new property and
  4778. * triggers change notification if the property doesn't
  4779. * already exist.
  4780. */
  4781. function set (target, key, val) {
  4782. if ( true &&
  4783. (isUndef(target) || isPrimitive(target))
  4784. ) {
  4785. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  4786. }
  4787. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4788. target.length = Math.max(target.length, key);
  4789. target.splice(key, 1, val);
  4790. return val
  4791. }
  4792. if (key in target && !(key in Object.prototype)) {
  4793. target[key] = val;
  4794. return val
  4795. }
  4796. var ob = (target).__ob__;
  4797. if (target._isVue || (ob && ob.vmCount)) {
  4798. true && warn(
  4799. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  4800. 'at runtime - declare it upfront in the data option.'
  4801. );
  4802. return val
  4803. }
  4804. if (!ob) {
  4805. target[key] = val;
  4806. return val
  4807. }
  4808. defineReactive$$1(ob.value, key, val);
  4809. ob.dep.notify();
  4810. return val
  4811. }
  4812. /**
  4813. * Delete a property and trigger change if necessary.
  4814. */
  4815. function del (target, key) {
  4816. if ( true &&
  4817. (isUndef(target) || isPrimitive(target))
  4818. ) {
  4819. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  4820. }
  4821. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4822. target.splice(key, 1);
  4823. return
  4824. }
  4825. var ob = (target).__ob__;
  4826. if (target._isVue || (ob && ob.vmCount)) {
  4827. true && warn(
  4828. 'Avoid deleting properties on a Vue instance or its root $data ' +
  4829. '- just set it to null.'
  4830. );
  4831. return
  4832. }
  4833. if (!hasOwn(target, key)) {
  4834. return
  4835. }
  4836. delete target[key];
  4837. if (!ob) {
  4838. return
  4839. }
  4840. ob.dep.notify();
  4841. }
  4842. /**
  4843. * Collect dependencies on array elements when the array is touched, since
  4844. * we cannot intercept array element access like property getters.
  4845. */
  4846. function dependArray (value) {
  4847. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  4848. e = value[i];
  4849. e && e.__ob__ && e.__ob__.dep.depend();
  4850. if (Array.isArray(e)) {
  4851. dependArray(e);
  4852. }
  4853. }
  4854. }
  4855. /* */
  4856. /**
  4857. * Option overwriting strategies are functions that handle
  4858. * how to merge a parent option value and a child option
  4859. * value into the final value.
  4860. */
  4861. var strats = config.optionMergeStrategies;
  4862. /**
  4863. * Options with restrictions
  4864. */
  4865. if (true) {
  4866. strats.el = strats.propsData = function (parent, child, vm, key) {
  4867. if (!vm) {
  4868. warn(
  4869. "option \"" + key + "\" can only be used during instance " +
  4870. 'creation with the `new` keyword.'
  4871. );
  4872. }
  4873. return defaultStrat(parent, child)
  4874. };
  4875. }
  4876. /**
  4877. * Helper that recursively merges two data objects together.
  4878. */
  4879. function mergeData (to, from) {
  4880. if (!from) { return to }
  4881. var key, toVal, fromVal;
  4882. var keys = hasSymbol
  4883. ? Reflect.ownKeys(from)
  4884. : Object.keys(from);
  4885. for (var i = 0; i < keys.length; i++) {
  4886. key = keys[i];
  4887. // in case the object is already observed...
  4888. if (key === '__ob__') { continue }
  4889. toVal = to[key];
  4890. fromVal = from[key];
  4891. if (!hasOwn(to, key)) {
  4892. set(to, key, fromVal);
  4893. } else if (
  4894. toVal !== fromVal &&
  4895. isPlainObject(toVal) &&
  4896. isPlainObject(fromVal)
  4897. ) {
  4898. mergeData(toVal, fromVal);
  4899. }
  4900. }
  4901. return to
  4902. }
  4903. /**
  4904. * Data
  4905. */
  4906. function mergeDataOrFn (
  4907. parentVal,
  4908. childVal,
  4909. vm
  4910. ) {
  4911. if (!vm) {
  4912. // in a Vue.extend merge, both should be functions
  4913. if (!childVal) {
  4914. return parentVal
  4915. }
  4916. if (!parentVal) {
  4917. return childVal
  4918. }
  4919. // when parentVal & childVal are both present,
  4920. // we need to return a function that returns the
  4921. // merged result of both functions... no need to
  4922. // check if parentVal is a function here because
  4923. // it has to be a function to pass previous merges.
  4924. return function mergedDataFn () {
  4925. return mergeData(
  4926. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  4927. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  4928. )
  4929. }
  4930. } else {
  4931. return function mergedInstanceDataFn () {
  4932. // instance merge
  4933. var instanceData = typeof childVal === 'function'
  4934. ? childVal.call(vm, vm)
  4935. : childVal;
  4936. var defaultData = typeof parentVal === 'function'
  4937. ? parentVal.call(vm, vm)
  4938. : parentVal;
  4939. if (instanceData) {
  4940. return mergeData(instanceData, defaultData)
  4941. } else {
  4942. return defaultData
  4943. }
  4944. }
  4945. }
  4946. }
  4947. strats.data = function (
  4948. parentVal,
  4949. childVal,
  4950. vm
  4951. ) {
  4952. if (!vm) {
  4953. if (childVal && typeof childVal !== 'function') {
  4954. true && warn(
  4955. 'The "data" option should be a function ' +
  4956. 'that returns a per-instance value in component ' +
  4957. 'definitions.',
  4958. vm
  4959. );
  4960. return parentVal
  4961. }
  4962. return mergeDataOrFn(parentVal, childVal)
  4963. }
  4964. return mergeDataOrFn(parentVal, childVal, vm)
  4965. };
  4966. /**
  4967. * Hooks and props are merged as arrays.
  4968. */
  4969. function mergeHook (
  4970. parentVal,
  4971. childVal
  4972. ) {
  4973. var res = childVal
  4974. ? parentVal
  4975. ? parentVal.concat(childVal)
  4976. : Array.isArray(childVal)
  4977. ? childVal
  4978. : [childVal]
  4979. : parentVal;
  4980. return res
  4981. ? dedupeHooks(res)
  4982. : res
  4983. }
  4984. function dedupeHooks (hooks) {
  4985. var res = [];
  4986. for (var i = 0; i < hooks.length; i++) {
  4987. if (res.indexOf(hooks[i]) === -1) {
  4988. res.push(hooks[i]);
  4989. }
  4990. }
  4991. return res
  4992. }
  4993. LIFECYCLE_HOOKS.forEach(function (hook) {
  4994. strats[hook] = mergeHook;
  4995. });
  4996. /**
  4997. * Assets
  4998. *
  4999. * When a vm is present (instance creation), we need to do
  5000. * a three-way merge between constructor options, instance
  5001. * options and parent options.
  5002. */
  5003. function mergeAssets (
  5004. parentVal,
  5005. childVal,
  5006. vm,
  5007. key
  5008. ) {
  5009. var res = Object.create(parentVal || null);
  5010. if (childVal) {
  5011. true && assertObjectType(key, childVal, vm);
  5012. return extend(res, childVal)
  5013. } else {
  5014. return res
  5015. }
  5016. }
  5017. ASSET_TYPES.forEach(function (type) {
  5018. strats[type + 's'] = mergeAssets;
  5019. });
  5020. /**
  5021. * Watchers.
  5022. *
  5023. * Watchers hashes should not overwrite one
  5024. * another, so we merge them as arrays.
  5025. */
  5026. strats.watch = function (
  5027. parentVal,
  5028. childVal,
  5029. vm,
  5030. key
  5031. ) {
  5032. // work around Firefox's Object.prototype.watch...
  5033. if (parentVal === nativeWatch) { parentVal = undefined; }
  5034. if (childVal === nativeWatch) { childVal = undefined; }
  5035. /* istanbul ignore if */
  5036. if (!childVal) { return Object.create(parentVal || null) }
  5037. if (true) {
  5038. assertObjectType(key, childVal, vm);
  5039. }
  5040. if (!parentVal) { return childVal }
  5041. var ret = {};
  5042. extend(ret, parentVal);
  5043. for (var key$1 in childVal) {
  5044. var parent = ret[key$1];
  5045. var child = childVal[key$1];
  5046. if (parent && !Array.isArray(parent)) {
  5047. parent = [parent];
  5048. }
  5049. ret[key$1] = parent
  5050. ? parent.concat(child)
  5051. : Array.isArray(child) ? child : [child];
  5052. }
  5053. return ret
  5054. };
  5055. /**
  5056. * Other object hashes.
  5057. */
  5058. strats.props =
  5059. strats.methods =
  5060. strats.inject =
  5061. strats.computed = function (
  5062. parentVal,
  5063. childVal,
  5064. vm,
  5065. key
  5066. ) {
  5067. if (childVal && "development" !== 'production') {
  5068. assertObjectType(key, childVal, vm);
  5069. }
  5070. if (!parentVal) { return childVal }
  5071. var ret = Object.create(null);
  5072. extend(ret, parentVal);
  5073. if (childVal) { extend(ret, childVal); }
  5074. return ret
  5075. };
  5076. strats.provide = mergeDataOrFn;
  5077. /**
  5078. * Default strategy.
  5079. */
  5080. var defaultStrat = function (parentVal, childVal) {
  5081. return childVal === undefined
  5082. ? parentVal
  5083. : childVal
  5084. };
  5085. /**
  5086. * Validate component names
  5087. */
  5088. function checkComponents (options) {
  5089. for (var key in options.components) {
  5090. validateComponentName(key);
  5091. }
  5092. }
  5093. function validateComponentName (name) {
  5094. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  5095. warn(
  5096. 'Invalid component name: "' + name + '". Component names ' +
  5097. 'should conform to valid custom element name in html5 specification.'
  5098. );
  5099. }
  5100. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  5101. warn(
  5102. 'Do not use built-in or reserved HTML elements as component ' +
  5103. 'id: ' + name
  5104. );
  5105. }
  5106. }
  5107. /**
  5108. * Ensure all props option syntax are normalized into the
  5109. * Object-based format.
  5110. */
  5111. function normalizeProps (options, vm) {
  5112. var props = options.props;
  5113. if (!props) { return }
  5114. var res = {};
  5115. var i, val, name;
  5116. if (Array.isArray(props)) {
  5117. i = props.length;
  5118. while (i--) {
  5119. val = props[i];
  5120. if (typeof val === 'string') {
  5121. name = camelize(val);
  5122. res[name] = { type: null };
  5123. } else if (true) {
  5124. warn('props must be strings when using array syntax.');
  5125. }
  5126. }
  5127. } else if (isPlainObject(props)) {
  5128. for (var key in props) {
  5129. val = props[key];
  5130. name = camelize(key);
  5131. res[name] = isPlainObject(val)
  5132. ? val
  5133. : { type: val };
  5134. }
  5135. } else if (true) {
  5136. warn(
  5137. "Invalid value for option \"props\": expected an Array or an Object, " +
  5138. "but got " + (toRawType(props)) + ".",
  5139. vm
  5140. );
  5141. }
  5142. options.props = res;
  5143. }
  5144. /**
  5145. * Normalize all injections into Object-based format
  5146. */
  5147. function normalizeInject (options, vm) {
  5148. var inject = options.inject;
  5149. if (!inject) { return }
  5150. var normalized = options.inject = {};
  5151. if (Array.isArray(inject)) {
  5152. for (var i = 0; i < inject.length; i++) {
  5153. normalized[inject[i]] = { from: inject[i] };
  5154. }
  5155. } else if (isPlainObject(inject)) {
  5156. for (var key in inject) {
  5157. var val = inject[key];
  5158. normalized[key] = isPlainObject(val)
  5159. ? extend({ from: key }, val)
  5160. : { from: val };
  5161. }
  5162. } else if (true) {
  5163. warn(
  5164. "Invalid value for option \"inject\": expected an Array or an Object, " +
  5165. "but got " + (toRawType(inject)) + ".",
  5166. vm
  5167. );
  5168. }
  5169. }
  5170. /**
  5171. * Normalize raw function directives into object format.
  5172. */
  5173. function normalizeDirectives (options) {
  5174. var dirs = options.directives;
  5175. if (dirs) {
  5176. for (var key in dirs) {
  5177. var def$$1 = dirs[key];
  5178. if (typeof def$$1 === 'function') {
  5179. dirs[key] = { bind: def$$1, update: def$$1 };
  5180. }
  5181. }
  5182. }
  5183. }
  5184. function assertObjectType (name, value, vm) {
  5185. if (!isPlainObject(value)) {
  5186. warn(
  5187. "Invalid value for option \"" + name + "\": expected an Object, " +
  5188. "but got " + (toRawType(value)) + ".",
  5189. vm
  5190. );
  5191. }
  5192. }
  5193. /**
  5194. * Merge two option objects into a new one.
  5195. * Core utility used in both instantiation and inheritance.
  5196. */
  5197. function mergeOptions (
  5198. parent,
  5199. child,
  5200. vm
  5201. ) {
  5202. if (true) {
  5203. checkComponents(child);
  5204. }
  5205. if (typeof child === 'function') {
  5206. child = child.options;
  5207. }
  5208. normalizeProps(child, vm);
  5209. normalizeInject(child, vm);
  5210. normalizeDirectives(child);
  5211. // Apply extends and mixins on the child options,
  5212. // but only if it is a raw options object that isn't
  5213. // the result of another mergeOptions call.
  5214. // Only merged options has the _base property.
  5215. if (!child._base) {
  5216. if (child.extends) {
  5217. parent = mergeOptions(parent, child.extends, vm);
  5218. }
  5219. if (child.mixins) {
  5220. for (var i = 0, l = child.mixins.length; i < l; i++) {
  5221. parent = mergeOptions(parent, child.mixins[i], vm);
  5222. }
  5223. }
  5224. }
  5225. var options = {};
  5226. var key;
  5227. for (key in parent) {
  5228. mergeField(key);
  5229. }
  5230. for (key in child) {
  5231. if (!hasOwn(parent, key)) {
  5232. mergeField(key);
  5233. }
  5234. }
  5235. function mergeField (key) {
  5236. var strat = strats[key] || defaultStrat;
  5237. options[key] = strat(parent[key], child[key], vm, key);
  5238. }
  5239. return options
  5240. }
  5241. /**
  5242. * Resolve an asset.
  5243. * This function is used because child instances need access
  5244. * to assets defined in its ancestor chain.
  5245. */
  5246. function resolveAsset (
  5247. options,
  5248. type,
  5249. id,
  5250. warnMissing
  5251. ) {
  5252. /* istanbul ignore if */
  5253. if (typeof id !== 'string') {
  5254. return
  5255. }
  5256. var assets = options[type];
  5257. // check local registration variations first
  5258. if (hasOwn(assets, id)) { return assets[id] }
  5259. var camelizedId = camelize(id);
  5260. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  5261. var PascalCaseId = capitalize(camelizedId);
  5262. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  5263. // fallback to prototype chain
  5264. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  5265. if ( true && warnMissing && !res) {
  5266. warn(
  5267. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  5268. options
  5269. );
  5270. }
  5271. return res
  5272. }
  5273. /* */
  5274. function validateProp (
  5275. key,
  5276. propOptions,
  5277. propsData,
  5278. vm
  5279. ) {
  5280. var prop = propOptions[key];
  5281. var absent = !hasOwn(propsData, key);
  5282. var value = propsData[key];
  5283. // boolean casting
  5284. var booleanIndex = getTypeIndex(Boolean, prop.type);
  5285. if (booleanIndex > -1) {
  5286. if (absent && !hasOwn(prop, 'default')) {
  5287. value = false;
  5288. } else if (value === '' || value === hyphenate(key)) {
  5289. // only cast empty string / same name to boolean if
  5290. // boolean has higher priority
  5291. var stringIndex = getTypeIndex(String, prop.type);
  5292. if (stringIndex < 0 || booleanIndex < stringIndex) {
  5293. value = true;
  5294. }
  5295. }
  5296. }
  5297. // check default value
  5298. if (value === undefined) {
  5299. value = getPropDefaultValue(vm, prop, key);
  5300. // since the default value is a fresh copy,
  5301. // make sure to observe it.
  5302. var prevShouldObserve = shouldObserve;
  5303. toggleObserving(true);
  5304. observe(value);
  5305. toggleObserving(prevShouldObserve);
  5306. }
  5307. if (
  5308. true
  5309. ) {
  5310. assertProp(prop, key, value, vm, absent);
  5311. }
  5312. return value
  5313. }
  5314. /**
  5315. * Get the default value of a prop.
  5316. */
  5317. function getPropDefaultValue (vm, prop, key) {
  5318. // no default, return undefined
  5319. if (!hasOwn(prop, 'default')) {
  5320. return undefined
  5321. }
  5322. var def = prop.default;
  5323. // warn against non-factory defaults for Object & Array
  5324. if ( true && isObject(def)) {
  5325. warn(
  5326. 'Invalid default value for prop "' + key + '": ' +
  5327. 'Props with type Object/Array must use a factory function ' +
  5328. 'to return the default value.',
  5329. vm
  5330. );
  5331. }
  5332. // the raw prop value was also undefined from previous render,
  5333. // return previous default value to avoid unnecessary watcher trigger
  5334. if (vm && vm.$options.propsData &&
  5335. vm.$options.propsData[key] === undefined &&
  5336. vm._props[key] !== undefined
  5337. ) {
  5338. return vm._props[key]
  5339. }
  5340. // call factory function for non-Function types
  5341. // a value is Function if its prototype is function even across different execution context
  5342. return typeof def === 'function' && getType(prop.type) !== 'Function'
  5343. ? def.call(vm)
  5344. : def
  5345. }
  5346. /**
  5347. * Assert whether a prop is valid.
  5348. */
  5349. function assertProp (
  5350. prop,
  5351. name,
  5352. value,
  5353. vm,
  5354. absent
  5355. ) {
  5356. if (prop.required && absent) {
  5357. warn(
  5358. 'Missing required prop: "' + name + '"',
  5359. vm
  5360. );
  5361. return
  5362. }
  5363. if (value == null && !prop.required) {
  5364. return
  5365. }
  5366. var type = prop.type;
  5367. var valid = !type || type === true;
  5368. var expectedTypes = [];
  5369. if (type) {
  5370. if (!Array.isArray(type)) {
  5371. type = [type];
  5372. }
  5373. for (var i = 0; i < type.length && !valid; i++) {
  5374. var assertedType = assertType(value, type[i]);
  5375. expectedTypes.push(assertedType.expectedType || '');
  5376. valid = assertedType.valid;
  5377. }
  5378. }
  5379. if (!valid) {
  5380. warn(
  5381. getInvalidTypeMessage(name, value, expectedTypes),
  5382. vm
  5383. );
  5384. return
  5385. }
  5386. var validator = prop.validator;
  5387. if (validator) {
  5388. if (!validator(value)) {
  5389. warn(
  5390. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  5391. vm
  5392. );
  5393. }
  5394. }
  5395. }
  5396. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  5397. function assertType (value, type) {
  5398. var valid;
  5399. var expectedType = getType(type);
  5400. if (simpleCheckRE.test(expectedType)) {
  5401. var t = typeof value;
  5402. valid = t === expectedType.toLowerCase();
  5403. // for primitive wrapper objects
  5404. if (!valid && t === 'object') {
  5405. valid = value instanceof type;
  5406. }
  5407. } else if (expectedType === 'Object') {
  5408. valid = isPlainObject(value);
  5409. } else if (expectedType === 'Array') {
  5410. valid = Array.isArray(value);
  5411. } else {
  5412. valid = value instanceof type;
  5413. }
  5414. return {
  5415. valid: valid,
  5416. expectedType: expectedType
  5417. }
  5418. }
  5419. /**
  5420. * Use function string name to check built-in types,
  5421. * because a simple equality check will fail when running
  5422. * across different vms / iframes.
  5423. */
  5424. function getType (fn) {
  5425. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  5426. return match ? match[1] : ''
  5427. }
  5428. function isSameType (a, b) {
  5429. return getType(a) === getType(b)
  5430. }
  5431. function getTypeIndex (type, expectedTypes) {
  5432. if (!Array.isArray(expectedTypes)) {
  5433. return isSameType(expectedTypes, type) ? 0 : -1
  5434. }
  5435. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  5436. if (isSameType(expectedTypes[i], type)) {
  5437. return i
  5438. }
  5439. }
  5440. return -1
  5441. }
  5442. function getInvalidTypeMessage (name, value, expectedTypes) {
  5443. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  5444. " Expected " + (expectedTypes.map(capitalize).join(', '));
  5445. var expectedType = expectedTypes[0];
  5446. var receivedType = toRawType(value);
  5447. var expectedValue = styleValue(value, expectedType);
  5448. var receivedValue = styleValue(value, receivedType);
  5449. // check if we need to specify expected value
  5450. if (expectedTypes.length === 1 &&
  5451. isExplicable(expectedType) &&
  5452. !isBoolean(expectedType, receivedType)) {
  5453. message += " with value " + expectedValue;
  5454. }
  5455. message += ", got " + receivedType + " ";
  5456. // check if we need to specify received value
  5457. if (isExplicable(receivedType)) {
  5458. message += "with value " + receivedValue + ".";
  5459. }
  5460. return message
  5461. }
  5462. function styleValue (value, type) {
  5463. if (type === 'String') {
  5464. return ("\"" + value + "\"")
  5465. } else if (type === 'Number') {
  5466. return ("" + (Number(value)))
  5467. } else {
  5468. return ("" + value)
  5469. }
  5470. }
  5471. function isExplicable (value) {
  5472. var explicitTypes = ['string', 'number', 'boolean'];
  5473. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  5474. }
  5475. function isBoolean () {
  5476. var args = [], len = arguments.length;
  5477. while ( len-- ) args[ len ] = arguments[ len ];
  5478. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  5479. }
  5480. /* */
  5481. function handleError (err, vm, info) {
  5482. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  5483. // See: https://github.com/vuejs/vuex/issues/1505
  5484. pushTarget();
  5485. try {
  5486. if (vm) {
  5487. var cur = vm;
  5488. while ((cur = cur.$parent)) {
  5489. var hooks = cur.$options.errorCaptured;
  5490. if (hooks) {
  5491. for (var i = 0; i < hooks.length; i++) {
  5492. try {
  5493. var capture = hooks[i].call(cur, err, vm, info) === false;
  5494. if (capture) { return }
  5495. } catch (e) {
  5496. globalHandleError(e, cur, 'errorCaptured hook');
  5497. }
  5498. }
  5499. }
  5500. }
  5501. }
  5502. globalHandleError(err, vm, info);
  5503. } finally {
  5504. popTarget();
  5505. }
  5506. }
  5507. function invokeWithErrorHandling (
  5508. handler,
  5509. context,
  5510. args,
  5511. vm,
  5512. info
  5513. ) {
  5514. var res;
  5515. try {
  5516. res = args ? handler.apply(context, args) : handler.call(context);
  5517. if (res && !res._isVue && isPromise(res) && !res._handled) {
  5518. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  5519. // issue #9511
  5520. // avoid catch triggering multiple times when nested calls
  5521. res._handled = true;
  5522. }
  5523. } catch (e) {
  5524. handleError(e, vm, info);
  5525. }
  5526. return res
  5527. }
  5528. function globalHandleError (err, vm, info) {
  5529. if (config.errorHandler) {
  5530. try {
  5531. return config.errorHandler.call(null, err, vm, info)
  5532. } catch (e) {
  5533. // if the user intentionally throws the original error in the handler,
  5534. // do not log it twice
  5535. if (e !== err) {
  5536. logError(e, null, 'config.errorHandler');
  5537. }
  5538. }
  5539. }
  5540. logError(err, vm, info);
  5541. }
  5542. function logError (err, vm, info) {
  5543. if (true) {
  5544. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  5545. }
  5546. /* istanbul ignore else */
  5547. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  5548. console.error(err);
  5549. } else {
  5550. throw err
  5551. }
  5552. }
  5553. /* */
  5554. var callbacks = [];
  5555. var pending = false;
  5556. function flushCallbacks () {
  5557. pending = false;
  5558. var copies = callbacks.slice(0);
  5559. callbacks.length = 0;
  5560. for (var i = 0; i < copies.length; i++) {
  5561. copies[i]();
  5562. }
  5563. }
  5564. // Here we have async deferring wrappers using microtasks.
  5565. // In 2.5 we used (macro) tasks (in combination with microtasks).
  5566. // However, it has subtle problems when state is changed right before repaint
  5567. // (e.g. #6813, out-in transitions).
  5568. // Also, using (macro) tasks in event handler would cause some weird behaviors
  5569. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  5570. // So we now use microtasks everywhere, again.
  5571. // A major drawback of this tradeoff is that there are some scenarios
  5572. // where microtasks have too high a priority and fire in between supposedly
  5573. // sequential events (e.g. #4521, #6690, which have workarounds)
  5574. // or even between bubbling of the same event (#6566).
  5575. var timerFunc;
  5576. // The nextTick behavior leverages the microtask queue, which can be accessed
  5577. // via either native Promise.then or MutationObserver.
  5578. // MutationObserver has wider support, however it is seriously bugged in
  5579. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  5580. // completely stops working after triggering a few times... so, if native
  5581. // Promise is available, we will use it:
  5582. /* istanbul ignore next, $flow-disable-line */
  5583. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  5584. var p = Promise.resolve();
  5585. timerFunc = function () {
  5586. p.then(flushCallbacks);
  5587. // In problematic UIWebViews, Promise.then doesn't completely break, but
  5588. // it can get stuck in a weird state where callbacks are pushed into the
  5589. // microtask queue but the queue isn't being flushed, until the browser
  5590. // needs to do some other work, e.g. handle a timer. Therefore we can
  5591. // "force" the microtask queue to be flushed by adding an empty timer.
  5592. if (isIOS) { setTimeout(noop); }
  5593. };
  5594. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  5595. isNative(MutationObserver) ||
  5596. // PhantomJS and iOS 7.x
  5597. MutationObserver.toString() === '[object MutationObserverConstructor]'
  5598. )) {
  5599. // Use MutationObserver where native Promise is not available,
  5600. // e.g. PhantomJS, iOS7, Android 4.4
  5601. // (#6466 MutationObserver is unreliable in IE11)
  5602. var counter = 1;
  5603. var observer = new MutationObserver(flushCallbacks);
  5604. var textNode = document.createTextNode(String(counter));
  5605. observer.observe(textNode, {
  5606. characterData: true
  5607. });
  5608. timerFunc = function () {
  5609. counter = (counter + 1) % 2;
  5610. textNode.data = String(counter);
  5611. };
  5612. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  5613. // Fallback to setImmediate.
  5614. // Technically it leverages the (macro) task queue,
  5615. // but it is still a better choice than setTimeout.
  5616. timerFunc = function () {
  5617. setImmediate(flushCallbacks);
  5618. };
  5619. } else {
  5620. // Fallback to setTimeout.
  5621. timerFunc = function () {
  5622. setTimeout(flushCallbacks, 0);
  5623. };
  5624. }
  5625. function nextTick (cb, ctx) {
  5626. var _resolve;
  5627. callbacks.push(function () {
  5628. if (cb) {
  5629. try {
  5630. cb.call(ctx);
  5631. } catch (e) {
  5632. handleError(e, ctx, 'nextTick');
  5633. }
  5634. } else if (_resolve) {
  5635. _resolve(ctx);
  5636. }
  5637. });
  5638. if (!pending) {
  5639. pending = true;
  5640. timerFunc();
  5641. }
  5642. // $flow-disable-line
  5643. if (!cb && typeof Promise !== 'undefined') {
  5644. return new Promise(function (resolve) {
  5645. _resolve = resolve;
  5646. })
  5647. }
  5648. }
  5649. /* */
  5650. /* not type checking this file because flow doesn't play well with Proxy */
  5651. var initProxy;
  5652. if (true) {
  5653. var allowedGlobals = makeMap(
  5654. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  5655. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  5656. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  5657. 'require' // for Webpack/Browserify
  5658. );
  5659. var warnNonPresent = function (target, key) {
  5660. warn(
  5661. "Property or method \"" + key + "\" is not defined on the instance but " +
  5662. 'referenced during render. Make sure that this property is reactive, ' +
  5663. 'either in the data option, or for class-based components, by ' +
  5664. 'initializing the property. ' +
  5665. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  5666. target
  5667. );
  5668. };
  5669. var warnReservedPrefix = function (target, key) {
  5670. warn(
  5671. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  5672. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  5673. 'prevent conflicts with Vue internals. ' +
  5674. 'See: https://vuejs.org/v2/api/#data',
  5675. target
  5676. );
  5677. };
  5678. var hasProxy =
  5679. typeof Proxy !== 'undefined' && isNative(Proxy);
  5680. if (hasProxy) {
  5681. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  5682. config.keyCodes = new Proxy(config.keyCodes, {
  5683. set: function set (target, key, value) {
  5684. if (isBuiltInModifier(key)) {
  5685. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  5686. return false
  5687. } else {
  5688. target[key] = value;
  5689. return true
  5690. }
  5691. }
  5692. });
  5693. }
  5694. var hasHandler = {
  5695. has: function has (target, key) {
  5696. var has = key in target;
  5697. var isAllowed = allowedGlobals(key) ||
  5698. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  5699. if (!has && !isAllowed) {
  5700. if (key in target.$data) { warnReservedPrefix(target, key); }
  5701. else { warnNonPresent(target, key); }
  5702. }
  5703. return has || !isAllowed
  5704. }
  5705. };
  5706. var getHandler = {
  5707. get: function get (target, key) {
  5708. if (typeof key === 'string' && !(key in target)) {
  5709. if (key in target.$data) { warnReservedPrefix(target, key); }
  5710. else { warnNonPresent(target, key); }
  5711. }
  5712. return target[key]
  5713. }
  5714. };
  5715. initProxy = function initProxy (vm) {
  5716. if (hasProxy) {
  5717. // determine which proxy handler to use
  5718. var options = vm.$options;
  5719. var handlers = options.render && options.render._withStripped
  5720. ? getHandler
  5721. : hasHandler;
  5722. vm._renderProxy = new Proxy(vm, handlers);
  5723. } else {
  5724. vm._renderProxy = vm;
  5725. }
  5726. };
  5727. }
  5728. /* */
  5729. var seenObjects = new _Set();
  5730. /**
  5731. * Recursively traverse an object to evoke all converted
  5732. * getters, so that every nested property inside the object
  5733. * is collected as a "deep" dependency.
  5734. */
  5735. function traverse (val) {
  5736. _traverse(val, seenObjects);
  5737. seenObjects.clear();
  5738. }
  5739. function _traverse (val, seen) {
  5740. var i, keys;
  5741. var isA = Array.isArray(val);
  5742. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  5743. return
  5744. }
  5745. if (val.__ob__) {
  5746. var depId = val.__ob__.dep.id;
  5747. if (seen.has(depId)) {
  5748. return
  5749. }
  5750. seen.add(depId);
  5751. }
  5752. if (isA) {
  5753. i = val.length;
  5754. while (i--) { _traverse(val[i], seen); }
  5755. } else {
  5756. keys = Object.keys(val);
  5757. i = keys.length;
  5758. while (i--) { _traverse(val[keys[i]], seen); }
  5759. }
  5760. }
  5761. var mark;
  5762. var measure;
  5763. if (true) {
  5764. var perf = inBrowser && window.performance;
  5765. /* istanbul ignore if */
  5766. if (
  5767. perf &&
  5768. perf.mark &&
  5769. perf.measure &&
  5770. perf.clearMarks &&
  5771. perf.clearMeasures
  5772. ) {
  5773. mark = function (tag) { return perf.mark(tag); };
  5774. measure = function (name, startTag, endTag) {
  5775. perf.measure(name, startTag, endTag);
  5776. perf.clearMarks(startTag);
  5777. perf.clearMarks(endTag);
  5778. // perf.clearMeasures(name)
  5779. };
  5780. }
  5781. }
  5782. /* */
  5783. var normalizeEvent = cached(function (name) {
  5784. var passive = name.charAt(0) === '&';
  5785. name = passive ? name.slice(1) : name;
  5786. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  5787. name = once$$1 ? name.slice(1) : name;
  5788. var capture = name.charAt(0) === '!';
  5789. name = capture ? name.slice(1) : name;
  5790. return {
  5791. name: name,
  5792. once: once$$1,
  5793. capture: capture,
  5794. passive: passive
  5795. }
  5796. });
  5797. function createFnInvoker (fns, vm) {
  5798. function invoker () {
  5799. var arguments$1 = arguments;
  5800. var fns = invoker.fns;
  5801. if (Array.isArray(fns)) {
  5802. var cloned = fns.slice();
  5803. for (var i = 0; i < cloned.length; i++) {
  5804. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  5805. }
  5806. } else {
  5807. // return handler return value for single handlers
  5808. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  5809. }
  5810. }
  5811. invoker.fns = fns;
  5812. return invoker
  5813. }
  5814. function updateListeners (
  5815. on,
  5816. oldOn,
  5817. add,
  5818. remove$$1,
  5819. createOnceHandler,
  5820. vm
  5821. ) {
  5822. var name, def$$1, cur, old, event;
  5823. for (name in on) {
  5824. def$$1 = cur = on[name];
  5825. old = oldOn[name];
  5826. event = normalizeEvent(name);
  5827. if (isUndef(cur)) {
  5828. true && warn(
  5829. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  5830. vm
  5831. );
  5832. } else if (isUndef(old)) {
  5833. if (isUndef(cur.fns)) {
  5834. cur = on[name] = createFnInvoker(cur, vm);
  5835. }
  5836. if (isTrue(event.once)) {
  5837. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  5838. }
  5839. add(event.name, cur, event.capture, event.passive, event.params);
  5840. } else if (cur !== old) {
  5841. old.fns = cur;
  5842. on[name] = old;
  5843. }
  5844. }
  5845. for (name in oldOn) {
  5846. if (isUndef(on[name])) {
  5847. event = normalizeEvent(name);
  5848. remove$$1(event.name, oldOn[name], event.capture);
  5849. }
  5850. }
  5851. }
  5852. /* */
  5853. /* */
  5854. // fixed by xxxxxx (mp properties)
  5855. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  5856. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  5857. if (isUndef(propOptions)) {
  5858. return res
  5859. }
  5860. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  5861. var attrs = data.attrs;
  5862. var props = data.props;
  5863. if (isDef(attrs) || isDef(props)) {
  5864. for (var key in propOptions) {
  5865. var altKey = hyphenate(key);
  5866. var result = checkProp(res, props, key, altKey, true) ||
  5867. checkProp(res, attrs, key, altKey, false);
  5868. // externalClass
  5869. if (
  5870. result &&
  5871. res[key] &&
  5872. externalClasses.indexOf(altKey) !== -1 &&
  5873. context[camelize(res[key])]
  5874. ) {
  5875. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  5876. res[key] = context[camelize(res[key])];
  5877. }
  5878. }
  5879. }
  5880. return res
  5881. }
  5882. function extractPropsFromVNodeData (
  5883. data,
  5884. Ctor,
  5885. tag,
  5886. context// fixed by xxxxxx
  5887. ) {
  5888. // we are only extracting raw values here.
  5889. // validation and default values are handled in the child
  5890. // component itself.
  5891. var propOptions = Ctor.options.props;
  5892. if (isUndef(propOptions)) {
  5893. // fixed by xxxxxx
  5894. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  5895. }
  5896. var res = {};
  5897. var attrs = data.attrs;
  5898. var props = data.props;
  5899. if (isDef(attrs) || isDef(props)) {
  5900. for (var key in propOptions) {
  5901. var altKey = hyphenate(key);
  5902. if (true) {
  5903. var keyInLowerCase = key.toLowerCase();
  5904. if (
  5905. key !== keyInLowerCase &&
  5906. attrs && hasOwn(attrs, keyInLowerCase)
  5907. ) {
  5908. tip(
  5909. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  5910. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  5911. " \"" + key + "\". " +
  5912. "Note that HTML attributes are case-insensitive and camelCased " +
  5913. "props need to use their kebab-case equivalents when using in-DOM " +
  5914. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  5915. );
  5916. }
  5917. }
  5918. checkProp(res, props, key, altKey, true) ||
  5919. checkProp(res, attrs, key, altKey, false);
  5920. }
  5921. }
  5922. // fixed by xxxxxx
  5923. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  5924. }
  5925. function checkProp (
  5926. res,
  5927. hash,
  5928. key,
  5929. altKey,
  5930. preserve
  5931. ) {
  5932. if (isDef(hash)) {
  5933. if (hasOwn(hash, key)) {
  5934. res[key] = hash[key];
  5935. if (!preserve) {
  5936. delete hash[key];
  5937. }
  5938. return true
  5939. } else if (hasOwn(hash, altKey)) {
  5940. res[key] = hash[altKey];
  5941. if (!preserve) {
  5942. delete hash[altKey];
  5943. }
  5944. return true
  5945. }
  5946. }
  5947. return false
  5948. }
  5949. /* */
  5950. // The template compiler attempts to minimize the need for normalization by
  5951. // statically analyzing the template at compile time.
  5952. //
  5953. // For plain HTML markup, normalization can be completely skipped because the
  5954. // generated render function is guaranteed to return Array<VNode>. There are
  5955. // two cases where extra normalization is needed:
  5956. // 1. When the children contains components - because a functional component
  5957. // may return an Array instead of a single root. In this case, just a simple
  5958. // normalization is needed - if any child is an Array, we flatten the whole
  5959. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  5960. // because functional components already normalize their own children.
  5961. function simpleNormalizeChildren (children) {
  5962. for (var i = 0; i < children.length; i++) {
  5963. if (Array.isArray(children[i])) {
  5964. return Array.prototype.concat.apply([], children)
  5965. }
  5966. }
  5967. return children
  5968. }
  5969. // 2. When the children contains constructs that always generated nested Arrays,
  5970. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  5971. // with hand-written render functions / JSX. In such cases a full normalization
  5972. // is needed to cater to all possible types of children values.
  5973. function normalizeChildren (children) {
  5974. return isPrimitive(children)
  5975. ? [createTextVNode(children)]
  5976. : Array.isArray(children)
  5977. ? normalizeArrayChildren(children)
  5978. : undefined
  5979. }
  5980. function isTextNode (node) {
  5981. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  5982. }
  5983. function normalizeArrayChildren (children, nestedIndex) {
  5984. var res = [];
  5985. var i, c, lastIndex, last;
  5986. for (i = 0; i < children.length; i++) {
  5987. c = children[i];
  5988. if (isUndef(c) || typeof c === 'boolean') { continue }
  5989. lastIndex = res.length - 1;
  5990. last = res[lastIndex];
  5991. // nested
  5992. if (Array.isArray(c)) {
  5993. if (c.length > 0) {
  5994. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  5995. // merge adjacent text nodes
  5996. if (isTextNode(c[0]) && isTextNode(last)) {
  5997. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  5998. c.shift();
  5999. }
  6000. res.push.apply(res, c);
  6001. }
  6002. } else if (isPrimitive(c)) {
  6003. if (isTextNode(last)) {
  6004. // merge adjacent text nodes
  6005. // this is necessary for SSR hydration because text nodes are
  6006. // essentially merged when rendered to HTML strings
  6007. res[lastIndex] = createTextVNode(last.text + c);
  6008. } else if (c !== '') {
  6009. // convert primitive to vnode
  6010. res.push(createTextVNode(c));
  6011. }
  6012. } else {
  6013. if (isTextNode(c) && isTextNode(last)) {
  6014. // merge adjacent text nodes
  6015. res[lastIndex] = createTextVNode(last.text + c.text);
  6016. } else {
  6017. // default key for nested array children (likely generated by v-for)
  6018. if (isTrue(children._isVList) &&
  6019. isDef(c.tag) &&
  6020. isUndef(c.key) &&
  6021. isDef(nestedIndex)) {
  6022. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  6023. }
  6024. res.push(c);
  6025. }
  6026. }
  6027. }
  6028. return res
  6029. }
  6030. /* */
  6031. function initProvide (vm) {
  6032. var provide = vm.$options.provide;
  6033. if (provide) {
  6034. vm._provided = typeof provide === 'function'
  6035. ? provide.call(vm)
  6036. : provide;
  6037. }
  6038. }
  6039. function initInjections (vm) {
  6040. var result = resolveInject(vm.$options.inject, vm);
  6041. if (result) {
  6042. toggleObserving(false);
  6043. Object.keys(result).forEach(function (key) {
  6044. /* istanbul ignore else */
  6045. if (true) {
  6046. defineReactive$$1(vm, key, result[key], function () {
  6047. warn(
  6048. "Avoid mutating an injected value directly since the changes will be " +
  6049. "overwritten whenever the provided component re-renders. " +
  6050. "injection being mutated: \"" + key + "\"",
  6051. vm
  6052. );
  6053. });
  6054. } else {}
  6055. });
  6056. toggleObserving(true);
  6057. }
  6058. }
  6059. function resolveInject (inject, vm) {
  6060. if (inject) {
  6061. // inject is :any because flow is not smart enough to figure out cached
  6062. var result = Object.create(null);
  6063. var keys = hasSymbol
  6064. ? Reflect.ownKeys(inject)
  6065. : Object.keys(inject);
  6066. for (var i = 0; i < keys.length; i++) {
  6067. var key = keys[i];
  6068. // #6574 in case the inject object is observed...
  6069. if (key === '__ob__') { continue }
  6070. var provideKey = inject[key].from;
  6071. var source = vm;
  6072. while (source) {
  6073. if (source._provided && hasOwn(source._provided, provideKey)) {
  6074. result[key] = source._provided[provideKey];
  6075. break
  6076. }
  6077. source = source.$parent;
  6078. }
  6079. if (!source) {
  6080. if ('default' in inject[key]) {
  6081. var provideDefault = inject[key].default;
  6082. result[key] = typeof provideDefault === 'function'
  6083. ? provideDefault.call(vm)
  6084. : provideDefault;
  6085. } else if (true) {
  6086. warn(("Injection \"" + key + "\" not found"), vm);
  6087. }
  6088. }
  6089. }
  6090. return result
  6091. }
  6092. }
  6093. /* */
  6094. /**
  6095. * Runtime helper for resolving raw children VNodes into a slot object.
  6096. */
  6097. function resolveSlots (
  6098. children,
  6099. context
  6100. ) {
  6101. if (!children || !children.length) {
  6102. return {}
  6103. }
  6104. var slots = {};
  6105. for (var i = 0, l = children.length; i < l; i++) {
  6106. var child = children[i];
  6107. var data = child.data;
  6108. // remove slot attribute if the node is resolved as a Vue slot node
  6109. if (data && data.attrs && data.attrs.slot) {
  6110. delete data.attrs.slot;
  6111. }
  6112. // named slots should only be respected if the vnode was rendered in the
  6113. // same context.
  6114. if ((child.context === context || child.fnContext === context) &&
  6115. data && data.slot != null
  6116. ) {
  6117. var name = data.slot;
  6118. var slot = (slots[name] || (slots[name] = []));
  6119. if (child.tag === 'template') {
  6120. slot.push.apply(slot, child.children || []);
  6121. } else {
  6122. slot.push(child);
  6123. }
  6124. } else {
  6125. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  6126. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  6127. (slots['page'] || (slots['page'] = [])).push(child);
  6128. }else{
  6129. (slots.default || (slots.default = [])).push(child);
  6130. }
  6131. }
  6132. }
  6133. // ignore slots that contains only whitespace
  6134. for (var name$1 in slots) {
  6135. if (slots[name$1].every(isWhitespace)) {
  6136. delete slots[name$1];
  6137. }
  6138. }
  6139. return slots
  6140. }
  6141. function isWhitespace (node) {
  6142. return (node.isComment && !node.asyncFactory) || node.text === ' '
  6143. }
  6144. /* */
  6145. function normalizeScopedSlots (
  6146. slots,
  6147. normalSlots,
  6148. prevSlots
  6149. ) {
  6150. var res;
  6151. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  6152. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  6153. var key = slots && slots.$key;
  6154. if (!slots) {
  6155. res = {};
  6156. } else if (slots._normalized) {
  6157. // fast path 1: child component re-render only, parent did not change
  6158. return slots._normalized
  6159. } else if (
  6160. isStable &&
  6161. prevSlots &&
  6162. prevSlots !== emptyObject &&
  6163. key === prevSlots.$key &&
  6164. !hasNormalSlots &&
  6165. !prevSlots.$hasNormal
  6166. ) {
  6167. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  6168. // only need to normalize once
  6169. return prevSlots
  6170. } else {
  6171. res = {};
  6172. for (var key$1 in slots) {
  6173. if (slots[key$1] && key$1[0] !== '$') {
  6174. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  6175. }
  6176. }
  6177. }
  6178. // expose normal slots on scopedSlots
  6179. for (var key$2 in normalSlots) {
  6180. if (!(key$2 in res)) {
  6181. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  6182. }
  6183. }
  6184. // avoriaz seems to mock a non-extensible $scopedSlots object
  6185. // and when that is passed down this would cause an error
  6186. if (slots && Object.isExtensible(slots)) {
  6187. (slots)._normalized = res;
  6188. }
  6189. def(res, '$stable', isStable);
  6190. def(res, '$key', key);
  6191. def(res, '$hasNormal', hasNormalSlots);
  6192. return res
  6193. }
  6194. function normalizeScopedSlot(normalSlots, key, fn) {
  6195. var normalized = function () {
  6196. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  6197. res = res && typeof res === 'object' && !Array.isArray(res)
  6198. ? [res] // single vnode
  6199. : normalizeChildren(res);
  6200. return res && (
  6201. res.length === 0 ||
  6202. (res.length === 1 && res[0].isComment) // #9658
  6203. ) ? undefined
  6204. : res
  6205. };
  6206. // this is a slot using the new v-slot syntax without scope. although it is
  6207. // compiled as a scoped slot, render fn users would expect it to be present
  6208. // on this.$slots because the usage is semantically a normal slot.
  6209. if (fn.proxy) {
  6210. Object.defineProperty(normalSlots, key, {
  6211. get: normalized,
  6212. enumerable: true,
  6213. configurable: true
  6214. });
  6215. }
  6216. return normalized
  6217. }
  6218. function proxyNormalSlot(slots, key) {
  6219. return function () { return slots[key]; }
  6220. }
  6221. /* */
  6222. /**
  6223. * Runtime helper for rendering v-for lists.
  6224. */
  6225. function renderList (
  6226. val,
  6227. render
  6228. ) {
  6229. var ret, i, l, keys, key;
  6230. if (Array.isArray(val) || typeof val === 'string') {
  6231. ret = new Array(val.length);
  6232. for (i = 0, l = val.length; i < l; i++) {
  6233. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  6234. }
  6235. } else if (typeof val === 'number') {
  6236. ret = new Array(val);
  6237. for (i = 0; i < val; i++) {
  6238. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  6239. }
  6240. } else if (isObject(val)) {
  6241. if (hasSymbol && val[Symbol.iterator]) {
  6242. ret = [];
  6243. var iterator = val[Symbol.iterator]();
  6244. var result = iterator.next();
  6245. while (!result.done) {
  6246. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  6247. result = iterator.next();
  6248. }
  6249. } else {
  6250. keys = Object.keys(val);
  6251. ret = new Array(keys.length);
  6252. for (i = 0, l = keys.length; i < l; i++) {
  6253. key = keys[i];
  6254. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  6255. }
  6256. }
  6257. }
  6258. if (!isDef(ret)) {
  6259. ret = [];
  6260. }
  6261. (ret)._isVList = true;
  6262. return ret
  6263. }
  6264. /* */
  6265. /**
  6266. * Runtime helper for rendering <slot>
  6267. */
  6268. function renderSlot (
  6269. name,
  6270. fallback,
  6271. props,
  6272. bindObject
  6273. ) {
  6274. var scopedSlotFn = this.$scopedSlots[name];
  6275. var nodes;
  6276. if (scopedSlotFn) { // scoped slot
  6277. props = props || {};
  6278. if (bindObject) {
  6279. if ( true && !isObject(bindObject)) {
  6280. warn(
  6281. 'slot v-bind without argument expects an Object',
  6282. this
  6283. );
  6284. }
  6285. props = extend(extend({}, bindObject), props);
  6286. }
  6287. // fixed by xxxxxx app-plus scopedSlot
  6288. nodes = scopedSlotFn(props, this, props._i) || fallback;
  6289. } else {
  6290. nodes = this.$slots[name] || fallback;
  6291. }
  6292. var target = props && props.slot;
  6293. if (target) {
  6294. return this.$createElement('template', { slot: target }, nodes)
  6295. } else {
  6296. return nodes
  6297. }
  6298. }
  6299. /* */
  6300. /**
  6301. * Runtime helper for resolving filters
  6302. */
  6303. function resolveFilter (id) {
  6304. return resolveAsset(this.$options, 'filters', id, true) || identity
  6305. }
  6306. /* */
  6307. function isKeyNotMatch (expect, actual) {
  6308. if (Array.isArray(expect)) {
  6309. return expect.indexOf(actual) === -1
  6310. } else {
  6311. return expect !== actual
  6312. }
  6313. }
  6314. /**
  6315. * Runtime helper for checking keyCodes from config.
  6316. * exposed as Vue.prototype._k
  6317. * passing in eventKeyName as last argument separately for backwards compat
  6318. */
  6319. function checkKeyCodes (
  6320. eventKeyCode,
  6321. key,
  6322. builtInKeyCode,
  6323. eventKeyName,
  6324. builtInKeyName
  6325. ) {
  6326. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  6327. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  6328. return isKeyNotMatch(builtInKeyName, eventKeyName)
  6329. } else if (mappedKeyCode) {
  6330. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  6331. } else if (eventKeyName) {
  6332. return hyphenate(eventKeyName) !== key
  6333. }
  6334. }
  6335. /* */
  6336. /**
  6337. * Runtime helper for merging v-bind="object" into a VNode's data.
  6338. */
  6339. function bindObjectProps (
  6340. data,
  6341. tag,
  6342. value,
  6343. asProp,
  6344. isSync
  6345. ) {
  6346. if (value) {
  6347. if (!isObject(value)) {
  6348. true && warn(
  6349. 'v-bind without argument expects an Object or Array value',
  6350. this
  6351. );
  6352. } else {
  6353. if (Array.isArray(value)) {
  6354. value = toObject(value);
  6355. }
  6356. var hash;
  6357. var loop = function ( key ) {
  6358. if (
  6359. key === 'class' ||
  6360. key === 'style' ||
  6361. isReservedAttribute(key)
  6362. ) {
  6363. hash = data;
  6364. } else {
  6365. var type = data.attrs && data.attrs.type;
  6366. hash = asProp || config.mustUseProp(tag, type, key)
  6367. ? data.domProps || (data.domProps = {})
  6368. : data.attrs || (data.attrs = {});
  6369. }
  6370. var camelizedKey = camelize(key);
  6371. var hyphenatedKey = hyphenate(key);
  6372. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  6373. hash[key] = value[key];
  6374. if (isSync) {
  6375. var on = data.on || (data.on = {});
  6376. on[("update:" + key)] = function ($event) {
  6377. value[key] = $event;
  6378. };
  6379. }
  6380. }
  6381. };
  6382. for (var key in value) loop( key );
  6383. }
  6384. }
  6385. return data
  6386. }
  6387. /* */
  6388. /**
  6389. * Runtime helper for rendering static trees.
  6390. */
  6391. function renderStatic (
  6392. index,
  6393. isInFor
  6394. ) {
  6395. var cached = this._staticTrees || (this._staticTrees = []);
  6396. var tree = cached[index];
  6397. // if has already-rendered static tree and not inside v-for,
  6398. // we can reuse the same tree.
  6399. if (tree && !isInFor) {
  6400. return tree
  6401. }
  6402. // otherwise, render a fresh tree.
  6403. tree = cached[index] = this.$options.staticRenderFns[index].call(
  6404. this._renderProxy,
  6405. null,
  6406. this // for render fns generated for functional component templates
  6407. );
  6408. markStatic(tree, ("__static__" + index), false);
  6409. return tree
  6410. }
  6411. /**
  6412. * Runtime helper for v-once.
  6413. * Effectively it means marking the node as static with a unique key.
  6414. */
  6415. function markOnce (
  6416. tree,
  6417. index,
  6418. key
  6419. ) {
  6420. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  6421. return tree
  6422. }
  6423. function markStatic (
  6424. tree,
  6425. key,
  6426. isOnce
  6427. ) {
  6428. if (Array.isArray(tree)) {
  6429. for (var i = 0; i < tree.length; i++) {
  6430. if (tree[i] && typeof tree[i] !== 'string') {
  6431. markStaticNode(tree[i], (key + "_" + i), isOnce);
  6432. }
  6433. }
  6434. } else {
  6435. markStaticNode(tree, key, isOnce);
  6436. }
  6437. }
  6438. function markStaticNode (node, key, isOnce) {
  6439. node.isStatic = true;
  6440. node.key = key;
  6441. node.isOnce = isOnce;
  6442. }
  6443. /* */
  6444. function bindObjectListeners (data, value) {
  6445. if (value) {
  6446. if (!isPlainObject(value)) {
  6447. true && warn(
  6448. 'v-on without argument expects an Object value',
  6449. this
  6450. );
  6451. } else {
  6452. var on = data.on = data.on ? extend({}, data.on) : {};
  6453. for (var key in value) {
  6454. var existing = on[key];
  6455. var ours = value[key];
  6456. on[key] = existing ? [].concat(existing, ours) : ours;
  6457. }
  6458. }
  6459. }
  6460. return data
  6461. }
  6462. /* */
  6463. function resolveScopedSlots (
  6464. fns, // see flow/vnode
  6465. res,
  6466. // the following are added in 2.6
  6467. hasDynamicKeys,
  6468. contentHashKey
  6469. ) {
  6470. res = res || { $stable: !hasDynamicKeys };
  6471. for (var i = 0; i < fns.length; i++) {
  6472. var slot = fns[i];
  6473. if (Array.isArray(slot)) {
  6474. resolveScopedSlots(slot, res, hasDynamicKeys);
  6475. } else if (slot) {
  6476. // marker for reverse proxying v-slot without scope on this.$slots
  6477. if (slot.proxy) {
  6478. slot.fn.proxy = true;
  6479. }
  6480. res[slot.key] = slot.fn;
  6481. }
  6482. }
  6483. if (contentHashKey) {
  6484. (res).$key = contentHashKey;
  6485. }
  6486. return res
  6487. }
  6488. /* */
  6489. function bindDynamicKeys (baseObj, values) {
  6490. for (var i = 0; i < values.length; i += 2) {
  6491. var key = values[i];
  6492. if (typeof key === 'string' && key) {
  6493. baseObj[values[i]] = values[i + 1];
  6494. } else if ( true && key !== '' && key !== null) {
  6495. // null is a special value for explicitly removing a binding
  6496. warn(
  6497. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  6498. this
  6499. );
  6500. }
  6501. }
  6502. return baseObj
  6503. }
  6504. // helper to dynamically append modifier runtime markers to event names.
  6505. // ensure only append when value is already string, otherwise it will be cast
  6506. // to string and cause the type check to miss.
  6507. function prependModifier (value, symbol) {
  6508. return typeof value === 'string' ? symbol + value : value
  6509. }
  6510. /* */
  6511. function installRenderHelpers (target) {
  6512. target._o = markOnce;
  6513. target._n = toNumber;
  6514. target._s = toString;
  6515. target._l = renderList;
  6516. target._t = renderSlot;
  6517. target._q = looseEqual;
  6518. target._i = looseIndexOf;
  6519. target._m = renderStatic;
  6520. target._f = resolveFilter;
  6521. target._k = checkKeyCodes;
  6522. target._b = bindObjectProps;
  6523. target._v = createTextVNode;
  6524. target._e = createEmptyVNode;
  6525. target._u = resolveScopedSlots;
  6526. target._g = bindObjectListeners;
  6527. target._d = bindDynamicKeys;
  6528. target._p = prependModifier;
  6529. }
  6530. /* */
  6531. function FunctionalRenderContext (
  6532. data,
  6533. props,
  6534. children,
  6535. parent,
  6536. Ctor
  6537. ) {
  6538. var this$1 = this;
  6539. var options = Ctor.options;
  6540. // ensure the createElement function in functional components
  6541. // gets a unique context - this is necessary for correct named slot check
  6542. var contextVm;
  6543. if (hasOwn(parent, '_uid')) {
  6544. contextVm = Object.create(parent);
  6545. // $flow-disable-line
  6546. contextVm._original = parent;
  6547. } else {
  6548. // the context vm passed in is a functional context as well.
  6549. // in this case we want to make sure we are able to get a hold to the
  6550. // real context instance.
  6551. contextVm = parent;
  6552. // $flow-disable-line
  6553. parent = parent._original;
  6554. }
  6555. var isCompiled = isTrue(options._compiled);
  6556. var needNormalization = !isCompiled;
  6557. this.data = data;
  6558. this.props = props;
  6559. this.children = children;
  6560. this.parent = parent;
  6561. this.listeners = data.on || emptyObject;
  6562. this.injections = resolveInject(options.inject, parent);
  6563. this.slots = function () {
  6564. if (!this$1.$slots) {
  6565. normalizeScopedSlots(
  6566. data.scopedSlots,
  6567. this$1.$slots = resolveSlots(children, parent)
  6568. );
  6569. }
  6570. return this$1.$slots
  6571. };
  6572. Object.defineProperty(this, 'scopedSlots', ({
  6573. enumerable: true,
  6574. get: function get () {
  6575. return normalizeScopedSlots(data.scopedSlots, this.slots())
  6576. }
  6577. }));
  6578. // support for compiled functional template
  6579. if (isCompiled) {
  6580. // exposing $options for renderStatic()
  6581. this.$options = options;
  6582. // pre-resolve slots for renderSlot()
  6583. this.$slots = this.slots();
  6584. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  6585. }
  6586. if (options._scopeId) {
  6587. this._c = function (a, b, c, d) {
  6588. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  6589. if (vnode && !Array.isArray(vnode)) {
  6590. vnode.fnScopeId = options._scopeId;
  6591. vnode.fnContext = parent;
  6592. }
  6593. return vnode
  6594. };
  6595. } else {
  6596. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  6597. }
  6598. }
  6599. installRenderHelpers(FunctionalRenderContext.prototype);
  6600. function createFunctionalComponent (
  6601. Ctor,
  6602. propsData,
  6603. data,
  6604. contextVm,
  6605. children
  6606. ) {
  6607. var options = Ctor.options;
  6608. var props = {};
  6609. var propOptions = options.props;
  6610. if (isDef(propOptions)) {
  6611. for (var key in propOptions) {
  6612. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  6613. }
  6614. } else {
  6615. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  6616. if (isDef(data.props)) { mergeProps(props, data.props); }
  6617. }
  6618. var renderContext = new FunctionalRenderContext(
  6619. data,
  6620. props,
  6621. children,
  6622. contextVm,
  6623. Ctor
  6624. );
  6625. var vnode = options.render.call(null, renderContext._c, renderContext);
  6626. if (vnode instanceof VNode) {
  6627. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  6628. } else if (Array.isArray(vnode)) {
  6629. var vnodes = normalizeChildren(vnode) || [];
  6630. var res = new Array(vnodes.length);
  6631. for (var i = 0; i < vnodes.length; i++) {
  6632. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  6633. }
  6634. return res
  6635. }
  6636. }
  6637. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  6638. // #7817 clone node before setting fnContext, otherwise if the node is reused
  6639. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  6640. // that should not be matched to match.
  6641. var clone = cloneVNode(vnode);
  6642. clone.fnContext = contextVm;
  6643. clone.fnOptions = options;
  6644. if (true) {
  6645. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  6646. }
  6647. if (data.slot) {
  6648. (clone.data || (clone.data = {})).slot = data.slot;
  6649. }
  6650. return clone
  6651. }
  6652. function mergeProps (to, from) {
  6653. for (var key in from) {
  6654. to[camelize(key)] = from[key];
  6655. }
  6656. }
  6657. /* */
  6658. /* */
  6659. /* */
  6660. /* */
  6661. // inline hooks to be invoked on component VNodes during patch
  6662. var componentVNodeHooks = {
  6663. init: function init (vnode, hydrating) {
  6664. if (
  6665. vnode.componentInstance &&
  6666. !vnode.componentInstance._isDestroyed &&
  6667. vnode.data.keepAlive
  6668. ) {
  6669. // kept-alive components, treat as a patch
  6670. var mountedNode = vnode; // work around flow
  6671. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  6672. } else {
  6673. var child = vnode.componentInstance = createComponentInstanceForVnode(
  6674. vnode,
  6675. activeInstance
  6676. );
  6677. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  6678. }
  6679. },
  6680. prepatch: function prepatch (oldVnode, vnode) {
  6681. var options = vnode.componentOptions;
  6682. var child = vnode.componentInstance = oldVnode.componentInstance;
  6683. updateChildComponent(
  6684. child,
  6685. options.propsData, // updated props
  6686. options.listeners, // updated listeners
  6687. vnode, // new parent vnode
  6688. options.children // new children
  6689. );
  6690. },
  6691. insert: function insert (vnode) {
  6692. var context = vnode.context;
  6693. var componentInstance = vnode.componentInstance;
  6694. if (!componentInstance._isMounted) {
  6695. callHook(componentInstance, 'onServiceCreated');
  6696. callHook(componentInstance, 'onServiceAttached');
  6697. componentInstance._isMounted = true;
  6698. callHook(componentInstance, 'mounted');
  6699. }
  6700. if (vnode.data.keepAlive) {
  6701. if (context._isMounted) {
  6702. // vue-router#1212
  6703. // During updates, a kept-alive component's child components may
  6704. // change, so directly walking the tree here may call activated hooks
  6705. // on incorrect children. Instead we push them into a queue which will
  6706. // be processed after the whole patch process ended.
  6707. queueActivatedComponent(componentInstance);
  6708. } else {
  6709. activateChildComponent(componentInstance, true /* direct */);
  6710. }
  6711. }
  6712. },
  6713. destroy: function destroy (vnode) {
  6714. var componentInstance = vnode.componentInstance;
  6715. if (!componentInstance._isDestroyed) {
  6716. if (!vnode.data.keepAlive) {
  6717. componentInstance.$destroy();
  6718. } else {
  6719. deactivateChildComponent(componentInstance, true /* direct */);
  6720. }
  6721. }
  6722. }
  6723. };
  6724. var hooksToMerge = Object.keys(componentVNodeHooks);
  6725. function createComponent (
  6726. Ctor,
  6727. data,
  6728. context,
  6729. children,
  6730. tag
  6731. ) {
  6732. if (isUndef(Ctor)) {
  6733. return
  6734. }
  6735. var baseCtor = context.$options._base;
  6736. // plain options object: turn it into a constructor
  6737. if (isObject(Ctor)) {
  6738. Ctor = baseCtor.extend(Ctor);
  6739. }
  6740. // if at this stage it's not a constructor or an async component factory,
  6741. // reject.
  6742. if (typeof Ctor !== 'function') {
  6743. if (true) {
  6744. warn(("Invalid Component definition: " + (String(Ctor))), context);
  6745. }
  6746. return
  6747. }
  6748. // async component
  6749. var asyncFactory;
  6750. if (isUndef(Ctor.cid)) {
  6751. asyncFactory = Ctor;
  6752. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  6753. if (Ctor === undefined) {
  6754. // return a placeholder node for async component, which is rendered
  6755. // as a comment node but preserves all the raw information for the node.
  6756. // the information will be used for async server-rendering and hydration.
  6757. return createAsyncPlaceholder(
  6758. asyncFactory,
  6759. data,
  6760. context,
  6761. children,
  6762. tag
  6763. )
  6764. }
  6765. }
  6766. data = data || {};
  6767. // resolve constructor options in case global mixins are applied after
  6768. // component constructor creation
  6769. resolveConstructorOptions(Ctor);
  6770. // transform component v-model data into props & events
  6771. if (isDef(data.model)) {
  6772. transformModel(Ctor.options, data);
  6773. }
  6774. // extract props
  6775. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  6776. // functional component
  6777. if (isTrue(Ctor.options.functional)) {
  6778. return createFunctionalComponent(Ctor, propsData, data, context, children)
  6779. }
  6780. // extract listeners, since these needs to be treated as
  6781. // child component listeners instead of DOM listeners
  6782. var listeners = data.on;
  6783. // replace with listeners with .native modifier
  6784. // so it gets processed during parent component patch.
  6785. data.on = data.nativeOn;
  6786. if (isTrue(Ctor.options.abstract)) {
  6787. // abstract components do not keep anything
  6788. // other than props & listeners & slot
  6789. // work around flow
  6790. var slot = data.slot;
  6791. data = {};
  6792. if (slot) {
  6793. data.slot = slot;
  6794. }
  6795. }
  6796. // install component management hooks onto the placeholder node
  6797. installComponentHooks(data);
  6798. // return a placeholder vnode
  6799. var name = Ctor.options.name || tag;
  6800. var vnode = new VNode(
  6801. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  6802. data, undefined, undefined, undefined, context,
  6803. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  6804. asyncFactory
  6805. );
  6806. return vnode
  6807. }
  6808. function createComponentInstanceForVnode (
  6809. vnode, // we know it's MountedComponentVNode but flow doesn't
  6810. parent // activeInstance in lifecycle state
  6811. ) {
  6812. var options = {
  6813. _isComponent: true,
  6814. _parentVnode: vnode,
  6815. parent: parent
  6816. };
  6817. // check inline-template render functions
  6818. var inlineTemplate = vnode.data.inlineTemplate;
  6819. if (isDef(inlineTemplate)) {
  6820. options.render = inlineTemplate.render;
  6821. options.staticRenderFns = inlineTemplate.staticRenderFns;
  6822. }
  6823. return new vnode.componentOptions.Ctor(options)
  6824. }
  6825. function installComponentHooks (data) {
  6826. var hooks = data.hook || (data.hook = {});
  6827. for (var i = 0; i < hooksToMerge.length; i++) {
  6828. var key = hooksToMerge[i];
  6829. var existing = hooks[key];
  6830. var toMerge = componentVNodeHooks[key];
  6831. if (existing !== toMerge && !(existing && existing._merged)) {
  6832. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  6833. }
  6834. }
  6835. }
  6836. function mergeHook$1 (f1, f2) {
  6837. var merged = function (a, b) {
  6838. // flow complains about extra args which is why we use any
  6839. f1(a, b);
  6840. f2(a, b);
  6841. };
  6842. merged._merged = true;
  6843. return merged
  6844. }
  6845. // transform component v-model info (value and callback) into
  6846. // prop and event handler respectively.
  6847. function transformModel (options, data) {
  6848. var prop = (options.model && options.model.prop) || 'value';
  6849. var event = (options.model && options.model.event) || 'input'
  6850. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  6851. var on = data.on || (data.on = {});
  6852. var existing = on[event];
  6853. var callback = data.model.callback;
  6854. if (isDef(existing)) {
  6855. if (
  6856. Array.isArray(existing)
  6857. ? existing.indexOf(callback) === -1
  6858. : existing !== callback
  6859. ) {
  6860. on[event] = [callback].concat(existing);
  6861. }
  6862. } else {
  6863. on[event] = callback;
  6864. }
  6865. }
  6866. /* */
  6867. var SIMPLE_NORMALIZE = 1;
  6868. var ALWAYS_NORMALIZE = 2;
  6869. // wrapper function for providing a more flexible interface
  6870. // without getting yelled at by flow
  6871. function createElement (
  6872. context,
  6873. tag,
  6874. data,
  6875. children,
  6876. normalizationType,
  6877. alwaysNormalize
  6878. ) {
  6879. if (Array.isArray(data) || isPrimitive(data)) {
  6880. normalizationType = children;
  6881. children = data;
  6882. data = undefined;
  6883. }
  6884. if (isTrue(alwaysNormalize)) {
  6885. normalizationType = ALWAYS_NORMALIZE;
  6886. }
  6887. return _createElement(context, tag, data, children, normalizationType)
  6888. }
  6889. function _createElement (
  6890. context,
  6891. tag,
  6892. data,
  6893. children,
  6894. normalizationType
  6895. ) {
  6896. if (isDef(data) && isDef((data).__ob__)) {
  6897. true && warn(
  6898. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  6899. 'Always create fresh vnode data objects in each render!',
  6900. context
  6901. );
  6902. return createEmptyVNode()
  6903. }
  6904. // object syntax in v-bind
  6905. if (isDef(data) && isDef(data.is)) {
  6906. tag = data.is;
  6907. }
  6908. if (!tag) {
  6909. // in case of component :is set to falsy value
  6910. return createEmptyVNode()
  6911. }
  6912. // warn against non-primitive key
  6913. if ( true &&
  6914. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  6915. ) {
  6916. {
  6917. warn(
  6918. 'Avoid using non-primitive value as key, ' +
  6919. 'use string/number value instead.',
  6920. context
  6921. );
  6922. }
  6923. }
  6924. // support single function children as default scoped slot
  6925. if (Array.isArray(children) &&
  6926. typeof children[0] === 'function'
  6927. ) {
  6928. data = data || {};
  6929. data.scopedSlots = { default: children[0] };
  6930. children.length = 0;
  6931. }
  6932. if (normalizationType === ALWAYS_NORMALIZE) {
  6933. children = normalizeChildren(children);
  6934. } else if (normalizationType === SIMPLE_NORMALIZE) {
  6935. children = simpleNormalizeChildren(children);
  6936. }
  6937. var vnode, ns;
  6938. if (typeof tag === 'string') {
  6939. var Ctor;
  6940. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  6941. if (config.isReservedTag(tag)) {
  6942. // platform built-in elements
  6943. if ( true && isDef(data) && isDef(data.nativeOn)) {
  6944. warn(
  6945. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  6946. context
  6947. );
  6948. }
  6949. vnode = new VNode(
  6950. config.parsePlatformTagName(tag), data, children,
  6951. undefined, undefined, context
  6952. );
  6953. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  6954. // component
  6955. vnode = createComponent(Ctor, data, context, children, tag);
  6956. } else {
  6957. // unknown or unlisted namespaced elements
  6958. // check at runtime because it may get assigned a namespace when its
  6959. // parent normalizes children
  6960. vnode = new VNode(
  6961. tag, data, children,
  6962. undefined, undefined, context
  6963. );
  6964. }
  6965. } else {
  6966. // direct component options / constructor
  6967. vnode = createComponent(tag, data, context, children);
  6968. }
  6969. if (Array.isArray(vnode)) {
  6970. return vnode
  6971. } else if (isDef(vnode)) {
  6972. if (isDef(ns)) { applyNS(vnode, ns); }
  6973. if (isDef(data)) { registerDeepBindings(data); }
  6974. return vnode
  6975. } else {
  6976. return createEmptyVNode()
  6977. }
  6978. }
  6979. function applyNS (vnode, ns, force) {
  6980. vnode.ns = ns;
  6981. if (vnode.tag === 'foreignObject') {
  6982. // use default namespace inside foreignObject
  6983. ns = undefined;
  6984. force = true;
  6985. }
  6986. if (isDef(vnode.children)) {
  6987. for (var i = 0, l = vnode.children.length; i < l; i++) {
  6988. var child = vnode.children[i];
  6989. if (isDef(child.tag) && (
  6990. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  6991. applyNS(child, ns, force);
  6992. }
  6993. }
  6994. }
  6995. }
  6996. // ref #5318
  6997. // necessary to ensure parent re-render when deep bindings like :style and
  6998. // :class are used on slot nodes
  6999. function registerDeepBindings (data) {
  7000. if (isObject(data.style)) {
  7001. traverse(data.style);
  7002. }
  7003. if (isObject(data.class)) {
  7004. traverse(data.class);
  7005. }
  7006. }
  7007. /* */
  7008. function initRender (vm) {
  7009. vm._vnode = null; // the root of the child tree
  7010. vm._staticTrees = null; // v-once cached trees
  7011. var options = vm.$options;
  7012. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  7013. var renderContext = parentVnode && parentVnode.context;
  7014. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  7015. vm.$scopedSlots = emptyObject;
  7016. // bind the createElement fn to this instance
  7017. // so that we get proper render context inside it.
  7018. // args order: tag, data, children, normalizationType, alwaysNormalize
  7019. // internal version is used by render functions compiled from templates
  7020. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  7021. // normalization is always applied for the public version, used in
  7022. // user-written render functions.
  7023. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  7024. // $attrs & $listeners are exposed for easier HOC creation.
  7025. // they need to be reactive so that HOCs using them are always updated
  7026. var parentData = parentVnode && parentVnode.data;
  7027. /* istanbul ignore else */
  7028. if (true) {
  7029. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  7030. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  7031. }, true);
  7032. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  7033. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  7034. }, true);
  7035. } else {}
  7036. }
  7037. var currentRenderingInstance = null;
  7038. function renderMixin (Vue) {
  7039. // install runtime convenience helpers
  7040. installRenderHelpers(Vue.prototype);
  7041. Vue.prototype.$nextTick = function (fn) {
  7042. return nextTick(fn, this)
  7043. };
  7044. Vue.prototype._render = function () {
  7045. var vm = this;
  7046. var ref = vm.$options;
  7047. var render = ref.render;
  7048. var _parentVnode = ref._parentVnode;
  7049. if (_parentVnode) {
  7050. vm.$scopedSlots = normalizeScopedSlots(
  7051. _parentVnode.data.scopedSlots,
  7052. vm.$slots,
  7053. vm.$scopedSlots
  7054. );
  7055. }
  7056. // set parent vnode. this allows render functions to have access
  7057. // to the data on the placeholder node.
  7058. vm.$vnode = _parentVnode;
  7059. // render self
  7060. var vnode;
  7061. try {
  7062. // There's no need to maintain a stack because all render fns are called
  7063. // separately from one another. Nested component's render fns are called
  7064. // when parent component is patched.
  7065. currentRenderingInstance = vm;
  7066. vnode = render.call(vm._renderProxy, vm.$createElement);
  7067. } catch (e) {
  7068. handleError(e, vm, "render");
  7069. // return error render result,
  7070. // or previous vnode to prevent render error causing blank component
  7071. /* istanbul ignore else */
  7072. if ( true && vm.$options.renderError) {
  7073. try {
  7074. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  7075. } catch (e) {
  7076. handleError(e, vm, "renderError");
  7077. vnode = vm._vnode;
  7078. }
  7079. } else {
  7080. vnode = vm._vnode;
  7081. }
  7082. } finally {
  7083. currentRenderingInstance = null;
  7084. }
  7085. // if the returned array contains only a single node, allow it
  7086. if (Array.isArray(vnode) && vnode.length === 1) {
  7087. vnode = vnode[0];
  7088. }
  7089. // return empty vnode in case the render function errored out
  7090. if (!(vnode instanceof VNode)) {
  7091. if ( true && Array.isArray(vnode)) {
  7092. warn(
  7093. 'Multiple root nodes returned from render function. Render function ' +
  7094. 'should return a single root node.',
  7095. vm
  7096. );
  7097. }
  7098. vnode = createEmptyVNode();
  7099. }
  7100. // set parent
  7101. vnode.parent = _parentVnode;
  7102. return vnode
  7103. };
  7104. }
  7105. /* */
  7106. function ensureCtor (comp, base) {
  7107. if (
  7108. comp.__esModule ||
  7109. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  7110. ) {
  7111. comp = comp.default;
  7112. }
  7113. return isObject(comp)
  7114. ? base.extend(comp)
  7115. : comp
  7116. }
  7117. function createAsyncPlaceholder (
  7118. factory,
  7119. data,
  7120. context,
  7121. children,
  7122. tag
  7123. ) {
  7124. var node = createEmptyVNode();
  7125. node.asyncFactory = factory;
  7126. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  7127. return node
  7128. }
  7129. function resolveAsyncComponent (
  7130. factory,
  7131. baseCtor
  7132. ) {
  7133. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  7134. return factory.errorComp
  7135. }
  7136. if (isDef(factory.resolved)) {
  7137. return factory.resolved
  7138. }
  7139. var owner = currentRenderingInstance;
  7140. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  7141. // already pending
  7142. factory.owners.push(owner);
  7143. }
  7144. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  7145. return factory.loadingComp
  7146. }
  7147. if (owner && !isDef(factory.owners)) {
  7148. var owners = factory.owners = [owner];
  7149. var sync = true;
  7150. var timerLoading = null;
  7151. var timerTimeout = null
  7152. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  7153. var forceRender = function (renderCompleted) {
  7154. for (var i = 0, l = owners.length; i < l; i++) {
  7155. (owners[i]).$forceUpdate();
  7156. }
  7157. if (renderCompleted) {
  7158. owners.length = 0;
  7159. if (timerLoading !== null) {
  7160. clearTimeout(timerLoading);
  7161. timerLoading = null;
  7162. }
  7163. if (timerTimeout !== null) {
  7164. clearTimeout(timerTimeout);
  7165. timerTimeout = null;
  7166. }
  7167. }
  7168. };
  7169. var resolve = once(function (res) {
  7170. // cache resolved
  7171. factory.resolved = ensureCtor(res, baseCtor);
  7172. // invoke callbacks only if this is not a synchronous resolve
  7173. // (async resolves are shimmed as synchronous during SSR)
  7174. if (!sync) {
  7175. forceRender(true);
  7176. } else {
  7177. owners.length = 0;
  7178. }
  7179. });
  7180. var reject = once(function (reason) {
  7181. true && warn(
  7182. "Failed to resolve async component: " + (String(factory)) +
  7183. (reason ? ("\nReason: " + reason) : '')
  7184. );
  7185. if (isDef(factory.errorComp)) {
  7186. factory.error = true;
  7187. forceRender(true);
  7188. }
  7189. });
  7190. var res = factory(resolve, reject);
  7191. if (isObject(res)) {
  7192. if (isPromise(res)) {
  7193. // () => Promise
  7194. if (isUndef(factory.resolved)) {
  7195. res.then(resolve, reject);
  7196. }
  7197. } else if (isPromise(res.component)) {
  7198. res.component.then(resolve, reject);
  7199. if (isDef(res.error)) {
  7200. factory.errorComp = ensureCtor(res.error, baseCtor);
  7201. }
  7202. if (isDef(res.loading)) {
  7203. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  7204. if (res.delay === 0) {
  7205. factory.loading = true;
  7206. } else {
  7207. timerLoading = setTimeout(function () {
  7208. timerLoading = null;
  7209. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  7210. factory.loading = true;
  7211. forceRender(false);
  7212. }
  7213. }, res.delay || 200);
  7214. }
  7215. }
  7216. if (isDef(res.timeout)) {
  7217. timerTimeout = setTimeout(function () {
  7218. timerTimeout = null;
  7219. if (isUndef(factory.resolved)) {
  7220. reject(
  7221. true
  7222. ? ("timeout (" + (res.timeout) + "ms)")
  7223. : undefined
  7224. );
  7225. }
  7226. }, res.timeout);
  7227. }
  7228. }
  7229. }
  7230. sync = false;
  7231. // return in case resolved synchronously
  7232. return factory.loading
  7233. ? factory.loadingComp
  7234. : factory.resolved
  7235. }
  7236. }
  7237. /* */
  7238. function isAsyncPlaceholder (node) {
  7239. return node.isComment && node.asyncFactory
  7240. }
  7241. /* */
  7242. function getFirstComponentChild (children) {
  7243. if (Array.isArray(children)) {
  7244. for (var i = 0; i < children.length; i++) {
  7245. var c = children[i];
  7246. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  7247. return c
  7248. }
  7249. }
  7250. }
  7251. }
  7252. /* */
  7253. /* */
  7254. function initEvents (vm) {
  7255. vm._events = Object.create(null);
  7256. vm._hasHookEvent = false;
  7257. // init parent attached events
  7258. var listeners = vm.$options._parentListeners;
  7259. if (listeners) {
  7260. updateComponentListeners(vm, listeners);
  7261. }
  7262. }
  7263. var target;
  7264. function add (event, fn) {
  7265. target.$on(event, fn);
  7266. }
  7267. function remove$1 (event, fn) {
  7268. target.$off(event, fn);
  7269. }
  7270. function createOnceHandler (event, fn) {
  7271. var _target = target;
  7272. return function onceHandler () {
  7273. var res = fn.apply(null, arguments);
  7274. if (res !== null) {
  7275. _target.$off(event, onceHandler);
  7276. }
  7277. }
  7278. }
  7279. function updateComponentListeners (
  7280. vm,
  7281. listeners,
  7282. oldListeners
  7283. ) {
  7284. target = vm;
  7285. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  7286. target = undefined;
  7287. }
  7288. function eventsMixin (Vue) {
  7289. var hookRE = /^hook:/;
  7290. Vue.prototype.$on = function (event, fn) {
  7291. var vm = this;
  7292. if (Array.isArray(event)) {
  7293. for (var i = 0, l = event.length; i < l; i++) {
  7294. vm.$on(event[i], fn);
  7295. }
  7296. } else {
  7297. (vm._events[event] || (vm._events[event] = [])).push(fn);
  7298. // optimize hook:event cost by using a boolean flag marked at registration
  7299. // instead of a hash lookup
  7300. if (hookRE.test(event)) {
  7301. vm._hasHookEvent = true;
  7302. }
  7303. }
  7304. return vm
  7305. };
  7306. Vue.prototype.$once = function (event, fn) {
  7307. var vm = this;
  7308. function on () {
  7309. vm.$off(event, on);
  7310. fn.apply(vm, arguments);
  7311. }
  7312. on.fn = fn;
  7313. vm.$on(event, on);
  7314. return vm
  7315. };
  7316. Vue.prototype.$off = function (event, fn) {
  7317. var vm = this;
  7318. // all
  7319. if (!arguments.length) {
  7320. vm._events = Object.create(null);
  7321. return vm
  7322. }
  7323. // array of events
  7324. if (Array.isArray(event)) {
  7325. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  7326. vm.$off(event[i$1], fn);
  7327. }
  7328. return vm
  7329. }
  7330. // specific event
  7331. var cbs = vm._events[event];
  7332. if (!cbs) {
  7333. return vm
  7334. }
  7335. if (!fn) {
  7336. vm._events[event] = null;
  7337. return vm
  7338. }
  7339. // specific handler
  7340. var cb;
  7341. var i = cbs.length;
  7342. while (i--) {
  7343. cb = cbs[i];
  7344. if (cb === fn || cb.fn === fn) {
  7345. cbs.splice(i, 1);
  7346. break
  7347. }
  7348. }
  7349. return vm
  7350. };
  7351. Vue.prototype.$emit = function (event) {
  7352. var vm = this;
  7353. if (true) {
  7354. var lowerCaseEvent = event.toLowerCase();
  7355. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  7356. tip(
  7357. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  7358. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  7359. "Note that HTML attributes are case-insensitive and you cannot use " +
  7360. "v-on to listen to camelCase events when using in-DOM templates. " +
  7361. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  7362. );
  7363. }
  7364. }
  7365. var cbs = vm._events[event];
  7366. if (cbs) {
  7367. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  7368. var args = toArray(arguments, 1);
  7369. var info = "event handler for \"" + event + "\"";
  7370. for (var i = 0, l = cbs.length; i < l; i++) {
  7371. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  7372. }
  7373. }
  7374. return vm
  7375. };
  7376. }
  7377. /* */
  7378. var activeInstance = null;
  7379. var isUpdatingChildComponent = false;
  7380. function setActiveInstance(vm) {
  7381. var prevActiveInstance = activeInstance;
  7382. activeInstance = vm;
  7383. return function () {
  7384. activeInstance = prevActiveInstance;
  7385. }
  7386. }
  7387. function initLifecycle (vm) {
  7388. var options = vm.$options;
  7389. // locate first non-abstract parent
  7390. var parent = options.parent;
  7391. if (parent && !options.abstract) {
  7392. while (parent.$options.abstract && parent.$parent) {
  7393. parent = parent.$parent;
  7394. }
  7395. parent.$children.push(vm);
  7396. }
  7397. vm.$parent = parent;
  7398. vm.$root = parent ? parent.$root : vm;
  7399. vm.$children = [];
  7400. vm.$refs = {};
  7401. vm._watcher = null;
  7402. vm._inactive = null;
  7403. vm._directInactive = false;
  7404. vm._isMounted = false;
  7405. vm._isDestroyed = false;
  7406. vm._isBeingDestroyed = false;
  7407. }
  7408. function lifecycleMixin (Vue) {
  7409. Vue.prototype._update = function (vnode, hydrating) {
  7410. var vm = this;
  7411. var prevEl = vm.$el;
  7412. var prevVnode = vm._vnode;
  7413. var restoreActiveInstance = setActiveInstance(vm);
  7414. vm._vnode = vnode;
  7415. // Vue.prototype.__patch__ is injected in entry points
  7416. // based on the rendering backend used.
  7417. if (!prevVnode) {
  7418. // initial render
  7419. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  7420. } else {
  7421. // updates
  7422. vm.$el = vm.__patch__(prevVnode, vnode);
  7423. }
  7424. restoreActiveInstance();
  7425. // update __vue__ reference
  7426. if (prevEl) {
  7427. prevEl.__vue__ = null;
  7428. }
  7429. if (vm.$el) {
  7430. vm.$el.__vue__ = vm;
  7431. }
  7432. // if parent is an HOC, update its $el as well
  7433. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  7434. vm.$parent.$el = vm.$el;
  7435. }
  7436. // updated hook is called by the scheduler to ensure that children are
  7437. // updated in a parent's updated hook.
  7438. };
  7439. Vue.prototype.$forceUpdate = function () {
  7440. var vm = this;
  7441. if (vm._watcher) {
  7442. vm._watcher.update();
  7443. }
  7444. };
  7445. Vue.prototype.$destroy = function () {
  7446. var vm = this;
  7447. if (vm._isBeingDestroyed) {
  7448. return
  7449. }
  7450. callHook(vm, 'beforeDestroy');
  7451. vm._isBeingDestroyed = true;
  7452. // remove self from parent
  7453. var parent = vm.$parent;
  7454. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  7455. remove(parent.$children, vm);
  7456. }
  7457. // teardown watchers
  7458. if (vm._watcher) {
  7459. vm._watcher.teardown();
  7460. }
  7461. var i = vm._watchers.length;
  7462. while (i--) {
  7463. vm._watchers[i].teardown();
  7464. }
  7465. // remove reference from data ob
  7466. // frozen object may not have observer.
  7467. if (vm._data.__ob__) {
  7468. vm._data.__ob__.vmCount--;
  7469. }
  7470. // call the last hook...
  7471. vm._isDestroyed = true;
  7472. // invoke destroy hooks on current rendered tree
  7473. vm.__patch__(vm._vnode, null);
  7474. // fire destroyed hook
  7475. callHook(vm, 'destroyed');
  7476. // turn off all instance listeners.
  7477. vm.$off();
  7478. // remove __vue__ reference
  7479. if (vm.$el) {
  7480. vm.$el.__vue__ = null;
  7481. }
  7482. // release circular reference (#6759)
  7483. if (vm.$vnode) {
  7484. vm.$vnode.parent = null;
  7485. }
  7486. };
  7487. }
  7488. function updateChildComponent (
  7489. vm,
  7490. propsData,
  7491. listeners,
  7492. parentVnode,
  7493. renderChildren
  7494. ) {
  7495. if (true) {
  7496. isUpdatingChildComponent = true;
  7497. }
  7498. // determine whether component has slot children
  7499. // we need to do this before overwriting $options._renderChildren.
  7500. // check if there are dynamic scopedSlots (hand-written or compiled but with
  7501. // dynamic slot names). Static scoped slots compiled from template has the
  7502. // "$stable" marker.
  7503. var newScopedSlots = parentVnode.data.scopedSlots;
  7504. var oldScopedSlots = vm.$scopedSlots;
  7505. var hasDynamicScopedSlot = !!(
  7506. (newScopedSlots && !newScopedSlots.$stable) ||
  7507. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  7508. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  7509. );
  7510. // Any static slot children from the parent may have changed during parent's
  7511. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  7512. // update is necessary to ensure correctness.
  7513. var needsForceUpdate = !!(
  7514. renderChildren || // has new static slots
  7515. vm.$options._renderChildren || // has old static slots
  7516. hasDynamicScopedSlot
  7517. );
  7518. vm.$options._parentVnode = parentVnode;
  7519. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  7520. if (vm._vnode) { // update child tree's parent
  7521. vm._vnode.parent = parentVnode;
  7522. }
  7523. vm.$options._renderChildren = renderChildren;
  7524. // update $attrs and $listeners hash
  7525. // these are also reactive so they may trigger child update if the child
  7526. // used them during render
  7527. vm.$attrs = parentVnode.data.attrs || emptyObject;
  7528. vm.$listeners = listeners || emptyObject;
  7529. // update props
  7530. if (propsData && vm.$options.props) {
  7531. toggleObserving(false);
  7532. var props = vm._props;
  7533. var propKeys = vm.$options._propKeys || [];
  7534. for (var i = 0; i < propKeys.length; i++) {
  7535. var key = propKeys[i];
  7536. var propOptions = vm.$options.props; // wtf flow?
  7537. props[key] = validateProp(key, propOptions, propsData, vm);
  7538. }
  7539. toggleObserving(true);
  7540. // keep a copy of raw propsData
  7541. vm.$options.propsData = propsData;
  7542. }
  7543. // fixed by xxxxxx update properties(mp runtime)
  7544. vm._$updateProperties && vm._$updateProperties(vm);
  7545. // update listeners
  7546. listeners = listeners || emptyObject;
  7547. var oldListeners = vm.$options._parentListeners;
  7548. vm.$options._parentListeners = listeners;
  7549. updateComponentListeners(vm, listeners, oldListeners);
  7550. // resolve slots + force update if has children
  7551. if (needsForceUpdate) {
  7552. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  7553. vm.$forceUpdate();
  7554. }
  7555. if (true) {
  7556. isUpdatingChildComponent = false;
  7557. }
  7558. }
  7559. function isInInactiveTree (vm) {
  7560. while (vm && (vm = vm.$parent)) {
  7561. if (vm._inactive) { return true }
  7562. }
  7563. return false
  7564. }
  7565. function activateChildComponent (vm, direct) {
  7566. if (direct) {
  7567. vm._directInactive = false;
  7568. if (isInInactiveTree(vm)) {
  7569. return
  7570. }
  7571. } else if (vm._directInactive) {
  7572. return
  7573. }
  7574. if (vm._inactive || vm._inactive === null) {
  7575. vm._inactive = false;
  7576. for (var i = 0; i < vm.$children.length; i++) {
  7577. activateChildComponent(vm.$children[i]);
  7578. }
  7579. callHook(vm, 'activated');
  7580. }
  7581. }
  7582. function deactivateChildComponent (vm, direct) {
  7583. if (direct) {
  7584. vm._directInactive = true;
  7585. if (isInInactiveTree(vm)) {
  7586. return
  7587. }
  7588. }
  7589. if (!vm._inactive) {
  7590. vm._inactive = true;
  7591. for (var i = 0; i < vm.$children.length; i++) {
  7592. deactivateChildComponent(vm.$children[i]);
  7593. }
  7594. callHook(vm, 'deactivated');
  7595. }
  7596. }
  7597. function callHook (vm, hook) {
  7598. // #7573 disable dep collection when invoking lifecycle hooks
  7599. pushTarget();
  7600. var handlers = vm.$options[hook];
  7601. var info = hook + " hook";
  7602. if (handlers) {
  7603. for (var i = 0, j = handlers.length; i < j; i++) {
  7604. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  7605. }
  7606. }
  7607. if (vm._hasHookEvent) {
  7608. vm.$emit('hook:' + hook);
  7609. }
  7610. popTarget();
  7611. }
  7612. /* */
  7613. var MAX_UPDATE_COUNT = 100;
  7614. var queue = [];
  7615. var activatedChildren = [];
  7616. var has = {};
  7617. var circular = {};
  7618. var waiting = false;
  7619. var flushing = false;
  7620. var index = 0;
  7621. /**
  7622. * Reset the scheduler's state.
  7623. */
  7624. function resetSchedulerState () {
  7625. index = queue.length = activatedChildren.length = 0;
  7626. has = {};
  7627. if (true) {
  7628. circular = {};
  7629. }
  7630. waiting = flushing = false;
  7631. }
  7632. // Async edge case #6566 requires saving the timestamp when event listeners are
  7633. // attached. However, calling performance.now() has a perf overhead especially
  7634. // if the page has thousands of event listeners. Instead, we take a timestamp
  7635. // every time the scheduler flushes and use that for all event listeners
  7636. // attached during that flush.
  7637. var currentFlushTimestamp = 0;
  7638. // Async edge case fix requires storing an event listener's attach timestamp.
  7639. var getNow = Date.now;
  7640. // Determine what event timestamp the browser is using. Annoyingly, the
  7641. // timestamp can either be hi-res (relative to page load) or low-res
  7642. // (relative to UNIX epoch), so in order to compare time we have to use the
  7643. // same timestamp type when saving the flush timestamp.
  7644. // All IE versions use low-res event timestamps, and have problematic clock
  7645. // implementations (#9632)
  7646. if (inBrowser && !isIE) {
  7647. var performance = window.performance;
  7648. if (
  7649. performance &&
  7650. typeof performance.now === 'function' &&
  7651. getNow() > document.createEvent('Event').timeStamp
  7652. ) {
  7653. // if the event timestamp, although evaluated AFTER the Date.now(), is
  7654. // smaller than it, it means the event is using a hi-res timestamp,
  7655. // and we need to use the hi-res version for event listener timestamps as
  7656. // well.
  7657. getNow = function () { return performance.now(); };
  7658. }
  7659. }
  7660. /**
  7661. * Flush both queues and run the watchers.
  7662. */
  7663. function flushSchedulerQueue () {
  7664. currentFlushTimestamp = getNow();
  7665. flushing = true;
  7666. var watcher, id;
  7667. // Sort queue before flush.
  7668. // This ensures that:
  7669. // 1. Components are updated from parent to child. (because parent is always
  7670. // created before the child)
  7671. // 2. A component's user watchers are run before its render watcher (because
  7672. // user watchers are created before the render watcher)
  7673. // 3. If a component is destroyed during a parent component's watcher run,
  7674. // its watchers can be skipped.
  7675. queue.sort(function (a, b) { return a.id - b.id; });
  7676. // do not cache length because more watchers might be pushed
  7677. // as we run existing watchers
  7678. for (index = 0; index < queue.length; index++) {
  7679. watcher = queue[index];
  7680. if (watcher.before) {
  7681. watcher.before();
  7682. }
  7683. id = watcher.id;
  7684. has[id] = null;
  7685. watcher.run();
  7686. // in dev build, check and stop circular updates.
  7687. if ( true && has[id] != null) {
  7688. circular[id] = (circular[id] || 0) + 1;
  7689. if (circular[id] > MAX_UPDATE_COUNT) {
  7690. warn(
  7691. 'You may have an infinite update loop ' + (
  7692. watcher.user
  7693. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  7694. : "in a component render function."
  7695. ),
  7696. watcher.vm
  7697. );
  7698. break
  7699. }
  7700. }
  7701. }
  7702. // keep copies of post queues before resetting state
  7703. var activatedQueue = activatedChildren.slice();
  7704. var updatedQueue = queue.slice();
  7705. resetSchedulerState();
  7706. // call component updated and activated hooks
  7707. callActivatedHooks(activatedQueue);
  7708. callUpdatedHooks(updatedQueue);
  7709. // devtool hook
  7710. /* istanbul ignore if */
  7711. if (devtools && config.devtools) {
  7712. devtools.emit('flush');
  7713. }
  7714. }
  7715. function callUpdatedHooks (queue) {
  7716. var i = queue.length;
  7717. while (i--) {
  7718. var watcher = queue[i];
  7719. var vm = watcher.vm;
  7720. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  7721. callHook(vm, 'updated');
  7722. }
  7723. }
  7724. }
  7725. /**
  7726. * Queue a kept-alive component that was activated during patch.
  7727. * The queue will be processed after the entire tree has been patched.
  7728. */
  7729. function queueActivatedComponent (vm) {
  7730. // setting _inactive to false here so that a render function can
  7731. // rely on checking whether it's in an inactive tree (e.g. router-view)
  7732. vm._inactive = false;
  7733. activatedChildren.push(vm);
  7734. }
  7735. function callActivatedHooks (queue) {
  7736. for (var i = 0; i < queue.length; i++) {
  7737. queue[i]._inactive = true;
  7738. activateChildComponent(queue[i], true /* true */);
  7739. }
  7740. }
  7741. /**
  7742. * Push a watcher into the watcher queue.
  7743. * Jobs with duplicate IDs will be skipped unless it's
  7744. * pushed when the queue is being flushed.
  7745. */
  7746. function queueWatcher (watcher) {
  7747. var id = watcher.id;
  7748. if (has[id] == null) {
  7749. has[id] = true;
  7750. if (!flushing) {
  7751. queue.push(watcher);
  7752. } else {
  7753. // if already flushing, splice the watcher based on its id
  7754. // if already past its id, it will be run next immediately.
  7755. var i = queue.length - 1;
  7756. while (i > index && queue[i].id > watcher.id) {
  7757. i--;
  7758. }
  7759. queue.splice(i + 1, 0, watcher);
  7760. }
  7761. // queue the flush
  7762. if (!waiting) {
  7763. waiting = true;
  7764. if ( true && !config.async) {
  7765. flushSchedulerQueue();
  7766. return
  7767. }
  7768. nextTick(flushSchedulerQueue);
  7769. }
  7770. }
  7771. }
  7772. /* */
  7773. var uid$2 = 0;
  7774. /**
  7775. * A watcher parses an expression, collects dependencies,
  7776. * and fires callback when the expression value changes.
  7777. * This is used for both the $watch() api and directives.
  7778. */
  7779. var Watcher = function Watcher (
  7780. vm,
  7781. expOrFn,
  7782. cb,
  7783. options,
  7784. isRenderWatcher
  7785. ) {
  7786. this.vm = vm;
  7787. if (isRenderWatcher) {
  7788. vm._watcher = this;
  7789. }
  7790. vm._watchers.push(this);
  7791. // options
  7792. if (options) {
  7793. this.deep = !!options.deep;
  7794. this.user = !!options.user;
  7795. this.lazy = !!options.lazy;
  7796. this.sync = !!options.sync;
  7797. this.before = options.before;
  7798. } else {
  7799. this.deep = this.user = this.lazy = this.sync = false;
  7800. }
  7801. this.cb = cb;
  7802. this.id = ++uid$2; // uid for batching
  7803. this.active = true;
  7804. this.dirty = this.lazy; // for lazy watchers
  7805. this.deps = [];
  7806. this.newDeps = [];
  7807. this.depIds = new _Set();
  7808. this.newDepIds = new _Set();
  7809. this.expression = true
  7810. ? expOrFn.toString()
  7811. : undefined;
  7812. // parse expression for getter
  7813. if (typeof expOrFn === 'function') {
  7814. this.getter = expOrFn;
  7815. } else {
  7816. this.getter = parsePath(expOrFn);
  7817. if (!this.getter) {
  7818. this.getter = noop;
  7819. true && warn(
  7820. "Failed watching path: \"" + expOrFn + "\" " +
  7821. 'Watcher only accepts simple dot-delimited paths. ' +
  7822. 'For full control, use a function instead.',
  7823. vm
  7824. );
  7825. }
  7826. }
  7827. this.value = this.lazy
  7828. ? undefined
  7829. : this.get();
  7830. };
  7831. /**
  7832. * Evaluate the getter, and re-collect dependencies.
  7833. */
  7834. Watcher.prototype.get = function get () {
  7835. pushTarget(this);
  7836. var value;
  7837. var vm = this.vm;
  7838. try {
  7839. value = this.getter.call(vm, vm);
  7840. } catch (e) {
  7841. if (this.user) {
  7842. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  7843. } else {
  7844. throw e
  7845. }
  7846. } finally {
  7847. // "touch" every property so they are all tracked as
  7848. // dependencies for deep watching
  7849. if (this.deep) {
  7850. traverse(value);
  7851. }
  7852. popTarget();
  7853. this.cleanupDeps();
  7854. }
  7855. return value
  7856. };
  7857. /**
  7858. * Add a dependency to this directive.
  7859. */
  7860. Watcher.prototype.addDep = function addDep (dep) {
  7861. var id = dep.id;
  7862. if (!this.newDepIds.has(id)) {
  7863. this.newDepIds.add(id);
  7864. this.newDeps.push(dep);
  7865. if (!this.depIds.has(id)) {
  7866. dep.addSub(this);
  7867. }
  7868. }
  7869. };
  7870. /**
  7871. * Clean up for dependency collection.
  7872. */
  7873. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  7874. var i = this.deps.length;
  7875. while (i--) {
  7876. var dep = this.deps[i];
  7877. if (!this.newDepIds.has(dep.id)) {
  7878. dep.removeSub(this);
  7879. }
  7880. }
  7881. var tmp = this.depIds;
  7882. this.depIds = this.newDepIds;
  7883. this.newDepIds = tmp;
  7884. this.newDepIds.clear();
  7885. tmp = this.deps;
  7886. this.deps = this.newDeps;
  7887. this.newDeps = tmp;
  7888. this.newDeps.length = 0;
  7889. };
  7890. /**
  7891. * Subscriber interface.
  7892. * Will be called when a dependency changes.
  7893. */
  7894. Watcher.prototype.update = function update () {
  7895. /* istanbul ignore else */
  7896. if (this.lazy) {
  7897. this.dirty = true;
  7898. } else if (this.sync) {
  7899. this.run();
  7900. } else {
  7901. queueWatcher(this);
  7902. }
  7903. };
  7904. /**
  7905. * Scheduler job interface.
  7906. * Will be called by the scheduler.
  7907. */
  7908. Watcher.prototype.run = function run () {
  7909. if (this.active) {
  7910. var value = this.get();
  7911. if (
  7912. value !== this.value ||
  7913. // Deep watchers and watchers on Object/Arrays should fire even
  7914. // when the value is the same, because the value may
  7915. // have mutated.
  7916. isObject(value) ||
  7917. this.deep
  7918. ) {
  7919. // set new value
  7920. var oldValue = this.value;
  7921. this.value = value;
  7922. if (this.user) {
  7923. try {
  7924. this.cb.call(this.vm, value, oldValue);
  7925. } catch (e) {
  7926. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  7927. }
  7928. } else {
  7929. this.cb.call(this.vm, value, oldValue);
  7930. }
  7931. }
  7932. }
  7933. };
  7934. /**
  7935. * Evaluate the value of the watcher.
  7936. * This only gets called for lazy watchers.
  7937. */
  7938. Watcher.prototype.evaluate = function evaluate () {
  7939. this.value = this.get();
  7940. this.dirty = false;
  7941. };
  7942. /**
  7943. * Depend on all deps collected by this watcher.
  7944. */
  7945. Watcher.prototype.depend = function depend () {
  7946. var i = this.deps.length;
  7947. while (i--) {
  7948. this.deps[i].depend();
  7949. }
  7950. };
  7951. /**
  7952. * Remove self from all dependencies' subscriber list.
  7953. */
  7954. Watcher.prototype.teardown = function teardown () {
  7955. if (this.active) {
  7956. // remove self from vm's watcher list
  7957. // this is a somewhat expensive operation so we skip it
  7958. // if the vm is being destroyed.
  7959. if (!this.vm._isBeingDestroyed) {
  7960. remove(this.vm._watchers, this);
  7961. }
  7962. var i = this.deps.length;
  7963. while (i--) {
  7964. this.deps[i].removeSub(this);
  7965. }
  7966. this.active = false;
  7967. }
  7968. };
  7969. /* */
  7970. var sharedPropertyDefinition = {
  7971. enumerable: true,
  7972. configurable: true,
  7973. get: noop,
  7974. set: noop
  7975. };
  7976. function proxy (target, sourceKey, key) {
  7977. sharedPropertyDefinition.get = function proxyGetter () {
  7978. return this[sourceKey][key]
  7979. };
  7980. sharedPropertyDefinition.set = function proxySetter (val) {
  7981. this[sourceKey][key] = val;
  7982. };
  7983. Object.defineProperty(target, key, sharedPropertyDefinition);
  7984. }
  7985. function initState (vm) {
  7986. vm._watchers = [];
  7987. var opts = vm.$options;
  7988. if (opts.props) { initProps(vm, opts.props); }
  7989. if (opts.methods) { initMethods(vm, opts.methods); }
  7990. if (opts.data) {
  7991. initData(vm);
  7992. } else {
  7993. observe(vm._data = {}, true /* asRootData */);
  7994. }
  7995. if (opts.computed) { initComputed(vm, opts.computed); }
  7996. if (opts.watch && opts.watch !== nativeWatch) {
  7997. initWatch(vm, opts.watch);
  7998. }
  7999. }
  8000. function initProps (vm, propsOptions) {
  8001. var propsData = vm.$options.propsData || {};
  8002. var props = vm._props = {};
  8003. // cache prop keys so that future props updates can iterate using Array
  8004. // instead of dynamic object key enumeration.
  8005. var keys = vm.$options._propKeys = [];
  8006. var isRoot = !vm.$parent;
  8007. // root instance props should be converted
  8008. if (!isRoot) {
  8009. toggleObserving(false);
  8010. }
  8011. var loop = function ( key ) {
  8012. keys.push(key);
  8013. var value = validateProp(key, propsOptions, propsData, vm);
  8014. /* istanbul ignore else */
  8015. if (true) {
  8016. var hyphenatedKey = hyphenate(key);
  8017. if (isReservedAttribute(hyphenatedKey) ||
  8018. config.isReservedAttr(hyphenatedKey)) {
  8019. warn(
  8020. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  8021. vm
  8022. );
  8023. }
  8024. defineReactive$$1(props, key, value, function () {
  8025. if (!isRoot && !isUpdatingChildComponent) {
  8026. {
  8027. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  8028. return
  8029. }
  8030. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  8031. if(
  8032. key === 'value' &&
  8033. Array.isArray(vm.$options.behaviors) &&
  8034. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8035. ){
  8036. return
  8037. }
  8038. if(vm._getFormData){
  8039. return
  8040. }
  8041. var $parent = vm.$parent;
  8042. while($parent){
  8043. if($parent.__next_tick_pending){
  8044. return
  8045. }
  8046. $parent = $parent.$parent;
  8047. }
  8048. }
  8049. warn(
  8050. "Avoid mutating a prop directly since the value will be " +
  8051. "overwritten whenever the parent component re-renders. " +
  8052. "Instead, use a data or computed property based on the prop's " +
  8053. "value. Prop being mutated: \"" + key + "\"",
  8054. vm
  8055. );
  8056. }
  8057. });
  8058. } else {}
  8059. // static props are already proxied on the component's prototype
  8060. // during Vue.extend(). We only need to proxy props defined at
  8061. // instantiation here.
  8062. if (!(key in vm)) {
  8063. proxy(vm, "_props", key);
  8064. }
  8065. };
  8066. for (var key in propsOptions) loop( key );
  8067. toggleObserving(true);
  8068. }
  8069. function initData (vm) {
  8070. var data = vm.$options.data;
  8071. data = vm._data = typeof data === 'function'
  8072. ? getData(data, vm)
  8073. : data || {};
  8074. if (!isPlainObject(data)) {
  8075. data = {};
  8076. true && warn(
  8077. 'data functions should return an object:\n' +
  8078. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  8079. vm
  8080. );
  8081. }
  8082. // proxy data on instance
  8083. var keys = Object.keys(data);
  8084. var props = vm.$options.props;
  8085. var methods = vm.$options.methods;
  8086. var i = keys.length;
  8087. while (i--) {
  8088. var key = keys[i];
  8089. if (true) {
  8090. if (methods && hasOwn(methods, key)) {
  8091. warn(
  8092. ("Method \"" + key + "\" has already been defined as a data property."),
  8093. vm
  8094. );
  8095. }
  8096. }
  8097. if (props && hasOwn(props, key)) {
  8098. true && warn(
  8099. "The data property \"" + key + "\" is already declared as a prop. " +
  8100. "Use prop default value instead.",
  8101. vm
  8102. );
  8103. } else if (!isReserved(key)) {
  8104. proxy(vm, "_data", key);
  8105. }
  8106. }
  8107. // observe data
  8108. observe(data, true /* asRootData */);
  8109. }
  8110. function getData (data, vm) {
  8111. // #7573 disable dep collection when invoking data getters
  8112. pushTarget();
  8113. try {
  8114. return data.call(vm, vm)
  8115. } catch (e) {
  8116. handleError(e, vm, "data()");
  8117. return {}
  8118. } finally {
  8119. popTarget();
  8120. }
  8121. }
  8122. var computedWatcherOptions = { lazy: true };
  8123. function initComputed (vm, computed) {
  8124. // $flow-disable-line
  8125. var watchers = vm._computedWatchers = Object.create(null);
  8126. // computed properties are just getters during SSR
  8127. var isSSR = isServerRendering();
  8128. for (var key in computed) {
  8129. var userDef = computed[key];
  8130. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  8131. if ( true && getter == null) {
  8132. warn(
  8133. ("Getter is missing for computed property \"" + key + "\"."),
  8134. vm
  8135. );
  8136. }
  8137. if (!isSSR) {
  8138. // create internal watcher for the computed property.
  8139. watchers[key] = new Watcher(
  8140. vm,
  8141. getter || noop,
  8142. noop,
  8143. computedWatcherOptions
  8144. );
  8145. }
  8146. // component-defined computed properties are already defined on the
  8147. // component prototype. We only need to define computed properties defined
  8148. // at instantiation here.
  8149. if (!(key in vm)) {
  8150. defineComputed(vm, key, userDef);
  8151. } else if (true) {
  8152. if (key in vm.$data) {
  8153. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  8154. } else if (vm.$options.props && key in vm.$options.props) {
  8155. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  8156. }
  8157. }
  8158. }
  8159. }
  8160. function defineComputed (
  8161. target,
  8162. key,
  8163. userDef
  8164. ) {
  8165. var shouldCache = !isServerRendering();
  8166. if (typeof userDef === 'function') {
  8167. sharedPropertyDefinition.get = shouldCache
  8168. ? createComputedGetter(key)
  8169. : createGetterInvoker(userDef);
  8170. sharedPropertyDefinition.set = noop;
  8171. } else {
  8172. sharedPropertyDefinition.get = userDef.get
  8173. ? shouldCache && userDef.cache !== false
  8174. ? createComputedGetter(key)
  8175. : createGetterInvoker(userDef.get)
  8176. : noop;
  8177. sharedPropertyDefinition.set = userDef.set || noop;
  8178. }
  8179. if ( true &&
  8180. sharedPropertyDefinition.set === noop) {
  8181. sharedPropertyDefinition.set = function () {
  8182. warn(
  8183. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  8184. this
  8185. );
  8186. };
  8187. }
  8188. Object.defineProperty(target, key, sharedPropertyDefinition);
  8189. }
  8190. function createComputedGetter (key) {
  8191. return function computedGetter () {
  8192. var watcher = this._computedWatchers && this._computedWatchers[key];
  8193. if (watcher) {
  8194. if (watcher.dirty) {
  8195. watcher.evaluate();
  8196. }
  8197. if (Dep.SharedObject.target) {// fixed by xxxxxx
  8198. watcher.depend();
  8199. }
  8200. return watcher.value
  8201. }
  8202. }
  8203. }
  8204. function createGetterInvoker(fn) {
  8205. return function computedGetter () {
  8206. return fn.call(this, this)
  8207. }
  8208. }
  8209. function initMethods (vm, methods) {
  8210. var props = vm.$options.props;
  8211. for (var key in methods) {
  8212. if (true) {
  8213. if (typeof methods[key] !== 'function') {
  8214. warn(
  8215. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  8216. "Did you reference the function correctly?",
  8217. vm
  8218. );
  8219. }
  8220. if (props && hasOwn(props, key)) {
  8221. warn(
  8222. ("Method \"" + key + "\" has already been defined as a prop."),
  8223. vm
  8224. );
  8225. }
  8226. if ((key in vm) && isReserved(key)) {
  8227. warn(
  8228. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  8229. "Avoid defining component methods that start with _ or $."
  8230. );
  8231. }
  8232. }
  8233. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  8234. }
  8235. }
  8236. function initWatch (vm, watch) {
  8237. for (var key in watch) {
  8238. var handler = watch[key];
  8239. if (Array.isArray(handler)) {
  8240. for (var i = 0; i < handler.length; i++) {
  8241. createWatcher(vm, key, handler[i]);
  8242. }
  8243. } else {
  8244. createWatcher(vm, key, handler);
  8245. }
  8246. }
  8247. }
  8248. function createWatcher (
  8249. vm,
  8250. expOrFn,
  8251. handler,
  8252. options
  8253. ) {
  8254. if (isPlainObject(handler)) {
  8255. options = handler;
  8256. handler = handler.handler;
  8257. }
  8258. if (typeof handler === 'string') {
  8259. handler = vm[handler];
  8260. }
  8261. return vm.$watch(expOrFn, handler, options)
  8262. }
  8263. function stateMixin (Vue) {
  8264. // flow somehow has problems with directly declared definition object
  8265. // when using Object.defineProperty, so we have to procedurally build up
  8266. // the object here.
  8267. var dataDef = {};
  8268. dataDef.get = function () { return this._data };
  8269. var propsDef = {};
  8270. propsDef.get = function () { return this._props };
  8271. if (true) {
  8272. dataDef.set = function () {
  8273. warn(
  8274. 'Avoid replacing instance root $data. ' +
  8275. 'Use nested data properties instead.',
  8276. this
  8277. );
  8278. };
  8279. propsDef.set = function () {
  8280. warn("$props is readonly.", this);
  8281. };
  8282. }
  8283. Object.defineProperty(Vue.prototype, '$data', dataDef);
  8284. Object.defineProperty(Vue.prototype, '$props', propsDef);
  8285. Vue.prototype.$set = set;
  8286. Vue.prototype.$delete = del;
  8287. Vue.prototype.$watch = function (
  8288. expOrFn,
  8289. cb,
  8290. options
  8291. ) {
  8292. var vm = this;
  8293. if (isPlainObject(cb)) {
  8294. return createWatcher(vm, expOrFn, cb, options)
  8295. }
  8296. options = options || {};
  8297. options.user = true;
  8298. var watcher = new Watcher(vm, expOrFn, cb, options);
  8299. if (options.immediate) {
  8300. try {
  8301. cb.call(vm, watcher.value);
  8302. } catch (error) {
  8303. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  8304. }
  8305. }
  8306. return function unwatchFn () {
  8307. watcher.teardown();
  8308. }
  8309. };
  8310. }
  8311. /* */
  8312. var uid$3 = 0;
  8313. function initMixin (Vue) {
  8314. Vue.prototype._init = function (options) {
  8315. var vm = this;
  8316. // a uid
  8317. vm._uid = uid$3++;
  8318. var startTag, endTag;
  8319. /* istanbul ignore if */
  8320. if ( true && config.performance && mark) {
  8321. startTag = "vue-perf-start:" + (vm._uid);
  8322. endTag = "vue-perf-end:" + (vm._uid);
  8323. mark(startTag);
  8324. }
  8325. // a flag to avoid this being observed
  8326. vm._isVue = true;
  8327. // merge options
  8328. if (options && options._isComponent) {
  8329. // optimize internal component instantiation
  8330. // since dynamic options merging is pretty slow, and none of the
  8331. // internal component options needs special treatment.
  8332. initInternalComponent(vm, options);
  8333. } else {
  8334. vm.$options = mergeOptions(
  8335. resolveConstructorOptions(vm.constructor),
  8336. options || {},
  8337. vm
  8338. );
  8339. }
  8340. /* istanbul ignore else */
  8341. if (true) {
  8342. initProxy(vm);
  8343. } else {}
  8344. // expose real self
  8345. vm._self = vm;
  8346. initLifecycle(vm);
  8347. initEvents(vm);
  8348. initRender(vm);
  8349. callHook(vm, 'beforeCreate');
  8350. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  8351. initState(vm);
  8352. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  8353. !vm._$fallback && callHook(vm, 'created');
  8354. /* istanbul ignore if */
  8355. if ( true && config.performance && mark) {
  8356. vm._name = formatComponentName(vm, false);
  8357. mark(endTag);
  8358. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  8359. }
  8360. if (vm.$options.el) {
  8361. vm.$mount(vm.$options.el);
  8362. }
  8363. };
  8364. }
  8365. function initInternalComponent (vm, options) {
  8366. var opts = vm.$options = Object.create(vm.constructor.options);
  8367. // doing this because it's faster than dynamic enumeration.
  8368. var parentVnode = options._parentVnode;
  8369. opts.parent = options.parent;
  8370. opts._parentVnode = parentVnode;
  8371. var vnodeComponentOptions = parentVnode.componentOptions;
  8372. opts.propsData = vnodeComponentOptions.propsData;
  8373. opts._parentListeners = vnodeComponentOptions.listeners;
  8374. opts._renderChildren = vnodeComponentOptions.children;
  8375. opts._componentTag = vnodeComponentOptions.tag;
  8376. if (options.render) {
  8377. opts.render = options.render;
  8378. opts.staticRenderFns = options.staticRenderFns;
  8379. }
  8380. }
  8381. function resolveConstructorOptions (Ctor) {
  8382. var options = Ctor.options;
  8383. if (Ctor.super) {
  8384. var superOptions = resolveConstructorOptions(Ctor.super);
  8385. var cachedSuperOptions = Ctor.superOptions;
  8386. if (superOptions !== cachedSuperOptions) {
  8387. // super option changed,
  8388. // need to resolve new options.
  8389. Ctor.superOptions = superOptions;
  8390. // check if there are any late-modified/attached options (#4976)
  8391. var modifiedOptions = resolveModifiedOptions(Ctor);
  8392. // update base extend options
  8393. if (modifiedOptions) {
  8394. extend(Ctor.extendOptions, modifiedOptions);
  8395. }
  8396. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  8397. if (options.name) {
  8398. options.components[options.name] = Ctor;
  8399. }
  8400. }
  8401. }
  8402. return options
  8403. }
  8404. function resolveModifiedOptions (Ctor) {
  8405. var modified;
  8406. var latest = Ctor.options;
  8407. var sealed = Ctor.sealedOptions;
  8408. for (var key in latest) {
  8409. if (latest[key] !== sealed[key]) {
  8410. if (!modified) { modified = {}; }
  8411. modified[key] = latest[key];
  8412. }
  8413. }
  8414. return modified
  8415. }
  8416. function Vue (options) {
  8417. if ( true &&
  8418. !(this instanceof Vue)
  8419. ) {
  8420. warn('Vue is a constructor and should be called with the `new` keyword');
  8421. }
  8422. this._init(options);
  8423. }
  8424. initMixin(Vue);
  8425. stateMixin(Vue);
  8426. eventsMixin(Vue);
  8427. lifecycleMixin(Vue);
  8428. renderMixin(Vue);
  8429. /* */
  8430. function initUse (Vue) {
  8431. Vue.use = function (plugin) {
  8432. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  8433. if (installedPlugins.indexOf(plugin) > -1) {
  8434. return this
  8435. }
  8436. // additional parameters
  8437. var args = toArray(arguments, 1);
  8438. args.unshift(this);
  8439. if (typeof plugin.install === 'function') {
  8440. plugin.install.apply(plugin, args);
  8441. } else if (typeof plugin === 'function') {
  8442. plugin.apply(null, args);
  8443. }
  8444. installedPlugins.push(plugin);
  8445. return this
  8446. };
  8447. }
  8448. /* */
  8449. function initMixin$1 (Vue) {
  8450. Vue.mixin = function (mixin) {
  8451. this.options = mergeOptions(this.options, mixin);
  8452. return this
  8453. };
  8454. }
  8455. /* */
  8456. function initExtend (Vue) {
  8457. /**
  8458. * Each instance constructor, including Vue, has a unique
  8459. * cid. This enables us to create wrapped "child
  8460. * constructors" for prototypal inheritance and cache them.
  8461. */
  8462. Vue.cid = 0;
  8463. var cid = 1;
  8464. /**
  8465. * Class inheritance
  8466. */
  8467. Vue.extend = function (extendOptions) {
  8468. extendOptions = extendOptions || {};
  8469. var Super = this;
  8470. var SuperId = Super.cid;
  8471. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  8472. if (cachedCtors[SuperId]) {
  8473. return cachedCtors[SuperId]
  8474. }
  8475. var name = extendOptions.name || Super.options.name;
  8476. if ( true && name) {
  8477. validateComponentName(name);
  8478. }
  8479. var Sub = function VueComponent (options) {
  8480. this._init(options);
  8481. };
  8482. Sub.prototype = Object.create(Super.prototype);
  8483. Sub.prototype.constructor = Sub;
  8484. Sub.cid = cid++;
  8485. Sub.options = mergeOptions(
  8486. Super.options,
  8487. extendOptions
  8488. );
  8489. Sub['super'] = Super;
  8490. // For props and computed properties, we define the proxy getters on
  8491. // the Vue instances at extension time, on the extended prototype. This
  8492. // avoids Object.defineProperty calls for each instance created.
  8493. if (Sub.options.props) {
  8494. initProps$1(Sub);
  8495. }
  8496. if (Sub.options.computed) {
  8497. initComputed$1(Sub);
  8498. }
  8499. // allow further extension/mixin/plugin usage
  8500. Sub.extend = Super.extend;
  8501. Sub.mixin = Super.mixin;
  8502. Sub.use = Super.use;
  8503. // create asset registers, so extended classes
  8504. // can have their private assets too.
  8505. ASSET_TYPES.forEach(function (type) {
  8506. Sub[type] = Super[type];
  8507. });
  8508. // enable recursive self-lookup
  8509. if (name) {
  8510. Sub.options.components[name] = Sub;
  8511. }
  8512. // keep a reference to the super options at extension time.
  8513. // later at instantiation we can check if Super's options have
  8514. // been updated.
  8515. Sub.superOptions = Super.options;
  8516. Sub.extendOptions = extendOptions;
  8517. Sub.sealedOptions = extend({}, Sub.options);
  8518. // cache constructor
  8519. cachedCtors[SuperId] = Sub;
  8520. return Sub
  8521. };
  8522. }
  8523. function initProps$1 (Comp) {
  8524. var props = Comp.options.props;
  8525. for (var key in props) {
  8526. proxy(Comp.prototype, "_props", key);
  8527. }
  8528. }
  8529. function initComputed$1 (Comp) {
  8530. var computed = Comp.options.computed;
  8531. for (var key in computed) {
  8532. defineComputed(Comp.prototype, key, computed[key]);
  8533. }
  8534. }
  8535. /* */
  8536. function initAssetRegisters (Vue) {
  8537. /**
  8538. * Create asset registration methods.
  8539. */
  8540. ASSET_TYPES.forEach(function (type) {
  8541. Vue[type] = function (
  8542. id,
  8543. definition
  8544. ) {
  8545. if (!definition) {
  8546. return this.options[type + 's'][id]
  8547. } else {
  8548. /* istanbul ignore if */
  8549. if ( true && type === 'component') {
  8550. validateComponentName(id);
  8551. }
  8552. if (type === 'component' && isPlainObject(definition)) {
  8553. definition.name = definition.name || id;
  8554. definition = this.options._base.extend(definition);
  8555. }
  8556. if (type === 'directive' && typeof definition === 'function') {
  8557. definition = { bind: definition, update: definition };
  8558. }
  8559. this.options[type + 's'][id] = definition;
  8560. return definition
  8561. }
  8562. };
  8563. });
  8564. }
  8565. /* */
  8566. function getComponentName (opts) {
  8567. return opts && (opts.Ctor.options.name || opts.tag)
  8568. }
  8569. function matches (pattern, name) {
  8570. if (Array.isArray(pattern)) {
  8571. return pattern.indexOf(name) > -1
  8572. } else if (typeof pattern === 'string') {
  8573. return pattern.split(',').indexOf(name) > -1
  8574. } else if (isRegExp(pattern)) {
  8575. return pattern.test(name)
  8576. }
  8577. /* istanbul ignore next */
  8578. return false
  8579. }
  8580. function pruneCache (keepAliveInstance, filter) {
  8581. var cache = keepAliveInstance.cache;
  8582. var keys = keepAliveInstance.keys;
  8583. var _vnode = keepAliveInstance._vnode;
  8584. for (var key in cache) {
  8585. var cachedNode = cache[key];
  8586. if (cachedNode) {
  8587. var name = getComponentName(cachedNode.componentOptions);
  8588. if (name && !filter(name)) {
  8589. pruneCacheEntry(cache, key, keys, _vnode);
  8590. }
  8591. }
  8592. }
  8593. }
  8594. function pruneCacheEntry (
  8595. cache,
  8596. key,
  8597. keys,
  8598. current
  8599. ) {
  8600. var cached$$1 = cache[key];
  8601. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  8602. cached$$1.componentInstance.$destroy();
  8603. }
  8604. cache[key] = null;
  8605. remove(keys, key);
  8606. }
  8607. var patternTypes = [String, RegExp, Array];
  8608. var KeepAlive = {
  8609. name: 'keep-alive',
  8610. abstract: true,
  8611. props: {
  8612. include: patternTypes,
  8613. exclude: patternTypes,
  8614. max: [String, Number]
  8615. },
  8616. created: function created () {
  8617. this.cache = Object.create(null);
  8618. this.keys = [];
  8619. },
  8620. destroyed: function destroyed () {
  8621. for (var key in this.cache) {
  8622. pruneCacheEntry(this.cache, key, this.keys);
  8623. }
  8624. },
  8625. mounted: function mounted () {
  8626. var this$1 = this;
  8627. this.$watch('include', function (val) {
  8628. pruneCache(this$1, function (name) { return matches(val, name); });
  8629. });
  8630. this.$watch('exclude', function (val) {
  8631. pruneCache(this$1, function (name) { return !matches(val, name); });
  8632. });
  8633. },
  8634. render: function render () {
  8635. var slot = this.$slots.default;
  8636. var vnode = getFirstComponentChild(slot);
  8637. var componentOptions = vnode && vnode.componentOptions;
  8638. if (componentOptions) {
  8639. // check pattern
  8640. var name = getComponentName(componentOptions);
  8641. var ref = this;
  8642. var include = ref.include;
  8643. var exclude = ref.exclude;
  8644. if (
  8645. // not included
  8646. (include && (!name || !matches(include, name))) ||
  8647. // excluded
  8648. (exclude && name && matches(exclude, name))
  8649. ) {
  8650. return vnode
  8651. }
  8652. var ref$1 = this;
  8653. var cache = ref$1.cache;
  8654. var keys = ref$1.keys;
  8655. var key = vnode.key == null
  8656. // same constructor may get registered as different local components
  8657. // so cid alone is not enough (#3269)
  8658. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  8659. : vnode.key;
  8660. if (cache[key]) {
  8661. vnode.componentInstance = cache[key].componentInstance;
  8662. // make current key freshest
  8663. remove(keys, key);
  8664. keys.push(key);
  8665. } else {
  8666. cache[key] = vnode;
  8667. keys.push(key);
  8668. // prune oldest entry
  8669. if (this.max && keys.length > parseInt(this.max)) {
  8670. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  8671. }
  8672. }
  8673. vnode.data.keepAlive = true;
  8674. }
  8675. return vnode || (slot && slot[0])
  8676. }
  8677. };
  8678. var builtInComponents = {
  8679. KeepAlive: KeepAlive
  8680. };
  8681. /* */
  8682. function initGlobalAPI (Vue) {
  8683. // config
  8684. var configDef = {};
  8685. configDef.get = function () { return config; };
  8686. if (true) {
  8687. configDef.set = function () {
  8688. warn(
  8689. 'Do not replace the Vue.config object, set individual fields instead.'
  8690. );
  8691. };
  8692. }
  8693. Object.defineProperty(Vue, 'config', configDef);
  8694. // exposed util methods.
  8695. // NOTE: these are not considered part of the public API - avoid relying on
  8696. // them unless you are aware of the risk.
  8697. Vue.util = {
  8698. warn: warn,
  8699. extend: extend,
  8700. mergeOptions: mergeOptions,
  8701. defineReactive: defineReactive$$1
  8702. };
  8703. Vue.set = set;
  8704. Vue.delete = del;
  8705. Vue.nextTick = nextTick;
  8706. // 2.6 explicit observable API
  8707. Vue.observable = function (obj) {
  8708. observe(obj);
  8709. return obj
  8710. };
  8711. Vue.options = Object.create(null);
  8712. ASSET_TYPES.forEach(function (type) {
  8713. Vue.options[type + 's'] = Object.create(null);
  8714. });
  8715. // this is used to identify the "base" constructor to extend all plain-object
  8716. // components with in Weex's multi-instance scenarios.
  8717. Vue.options._base = Vue;
  8718. extend(Vue.options.components, builtInComponents);
  8719. initUse(Vue);
  8720. initMixin$1(Vue);
  8721. initExtend(Vue);
  8722. initAssetRegisters(Vue);
  8723. }
  8724. initGlobalAPI(Vue);
  8725. Object.defineProperty(Vue.prototype, '$isServer', {
  8726. get: isServerRendering
  8727. });
  8728. Object.defineProperty(Vue.prototype, '$ssrContext', {
  8729. get: function get () {
  8730. /* istanbul ignore next */
  8731. return this.$vnode && this.$vnode.ssrContext
  8732. }
  8733. });
  8734. // expose FunctionalRenderContext for ssr runtime helper installation
  8735. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  8736. value: FunctionalRenderContext
  8737. });
  8738. Vue.version = '2.6.11';
  8739. /**
  8740. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  8741. */
  8742. var ARRAYTYPE = '[object Array]';
  8743. var OBJECTTYPE = '[object Object]';
  8744. var NULLTYPE = '[object Null]';
  8745. var UNDEFINEDTYPE = '[object Undefined]';
  8746. // const FUNCTIONTYPE = '[object Function]'
  8747. function diff(current, pre) {
  8748. var result = {};
  8749. syncKeys(current, pre);
  8750. _diff(current, pre, '', result);
  8751. return result
  8752. }
  8753. function syncKeys(current, pre) {
  8754. if (current === pre) { return }
  8755. var rootCurrentType = type(current);
  8756. var rootPreType = type(pre);
  8757. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  8758. if(Object.keys(current).length >= Object.keys(pre).length){
  8759. for (var key in pre) {
  8760. var currentValue = current[key];
  8761. if (currentValue === undefined) {
  8762. current[key] = null;
  8763. } else {
  8764. syncKeys(currentValue, pre[key]);
  8765. }
  8766. }
  8767. }
  8768. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  8769. if (current.length >= pre.length) {
  8770. pre.forEach(function (item, index) {
  8771. syncKeys(current[index], item);
  8772. });
  8773. }
  8774. }
  8775. }
  8776. function nullOrUndefined(currentType, preType) {
  8777. if(
  8778. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  8779. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  8780. ) {
  8781. return false
  8782. }
  8783. return true
  8784. }
  8785. function _diff(current, pre, path, result) {
  8786. if (current === pre) { return }
  8787. var rootCurrentType = type(current);
  8788. var rootPreType = type(pre);
  8789. if (rootCurrentType == OBJECTTYPE) {
  8790. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  8791. setResult(result, path, current);
  8792. } else {
  8793. var loop = function ( key ) {
  8794. var currentValue = current[key];
  8795. var preValue = pre[key];
  8796. var currentType = type(currentValue);
  8797. var preType = type(preValue);
  8798. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  8799. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  8800. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8801. }
  8802. } else if (currentType == ARRAYTYPE) {
  8803. if (preType != ARRAYTYPE) {
  8804. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8805. } else {
  8806. if (currentValue.length < preValue.length) {
  8807. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8808. } else {
  8809. currentValue.forEach(function (item, index) {
  8810. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  8811. });
  8812. }
  8813. }
  8814. } else if (currentType == OBJECTTYPE) {
  8815. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  8816. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8817. } else {
  8818. for (var subKey in currentValue) {
  8819. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  8820. }
  8821. }
  8822. }
  8823. };
  8824. for (var key in current) loop( key );
  8825. }
  8826. } else if (rootCurrentType == ARRAYTYPE) {
  8827. if (rootPreType != ARRAYTYPE) {
  8828. setResult(result, path, current);
  8829. } else {
  8830. if (current.length < pre.length) {
  8831. setResult(result, path, current);
  8832. } else {
  8833. current.forEach(function (item, index) {
  8834. _diff(item, pre[index], path + '[' + index + ']', result);
  8835. });
  8836. }
  8837. }
  8838. } else {
  8839. setResult(result, path, current);
  8840. }
  8841. }
  8842. function setResult(result, k, v) {
  8843. // if (type(v) != FUNCTIONTYPE) {
  8844. result[k] = v;
  8845. // }
  8846. }
  8847. function type(obj) {
  8848. return Object.prototype.toString.call(obj)
  8849. }
  8850. /* */
  8851. function flushCallbacks$1(vm) {
  8852. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  8853. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8854. var mpInstance = vm.$scope;
  8855. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8856. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  8857. }
  8858. var copies = vm.__next_tick_callbacks.slice(0);
  8859. vm.__next_tick_callbacks.length = 0;
  8860. for (var i = 0; i < copies.length; i++) {
  8861. copies[i]();
  8862. }
  8863. }
  8864. }
  8865. function hasRenderWatcher(vm) {
  8866. return queue.find(function (watcher) { return vm._watcher === watcher; })
  8867. }
  8868. function nextTick$1(vm, cb) {
  8869. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  8870. //2.nextTick 之前存在 render watcher
  8871. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  8872. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  8873. var mpInstance = vm.$scope;
  8874. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8875. ']:nextVueTick');
  8876. }
  8877. return nextTick(cb, vm)
  8878. }else{
  8879. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  8880. var mpInstance$1 = vm.$scope;
  8881. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  8882. ']:nextMPTick');
  8883. }
  8884. }
  8885. var _resolve;
  8886. if (!vm.__next_tick_callbacks) {
  8887. vm.__next_tick_callbacks = [];
  8888. }
  8889. vm.__next_tick_callbacks.push(function () {
  8890. if (cb) {
  8891. try {
  8892. cb.call(vm);
  8893. } catch (e) {
  8894. handleError(e, vm, 'nextTick');
  8895. }
  8896. } else if (_resolve) {
  8897. _resolve(vm);
  8898. }
  8899. });
  8900. // $flow-disable-line
  8901. if (!cb && typeof Promise !== 'undefined') {
  8902. return new Promise(function (resolve) {
  8903. _resolve = resolve;
  8904. })
  8905. }
  8906. }
  8907. /* */
  8908. function clearInstance(key, value) {
  8909. // 简易去除 Vue 和小程序组件实例
  8910. if (value) {
  8911. if (value._isVue || value.__v_isMPComponent) {
  8912. return {}
  8913. }
  8914. }
  8915. return value
  8916. }
  8917. function cloneWithData(vm) {
  8918. // 确保当前 vm 所有数据被同步
  8919. var ret = Object.create(null);
  8920. var dataKeys = [].concat(
  8921. Object.keys(vm._data || {}),
  8922. Object.keys(vm._computedWatchers || {}));
  8923. dataKeys.reduce(function(ret, key) {
  8924. ret[key] = vm[key];
  8925. return ret
  8926. }, ret);
  8927. // vue-composition-api
  8928. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  8929. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  8930. if (rawBindings) {
  8931. Object.keys(rawBindings).forEach(function (key) {
  8932. ret[key] = vm[key];
  8933. });
  8934. }
  8935. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  8936. Object.assign(ret, vm.$mp.data || {});
  8937. if (
  8938. Array.isArray(vm.$options.behaviors) &&
  8939. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8940. ) { //form-field
  8941. ret['name'] = vm.name;
  8942. ret['value'] = vm.value;
  8943. }
  8944. return JSON.parse(JSON.stringify(ret, clearInstance))
  8945. }
  8946. var patch = function(oldVnode, vnode) {
  8947. var this$1 = this;
  8948. if (vnode === null) { //destroy
  8949. return
  8950. }
  8951. if (this.mpType === 'page' || this.mpType === 'component') {
  8952. var mpInstance = this.$scope;
  8953. var data = Object.create(null);
  8954. try {
  8955. data = cloneWithData(this);
  8956. } catch (err) {
  8957. console.error(err);
  8958. }
  8959. data.__webviewId__ = mpInstance.data.__webviewId__;
  8960. var mpData = Object.create(null);
  8961. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  8962. mpData[key] = mpInstance.data[key];
  8963. });
  8964. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  8965. if (Object.keys(diffData).length) {
  8966. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8967. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  8968. ']差量更新',
  8969. JSON.stringify(diffData));
  8970. }
  8971. this.__next_tick_pending = true;
  8972. mpInstance.setData(diffData, function () {
  8973. this$1.__next_tick_pending = false;
  8974. flushCallbacks$1(this$1);
  8975. });
  8976. } else {
  8977. flushCallbacks$1(this);
  8978. }
  8979. }
  8980. };
  8981. /* */
  8982. function createEmptyRender() {
  8983. }
  8984. function mountComponent$1(
  8985. vm,
  8986. el,
  8987. hydrating
  8988. ) {
  8989. if (!vm.mpType) {//main.js 中的 new Vue
  8990. return vm
  8991. }
  8992. if (vm.mpType === 'app') {
  8993. vm.$options.render = createEmptyRender;
  8994. }
  8995. if (!vm.$options.render) {
  8996. vm.$options.render = createEmptyRender;
  8997. if (true) {
  8998. /* istanbul ignore if */
  8999. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  9000. vm.$options.el || el) {
  9001. warn(
  9002. 'You are using the runtime-only build of Vue where the template ' +
  9003. 'compiler is not available. Either pre-compile the templates into ' +
  9004. 'render functions, or use the compiler-included build.',
  9005. vm
  9006. );
  9007. } else {
  9008. warn(
  9009. 'Failed to mount component: template or render function not defined.',
  9010. vm
  9011. );
  9012. }
  9013. }
  9014. }
  9015. !vm._$fallback && callHook(vm, 'beforeMount');
  9016. var updateComponent = function () {
  9017. vm._update(vm._render(), hydrating);
  9018. };
  9019. // we set this to vm._watcher inside the watcher's constructor
  9020. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  9021. // component's mounted hook), which relies on vm._watcher being already defined
  9022. new Watcher(vm, updateComponent, noop, {
  9023. before: function before() {
  9024. if (vm._isMounted && !vm._isDestroyed) {
  9025. callHook(vm, 'beforeUpdate');
  9026. }
  9027. }
  9028. }, true /* isRenderWatcher */);
  9029. hydrating = false;
  9030. return vm
  9031. }
  9032. /* */
  9033. function renderClass (
  9034. staticClass,
  9035. dynamicClass
  9036. ) {
  9037. if (isDef(staticClass) || isDef(dynamicClass)) {
  9038. return concat(staticClass, stringifyClass(dynamicClass))
  9039. }
  9040. /* istanbul ignore next */
  9041. return ''
  9042. }
  9043. function concat (a, b) {
  9044. return a ? b ? (a + ' ' + b) : a : (b || '')
  9045. }
  9046. function stringifyClass (value) {
  9047. if (Array.isArray(value)) {
  9048. return stringifyArray(value)
  9049. }
  9050. if (isObject(value)) {
  9051. return stringifyObject(value)
  9052. }
  9053. if (typeof value === 'string') {
  9054. return value
  9055. }
  9056. /* istanbul ignore next */
  9057. return ''
  9058. }
  9059. function stringifyArray (value) {
  9060. var res = '';
  9061. var stringified;
  9062. for (var i = 0, l = value.length; i < l; i++) {
  9063. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  9064. if (res) { res += ' '; }
  9065. res += stringified;
  9066. }
  9067. }
  9068. return res
  9069. }
  9070. function stringifyObject (value) {
  9071. var res = '';
  9072. for (var key in value) {
  9073. if (value[key]) {
  9074. if (res) { res += ' '; }
  9075. res += key;
  9076. }
  9077. }
  9078. return res
  9079. }
  9080. /* */
  9081. var parseStyleText = cached(function (cssText) {
  9082. var res = {};
  9083. var listDelimiter = /;(?![^(]*\))/g;
  9084. var propertyDelimiter = /:(.+)/;
  9085. cssText.split(listDelimiter).forEach(function (item) {
  9086. if (item) {
  9087. var tmp = item.split(propertyDelimiter);
  9088. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  9089. }
  9090. });
  9091. return res
  9092. });
  9093. // normalize possible array / string values into Object
  9094. function normalizeStyleBinding (bindingStyle) {
  9095. if (Array.isArray(bindingStyle)) {
  9096. return toObject(bindingStyle)
  9097. }
  9098. if (typeof bindingStyle === 'string') {
  9099. return parseStyleText(bindingStyle)
  9100. }
  9101. return bindingStyle
  9102. }
  9103. /* */
  9104. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  9105. function getTarget(obj, path) {
  9106. var parts = path.split('.');
  9107. var key = parts[0];
  9108. if (key.indexOf('__$n') === 0) { //number index
  9109. key = parseInt(key.replace('__$n', ''));
  9110. }
  9111. if (parts.length === 1) {
  9112. return obj[key]
  9113. }
  9114. return getTarget(obj[key], parts.slice(1).join('.'))
  9115. }
  9116. function internalMixin(Vue) {
  9117. Vue.config.errorHandler = function(err, vm, info) {
  9118. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  9119. console.error(err);
  9120. /* eslint-disable no-undef */
  9121. var app = typeof getApp === 'function' && getApp();
  9122. if (app && app.onError) {
  9123. app.onError(err);
  9124. }
  9125. };
  9126. var oldEmit = Vue.prototype.$emit;
  9127. Vue.prototype.$emit = function(event) {
  9128. if (this.$scope && event) {
  9129. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  9130. if (triggerEvent) {
  9131. try {
  9132. triggerEvent.call(this.$scope, event, {
  9133. __args__: toArray(arguments, 1)
  9134. });
  9135. } catch (error) {
  9136. }
  9137. }
  9138. }
  9139. return oldEmit.apply(this, arguments)
  9140. };
  9141. Vue.prototype.$nextTick = function(fn) {
  9142. return nextTick$1(this, fn)
  9143. };
  9144. MP_METHODS.forEach(function (method) {
  9145. Vue.prototype[method] = function(args) {
  9146. if (this.$scope && this.$scope[method]) {
  9147. return this.$scope[method](args)
  9148. }
  9149. // mp-alipay
  9150. if (typeof my === 'undefined') {
  9151. return
  9152. }
  9153. if (method === 'createSelectorQuery') {
  9154. /* eslint-disable no-undef */
  9155. return my.createSelectorQuery(args)
  9156. } else if (method === 'createIntersectionObserver') {
  9157. /* eslint-disable no-undef */
  9158. return my.createIntersectionObserver(args)
  9159. }
  9160. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  9161. };
  9162. });
  9163. Vue.prototype.__init_provide = initProvide;
  9164. Vue.prototype.__init_injections = initInjections;
  9165. Vue.prototype.__call_hook = function(hook, args) {
  9166. var vm = this;
  9167. // #7573 disable dep collection when invoking lifecycle hooks
  9168. pushTarget();
  9169. var handlers = vm.$options[hook];
  9170. var info = hook + " hook";
  9171. var ret;
  9172. if (handlers) {
  9173. for (var i = 0, j = handlers.length; i < j; i++) {
  9174. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  9175. }
  9176. }
  9177. if (vm._hasHookEvent) {
  9178. vm.$emit('hook:' + hook, args);
  9179. }
  9180. popTarget();
  9181. return ret
  9182. };
  9183. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  9184. if (Array.isArray(modifiers)) {
  9185. if (modifiers.indexOf('trim') !== -1) {
  9186. value = value.trim();
  9187. }
  9188. if (modifiers.indexOf('number') !== -1) {
  9189. value = this._n(value);
  9190. }
  9191. }
  9192. if (!target) {
  9193. target = this;
  9194. }
  9195. // 解决动态属性添加
  9196. Vue.set(target, key, value);
  9197. };
  9198. Vue.prototype.__set_sync = function(target, key, value) {
  9199. if (!target) {
  9200. target = this;
  9201. }
  9202. // 解决动态属性添加
  9203. Vue.set(target, key, value);
  9204. };
  9205. Vue.prototype.__get_orig = function(item) {
  9206. if (isPlainObject(item)) {
  9207. return item['$orig'] || item
  9208. }
  9209. return item
  9210. };
  9211. Vue.prototype.__get_value = function(dataPath, target) {
  9212. return getTarget(target || this, dataPath)
  9213. };
  9214. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  9215. return renderClass(staticClass, dynamicClass)
  9216. };
  9217. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  9218. if (!dynamicStyle && !staticStyle) {
  9219. return ''
  9220. }
  9221. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  9222. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  9223. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  9224. };
  9225. Vue.prototype.__map = function(val, iteratee) {
  9226. //TODO 暂不考虑 string
  9227. var ret, i, l, keys, key;
  9228. if (Array.isArray(val)) {
  9229. ret = new Array(val.length);
  9230. for (i = 0, l = val.length; i < l; i++) {
  9231. ret[i] = iteratee(val[i], i);
  9232. }
  9233. return ret
  9234. } else if (isObject(val)) {
  9235. keys = Object.keys(val);
  9236. ret = Object.create(null);
  9237. for (i = 0, l = keys.length; i < l; i++) {
  9238. key = keys[i];
  9239. ret[key] = iteratee(val[key], key, i);
  9240. }
  9241. return ret
  9242. } else if (typeof val === 'number') {
  9243. ret = new Array(val);
  9244. for (i = 0, l = val; i < l; i++) {
  9245. // 第一个参数暂时仍和小程序一致
  9246. ret[i] = iteratee(i, i);
  9247. }
  9248. return ret
  9249. }
  9250. return []
  9251. };
  9252. }
  9253. /* */
  9254. var LIFECYCLE_HOOKS$1 = [
  9255. //App
  9256. 'onLaunch',
  9257. 'onShow',
  9258. 'onHide',
  9259. 'onUniNViewMessage',
  9260. 'onPageNotFound',
  9261. 'onThemeChange',
  9262. 'onError',
  9263. 'onUnhandledRejection',
  9264. //Page
  9265. 'onInit',
  9266. 'onLoad',
  9267. // 'onShow',
  9268. 'onReady',
  9269. // 'onHide',
  9270. 'onUnload',
  9271. 'onPullDownRefresh',
  9272. 'onReachBottom',
  9273. 'onTabItemTap',
  9274. 'onAddToFavorites',
  9275. 'onShareTimeline',
  9276. 'onShareAppMessage',
  9277. 'onResize',
  9278. 'onPageScroll',
  9279. 'onNavigationBarButtonTap',
  9280. 'onBackPress',
  9281. 'onNavigationBarSearchInputChanged',
  9282. 'onNavigationBarSearchInputConfirmed',
  9283. 'onNavigationBarSearchInputClicked',
  9284. 'onUploadDouyinVideo',
  9285. 'onNFCReadMessage',
  9286. //Component
  9287. // 'onReady', // 兼容旧版本,应该移除该事件
  9288. 'onPageShow',
  9289. 'onPageHide',
  9290. 'onPageResize'
  9291. ];
  9292. function lifecycleMixin$1(Vue) {
  9293. //fixed vue-class-component
  9294. var oldExtend = Vue.extend;
  9295. Vue.extend = function(extendOptions) {
  9296. extendOptions = extendOptions || {};
  9297. var methods = extendOptions.methods;
  9298. if (methods) {
  9299. Object.keys(methods).forEach(function (methodName) {
  9300. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  9301. extendOptions[methodName] = methods[methodName];
  9302. delete methods[methodName];
  9303. }
  9304. });
  9305. }
  9306. return oldExtend.call(this, extendOptions)
  9307. };
  9308. var strategies = Vue.config.optionMergeStrategies;
  9309. var mergeHook = strategies.created;
  9310. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  9311. strategies[hook] = mergeHook;
  9312. });
  9313. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  9314. }
  9315. /* */
  9316. // install platform patch function
  9317. Vue.prototype.__patch__ = patch;
  9318. // public mount method
  9319. Vue.prototype.$mount = function(
  9320. el ,
  9321. hydrating
  9322. ) {
  9323. return mountComponent$1(this, el, hydrating)
  9324. };
  9325. lifecycleMixin$1(Vue);
  9326. internalMixin(Vue);
  9327. /* */
  9328. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  9329. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  9330. /***/ }),
  9331. /***/ 26:
  9332. /*!**************************************!*\
  9333. !*** E:/项目资料/智慧社区/Applet/pages.json ***!
  9334. \**************************************/
  9335. /*! no static exports found */
  9336. /***/ (function(module, exports) {
  9337. /***/ }),
  9338. /***/ 267:
  9339. /*!******************************************!*\
  9340. !*** E:/项目资料/智慧社区/Applet/api/recruit.js ***!
  9341. \******************************************/
  9342. /*! no static exports found */
  9343. /***/ (function(module, exports, __webpack_require__) {
  9344. "use strict";
  9345. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9346. Object.defineProperty(exports, "__esModule", {
  9347. value: true
  9348. });
  9349. exports.default = void 0;
  9350. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  9351. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  9352. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  9353. var getList = /*#__PURE__*/function () {
  9354. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
  9355. var res;
  9356. return _regenerator.default.wrap(function _callee$(_context) {
  9357. while (1) {
  9358. switch (_context.prev = _context.next) {
  9359. case 0:
  9360. _context.next = 2;
  9361. return _request.default.get({
  9362. url: "/recruit/list",
  9363. data: data
  9364. });
  9365. case 2:
  9366. res = _context.sent;
  9367. return _context.abrupt("return", res.data);
  9368. case 4:
  9369. case "end":
  9370. return _context.stop();
  9371. }
  9372. }
  9373. }, _callee);
  9374. }));
  9375. return function getList(_x) {
  9376. return _ref.apply(this, arguments);
  9377. };
  9378. }();
  9379. var getDetails = /*#__PURE__*/function () {
  9380. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref2) {
  9381. var id, res;
  9382. return _regenerator.default.wrap(function _callee2$(_context2) {
  9383. while (1) {
  9384. switch (_context2.prev = _context2.next) {
  9385. case 0:
  9386. id = _ref2.id;
  9387. _context2.next = 3;
  9388. return _request.default.get({
  9389. url: "/recruit/details/".concat(id)
  9390. });
  9391. case 3:
  9392. res = _context2.sent;
  9393. return _context2.abrupt("return", res.data);
  9394. case 5:
  9395. case "end":
  9396. return _context2.stop();
  9397. }
  9398. }
  9399. }, _callee2);
  9400. }));
  9401. return function getDetails(_x2) {
  9402. return _ref3.apply(this, arguments);
  9403. };
  9404. }();
  9405. var getStatus = /*#__PURE__*/function () {
  9406. var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(_ref4) {
  9407. var id, res;
  9408. return _regenerator.default.wrap(function _callee3$(_context3) {
  9409. while (1) {
  9410. switch (_context3.prev = _context3.next) {
  9411. case 0:
  9412. id = _ref4.id;
  9413. _context3.next = 3;
  9414. return _request.default.get({
  9415. url: "/recruit/status/".concat(id)
  9416. });
  9417. case 3:
  9418. res = _context3.sent;
  9419. return _context3.abrupt("return", res.data);
  9420. case 5:
  9421. case "end":
  9422. return _context3.stop();
  9423. }
  9424. }
  9425. }, _callee3);
  9426. }));
  9427. return function getStatus(_x3) {
  9428. return _ref5.apply(this, arguments);
  9429. };
  9430. }();
  9431. var report = /*#__PURE__*/function () {
  9432. var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(_ref6) {
  9433. var id, res;
  9434. return _regenerator.default.wrap(function _callee4$(_context4) {
  9435. while (1) {
  9436. switch (_context4.prev = _context4.next) {
  9437. case 0:
  9438. id = _ref6.id;
  9439. _context4.next = 3;
  9440. return _request.default.post({
  9441. url: "/recruit/report/".concat(id)
  9442. });
  9443. case 3:
  9444. res = _context4.sent;
  9445. return _context4.abrupt("return", res.data);
  9446. case 5:
  9447. case "end":
  9448. return _context4.stop();
  9449. }
  9450. }
  9451. }, _callee4);
  9452. }));
  9453. return function report(_x4) {
  9454. return _ref7.apply(this, arguments);
  9455. };
  9456. }();
  9457. var _default = {
  9458. getList: getList,
  9459. getDetails: getDetails,
  9460. getStatus: getStatus,
  9461. report: report
  9462. };
  9463. exports.default = _default;
  9464. /***/ }),
  9465. /***/ 284:
  9466. /*!******************************************!*\
  9467. !*** E:/项目资料/智慧社区/Applet/api/voucher.js ***!
  9468. \******************************************/
  9469. /*! no static exports found */
  9470. /***/ (function(module, exports, __webpack_require__) {
  9471. "use strict";
  9472. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9473. Object.defineProperty(exports, "__esModule", {
  9474. value: true
  9475. });
  9476. exports.default = void 0;
  9477. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  9478. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  9479. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  9480. var getList = /*#__PURE__*/function () {
  9481. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
  9482. var res;
  9483. return _regenerator.default.wrap(function _callee$(_context) {
  9484. while (1) {
  9485. switch (_context.prev = _context.next) {
  9486. case 0:
  9487. _context.next = 2;
  9488. return _request.default.get({
  9489. url: "/discount/info/list",
  9490. data: data
  9491. });
  9492. case 2:
  9493. res = _context.sent;
  9494. return _context.abrupt("return", res.data);
  9495. case 4:
  9496. case "end":
  9497. return _context.stop();
  9498. }
  9499. }
  9500. }, _callee);
  9501. }));
  9502. return function getList(_x) {
  9503. return _ref.apply(this, arguments);
  9504. };
  9505. }();
  9506. var getInfo = /*#__PURE__*/function () {
  9507. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(id) {
  9508. var res;
  9509. return _regenerator.default.wrap(function _callee2$(_context2) {
  9510. while (1) {
  9511. switch (_context2.prev = _context2.next) {
  9512. case 0:
  9513. _context2.next = 2;
  9514. return _request.default.get({
  9515. url: "/discount/info/".concat(id)
  9516. });
  9517. case 2:
  9518. res = _context2.sent;
  9519. return _context2.abrupt("return", res.data);
  9520. case 4:
  9521. case "end":
  9522. return _context2.stop();
  9523. }
  9524. }
  9525. }, _callee2);
  9526. }));
  9527. return function getInfo(_x2) {
  9528. return _ref2.apply(this, arguments);
  9529. };
  9530. }();
  9531. var receivevoucher = /*#__PURE__*/function () {
  9532. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(discountId) {
  9533. var res;
  9534. return _regenerator.default.wrap(function _callee3$(_context3) {
  9535. while (1) {
  9536. switch (_context3.prev = _context3.next) {
  9537. case 0:
  9538. _context3.next = 2;
  9539. return _request.default.post({
  9540. url: "/discount/receive/".concat(discountId)
  9541. });
  9542. case 2:
  9543. res = _context3.sent;
  9544. return _context3.abrupt("return", res.data);
  9545. case 4:
  9546. case "end":
  9547. return _context3.stop();
  9548. }
  9549. }
  9550. }, _callee3);
  9551. }));
  9552. return function receivevoucher(_x3) {
  9553. return _ref3.apply(this, arguments);
  9554. };
  9555. }();
  9556. var getMyList = /*#__PURE__*/function () {
  9557. var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(data) {
  9558. var res;
  9559. return _regenerator.default.wrap(function _callee4$(_context4) {
  9560. while (1) {
  9561. switch (_context4.prev = _context4.next) {
  9562. case 0:
  9563. _context4.next = 2;
  9564. return _request.default.get({
  9565. url: "/discount/record/list"
  9566. });
  9567. case 2:
  9568. res = _context4.sent;
  9569. return _context4.abrupt("return", res.data);
  9570. case 4:
  9571. case "end":
  9572. return _context4.stop();
  9573. }
  9574. }
  9575. }, _callee4);
  9576. }));
  9577. return function getMyList(_x4) {
  9578. return _ref4.apply(this, arguments);
  9579. };
  9580. }();
  9581. var getDict = /*#__PURE__*/function () {
  9582. var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(dictType) {
  9583. var res;
  9584. return _regenerator.default.wrap(function _callee5$(_context5) {
  9585. while (1) {
  9586. switch (_context5.prev = _context5.next) {
  9587. case 0:
  9588. _context5.next = 2;
  9589. return _request.default.get({
  9590. url: "/dict/data/type/".concat(dictType)
  9591. });
  9592. case 2:
  9593. res = _context5.sent;
  9594. return _context5.abrupt("return", res.data);
  9595. case 4:
  9596. case "end":
  9597. return _context5.stop();
  9598. }
  9599. }
  9600. }, _callee5);
  9601. }));
  9602. return function getDict(_x5) {
  9603. return _ref5.apply(this, arguments);
  9604. };
  9605. }();
  9606. var _default = {
  9607. getList: getList,
  9608. getInfo: getInfo,
  9609. receivevoucher: receivevoucher,
  9610. getMyList: getMyList,
  9611. getDict: getDict
  9612. };
  9613. exports.default = _default;
  9614. /***/ }),
  9615. /***/ 3:
  9616. /*!***********************************!*\
  9617. !*** (webpack)/buildin/global.js ***!
  9618. \***********************************/
  9619. /*! no static exports found */
  9620. /***/ (function(module, exports) {
  9621. var g;
  9622. // This works in non-strict mode
  9623. g = (function() {
  9624. return this;
  9625. })();
  9626. try {
  9627. // This works if eval is allowed (see CSP)
  9628. g = g || new Function("return this")();
  9629. } catch (e) {
  9630. // This works if the window reference is available
  9631. if (typeof window === "object") g = window;
  9632. }
  9633. // g can still be undefined, but nothing to do about it...
  9634. // We return undefined, instead of nothing here, so it's
  9635. // easier to handle this case. if(!global) { ...}
  9636. module.exports = g;
  9637. /***/ }),
  9638. /***/ 312:
  9639. /*!***************************************************************************************************!*\
  9640. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-transition/components/uni-transition/createAnimation.js ***!
  9641. \***************************************************************************************************/
  9642. /*! no static exports found */
  9643. /***/ (function(module, exports, __webpack_require__) {
  9644. "use strict";
  9645. /* WEBPACK VAR INJECTION */(function(uni) {
  9646. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9647. Object.defineProperty(exports, "__esModule", {
  9648. value: true
  9649. });
  9650. exports.createAnimation = createAnimation;
  9651. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  9652. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  9653. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  9654. 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; }
  9655. 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; }
  9656. // const defaultOption = {
  9657. // duration: 300,
  9658. // timingFunction: 'linear',
  9659. // delay: 0,
  9660. // transformOrigin: '50% 50% 0'
  9661. // }
  9662. var MPAnimation = /*#__PURE__*/function () {
  9663. function MPAnimation(options, _this) {
  9664. (0, _classCallCheck2.default)(this, MPAnimation);
  9665. this.options = options;
  9666. this.animation = uni.createAnimation(options);
  9667. this.currentStepAnimates = {};
  9668. this.next = 0;
  9669. this.$ = _this;
  9670. }
  9671. (0, _createClass2.default)(MPAnimation, [{
  9672. key: "_nvuePushAnimates",
  9673. value: function _nvuePushAnimates(type, args) {
  9674. var aniObj = this.currentStepAnimates[this.next];
  9675. var styles = {};
  9676. if (!aniObj) {
  9677. styles = {
  9678. styles: {},
  9679. config: {}
  9680. };
  9681. } else {
  9682. styles = aniObj;
  9683. }
  9684. if (animateTypes1.includes(type)) {
  9685. if (!styles.styles.transform) {
  9686. styles.styles.transform = '';
  9687. }
  9688. var unit = '';
  9689. if (type === 'rotate') {
  9690. unit = 'deg';
  9691. }
  9692. styles.styles.transform += "".concat(type, "(").concat(args + unit, ") ");
  9693. } else {
  9694. styles.styles[type] = "".concat(args);
  9695. }
  9696. this.currentStepAnimates[this.next] = styles;
  9697. }
  9698. }, {
  9699. key: "_animateRun",
  9700. value: function _animateRun() {
  9701. var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  9702. var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9703. var ref = this.$.$refs['ani'].ref;
  9704. if (!ref) return;
  9705. return new Promise(function (resolve, reject) {
  9706. nvueAnimation.transition(ref, _objectSpread({
  9707. styles: styles
  9708. }, config), function (res) {
  9709. resolve();
  9710. });
  9711. });
  9712. }
  9713. }, {
  9714. key: "_nvueNextAnimate",
  9715. value: function _nvueNextAnimate(animates) {
  9716. var _this2 = this;
  9717. var step = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  9718. var fn = arguments.length > 2 ? arguments[2] : undefined;
  9719. var obj = animates[step];
  9720. if (obj) {
  9721. var styles = obj.styles,
  9722. config = obj.config;
  9723. this._animateRun(styles, config).then(function () {
  9724. step += 1;
  9725. _this2._nvueNextAnimate(animates, step, fn);
  9726. });
  9727. } else {
  9728. this.currentStepAnimates = {};
  9729. typeof fn === 'function' && fn();
  9730. this.isEnd = true;
  9731. }
  9732. }
  9733. }, {
  9734. key: "step",
  9735. value: function step() {
  9736. var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  9737. this.animation.step(config);
  9738. return this;
  9739. }
  9740. }, {
  9741. key: "run",
  9742. value: function run(fn) {
  9743. this.$.animationData = this.animation.export();
  9744. this.$.timer = setTimeout(function () {
  9745. typeof fn === 'function' && fn();
  9746. }, this.$.durationTime);
  9747. }
  9748. }]);
  9749. return MPAnimation;
  9750. }();
  9751. var animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d', 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY', 'translateZ'];
  9752. var animateTypes2 = ['opacity', 'backgroundColor'];
  9753. var animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom'];
  9754. animateTypes1.concat(animateTypes2, animateTypes3).forEach(function (type) {
  9755. MPAnimation.prototype[type] = function () {
  9756. var _this$animation;
  9757. (_this$animation = this.animation)[type].apply(_this$animation, arguments);
  9758. return this;
  9759. };
  9760. });
  9761. function createAnimation(option, _this) {
  9762. if (!_this) return;
  9763. clearTimeout(_this.timer);
  9764. return new MPAnimation(option, _this);
  9765. }
  9766. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9767. /***/ }),
  9768. /***/ 32:
  9769. /*!**********************************************************************************************************!*\
  9770. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  9771. \**********************************************************************************************************/
  9772. /*! exports provided: default */
  9773. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9774. "use strict";
  9775. __webpack_require__.r(__webpack_exports__);
  9776. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  9777. /* globals __VUE_SSR_CONTEXT__ */
  9778. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  9779. // This module is a runtime utility for cleaner component module output and will
  9780. // be included in the final webpack user bundle.
  9781. function normalizeComponent (
  9782. scriptExports,
  9783. render,
  9784. staticRenderFns,
  9785. functionalTemplate,
  9786. injectStyles,
  9787. scopeId,
  9788. moduleIdentifier, /* server only */
  9789. shadowMode, /* vue-cli only */
  9790. components, // fixed by xxxxxx auto components
  9791. renderjs // fixed by xxxxxx renderjs
  9792. ) {
  9793. // Vue.extend constructor export interop
  9794. var options = typeof scriptExports === 'function'
  9795. ? scriptExports.options
  9796. : scriptExports
  9797. // fixed by xxxxxx auto components
  9798. if (components) {
  9799. if (!options.components) {
  9800. options.components = {}
  9801. }
  9802. var hasOwn = Object.prototype.hasOwnProperty
  9803. for (var name in components) {
  9804. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  9805. options.components[name] = components[name]
  9806. }
  9807. }
  9808. }
  9809. // fixed by xxxxxx renderjs
  9810. if (renderjs) {
  9811. if(typeof renderjs.beforeCreate === 'function'){
  9812. renderjs.beforeCreate = [renderjs.beforeCreate]
  9813. }
  9814. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  9815. this[renderjs.__module] = this
  9816. });
  9817. (options.mixins || (options.mixins = [])).push(renderjs)
  9818. }
  9819. // render functions
  9820. if (render) {
  9821. options.render = render
  9822. options.staticRenderFns = staticRenderFns
  9823. options._compiled = true
  9824. }
  9825. // functional template
  9826. if (functionalTemplate) {
  9827. options.functional = true
  9828. }
  9829. // scopedId
  9830. if (scopeId) {
  9831. options._scopeId = 'data-v-' + scopeId
  9832. }
  9833. var hook
  9834. if (moduleIdentifier) { // server build
  9835. hook = function (context) {
  9836. // 2.3 injection
  9837. context =
  9838. context || // cached call
  9839. (this.$vnode && this.$vnode.ssrContext) || // stateful
  9840. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  9841. // 2.2 with runInNewContext: true
  9842. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  9843. context = __VUE_SSR_CONTEXT__
  9844. }
  9845. // inject component styles
  9846. if (injectStyles) {
  9847. injectStyles.call(this, context)
  9848. }
  9849. // register component module identifier for async chunk inferrence
  9850. if (context && context._registeredComponents) {
  9851. context._registeredComponents.add(moduleIdentifier)
  9852. }
  9853. }
  9854. // used by ssr in case component is cached and beforeCreate
  9855. // never gets called
  9856. options._ssrRegister = hook
  9857. } else if (injectStyles) {
  9858. hook = shadowMode
  9859. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  9860. : injectStyles
  9861. }
  9862. if (hook) {
  9863. if (options.functional) {
  9864. // for template-only hot-reload because in that case the render fn doesn't
  9865. // go through the normalizer
  9866. options._injectStyles = hook
  9867. // register for functioal component in vue file
  9868. var originalRender = options.render
  9869. options.render = function renderWithStyleInjection (h, context) {
  9870. hook.call(context)
  9871. return originalRender(h, context)
  9872. }
  9873. } else {
  9874. // inject component registration as beforeCreate hook
  9875. var existing = options.beforeCreate
  9876. options.beforeCreate = existing
  9877. ? [].concat(existing, hook)
  9878. : [hook]
  9879. }
  9880. }
  9881. return {
  9882. exports: scriptExports,
  9883. options: options
  9884. }
  9885. }
  9886. /***/ }),
  9887. /***/ 33:
  9888. /*!*******************************************!*\
  9889. !*** E:/项目资料/智慧社区/Applet/mixins/share.js ***!
  9890. \*******************************************/
  9891. /*! no static exports found */
  9892. /***/ (function(module, exports, __webpack_require__) {
  9893. "use strict";
  9894. /* WEBPACK VAR INJECTION */(function(wx) {
  9895. Object.defineProperty(exports, "__esModule", {
  9896. value: true
  9897. });
  9898. exports.default = void 0;
  9899. var _default = {
  9900. created: function created() {
  9901. wx.showShareMenu({
  9902. withShareTicket: true,
  9903. menus: ['shareAppMessage']
  9904. });
  9905. }
  9906. };
  9907. exports.default = _default;
  9908. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  9909. /***/ }),
  9910. /***/ 360:
  9911. /*!********************************************************************************************!*\
  9912. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js ***!
  9913. \********************************************************************************************/
  9914. /*! no static exports found */
  9915. /***/ (function(module, exports, __webpack_require__) {
  9916. "use strict";
  9917. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9918. Object.defineProperty(exports, "__esModule", {
  9919. value: true
  9920. });
  9921. exports.default = void 0;
  9922. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 361));
  9923. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 362));
  9924. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 363));
  9925. var _default = {
  9926. en: _en.default,
  9927. 'zh-Hans': _zhHans.default,
  9928. 'zh-Hant': _zhHant.default
  9929. };
  9930. exports.default = _default;
  9931. /***/ }),
  9932. /***/ 361:
  9933. /*!*******************************************************************************************!*\
  9934. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json ***!
  9935. \*******************************************************************************************/
  9936. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  9937. /***/ (function(module) {
  9938. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"Pull up to show more\",\"uni-load-more.contentrefresh\":\"loading...\",\"uni-load-more.contentnomore\":\"No more data\"}");
  9939. /***/ }),
  9940. /***/ 362:
  9941. /*!************************************************************************************************!*\
  9942. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json ***!
  9943. \************************************************************************************************/
  9944. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  9945. /***/ (function(module) {
  9946. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉显示更多\",\"uni-load-more.contentrefresh\":\"正在加载...\",\"uni-load-more.contentnomore\":\"没有更多数据了\"}");
  9947. /***/ }),
  9948. /***/ 363:
  9949. /*!************************************************************************************************!*\
  9950. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json ***!
  9951. \************************************************************************************************/
  9952. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  9953. /***/ (function(module) {
  9954. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉顯示更多\",\"uni-load-more.contentrefresh\":\"正在加載...\",\"uni-load-more.contentnomore\":\"沒有更多數據了\"}");
  9955. /***/ }),
  9956. /***/ 378:
  9957. /*!*******************************************************************************!*\
  9958. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-icons/components/uni-icons/icons.js ***!
  9959. \*******************************************************************************/
  9960. /*! no static exports found */
  9961. /***/ (function(module, exports, __webpack_require__) {
  9962. "use strict";
  9963. Object.defineProperty(exports, "__esModule", {
  9964. value: true
  9965. });
  9966. exports.default = void 0;
  9967. var _default = {
  9968. "id": "2852637",
  9969. "name": "uniui图标库",
  9970. "font_family": "uniicons",
  9971. "css_prefix_text": "uniui-",
  9972. "description": "",
  9973. "glyphs": [{
  9974. "icon_id": "25027049",
  9975. "name": "yanse",
  9976. "font_class": "color",
  9977. "unicode": "e6cf",
  9978. "unicode_decimal": 59087
  9979. }, {
  9980. "icon_id": "25027048",
  9981. "name": "wallet",
  9982. "font_class": "wallet",
  9983. "unicode": "e6b1",
  9984. "unicode_decimal": 59057
  9985. }, {
  9986. "icon_id": "25015720",
  9987. "name": "settings-filled",
  9988. "font_class": "settings-filled",
  9989. "unicode": "e6ce",
  9990. "unicode_decimal": 59086
  9991. }, {
  9992. "icon_id": "25015434",
  9993. "name": "shimingrenzheng-filled",
  9994. "font_class": "auth-filled",
  9995. "unicode": "e6cc",
  9996. "unicode_decimal": 59084
  9997. }, {
  9998. "icon_id": "24934246",
  9999. "name": "shop-filled",
  10000. "font_class": "shop-filled",
  10001. "unicode": "e6cd",
  10002. "unicode_decimal": 59085
  10003. }, {
  10004. "icon_id": "24934159",
  10005. "name": "staff-filled-01",
  10006. "font_class": "staff-filled",
  10007. "unicode": "e6cb",
  10008. "unicode_decimal": 59083
  10009. }, {
  10010. "icon_id": "24932461",
  10011. "name": "VIP-filled",
  10012. "font_class": "vip-filled",
  10013. "unicode": "e6c6",
  10014. "unicode_decimal": 59078
  10015. }, {
  10016. "icon_id": "24932462",
  10017. "name": "plus_circle_fill",
  10018. "font_class": "plus-filled",
  10019. "unicode": "e6c7",
  10020. "unicode_decimal": 59079
  10021. }, {
  10022. "icon_id": "24932463",
  10023. "name": "folder_add-filled",
  10024. "font_class": "folder-add-filled",
  10025. "unicode": "e6c8",
  10026. "unicode_decimal": 59080
  10027. }, {
  10028. "icon_id": "24932464",
  10029. "name": "yanse-filled",
  10030. "font_class": "color-filled",
  10031. "unicode": "e6c9",
  10032. "unicode_decimal": 59081
  10033. }, {
  10034. "icon_id": "24932465",
  10035. "name": "tune-filled",
  10036. "font_class": "tune-filled",
  10037. "unicode": "e6ca",
  10038. "unicode_decimal": 59082
  10039. }, {
  10040. "icon_id": "24932455",
  10041. "name": "a-rilidaka-filled",
  10042. "font_class": "calendar-filled",
  10043. "unicode": "e6c0",
  10044. "unicode_decimal": 59072
  10045. }, {
  10046. "icon_id": "24932456",
  10047. "name": "notification-filled",
  10048. "font_class": "notification-filled",
  10049. "unicode": "e6c1",
  10050. "unicode_decimal": 59073
  10051. }, {
  10052. "icon_id": "24932457",
  10053. "name": "wallet-filled",
  10054. "font_class": "wallet-filled",
  10055. "unicode": "e6c2",
  10056. "unicode_decimal": 59074
  10057. }, {
  10058. "icon_id": "24932458",
  10059. "name": "paihangbang-filled",
  10060. "font_class": "medal-filled",
  10061. "unicode": "e6c3",
  10062. "unicode_decimal": 59075
  10063. }, {
  10064. "icon_id": "24932459",
  10065. "name": "gift-filled",
  10066. "font_class": "gift-filled",
  10067. "unicode": "e6c4",
  10068. "unicode_decimal": 59076
  10069. }, {
  10070. "icon_id": "24932460",
  10071. "name": "fire-filled",
  10072. "font_class": "fire-filled",
  10073. "unicode": "e6c5",
  10074. "unicode_decimal": 59077
  10075. }, {
  10076. "icon_id": "24928001",
  10077. "name": "refreshempty",
  10078. "font_class": "refreshempty",
  10079. "unicode": "e6bf",
  10080. "unicode_decimal": 59071
  10081. }, {
  10082. "icon_id": "24926853",
  10083. "name": "location-ellipse",
  10084. "font_class": "location-filled",
  10085. "unicode": "e6af",
  10086. "unicode_decimal": 59055
  10087. }, {
  10088. "icon_id": "24926735",
  10089. "name": "person-filled",
  10090. "font_class": "person-filled",
  10091. "unicode": "e69d",
  10092. "unicode_decimal": 59037
  10093. }, {
  10094. "icon_id": "24926703",
  10095. "name": "personadd-filled",
  10096. "font_class": "personadd-filled",
  10097. "unicode": "e698",
  10098. "unicode_decimal": 59032
  10099. }, {
  10100. "icon_id": "24923351",
  10101. "name": "back",
  10102. "font_class": "back",
  10103. "unicode": "e6b9",
  10104. "unicode_decimal": 59065
  10105. }, {
  10106. "icon_id": "24923352",
  10107. "name": "forward",
  10108. "font_class": "forward",
  10109. "unicode": "e6ba",
  10110. "unicode_decimal": 59066
  10111. }, {
  10112. "icon_id": "24923353",
  10113. "name": "arrowthinright",
  10114. "font_class": "arrow-right",
  10115. "unicode": "e6bb",
  10116. "unicode_decimal": 59067
  10117. }, {
  10118. "icon_id": "24923353",
  10119. "name": "arrowthinright",
  10120. "font_class": "arrowthinright",
  10121. "unicode": "e6bb",
  10122. "unicode_decimal": 59067
  10123. }, {
  10124. "icon_id": "24923354",
  10125. "name": "arrowthinleft",
  10126. "font_class": "arrow-left",
  10127. "unicode": "e6bc",
  10128. "unicode_decimal": 59068
  10129. }, {
  10130. "icon_id": "24923354",
  10131. "name": "arrowthinleft",
  10132. "font_class": "arrowthinleft",
  10133. "unicode": "e6bc",
  10134. "unicode_decimal": 59068
  10135. }, {
  10136. "icon_id": "24923355",
  10137. "name": "arrowthinup",
  10138. "font_class": "arrow-up",
  10139. "unicode": "e6bd",
  10140. "unicode_decimal": 59069
  10141. }, {
  10142. "icon_id": "24923355",
  10143. "name": "arrowthinup",
  10144. "font_class": "arrowthinup",
  10145. "unicode": "e6bd",
  10146. "unicode_decimal": 59069
  10147. }, {
  10148. "icon_id": "24923356",
  10149. "name": "arrowthindown",
  10150. "font_class": "arrow-down",
  10151. "unicode": "e6be",
  10152. "unicode_decimal": 59070
  10153. }, {
  10154. "icon_id": "24923356",
  10155. "name": "arrowthindown",
  10156. "font_class": "arrowthindown",
  10157. "unicode": "e6be",
  10158. "unicode_decimal": 59070
  10159. }, {
  10160. "icon_id": "24923349",
  10161. "name": "arrowdown",
  10162. "font_class": "bottom",
  10163. "unicode": "e6b8",
  10164. "unicode_decimal": 59064
  10165. }, {
  10166. "icon_id": "24923349",
  10167. "name": "arrowdown",
  10168. "font_class": "arrowdown",
  10169. "unicode": "e6b8",
  10170. "unicode_decimal": 59064
  10171. }, {
  10172. "icon_id": "24923346",
  10173. "name": "arrowright",
  10174. "font_class": "right",
  10175. "unicode": "e6b5",
  10176. "unicode_decimal": 59061
  10177. }, {
  10178. "icon_id": "24923346",
  10179. "name": "arrowright",
  10180. "font_class": "arrowright",
  10181. "unicode": "e6b5",
  10182. "unicode_decimal": 59061
  10183. }, {
  10184. "icon_id": "24923347",
  10185. "name": "arrowup",
  10186. "font_class": "top",
  10187. "unicode": "e6b6",
  10188. "unicode_decimal": 59062
  10189. }, {
  10190. "icon_id": "24923347",
  10191. "name": "arrowup",
  10192. "font_class": "arrowup",
  10193. "unicode": "e6b6",
  10194. "unicode_decimal": 59062
  10195. }, {
  10196. "icon_id": "24923348",
  10197. "name": "arrowleft",
  10198. "font_class": "left",
  10199. "unicode": "e6b7",
  10200. "unicode_decimal": 59063
  10201. }, {
  10202. "icon_id": "24923348",
  10203. "name": "arrowleft",
  10204. "font_class": "arrowleft",
  10205. "unicode": "e6b7",
  10206. "unicode_decimal": 59063
  10207. }, {
  10208. "icon_id": "24923334",
  10209. "name": "eye",
  10210. "font_class": "eye",
  10211. "unicode": "e651",
  10212. "unicode_decimal": 58961
  10213. }, {
  10214. "icon_id": "24923335",
  10215. "name": "eye-filled",
  10216. "font_class": "eye-filled",
  10217. "unicode": "e66a",
  10218. "unicode_decimal": 58986
  10219. }, {
  10220. "icon_id": "24923336",
  10221. "name": "eye-slash",
  10222. "font_class": "eye-slash",
  10223. "unicode": "e6b3",
  10224. "unicode_decimal": 59059
  10225. }, {
  10226. "icon_id": "24923337",
  10227. "name": "eye-slash-filled",
  10228. "font_class": "eye-slash-filled",
  10229. "unicode": "e6b4",
  10230. "unicode_decimal": 59060
  10231. }, {
  10232. "icon_id": "24923305",
  10233. "name": "info-filled",
  10234. "font_class": "info-filled",
  10235. "unicode": "e649",
  10236. "unicode_decimal": 58953
  10237. }, {
  10238. "icon_id": "24923299",
  10239. "name": "reload-01",
  10240. "font_class": "reload",
  10241. "unicode": "e6b2",
  10242. "unicode_decimal": 59058
  10243. }, {
  10244. "icon_id": "24923195",
  10245. "name": "mic_slash_fill",
  10246. "font_class": "micoff-filled",
  10247. "unicode": "e6b0",
  10248. "unicode_decimal": 59056
  10249. }, {
  10250. "icon_id": "24923165",
  10251. "name": "map-pin-ellipse",
  10252. "font_class": "map-pin-ellipse",
  10253. "unicode": "e6ac",
  10254. "unicode_decimal": 59052
  10255. }, {
  10256. "icon_id": "24923166",
  10257. "name": "map-pin",
  10258. "font_class": "map-pin",
  10259. "unicode": "e6ad",
  10260. "unicode_decimal": 59053
  10261. }, {
  10262. "icon_id": "24923167",
  10263. "name": "location",
  10264. "font_class": "location",
  10265. "unicode": "e6ae",
  10266. "unicode_decimal": 59054
  10267. }, {
  10268. "icon_id": "24923064",
  10269. "name": "starhalf",
  10270. "font_class": "starhalf",
  10271. "unicode": "e683",
  10272. "unicode_decimal": 59011
  10273. }, {
  10274. "icon_id": "24923065",
  10275. "name": "star",
  10276. "font_class": "star",
  10277. "unicode": "e688",
  10278. "unicode_decimal": 59016
  10279. }, {
  10280. "icon_id": "24923066",
  10281. "name": "star-filled",
  10282. "font_class": "star-filled",
  10283. "unicode": "e68f",
  10284. "unicode_decimal": 59023
  10285. }, {
  10286. "icon_id": "24899646",
  10287. "name": "a-rilidaka",
  10288. "font_class": "calendar",
  10289. "unicode": "e6a0",
  10290. "unicode_decimal": 59040
  10291. }, {
  10292. "icon_id": "24899647",
  10293. "name": "fire",
  10294. "font_class": "fire",
  10295. "unicode": "e6a1",
  10296. "unicode_decimal": 59041
  10297. }, {
  10298. "icon_id": "24899648",
  10299. "name": "paihangbang",
  10300. "font_class": "medal",
  10301. "unicode": "e6a2",
  10302. "unicode_decimal": 59042
  10303. }, {
  10304. "icon_id": "24899649",
  10305. "name": "font",
  10306. "font_class": "font",
  10307. "unicode": "e6a3",
  10308. "unicode_decimal": 59043
  10309. }, {
  10310. "icon_id": "24899650",
  10311. "name": "gift",
  10312. "font_class": "gift",
  10313. "unicode": "e6a4",
  10314. "unicode_decimal": 59044
  10315. }, {
  10316. "icon_id": "24899651",
  10317. "name": "link",
  10318. "font_class": "link",
  10319. "unicode": "e6a5",
  10320. "unicode_decimal": 59045
  10321. }, {
  10322. "icon_id": "24899652",
  10323. "name": "notification",
  10324. "font_class": "notification",
  10325. "unicode": "e6a6",
  10326. "unicode_decimal": 59046
  10327. }, {
  10328. "icon_id": "24899653",
  10329. "name": "staff",
  10330. "font_class": "staff",
  10331. "unicode": "e6a7",
  10332. "unicode_decimal": 59047
  10333. }, {
  10334. "icon_id": "24899654",
  10335. "name": "VIP",
  10336. "font_class": "vip",
  10337. "unicode": "e6a8",
  10338. "unicode_decimal": 59048
  10339. }, {
  10340. "icon_id": "24899655",
  10341. "name": "folder_add",
  10342. "font_class": "folder-add",
  10343. "unicode": "e6a9",
  10344. "unicode_decimal": 59049
  10345. }, {
  10346. "icon_id": "24899656",
  10347. "name": "tune",
  10348. "font_class": "tune",
  10349. "unicode": "e6aa",
  10350. "unicode_decimal": 59050
  10351. }, {
  10352. "icon_id": "24899657",
  10353. "name": "shimingrenzheng",
  10354. "font_class": "auth",
  10355. "unicode": "e6ab",
  10356. "unicode_decimal": 59051
  10357. }, {
  10358. "icon_id": "24899565",
  10359. "name": "person",
  10360. "font_class": "person",
  10361. "unicode": "e699",
  10362. "unicode_decimal": 59033
  10363. }, {
  10364. "icon_id": "24899566",
  10365. "name": "email-filled",
  10366. "font_class": "email-filled",
  10367. "unicode": "e69a",
  10368. "unicode_decimal": 59034
  10369. }, {
  10370. "icon_id": "24899567",
  10371. "name": "phone-filled",
  10372. "font_class": "phone-filled",
  10373. "unicode": "e69b",
  10374. "unicode_decimal": 59035
  10375. }, {
  10376. "icon_id": "24899568",
  10377. "name": "phone",
  10378. "font_class": "phone",
  10379. "unicode": "e69c",
  10380. "unicode_decimal": 59036
  10381. }, {
  10382. "icon_id": "24899570",
  10383. "name": "email",
  10384. "font_class": "email",
  10385. "unicode": "e69e",
  10386. "unicode_decimal": 59038
  10387. }, {
  10388. "icon_id": "24899571",
  10389. "name": "personadd",
  10390. "font_class": "personadd",
  10391. "unicode": "e69f",
  10392. "unicode_decimal": 59039
  10393. }, {
  10394. "icon_id": "24899558",
  10395. "name": "chatboxes-filled",
  10396. "font_class": "chatboxes-filled",
  10397. "unicode": "e692",
  10398. "unicode_decimal": 59026
  10399. }, {
  10400. "icon_id": "24899559",
  10401. "name": "contact",
  10402. "font_class": "contact",
  10403. "unicode": "e693",
  10404. "unicode_decimal": 59027
  10405. }, {
  10406. "icon_id": "24899560",
  10407. "name": "chatbubble-filled",
  10408. "font_class": "chatbubble-filled",
  10409. "unicode": "e694",
  10410. "unicode_decimal": 59028
  10411. }, {
  10412. "icon_id": "24899561",
  10413. "name": "contact-filled",
  10414. "font_class": "contact-filled",
  10415. "unicode": "e695",
  10416. "unicode_decimal": 59029
  10417. }, {
  10418. "icon_id": "24899562",
  10419. "name": "chatboxes",
  10420. "font_class": "chatboxes",
  10421. "unicode": "e696",
  10422. "unicode_decimal": 59030
  10423. }, {
  10424. "icon_id": "24899563",
  10425. "name": "chatbubble",
  10426. "font_class": "chatbubble",
  10427. "unicode": "e697",
  10428. "unicode_decimal": 59031
  10429. }, {
  10430. "icon_id": "24881290",
  10431. "name": "upload-filled",
  10432. "font_class": "upload-filled",
  10433. "unicode": "e68e",
  10434. "unicode_decimal": 59022
  10435. }, {
  10436. "icon_id": "24881292",
  10437. "name": "upload",
  10438. "font_class": "upload",
  10439. "unicode": "e690",
  10440. "unicode_decimal": 59024
  10441. }, {
  10442. "icon_id": "24881293",
  10443. "name": "weixin",
  10444. "font_class": "weixin",
  10445. "unicode": "e691",
  10446. "unicode_decimal": 59025
  10447. }, {
  10448. "icon_id": "24881274",
  10449. "name": "compose",
  10450. "font_class": "compose",
  10451. "unicode": "e67f",
  10452. "unicode_decimal": 59007
  10453. }, {
  10454. "icon_id": "24881275",
  10455. "name": "qq",
  10456. "font_class": "qq",
  10457. "unicode": "e680",
  10458. "unicode_decimal": 59008
  10459. }, {
  10460. "icon_id": "24881276",
  10461. "name": "download-filled",
  10462. "font_class": "download-filled",
  10463. "unicode": "e681",
  10464. "unicode_decimal": 59009
  10465. }, {
  10466. "icon_id": "24881277",
  10467. "name": "pengyouquan",
  10468. "font_class": "pyq",
  10469. "unicode": "e682",
  10470. "unicode_decimal": 59010
  10471. }, {
  10472. "icon_id": "24881279",
  10473. "name": "sound",
  10474. "font_class": "sound",
  10475. "unicode": "e684",
  10476. "unicode_decimal": 59012
  10477. }, {
  10478. "icon_id": "24881280",
  10479. "name": "trash-filled",
  10480. "font_class": "trash-filled",
  10481. "unicode": "e685",
  10482. "unicode_decimal": 59013
  10483. }, {
  10484. "icon_id": "24881281",
  10485. "name": "sound-filled",
  10486. "font_class": "sound-filled",
  10487. "unicode": "e686",
  10488. "unicode_decimal": 59014
  10489. }, {
  10490. "icon_id": "24881282",
  10491. "name": "trash",
  10492. "font_class": "trash",
  10493. "unicode": "e687",
  10494. "unicode_decimal": 59015
  10495. }, {
  10496. "icon_id": "24881284",
  10497. "name": "videocam-filled",
  10498. "font_class": "videocam-filled",
  10499. "unicode": "e689",
  10500. "unicode_decimal": 59017
  10501. }, {
  10502. "icon_id": "24881285",
  10503. "name": "spinner-cycle",
  10504. "font_class": "spinner-cycle",
  10505. "unicode": "e68a",
  10506. "unicode_decimal": 59018
  10507. }, {
  10508. "icon_id": "24881286",
  10509. "name": "weibo",
  10510. "font_class": "weibo",
  10511. "unicode": "e68b",
  10512. "unicode_decimal": 59019
  10513. }, {
  10514. "icon_id": "24881288",
  10515. "name": "videocam",
  10516. "font_class": "videocam",
  10517. "unicode": "e68c",
  10518. "unicode_decimal": 59020
  10519. }, {
  10520. "icon_id": "24881289",
  10521. "name": "download",
  10522. "font_class": "download",
  10523. "unicode": "e68d",
  10524. "unicode_decimal": 59021
  10525. }, {
  10526. "icon_id": "24879601",
  10527. "name": "help",
  10528. "font_class": "help",
  10529. "unicode": "e679",
  10530. "unicode_decimal": 59001
  10531. }, {
  10532. "icon_id": "24879602",
  10533. "name": "navigate-filled",
  10534. "font_class": "navigate-filled",
  10535. "unicode": "e67a",
  10536. "unicode_decimal": 59002
  10537. }, {
  10538. "icon_id": "24879603",
  10539. "name": "plusempty",
  10540. "font_class": "plusempty",
  10541. "unicode": "e67b",
  10542. "unicode_decimal": 59003
  10543. }, {
  10544. "icon_id": "24879604",
  10545. "name": "smallcircle",
  10546. "font_class": "smallcircle",
  10547. "unicode": "e67c",
  10548. "unicode_decimal": 59004
  10549. }, {
  10550. "icon_id": "24879605",
  10551. "name": "minus-filled",
  10552. "font_class": "minus-filled",
  10553. "unicode": "e67d",
  10554. "unicode_decimal": 59005
  10555. }, {
  10556. "icon_id": "24879606",
  10557. "name": "micoff",
  10558. "font_class": "micoff",
  10559. "unicode": "e67e",
  10560. "unicode_decimal": 59006
  10561. }, {
  10562. "icon_id": "24879588",
  10563. "name": "closeempty",
  10564. "font_class": "closeempty",
  10565. "unicode": "e66c",
  10566. "unicode_decimal": 58988
  10567. }, {
  10568. "icon_id": "24879589",
  10569. "name": "clear",
  10570. "font_class": "clear",
  10571. "unicode": "e66d",
  10572. "unicode_decimal": 58989
  10573. }, {
  10574. "icon_id": "24879590",
  10575. "name": "navigate",
  10576. "font_class": "navigate",
  10577. "unicode": "e66e",
  10578. "unicode_decimal": 58990
  10579. }, {
  10580. "icon_id": "24879591",
  10581. "name": "minus",
  10582. "font_class": "minus",
  10583. "unicode": "e66f",
  10584. "unicode_decimal": 58991
  10585. }, {
  10586. "icon_id": "24879592",
  10587. "name": "image",
  10588. "font_class": "image",
  10589. "unicode": "e670",
  10590. "unicode_decimal": 58992
  10591. }, {
  10592. "icon_id": "24879593",
  10593. "name": "mic",
  10594. "font_class": "mic",
  10595. "unicode": "e671",
  10596. "unicode_decimal": 58993
  10597. }, {
  10598. "icon_id": "24879594",
  10599. "name": "paperplane",
  10600. "font_class": "paperplane",
  10601. "unicode": "e672",
  10602. "unicode_decimal": 58994
  10603. }, {
  10604. "icon_id": "24879595",
  10605. "name": "close",
  10606. "font_class": "close",
  10607. "unicode": "e673",
  10608. "unicode_decimal": 58995
  10609. }, {
  10610. "icon_id": "24879596",
  10611. "name": "help-filled",
  10612. "font_class": "help-filled",
  10613. "unicode": "e674",
  10614. "unicode_decimal": 58996
  10615. }, {
  10616. "icon_id": "24879597",
  10617. "name": "plus-filled",
  10618. "font_class": "paperplane-filled",
  10619. "unicode": "e675",
  10620. "unicode_decimal": 58997
  10621. }, {
  10622. "icon_id": "24879598",
  10623. "name": "plus",
  10624. "font_class": "plus",
  10625. "unicode": "e676",
  10626. "unicode_decimal": 58998
  10627. }, {
  10628. "icon_id": "24879599",
  10629. "name": "mic-filled",
  10630. "font_class": "mic-filled",
  10631. "unicode": "e677",
  10632. "unicode_decimal": 58999
  10633. }, {
  10634. "icon_id": "24879600",
  10635. "name": "image-filled",
  10636. "font_class": "image-filled",
  10637. "unicode": "e678",
  10638. "unicode_decimal": 59000
  10639. }, {
  10640. "icon_id": "24855900",
  10641. "name": "locked-filled",
  10642. "font_class": "locked-filled",
  10643. "unicode": "e668",
  10644. "unicode_decimal": 58984
  10645. }, {
  10646. "icon_id": "24855901",
  10647. "name": "info",
  10648. "font_class": "info",
  10649. "unicode": "e669",
  10650. "unicode_decimal": 58985
  10651. }, {
  10652. "icon_id": "24855903",
  10653. "name": "locked",
  10654. "font_class": "locked",
  10655. "unicode": "e66b",
  10656. "unicode_decimal": 58987
  10657. }, {
  10658. "icon_id": "24855884",
  10659. "name": "camera-filled",
  10660. "font_class": "camera-filled",
  10661. "unicode": "e658",
  10662. "unicode_decimal": 58968
  10663. }, {
  10664. "icon_id": "24855885",
  10665. "name": "chat-filled",
  10666. "font_class": "chat-filled",
  10667. "unicode": "e659",
  10668. "unicode_decimal": 58969
  10669. }, {
  10670. "icon_id": "24855886",
  10671. "name": "camera",
  10672. "font_class": "camera",
  10673. "unicode": "e65a",
  10674. "unicode_decimal": 58970
  10675. }, {
  10676. "icon_id": "24855887",
  10677. "name": "circle",
  10678. "font_class": "circle",
  10679. "unicode": "e65b",
  10680. "unicode_decimal": 58971
  10681. }, {
  10682. "icon_id": "24855888",
  10683. "name": "checkmarkempty",
  10684. "font_class": "checkmarkempty",
  10685. "unicode": "e65c",
  10686. "unicode_decimal": 58972
  10687. }, {
  10688. "icon_id": "24855889",
  10689. "name": "chat",
  10690. "font_class": "chat",
  10691. "unicode": "e65d",
  10692. "unicode_decimal": 58973
  10693. }, {
  10694. "icon_id": "24855890",
  10695. "name": "circle-filled",
  10696. "font_class": "circle-filled",
  10697. "unicode": "e65e",
  10698. "unicode_decimal": 58974
  10699. }, {
  10700. "icon_id": "24855891",
  10701. "name": "flag",
  10702. "font_class": "flag",
  10703. "unicode": "e65f",
  10704. "unicode_decimal": 58975
  10705. }, {
  10706. "icon_id": "24855892",
  10707. "name": "flag-filled",
  10708. "font_class": "flag-filled",
  10709. "unicode": "e660",
  10710. "unicode_decimal": 58976
  10711. }, {
  10712. "icon_id": "24855893",
  10713. "name": "gear-filled",
  10714. "font_class": "gear-filled",
  10715. "unicode": "e661",
  10716. "unicode_decimal": 58977
  10717. }, {
  10718. "icon_id": "24855894",
  10719. "name": "home",
  10720. "font_class": "home",
  10721. "unicode": "e662",
  10722. "unicode_decimal": 58978
  10723. }, {
  10724. "icon_id": "24855895",
  10725. "name": "home-filled",
  10726. "font_class": "home-filled",
  10727. "unicode": "e663",
  10728. "unicode_decimal": 58979
  10729. }, {
  10730. "icon_id": "24855896",
  10731. "name": "gear",
  10732. "font_class": "gear",
  10733. "unicode": "e664",
  10734. "unicode_decimal": 58980
  10735. }, {
  10736. "icon_id": "24855897",
  10737. "name": "smallcircle-filled",
  10738. "font_class": "smallcircle-filled",
  10739. "unicode": "e665",
  10740. "unicode_decimal": 58981
  10741. }, {
  10742. "icon_id": "24855898",
  10743. "name": "map-filled",
  10744. "font_class": "map-filled",
  10745. "unicode": "e666",
  10746. "unicode_decimal": 58982
  10747. }, {
  10748. "icon_id": "24855899",
  10749. "name": "map",
  10750. "font_class": "map",
  10751. "unicode": "e667",
  10752. "unicode_decimal": 58983
  10753. }, {
  10754. "icon_id": "24855825",
  10755. "name": "refresh-filled",
  10756. "font_class": "refresh-filled",
  10757. "unicode": "e656",
  10758. "unicode_decimal": 58966
  10759. }, {
  10760. "icon_id": "24855826",
  10761. "name": "refresh",
  10762. "font_class": "refresh",
  10763. "unicode": "e657",
  10764. "unicode_decimal": 58967
  10765. }, {
  10766. "icon_id": "24855808",
  10767. "name": "cloud-upload",
  10768. "font_class": "cloud-upload",
  10769. "unicode": "e645",
  10770. "unicode_decimal": 58949
  10771. }, {
  10772. "icon_id": "24855809",
  10773. "name": "cloud-download-filled",
  10774. "font_class": "cloud-download-filled",
  10775. "unicode": "e646",
  10776. "unicode_decimal": 58950
  10777. }, {
  10778. "icon_id": "24855810",
  10779. "name": "cloud-download",
  10780. "font_class": "cloud-download",
  10781. "unicode": "e647",
  10782. "unicode_decimal": 58951
  10783. }, {
  10784. "icon_id": "24855811",
  10785. "name": "cloud-upload-filled",
  10786. "font_class": "cloud-upload-filled",
  10787. "unicode": "e648",
  10788. "unicode_decimal": 58952
  10789. }, {
  10790. "icon_id": "24855813",
  10791. "name": "redo",
  10792. "font_class": "redo",
  10793. "unicode": "e64a",
  10794. "unicode_decimal": 58954
  10795. }, {
  10796. "icon_id": "24855814",
  10797. "name": "images-filled",
  10798. "font_class": "images-filled",
  10799. "unicode": "e64b",
  10800. "unicode_decimal": 58955
  10801. }, {
  10802. "icon_id": "24855815",
  10803. "name": "undo-filled",
  10804. "font_class": "undo-filled",
  10805. "unicode": "e64c",
  10806. "unicode_decimal": 58956
  10807. }, {
  10808. "icon_id": "24855816",
  10809. "name": "more",
  10810. "font_class": "more",
  10811. "unicode": "e64d",
  10812. "unicode_decimal": 58957
  10813. }, {
  10814. "icon_id": "24855817",
  10815. "name": "more-filled",
  10816. "font_class": "more-filled",
  10817. "unicode": "e64e",
  10818. "unicode_decimal": 58958
  10819. }, {
  10820. "icon_id": "24855818",
  10821. "name": "undo",
  10822. "font_class": "undo",
  10823. "unicode": "e64f",
  10824. "unicode_decimal": 58959
  10825. }, {
  10826. "icon_id": "24855819",
  10827. "name": "images",
  10828. "font_class": "images",
  10829. "unicode": "e650",
  10830. "unicode_decimal": 58960
  10831. }, {
  10832. "icon_id": "24855821",
  10833. "name": "paperclip",
  10834. "font_class": "paperclip",
  10835. "unicode": "e652",
  10836. "unicode_decimal": 58962
  10837. }, {
  10838. "icon_id": "24855822",
  10839. "name": "settings",
  10840. "font_class": "settings",
  10841. "unicode": "e653",
  10842. "unicode_decimal": 58963
  10843. }, {
  10844. "icon_id": "24855823",
  10845. "name": "search",
  10846. "font_class": "search",
  10847. "unicode": "e654",
  10848. "unicode_decimal": 58964
  10849. }, {
  10850. "icon_id": "24855824",
  10851. "name": "redo-filled",
  10852. "font_class": "redo-filled",
  10853. "unicode": "e655",
  10854. "unicode_decimal": 58965
  10855. }, {
  10856. "icon_id": "24841702",
  10857. "name": "list",
  10858. "font_class": "list",
  10859. "unicode": "e644",
  10860. "unicode_decimal": 58948
  10861. }, {
  10862. "icon_id": "24841489",
  10863. "name": "mail-open-filled",
  10864. "font_class": "mail-open-filled",
  10865. "unicode": "e63a",
  10866. "unicode_decimal": 58938
  10867. }, {
  10868. "icon_id": "24841491",
  10869. "name": "hand-thumbsdown-filled",
  10870. "font_class": "hand-down-filled",
  10871. "unicode": "e63c",
  10872. "unicode_decimal": 58940
  10873. }, {
  10874. "icon_id": "24841492",
  10875. "name": "hand-thumbsdown",
  10876. "font_class": "hand-down",
  10877. "unicode": "e63d",
  10878. "unicode_decimal": 58941
  10879. }, {
  10880. "icon_id": "24841493",
  10881. "name": "hand-thumbsup-filled",
  10882. "font_class": "hand-up-filled",
  10883. "unicode": "e63e",
  10884. "unicode_decimal": 58942
  10885. }, {
  10886. "icon_id": "24841494",
  10887. "name": "hand-thumbsup",
  10888. "font_class": "hand-up",
  10889. "unicode": "e63f",
  10890. "unicode_decimal": 58943
  10891. }, {
  10892. "icon_id": "24841496",
  10893. "name": "heart-filled",
  10894. "font_class": "heart-filled",
  10895. "unicode": "e641",
  10896. "unicode_decimal": 58945
  10897. }, {
  10898. "icon_id": "24841498",
  10899. "name": "mail-open",
  10900. "font_class": "mail-open",
  10901. "unicode": "e643",
  10902. "unicode_decimal": 58947
  10903. }, {
  10904. "icon_id": "24841488",
  10905. "name": "heart",
  10906. "font_class": "heart",
  10907. "unicode": "e639",
  10908. "unicode_decimal": 58937
  10909. }, {
  10910. "icon_id": "24839963",
  10911. "name": "loop",
  10912. "font_class": "loop",
  10913. "unicode": "e633",
  10914. "unicode_decimal": 58931
  10915. }, {
  10916. "icon_id": "24839866",
  10917. "name": "pulldown",
  10918. "font_class": "pulldown",
  10919. "unicode": "e632",
  10920. "unicode_decimal": 58930
  10921. }, {
  10922. "icon_id": "24813798",
  10923. "name": "scan",
  10924. "font_class": "scan",
  10925. "unicode": "e62a",
  10926. "unicode_decimal": 58922
  10927. }, {
  10928. "icon_id": "24813786",
  10929. "name": "bars",
  10930. "font_class": "bars",
  10931. "unicode": "e627",
  10932. "unicode_decimal": 58919
  10933. }, {
  10934. "icon_id": "24813788",
  10935. "name": "cart-filled",
  10936. "font_class": "cart-filled",
  10937. "unicode": "e629",
  10938. "unicode_decimal": 58921
  10939. }, {
  10940. "icon_id": "24813790",
  10941. "name": "checkbox",
  10942. "font_class": "checkbox",
  10943. "unicode": "e62b",
  10944. "unicode_decimal": 58923
  10945. }, {
  10946. "icon_id": "24813791",
  10947. "name": "checkbox-filled",
  10948. "font_class": "checkbox-filled",
  10949. "unicode": "e62c",
  10950. "unicode_decimal": 58924
  10951. }, {
  10952. "icon_id": "24813794",
  10953. "name": "shop",
  10954. "font_class": "shop",
  10955. "unicode": "e62f",
  10956. "unicode_decimal": 58927
  10957. }, {
  10958. "icon_id": "24813795",
  10959. "name": "headphones",
  10960. "font_class": "headphones",
  10961. "unicode": "e630",
  10962. "unicode_decimal": 58928
  10963. }, {
  10964. "icon_id": "24813796",
  10965. "name": "cart",
  10966. "font_class": "cart",
  10967. "unicode": "e631",
  10968. "unicode_decimal": 58929
  10969. }]
  10970. };
  10971. exports.default = _default;
  10972. /***/ }),
  10973. /***/ 393:
  10974. /*!**********************************************************************************!*\
  10975. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-forms/components/uni-forms/validate.js ***!
  10976. \**********************************************************************************/
  10977. /*! no static exports found */
  10978. /***/ (function(module, exports, __webpack_require__) {
  10979. "use strict";
  10980. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10981. Object.defineProperty(exports, "__esModule", {
  10982. value: true
  10983. });
  10984. exports.default = void 0;
  10985. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  10986. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 394));
  10987. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 395));
  10988. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 397));
  10989. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  10990. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  10991. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  10992. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  10993. 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); }; }
  10994. 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; } }
  10995. var pattern = {
  10996. email: /^\S+?@\S+?\.\S+?$/,
  10997. idcard: /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
  10998. url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", 'i')
  10999. };
  11000. var FORMAT_MAPPING = {
  11001. "int": 'integer',
  11002. "bool": 'boolean',
  11003. "double": 'number',
  11004. "long": 'number',
  11005. "password": 'string'
  11006. // "fileurls": 'array'
  11007. };
  11008. function formatMessage(args) {
  11009. var resources = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  11010. var defaultMessage = ['label'];
  11011. defaultMessage.forEach(function (item) {
  11012. if (args[item] === undefined) {
  11013. args[item] = '';
  11014. }
  11015. });
  11016. var str = resources;
  11017. for (var key in args) {
  11018. var reg = new RegExp('{' + key + '}');
  11019. str = str.replace(reg, args[key]);
  11020. }
  11021. return str;
  11022. }
  11023. function isEmptyValue(value, type) {
  11024. if (value === undefined || value === null) {
  11025. return true;
  11026. }
  11027. if (typeof value === 'string' && !value) {
  11028. return true;
  11029. }
  11030. if (Array.isArray(value) && !value.length) {
  11031. return true;
  11032. }
  11033. if (type === 'object' && !Object.keys(value).length) {
  11034. return true;
  11035. }
  11036. return false;
  11037. }
  11038. var types = {
  11039. integer: function integer(value) {
  11040. return types.number(value) && parseInt(value, 10) === value;
  11041. },
  11042. string: function string(value) {
  11043. return typeof value === 'string';
  11044. },
  11045. number: function number(value) {
  11046. if (isNaN(value)) {
  11047. return false;
  11048. }
  11049. return typeof value === 'number';
  11050. },
  11051. "boolean": function boolean(value) {
  11052. return typeof value === 'boolean';
  11053. },
  11054. "float": function float(value) {
  11055. return types.number(value) && !types.integer(value);
  11056. },
  11057. array: function array(value) {
  11058. return Array.isArray(value);
  11059. },
  11060. object: function object(value) {
  11061. return (0, _typeof2.default)(value) === 'object' && !types.array(value);
  11062. },
  11063. date: function date(value) {
  11064. return value instanceof Date;
  11065. },
  11066. timestamp: function timestamp(value) {
  11067. if (!this.integer(value) || Math.abs(value).toString().length > 16) {
  11068. return false;
  11069. }
  11070. return true;
  11071. },
  11072. file: function file(value) {
  11073. return typeof value.url === 'string';
  11074. },
  11075. email: function email(value) {
  11076. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  11077. },
  11078. url: function url(value) {
  11079. return typeof value === 'string' && !!value.match(pattern.url);
  11080. },
  11081. pattern: function pattern(reg, value) {
  11082. try {
  11083. return new RegExp(reg).test(value);
  11084. } catch (e) {
  11085. return false;
  11086. }
  11087. },
  11088. method: function method(value) {
  11089. return typeof value === 'function';
  11090. },
  11091. idcard: function idcard(value) {
  11092. return typeof value === 'string' && !!value.match(pattern.idcard);
  11093. },
  11094. 'url-https': function urlHttps(value) {
  11095. return this.url(value) && value.startsWith('https://');
  11096. },
  11097. 'url-scheme': function urlScheme(value) {
  11098. return value.startsWith('://');
  11099. },
  11100. 'url-web': function urlWeb(value) {
  11101. return false;
  11102. }
  11103. };
  11104. var RuleValidator = /*#__PURE__*/function () {
  11105. function RuleValidator(message) {
  11106. (0, _classCallCheck2.default)(this, RuleValidator);
  11107. this._message = message;
  11108. }
  11109. (0, _createClass2.default)(RuleValidator, [{
  11110. key: "validateRule",
  11111. value: function () {
  11112. var _validateRule = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(fieldKey, fieldValue, value, data, allData) {
  11113. var result, rules, hasRequired, message, i, rule, vt, now, resultExpr;
  11114. return _regenerator.default.wrap(function _callee$(_context) {
  11115. while (1) {
  11116. switch (_context.prev = _context.next) {
  11117. case 0:
  11118. result = null;
  11119. rules = fieldValue.rules;
  11120. hasRequired = rules.findIndex(function (item) {
  11121. return item.required;
  11122. });
  11123. if (!(hasRequired < 0)) {
  11124. _context.next = 8;
  11125. break;
  11126. }
  11127. if (!(value === null || value === undefined)) {
  11128. _context.next = 6;
  11129. break;
  11130. }
  11131. return _context.abrupt("return", result);
  11132. case 6:
  11133. if (!(typeof value === 'string' && !value.length)) {
  11134. _context.next = 8;
  11135. break;
  11136. }
  11137. return _context.abrupt("return", result);
  11138. case 8:
  11139. message = this._message;
  11140. if (!(rules === undefined)) {
  11141. _context.next = 11;
  11142. break;
  11143. }
  11144. return _context.abrupt("return", message['default']);
  11145. case 11:
  11146. i = 0;
  11147. case 12:
  11148. if (!(i < rules.length)) {
  11149. _context.next = 35;
  11150. break;
  11151. }
  11152. rule = rules[i];
  11153. vt = this._getValidateType(rule);
  11154. Object.assign(rule, {
  11155. label: fieldValue.label || "[\"".concat(fieldKey, "\"]")
  11156. });
  11157. if (!RuleValidatorHelper[vt]) {
  11158. _context.next = 20;
  11159. break;
  11160. }
  11161. result = RuleValidatorHelper[vt](rule, value, message);
  11162. if (!(result != null)) {
  11163. _context.next = 20;
  11164. break;
  11165. }
  11166. return _context.abrupt("break", 35);
  11167. case 20:
  11168. if (!rule.validateExpr) {
  11169. _context.next = 26;
  11170. break;
  11171. }
  11172. now = Date.now();
  11173. resultExpr = rule.validateExpr(value, allData, now);
  11174. if (!(resultExpr === false)) {
  11175. _context.next = 26;
  11176. break;
  11177. }
  11178. result = this._getMessage(rule, rule.errorMessage || this._message['default']);
  11179. return _context.abrupt("break", 35);
  11180. case 26:
  11181. if (!rule.validateFunction) {
  11182. _context.next = 32;
  11183. break;
  11184. }
  11185. _context.next = 29;
  11186. return this.validateFunction(rule, value, data, allData, vt);
  11187. case 29:
  11188. result = _context.sent;
  11189. if (!(result !== null)) {
  11190. _context.next = 32;
  11191. break;
  11192. }
  11193. return _context.abrupt("break", 35);
  11194. case 32:
  11195. i++;
  11196. _context.next = 12;
  11197. break;
  11198. case 35:
  11199. if (result !== null) {
  11200. result = message.TAG + result;
  11201. }
  11202. return _context.abrupt("return", result);
  11203. case 37:
  11204. case "end":
  11205. return _context.stop();
  11206. }
  11207. }
  11208. }, _callee, this);
  11209. }));
  11210. function validateRule(_x, _x2, _x3, _x4, _x5) {
  11211. return _validateRule.apply(this, arguments);
  11212. }
  11213. return validateRule;
  11214. }()
  11215. }, {
  11216. key: "validateFunction",
  11217. value: function () {
  11218. var _validateFunction = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(rule, value, data, allData, vt) {
  11219. var result, callbackMessage, res;
  11220. return _regenerator.default.wrap(function _callee2$(_context2) {
  11221. while (1) {
  11222. switch (_context2.prev = _context2.next) {
  11223. case 0:
  11224. result = null;
  11225. _context2.prev = 1;
  11226. callbackMessage = null;
  11227. _context2.next = 5;
  11228. return rule.validateFunction(rule, value, allData || data, function (message) {
  11229. callbackMessage = message;
  11230. });
  11231. case 5:
  11232. res = _context2.sent;
  11233. if (callbackMessage || typeof res === 'string' && res || res === false) {
  11234. result = this._getMessage(rule, callbackMessage || res, vt);
  11235. }
  11236. _context2.next = 12;
  11237. break;
  11238. case 9:
  11239. _context2.prev = 9;
  11240. _context2.t0 = _context2["catch"](1);
  11241. result = this._getMessage(rule, _context2.t0.message, vt);
  11242. case 12:
  11243. return _context2.abrupt("return", result);
  11244. case 13:
  11245. case "end":
  11246. return _context2.stop();
  11247. }
  11248. }
  11249. }, _callee2, this, [[1, 9]]);
  11250. }));
  11251. function validateFunction(_x6, _x7, _x8, _x9, _x10) {
  11252. return _validateFunction.apply(this, arguments);
  11253. }
  11254. return validateFunction;
  11255. }()
  11256. }, {
  11257. key: "_getMessage",
  11258. value: function _getMessage(rule, message, vt) {
  11259. return formatMessage(rule, message || rule.errorMessage || this._message[vt] || message['default']);
  11260. }
  11261. }, {
  11262. key: "_getValidateType",
  11263. value: function _getValidateType(rule) {
  11264. var result = '';
  11265. if (rule.required) {
  11266. result = 'required';
  11267. } else if (rule.format) {
  11268. result = 'format';
  11269. } else if (rule.arrayType) {
  11270. result = 'arrayTypeFormat';
  11271. } else if (rule.range) {
  11272. result = 'range';
  11273. } else if (rule.maximum !== undefined || rule.minimum !== undefined) {
  11274. result = 'rangeNumber';
  11275. } else if (rule.maxLength !== undefined || rule.minLength !== undefined) {
  11276. result = 'rangeLength';
  11277. } else if (rule.pattern) {
  11278. result = 'pattern';
  11279. } else if (rule.validateFunction) {
  11280. result = 'validateFunction';
  11281. }
  11282. return result;
  11283. }
  11284. }]);
  11285. return RuleValidator;
  11286. }();
  11287. var RuleValidatorHelper = {
  11288. required: function required(rule, value, message) {
  11289. if (rule.required && isEmptyValue(value, rule.format || (0, _typeof2.default)(value))) {
  11290. return formatMessage(rule, rule.errorMessage || message.required);
  11291. }
  11292. return null;
  11293. },
  11294. range: function range(rule, value, message) {
  11295. var range = rule.range,
  11296. errorMessage = rule.errorMessage;
  11297. var list = new Array(range.length);
  11298. for (var i = 0; i < range.length; i++) {
  11299. var item = range[i];
  11300. if (types.object(item) && item.value !== undefined) {
  11301. list[i] = item.value;
  11302. } else {
  11303. list[i] = item;
  11304. }
  11305. }
  11306. var result = false;
  11307. if (Array.isArray(value)) {
  11308. result = new Set(value.concat(list)).size === list.length;
  11309. } else {
  11310. if (list.indexOf(value) > -1) {
  11311. result = true;
  11312. }
  11313. }
  11314. if (!result) {
  11315. return formatMessage(rule, errorMessage || message['enum']);
  11316. }
  11317. return null;
  11318. },
  11319. rangeNumber: function rangeNumber(rule, value, message) {
  11320. if (!types.number(value)) {
  11321. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  11322. }
  11323. var minimum = rule.minimum,
  11324. maximum = rule.maximum,
  11325. exclusiveMinimum = rule.exclusiveMinimum,
  11326. exclusiveMaximum = rule.exclusiveMaximum;
  11327. var min = exclusiveMinimum ? value <= minimum : value < minimum;
  11328. var max = exclusiveMaximum ? value >= maximum : value > maximum;
  11329. if (minimum !== undefined && min) {
  11330. return formatMessage(rule, rule.errorMessage || message['number'][exclusiveMinimum ? 'exclusiveMinimum' : 'minimum']);
  11331. } else if (maximum !== undefined && max) {
  11332. return formatMessage(rule, rule.errorMessage || message['number'][exclusiveMaximum ? 'exclusiveMaximum' : 'maximum']);
  11333. } else if (minimum !== undefined && maximum !== undefined && (min || max)) {
  11334. return formatMessage(rule, rule.errorMessage || message['number'].range);
  11335. }
  11336. return null;
  11337. },
  11338. rangeLength: function rangeLength(rule, value, message) {
  11339. if (!types.string(value) && !types.array(value)) {
  11340. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  11341. }
  11342. var min = rule.minLength;
  11343. var max = rule.maxLength;
  11344. var val = value.length;
  11345. if (min !== undefined && val < min) {
  11346. return formatMessage(rule, rule.errorMessage || message['length'].minLength);
  11347. } else if (max !== undefined && val > max) {
  11348. return formatMessage(rule, rule.errorMessage || message['length'].maxLength);
  11349. } else if (min !== undefined && max !== undefined && (val < min || val > max)) {
  11350. return formatMessage(rule, rule.errorMessage || message['length'].range);
  11351. }
  11352. return null;
  11353. },
  11354. pattern: function pattern(rule, value, message) {
  11355. if (!types['pattern'](rule.pattern, value)) {
  11356. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  11357. }
  11358. return null;
  11359. },
  11360. format: function format(rule, value, message) {
  11361. var customTypes = Object.keys(types);
  11362. var format = FORMAT_MAPPING[rule.format] ? FORMAT_MAPPING[rule.format] : rule.format || rule.arrayType;
  11363. if (customTypes.indexOf(format) > -1) {
  11364. if (!types[format](value)) {
  11365. return formatMessage(rule, rule.errorMessage || message.typeError);
  11366. }
  11367. }
  11368. return null;
  11369. },
  11370. arrayTypeFormat: function arrayTypeFormat(rule, value, message) {
  11371. if (!Array.isArray(value)) {
  11372. return formatMessage(rule, rule.errorMessage || message.typeError);
  11373. }
  11374. for (var i = 0; i < value.length; i++) {
  11375. var element = value[i];
  11376. var formatResult = this.format(rule, element, message);
  11377. if (formatResult !== null) {
  11378. return formatResult;
  11379. }
  11380. }
  11381. return null;
  11382. }
  11383. };
  11384. var SchemaValidator = /*#__PURE__*/function (_RuleValidator) {
  11385. (0, _inherits2.default)(SchemaValidator, _RuleValidator);
  11386. var _super = _createSuper(SchemaValidator);
  11387. function SchemaValidator(schema, options) {
  11388. var _this;
  11389. (0, _classCallCheck2.default)(this, SchemaValidator);
  11390. _this = _super.call(this, SchemaValidator.message);
  11391. _this._schema = schema;
  11392. _this._options = options || null;
  11393. return _this;
  11394. }
  11395. (0, _createClass2.default)(SchemaValidator, [{
  11396. key: "updateSchema",
  11397. value: function updateSchema(schema) {
  11398. this._schema = schema;
  11399. }
  11400. }, {
  11401. key: "validate",
  11402. value: function () {
  11403. var _validate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(data, allData) {
  11404. var result;
  11405. return _regenerator.default.wrap(function _callee3$(_context3) {
  11406. while (1) {
  11407. switch (_context3.prev = _context3.next) {
  11408. case 0:
  11409. result = this._checkFieldInSchema(data);
  11410. if (result) {
  11411. _context3.next = 5;
  11412. break;
  11413. }
  11414. _context3.next = 4;
  11415. return this.invokeValidate(data, false, allData);
  11416. case 4:
  11417. result = _context3.sent;
  11418. case 5:
  11419. return _context3.abrupt("return", result.length ? result[0] : null);
  11420. case 6:
  11421. case "end":
  11422. return _context3.stop();
  11423. }
  11424. }
  11425. }, _callee3, this);
  11426. }));
  11427. function validate(_x11, _x12) {
  11428. return _validate.apply(this, arguments);
  11429. }
  11430. return validate;
  11431. }()
  11432. }, {
  11433. key: "validateAll",
  11434. value: function () {
  11435. var _validateAll = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(data, allData) {
  11436. var result;
  11437. return _regenerator.default.wrap(function _callee4$(_context4) {
  11438. while (1) {
  11439. switch (_context4.prev = _context4.next) {
  11440. case 0:
  11441. result = this._checkFieldInSchema(data);
  11442. if (result) {
  11443. _context4.next = 5;
  11444. break;
  11445. }
  11446. _context4.next = 4;
  11447. return this.invokeValidate(data, true, allData);
  11448. case 4:
  11449. result = _context4.sent;
  11450. case 5:
  11451. return _context4.abrupt("return", result);
  11452. case 6:
  11453. case "end":
  11454. return _context4.stop();
  11455. }
  11456. }
  11457. }, _callee4, this);
  11458. }));
  11459. function validateAll(_x13, _x14) {
  11460. return _validateAll.apply(this, arguments);
  11461. }
  11462. return validateAll;
  11463. }()
  11464. }, {
  11465. key: "validateUpdate",
  11466. value: function () {
  11467. var _validateUpdate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(data, allData) {
  11468. var result;
  11469. return _regenerator.default.wrap(function _callee5$(_context5) {
  11470. while (1) {
  11471. switch (_context5.prev = _context5.next) {
  11472. case 0:
  11473. result = this._checkFieldInSchema(data);
  11474. if (result) {
  11475. _context5.next = 5;
  11476. break;
  11477. }
  11478. _context5.next = 4;
  11479. return this.invokeValidateUpdate(data, false, allData);
  11480. case 4:
  11481. result = _context5.sent;
  11482. case 5:
  11483. return _context5.abrupt("return", result.length ? result[0] : null);
  11484. case 6:
  11485. case "end":
  11486. return _context5.stop();
  11487. }
  11488. }
  11489. }, _callee5, this);
  11490. }));
  11491. function validateUpdate(_x15, _x16) {
  11492. return _validateUpdate.apply(this, arguments);
  11493. }
  11494. return validateUpdate;
  11495. }()
  11496. }, {
  11497. key: "invokeValidate",
  11498. value: function () {
  11499. var _invokeValidate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(data, all, allData) {
  11500. var result, schema, key, value, errorMessage;
  11501. return _regenerator.default.wrap(function _callee6$(_context6) {
  11502. while (1) {
  11503. switch (_context6.prev = _context6.next) {
  11504. case 0:
  11505. result = [];
  11506. schema = this._schema;
  11507. _context6.t0 = _regenerator.default.keys(schema);
  11508. case 3:
  11509. if ((_context6.t1 = _context6.t0()).done) {
  11510. _context6.next = 15;
  11511. break;
  11512. }
  11513. key = _context6.t1.value;
  11514. value = schema[key];
  11515. _context6.next = 8;
  11516. return this.validateRule(key, value, data[key], data, allData);
  11517. case 8:
  11518. errorMessage = _context6.sent;
  11519. if (!(errorMessage != null)) {
  11520. _context6.next = 13;
  11521. break;
  11522. }
  11523. result.push({
  11524. key: key,
  11525. errorMessage: errorMessage
  11526. });
  11527. if (all) {
  11528. _context6.next = 13;
  11529. break;
  11530. }
  11531. return _context6.abrupt("break", 15);
  11532. case 13:
  11533. _context6.next = 3;
  11534. break;
  11535. case 15:
  11536. return _context6.abrupt("return", result);
  11537. case 16:
  11538. case "end":
  11539. return _context6.stop();
  11540. }
  11541. }
  11542. }, _callee6, this);
  11543. }));
  11544. function invokeValidate(_x17, _x18, _x19) {
  11545. return _invokeValidate.apply(this, arguments);
  11546. }
  11547. return invokeValidate;
  11548. }()
  11549. }, {
  11550. key: "invokeValidateUpdate",
  11551. value: function () {
  11552. var _invokeValidateUpdate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(data, all, allData) {
  11553. var result, key, errorMessage;
  11554. return _regenerator.default.wrap(function _callee7$(_context7) {
  11555. while (1) {
  11556. switch (_context7.prev = _context7.next) {
  11557. case 0:
  11558. result = [];
  11559. _context7.t0 = _regenerator.default.keys(data);
  11560. case 2:
  11561. if ((_context7.t1 = _context7.t0()).done) {
  11562. _context7.next = 13;
  11563. break;
  11564. }
  11565. key = _context7.t1.value;
  11566. _context7.next = 6;
  11567. return this.validateRule(key, this._schema[key], data[key], data, allData);
  11568. case 6:
  11569. errorMessage = _context7.sent;
  11570. if (!(errorMessage != null)) {
  11571. _context7.next = 11;
  11572. break;
  11573. }
  11574. result.push({
  11575. key: key,
  11576. errorMessage: errorMessage
  11577. });
  11578. if (all) {
  11579. _context7.next = 11;
  11580. break;
  11581. }
  11582. return _context7.abrupt("break", 13);
  11583. case 11:
  11584. _context7.next = 2;
  11585. break;
  11586. case 13:
  11587. return _context7.abrupt("return", result);
  11588. case 14:
  11589. case "end":
  11590. return _context7.stop();
  11591. }
  11592. }
  11593. }, _callee7, this);
  11594. }));
  11595. function invokeValidateUpdate(_x20, _x21, _x22) {
  11596. return _invokeValidateUpdate.apply(this, arguments);
  11597. }
  11598. return invokeValidateUpdate;
  11599. }()
  11600. }, {
  11601. key: "_checkFieldInSchema",
  11602. value: function _checkFieldInSchema(data) {
  11603. var keys = Object.keys(data);
  11604. var keys2 = Object.keys(this._schema);
  11605. if (new Set(keys.concat(keys2)).size === keys2.length) {
  11606. return '';
  11607. }
  11608. var noExistFields = keys.filter(function (key) {
  11609. return keys2.indexOf(key) < 0;
  11610. });
  11611. var errorMessage = formatMessage({
  11612. field: JSON.stringify(noExistFields)
  11613. }, SchemaValidator.message.TAG + SchemaValidator.message['defaultInvalid']);
  11614. return [{
  11615. key: 'invalid',
  11616. errorMessage: errorMessage
  11617. }];
  11618. }
  11619. }]);
  11620. return SchemaValidator;
  11621. }(RuleValidator);
  11622. function Message() {
  11623. return {
  11624. TAG: "",
  11625. default: '验证错误',
  11626. defaultInvalid: '提交的字段{field}在数据库中并不存在',
  11627. validateFunction: '验证无效',
  11628. required: '{label}必填',
  11629. 'enum': '{label}超出范围',
  11630. timestamp: '{label}格式无效',
  11631. whitespace: '{label}不能为空',
  11632. typeError: '{label}类型无效',
  11633. date: {
  11634. format: '{label}日期{value}格式无效',
  11635. parse: '{label}日期无法解析,{value}无效',
  11636. invalid: '{label}日期{value}无效'
  11637. },
  11638. length: {
  11639. minLength: '{label}长度不能少于{minLength}',
  11640. maxLength: '{label}长度不能超过{maxLength}',
  11641. range: '{label}必须介于{minLength}和{maxLength}之间'
  11642. },
  11643. number: {
  11644. minimum: '{label}不能小于{minimum}',
  11645. maximum: '{label}不能大于{maximum}',
  11646. exclusiveMinimum: '{label}不能小于等于{minimum}',
  11647. exclusiveMaximum: '{label}不能大于等于{maximum}',
  11648. range: '{label}必须介于{minimum}and{maximum}之间'
  11649. },
  11650. pattern: {
  11651. mismatch: '{label}格式不匹配'
  11652. }
  11653. };
  11654. }
  11655. SchemaValidator.message = new Message();
  11656. var _default = SchemaValidator;
  11657. exports.default = _default;
  11658. /***/ }),
  11659. /***/ 394:
  11660. /*!*********************************************************!*\
  11661. !*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
  11662. \*********************************************************/
  11663. /*! no static exports found */
  11664. /***/ (function(module, exports, __webpack_require__) {
  11665. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  11666. function _inherits(subClass, superClass) {
  11667. if (typeof superClass !== "function" && superClass !== null) {
  11668. throw new TypeError("Super expression must either be null or a function");
  11669. }
  11670. subClass.prototype = Object.create(superClass && superClass.prototype, {
  11671. constructor: {
  11672. value: subClass,
  11673. writable: true,
  11674. configurable: true
  11675. }
  11676. });
  11677. Object.defineProperty(subClass, "prototype", {
  11678. writable: false
  11679. });
  11680. if (superClass) setPrototypeOf(subClass, superClass);
  11681. }
  11682. module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11683. /***/ }),
  11684. /***/ 395:
  11685. /*!**************************************************************************!*\
  11686. !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
  11687. \**************************************************************************/
  11688. /*! no static exports found */
  11689. /***/ (function(module, exports, __webpack_require__) {
  11690. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  11691. var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ 396);
  11692. function _possibleConstructorReturn(self, call) {
  11693. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  11694. return call;
  11695. } else if (call !== void 0) {
  11696. throw new TypeError("Derived constructors may only return object or undefined");
  11697. }
  11698. return assertThisInitialized(self);
  11699. }
  11700. module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11701. /***/ }),
  11702. /***/ 396:
  11703. /*!**********************************************************************!*\
  11704. !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
  11705. \**********************************************************************/
  11706. /*! no static exports found */
  11707. /***/ (function(module, exports) {
  11708. function _assertThisInitialized(self) {
  11709. if (self === void 0) {
  11710. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  11711. }
  11712. return self;
  11713. }
  11714. module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11715. /***/ }),
  11716. /***/ 397:
  11717. /*!***************************************************************!*\
  11718. !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
  11719. \***************************************************************/
  11720. /*! no static exports found */
  11721. /***/ (function(module, exports) {
  11722. function _getPrototypeOf(o) {
  11723. module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  11724. return o.__proto__ || Object.getPrototypeOf(o);
  11725. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11726. return _getPrototypeOf(o);
  11727. }
  11728. module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11729. /***/ }),
  11730. /***/ 398:
  11731. /*!*******************************************************************************!*\
  11732. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-forms/components/uni-forms/utils.js ***!
  11733. \*******************************************************************************/
  11734. /*! no static exports found */
  11735. /***/ (function(module, exports, __webpack_require__) {
  11736. "use strict";
  11737. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11738. Object.defineProperty(exports, "__esModule", {
  11739. value: true
  11740. });
  11741. exports.typeFilter = exports.type = exports.setDataValue = exports.realName = exports.rawData = exports.objSet = exports.objGet = exports.name2arr = exports.isRequiredField = exports.isRealName = exports.isNumber = exports.isEqual = exports.isBoolean = exports.getValue = exports.getDataValueType = exports.getDataValue = exports.deepCopy = void 0;
  11742. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  11743. /**
  11744. * 简单处理对象拷贝
  11745. * @param {Obejct} 被拷贝对象
  11746. * @@return {Object} 拷贝对象
  11747. */
  11748. var deepCopy = function deepCopy(val) {
  11749. return JSON.parse(JSON.stringify(val));
  11750. };
  11751. /**
  11752. * 过滤数字类型
  11753. * @param {String} format 数字类型
  11754. * @@return {Boolean} 返回是否为数字类型
  11755. */
  11756. exports.deepCopy = deepCopy;
  11757. var typeFilter = function typeFilter(format) {
  11758. return format === 'int' || format === 'double' || format === 'number' || format === 'timestamp';
  11759. };
  11760. /**
  11761. * 把 value 转换成指定的类型,用于处理初始值,原因是初始值需要入库不能为 undefined
  11762. * @param {String} key 字段名
  11763. * @param {any} value 字段值
  11764. * @param {Object} rules 表单校验规则
  11765. */
  11766. exports.typeFilter = typeFilter;
  11767. var getValue = function getValue(key, value, rules) {
  11768. var isRuleNumType = rules.find(function (val) {
  11769. return val.format && typeFilter(val.format);
  11770. });
  11771. var isRuleBoolType = rules.find(function (val) {
  11772. return val.format && val.format === 'boolean' || val.format === 'bool';
  11773. });
  11774. // 输入类型为 number
  11775. if (!!isRuleNumType) {
  11776. if (!value && value !== 0) {
  11777. value = null;
  11778. } else {
  11779. value = isNumber(Number(value)) ? Number(value) : value;
  11780. }
  11781. }
  11782. // 输入类型为 boolean
  11783. if (!!isRuleBoolType) {
  11784. value = isBoolean(value) ? value : false;
  11785. }
  11786. return value;
  11787. };
  11788. /**
  11789. * 获取表单数据
  11790. * @param {String|Array} name 真实名称,需要使用 realName 获取
  11791. * @param {Object} data 原始数据
  11792. * @param {any} value 需要设置的值
  11793. */
  11794. exports.getValue = getValue;
  11795. var setDataValue = function setDataValue(field, formdata, value) {
  11796. formdata[field] = value;
  11797. return value || '';
  11798. };
  11799. /**
  11800. * 获取表单数据
  11801. * @param {String|Array} field 真实名称,需要使用 realName 获取
  11802. * @param {Object} data 原始数据
  11803. */
  11804. exports.setDataValue = setDataValue;
  11805. var getDataValue = function getDataValue(field, data) {
  11806. return objGet(data, field);
  11807. };
  11808. /**
  11809. * 获取表单类型
  11810. * @param {String|Array} field 真实名称,需要使用 realName 获取
  11811. */
  11812. exports.getDataValue = getDataValue;
  11813. var getDataValueType = function getDataValueType(field, data) {
  11814. var value = getDataValue(field, data);
  11815. return {
  11816. type: type(value),
  11817. value: value
  11818. };
  11819. };
  11820. /**
  11821. * 获取表单可用的真实name
  11822. * @param {String|Array} name 表单name
  11823. * @@return {String} 表单可用的真实name
  11824. */
  11825. exports.getDataValueType = getDataValueType;
  11826. var realName = function realName(name) {
  11827. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  11828. var base_name = _basePath(name);
  11829. if ((0, _typeof2.default)(base_name) === 'object' && Array.isArray(base_name) && base_name.length > 1) {
  11830. var realname = base_name.reduce(function (a, b) {
  11831. return a += "#".concat(b);
  11832. }, '_formdata_');
  11833. return realname;
  11834. }
  11835. return base_name[0] || name;
  11836. };
  11837. /**
  11838. * 判断是否表单可用的真实name
  11839. * @param {String|Array} name 表单name
  11840. * @@return {String} 表单可用的真实name
  11841. */
  11842. exports.realName = realName;
  11843. var isRealName = function isRealName(name) {
  11844. var reg = /^_formdata_#*/;
  11845. return reg.test(name);
  11846. };
  11847. /**
  11848. * 获取表单数据的原始格式
  11849. * @@return {Object|Array} object 需要解析的数据
  11850. */
  11851. exports.isRealName = isRealName;
  11852. var rawData = function rawData() {
  11853. var object = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11854. var name = arguments.length > 1 ? arguments[1] : undefined;
  11855. var newData = JSON.parse(JSON.stringify(object));
  11856. var formData = {};
  11857. for (var i in newData) {
  11858. var path = name2arr(i);
  11859. objSet(formData, path, newData[i]);
  11860. }
  11861. return formData;
  11862. };
  11863. /**
  11864. * 真实name还原为 array
  11865. * @param {*} name
  11866. */
  11867. exports.rawData = rawData;
  11868. var name2arr = function name2arr(name) {
  11869. var field = name.replace('_formdata_#', '');
  11870. field = field.split('#').map(function (v) {
  11871. return isNumber(v) ? Number(v) : v;
  11872. });
  11873. return field;
  11874. };
  11875. /**
  11876. * 对象中设置值
  11877. * @param {Object|Array} object 源数据
  11878. * @param {String| Array} path 'a.b.c' 或 ['a',0,'b','c']
  11879. * @param {String} value 需要设置的值
  11880. */
  11881. exports.name2arr = name2arr;
  11882. var objSet = function objSet(object, path, value) {
  11883. if ((0, _typeof2.default)(object) !== 'object') return object;
  11884. _basePath(path).reduce(function (o, k, i, _) {
  11885. if (i === _.length - 1) {
  11886. // 若遍历结束直接赋值
  11887. o[k] = value;
  11888. return null;
  11889. } else if (k in o) {
  11890. // 若存在对应路径,则返回找到的对象,进行下一次遍历
  11891. return o[k];
  11892. } else {
  11893. // 若不存在对应路径,则创建对应对象,若下一路径是数字,新对象赋值为空数组,否则赋值为空对象
  11894. o[k] = /^[0-9]{1,}$/.test(_[i + 1]) ? [] : {};
  11895. return o[k];
  11896. }
  11897. }, object);
  11898. // 返回object
  11899. return object;
  11900. };
  11901. // 处理 path, path有三种形式:'a[0].b.c'、'a.0.b.c' 和 ['a','0','b','c'],需要统一处理成数组,便于后续使用
  11902. exports.objSet = objSet;
  11903. function _basePath(path) {
  11904. // 若是数组,则直接返回
  11905. if (Array.isArray(path)) return path;
  11906. // 若有 '[',']',则替换成将 '[' 替换成 '.',去掉 ']'
  11907. return path.replace(/\[/g, '.').replace(/\]/g, '').split('.');
  11908. }
  11909. /**
  11910. * 从对象中获取值
  11911. * @param {Object|Array} object 源数据
  11912. * @param {String| Array} path 'a.b.c' 或 ['a',0,'b','c']
  11913. * @param {String} defaultVal 如果无法从调用链中获取值的默认值
  11914. */
  11915. var objGet = function objGet(object, path) {
  11916. var defaultVal = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'undefined';
  11917. // 先将path处理成统一格式
  11918. var newPath = _basePath(path);
  11919. // 递归处理,返回最后结果
  11920. var val = newPath.reduce(function (o, k) {
  11921. return (o || {})[k];
  11922. }, object);
  11923. return !val || val !== undefined ? val : defaultVal;
  11924. };
  11925. /**
  11926. * 是否为 number 类型
  11927. * @param {any} num 需要判断的值
  11928. * @return {Boolean} 是否为 number
  11929. */
  11930. exports.objGet = objGet;
  11931. var isNumber = function isNumber(num) {
  11932. return !isNaN(Number(num));
  11933. };
  11934. /**
  11935. * 是否为 boolean 类型
  11936. * @param {any} bool 需要判断的值
  11937. * @return {Boolean} 是否为 boolean
  11938. */
  11939. exports.isNumber = isNumber;
  11940. var isBoolean = function isBoolean(bool) {
  11941. return typeof bool === 'boolean';
  11942. };
  11943. /**
  11944. * 是否有必填字段
  11945. * @param {Object} rules 规则
  11946. * @return {Boolean} 是否有必填字段
  11947. */
  11948. exports.isBoolean = isBoolean;
  11949. var isRequiredField = function isRequiredField(rules) {
  11950. var isNoField = false;
  11951. for (var i = 0; i < rules.length; i++) {
  11952. var ruleData = rules[i];
  11953. if (ruleData.required) {
  11954. isNoField = true;
  11955. break;
  11956. }
  11957. }
  11958. return isNoField;
  11959. };
  11960. /**
  11961. * 获取数据类型
  11962. * @param {Any} obj 需要获取数据类型的值
  11963. */
  11964. exports.isRequiredField = isRequiredField;
  11965. var type = function type(obj) {
  11966. var class2type = {};
  11967. // 生成class2type映射
  11968. "Boolean Number String Function Array Date RegExp Object Error".split(" ").map(function (item, index) {
  11969. class2type["[object " + item + "]"] = item.toLowerCase();
  11970. });
  11971. if (obj == null) {
  11972. return obj + "";
  11973. }
  11974. return (0, _typeof2.default)(obj) === "object" || typeof obj === "function" ? class2type[Object.prototype.toString.call(obj)] || "object" : (0, _typeof2.default)(obj);
  11975. };
  11976. /**
  11977. * 判断两个值是否相等
  11978. * @param {any} a 值
  11979. * @param {any} b 值
  11980. * @return {Boolean} 是否相等
  11981. */
  11982. exports.type = type;
  11983. var isEqual = function isEqual(a, b) {
  11984. //如果a和b本来就全等
  11985. if (a === b) {
  11986. //判断是否为0和-0
  11987. return a !== 0 || 1 / a === 1 / b;
  11988. }
  11989. //判断是否为null和undefined
  11990. if (a == null || b == null) {
  11991. return a === b;
  11992. }
  11993. //接下来判断a和b的数据类型
  11994. var classNameA = toString.call(a),
  11995. classNameB = toString.call(b);
  11996. //如果数据类型不相等,则返回false
  11997. if (classNameA !== classNameB) {
  11998. return false;
  11999. }
  12000. //如果数据类型相等,再根据不同数据类型分别判断
  12001. switch (classNameA) {
  12002. case '[object RegExp]':
  12003. case '[object String]':
  12004. //进行字符串转换比较
  12005. return '' + a === '' + b;
  12006. case '[object Number]':
  12007. //进行数字转换比较,判断是否为NaN
  12008. if (+a !== +a) {
  12009. return +b !== +b;
  12010. }
  12011. //判断是否为0或-0
  12012. return +a === 0 ? 1 / +a === 1 / b : +a === +b;
  12013. case '[object Date]':
  12014. case '[object Boolean]':
  12015. return +a === +b;
  12016. }
  12017. //如果是对象类型
  12018. if (classNameA == '[object Object]') {
  12019. //获取a和b的属性长度
  12020. var propsA = Object.getOwnPropertyNames(a),
  12021. propsB = Object.getOwnPropertyNames(b);
  12022. if (propsA.length != propsB.length) {
  12023. return false;
  12024. }
  12025. for (var i = 0; i < propsA.length; i++) {
  12026. var propName = propsA[i];
  12027. //如果对应属性对应值不相等,则返回false
  12028. if (a[propName] !== b[propName]) {
  12029. return false;
  12030. }
  12031. }
  12032. return true;
  12033. }
  12034. //如果是数组类型
  12035. if (classNameA == '[object Array]') {
  12036. if (a.toString() == b.toString()) {
  12037. return true;
  12038. }
  12039. return false;
  12040. }
  12041. };
  12042. exports.isEqual = isEqual;
  12043. /***/ }),
  12044. /***/ 4:
  12045. /*!**********************************************************************!*\
  12046. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  12047. \**********************************************************************/
  12048. /*! no static exports found */
  12049. /***/ (function(module, exports) {
  12050. function _interopRequireDefault(obj) {
  12051. return obj && obj.__esModule ? obj : {
  12052. "default": obj
  12053. };
  12054. }
  12055. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  12056. /***/ }),
  12057. /***/ 40:
  12058. /*!************************************************************************************************!*\
  12059. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  12060. \************************************************************************************************/
  12061. /*! no static exports found */
  12062. /***/ (function(module, exports, __webpack_require__) {
  12063. // TODO(Babel 8): Remove this file.
  12064. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 41)();
  12065. module.exports = runtime;
  12066. /***/ }),
  12067. /***/ 41:
  12068. /*!*******************************************************************!*\
  12069. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  12070. \*******************************************************************/
  12071. /*! no static exports found */
  12072. /***/ (function(module, exports, __webpack_require__) {
  12073. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  12074. function _regeneratorRuntime() {
  12075. "use strict";
  12076. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  12077. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  12078. return exports;
  12079. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  12080. var exports = {},
  12081. Op = Object.prototype,
  12082. hasOwn = Op.hasOwnProperty,
  12083. defineProperty = Object.defineProperty || function (obj, key, desc) {
  12084. obj[key] = desc.value;
  12085. },
  12086. $Symbol = "function" == typeof Symbol ? Symbol : {},
  12087. iteratorSymbol = $Symbol.iterator || "@@iterator",
  12088. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  12089. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  12090. function define(obj, key, value) {
  12091. return Object.defineProperty(obj, key, {
  12092. value: value,
  12093. enumerable: !0,
  12094. configurable: !0,
  12095. writable: !0
  12096. }), obj[key];
  12097. }
  12098. try {
  12099. define({}, "");
  12100. } catch (err) {
  12101. define = function define(obj, key, value) {
  12102. return obj[key] = value;
  12103. };
  12104. }
  12105. function wrap(innerFn, outerFn, self, tryLocsList) {
  12106. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  12107. generator = Object.create(protoGenerator.prototype),
  12108. context = new Context(tryLocsList || []);
  12109. return defineProperty(generator, "_invoke", {
  12110. value: makeInvokeMethod(innerFn, self, context)
  12111. }), generator;
  12112. }
  12113. function tryCatch(fn, obj, arg) {
  12114. try {
  12115. return {
  12116. type: "normal",
  12117. arg: fn.call(obj, arg)
  12118. };
  12119. } catch (err) {
  12120. return {
  12121. type: "throw",
  12122. arg: err
  12123. };
  12124. }
  12125. }
  12126. exports.wrap = wrap;
  12127. var ContinueSentinel = {};
  12128. function Generator() {}
  12129. function GeneratorFunction() {}
  12130. function GeneratorFunctionPrototype() {}
  12131. var IteratorPrototype = {};
  12132. define(IteratorPrototype, iteratorSymbol, function () {
  12133. return this;
  12134. });
  12135. var getProto = Object.getPrototypeOf,
  12136. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  12137. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  12138. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  12139. function defineIteratorMethods(prototype) {
  12140. ["next", "throw", "return"].forEach(function (method) {
  12141. define(prototype, method, function (arg) {
  12142. return this._invoke(method, arg);
  12143. });
  12144. });
  12145. }
  12146. function AsyncIterator(generator, PromiseImpl) {
  12147. function invoke(method, arg, resolve, reject) {
  12148. var record = tryCatch(generator[method], generator, arg);
  12149. if ("throw" !== record.type) {
  12150. var result = record.arg,
  12151. value = result.value;
  12152. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  12153. invoke("next", value, resolve, reject);
  12154. }, function (err) {
  12155. invoke("throw", err, resolve, reject);
  12156. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  12157. result.value = unwrapped, resolve(result);
  12158. }, function (error) {
  12159. return invoke("throw", error, resolve, reject);
  12160. });
  12161. }
  12162. reject(record.arg);
  12163. }
  12164. var previousPromise;
  12165. defineProperty(this, "_invoke", {
  12166. value: function value(method, arg) {
  12167. function callInvokeWithMethodAndArg() {
  12168. return new PromiseImpl(function (resolve, reject) {
  12169. invoke(method, arg, resolve, reject);
  12170. });
  12171. }
  12172. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  12173. }
  12174. });
  12175. }
  12176. function makeInvokeMethod(innerFn, self, context) {
  12177. var state = "suspendedStart";
  12178. return function (method, arg) {
  12179. if ("executing" === state) throw new Error("Generator is already running");
  12180. if ("completed" === state) {
  12181. if ("throw" === method) throw arg;
  12182. return doneResult();
  12183. }
  12184. for (context.method = method, context.arg = arg;;) {
  12185. var delegate = context.delegate;
  12186. if (delegate) {
  12187. var delegateResult = maybeInvokeDelegate(delegate, context);
  12188. if (delegateResult) {
  12189. if (delegateResult === ContinueSentinel) continue;
  12190. return delegateResult;
  12191. }
  12192. }
  12193. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  12194. if ("suspendedStart" === state) throw state = "completed", context.arg;
  12195. context.dispatchException(context.arg);
  12196. } else "return" === context.method && context.abrupt("return", context.arg);
  12197. state = "executing";
  12198. var record = tryCatch(innerFn, self, context);
  12199. if ("normal" === record.type) {
  12200. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  12201. return {
  12202. value: record.arg,
  12203. done: context.done
  12204. };
  12205. }
  12206. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  12207. }
  12208. };
  12209. }
  12210. function maybeInvokeDelegate(delegate, context) {
  12211. var methodName = context.method,
  12212. method = delegate.iterator[methodName];
  12213. if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
  12214. var record = tryCatch(method, delegate.iterator, context.arg);
  12215. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  12216. var info = record.arg;
  12217. return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
  12218. }
  12219. function pushTryEntry(locs) {
  12220. var entry = {
  12221. tryLoc: locs[0]
  12222. };
  12223. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  12224. }
  12225. function resetTryEntry(entry) {
  12226. var record = entry.completion || {};
  12227. record.type = "normal", delete record.arg, entry.completion = record;
  12228. }
  12229. function Context(tryLocsList) {
  12230. this.tryEntries = [{
  12231. tryLoc: "root"
  12232. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  12233. }
  12234. function values(iterable) {
  12235. if (iterable) {
  12236. var iteratorMethod = iterable[iteratorSymbol];
  12237. if (iteratorMethod) return iteratorMethod.call(iterable);
  12238. if ("function" == typeof iterable.next) return iterable;
  12239. if (!isNaN(iterable.length)) {
  12240. var i = -1,
  12241. next = function next() {
  12242. for (; ++i < iterable.length;) {
  12243. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  12244. }
  12245. return next.value = undefined, next.done = !0, next;
  12246. };
  12247. return next.next = next;
  12248. }
  12249. }
  12250. return {
  12251. next: doneResult
  12252. };
  12253. }
  12254. function doneResult() {
  12255. return {
  12256. value: undefined,
  12257. done: !0
  12258. };
  12259. }
  12260. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  12261. value: GeneratorFunctionPrototype,
  12262. configurable: !0
  12263. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  12264. value: GeneratorFunction,
  12265. configurable: !0
  12266. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  12267. var ctor = "function" == typeof genFun && genFun.constructor;
  12268. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  12269. }, exports.mark = function (genFun) {
  12270. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  12271. }, exports.awrap = function (arg) {
  12272. return {
  12273. __await: arg
  12274. };
  12275. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  12276. return this;
  12277. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  12278. void 0 === PromiseImpl && (PromiseImpl = Promise);
  12279. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  12280. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  12281. return result.done ? result.value : iter.next();
  12282. });
  12283. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  12284. return this;
  12285. }), define(Gp, "toString", function () {
  12286. return "[object Generator]";
  12287. }), exports.keys = function (val) {
  12288. var object = Object(val),
  12289. keys = [];
  12290. for (var key in object) {
  12291. keys.push(key);
  12292. }
  12293. return keys.reverse(), function next() {
  12294. for (; keys.length;) {
  12295. var key = keys.pop();
  12296. if (key in object) return next.value = key, next.done = !1, next;
  12297. }
  12298. return next.done = !0, next;
  12299. };
  12300. }, exports.values = values, Context.prototype = {
  12301. constructor: Context,
  12302. reset: function reset(skipTempReset) {
  12303. if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
  12304. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  12305. }
  12306. },
  12307. stop: function stop() {
  12308. this.done = !0;
  12309. var rootRecord = this.tryEntries[0].completion;
  12310. if ("throw" === rootRecord.type) throw rootRecord.arg;
  12311. return this.rval;
  12312. },
  12313. dispatchException: function dispatchException(exception) {
  12314. if (this.done) throw exception;
  12315. var context = this;
  12316. function handle(loc, caught) {
  12317. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  12318. }
  12319. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  12320. var entry = this.tryEntries[i],
  12321. record = entry.completion;
  12322. if ("root" === entry.tryLoc) return handle("end");
  12323. if (entry.tryLoc <= this.prev) {
  12324. var hasCatch = hasOwn.call(entry, "catchLoc"),
  12325. hasFinally = hasOwn.call(entry, "finallyLoc");
  12326. if (hasCatch && hasFinally) {
  12327. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  12328. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  12329. } else if (hasCatch) {
  12330. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  12331. } else {
  12332. if (!hasFinally) throw new Error("try statement without catch or finally");
  12333. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  12334. }
  12335. }
  12336. }
  12337. },
  12338. abrupt: function abrupt(type, arg) {
  12339. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  12340. var entry = this.tryEntries[i];
  12341. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  12342. var finallyEntry = entry;
  12343. break;
  12344. }
  12345. }
  12346. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  12347. var record = finallyEntry ? finallyEntry.completion : {};
  12348. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  12349. },
  12350. complete: function complete(record, afterLoc) {
  12351. if ("throw" === record.type) throw record.arg;
  12352. return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
  12353. },
  12354. finish: function finish(finallyLoc) {
  12355. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  12356. var entry = this.tryEntries[i];
  12357. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  12358. }
  12359. },
  12360. "catch": function _catch(tryLoc) {
  12361. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  12362. var entry = this.tryEntries[i];
  12363. if (entry.tryLoc === tryLoc) {
  12364. var record = entry.completion;
  12365. if ("throw" === record.type) {
  12366. var thrown = record.arg;
  12367. resetTryEntry(entry);
  12368. }
  12369. return thrown;
  12370. }
  12371. }
  12372. throw new Error("illegal catch attempt");
  12373. },
  12374. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  12375. return this.delegate = {
  12376. iterator: values(iterable),
  12377. resultName: resultName,
  12378. nextLoc: nextLoc
  12379. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  12380. }
  12381. }, exports;
  12382. }
  12383. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  12384. /***/ }),
  12385. /***/ 413:
  12386. /*!************************************************************************************!*\
  12387. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js ***!
  12388. \************************************************************************************/
  12389. /*! no static exports found */
  12390. /***/ (function(module, exports, __webpack_require__) {
  12391. "use strict";
  12392. /* WEBPACK VAR INJECTION */(function(global, uni, wx) {
  12393. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  12394. Object.defineProperty(exports, "__esModule", {
  12395. value: true
  12396. });
  12397. exports.default = void 0;
  12398. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  12399. var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ 396));
  12400. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  12401. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  12402. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  12403. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  12404. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 394));
  12405. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 395));
  12406. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 397));
  12407. var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ 414));
  12408. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  12409. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  12410. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  12411. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  12412. var _pages = _interopRequireDefault(__webpack_require__(/*! @/pages.json */ 416));
  12413. 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(_e34) { throw _e34; }, 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(_e35) { didErr = true; err = _e35; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  12414. 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); }
  12415. 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; }
  12416. 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); }; }
  12417. 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; } }
  12418. 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; }
  12419. 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; }
  12420. "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
  12421. function n(e) {
  12422. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  12423. }
  12424. function s(e, t, n) {
  12425. return e(n = {
  12426. path: t,
  12427. exports: {},
  12428. require: function require(e, t) {
  12429. return function () {
  12430. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  12431. }(null == t && n.path);
  12432. }
  12433. }, n.exports), n.exports;
  12434. }
  12435. var r = s(function (e, t) {
  12436. var n;
  12437. e.exports = (n = n || function (e, t) {
  12438. var n = Object.create || function () {
  12439. function e() {}
  12440. return function (t) {
  12441. var n;
  12442. return e.prototype = t, n = new e(), e.prototype = null, n;
  12443. };
  12444. }(),
  12445. s = {},
  12446. r = s.lib = {},
  12447. i = r.Base = {
  12448. extend: function extend(e) {
  12449. var t = n(this);
  12450. return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {
  12451. t.$super.init.apply(this, arguments);
  12452. }), t.init.prototype = t, t.$super = this, t;
  12453. },
  12454. create: function create() {
  12455. var e = this.extend();
  12456. return e.init.apply(e, arguments), e;
  12457. },
  12458. init: function init() {},
  12459. mixIn: function mixIn(e) {
  12460. for (var t in e) {
  12461. e.hasOwnProperty(t) && (this[t] = e[t]);
  12462. }
  12463. e.hasOwnProperty("toString") && (this.toString = e.toString);
  12464. },
  12465. clone: function clone() {
  12466. return this.init.prototype.extend(this);
  12467. }
  12468. },
  12469. o = r.WordArray = i.extend({
  12470. init: function init(e, n) {
  12471. e = this.words = e || [], this.sigBytes = n != t ? n : 4 * e.length;
  12472. },
  12473. toString: function toString(e) {
  12474. return (e || c).stringify(this);
  12475. },
  12476. concat: function concat(e) {
  12477. var t = this.words,
  12478. n = e.words,
  12479. s = this.sigBytes,
  12480. r = e.sigBytes;
  12481. if (this.clamp(), s % 4) for (var i = 0; i < r; i++) {
  12482. var o = n[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  12483. t[s + i >>> 2] |= o << 24 - (s + i) % 4 * 8;
  12484. } else for (i = 0; i < r; i += 4) {
  12485. t[s + i >>> 2] = n[i >>> 2];
  12486. }
  12487. return this.sigBytes += r, this;
  12488. },
  12489. clamp: function clamp() {
  12490. var t = this.words,
  12491. n = this.sigBytes;
  12492. t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);
  12493. },
  12494. clone: function clone() {
  12495. var e = i.clone.call(this);
  12496. return e.words = this.words.slice(0), e;
  12497. },
  12498. random: function random(t) {
  12499. for (var n, s = [], r = function r(t) {
  12500. t = t;
  12501. var n = 987654321,
  12502. s = 4294967295;
  12503. return function () {
  12504. var r = ((n = 36969 * (65535 & n) + (n >> 16) & s) << 16) + (t = 18e3 * (65535 & t) + (t >> 16) & s) & s;
  12505. return r /= 4294967296, (r += .5) * (e.random() > .5 ? 1 : -1);
  12506. };
  12507. }, i = 0; i < t; i += 4) {
  12508. var a = r(4294967296 * (n || e.random()));
  12509. n = 987654071 * a(), s.push(4294967296 * a() | 0);
  12510. }
  12511. return new o.init(s, t);
  12512. }
  12513. }),
  12514. a = s.enc = {},
  12515. c = a.Hex = {
  12516. stringify: function stringify(e) {
  12517. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  12518. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  12519. s.push((i >>> 4).toString(16)), s.push((15 & i).toString(16));
  12520. }
  12521. return s.join("");
  12522. },
  12523. parse: function parse(e) {
  12524. for (var t = e.length, n = [], s = 0; s < t; s += 2) {
  12525. n[s >>> 3] |= parseInt(e.substr(s, 2), 16) << 24 - s % 8 * 4;
  12526. }
  12527. return new o.init(n, t / 2);
  12528. }
  12529. },
  12530. u = a.Latin1 = {
  12531. stringify: function stringify(e) {
  12532. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  12533. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  12534. s.push(String.fromCharCode(i));
  12535. }
  12536. return s.join("");
  12537. },
  12538. parse: function parse(e) {
  12539. for (var t = e.length, n = [], s = 0; s < t; s++) {
  12540. n[s >>> 2] |= (255 & e.charCodeAt(s)) << 24 - s % 4 * 8;
  12541. }
  12542. return new o.init(n, t);
  12543. }
  12544. },
  12545. h = a.Utf8 = {
  12546. stringify: function stringify(e) {
  12547. try {
  12548. return decodeURIComponent(escape(u.stringify(e)));
  12549. } catch (e) {
  12550. throw new Error("Malformed UTF-8 data");
  12551. }
  12552. },
  12553. parse: function parse(e) {
  12554. return u.parse(unescape(encodeURIComponent(e)));
  12555. }
  12556. },
  12557. l = r.BufferedBlockAlgorithm = i.extend({
  12558. reset: function reset() {
  12559. this._data = new o.init(), this._nDataBytes = 0;
  12560. },
  12561. _append: function _append(e) {
  12562. "string" == typeof e && (e = h.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;
  12563. },
  12564. _process: function _process(t) {
  12565. var n = this._data,
  12566. s = n.words,
  12567. r = n.sigBytes,
  12568. i = this.blockSize,
  12569. a = r / (4 * i),
  12570. c = (a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0)) * i,
  12571. u = e.min(4 * c, r);
  12572. if (c) {
  12573. for (var h = 0; h < c; h += i) {
  12574. this._doProcessBlock(s, h);
  12575. }
  12576. var l = s.splice(0, c);
  12577. n.sigBytes -= u;
  12578. }
  12579. return new o.init(l, u);
  12580. },
  12581. clone: function clone() {
  12582. var e = i.clone.call(this);
  12583. return e._data = this._data.clone(), e;
  12584. },
  12585. _minBufferSize: 0
  12586. });
  12587. r.Hasher = l.extend({
  12588. cfg: i.extend(),
  12589. init: function init(e) {
  12590. this.cfg = this.cfg.extend(e), this.reset();
  12591. },
  12592. reset: function reset() {
  12593. l.reset.call(this), this._doReset();
  12594. },
  12595. update: function update(e) {
  12596. return this._append(e), this._process(), this;
  12597. },
  12598. finalize: function finalize(e) {
  12599. return e && this._append(e), this._doFinalize();
  12600. },
  12601. blockSize: 16,
  12602. _createHelper: function _createHelper(e) {
  12603. return function (t, n) {
  12604. return new e.init(n).finalize(t);
  12605. };
  12606. },
  12607. _createHmacHelper: function _createHmacHelper(e) {
  12608. return function (t, n) {
  12609. return new d.HMAC.init(e, n).finalize(t);
  12610. };
  12611. }
  12612. });
  12613. var d = s.algo = {};
  12614. return s;
  12615. }(Math), n);
  12616. }),
  12617. i = r,
  12618. o = (s(function (e, t) {
  12619. var n;
  12620. e.exports = (n = i, function (e) {
  12621. var t = n,
  12622. s = t.lib,
  12623. r = s.WordArray,
  12624. i = s.Hasher,
  12625. o = t.algo,
  12626. a = [];
  12627. !function () {
  12628. for (var t = 0; t < 64; t++) {
  12629. a[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0;
  12630. }
  12631. }();
  12632. var c = o.MD5 = i.extend({
  12633. _doReset: function _doReset() {
  12634. this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878]);
  12635. },
  12636. _doProcessBlock: function _doProcessBlock(e, t) {
  12637. for (var n = 0; n < 16; n++) {
  12638. var s = t + n,
  12639. r = e[s];
  12640. e[s] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
  12641. }
  12642. var i = this._hash.words,
  12643. o = e[t + 0],
  12644. c = e[t + 1],
  12645. p = e[t + 2],
  12646. f = e[t + 3],
  12647. g = e[t + 4],
  12648. m = e[t + 5],
  12649. y = e[t + 6],
  12650. _ = e[t + 7],
  12651. w = e[t + 8],
  12652. v = e[t + 9],
  12653. S = e[t + 10],
  12654. I = e[t + 11],
  12655. b = e[t + 12],
  12656. k = e[t + 13],
  12657. T = e[t + 14],
  12658. C = e[t + 15],
  12659. P = i[0],
  12660. A = i[1],
  12661. E = i[2],
  12662. O = i[3];
  12663. P = u(P, A, E, O, o, 7, a[0]), O = u(O, P, A, E, c, 12, a[1]), E = u(E, O, P, A, p, 17, a[2]), A = u(A, E, O, P, f, 22, a[3]), P = u(P, A, E, O, g, 7, a[4]), O = u(O, P, A, E, m, 12, a[5]), E = u(E, O, P, A, y, 17, a[6]), A = u(A, E, O, P, _, 22, a[7]), P = u(P, A, E, O, w, 7, a[8]), O = u(O, P, A, E, v, 12, a[9]), E = u(E, O, P, A, S, 17, a[10]), A = u(A, E, O, P, I, 22, a[11]), P = u(P, A, E, O, b, 7, a[12]), O = u(O, P, A, E, k, 12, a[13]), E = u(E, O, P, A, T, 17, a[14]), P = h(P, A = u(A, E, O, P, C, 22, a[15]), E, O, c, 5, a[16]), O = h(O, P, A, E, y, 9, a[17]), E = h(E, O, P, A, I, 14, a[18]), A = h(A, E, O, P, o, 20, a[19]), P = h(P, A, E, O, m, 5, a[20]), O = h(O, P, A, E, S, 9, a[21]), E = h(E, O, P, A, C, 14, a[22]), A = h(A, E, O, P, g, 20, a[23]), P = h(P, A, E, O, v, 5, a[24]), O = h(O, P, A, E, T, 9, a[25]), E = h(E, O, P, A, f, 14, a[26]), A = h(A, E, O, P, w, 20, a[27]), P = h(P, A, E, O, k, 5, a[28]), O = h(O, P, A, E, p, 9, a[29]), E = h(E, O, P, A, _, 14, a[30]), P = l(P, A = h(A, E, O, P, b, 20, a[31]), E, O, m, 4, a[32]), O = l(O, P, A, E, w, 11, a[33]), E = l(E, O, P, A, I, 16, a[34]), A = l(A, E, O, P, T, 23, a[35]), P = l(P, A, E, O, c, 4, a[36]), O = l(O, P, A, E, g, 11, a[37]), E = l(E, O, P, A, _, 16, a[38]), A = l(A, E, O, P, S, 23, a[39]), P = l(P, A, E, O, k, 4, a[40]), O = l(O, P, A, E, o, 11, a[41]), E = l(E, O, P, A, f, 16, a[42]), A = l(A, E, O, P, y, 23, a[43]), P = l(P, A, E, O, v, 4, a[44]), O = l(O, P, A, E, b, 11, a[45]), E = l(E, O, P, A, C, 16, a[46]), P = d(P, A = l(A, E, O, P, p, 23, a[47]), E, O, o, 6, a[48]), O = d(O, P, A, E, _, 10, a[49]), E = d(E, O, P, A, T, 15, a[50]), A = d(A, E, O, P, m, 21, a[51]), P = d(P, A, E, O, b, 6, a[52]), O = d(O, P, A, E, f, 10, a[53]), E = d(E, O, P, A, S, 15, a[54]), A = d(A, E, O, P, c, 21, a[55]), P = d(P, A, E, O, w, 6, a[56]), O = d(O, P, A, E, C, 10, a[57]), E = d(E, O, P, A, y, 15, a[58]), A = d(A, E, O, P, k, 21, a[59]), P = d(P, A, E, O, g, 6, a[60]), O = d(O, P, A, E, I, 10, a[61]), E = d(E, O, P, A, p, 15, a[62]), A = d(A, E, O, P, v, 21, a[63]), i[0] = i[0] + P | 0, i[1] = i[1] + A | 0, i[2] = i[2] + E | 0, i[3] = i[3] + O | 0;
  12664. },
  12665. _doFinalize: function _doFinalize() {
  12666. var t = this._data,
  12667. n = t.words,
  12668. s = 8 * this._nDataBytes,
  12669. r = 8 * t.sigBytes;
  12670. n[r >>> 5] |= 128 << 24 - r % 32;
  12671. var i = e.floor(s / 4294967296),
  12672. o = s;
  12673. 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();
  12674. for (var a = this._hash, c = a.words, u = 0; u < 4; u++) {
  12675. var h = c[u];
  12676. c[u] = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8);
  12677. }
  12678. return a;
  12679. },
  12680. clone: function clone() {
  12681. var e = i.clone.call(this);
  12682. return e._hash = this._hash.clone(), e;
  12683. }
  12684. });
  12685. function u(e, t, n, s, r, i, o) {
  12686. var a = e + (t & n | ~t & s) + r + o;
  12687. return (a << i | a >>> 32 - i) + t;
  12688. }
  12689. function h(e, t, n, s, r, i, o) {
  12690. var a = e + (t & s | n & ~s) + r + o;
  12691. return (a << i | a >>> 32 - i) + t;
  12692. }
  12693. function l(e, t, n, s, r, i, o) {
  12694. var a = e + (t ^ n ^ s) + r + o;
  12695. return (a << i | a >>> 32 - i) + t;
  12696. }
  12697. function d(e, t, n, s, r, i, o) {
  12698. var a = e + (n ^ (t | ~s)) + r + o;
  12699. return (a << i | a >>> 32 - i) + t;
  12700. }
  12701. t.MD5 = i._createHelper(c), t.HmacMD5 = i._createHmacHelper(c);
  12702. }(Math), n.MD5);
  12703. }), s(function (e, t) {
  12704. var n;
  12705. e.exports = (n = i, void function () {
  12706. var e = n,
  12707. t = e.lib.Base,
  12708. s = e.enc.Utf8;
  12709. e.algo.HMAC = t.extend({
  12710. init: function init(e, t) {
  12711. e = this._hasher = new e.init(), "string" == typeof t && (t = s.parse(t));
  12712. var n = e.blockSize,
  12713. r = 4 * n;
  12714. t.sigBytes > r && (t = e.finalize(t)), t.clamp();
  12715. for (var i = this._oKey = t.clone(), o = this._iKey = t.clone(), a = i.words, c = o.words, u = 0; u < n; u++) {
  12716. a[u] ^= 1549556828, c[u] ^= 909522486;
  12717. }
  12718. i.sigBytes = o.sigBytes = r, this.reset();
  12719. },
  12720. reset: function reset() {
  12721. var e = this._hasher;
  12722. e.reset(), e.update(this._iKey);
  12723. },
  12724. update: function update(e) {
  12725. return this._hasher.update(e), this;
  12726. },
  12727. finalize: function finalize(e) {
  12728. var t = this._hasher,
  12729. n = t.finalize(e);
  12730. return t.reset(), t.finalize(this._oKey.clone().concat(n));
  12731. }
  12732. });
  12733. }());
  12734. }), s(function (e, t) {
  12735. e.exports = i.HmacMD5;
  12736. })),
  12737. a = s(function (e, t) {
  12738. e.exports = i.enc.Utf8;
  12739. }),
  12740. c = s(function (e, t) {
  12741. var n;
  12742. e.exports = (n = i, function () {
  12743. var e = n,
  12744. t = e.lib.WordArray;
  12745. function s(e, n, s) {
  12746. for (var r = [], i = 0, o = 0; o < n; o++) {
  12747. if (o % 4) {
  12748. var a = s[e.charCodeAt(o - 1)] << o % 4 * 2,
  12749. c = s[e.charCodeAt(o)] >>> 6 - o % 4 * 2;
  12750. r[i >>> 2] |= (a | c) << 24 - i % 4 * 8, i++;
  12751. }
  12752. }
  12753. return t.create(r, i);
  12754. }
  12755. e.enc.Base64 = {
  12756. stringify: function stringify(e) {
  12757. var t = e.words,
  12758. n = e.sigBytes,
  12759. s = this._map;
  12760. e.clamp();
  12761. for (var r = [], i = 0; i < n; i += 3) {
  12762. 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++) {
  12763. r.push(s.charAt(o >>> 6 * (3 - a) & 63));
  12764. }
  12765. }
  12766. var c = s.charAt(64);
  12767. if (c) for (; r.length % 4;) {
  12768. r.push(c);
  12769. }
  12770. return r.join("");
  12771. },
  12772. parse: function parse(e) {
  12773. var t = e.length,
  12774. n = this._map,
  12775. r = this._reverseMap;
  12776. if (!r) {
  12777. r = this._reverseMap = [];
  12778. for (var i = 0; i < n.length; i++) {
  12779. r[n.charCodeAt(i)] = i;
  12780. }
  12781. }
  12782. var o = n.charAt(64);
  12783. if (o) {
  12784. var a = e.indexOf(o);
  12785. -1 !== a && (t = a);
  12786. }
  12787. return s(e, t, r);
  12788. },
  12789. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  12790. };
  12791. }(), n.enc.Base64);
  12792. });
  12793. var u = "FUNCTION",
  12794. h = "OBJECT",
  12795. l = "CLIENT_DB",
  12796. d = "pending",
  12797. p = "fullfilled",
  12798. f = "rejected";
  12799. function g(e) {
  12800. return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
  12801. }
  12802. function m(e) {
  12803. return "object" === g(e);
  12804. }
  12805. function y(e) {
  12806. return "function" == typeof e;
  12807. }
  12808. function _(e) {
  12809. return function () {
  12810. try {
  12811. return e.apply(e, arguments);
  12812. } catch (e) {
  12813. console.error(e);
  12814. }
  12815. };
  12816. }
  12817. var w = "REJECTED",
  12818. v = "NOT_PENDING";
  12819. var S = /*#__PURE__*/function () {
  12820. function S() {
  12821. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  12822. e = _ref.createPromise,
  12823. _ref$retryRule = _ref.retryRule,
  12824. t = _ref$retryRule === void 0 ? w : _ref$retryRule;
  12825. (0, _classCallCheck2.default)(this, S);
  12826. this.createPromise = e, this.status = null, this.promise = null, this.retryRule = t;
  12827. }
  12828. (0, _createClass2.default)(S, [{
  12829. key: "needRetry",
  12830. get: function get() {
  12831. if (!this.status) return !0;
  12832. switch (this.retryRule) {
  12833. case w:
  12834. return this.status === f;
  12835. case v:
  12836. return this.status !== d;
  12837. }
  12838. }
  12839. }, {
  12840. key: "exec",
  12841. value: function exec() {
  12842. var _this = this;
  12843. return this.needRetry ? (this.status = d, this.promise = this.createPromise().then(function (e) {
  12844. return _this.status = p, Promise.resolve(e);
  12845. }, function (e) {
  12846. return _this.status = f, Promise.reject(e);
  12847. }), this.promise) : this.promise;
  12848. }
  12849. }]);
  12850. return S;
  12851. }();
  12852. function I(e) {
  12853. return function (t) {
  12854. return new Promise(function (n, s) {
  12855. uni[e](_objectSpread(_objectSpread({}, t), {}, {
  12856. success: function success(e) {
  12857. n(e);
  12858. },
  12859. fail: function fail(e) {
  12860. s(e);
  12861. }
  12862. }));
  12863. });
  12864. };
  12865. }
  12866. function b(e) {
  12867. return e && "string" == typeof e ? JSON.parse(e) : e;
  12868. }
  12869. var k = "development" === "development",
  12870. T = "mp-weixin",
  12871. C = "true" === undefined || !0 === undefined,
  12872. P = b([]),
  12873. A = "h5" === T ? "web" : "app-plus" === T ? "app" : T,
  12874. E = b(undefined),
  12875. O = b([]) || [],
  12876. x = true;
  12877. var R = "";
  12878. try {
  12879. R = (__webpack_require__(/*! uni-stat-config */ 417).default || __webpack_require__(/*! uni-stat-config */ 417)).appid;
  12880. } catch (e) {}
  12881. var U = {};
  12882. function L(e) {
  12883. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12884. var n, s;
  12885. return n = U, s = e, Object.prototype.hasOwnProperty.call(n, s) || (U[e] = t), U[e];
  12886. }
  12887. "app" === A && (U = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {});
  12888. var N = ["invoke", "success", "fail", "complete"],
  12889. D = L("_globalUniCloudInterceptor");
  12890. function F(e, t) {
  12891. D[e] || (D[e] = {}), m(t) && Object.keys(t).forEach(function (n) {
  12892. N.indexOf(n) > -1 && function (e, t, n) {
  12893. var s = D[e][t];
  12894. s || (s = D[e][t] = []), -1 === s.indexOf(n) && y(n) && s.push(n);
  12895. }(e, n, t[n]);
  12896. });
  12897. }
  12898. function q(e, t) {
  12899. D[e] || (D[e] = {}), m(t) ? Object.keys(t).forEach(function (n) {
  12900. N.indexOf(n) > -1 && function (e, t, n) {
  12901. var s = D[e][t];
  12902. if (!s) return;
  12903. var r = s.indexOf(n);
  12904. r > -1 && s.splice(r, 1);
  12905. }(e, n, t[n]);
  12906. }) : delete D[e];
  12907. }
  12908. function M(e, t) {
  12909. return e && 0 !== e.length ? e.reduce(function (e, n) {
  12910. return e.then(function () {
  12911. return n(t);
  12912. });
  12913. }, Promise.resolve()) : Promise.resolve();
  12914. }
  12915. function K(e, t) {
  12916. return D[e] && D[e][t] || [];
  12917. }
  12918. function j(e) {
  12919. F("callObject", e);
  12920. }
  12921. var B = L("_globalUniCloudListener"),
  12922. $ = "response",
  12923. W = "needLogin",
  12924. z = "refreshToken",
  12925. J = "clientdb",
  12926. H = "cloudfunction",
  12927. G = "cloudobject";
  12928. function V(e) {
  12929. return B[e] || (B[e] = []), B[e];
  12930. }
  12931. function Q(e, t) {
  12932. var n = V(e);
  12933. n.includes(t) || n.push(t);
  12934. }
  12935. function Y(e, t) {
  12936. var n = V(e),
  12937. s = n.indexOf(t);
  12938. -1 !== s && n.splice(s, 1);
  12939. }
  12940. function X(e, t) {
  12941. var n = V(e);
  12942. for (var _e2 = 0; _e2 < n.length; _e2++) {
  12943. (0, n[_e2])(t);
  12944. }
  12945. }
  12946. var Z,
  12947. ee = !1;
  12948. function te() {
  12949. return Z || (Z = new Promise(function (e) {
  12950. ee && e(), function t() {
  12951. if ("function" == typeof getCurrentPages) {
  12952. var _t2 = getCurrentPages();
  12953. _t2 && _t2[0] && (ee = !0, e());
  12954. }
  12955. ee || setTimeout(function () {
  12956. t();
  12957. }, 30);
  12958. }();
  12959. }), Z);
  12960. }
  12961. function ne(e) {
  12962. var t = {};
  12963. for (var _n2 in e) {
  12964. var _s2 = e[_n2];
  12965. y(_s2) && (t[_n2] = _(_s2));
  12966. }
  12967. return t;
  12968. }
  12969. var se = /*#__PURE__*/function (_Error) {
  12970. (0, _inherits2.default)(se, _Error);
  12971. var _super = _createSuper(se);
  12972. function se(e) {
  12973. var _this2;
  12974. (0, _classCallCheck2.default)(this, se);
  12975. _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;
  12976. return _this2;
  12977. }
  12978. (0, _createClass2.default)(se, [{
  12979. key: "toJson",
  12980. value: function toJson() {
  12981. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  12982. if (!(e >= 10)) return e++, {
  12983. errCode: this.errCode,
  12984. errMsg: this.errMsg,
  12985. errSubject: this.errSubject,
  12986. cause: this.cause && this.cause.toJson ? this.cause.toJson(e) : this.cause
  12987. };
  12988. }
  12989. }]);
  12990. return se;
  12991. }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
  12992. var re = {
  12993. request: function request(e) {
  12994. return uni.request(e);
  12995. },
  12996. uploadFile: function uploadFile(e) {
  12997. return uni.uploadFile(e);
  12998. },
  12999. setStorageSync: function setStorageSync(e, t) {
  13000. return uni.setStorageSync(e, t);
  13001. },
  13002. getStorageSync: function getStorageSync(e) {
  13003. return uni.getStorageSync(e);
  13004. },
  13005. removeStorageSync: function removeStorageSync(e) {
  13006. return uni.removeStorageSync(e);
  13007. },
  13008. clearStorageSync: function clearStorageSync() {
  13009. return uni.clearStorageSync();
  13010. }
  13011. };
  13012. function ie() {
  13013. return {
  13014. token: re.getStorageSync("uni_id_token") || re.getStorageSync("uniIdToken"),
  13015. tokenExpired: re.getStorageSync("uni_id_token_expired")
  13016. };
  13017. }
  13018. function oe() {
  13019. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  13020. e = _ref2.token,
  13021. t = _ref2.tokenExpired;
  13022. e && re.setStorageSync("uni_id_token", e), t && re.setStorageSync("uni_id_token_expired", t);
  13023. }
  13024. var ae, ce;
  13025. function ue() {
  13026. return ae || (ae = uni.getSystemInfoSync()), ae;
  13027. }
  13028. function he() {
  13029. var e, t;
  13030. try {
  13031. if (uni.getLaunchOptionsSync) {
  13032. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return;
  13033. var _uni$getLaunchOptions = uni.getLaunchOptionsSync(),
  13034. _n3 = _uni$getLaunchOptions.scene,
  13035. _s3 = _uni$getLaunchOptions.channel;
  13036. e = _s3, t = _n3;
  13037. }
  13038. } catch (e) {}
  13039. return {
  13040. channel: e,
  13041. scene: t
  13042. };
  13043. }
  13044. function le() {
  13045. var e = uni.getLocale && uni.getLocale() || "en";
  13046. if (ce) return _objectSpread(_objectSpread({}, ce), {}, {
  13047. locale: e,
  13048. LOCALE: e
  13049. });
  13050. var t = ue(),
  13051. n = t.deviceId,
  13052. s = t.osName,
  13053. r = t.uniPlatform,
  13054. i = t.appId,
  13055. o = ["pixelRatio", "brand", "model", "system", "language", "version", "platform", "host", "SDKVersion", "swanNativeVersion", "app", "AppPlatform", "fontSizeSetting"];
  13056. for (var _e3 = 0; _e3 < o.length; _e3++) {
  13057. delete t[o[_e3]];
  13058. }
  13059. return ce = _objectSpread(_objectSpread({
  13060. PLATFORM: r,
  13061. OS: s,
  13062. APPID: i,
  13063. DEVICEID: n
  13064. }, he()), t), _objectSpread(_objectSpread({}, ce), {}, {
  13065. locale: e,
  13066. LOCALE: e
  13067. });
  13068. }
  13069. var de = {
  13070. sign: function sign(e, t) {
  13071. var n = "";
  13072. return Object.keys(e).sort().forEach(function (t) {
  13073. e[t] && (n = n + "&" + t + "=" + e[t]);
  13074. }), n = n.slice(1), o(n, t).toString();
  13075. },
  13076. wrappedRequest: function wrappedRequest(e, t) {
  13077. return new Promise(function (n, s) {
  13078. t(Object.assign(e, {
  13079. complete: function complete(e) {
  13080. e || (e = {}), k && "web" === A && e.errMsg && 0 === e.errMsg.indexOf("request:fail") && console.warn("发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5");
  13081. var t = e.data && e.data.header && e.data.header["x-serverless-request-id"] || e.header && e.header["request-id"];
  13082. if (!e.statusCode || e.statusCode >= 400) return s(new se({
  13083. code: "SYS_ERR",
  13084. message: e.errMsg || "request:fail",
  13085. requestId: t
  13086. }));
  13087. var r = e.data;
  13088. if (r.error) return s(new se({
  13089. code: r.error.code,
  13090. message: r.error.message,
  13091. requestId: t
  13092. }));
  13093. r.result = r.data, r.requestId = t, delete r.data, n(r);
  13094. }
  13095. }));
  13096. });
  13097. },
  13098. toBase64: function toBase64(e) {
  13099. return c.stringify(a.parse(e));
  13100. }
  13101. },
  13102. pe = {
  13103. "uniCloud.init.paramRequired": "{param} required",
  13104. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  13105. };
  13106. var _e4 = (0, _uniI18n.initVueI18n)({
  13107. "zh-Hans": {
  13108. "uniCloud.init.paramRequired": "缺少参数:{param}",
  13109. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  13110. },
  13111. "zh-Hant": {
  13112. "uniCloud.init.paramRequired": "缺少参数:{param}",
  13113. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  13114. },
  13115. en: pe,
  13116. fr: {
  13117. "uniCloud.init.paramRequired": "{param} required",
  13118. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  13119. },
  13120. es: {
  13121. "uniCloud.init.paramRequired": "{param} required",
  13122. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  13123. },
  13124. ja: pe
  13125. }, "zh-Hans"),
  13126. fe = _e4.t;
  13127. var ge = /*#__PURE__*/function () {
  13128. function ge(e) {
  13129. var _this3 = this;
  13130. (0, _classCallCheck2.default)(this, ge);
  13131. ["spaceId", "clientSecret"].forEach(function (t) {
  13132. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error(fe("uniCloud.init.paramRequired", {
  13133. param: t
  13134. }));
  13135. }), this.config = Object.assign({}, {
  13136. endpoint: 0 === e.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com"
  13137. }, 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 = re, this._getAccessTokenPromiseHub = new S({
  13138. createPromise: function createPromise() {
  13139. return _this3.requestAuth(_this3.setupRequest({
  13140. method: "serverless.auth.user.anonymousAuthorize",
  13141. params: "{}"
  13142. }, "auth")).then(function (e) {
  13143. if (!e.result || !e.result.accessToken) throw new se({
  13144. code: "AUTH_FAILED",
  13145. message: "获取accessToken失败"
  13146. });
  13147. _this3.setAccessToken(e.result.accessToken);
  13148. });
  13149. },
  13150. retryRule: v
  13151. });
  13152. }
  13153. (0, _createClass2.default)(ge, [{
  13154. key: "hasAccessToken",
  13155. get: function get() {
  13156. return !!this.accessToken;
  13157. }
  13158. }, {
  13159. key: "setAccessToken",
  13160. value: function setAccessToken(e) {
  13161. this.accessToken = e;
  13162. }
  13163. }, {
  13164. key: "requestWrapped",
  13165. value: function requestWrapped(e) {
  13166. return de.wrappedRequest(e, this.adapter.request);
  13167. }
  13168. }, {
  13169. key: "requestAuth",
  13170. value: function requestAuth(e) {
  13171. return this.requestWrapped(e);
  13172. }
  13173. }, {
  13174. key: "request",
  13175. value: function request(e, t) {
  13176. var _this4 = this;
  13177. return Promise.resolve().then(function () {
  13178. return _this4.hasAccessToken ? t ? _this4.requestWrapped(e) : _this4.requestWrapped(e).catch(function (t) {
  13179. return new Promise(function (e, n) {
  13180. !t || "GATEWAY_INVALID_TOKEN" !== t.code && "InvalidParameter.InvalidToken" !== t.code ? n(t) : e();
  13181. }).then(function () {
  13182. return _this4.getAccessToken();
  13183. }).then(function () {
  13184. var t = _this4.rebuildRequest(e);
  13185. return _this4.request(t, !0);
  13186. });
  13187. }) : _this4.getAccessToken().then(function () {
  13188. var t = _this4.rebuildRequest(e);
  13189. return _this4.request(t, !0);
  13190. });
  13191. });
  13192. }
  13193. }, {
  13194. key: "rebuildRequest",
  13195. value: function rebuildRequest(e) {
  13196. var t = Object.assign({}, e);
  13197. return t.data.token = this.accessToken, t.header["x-basement-token"] = this.accessToken, t.header["x-serverless-sign"] = de.sign(t.data, this.config.clientSecret), t;
  13198. }
  13199. }, {
  13200. key: "setupRequest",
  13201. value: function setupRequest(e, t) {
  13202. var n = Object.assign({}, e, {
  13203. spaceId: this.config.spaceId,
  13204. timestamp: Date.now()
  13205. }),
  13206. s = {
  13207. "Content-Type": "application/json"
  13208. };
  13209. return "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = de.sign(n, this.config.clientSecret), {
  13210. url: this.config.requestUrl,
  13211. method: "POST",
  13212. data: n,
  13213. dataType: "json",
  13214. header: s
  13215. };
  13216. }
  13217. }, {
  13218. key: "getAccessToken",
  13219. value: function getAccessToken() {
  13220. return this._getAccessTokenPromiseHub.exec();
  13221. }
  13222. }, {
  13223. key: "authorize",
  13224. value: function () {
  13225. var _authorize = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  13226. return _regenerator.default.wrap(function _callee$(_context) {
  13227. while (1) {
  13228. switch (_context.prev = _context.next) {
  13229. case 0:
  13230. _context.next = 2;
  13231. return this.getAccessToken();
  13232. case 2:
  13233. case "end":
  13234. return _context.stop();
  13235. }
  13236. }
  13237. }, _callee, this);
  13238. }));
  13239. function authorize() {
  13240. return _authorize.apply(this, arguments);
  13241. }
  13242. return authorize;
  13243. }()
  13244. }, {
  13245. key: "callFunction",
  13246. value: function callFunction(e) {
  13247. var t = {
  13248. method: "serverless.function.runtime.invoke",
  13249. params: JSON.stringify({
  13250. functionTarget: e.name,
  13251. functionArgs: e.data || {}
  13252. })
  13253. };
  13254. return this.request(this.setupRequest(t));
  13255. }
  13256. }, {
  13257. key: "getOSSUploadOptionsFromPath",
  13258. value: function getOSSUploadOptionsFromPath(e) {
  13259. var t = {
  13260. method: "serverless.file.resource.generateProximalSign",
  13261. params: JSON.stringify(e)
  13262. };
  13263. return this.request(this.setupRequest(t));
  13264. }
  13265. }, {
  13266. key: "uploadFileToOSS",
  13267. value: function uploadFileToOSS(_ref3) {
  13268. var _this5 = this;
  13269. var e = _ref3.url,
  13270. t = _ref3.formData,
  13271. n = _ref3.name,
  13272. s = _ref3.filePath,
  13273. r = _ref3.fileType,
  13274. i = _ref3.onUploadProgress;
  13275. return new Promise(function (o, a) {
  13276. var c = _this5.adapter.uploadFile({
  13277. url: e,
  13278. formData: t,
  13279. name: n,
  13280. filePath: s,
  13281. fileType: r,
  13282. header: {
  13283. "X-OSS-server-side-encrpytion": "AES256"
  13284. },
  13285. success: function success(e) {
  13286. e && e.statusCode < 400 ? o(e) : a(new se({
  13287. code: "UPLOAD_FAILED",
  13288. message: "文件上传失败"
  13289. }));
  13290. },
  13291. fail: function fail(e) {
  13292. a(new se({
  13293. code: e.code || "UPLOAD_FAILED",
  13294. message: e.message || e.errMsg || "文件上传失败"
  13295. }));
  13296. }
  13297. });
  13298. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  13299. i({
  13300. loaded: e.totalBytesSent,
  13301. total: e.totalBytesExpectedToSend
  13302. });
  13303. });
  13304. });
  13305. }
  13306. }, {
  13307. key: "reportOSSUpload",
  13308. value: function reportOSSUpload(e) {
  13309. var t = {
  13310. method: "serverless.file.resource.report",
  13311. params: JSON.stringify(e)
  13312. };
  13313. return this.request(this.setupRequest(t));
  13314. }
  13315. }, {
  13316. key: "uploadFile",
  13317. value: function () {
  13318. var _uploadFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
  13319. var e, t, _ref4$fileType, n, s, r, i, o, a, c, u, h, l, d, p, f, m, y, _e5, _;
  13320. return _regenerator.default.wrap(function _callee2$(_context2) {
  13321. while (1) {
  13322. switch (_context2.prev = _context2.next) {
  13323. case 0:
  13324. e = _ref4.filePath, t = _ref4.cloudPath, _ref4$fileType = _ref4.fileType, n = _ref4$fileType === void 0 ? "image" : _ref4$fileType, s = _ref4.onUploadProgress, r = _ref4.config;
  13325. if (!("string" !== g(t))) {
  13326. _context2.next = 3;
  13327. break;
  13328. }
  13329. throw new se({
  13330. code: "INVALID_PARAM",
  13331. message: "cloudPath必须为字符串类型"
  13332. });
  13333. case 3:
  13334. if (t = t.trim()) {
  13335. _context2.next = 5;
  13336. break;
  13337. }
  13338. throw new se({
  13339. code: "CLOUDPATH_REQUIRED",
  13340. message: "cloudPath不可为空"
  13341. });
  13342. case 5:
  13343. if (!/:\/\//.test(t)) {
  13344. _context2.next = 7;
  13345. break;
  13346. }
  13347. throw new se({
  13348. code: "INVALID_PARAM",
  13349. message: "cloudPath不合法"
  13350. });
  13351. case 7:
  13352. i = r && r.envType || this.config.envType;
  13353. _context2.next = 10;
  13354. return this.getOSSUploadOptionsFromPath({
  13355. env: i,
  13356. filename: t
  13357. });
  13358. case 10:
  13359. o = _context2.sent.result;
  13360. a = "https://" + o.cdnDomain + "/" + o.ossPath;
  13361. c = o.securityToken;
  13362. u = o.accessKeyId;
  13363. h = o.signature;
  13364. l = o.host;
  13365. d = o.ossPath;
  13366. p = o.id;
  13367. f = o.policy;
  13368. m = o.ossCallbackUrl;
  13369. y = {
  13370. "Cache-Control": "max-age=2592000",
  13371. "Content-Disposition": "attachment",
  13372. OSSAccessKeyId: u,
  13373. Signature: h,
  13374. host: l,
  13375. id: p,
  13376. key: d,
  13377. policy: f,
  13378. success_action_status: 200
  13379. };
  13380. if (c && (y["x-oss-security-token"] = c), m) {
  13381. _e5 = JSON.stringify({
  13382. callbackUrl: m,
  13383. callbackBody: JSON.stringify({
  13384. fileId: p,
  13385. spaceId: this.config.spaceId
  13386. }),
  13387. callbackBodyType: "application/json"
  13388. });
  13389. y.callback = de.toBase64(_e5);
  13390. }
  13391. _ = {
  13392. url: "https://" + o.host,
  13393. formData: y,
  13394. fileName: "file",
  13395. name: "file",
  13396. filePath: e,
  13397. fileType: n
  13398. };
  13399. _context2.next = 25;
  13400. return this.uploadFileToOSS(Object.assign({}, _, {
  13401. onUploadProgress: s
  13402. }));
  13403. case 25:
  13404. if (!m) {
  13405. _context2.next = 27;
  13406. break;
  13407. }
  13408. return _context2.abrupt("return", {
  13409. success: !0,
  13410. filePath: e,
  13411. fileID: a
  13412. });
  13413. case 27:
  13414. _context2.next = 29;
  13415. return this.reportOSSUpload({
  13416. id: p
  13417. });
  13418. case 29:
  13419. if (!_context2.sent.success) {
  13420. _context2.next = 31;
  13421. break;
  13422. }
  13423. return _context2.abrupt("return", {
  13424. success: !0,
  13425. filePath: e,
  13426. fileID: a
  13427. });
  13428. case 31:
  13429. throw new se({
  13430. code: "UPLOAD_FAILED",
  13431. message: "文件上传失败"
  13432. });
  13433. case 32:
  13434. case "end":
  13435. return _context2.stop();
  13436. }
  13437. }
  13438. }, _callee2, this);
  13439. }));
  13440. function uploadFile(_x) {
  13441. return _uploadFile.apply(this, arguments);
  13442. }
  13443. return uploadFile;
  13444. }()
  13445. }, {
  13446. key: "getTempFileURL",
  13447. value: function getTempFileURL() {
  13448. var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  13449. e = _ref5.fileList;
  13450. return new Promise(function (t, n) {
  13451. Array.isArray(e) && 0 !== e.length || n(new se({
  13452. code: "INVALID_PARAM",
  13453. message: "fileList的元素必须是非空的字符串"
  13454. })), t({
  13455. fileList: e.map(function (e) {
  13456. return {
  13457. fileID: e,
  13458. tempFileURL: e
  13459. };
  13460. })
  13461. });
  13462. });
  13463. }
  13464. }, {
  13465. key: "getFileInfo",
  13466. value: function () {
  13467. var _getFileInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  13468. var _ref6,
  13469. e,
  13470. t,
  13471. _args3 = arguments;
  13472. return _regenerator.default.wrap(function _callee3$(_context3) {
  13473. while (1) {
  13474. switch (_context3.prev = _context3.next) {
  13475. case 0:
  13476. _ref6 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, e = _ref6.fileList;
  13477. if (!(!Array.isArray(e) || 0 === e.length)) {
  13478. _context3.next = 3;
  13479. break;
  13480. }
  13481. throw new se({
  13482. code: "INVALID_PARAM",
  13483. message: "fileList的元素必须是非空的字符串"
  13484. });
  13485. case 3:
  13486. t = {
  13487. method: "serverless.file.resource.info",
  13488. params: JSON.stringify({
  13489. id: e.map(function (e) {
  13490. return e.split("?")[0];
  13491. }).join(",")
  13492. })
  13493. };
  13494. _context3.next = 6;
  13495. return this.request(this.setupRequest(t));
  13496. case 6:
  13497. _context3.t0 = _context3.sent.result;
  13498. return _context3.abrupt("return", {
  13499. fileList: _context3.t0
  13500. });
  13501. case 8:
  13502. case "end":
  13503. return _context3.stop();
  13504. }
  13505. }
  13506. }, _callee3, this);
  13507. }));
  13508. function getFileInfo() {
  13509. return _getFileInfo.apply(this, arguments);
  13510. }
  13511. return getFileInfo;
  13512. }()
  13513. }]);
  13514. return ge;
  13515. }();
  13516. var me = {
  13517. init: function init(e) {
  13518. var t = new ge(e),
  13519. n = {
  13520. signInAnonymously: function signInAnonymously() {
  13521. return t.authorize();
  13522. },
  13523. getLoginState: function getLoginState() {
  13524. return Promise.resolve(!1);
  13525. }
  13526. };
  13527. return t.auth = function () {
  13528. return n;
  13529. }, t.customAuth = t.auth, t;
  13530. }
  13531. };
  13532. var ye = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  13533. var _e;
  13534. !function (e) {
  13535. e.local = "local", e.none = "none", e.session = "session";
  13536. }(_e || (_e = {}));
  13537. var we = function we() {};
  13538. var ve = function ve() {
  13539. var e;
  13540. if (!Promise) {
  13541. e = function e() {}, e.promise = {};
  13542. var _t3 = function _t3() {
  13543. throw new se({
  13544. message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'
  13545. });
  13546. };
  13547. return Object.defineProperty(e.promise, "then", {
  13548. get: _t3
  13549. }), Object.defineProperty(e.promise, "catch", {
  13550. get: _t3
  13551. }), e;
  13552. }
  13553. var t = new Promise(function (t, n) {
  13554. e = function e(_e6, s) {
  13555. return _e6 ? n(_e6) : t(s);
  13556. };
  13557. });
  13558. return e.promise = t, e;
  13559. };
  13560. function Se(e) {
  13561. return void 0 === e;
  13562. }
  13563. function Ie(e) {
  13564. return "[object Null]" === Object.prototype.toString.call(e);
  13565. }
  13566. var be;
  13567. function ke(e) {
  13568. var t = (n = e, "[object Array]" === Object.prototype.toString.call(n) ? e : [e]);
  13569. var n;
  13570. var _iterator = _createForOfIteratorHelper(t),
  13571. _step;
  13572. try {
  13573. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  13574. var _e7 = _step.value;
  13575. var _t4 = _e7.isMatch,
  13576. _n4 = _e7.genAdapter,
  13577. _s4 = _e7.runtime;
  13578. if (_t4()) return {
  13579. adapter: _n4(),
  13580. runtime: _s4
  13581. };
  13582. }
  13583. } catch (err) {
  13584. _iterator.e(err);
  13585. } finally {
  13586. _iterator.f();
  13587. }
  13588. }
  13589. !function (e) {
  13590. e.WEB = "web", e.WX_MP = "wx_mp";
  13591. }(be || (be = {}));
  13592. var Te = {
  13593. adapter: null,
  13594. runtime: void 0
  13595. },
  13596. Ce = ["anonymousUuidKey"];
  13597. var Pe = /*#__PURE__*/function (_we) {
  13598. (0, _inherits2.default)(Pe, _we);
  13599. var _super2 = _createSuper(Pe);
  13600. function Pe() {
  13601. var _this6;
  13602. (0, _classCallCheck2.default)(this, Pe);
  13603. _this6 = _super2.call(this), Te.adapter.root.tcbObject || (Te.adapter.root.tcbObject = {});
  13604. return _this6;
  13605. }
  13606. (0, _createClass2.default)(Pe, [{
  13607. key: "setItem",
  13608. value: function setItem(e, t) {
  13609. Te.adapter.root.tcbObject[e] = t;
  13610. }
  13611. }, {
  13612. key: "getItem",
  13613. value: function getItem(e) {
  13614. return Te.adapter.root.tcbObject[e];
  13615. }
  13616. }, {
  13617. key: "removeItem",
  13618. value: function removeItem(e) {
  13619. delete Te.adapter.root.tcbObject[e];
  13620. }
  13621. }, {
  13622. key: "clear",
  13623. value: function clear() {
  13624. delete Te.adapter.root.tcbObject;
  13625. }
  13626. }]);
  13627. return Pe;
  13628. }(we);
  13629. function Ae(e, t) {
  13630. switch (e) {
  13631. case "local":
  13632. return t.localStorage || new Pe();
  13633. case "none":
  13634. return new Pe();
  13635. default:
  13636. return t.sessionStorage || new Pe();
  13637. }
  13638. }
  13639. var Ee = /*#__PURE__*/function () {
  13640. function Ee(e) {
  13641. (0, _classCallCheck2.default)(this, Ee);
  13642. if (!this._storage) {
  13643. this._persistence = Te.adapter.primaryStorage || e.persistence, this._storage = Ae(this._persistence, Te.adapter);
  13644. var _t5 = "access_token_".concat(e.env),
  13645. _n5 = "access_token_expire_".concat(e.env),
  13646. _s5 = "refresh_token_".concat(e.env),
  13647. _r = "anonymous_uuid_".concat(e.env),
  13648. _i = "login_type_".concat(e.env),
  13649. _o = "user_info_".concat(e.env);
  13650. this.keys = {
  13651. accessTokenKey: _t5,
  13652. accessTokenExpireKey: _n5,
  13653. refreshTokenKey: _s5,
  13654. anonymousUuidKey: _r,
  13655. loginTypeKey: _i,
  13656. userInfoKey: _o
  13657. };
  13658. }
  13659. }
  13660. (0, _createClass2.default)(Ee, [{
  13661. key: "updatePersistence",
  13662. value: function updatePersistence(e) {
  13663. if (e === this._persistence) return;
  13664. var t = "local" === this._persistence;
  13665. this._persistence = e;
  13666. var n = Ae(e, Te.adapter);
  13667. for (var _e8 in this.keys) {
  13668. var _s6 = this.keys[_e8];
  13669. if (t && Ce.includes(_e8)) continue;
  13670. var _r2 = this._storage.getItem(_s6);
  13671. Se(_r2) || Ie(_r2) || (n.setItem(_s6, _r2), this._storage.removeItem(_s6));
  13672. }
  13673. this._storage = n;
  13674. }
  13675. }, {
  13676. key: "setStore",
  13677. value: function setStore(e, t, n) {
  13678. if (!this._storage) return;
  13679. var s = {
  13680. version: n || "localCachev1",
  13681. content: t
  13682. },
  13683. r = JSON.stringify(s);
  13684. try {
  13685. this._storage.setItem(e, r);
  13686. } catch (e) {
  13687. throw e;
  13688. }
  13689. }
  13690. }, {
  13691. key: "getStore",
  13692. value: function getStore(e, t) {
  13693. try {
  13694. if (!this._storage) return;
  13695. } catch (e) {
  13696. return "";
  13697. }
  13698. t = t || "localCachev1";
  13699. var n = this._storage.getItem(e);
  13700. if (!n) return "";
  13701. if (n.indexOf(t) >= 0) {
  13702. return JSON.parse(n).content;
  13703. }
  13704. return "";
  13705. }
  13706. }, {
  13707. key: "removeStore",
  13708. value: function removeStore(e) {
  13709. this._storage.removeItem(e);
  13710. }
  13711. }]);
  13712. return Ee;
  13713. }();
  13714. var Oe = {},
  13715. xe = {};
  13716. function Re(e) {
  13717. return Oe[e];
  13718. }
  13719. var Ue = /*#__PURE__*/(0, _createClass2.default)(function Ue(e, t) {
  13720. (0, _classCallCheck2.default)(this, Ue);
  13721. this.data = t || null, this.name = e;
  13722. });
  13723. var Le = /*#__PURE__*/function (_Ue) {
  13724. (0, _inherits2.default)(Le, _Ue);
  13725. var _super3 = _createSuper(Le);
  13726. function Le(e, t) {
  13727. var _this7;
  13728. (0, _classCallCheck2.default)(this, Le);
  13729. _this7 = _super3.call(this, "error", {
  13730. error: e,
  13731. data: t
  13732. }), _this7.error = e;
  13733. return _this7;
  13734. }
  13735. return (0, _createClass2.default)(Le);
  13736. }(Ue);
  13737. var Ne = new ( /*#__PURE__*/function () {
  13738. function _class() {
  13739. (0, _classCallCheck2.default)(this, _class);
  13740. this._listeners = {};
  13741. }
  13742. (0, _createClass2.default)(_class, [{
  13743. key: "on",
  13744. value: function on(e, t) {
  13745. return function (e, t, n) {
  13746. n[e] = n[e] || [], n[e].push(t);
  13747. }(e, t, this._listeners), this;
  13748. }
  13749. }, {
  13750. key: "off",
  13751. value: function off(e, t) {
  13752. return function (e, t, n) {
  13753. if (n && n[e]) {
  13754. var _s7 = n[e].indexOf(t);
  13755. -1 !== _s7 && n[e].splice(_s7, 1);
  13756. }
  13757. }(e, t, this._listeners), this;
  13758. }
  13759. }, {
  13760. key: "fire",
  13761. value: function fire(e, t) {
  13762. if (e instanceof Le) return console.error(e.error), this;
  13763. var n = "string" == typeof e ? new Ue(e, t || {}) : e;
  13764. var s = n.name;
  13765. if (this._listens(s)) {
  13766. n.target = this;
  13767. var _e9 = this._listeners[s] ? (0, _toConsumableArray2.default)(this._listeners[s]) : [];
  13768. var _iterator2 = _createForOfIteratorHelper(_e9),
  13769. _step2;
  13770. try {
  13771. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  13772. var _t6 = _step2.value;
  13773. _t6.call(this, n);
  13774. }
  13775. } catch (err) {
  13776. _iterator2.e(err);
  13777. } finally {
  13778. _iterator2.f();
  13779. }
  13780. }
  13781. return this;
  13782. }
  13783. }, {
  13784. key: "_listens",
  13785. value: function _listens(e) {
  13786. return this._listeners[e] && this._listeners[e].length > 0;
  13787. }
  13788. }]);
  13789. return _class;
  13790. }())();
  13791. function De(e, t) {
  13792. Ne.on(e, t);
  13793. }
  13794. function Fe(e) {
  13795. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13796. Ne.fire(e, t);
  13797. }
  13798. function qe(e, t) {
  13799. Ne.off(e, t);
  13800. }
  13801. var Me = "loginStateChanged",
  13802. Ke = "loginStateExpire",
  13803. je = "loginTypeChanged",
  13804. Be = "anonymousConverted",
  13805. $e = "refreshAccessToken";
  13806. var We;
  13807. !function (e) {
  13808. 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";
  13809. }(We || (We = {}));
  13810. var ze = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"],
  13811. Je = {
  13812. "X-SDK-Version": "1.3.5"
  13813. };
  13814. function He(e, t, n) {
  13815. var s = e[t];
  13816. e[t] = function (t) {
  13817. var r = {},
  13818. i = {};
  13819. n.forEach(function (n) {
  13820. var _n$call = n.call(e, t),
  13821. s = _n$call.data,
  13822. o = _n$call.headers;
  13823. Object.assign(r, s), Object.assign(i, o);
  13824. });
  13825. var o = t.data;
  13826. return o && function () {
  13827. var e;
  13828. if (e = o, "[object FormData]" !== Object.prototype.toString.call(e)) t.data = _objectSpread(_objectSpread({}, o), r);else for (var _e10 in r) {
  13829. o.append(_e10, r[_e10]);
  13830. }
  13831. }(), t.headers = _objectSpread(_objectSpread({}, t.headers || {}), i), s.call(e, t);
  13832. };
  13833. }
  13834. function Ge() {
  13835. var e = Math.random().toString(16).slice(2);
  13836. return {
  13837. data: {
  13838. seqId: e
  13839. },
  13840. headers: _objectSpread(_objectSpread({}, Je), {}, {
  13841. "x-seqid": e
  13842. })
  13843. };
  13844. }
  13845. var Ve = /*#__PURE__*/function () {
  13846. function Ve() {
  13847. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  13848. (0, _classCallCheck2.default)(this, Ve);
  13849. var t;
  13850. this.config = e, this._reqClass = new Te.adapter.reqClass({
  13851. timeout: this.config.timeout,
  13852. timeoutMsg: "\u8BF7\u6C42\u5728".concat(this.config.timeout / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD"),
  13853. restrictedMethods: ["post"]
  13854. }), this._cache = Re(this.config.env), this._localCache = (t = this.config.env, xe[t]), He(this._reqClass, "post", [Ge]), He(this._reqClass, "upload", [Ge]), He(this._reqClass, "download", [Ge]);
  13855. }
  13856. (0, _createClass2.default)(Ve, [{
  13857. key: "post",
  13858. value: function () {
  13859. var _post = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(e) {
  13860. return _regenerator.default.wrap(function _callee4$(_context4) {
  13861. while (1) {
  13862. switch (_context4.prev = _context4.next) {
  13863. case 0:
  13864. _context4.next = 2;
  13865. return this._reqClass.post(e);
  13866. case 2:
  13867. return _context4.abrupt("return", _context4.sent);
  13868. case 3:
  13869. case "end":
  13870. return _context4.stop();
  13871. }
  13872. }
  13873. }, _callee4, this);
  13874. }));
  13875. function post(_x2) {
  13876. return _post.apply(this, arguments);
  13877. }
  13878. return post;
  13879. }()
  13880. }, {
  13881. key: "upload",
  13882. value: function () {
  13883. var _upload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(e) {
  13884. return _regenerator.default.wrap(function _callee5$(_context5) {
  13885. while (1) {
  13886. switch (_context5.prev = _context5.next) {
  13887. case 0:
  13888. _context5.next = 2;
  13889. return this._reqClass.upload(e);
  13890. case 2:
  13891. return _context5.abrupt("return", _context5.sent);
  13892. case 3:
  13893. case "end":
  13894. return _context5.stop();
  13895. }
  13896. }
  13897. }, _callee5, this);
  13898. }));
  13899. function upload(_x3) {
  13900. return _upload.apply(this, arguments);
  13901. }
  13902. return upload;
  13903. }()
  13904. }, {
  13905. key: "download",
  13906. value: function () {
  13907. var _download = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(e) {
  13908. return _regenerator.default.wrap(function _callee6$(_context6) {
  13909. while (1) {
  13910. switch (_context6.prev = _context6.next) {
  13911. case 0:
  13912. _context6.next = 2;
  13913. return this._reqClass.download(e);
  13914. case 2:
  13915. return _context6.abrupt("return", _context6.sent);
  13916. case 3:
  13917. case "end":
  13918. return _context6.stop();
  13919. }
  13920. }
  13921. }, _callee6, this);
  13922. }));
  13923. function download(_x4) {
  13924. return _download.apply(this, arguments);
  13925. }
  13926. return download;
  13927. }()
  13928. }, {
  13929. key: "refreshAccessToken",
  13930. value: function () {
  13931. var _refreshAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  13932. var e, t;
  13933. return _regenerator.default.wrap(function _callee7$(_context7) {
  13934. while (1) {
  13935. switch (_context7.prev = _context7.next) {
  13936. case 0:
  13937. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  13938. _context7.prev = 1;
  13939. _context7.next = 4;
  13940. return this._refreshAccessTokenPromise;
  13941. case 4:
  13942. e = _context7.sent;
  13943. _context7.next = 10;
  13944. break;
  13945. case 7:
  13946. _context7.prev = 7;
  13947. _context7.t0 = _context7["catch"](1);
  13948. t = _context7.t0;
  13949. case 10:
  13950. if (!(this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t)) {
  13951. _context7.next = 12;
  13952. break;
  13953. }
  13954. throw t;
  13955. case 12:
  13956. return _context7.abrupt("return", e);
  13957. case 13:
  13958. case "end":
  13959. return _context7.stop();
  13960. }
  13961. }
  13962. }, _callee7, this, [[1, 7]]);
  13963. }));
  13964. function refreshAccessToken() {
  13965. return _refreshAccessToken2.apply(this, arguments);
  13966. }
  13967. return refreshAccessToken;
  13968. }()
  13969. }, {
  13970. key: "_refreshAccessToken",
  13971. value: function () {
  13972. var _refreshAccessToken3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  13973. var _this$_cache$keys, e, t, n, s, r, i, o, a, _e11, _e12, _t7, _s8;
  13974. return _regenerator.default.wrap(function _callee8$(_context8) {
  13975. while (1) {
  13976. switch (_context8.prev = _context8.next) {
  13977. case 0:
  13978. _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;
  13979. this._cache.removeStore(e), this._cache.removeStore(t);
  13980. i = this._cache.getStore(n);
  13981. if (i) {
  13982. _context8.next = 5;
  13983. break;
  13984. }
  13985. throw new se({
  13986. message: "未登录CloudBase"
  13987. });
  13988. case 5:
  13989. o = {
  13990. refresh_token: i
  13991. };
  13992. _context8.next = 8;
  13993. return this.request("auth.fetchAccessTokenWithRefreshToken", o);
  13994. case 8:
  13995. a = _context8.sent;
  13996. if (!a.data.code) {
  13997. _context8.next = 21;
  13998. break;
  13999. }
  14000. _e11 = a.data.code;
  14001. if (!("SIGN_PARAM_INVALID" === _e11 || "REFRESH_TOKEN_EXPIRED" === _e11 || "INVALID_REFRESH_TOKEN" === _e11)) {
  14002. _context8.next = 20;
  14003. break;
  14004. }
  14005. if (!(this._cache.getStore(s) === We.ANONYMOUS && "INVALID_REFRESH_TOKEN" === _e11)) {
  14006. _context8.next = 19;
  14007. break;
  14008. }
  14009. _e12 = this._cache.getStore(r);
  14010. _t7 = this._cache.getStore(n);
  14011. _context8.next = 17;
  14012. return this.send("auth.signInAnonymously", {
  14013. anonymous_uuid: _e12,
  14014. refresh_token: _t7
  14015. });
  14016. case 17:
  14017. _s8 = _context8.sent;
  14018. return _context8.abrupt("return", (this.setRefreshToken(_s8.refresh_token), this._refreshAccessToken()));
  14019. case 19:
  14020. Fe(Ke), this._cache.removeStore(n);
  14021. case 20:
  14022. throw new se({
  14023. code: a.data.code,
  14024. message: "\u5237\u65B0access token\u5931\u8D25\uFF1A".concat(a.data.code)
  14025. });
  14026. case 21:
  14027. if (!a.data.access_token) {
  14028. _context8.next = 23;
  14029. break;
  14030. }
  14031. return _context8.abrupt("return", (Fe($e), this._cache.setStore(e, a.data.access_token), this._cache.setStore(t, a.data.access_token_expire + Date.now()), {
  14032. accessToken: a.data.access_token,
  14033. accessTokenExpire: a.data.access_token_expire
  14034. }));
  14035. case 23:
  14036. a.data.refresh_token && (this._cache.removeStore(n), this._cache.setStore(n, a.data.refresh_token), this._refreshAccessToken());
  14037. case 24:
  14038. case "end":
  14039. return _context8.stop();
  14040. }
  14041. }
  14042. }, _callee8, this);
  14043. }));
  14044. function _refreshAccessToken() {
  14045. return _refreshAccessToken3.apply(this, arguments);
  14046. }
  14047. return _refreshAccessToken;
  14048. }()
  14049. }, {
  14050. key: "getAccessToken",
  14051. value: function () {
  14052. var _getAccessToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  14053. var _this$_cache$keys2, e, t, n, s, r, i;
  14054. return _regenerator.default.wrap(function _callee9$(_context9) {
  14055. while (1) {
  14056. switch (_context9.prev = _context9.next) {
  14057. case 0:
  14058. _this$_cache$keys2 = this._cache.keys, e = _this$_cache$keys2.accessTokenKey, t = _this$_cache$keys2.accessTokenExpireKey, n = _this$_cache$keys2.refreshTokenKey;
  14059. if (this._cache.getStore(n)) {
  14060. _context9.next = 3;
  14061. break;
  14062. }
  14063. throw new se({
  14064. message: "refresh token不存在,登录状态异常"
  14065. });
  14066. case 3:
  14067. s = this._cache.getStore(e), r = this._cache.getStore(t), i = !0;
  14068. _context9.t0 = this._shouldRefreshAccessTokenHook;
  14069. if (!_context9.t0) {
  14070. _context9.next = 9;
  14071. break;
  14072. }
  14073. _context9.next = 8;
  14074. return this._shouldRefreshAccessTokenHook(s, r);
  14075. case 8:
  14076. _context9.t0 = !_context9.sent;
  14077. case 9:
  14078. _context9.t1 = _context9.t0;
  14079. if (!_context9.t1) {
  14080. _context9.next = 12;
  14081. break;
  14082. }
  14083. i = !1;
  14084. case 12:
  14085. return _context9.abrupt("return", (!s || !r || r < Date.now()) && i ? this.refreshAccessToken() : {
  14086. accessToken: s,
  14087. accessTokenExpire: r
  14088. });
  14089. case 13:
  14090. case "end":
  14091. return _context9.stop();
  14092. }
  14093. }
  14094. }, _callee9, this);
  14095. }));
  14096. function getAccessToken() {
  14097. return _getAccessToken.apply(this, arguments);
  14098. }
  14099. return getAccessToken;
  14100. }()
  14101. }, {
  14102. key: "request",
  14103. value: function () {
  14104. var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(e, t, n) {
  14105. var s, r, i, _e13, o, _e14, _e15, a, c, u, h, l, d, p, f, g;
  14106. return _regenerator.default.wrap(function _callee10$(_context10) {
  14107. while (1) {
  14108. switch (_context10.prev = _context10.next) {
  14109. case 0:
  14110. s = "x-tcb-trace_".concat(this.config.env);
  14111. r = "application/x-www-form-urlencoded";
  14112. i = _objectSpread({
  14113. action: e,
  14114. env: this.config.env,
  14115. dataVersion: "2019-08-16"
  14116. }, t);
  14117. if (!(-1 === ze.indexOf(e))) {
  14118. _context10.next = 10;
  14119. break;
  14120. }
  14121. _e13 = this._cache.keys.refreshTokenKey;
  14122. _context10.t0 = this._cache.getStore(_e13);
  14123. if (!_context10.t0) {
  14124. _context10.next = 10;
  14125. break;
  14126. }
  14127. _context10.next = 9;
  14128. return this.getAccessToken();
  14129. case 9:
  14130. i.access_token = _context10.sent.accessToken;
  14131. case 10:
  14132. if ("storage.uploadFile" === e) {
  14133. o = new FormData();
  14134. for (_e14 in o) {
  14135. o.hasOwnProperty(_e14) && void 0 !== o[_e14] && o.append(_e14, i[_e14]);
  14136. }
  14137. r = "multipart/form-data";
  14138. } else {
  14139. r = "application/json", o = {};
  14140. for (_e15 in i) {
  14141. void 0 !== i[_e15] && (o[_e15] = i[_e15]);
  14142. }
  14143. }
  14144. a = {
  14145. headers: {
  14146. "content-type": r
  14147. }
  14148. };
  14149. n && n.onUploadProgress && (a.onUploadProgress = n.onUploadProgress);
  14150. c = this._localCache.getStore(s);
  14151. c && (a.headers["X-TCB-Trace"] = c);
  14152. u = t.parse, h = t.inQuery, l = t.search;
  14153. d = {
  14154. env: this.config.env
  14155. };
  14156. u && (d.parse = !0), h && (d = _objectSpread(_objectSpread({}, h), d));
  14157. p = function (e, t) {
  14158. var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14159. var s = /\?/.test(t);
  14160. var r = "";
  14161. for (var _e16 in n) {
  14162. "" === r ? !s && (t += "?") : r += "&", r += "".concat(_e16, "=").concat(encodeURIComponent(n[_e16]));
  14163. }
  14164. return /^http(s)?\:\/\//.test(t += r) ? t : "".concat(e).concat(t);
  14165. }(ye, "//tcb-api.tencentcloudapi.com/web", d);
  14166. l && (p += l);
  14167. _context10.next = 22;
  14168. return this.post(_objectSpread({
  14169. url: p,
  14170. data: o
  14171. }, a));
  14172. case 22:
  14173. f = _context10.sent;
  14174. g = f.header && f.header["x-tcb-trace"];
  14175. if (!(g && this._localCache.setStore(s, g), 200 !== Number(f.status) && 200 !== Number(f.statusCode) || !f.data)) {
  14176. _context10.next = 26;
  14177. break;
  14178. }
  14179. throw new se({
  14180. code: "NETWORK_ERROR",
  14181. message: "network request error"
  14182. });
  14183. case 26:
  14184. return _context10.abrupt("return", f);
  14185. case 27:
  14186. case "end":
  14187. return _context10.stop();
  14188. }
  14189. }
  14190. }, _callee10, this);
  14191. }));
  14192. function request(_x5, _x6, _x7) {
  14193. return _request.apply(this, arguments);
  14194. }
  14195. return request;
  14196. }()
  14197. }, {
  14198. key: "send",
  14199. value: function () {
  14200. var _send = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(e) {
  14201. var t,
  14202. n,
  14203. _n6,
  14204. _args11 = arguments;
  14205. return _regenerator.default.wrap(function _callee11$(_context11) {
  14206. while (1) {
  14207. switch (_context11.prev = _context11.next) {
  14208. case 0:
  14209. t = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
  14210. _context11.next = 3;
  14211. return this.request(e, t, {
  14212. onUploadProgress: t.onUploadProgress
  14213. });
  14214. case 3:
  14215. n = _context11.sent;
  14216. if (!("ACCESS_TOKEN_EXPIRED" === n.data.code && -1 === ze.indexOf(e))) {
  14217. _context11.next = 13;
  14218. break;
  14219. }
  14220. _context11.next = 7;
  14221. return this.refreshAccessToken();
  14222. case 7:
  14223. _context11.next = 9;
  14224. return this.request(e, t, {
  14225. onUploadProgress: t.onUploadProgress
  14226. });
  14227. case 9:
  14228. _n6 = _context11.sent;
  14229. if (!_n6.data.code) {
  14230. _context11.next = 12;
  14231. break;
  14232. }
  14233. throw new se({
  14234. code: _n6.data.code,
  14235. message: _n6.data.message
  14236. });
  14237. case 12:
  14238. return _context11.abrupt("return", _n6.data);
  14239. case 13:
  14240. if (!n.data.code) {
  14241. _context11.next = 15;
  14242. break;
  14243. }
  14244. throw new se({
  14245. code: n.data.code,
  14246. message: n.data.message
  14247. });
  14248. case 15:
  14249. return _context11.abrupt("return", n.data);
  14250. case 16:
  14251. case "end":
  14252. return _context11.stop();
  14253. }
  14254. }
  14255. }, _callee11, this);
  14256. }));
  14257. function send(_x8) {
  14258. return _send.apply(this, arguments);
  14259. }
  14260. return send;
  14261. }()
  14262. }, {
  14263. key: "setRefreshToken",
  14264. value: function setRefreshToken(e) {
  14265. var _this$_cache$keys3 = this._cache.keys,
  14266. t = _this$_cache$keys3.accessTokenKey,
  14267. n = _this$_cache$keys3.accessTokenExpireKey,
  14268. s = _this$_cache$keys3.refreshTokenKey;
  14269. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  14270. }
  14271. }]);
  14272. return Ve;
  14273. }();
  14274. var Qe = {};
  14275. function Ye(e) {
  14276. return Qe[e];
  14277. }
  14278. var Xe = /*#__PURE__*/function () {
  14279. function Xe(e) {
  14280. (0, _classCallCheck2.default)(this, Xe);
  14281. this.config = e, this._cache = Re(e.env), this._request = Ye(e.env);
  14282. }
  14283. (0, _createClass2.default)(Xe, [{
  14284. key: "setRefreshToken",
  14285. value: function setRefreshToken(e) {
  14286. var _this$_cache$keys4 = this._cache.keys,
  14287. t = _this$_cache$keys4.accessTokenKey,
  14288. n = _this$_cache$keys4.accessTokenExpireKey,
  14289. s = _this$_cache$keys4.refreshTokenKey;
  14290. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  14291. }
  14292. }, {
  14293. key: "setAccessToken",
  14294. value: function setAccessToken(e, t) {
  14295. var _this$_cache$keys5 = this._cache.keys,
  14296. n = _this$_cache$keys5.accessTokenKey,
  14297. s = _this$_cache$keys5.accessTokenExpireKey;
  14298. this._cache.setStore(n, e), this._cache.setStore(s, t);
  14299. }
  14300. }, {
  14301. key: "refreshUserInfo",
  14302. value: function () {
  14303. var _refreshUserInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
  14304. var _yield$this$_request$, e;
  14305. return _regenerator.default.wrap(function _callee12$(_context12) {
  14306. while (1) {
  14307. switch (_context12.prev = _context12.next) {
  14308. case 0:
  14309. _context12.next = 2;
  14310. return this._request.send("auth.getUserInfo", {});
  14311. case 2:
  14312. _yield$this$_request$ = _context12.sent;
  14313. e = _yield$this$_request$.data;
  14314. return _context12.abrupt("return", (this.setLocalUserInfo(e), e));
  14315. case 5:
  14316. case "end":
  14317. return _context12.stop();
  14318. }
  14319. }
  14320. }, _callee12, this);
  14321. }));
  14322. function refreshUserInfo() {
  14323. return _refreshUserInfo.apply(this, arguments);
  14324. }
  14325. return refreshUserInfo;
  14326. }()
  14327. }, {
  14328. key: "setLocalUserInfo",
  14329. value: function setLocalUserInfo(e) {
  14330. var t = this._cache.keys.userInfoKey;
  14331. this._cache.setStore(t, e);
  14332. }
  14333. }]);
  14334. return Xe;
  14335. }();
  14336. var Ze = /*#__PURE__*/function () {
  14337. function Ze(e) {
  14338. (0, _classCallCheck2.default)(this, Ze);
  14339. if (!e) throw new se({
  14340. code: "PARAM_ERROR",
  14341. message: "envId is not defined"
  14342. });
  14343. this._envId = e, this._cache = Re(this._envId), this._request = Ye(this._envId), this.setUserInfo();
  14344. }
  14345. (0, _createClass2.default)(Ze, [{
  14346. key: "linkWithTicket",
  14347. value: function linkWithTicket(e) {
  14348. if ("string" != typeof e) throw new se({
  14349. code: "PARAM_ERROR",
  14350. message: "ticket must be string"
  14351. });
  14352. return this._request.send("auth.linkWithTicket", {
  14353. ticket: e
  14354. });
  14355. }
  14356. }, {
  14357. key: "linkWithRedirect",
  14358. value: function linkWithRedirect(e) {
  14359. e.signInWithRedirect();
  14360. }
  14361. }, {
  14362. key: "updatePassword",
  14363. value: function updatePassword(e, t) {
  14364. return this._request.send("auth.updatePassword", {
  14365. oldPassword: t,
  14366. newPassword: e
  14367. });
  14368. }
  14369. }, {
  14370. key: "updateEmail",
  14371. value: function updateEmail(e) {
  14372. return this._request.send("auth.updateEmail", {
  14373. newEmail: e
  14374. });
  14375. }
  14376. }, {
  14377. key: "updateUsername",
  14378. value: function updateUsername(e) {
  14379. if ("string" != typeof e) throw new se({
  14380. code: "PARAM_ERROR",
  14381. message: "username must be a string"
  14382. });
  14383. return this._request.send("auth.updateUsername", {
  14384. username: e
  14385. });
  14386. }
  14387. }, {
  14388. key: "getLinkedUidList",
  14389. value: function () {
  14390. var _getLinkedUidList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
  14391. var _yield$this$_request$2, e, t, n;
  14392. return _regenerator.default.wrap(function _callee13$(_context13) {
  14393. while (1) {
  14394. switch (_context13.prev = _context13.next) {
  14395. case 0:
  14396. _context13.next = 2;
  14397. return this._request.send("auth.getLinkedUidList", {});
  14398. case 2:
  14399. _yield$this$_request$2 = _context13.sent;
  14400. e = _yield$this$_request$2.data;
  14401. t = !1;
  14402. n = e.users;
  14403. return _context13.abrupt("return", (n.forEach(function (e) {
  14404. e.wxOpenId && e.wxPublicId && (t = !0);
  14405. }), {
  14406. users: n,
  14407. hasPrimaryUid: t
  14408. }));
  14409. case 7:
  14410. case "end":
  14411. return _context13.stop();
  14412. }
  14413. }
  14414. }, _callee13, this);
  14415. }));
  14416. function getLinkedUidList() {
  14417. return _getLinkedUidList.apply(this, arguments);
  14418. }
  14419. return getLinkedUidList;
  14420. }()
  14421. }, {
  14422. key: "setPrimaryUid",
  14423. value: function setPrimaryUid(e) {
  14424. return this._request.send("auth.setPrimaryUid", {
  14425. uid: e
  14426. });
  14427. }
  14428. }, {
  14429. key: "unlink",
  14430. value: function unlink(e) {
  14431. return this._request.send("auth.unlink", {
  14432. platform: e
  14433. });
  14434. }
  14435. }, {
  14436. key: "update",
  14437. value: function () {
  14438. var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(e) {
  14439. var t, n, s, r, i, o, _yield$this$_request$3, a;
  14440. return _regenerator.default.wrap(function _callee14$(_context14) {
  14441. while (1) {
  14442. switch (_context14.prev = _context14.next) {
  14443. case 0:
  14444. t = e.nickName;
  14445. n = e.gender;
  14446. s = e.avatarUrl;
  14447. r = e.province;
  14448. i = e.country;
  14449. o = e.city;
  14450. _context14.next = 8;
  14451. return this._request.send("auth.updateUserInfo", {
  14452. nickName: t,
  14453. gender: n,
  14454. avatarUrl: s,
  14455. province: r,
  14456. country: i,
  14457. city: o
  14458. });
  14459. case 8:
  14460. _yield$this$_request$3 = _context14.sent;
  14461. a = _yield$this$_request$3.data;
  14462. this.setLocalUserInfo(a);
  14463. case 11:
  14464. case "end":
  14465. return _context14.stop();
  14466. }
  14467. }
  14468. }, _callee14, this);
  14469. }));
  14470. function update(_x9) {
  14471. return _update.apply(this, arguments);
  14472. }
  14473. return update;
  14474. }()
  14475. }, {
  14476. key: "refresh",
  14477. value: function () {
  14478. var _refresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
  14479. var _yield$this$_request$4, e;
  14480. return _regenerator.default.wrap(function _callee15$(_context15) {
  14481. while (1) {
  14482. switch (_context15.prev = _context15.next) {
  14483. case 0:
  14484. _context15.next = 2;
  14485. return this._request.send("auth.getUserInfo", {});
  14486. case 2:
  14487. _yield$this$_request$4 = _context15.sent;
  14488. e = _yield$this$_request$4.data;
  14489. return _context15.abrupt("return", (this.setLocalUserInfo(e), e));
  14490. case 5:
  14491. case "end":
  14492. return _context15.stop();
  14493. }
  14494. }
  14495. }, _callee15, this);
  14496. }));
  14497. function refresh() {
  14498. return _refresh.apply(this, arguments);
  14499. }
  14500. return refresh;
  14501. }()
  14502. }, {
  14503. key: "setUserInfo",
  14504. value: function setUserInfo() {
  14505. var _this8 = this;
  14506. var e = this._cache.keys.userInfoKey,
  14507. t = this._cache.getStore(e);
  14508. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach(function (e) {
  14509. _this8[e] = t[e];
  14510. }), this.location = {
  14511. country: t.country,
  14512. province: t.province,
  14513. city: t.city
  14514. };
  14515. }
  14516. }, {
  14517. key: "setLocalUserInfo",
  14518. value: function setLocalUserInfo(e) {
  14519. var t = this._cache.keys.userInfoKey;
  14520. this._cache.setStore(t, e), this.setUserInfo();
  14521. }
  14522. }]);
  14523. return Ze;
  14524. }();
  14525. var et = /*#__PURE__*/function () {
  14526. function et(e) {
  14527. (0, _classCallCheck2.default)(this, et);
  14528. if (!e) throw new se({
  14529. code: "PARAM_ERROR",
  14530. message: "envId is not defined"
  14531. });
  14532. this._cache = Re(e);
  14533. var _this$_cache$keys6 = this._cache.keys,
  14534. t = _this$_cache$keys6.refreshTokenKey,
  14535. n = _this$_cache$keys6.accessTokenKey,
  14536. s = _this$_cache$keys6.accessTokenExpireKey,
  14537. r = this._cache.getStore(t),
  14538. i = this._cache.getStore(n),
  14539. o = this._cache.getStore(s);
  14540. this.credential = {
  14541. refreshToken: r,
  14542. accessToken: i,
  14543. accessTokenExpire: o
  14544. }, this.user = new Ze(e);
  14545. }
  14546. (0, _createClass2.default)(et, [{
  14547. key: "isAnonymousAuth",
  14548. get: function get() {
  14549. return this.loginType === We.ANONYMOUS;
  14550. }
  14551. }, {
  14552. key: "isCustomAuth",
  14553. get: function get() {
  14554. return this.loginType === We.CUSTOM;
  14555. }
  14556. }, {
  14557. key: "isWeixinAuth",
  14558. get: function get() {
  14559. return this.loginType === We.WECHAT || this.loginType === We.WECHAT_OPEN || this.loginType === We.WECHAT_PUBLIC;
  14560. }
  14561. }, {
  14562. key: "loginType",
  14563. get: function get() {
  14564. return this._cache.getStore(this._cache.keys.loginTypeKey);
  14565. }
  14566. }]);
  14567. return et;
  14568. }();
  14569. var tt = /*#__PURE__*/function (_Xe) {
  14570. (0, _inherits2.default)(tt, _Xe);
  14571. var _super4 = _createSuper(tt);
  14572. function tt() {
  14573. (0, _classCallCheck2.default)(this, tt);
  14574. return _super4.apply(this, arguments);
  14575. }
  14576. (0, _createClass2.default)(tt, [{
  14577. key: "signIn",
  14578. value: function () {
  14579. var _signIn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
  14580. var _this$_cache$keys7, e, t, n, s, r, _e17;
  14581. return _regenerator.default.wrap(function _callee16$(_context16) {
  14582. while (1) {
  14583. switch (_context16.prev = _context16.next) {
  14584. case 0:
  14585. this._cache.updatePersistence("local");
  14586. _this$_cache$keys7 = this._cache.keys;
  14587. e = _this$_cache$keys7.anonymousUuidKey;
  14588. t = _this$_cache$keys7.refreshTokenKey;
  14589. n = this._cache.getStore(e) || void 0;
  14590. s = this._cache.getStore(t) || void 0;
  14591. _context16.next = 8;
  14592. return this._request.send("auth.signInAnonymously", {
  14593. anonymous_uuid: n,
  14594. refresh_token: s
  14595. });
  14596. case 8:
  14597. r = _context16.sent;
  14598. if (!(r.uuid && r.refresh_token)) {
  14599. _context16.next = 20;
  14600. break;
  14601. }
  14602. this._setAnonymousUUID(r.uuid);
  14603. this.setRefreshToken(r.refresh_token);
  14604. _context16.next = 14;
  14605. return this._request.refreshAccessToken();
  14606. case 14:
  14607. Fe(Me);
  14608. Fe(je, {
  14609. env: this.config.env,
  14610. loginType: We.ANONYMOUS,
  14611. persistence: "local"
  14612. });
  14613. _e17 = new et(this.config.env);
  14614. _context16.next = 19;
  14615. return _e17.user.refresh();
  14616. case 19:
  14617. return _context16.abrupt("return", _e17);
  14618. case 20:
  14619. throw new se({
  14620. message: "匿名登录失败"
  14621. });
  14622. case 21:
  14623. case "end":
  14624. return _context16.stop();
  14625. }
  14626. }
  14627. }, _callee16, this);
  14628. }));
  14629. function signIn() {
  14630. return _signIn.apply(this, arguments);
  14631. }
  14632. return signIn;
  14633. }()
  14634. }, {
  14635. key: "linkAndRetrieveDataWithTicket",
  14636. value: function () {
  14637. var _linkAndRetrieveDataWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(e) {
  14638. var _this$_cache$keys8, t, n, s, r, i;
  14639. return _regenerator.default.wrap(function _callee17$(_context17) {
  14640. while (1) {
  14641. switch (_context17.prev = _context17.next) {
  14642. case 0:
  14643. _this$_cache$keys8 = this._cache.keys;
  14644. t = _this$_cache$keys8.anonymousUuidKey;
  14645. n = _this$_cache$keys8.refreshTokenKey;
  14646. s = this._cache.getStore(t);
  14647. r = this._cache.getStore(n);
  14648. _context17.next = 7;
  14649. return this._request.send("auth.linkAndRetrieveDataWithTicket", {
  14650. anonymous_uuid: s,
  14651. refresh_token: r,
  14652. ticket: e
  14653. });
  14654. case 7:
  14655. i = _context17.sent;
  14656. if (!i.refresh_token) {
  14657. _context17.next = 16;
  14658. break;
  14659. }
  14660. this._clearAnonymousUUID();
  14661. this.setRefreshToken(i.refresh_token);
  14662. _context17.next = 13;
  14663. return this._request.refreshAccessToken();
  14664. case 13:
  14665. Fe(Be, {
  14666. env: this.config.env
  14667. });
  14668. Fe(je, {
  14669. loginType: We.CUSTOM,
  14670. persistence: "local"
  14671. });
  14672. return _context17.abrupt("return", {
  14673. credential: {
  14674. refreshToken: i.refresh_token
  14675. }
  14676. });
  14677. case 16:
  14678. throw new se({
  14679. message: "匿名转化失败"
  14680. });
  14681. case 17:
  14682. case "end":
  14683. return _context17.stop();
  14684. }
  14685. }
  14686. }, _callee17, this);
  14687. }));
  14688. function linkAndRetrieveDataWithTicket(_x10) {
  14689. return _linkAndRetrieveDataWithTicket.apply(this, arguments);
  14690. }
  14691. return linkAndRetrieveDataWithTicket;
  14692. }()
  14693. }, {
  14694. key: "_setAnonymousUUID",
  14695. value: function _setAnonymousUUID(e) {
  14696. var _this$_cache$keys9 = this._cache.keys,
  14697. t = _this$_cache$keys9.anonymousUuidKey,
  14698. n = _this$_cache$keys9.loginTypeKey;
  14699. this._cache.removeStore(t), this._cache.setStore(t, e), this._cache.setStore(n, We.ANONYMOUS);
  14700. }
  14701. }, {
  14702. key: "_clearAnonymousUUID",
  14703. value: function _clearAnonymousUUID() {
  14704. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  14705. }
  14706. }]);
  14707. return tt;
  14708. }(Xe);
  14709. var nt = /*#__PURE__*/function (_Xe2) {
  14710. (0, _inherits2.default)(nt, _Xe2);
  14711. var _super5 = _createSuper(nt);
  14712. function nt() {
  14713. (0, _classCallCheck2.default)(this, nt);
  14714. return _super5.apply(this, arguments);
  14715. }
  14716. (0, _createClass2.default)(nt, [{
  14717. key: "signIn",
  14718. value: function () {
  14719. var _signIn2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(e) {
  14720. var t, n;
  14721. return _regenerator.default.wrap(function _callee18$(_context18) {
  14722. while (1) {
  14723. switch (_context18.prev = _context18.next) {
  14724. case 0:
  14725. if (!("string" != typeof e)) {
  14726. _context18.next = 2;
  14727. break;
  14728. }
  14729. throw new se({
  14730. code: "PARAM_ERROR",
  14731. message: "ticket must be a string"
  14732. });
  14733. case 2:
  14734. t = this._cache.keys.refreshTokenKey;
  14735. _context18.next = 5;
  14736. return this._request.send("auth.signInWithTicket", {
  14737. ticket: e,
  14738. refresh_token: this._cache.getStore(t) || ""
  14739. });
  14740. case 5:
  14741. n = _context18.sent;
  14742. if (!n.refresh_token) {
  14743. _context18.next = 15;
  14744. break;
  14745. }
  14746. this.setRefreshToken(n.refresh_token);
  14747. _context18.next = 10;
  14748. return this._request.refreshAccessToken();
  14749. case 10:
  14750. Fe(Me);
  14751. Fe(je, {
  14752. env: this.config.env,
  14753. loginType: We.CUSTOM,
  14754. persistence: this.config.persistence
  14755. });
  14756. _context18.next = 14;
  14757. return this.refreshUserInfo();
  14758. case 14:
  14759. return _context18.abrupt("return", new et(this.config.env));
  14760. case 15:
  14761. throw new se({
  14762. message: "自定义登录失败"
  14763. });
  14764. case 16:
  14765. case "end":
  14766. return _context18.stop();
  14767. }
  14768. }
  14769. }, _callee18, this);
  14770. }));
  14771. function signIn(_x11) {
  14772. return _signIn2.apply(this, arguments);
  14773. }
  14774. return signIn;
  14775. }()
  14776. }]);
  14777. return nt;
  14778. }(Xe);
  14779. var st = /*#__PURE__*/function (_Xe3) {
  14780. (0, _inherits2.default)(st, _Xe3);
  14781. var _super6 = _createSuper(st);
  14782. function st() {
  14783. (0, _classCallCheck2.default)(this, st);
  14784. return _super6.apply(this, arguments);
  14785. }
  14786. (0, _createClass2.default)(st, [{
  14787. key: "signIn",
  14788. value: function () {
  14789. var _signIn3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(e, t) {
  14790. var n, s, r, i, o;
  14791. return _regenerator.default.wrap(function _callee19$(_context19) {
  14792. while (1) {
  14793. switch (_context19.prev = _context19.next) {
  14794. case 0:
  14795. if (!("string" != typeof e)) {
  14796. _context19.next = 2;
  14797. break;
  14798. }
  14799. throw new se({
  14800. code: "PARAM_ERROR",
  14801. message: "email must be a string"
  14802. });
  14803. case 2:
  14804. n = this._cache.keys.refreshTokenKey;
  14805. _context19.next = 5;
  14806. return this._request.send("auth.signIn", {
  14807. loginType: "EMAIL",
  14808. email: e,
  14809. password: t,
  14810. refresh_token: this._cache.getStore(n) || ""
  14811. });
  14812. case 5:
  14813. s = _context19.sent;
  14814. r = s.refresh_token;
  14815. i = s.access_token;
  14816. o = s.access_token_expire;
  14817. if (!r) {
  14818. _context19.next = 22;
  14819. break;
  14820. }
  14821. this.setRefreshToken(r);
  14822. if (!(i && o)) {
  14823. _context19.next = 15;
  14824. break;
  14825. }
  14826. this.setAccessToken(i, o);
  14827. _context19.next = 17;
  14828. break;
  14829. case 15:
  14830. _context19.next = 17;
  14831. return this._request.refreshAccessToken();
  14832. case 17:
  14833. _context19.next = 19;
  14834. return this.refreshUserInfo();
  14835. case 19:
  14836. Fe(Me);
  14837. Fe(je, {
  14838. env: this.config.env,
  14839. loginType: We.EMAIL,
  14840. persistence: this.config.persistence
  14841. });
  14842. return _context19.abrupt("return", new et(this.config.env));
  14843. case 22:
  14844. throw s.code ? new se({
  14845. code: s.code,
  14846. message: "\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  14847. }) : new se({
  14848. message: "邮箱登录失败"
  14849. });
  14850. case 23:
  14851. case "end":
  14852. return _context19.stop();
  14853. }
  14854. }
  14855. }, _callee19, this);
  14856. }));
  14857. function signIn(_x12, _x13) {
  14858. return _signIn3.apply(this, arguments);
  14859. }
  14860. return signIn;
  14861. }()
  14862. }, {
  14863. key: "activate",
  14864. value: function () {
  14865. var _activate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(e) {
  14866. return _regenerator.default.wrap(function _callee20$(_context20) {
  14867. while (1) {
  14868. switch (_context20.prev = _context20.next) {
  14869. case 0:
  14870. return _context20.abrupt("return", this._request.send("auth.activateEndUserMail", {
  14871. token: e
  14872. }));
  14873. case 1:
  14874. case "end":
  14875. return _context20.stop();
  14876. }
  14877. }
  14878. }, _callee20, this);
  14879. }));
  14880. function activate(_x14) {
  14881. return _activate.apply(this, arguments);
  14882. }
  14883. return activate;
  14884. }()
  14885. }, {
  14886. key: "resetPasswordWithToken",
  14887. value: function () {
  14888. var _resetPasswordWithToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(e, t) {
  14889. return _regenerator.default.wrap(function _callee21$(_context21) {
  14890. while (1) {
  14891. switch (_context21.prev = _context21.next) {
  14892. case 0:
  14893. return _context21.abrupt("return", this._request.send("auth.resetPasswordWithToken", {
  14894. token: e,
  14895. newPassword: t
  14896. }));
  14897. case 1:
  14898. case "end":
  14899. return _context21.stop();
  14900. }
  14901. }
  14902. }, _callee21, this);
  14903. }));
  14904. function resetPasswordWithToken(_x15, _x16) {
  14905. return _resetPasswordWithToken.apply(this, arguments);
  14906. }
  14907. return resetPasswordWithToken;
  14908. }()
  14909. }]);
  14910. return st;
  14911. }(Xe);
  14912. var rt = /*#__PURE__*/function (_Xe4) {
  14913. (0, _inherits2.default)(rt, _Xe4);
  14914. var _super7 = _createSuper(rt);
  14915. function rt() {
  14916. (0, _classCallCheck2.default)(this, rt);
  14917. return _super7.apply(this, arguments);
  14918. }
  14919. (0, _createClass2.default)(rt, [{
  14920. key: "signIn",
  14921. value: function () {
  14922. var _signIn4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(e, t) {
  14923. var n, s, r, i, o;
  14924. return _regenerator.default.wrap(function _callee22$(_context22) {
  14925. while (1) {
  14926. switch (_context22.prev = _context22.next) {
  14927. case 0:
  14928. if (!("string" != typeof e)) {
  14929. _context22.next = 2;
  14930. break;
  14931. }
  14932. throw new se({
  14933. code: "PARAM_ERROR",
  14934. message: "username must be a string"
  14935. });
  14936. case 2:
  14937. "string" != typeof t && (t = "", console.warn("password is empty"));
  14938. n = this._cache.keys.refreshTokenKey;
  14939. _context22.next = 6;
  14940. return this._request.send("auth.signIn", {
  14941. loginType: We.USERNAME,
  14942. username: e,
  14943. password: t,
  14944. refresh_token: this._cache.getStore(n) || ""
  14945. });
  14946. case 6:
  14947. s = _context22.sent;
  14948. r = s.refresh_token;
  14949. i = s.access_token_expire;
  14950. o = s.access_token;
  14951. if (!r) {
  14952. _context22.next = 23;
  14953. break;
  14954. }
  14955. this.setRefreshToken(r);
  14956. if (!(o && i)) {
  14957. _context22.next = 16;
  14958. break;
  14959. }
  14960. this.setAccessToken(o, i);
  14961. _context22.next = 18;
  14962. break;
  14963. case 16:
  14964. _context22.next = 18;
  14965. return this._request.refreshAccessToken();
  14966. case 18:
  14967. _context22.next = 20;
  14968. return this.refreshUserInfo();
  14969. case 20:
  14970. Fe(Me);
  14971. Fe(je, {
  14972. env: this.config.env,
  14973. loginType: We.USERNAME,
  14974. persistence: this.config.persistence
  14975. });
  14976. return _context22.abrupt("return", new et(this.config.env));
  14977. case 23:
  14978. throw s.code ? new se({
  14979. code: s.code,
  14980. message: "\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  14981. }) : new se({
  14982. message: "用户名密码登录失败"
  14983. });
  14984. case 24:
  14985. case "end":
  14986. return _context22.stop();
  14987. }
  14988. }
  14989. }, _callee22, this);
  14990. }));
  14991. function signIn(_x17, _x18) {
  14992. return _signIn4.apply(this, arguments);
  14993. }
  14994. return signIn;
  14995. }()
  14996. }]);
  14997. return rt;
  14998. }(Xe);
  14999. var it = /*#__PURE__*/function () {
  15000. function it(e) {
  15001. (0, _classCallCheck2.default)(this, it);
  15002. this.config = e, this._cache = Re(e.env), this._request = Ye(e.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), De(je, this._onLoginTypeChanged);
  15003. }
  15004. (0, _createClass2.default)(it, [{
  15005. key: "currentUser",
  15006. get: function get() {
  15007. var e = this.hasLoginState();
  15008. return e && e.user || null;
  15009. }
  15010. }, {
  15011. key: "loginType",
  15012. get: function get() {
  15013. return this._cache.getStore(this._cache.keys.loginTypeKey);
  15014. }
  15015. }, {
  15016. key: "anonymousAuthProvider",
  15017. value: function anonymousAuthProvider() {
  15018. return new tt(this.config);
  15019. }
  15020. }, {
  15021. key: "customAuthProvider",
  15022. value: function customAuthProvider() {
  15023. return new nt(this.config);
  15024. }
  15025. }, {
  15026. key: "emailAuthProvider",
  15027. value: function emailAuthProvider() {
  15028. return new st(this.config);
  15029. }
  15030. }, {
  15031. key: "usernameAuthProvider",
  15032. value: function usernameAuthProvider() {
  15033. return new rt(this.config);
  15034. }
  15035. }, {
  15036. key: "signInAnonymously",
  15037. value: function () {
  15038. var _signInAnonymously = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
  15039. return _regenerator.default.wrap(function _callee23$(_context23) {
  15040. while (1) {
  15041. switch (_context23.prev = _context23.next) {
  15042. case 0:
  15043. return _context23.abrupt("return", new tt(this.config).signIn());
  15044. case 1:
  15045. case "end":
  15046. return _context23.stop();
  15047. }
  15048. }
  15049. }, _callee23, this);
  15050. }));
  15051. function signInAnonymously() {
  15052. return _signInAnonymously.apply(this, arguments);
  15053. }
  15054. return signInAnonymously;
  15055. }()
  15056. }, {
  15057. key: "signInWithEmailAndPassword",
  15058. value: function () {
  15059. var _signInWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(e, t) {
  15060. return _regenerator.default.wrap(function _callee24$(_context24) {
  15061. while (1) {
  15062. switch (_context24.prev = _context24.next) {
  15063. case 0:
  15064. return _context24.abrupt("return", new st(this.config).signIn(e, t));
  15065. case 1:
  15066. case "end":
  15067. return _context24.stop();
  15068. }
  15069. }
  15070. }, _callee24, this);
  15071. }));
  15072. function signInWithEmailAndPassword(_x19, _x20) {
  15073. return _signInWithEmailAndPassword.apply(this, arguments);
  15074. }
  15075. return signInWithEmailAndPassword;
  15076. }()
  15077. }, {
  15078. key: "signInWithUsernameAndPassword",
  15079. value: function signInWithUsernameAndPassword(e, t) {
  15080. return new rt(this.config).signIn(e, t);
  15081. }
  15082. }, {
  15083. key: "linkAndRetrieveDataWithTicket",
  15084. value: function () {
  15085. var _linkAndRetrieveDataWithTicket2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(e) {
  15086. return _regenerator.default.wrap(function _callee25$(_context25) {
  15087. while (1) {
  15088. switch (_context25.prev = _context25.next) {
  15089. case 0:
  15090. this._anonymousAuthProvider || (this._anonymousAuthProvider = new tt(this.config)), De(Be, this._onAnonymousConverted);
  15091. _context25.next = 3;
  15092. return this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);
  15093. case 3:
  15094. return _context25.abrupt("return", _context25.sent);
  15095. case 4:
  15096. case "end":
  15097. return _context25.stop();
  15098. }
  15099. }
  15100. }, _callee25, this);
  15101. }));
  15102. function linkAndRetrieveDataWithTicket(_x21) {
  15103. return _linkAndRetrieveDataWithTicket2.apply(this, arguments);
  15104. }
  15105. return linkAndRetrieveDataWithTicket;
  15106. }()
  15107. }, {
  15108. key: "signOut",
  15109. value: function () {
  15110. var _signOut = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
  15111. var _this$_cache$keys10, e, t, n, s, r;
  15112. return _regenerator.default.wrap(function _callee26$(_context26) {
  15113. while (1) {
  15114. switch (_context26.prev = _context26.next) {
  15115. case 0:
  15116. if (!(this.loginType === We.ANONYMOUS)) {
  15117. _context26.next = 2;
  15118. break;
  15119. }
  15120. throw new se({
  15121. message: "匿名用户不支持登出操作"
  15122. });
  15123. case 2:
  15124. _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);
  15125. if (s) {
  15126. _context26.next = 5;
  15127. break;
  15128. }
  15129. return _context26.abrupt("return");
  15130. case 5:
  15131. _context26.next = 7;
  15132. return this._request.send("auth.logout", {
  15133. refresh_token: s
  15134. });
  15135. case 7:
  15136. r = _context26.sent;
  15137. return _context26.abrupt("return", (this._cache.removeStore(e), this._cache.removeStore(t), this._cache.removeStore(n), Fe(Me), Fe(je, {
  15138. env: this.config.env,
  15139. loginType: We.NULL,
  15140. persistence: this.config.persistence
  15141. }), r));
  15142. case 9:
  15143. case "end":
  15144. return _context26.stop();
  15145. }
  15146. }
  15147. }, _callee26, this);
  15148. }));
  15149. function signOut() {
  15150. return _signOut.apply(this, arguments);
  15151. }
  15152. return signOut;
  15153. }()
  15154. }, {
  15155. key: "signUpWithEmailAndPassword",
  15156. value: function () {
  15157. var _signUpWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(e, t) {
  15158. return _regenerator.default.wrap(function _callee27$(_context27) {
  15159. while (1) {
  15160. switch (_context27.prev = _context27.next) {
  15161. case 0:
  15162. return _context27.abrupt("return", this._request.send("auth.signUpWithEmailAndPassword", {
  15163. email: e,
  15164. password: t
  15165. }));
  15166. case 1:
  15167. case "end":
  15168. return _context27.stop();
  15169. }
  15170. }
  15171. }, _callee27, this);
  15172. }));
  15173. function signUpWithEmailAndPassword(_x22, _x23) {
  15174. return _signUpWithEmailAndPassword.apply(this, arguments);
  15175. }
  15176. return signUpWithEmailAndPassword;
  15177. }()
  15178. }, {
  15179. key: "sendPasswordResetEmail",
  15180. value: function () {
  15181. var _sendPasswordResetEmail = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(e) {
  15182. return _regenerator.default.wrap(function _callee28$(_context28) {
  15183. while (1) {
  15184. switch (_context28.prev = _context28.next) {
  15185. case 0:
  15186. return _context28.abrupt("return", this._request.send("auth.sendPasswordResetEmail", {
  15187. email: e
  15188. }));
  15189. case 1:
  15190. case "end":
  15191. return _context28.stop();
  15192. }
  15193. }
  15194. }, _callee28, this);
  15195. }));
  15196. function sendPasswordResetEmail(_x24) {
  15197. return _sendPasswordResetEmail.apply(this, arguments);
  15198. }
  15199. return sendPasswordResetEmail;
  15200. }()
  15201. }, {
  15202. key: "onLoginStateChanged",
  15203. value: function onLoginStateChanged(e) {
  15204. var _this9 = this;
  15205. De(Me, function () {
  15206. var t = _this9.hasLoginState();
  15207. e.call(_this9, t);
  15208. });
  15209. var t = this.hasLoginState();
  15210. e.call(this, t);
  15211. }
  15212. }, {
  15213. key: "onLoginStateExpired",
  15214. value: function onLoginStateExpired(e) {
  15215. De(Ke, e.bind(this));
  15216. }
  15217. }, {
  15218. key: "onAccessTokenRefreshed",
  15219. value: function onAccessTokenRefreshed(e) {
  15220. De($e, e.bind(this));
  15221. }
  15222. }, {
  15223. key: "onAnonymousConverted",
  15224. value: function onAnonymousConverted(e) {
  15225. De(Be, e.bind(this));
  15226. }
  15227. }, {
  15228. key: "onLoginTypeChanged",
  15229. value: function onLoginTypeChanged(e) {
  15230. var _this10 = this;
  15231. De(je, function () {
  15232. var t = _this10.hasLoginState();
  15233. e.call(_this10, t);
  15234. });
  15235. }
  15236. }, {
  15237. key: "getAccessToken",
  15238. value: function () {
  15239. var _getAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
  15240. return _regenerator.default.wrap(function _callee29$(_context29) {
  15241. while (1) {
  15242. switch (_context29.prev = _context29.next) {
  15243. case 0:
  15244. _context29.next = 2;
  15245. return this._request.getAccessToken();
  15246. case 2:
  15247. _context29.t0 = _context29.sent.accessToken;
  15248. _context29.t1 = this.config.env;
  15249. return _context29.abrupt("return", {
  15250. accessToken: _context29.t0,
  15251. env: _context29.t1
  15252. });
  15253. case 5:
  15254. case "end":
  15255. return _context29.stop();
  15256. }
  15257. }
  15258. }, _callee29, this);
  15259. }));
  15260. function getAccessToken() {
  15261. return _getAccessToken2.apply(this, arguments);
  15262. }
  15263. return getAccessToken;
  15264. }()
  15265. }, {
  15266. key: "hasLoginState",
  15267. value: function hasLoginState() {
  15268. var e = this._cache.keys.refreshTokenKey;
  15269. return this._cache.getStore(e) ? new et(this.config.env) : null;
  15270. }
  15271. }, {
  15272. key: "isUsernameRegistered",
  15273. value: function () {
  15274. var _isUsernameRegistered = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(e) {
  15275. var _yield$this$_request$5, t;
  15276. return _regenerator.default.wrap(function _callee30$(_context30) {
  15277. while (1) {
  15278. switch (_context30.prev = _context30.next) {
  15279. case 0:
  15280. if (!("string" != typeof e)) {
  15281. _context30.next = 2;
  15282. break;
  15283. }
  15284. throw new se({
  15285. code: "PARAM_ERROR",
  15286. message: "username must be a string"
  15287. });
  15288. case 2:
  15289. _context30.next = 4;
  15290. return this._request.send("auth.isUsernameRegistered", {
  15291. username: e
  15292. });
  15293. case 4:
  15294. _yield$this$_request$5 = _context30.sent;
  15295. t = _yield$this$_request$5.data;
  15296. return _context30.abrupt("return", t && t.isRegistered);
  15297. case 7:
  15298. case "end":
  15299. return _context30.stop();
  15300. }
  15301. }
  15302. }, _callee30, this);
  15303. }));
  15304. function isUsernameRegistered(_x25) {
  15305. return _isUsernameRegistered.apply(this, arguments);
  15306. }
  15307. return isUsernameRegistered;
  15308. }()
  15309. }, {
  15310. key: "getLoginState",
  15311. value: function getLoginState() {
  15312. return Promise.resolve(this.hasLoginState());
  15313. }
  15314. }, {
  15315. key: "signInWithTicket",
  15316. value: function () {
  15317. var _signInWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(e) {
  15318. return _regenerator.default.wrap(function _callee31$(_context31) {
  15319. while (1) {
  15320. switch (_context31.prev = _context31.next) {
  15321. case 0:
  15322. return _context31.abrupt("return", new nt(this.config).signIn(e));
  15323. case 1:
  15324. case "end":
  15325. return _context31.stop();
  15326. }
  15327. }
  15328. }, _callee31, this);
  15329. }));
  15330. function signInWithTicket(_x26) {
  15331. return _signInWithTicket.apply(this, arguments);
  15332. }
  15333. return signInWithTicket;
  15334. }()
  15335. }, {
  15336. key: "shouldRefreshAccessToken",
  15337. value: function shouldRefreshAccessToken(e) {
  15338. this._request._shouldRefreshAccessTokenHook = e.bind(this);
  15339. }
  15340. }, {
  15341. key: "getUserInfo",
  15342. value: function getUserInfo() {
  15343. return this._request.send("auth.getUserInfo", {}).then(function (e) {
  15344. return e.code ? e : _objectSpread(_objectSpread({}, e.data), {}, {
  15345. requestId: e.seqId
  15346. });
  15347. });
  15348. }
  15349. }, {
  15350. key: "getAuthHeader",
  15351. value: function getAuthHeader() {
  15352. var _this$_cache$keys11 = this._cache.keys,
  15353. e = _this$_cache$keys11.refreshTokenKey,
  15354. t = _this$_cache$keys11.accessTokenKey,
  15355. n = this._cache.getStore(e);
  15356. return {
  15357. "x-cloudbase-credentials": this._cache.getStore(t) + "/@@/" + n
  15358. };
  15359. }
  15360. }, {
  15361. key: "_onAnonymousConverted",
  15362. value: function _onAnonymousConverted(e) {
  15363. var t = e.data.env;
  15364. t === this.config.env && this._cache.updatePersistence(this.config.persistence);
  15365. }
  15366. }, {
  15367. key: "_onLoginTypeChanged",
  15368. value: function _onLoginTypeChanged(e) {
  15369. var _e$data = e.data,
  15370. t = _e$data.loginType,
  15371. n = _e$data.persistence,
  15372. s = _e$data.env;
  15373. s === this.config.env && (this._cache.updatePersistence(n), this._cache.setStore(this._cache.keys.loginTypeKey, t));
  15374. }
  15375. }]);
  15376. return it;
  15377. }();
  15378. var ot = function ot(e, t) {
  15379. t = t || ve();
  15380. var n = Ye(this.config.env),
  15381. s = e.cloudPath,
  15382. r = e.filePath,
  15383. i = e.onUploadProgress,
  15384. _e$fileType = e.fileType,
  15385. o = _e$fileType === void 0 ? "image" : _e$fileType;
  15386. return n.send("storage.getUploadMetadata", {
  15387. path: s
  15388. }).then(function (e) {
  15389. var _e$data2 = e.data,
  15390. a = _e$data2.url,
  15391. c = _e$data2.authorization,
  15392. u = _e$data2.token,
  15393. h = _e$data2.fileId,
  15394. l = _e$data2.cosFileId,
  15395. d = e.requestId,
  15396. p = {
  15397. key: s,
  15398. signature: c,
  15399. "x-cos-meta-fileid": l,
  15400. success_action_status: "201",
  15401. "x-cos-security-token": u
  15402. };
  15403. n.upload({
  15404. url: a,
  15405. data: p,
  15406. file: r,
  15407. name: s,
  15408. fileType: o,
  15409. onUploadProgress: i
  15410. }).then(function (e) {
  15411. 201 === e.statusCode ? t(null, {
  15412. fileID: h,
  15413. requestId: d
  15414. }) : t(new se({
  15415. code: "STORAGE_REQUEST_FAIL",
  15416. message: "STORAGE_REQUEST_FAIL: ".concat(e.data)
  15417. }));
  15418. }).catch(function (e) {
  15419. t(e);
  15420. });
  15421. }).catch(function (e) {
  15422. t(e);
  15423. }), t.promise;
  15424. },
  15425. at = function at(e, t) {
  15426. t = t || ve();
  15427. var n = Ye(this.config.env),
  15428. s = e.cloudPath;
  15429. return n.send("storage.getUploadMetadata", {
  15430. path: s
  15431. }).then(function (e) {
  15432. t(null, e);
  15433. }).catch(function (e) {
  15434. t(e);
  15435. }), t.promise;
  15436. },
  15437. ct = function ct(_ref7, t) {
  15438. var e = _ref7.fileList;
  15439. if (t = t || ve(), !e || !Array.isArray(e)) return {
  15440. code: "INVALID_PARAM",
  15441. message: "fileList必须是非空的数组"
  15442. };
  15443. var _iterator3 = _createForOfIteratorHelper(e),
  15444. _step3;
  15445. try {
  15446. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  15447. var _t8 = _step3.value;
  15448. if (!_t8 || "string" != typeof _t8) return {
  15449. code: "INVALID_PARAM",
  15450. message: "fileList的元素必须是非空的字符串"
  15451. };
  15452. }
  15453. } catch (err) {
  15454. _iterator3.e(err);
  15455. } finally {
  15456. _iterator3.f();
  15457. }
  15458. var n = {
  15459. fileid_list: e
  15460. };
  15461. return Ye(this.config.env).send("storage.batchDeleteFile", n).then(function (e) {
  15462. e.code ? t(null, e) : t(null, {
  15463. fileList: e.data.delete_list,
  15464. requestId: e.requestId
  15465. });
  15466. }).catch(function (e) {
  15467. t(e);
  15468. }), t.promise;
  15469. },
  15470. ut = function ut(_ref8, t) {
  15471. var e = _ref8.fileList;
  15472. t = t || ve(), e && Array.isArray(e) || t(null, {
  15473. code: "INVALID_PARAM",
  15474. message: "fileList必须是非空的数组"
  15475. });
  15476. var n = [];
  15477. var _iterator4 = _createForOfIteratorHelper(e),
  15478. _step4;
  15479. try {
  15480. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  15481. var _s9 = _step4.value;
  15482. "object" == (0, _typeof2.default)(_s9) ? (_s9.hasOwnProperty("fileID") && _s9.hasOwnProperty("maxAge") || t(null, {
  15483. code: "INVALID_PARAM",
  15484. message: "fileList的元素必须是包含fileID和maxAge的对象"
  15485. }), n.push({
  15486. fileid: _s9.fileID,
  15487. max_age: _s9.maxAge
  15488. })) : "string" == typeof _s9 ? n.push({
  15489. fileid: _s9
  15490. }) : t(null, {
  15491. code: "INVALID_PARAM",
  15492. message: "fileList的元素必须是字符串"
  15493. });
  15494. }
  15495. } catch (err) {
  15496. _iterator4.e(err);
  15497. } finally {
  15498. _iterator4.f();
  15499. }
  15500. var s = {
  15501. file_list: n
  15502. };
  15503. return Ye(this.config.env).send("storage.batchGetDownloadUrl", s).then(function (e) {
  15504. e.code ? t(null, e) : t(null, {
  15505. fileList: e.data.download_list,
  15506. requestId: e.requestId
  15507. });
  15508. }).catch(function (e) {
  15509. t(e);
  15510. }), t.promise;
  15511. },
  15512. ht = /*#__PURE__*/function () {
  15513. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(_ref9, t) {
  15514. var e, n, s, r;
  15515. return _regenerator.default.wrap(function _callee32$(_context32) {
  15516. while (1) {
  15517. switch (_context32.prev = _context32.next) {
  15518. case 0:
  15519. e = _ref9.fileID;
  15520. _context32.next = 3;
  15521. return ut.call(this, {
  15522. fileList: [{
  15523. fileID: e,
  15524. maxAge: 600
  15525. }]
  15526. });
  15527. case 3:
  15528. n = _context32.sent.fileList[0];
  15529. if (!("SUCCESS" !== n.code)) {
  15530. _context32.next = 6;
  15531. break;
  15532. }
  15533. return _context32.abrupt("return", t ? t(n) : new Promise(function (e) {
  15534. e(n);
  15535. }));
  15536. case 6:
  15537. s = Ye(this.config.env);
  15538. r = n.download_url;
  15539. if (!(r = encodeURI(r), !t)) {
  15540. _context32.next = 10;
  15541. break;
  15542. }
  15543. return _context32.abrupt("return", s.download({
  15544. url: r
  15545. }));
  15546. case 10:
  15547. _context32.t0 = t;
  15548. _context32.next = 13;
  15549. return s.download({
  15550. url: r
  15551. });
  15552. case 13:
  15553. _context32.t1 = _context32.sent;
  15554. (0, _context32.t0)(_context32.t1);
  15555. case 15:
  15556. case "end":
  15557. return _context32.stop();
  15558. }
  15559. }
  15560. }, _callee32, this);
  15561. }));
  15562. return function ht(_x27, _x28) {
  15563. return _ref10.apply(this, arguments);
  15564. };
  15565. }(),
  15566. lt = function lt(_ref11, i) {
  15567. var e = _ref11.name,
  15568. t = _ref11.data,
  15569. n = _ref11.query,
  15570. s = _ref11.parse,
  15571. r = _ref11.search;
  15572. var o = i || ve();
  15573. var a;
  15574. try {
  15575. a = t ? JSON.stringify(t) : "";
  15576. } catch (e) {
  15577. return Promise.reject(e);
  15578. }
  15579. if (!e) return Promise.reject(new se({
  15580. code: "PARAM_ERROR",
  15581. message: "函数名不能为空"
  15582. }));
  15583. var c = {
  15584. inQuery: n,
  15585. parse: s,
  15586. search: r,
  15587. function_name: e,
  15588. request_data: a
  15589. };
  15590. return Ye(this.config.env).send("functions.invokeFunction", c).then(function (e) {
  15591. if (e.code) o(null, e);else {
  15592. var _t9 = e.data.response_data;
  15593. if (s) o(null, {
  15594. result: _t9,
  15595. requestId: e.requestId
  15596. });else try {
  15597. _t9 = JSON.parse(e.data.response_data), o(null, {
  15598. result: _t9,
  15599. requestId: e.requestId
  15600. });
  15601. } catch (e) {
  15602. o(new se({
  15603. message: "response data must be json"
  15604. }));
  15605. }
  15606. }
  15607. return o.promise;
  15608. }).catch(function (e) {
  15609. o(e);
  15610. }), o.promise;
  15611. },
  15612. dt = {
  15613. timeout: 15e3,
  15614. persistence: "session"
  15615. },
  15616. pt = {};
  15617. var ft = /*#__PURE__*/function () {
  15618. function ft(e) {
  15619. (0, _classCallCheck2.default)(this, ft);
  15620. this.config = e || this.config, this.authObj = void 0;
  15621. }
  15622. (0, _createClass2.default)(ft, [{
  15623. key: "init",
  15624. value: function init(e) {
  15625. switch (Te.adapter || (this.requestClient = new Te.adapter.reqClass({
  15626. timeout: e.timeout || 5e3,
  15627. timeoutMsg: "\u8BF7\u6C42\u5728".concat((e.timeout || 5e3) / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD")
  15628. })), this.config = _objectSpread(_objectSpread({}, dt), e), !0) {
  15629. case this.config.timeout > 6e5:
  15630. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  15631. break;
  15632. case this.config.timeout < 100:
  15633. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  15634. }
  15635. return new ft(this.config);
  15636. }
  15637. }, {
  15638. key: "auth",
  15639. value: function auth() {
  15640. var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15641. e = _ref12.persistence;
  15642. if (this.authObj) return this.authObj;
  15643. var t = e || Te.adapter.primaryStorage || dt.persistence;
  15644. var n;
  15645. return t !== this.config.persistence && (this.config.persistence = t), function (e) {
  15646. var t = e.env;
  15647. Oe[t] = new Ee(e), xe[t] = new Ee(_objectSpread(_objectSpread({}, e), {}, {
  15648. persistence: "local"
  15649. }));
  15650. }(this.config), n = this.config, Qe[n.env] = new Ve(n), this.authObj = new it(this.config), this.authObj;
  15651. }
  15652. }, {
  15653. key: "on",
  15654. value: function on(e, t) {
  15655. return De.apply(this, [e, t]);
  15656. }
  15657. }, {
  15658. key: "off",
  15659. value: function off(e, t) {
  15660. return qe.apply(this, [e, t]);
  15661. }
  15662. }, {
  15663. key: "callFunction",
  15664. value: function callFunction(e, t) {
  15665. return lt.apply(this, [e, t]);
  15666. }
  15667. }, {
  15668. key: "deleteFile",
  15669. value: function deleteFile(e, t) {
  15670. return ct.apply(this, [e, t]);
  15671. }
  15672. }, {
  15673. key: "getTempFileURL",
  15674. value: function getTempFileURL(e, t) {
  15675. return ut.apply(this, [e, t]);
  15676. }
  15677. }, {
  15678. key: "downloadFile",
  15679. value: function downloadFile(e, t) {
  15680. return ht.apply(this, [e, t]);
  15681. }
  15682. }, {
  15683. key: "uploadFile",
  15684. value: function uploadFile(e, t) {
  15685. return ot.apply(this, [e, t]);
  15686. }
  15687. }, {
  15688. key: "getUploadMetadata",
  15689. value: function getUploadMetadata(e, t) {
  15690. return at.apply(this, [e, t]);
  15691. }
  15692. }, {
  15693. key: "registerExtension",
  15694. value: function registerExtension(e) {
  15695. pt[e.name] = e;
  15696. }
  15697. }, {
  15698. key: "invokeExtension",
  15699. value: function () {
  15700. var _invokeExtension = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(e, t) {
  15701. var n;
  15702. return _regenerator.default.wrap(function _callee33$(_context33) {
  15703. while (1) {
  15704. switch (_context33.prev = _context33.next) {
  15705. case 0:
  15706. n = pt[e];
  15707. if (n) {
  15708. _context33.next = 3;
  15709. break;
  15710. }
  15711. throw new se({
  15712. message: "\u6269\u5C55".concat(e, " \u5FC5\u987B\u5148\u6CE8\u518C")
  15713. });
  15714. case 3:
  15715. _context33.next = 5;
  15716. return n.invoke(t, this);
  15717. case 5:
  15718. return _context33.abrupt("return", _context33.sent);
  15719. case 6:
  15720. case "end":
  15721. return _context33.stop();
  15722. }
  15723. }
  15724. }, _callee33, this);
  15725. }));
  15726. function invokeExtension(_x29, _x30) {
  15727. return _invokeExtension.apply(this, arguments);
  15728. }
  15729. return invokeExtension;
  15730. }()
  15731. }, {
  15732. key: "useAdapters",
  15733. value: function useAdapters(e) {
  15734. var _ref13 = ke(e) || {},
  15735. t = _ref13.adapter,
  15736. n = _ref13.runtime;
  15737. t && (Te.adapter = t), n && (Te.runtime = n);
  15738. }
  15739. }]);
  15740. return ft;
  15741. }();
  15742. var gt = new ft();
  15743. function mt(e, t, n) {
  15744. void 0 === n && (n = {});
  15745. var s = /\?/.test(t),
  15746. r = "";
  15747. for (var i in n) {
  15748. "" === r ? !s && (t += "?") : r += "&", r += i + "=" + encodeURIComponent(n[i]);
  15749. }
  15750. return /^http(s)?:\/\//.test(t += r) ? t : "" + e + t;
  15751. }
  15752. var yt = /*#__PURE__*/function () {
  15753. function yt() {
  15754. (0, _classCallCheck2.default)(this, yt);
  15755. }
  15756. (0, _createClass2.default)(yt, [{
  15757. key: "post",
  15758. value: function post(e) {
  15759. var t = e.url,
  15760. n = e.data,
  15761. s = e.headers;
  15762. return new Promise(function (e, r) {
  15763. re.request({
  15764. url: mt("https:", t),
  15765. data: n,
  15766. method: "POST",
  15767. header: s,
  15768. success: function success(t) {
  15769. e(t);
  15770. },
  15771. fail: function fail(e) {
  15772. r(e);
  15773. }
  15774. });
  15775. });
  15776. }
  15777. }, {
  15778. key: "upload",
  15779. value: function upload(e) {
  15780. return new Promise(function (t, n) {
  15781. var s = e.url,
  15782. r = e.file,
  15783. i = e.data,
  15784. o = e.headers,
  15785. a = e.fileType,
  15786. c = re.uploadFile({
  15787. url: mt("https:", s),
  15788. name: "file",
  15789. formData: Object.assign({}, i),
  15790. filePath: r,
  15791. fileType: a,
  15792. header: o,
  15793. success: function success(e) {
  15794. var n = {
  15795. statusCode: e.statusCode,
  15796. data: e.data || {}
  15797. };
  15798. 200 === e.statusCode && i.success_action_status && (n.statusCode = parseInt(i.success_action_status, 10)), t(n);
  15799. },
  15800. fail: function fail(e) {
  15801. n(new Error(e.errMsg || "uploadFile:fail"));
  15802. }
  15803. });
  15804. "function" == typeof e.onUploadProgress && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (t) {
  15805. e.onUploadProgress({
  15806. loaded: t.totalBytesSent,
  15807. total: t.totalBytesExpectedToSend
  15808. });
  15809. });
  15810. });
  15811. }
  15812. }]);
  15813. return yt;
  15814. }();
  15815. var _t = {
  15816. setItem: function setItem(e, t) {
  15817. re.setStorageSync(e, t);
  15818. },
  15819. getItem: function getItem(e) {
  15820. return re.getStorageSync(e);
  15821. },
  15822. removeItem: function removeItem(e) {
  15823. re.removeStorageSync(e);
  15824. },
  15825. clear: function clear() {
  15826. re.clearStorageSync();
  15827. }
  15828. };
  15829. var wt = {
  15830. genAdapter: function genAdapter() {
  15831. return {
  15832. root: {},
  15833. reqClass: yt,
  15834. localStorage: _t,
  15835. primaryStorage: "local"
  15836. };
  15837. },
  15838. isMatch: function isMatch() {
  15839. return !0;
  15840. },
  15841. runtime: "uni_app"
  15842. };
  15843. gt.useAdapters(wt);
  15844. var vt = gt,
  15845. St = vt.init;
  15846. vt.init = function (e) {
  15847. e.env = e.spaceId;
  15848. var t = St.call(this, e);
  15849. t.config.provider = "tencent", t.config.spaceId = e.spaceId;
  15850. var n = t.auth;
  15851. return t.auth = function (e) {
  15852. var t = n.call(this, e);
  15853. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach(function (e) {
  15854. var n;
  15855. t[e] = (n = t[e], function (e) {
  15856. e = e || {};
  15857. var _ne = ne(e),
  15858. t = _ne.success,
  15859. s = _ne.fail,
  15860. r = _ne.complete;
  15861. if (!(t || s || r)) return n.call(this, e);
  15862. n.call(this, e).then(function (e) {
  15863. t && t(e), r && r(e);
  15864. }, function (e) {
  15865. s && s(e), r && r(e);
  15866. });
  15867. }).bind(t);
  15868. }), t;
  15869. }, t.customAuth = t.auth, t;
  15870. };
  15871. var It = vt;
  15872. var bt = /*#__PURE__*/function (_ge) {
  15873. (0, _inherits2.default)(bt, _ge);
  15874. var _super8 = _createSuper(bt);
  15875. function bt() {
  15876. (0, _classCallCheck2.default)(this, bt);
  15877. return _super8.apply(this, arguments);
  15878. }
  15879. (0, _createClass2.default)(bt, [{
  15880. key: "getAccessToken",
  15881. value: function getAccessToken() {
  15882. var _this11 = this;
  15883. return new Promise(function (e, t) {
  15884. var n = "Anonymous_Access_token";
  15885. _this11.setAccessToken(n), e(n);
  15886. });
  15887. }
  15888. }, {
  15889. key: "setupRequest",
  15890. value: function setupRequest(e, t) {
  15891. var n = Object.assign({}, e, {
  15892. spaceId: this.config.spaceId,
  15893. timestamp: Date.now()
  15894. }),
  15895. s = {
  15896. "Content-Type": "application/json"
  15897. };
  15898. "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = de.sign(n, this.config.clientSecret);
  15899. var r = le();
  15900. s["x-client-info"] = encodeURIComponent(JSON.stringify(r));
  15901. var _ie = ie(),
  15902. i = _ie.token;
  15903. return s["x-client-token"] = i, {
  15904. url: this.config.requestUrl,
  15905. method: "POST",
  15906. data: n,
  15907. dataType: "json",
  15908. header: JSON.parse(JSON.stringify(s))
  15909. };
  15910. }
  15911. }, {
  15912. key: "uploadFileToOSS",
  15913. value: function uploadFileToOSS(_ref14) {
  15914. var _this12 = this;
  15915. var e = _ref14.url,
  15916. t = _ref14.formData,
  15917. n = _ref14.name,
  15918. s = _ref14.filePath,
  15919. r = _ref14.fileType,
  15920. i = _ref14.onUploadProgress;
  15921. return new Promise(function (o, a) {
  15922. var c = _this12.adapter.uploadFile({
  15923. url: e,
  15924. formData: t,
  15925. name: n,
  15926. filePath: s,
  15927. fileType: r,
  15928. success: function success(e) {
  15929. e && e.statusCode < 400 ? o(e) : a(new se({
  15930. code: "UPLOAD_FAILED",
  15931. message: "文件上传失败"
  15932. }));
  15933. },
  15934. fail: function fail(e) {
  15935. a(new se({
  15936. code: e.code || "UPLOAD_FAILED",
  15937. message: e.message || e.errMsg || "文件上传失败"
  15938. }));
  15939. }
  15940. });
  15941. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  15942. i({
  15943. loaded: e.totalBytesSent,
  15944. total: e.totalBytesExpectedToSend
  15945. });
  15946. });
  15947. });
  15948. }
  15949. }, {
  15950. key: "uploadFile",
  15951. value: function uploadFile(_ref15) {
  15952. var _this13 = this;
  15953. var e = _ref15.filePath,
  15954. t = _ref15.cloudPath,
  15955. _ref15$fileType = _ref15.fileType,
  15956. n = _ref15$fileType === void 0 ? "image" : _ref15$fileType,
  15957. s = _ref15.onUploadProgress;
  15958. if (!t) throw new se({
  15959. code: "CLOUDPATH_REQUIRED",
  15960. message: "cloudPath不可为空"
  15961. });
  15962. var r;
  15963. return this.getOSSUploadOptionsFromPath({
  15964. cloudPath: t
  15965. }).then(function (t) {
  15966. var _t$result = t.result,
  15967. i = _t$result.url,
  15968. o = _t$result.formData,
  15969. a = _t$result.name;
  15970. r = t.result.fileUrl;
  15971. var c = {
  15972. url: i,
  15973. formData: o,
  15974. name: a,
  15975. filePath: e,
  15976. fileType: n
  15977. };
  15978. return _this13.uploadFileToOSS(Object.assign({}, c, {
  15979. onUploadProgress: s
  15980. }));
  15981. }).then(function () {
  15982. return _this13.reportOSSUpload({
  15983. cloudPath: t
  15984. });
  15985. }).then(function (t) {
  15986. return new Promise(function (n, s) {
  15987. t.success ? n({
  15988. success: !0,
  15989. filePath: e,
  15990. fileID: r
  15991. }) : s(new se({
  15992. code: "UPLOAD_FAILED",
  15993. message: "文件上传失败"
  15994. }));
  15995. });
  15996. });
  15997. }
  15998. }, {
  15999. key: "deleteFile",
  16000. value: function deleteFile(_ref16) {
  16001. var e = _ref16.fileList;
  16002. var t = {
  16003. method: "serverless.file.resource.delete",
  16004. params: JSON.stringify({
  16005. fileList: e
  16006. })
  16007. };
  16008. return this.request(this.setupRequest(t)).then(function (e) {
  16009. if (e.success) return e.result;
  16010. throw new se({
  16011. code: "DELETE_FILE_FAILED",
  16012. message: "删除文件失败"
  16013. });
  16014. });
  16015. }
  16016. }, {
  16017. key: "getTempFileURL",
  16018. value: function getTempFileURL() {
  16019. var _ref17 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16020. e = _ref17.fileList;
  16021. if (!Array.isArray(e) || 0 === e.length) throw new se({
  16022. code: "INVALID_PARAM",
  16023. message: "fileList的元素必须是非空的字符串"
  16024. });
  16025. var t = {
  16026. method: "serverless.file.resource.getTempFileURL",
  16027. params: JSON.stringify({
  16028. fileList: e
  16029. })
  16030. };
  16031. return this.request(this.setupRequest(t)).then(function (e) {
  16032. if (e.success) return {
  16033. fileList: e.result.fileList.map(function (e) {
  16034. return {
  16035. fileID: e.fileID,
  16036. tempFileURL: e.tempFileURL
  16037. };
  16038. })
  16039. };
  16040. throw new se({
  16041. code: "GET_TEMP_FILE_URL_FAILED",
  16042. message: "获取临时文件链接失败"
  16043. });
  16044. });
  16045. }
  16046. }]);
  16047. return bt;
  16048. }(ge);
  16049. var kt = {
  16050. init: function init(e) {
  16051. var t = new bt(e),
  16052. n = {
  16053. signInAnonymously: function signInAnonymously() {
  16054. return t.authorize();
  16055. },
  16056. getLoginState: function getLoginState() {
  16057. return Promise.resolve(!1);
  16058. }
  16059. };
  16060. return t.auth = function () {
  16061. return n;
  16062. }, t.customAuth = t.auth, t;
  16063. }
  16064. };
  16065. function Tt(_ref18) {
  16066. var e = _ref18.data;
  16067. var t;
  16068. t = le();
  16069. var n = JSON.parse(JSON.stringify(e || {}));
  16070. if (Object.assign(n, {
  16071. clientInfo: t
  16072. }), !n.uniIdToken) {
  16073. var _ie2 = ie(),
  16074. _e18 = _ie2.token;
  16075. _e18 && (n.uniIdToken = _e18);
  16076. }
  16077. return n;
  16078. }
  16079. function Ct() {
  16080. return _Ct.apply(this, arguments);
  16081. }
  16082. function _Ct() {
  16083. _Ct = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee54() {
  16084. var _this26 = this;
  16085. var _ref60,
  16086. e,
  16087. t,
  16088. _this$__dev__,
  16089. n,
  16090. s,
  16091. r,
  16092. i,
  16093. o,
  16094. a,
  16095. _args6 = arguments;
  16096. return _regenerator.default.wrap(function _callee54$(_context54) {
  16097. while (1) {
  16098. switch (_context54.prev = _context54.next) {
  16099. case 0:
  16100. _ref60 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, e = _ref60.name, t = _ref60.data;
  16101. _context54.next = 3;
  16102. return this.__dev__.initLocalNetwork();
  16103. case 3:
  16104. _this$__dev__ = this.__dev__, n = _this$__dev__.localAddress, s = _this$__dev__.localPort, r = {
  16105. aliyun: "aliyun",
  16106. tencent: "tcb"
  16107. }[this.config.provider], i = this.config.spaceId, o = "http://".concat(n, ":").concat(s, "/system/check-function"), a = "http://".concat(n, ":").concat(s, "/cloudfunctions/").concat(e);
  16108. return _context54.abrupt("return", new Promise(function (t, n) {
  16109. re.request({
  16110. method: "POST",
  16111. url: o,
  16112. data: {
  16113. name: e,
  16114. platform: A,
  16115. provider: r,
  16116. spaceId: i
  16117. },
  16118. timeout: 3e3,
  16119. success: function success(e) {
  16120. t(e);
  16121. },
  16122. fail: function fail() {
  16123. t({
  16124. data: {
  16125. code: "NETWORK_ERROR",
  16126. message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"
  16127. }
  16128. });
  16129. }
  16130. });
  16131. }).then(function () {
  16132. var _ref61 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16133. e = _ref61.data;
  16134. var _ref62 = e || {},
  16135. t = _ref62.code,
  16136. n = _ref62.message;
  16137. return {
  16138. code: 0 === t ? 0 : t || "SYS_ERR",
  16139. message: n || "SYS_ERR"
  16140. };
  16141. }).then(function (_ref63) {
  16142. var n = _ref63.code,
  16143. s = _ref63.message;
  16144. if (0 !== n) {
  16145. switch (n) {
  16146. case "MODULE_ENCRYPTED":
  16147. console.error("\u6B64\u4E91\u51FD\u6570\uFF08".concat(e, "\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"));
  16148. break;
  16149. case "FUNCTION_ENCRYPTED":
  16150. console.error("\u6B64\u4E91\u51FD\u6570\uFF08".concat(e, "\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"));
  16151. break;
  16152. case "ACTION_ENCRYPTED":
  16153. console.error(s || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  16154. break;
  16155. case "NETWORK_ERROR":
  16156. {
  16157. var _e30 = "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";
  16158. throw console.error(_e30), new Error(_e30);
  16159. }
  16160. case "SWITCH_TO_CLOUD":
  16161. break;
  16162. default:
  16163. {
  16164. var _e31 = "\u68C0\u6D4B\u672C\u5730\u8C03\u8BD5\u670D\u52A1\u51FA\u73B0\u9519\u8BEF\uFF1A".concat(s, "\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u73AF\u5883\u6216\u91CD\u542F\u5BA2\u6237\u7AEF\u518D\u8BD5");
  16165. throw console.error(_e31), new Error(_e31);
  16166. }
  16167. }
  16168. return _this26._callCloudFunction({
  16169. name: e,
  16170. data: t
  16171. });
  16172. }
  16173. return new Promise(function (e, n) {
  16174. var s = Tt.call(_this26, {
  16175. data: t
  16176. });
  16177. re.request({
  16178. method: "POST",
  16179. url: a,
  16180. data: {
  16181. provider: r,
  16182. platform: A,
  16183. param: s
  16184. },
  16185. success: function success() {
  16186. var _ref64 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16187. t = _ref64.statusCode,
  16188. s = _ref64.data;
  16189. return !t || t >= 400 ? n(new se({
  16190. code: s.code || "SYS_ERR",
  16191. message: s.message || "request:fail"
  16192. })) : e({
  16193. result: s
  16194. });
  16195. },
  16196. fail: function fail(e) {
  16197. n(new se({
  16198. code: e.code || e.errCode || "SYS_ERR",
  16199. message: e.message || e.errMsg || "request:fail"
  16200. }));
  16201. }
  16202. });
  16203. });
  16204. }));
  16205. case 5:
  16206. case "end":
  16207. return _context54.stop();
  16208. }
  16209. }
  16210. }, _callee54, this);
  16211. }));
  16212. return _Ct.apply(this, arguments);
  16213. }
  16214. var Pt = [{
  16215. rule: /fc_function_not_found|FUNCTION_NOT_FOUND/,
  16216. content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",
  16217. mode: "append"
  16218. }];
  16219. var At = /[\\^$.*+?()[\]{}|]/g,
  16220. Et = RegExp(At.source);
  16221. function Ot(e, t, n) {
  16222. return e.replace(new RegExp((s = t) && Et.test(s) ? s.replace(At, "\\$&") : s, "g"), n);
  16223. var s;
  16224. }
  16225. var xt = "none",
  16226. Rt = "request",
  16227. Ut = "response",
  16228. Lt = "both";
  16229. var Nt = /*#__PURE__*/function () {
  16230. function Nt() {
  16231. var _ref19 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16232. e = _ref19.secretType,
  16233. t = _ref19.uniCloudIns;
  16234. (0, _classCallCheck2.default)(this, Nt);
  16235. this.clientType = "", this.secretType = e || xt, this.uniCloudIns = t;
  16236. var _this$uniCloudIns$con = this.uniCloudIns.config,
  16237. n = _this$uniCloudIns$con.provider,
  16238. s = _this$uniCloudIns$con.spaceId;
  16239. var r;
  16240. this.provider = n, this.spaceId = s, this.scopedGlobalCache = (r = this.uniCloudIns, L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", r.config.spaceId)));
  16241. }
  16242. (0, _createClass2.default)(Nt, [{
  16243. key: "getSystemInfo",
  16244. value: function getSystemInfo() {
  16245. return this._systemInfo || (this._systemInfo = ue()), this._systemInfo;
  16246. }
  16247. }, {
  16248. key: "appId",
  16249. get: function get() {
  16250. return this.getSystemInfo().appId;
  16251. }
  16252. }, {
  16253. key: "deviceId",
  16254. get: function get() {
  16255. return this.getSystemInfo().deviceId;
  16256. }
  16257. }, {
  16258. key: "encryptData",
  16259. value: function () {
  16260. var _encryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(e) {
  16261. return _regenerator.default.wrap(function _callee34$(_context34) {
  16262. while (1) {
  16263. switch (_context34.prev = _context34.next) {
  16264. case 0:
  16265. return _context34.abrupt("return", this.secretType === xt ? e : this.platformEncryptData(e));
  16266. case 1:
  16267. case "end":
  16268. return _context34.stop();
  16269. }
  16270. }
  16271. }, _callee34, this);
  16272. }));
  16273. function encryptData(_x31) {
  16274. return _encryptData.apply(this, arguments);
  16275. }
  16276. return encryptData;
  16277. }()
  16278. }, {
  16279. key: "decryptResult",
  16280. value: function () {
  16281. var _decryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(e) {
  16282. var _ref20, t, n;
  16283. return _regenerator.default.wrap(function _callee35$(_context35) {
  16284. while (1) {
  16285. switch (_context35.prev = _context35.next) {
  16286. case 0:
  16287. if (!(this.secretType === xt)) {
  16288. _context35.next = 2;
  16289. break;
  16290. }
  16291. return _context35.abrupt("return", e);
  16292. case 2:
  16293. _ref20 = e || {}, t = _ref20.errCode, n = _ref20.content;
  16294. return _context35.abrupt("return", t || !n ? e : this.secretType === Rt ? n : this.platformDecryptResult(e));
  16295. case 4:
  16296. case "end":
  16297. return _context35.stop();
  16298. }
  16299. }
  16300. }, _callee35, this);
  16301. }));
  16302. function decryptResult(_x32) {
  16303. return _decryptResult.apply(this, arguments);
  16304. }
  16305. return decryptResult;
  16306. }()
  16307. }, {
  16308. key: "wrapVerifyClientCallFunction",
  16309. value: function wrapVerifyClientCallFunction(e) {
  16310. var t = this;
  16311. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36() {
  16312. var _ref22,
  16313. n,
  16314. _ref22$data,
  16315. s,
  16316. r,
  16317. _args36 = arguments;
  16318. return _regenerator.default.wrap(function _callee36$(_context36) {
  16319. while (1) {
  16320. switch (_context36.prev = _context36.next) {
  16321. case 0:
  16322. _ref22 = _args36.length > 0 && _args36[0] !== undefined ? _args36[0] : {}, n = _ref22.name, _ref22$data = _ref22.data, s = _ref22$data === void 0 ? {} : _ref22$data;
  16323. _context36.next = 3;
  16324. return t.prepare();
  16325. case 3:
  16326. _context36.next = 5;
  16327. return t.platformGetSignOption();
  16328. case 5:
  16329. (s = JSON.parse(JSON.stringify(s)))._uniCloudOptions = _context36.sent;
  16330. _context36.next = 8;
  16331. return e({
  16332. name: n,
  16333. data: s
  16334. });
  16335. case 8:
  16336. r = _context36.sent;
  16337. _context36.t0 = t.isClientKeyNotFound(r);
  16338. if (!_context36.t0) {
  16339. _context36.next = 19;
  16340. break;
  16341. }
  16342. _context36.next = 13;
  16343. return t.prepare({
  16344. forceUpdate: !0
  16345. });
  16346. case 13:
  16347. _context36.next = 15;
  16348. return t.platformGetSignOption();
  16349. case 15:
  16350. s._uniCloudOptions = _context36.sent;
  16351. _context36.next = 18;
  16352. return e({
  16353. name: n,
  16354. data: s
  16355. });
  16356. case 18:
  16357. r = _context36.sent;
  16358. case 19:
  16359. return _context36.abrupt("return", r);
  16360. case 20:
  16361. case "end":
  16362. return _context36.stop();
  16363. }
  16364. }
  16365. }, _callee36);
  16366. }));
  16367. }
  16368. }, {
  16369. key: "wrapEncryptDataCallFunction",
  16370. value: function wrapEncryptDataCallFunction(e) {
  16371. var t = this;
  16372. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37() {
  16373. var _ref24,
  16374. n,
  16375. _ref24$data,
  16376. s,
  16377. r,
  16378. i,
  16379. _r3,
  16380. _args37 = arguments;
  16381. return _regenerator.default.wrap(function _callee37$(_context37) {
  16382. while (1) {
  16383. switch (_context37.prev = _context37.next) {
  16384. case 0:
  16385. _ref24 = _args37.length > 0 && _args37[0] !== undefined ? _args37[0] : {}, n = _ref24.name, _ref24$data = _ref24.data, s = _ref24$data === void 0 ? {} : _ref24$data;
  16386. _context37.next = 3;
  16387. return t.prepare();
  16388. case 3:
  16389. _context37.next = 5;
  16390. return t.encryptData(s);
  16391. case 5:
  16392. r = _context37.sent;
  16393. _context37.next = 8;
  16394. return e({
  16395. name: n,
  16396. data: r
  16397. });
  16398. case 8:
  16399. i = _context37.sent;
  16400. if (!t.isClientKeyNotFound(i)) {
  16401. _context37.next = 21;
  16402. break;
  16403. }
  16404. _context37.next = 12;
  16405. return t.prepare({
  16406. forceUpdate: !0
  16407. });
  16408. case 12:
  16409. _context37.next = 14;
  16410. return t.encryptData(s);
  16411. case 14:
  16412. _r3 = _context37.sent;
  16413. _context37.next = 17;
  16414. return t.platformGetSignOption();
  16415. case 17:
  16416. s._uniCloudOptions = _context37.sent;
  16417. _context37.next = 20;
  16418. return e({
  16419. name: n,
  16420. data: _r3
  16421. });
  16422. case 20:
  16423. i = _context37.sent;
  16424. case 21:
  16425. _context37.next = 23;
  16426. return t.decryptResult(i.result);
  16427. case 23:
  16428. i.result = _context37.sent;
  16429. return _context37.abrupt("return", i);
  16430. case 25:
  16431. case "end":
  16432. return _context37.stop();
  16433. }
  16434. }
  16435. }, _callee37);
  16436. }));
  16437. }
  16438. }]);
  16439. return Nt;
  16440. }();
  16441. /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
  16442. function Dt(e) {
  16443. return parseInt(e) === e;
  16444. }
  16445. function Ft(e) {
  16446. if (!Dt(e.length)) return !1;
  16447. for (var t = 0; t < e.length; t++) {
  16448. if (!Dt(e[t]) || e[t] < 0 || e[t] > 255) return !1;
  16449. }
  16450. return !0;
  16451. }
  16452. function qt(e, t) {
  16453. if (e.buffer && "Uint8Array" === e.name) return t && (e = e.slice ? e.slice() : Array.prototype.slice.call(e)), e;
  16454. if (Array.isArray(e)) {
  16455. if (!Ft(e)) throw new Error("Array contains invalid value: " + e);
  16456. return new Uint8Array(e);
  16457. }
  16458. if (Dt(e.length) && Ft(e)) return new Uint8Array(e);
  16459. throw new Error("unsupported array-like object");
  16460. }
  16461. function Mt(e) {
  16462. return new Uint8Array(e);
  16463. }
  16464. function Kt(e, t, n, s, r) {
  16465. null == s && null == r || (e = e.slice ? e.slice(s, r) : Array.prototype.slice.call(e, s, r)), t.set(e, n);
  16466. }
  16467. var jt,
  16468. Bt = {
  16469. toBytes: function toBytes(e) {
  16470. var t = [],
  16471. n = 0;
  16472. for (e = encodeURI(e); n < e.length;) {
  16473. var s = e.charCodeAt(n++);
  16474. 37 === s ? (t.push(parseInt(e.substr(n, 2), 16)), n += 2) : t.push(s);
  16475. }
  16476. return qt(t);
  16477. },
  16478. fromBytes: function fromBytes(e) {
  16479. for (var t = [], n = 0; n < e.length;) {
  16480. var s = e[n];
  16481. 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);
  16482. }
  16483. return t.join("");
  16484. }
  16485. },
  16486. $t = (jt = "0123456789abcdef", {
  16487. toBytes: function toBytes(e) {
  16488. for (var t = [], n = 0; n < e.length; n += 2) {
  16489. t.push(parseInt(e.substr(n, 2), 16));
  16490. }
  16491. return t;
  16492. },
  16493. fromBytes: function fromBytes(e) {
  16494. for (var t = [], n = 0; n < e.length; n++) {
  16495. var s = e[n];
  16496. t.push(jt[(240 & s) >> 4] + jt[15 & s]);
  16497. }
  16498. return t.join("");
  16499. }
  16500. }),
  16501. Wt = {
  16502. 16: 10,
  16503. 24: 12,
  16504. 32: 14
  16505. },
  16506. zt = [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],
  16507. Jt = [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],
  16508. Ht = [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],
  16509. Gt = [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],
  16510. Vt = [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],
  16511. Qt = [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],
  16512. Yt = [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],
  16513. Xt = [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],
  16514. Zt = [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],
  16515. en = [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],
  16516. tn = [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],
  16517. nn = [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],
  16518. sn = [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],
  16519. rn = [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],
  16520. on = [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];
  16521. function an(e) {
  16522. for (var t = [], n = 0; n < e.length; n += 4) {
  16523. t.push(e[n] << 24 | e[n + 1] << 16 | e[n + 2] << 8 | e[n + 3]);
  16524. }
  16525. return t;
  16526. }
  16527. var cn = /*#__PURE__*/function () {
  16528. function cn(e) {
  16529. (0, _classCallCheck2.default)(this, cn);
  16530. if (!(this instanceof cn)) throw Error("AES must be instanitated with `new`");
  16531. Object.defineProperty(this, "key", {
  16532. value: qt(e, !0)
  16533. }), this._prepare();
  16534. }
  16535. (0, _createClass2.default)(cn, [{
  16536. key: "_prepare",
  16537. value: function _prepare() {
  16538. var e = Wt[this.key.length];
  16539. if (null == e) throw new Error("invalid key size (must be 16, 24 or 32 bytes)");
  16540. this._Ke = [], this._Kd = [];
  16541. for (var t = 0; t <= e; t++) {
  16542. this._Ke.push([0, 0, 0, 0]), this._Kd.push([0, 0, 0, 0]);
  16543. }
  16544. var n,
  16545. s = 4 * (e + 1),
  16546. r = this.key.length / 4,
  16547. i = an(this.key);
  16548. for (t = 0; t < r; t++) {
  16549. n = t >> 2, this._Ke[n][t % 4] = i[t], this._Kd[e - n][t % 4] = i[t];
  16550. }
  16551. for (var o, a = 0, c = r; c < s;) {
  16552. if (o = i[r - 1], i[0] ^= Jt[o >> 16 & 255] << 24 ^ Jt[o >> 8 & 255] << 16 ^ Jt[255 & o] << 8 ^ Jt[o >> 24 & 255] ^ zt[a] << 24, a += 1, 8 != r) for (t = 1; t < r; t++) {
  16553. i[t] ^= i[t - 1];
  16554. } else {
  16555. for (t = 1; t < r / 2; t++) {
  16556. i[t] ^= i[t - 1];
  16557. }
  16558. o = i[r / 2 - 1], i[r / 2] ^= Jt[255 & o] ^ Jt[o >> 8 & 255] << 8 ^ Jt[o >> 16 & 255] << 16 ^ Jt[o >> 24 & 255] << 24;
  16559. for (t = r / 2 + 1; t < r; t++) {
  16560. i[t] ^= i[t - 1];
  16561. }
  16562. }
  16563. for (t = 0; t < r && c < s;) {
  16564. u = c >> 2, h = c % 4, this._Ke[u][h] = i[t], this._Kd[e - u][h] = i[t++], c++;
  16565. }
  16566. }
  16567. for (var u = 1; u < e; u++) {
  16568. for (var h = 0; h < 4; h++) {
  16569. o = this._Kd[u][h], this._Kd[u][h] = nn[o >> 24 & 255] ^ sn[o >> 16 & 255] ^ rn[o >> 8 & 255] ^ on[255 & o];
  16570. }
  16571. }
  16572. }
  16573. }, {
  16574. key: "encrypt",
  16575. value: function encrypt(e) {
  16576. if (16 != e.length) throw new Error("invalid plaintext size (must be 16 bytes)");
  16577. for (var t = this._Ke.length - 1, n = [0, 0, 0, 0], s = an(e), r = 0; r < 4; r++) {
  16578. s[r] ^= this._Ke[0][r];
  16579. }
  16580. for (var i = 1; i < t; i++) {
  16581. for (r = 0; r < 4; r++) {
  16582. n[r] = Gt[s[r] >> 24 & 255] ^ Vt[s[(r + 1) % 4] >> 16 & 255] ^ Qt[s[(r + 2) % 4] >> 8 & 255] ^ Yt[255 & s[(r + 3) % 4]] ^ this._Ke[i][r];
  16583. }
  16584. s = n.slice();
  16585. }
  16586. var o,
  16587. a = Mt(16);
  16588. for (r = 0; r < 4; r++) {
  16589. o = this._Ke[t][r], a[4 * r] = 255 & (Jt[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (Jt[s[(r + 1) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (Jt[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (Jt[255 & s[(r + 3) % 4]] ^ o);
  16590. }
  16591. return a;
  16592. }
  16593. }, {
  16594. key: "decrypt",
  16595. value: function decrypt(e) {
  16596. if (16 != e.length) throw new Error("invalid ciphertext size (must be 16 bytes)");
  16597. for (var t = this._Kd.length - 1, n = [0, 0, 0, 0], s = an(e), r = 0; r < 4; r++) {
  16598. s[r] ^= this._Kd[0][r];
  16599. }
  16600. for (var i = 1; i < t; i++) {
  16601. for (r = 0; r < 4; r++) {
  16602. n[r] = Xt[s[r] >> 24 & 255] ^ Zt[s[(r + 3) % 4] >> 16 & 255] ^ en[s[(r + 2) % 4] >> 8 & 255] ^ tn[255 & s[(r + 1) % 4]] ^ this._Kd[i][r];
  16603. }
  16604. s = n.slice();
  16605. }
  16606. var o,
  16607. a = Mt(16);
  16608. for (r = 0; r < 4; r++) {
  16609. o = this._Kd[t][r], a[4 * r] = 255 & (Ht[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (Ht[s[(r + 3) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (Ht[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (Ht[255 & s[(r + 1) % 4]] ^ o);
  16610. }
  16611. return a;
  16612. }
  16613. }]);
  16614. return cn;
  16615. }();
  16616. var un = /*#__PURE__*/function () {
  16617. function un(e) {
  16618. (0, _classCallCheck2.default)(this, un);
  16619. if (!(this instanceof un)) throw Error("AES must be instanitated with `new`");
  16620. this.description = "Electronic Code Block", this.name = "ecb", this._aes = new cn(e);
  16621. }
  16622. (0, _createClass2.default)(un, [{
  16623. key: "encrypt",
  16624. value: function encrypt(e) {
  16625. if ((e = qt(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  16626. for (var t = Mt(e.length), n = Mt(16), s = 0; s < e.length; s += 16) {
  16627. Kt(e, n, 0, s, s + 16), Kt(n = this._aes.encrypt(n), t, s);
  16628. }
  16629. return t;
  16630. }
  16631. }, {
  16632. key: "decrypt",
  16633. value: function decrypt(e) {
  16634. if ((e = qt(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  16635. for (var t = Mt(e.length), n = Mt(16), s = 0; s < e.length; s += 16) {
  16636. Kt(e, n, 0, s, s + 16), Kt(n = this._aes.decrypt(n), t, s);
  16637. }
  16638. return t;
  16639. }
  16640. }]);
  16641. return un;
  16642. }();
  16643. var hn = /*#__PURE__*/function () {
  16644. function hn(e, t) {
  16645. (0, _classCallCheck2.default)(this, hn);
  16646. if (!(this instanceof hn)) throw Error("AES must be instanitated with `new`");
  16647. if (this.description = "Cipher Block Chaining", this.name = "cbc", t) {
  16648. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  16649. } else t = Mt(16);
  16650. this._lastCipherblock = qt(t, !0), this._aes = new cn(e);
  16651. }
  16652. (0, _createClass2.default)(hn, [{
  16653. key: "encrypt",
  16654. value: function encrypt(e) {
  16655. if ((e = qt(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  16656. for (var t = Mt(e.length), n = Mt(16), s = 0; s < e.length; s += 16) {
  16657. Kt(e, n, 0, s, s + 16);
  16658. for (var r = 0; r < 16; r++) {
  16659. n[r] ^= this._lastCipherblock[r];
  16660. }
  16661. this._lastCipherblock = this._aes.encrypt(n), Kt(this._lastCipherblock, t, s);
  16662. }
  16663. return t;
  16664. }
  16665. }, {
  16666. key: "decrypt",
  16667. value: function decrypt(e) {
  16668. if ((e = qt(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  16669. for (var t = Mt(e.length), n = Mt(16), s = 0; s < e.length; s += 16) {
  16670. Kt(e, n, 0, s, s + 16), n = this._aes.decrypt(n);
  16671. for (var r = 0; r < 16; r++) {
  16672. t[s + r] = n[r] ^ this._lastCipherblock[r];
  16673. }
  16674. Kt(e, this._lastCipherblock, 0, s, s + 16);
  16675. }
  16676. return t;
  16677. }
  16678. }]);
  16679. return hn;
  16680. }();
  16681. var ln = /*#__PURE__*/function () {
  16682. function ln(e, t, n) {
  16683. (0, _classCallCheck2.default)(this, ln);
  16684. if (!(this instanceof ln)) throw Error("AES must be instanitated with `new`");
  16685. if (this.description = "Cipher Feedback", this.name = "cfb", t) {
  16686. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 size)");
  16687. } else t = Mt(16);
  16688. n || (n = 1), this.segmentSize = n, this._shiftRegister = qt(t, !0), this._aes = new cn(e);
  16689. }
  16690. (0, _createClass2.default)(ln, [{
  16691. key: "encrypt",
  16692. value: function encrypt(e) {
  16693. if (e.length % this.segmentSize != 0) throw new Error("invalid plaintext size (must be segmentSize bytes)");
  16694. for (var t, n = qt(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  16695. t = this._aes.encrypt(this._shiftRegister);
  16696. for (var r = 0; r < this.segmentSize; r++) {
  16697. n[s + r] ^= t[r];
  16698. }
  16699. Kt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Kt(n, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  16700. }
  16701. return n;
  16702. }
  16703. }, {
  16704. key: "decrypt",
  16705. value: function decrypt(e) {
  16706. if (e.length % this.segmentSize != 0) throw new Error("invalid ciphertext size (must be segmentSize bytes)");
  16707. for (var t, n = qt(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  16708. t = this._aes.encrypt(this._shiftRegister);
  16709. for (var r = 0; r < this.segmentSize; r++) {
  16710. n[s + r] ^= t[r];
  16711. }
  16712. Kt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Kt(e, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  16713. }
  16714. return n;
  16715. }
  16716. }]);
  16717. return ln;
  16718. }();
  16719. var dn = /*#__PURE__*/function () {
  16720. function dn(e, t) {
  16721. (0, _classCallCheck2.default)(this, dn);
  16722. if (!(this instanceof dn)) throw Error("AES must be instanitated with `new`");
  16723. if (this.description = "Output Feedback", this.name = "ofb", t) {
  16724. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  16725. } else t = Mt(16);
  16726. this._lastPrecipher = qt(t, !0), this._lastPrecipherIndex = 16, this._aes = new cn(e);
  16727. }
  16728. (0, _createClass2.default)(dn, [{
  16729. key: "encrypt",
  16730. value: function encrypt(e) {
  16731. for (var t = qt(e, !0), n = 0; n < t.length; n++) {
  16732. 16 === this._lastPrecipherIndex && (this._lastPrecipher = this._aes.encrypt(this._lastPrecipher), this._lastPrecipherIndex = 0), t[n] ^= this._lastPrecipher[this._lastPrecipherIndex++];
  16733. }
  16734. return t;
  16735. }
  16736. }, {
  16737. key: "decrypt",
  16738. value: function decrypt(e) {
  16739. return this.encrypt(e);
  16740. }
  16741. }]);
  16742. return dn;
  16743. }();
  16744. var pn = /*#__PURE__*/function () {
  16745. function pn(e) {
  16746. (0, _classCallCheck2.default)(this, pn);
  16747. if (!(this instanceof pn)) throw Error("Counter must be instanitated with `new`");
  16748. 0 === e || e || (e = 1), "number" == typeof e ? (this._counter = Mt(16), this.setValue(e)) : this.setBytes(e);
  16749. }
  16750. (0, _createClass2.default)(pn, [{
  16751. key: "setValue",
  16752. value: function setValue(e) {
  16753. if ("number" != typeof e || parseInt(e) != e) throw new Error("invalid counter value (must be an integer)");
  16754. if (e > Number.MAX_SAFE_INTEGER) throw new Error("integer value out of safe range");
  16755. for (var t = 15; t >= 0; --t) {
  16756. this._counter[t] = e % 256, e = parseInt(e / 256);
  16757. }
  16758. }
  16759. }, {
  16760. key: "setBytes",
  16761. value: function setBytes(e) {
  16762. if (16 != (e = qt(e, !0)).length) throw new Error("invalid counter bytes size (must be 16 bytes)");
  16763. this._counter = e;
  16764. }
  16765. }, {
  16766. key: "increment",
  16767. value: function increment() {
  16768. for (var e = 15; e >= 0; e--) {
  16769. if (255 !== this._counter[e]) {
  16770. this._counter[e]++;
  16771. break;
  16772. }
  16773. this._counter[e] = 0;
  16774. }
  16775. }
  16776. }]);
  16777. return pn;
  16778. }();
  16779. var fn = /*#__PURE__*/function () {
  16780. function fn(e, t) {
  16781. (0, _classCallCheck2.default)(this, fn);
  16782. if (!(this instanceof fn)) throw Error("AES must be instanitated with `new`");
  16783. this.description = "Counter", this.name = "ctr", t instanceof pn || (t = new pn(t)), this._counter = t, this._remainingCounter = null, this._remainingCounterIndex = 16, this._aes = new cn(e);
  16784. }
  16785. (0, _createClass2.default)(fn, [{
  16786. key: "encrypt",
  16787. value: function encrypt(e) {
  16788. for (var t = qt(e, !0), n = 0; n < t.length; n++) {
  16789. 16 === this._remainingCounterIndex && (this._remainingCounter = this._aes.encrypt(this._counter._counter), this._remainingCounterIndex = 0, this._counter.increment()), t[n] ^= this._remainingCounter[this._remainingCounterIndex++];
  16790. }
  16791. return t;
  16792. }
  16793. }, {
  16794. key: "decrypt",
  16795. value: function decrypt(e) {
  16796. return this.encrypt(e);
  16797. }
  16798. }]);
  16799. return fn;
  16800. }();
  16801. var gn = {
  16802. AES: cn,
  16803. Counter: pn,
  16804. ModeOfOperation: {
  16805. ecb: un,
  16806. cbc: hn,
  16807. cfb: ln,
  16808. ofb: dn,
  16809. ctr: fn
  16810. },
  16811. utils: {
  16812. hex: $t,
  16813. utf8: Bt
  16814. },
  16815. padding: {
  16816. pkcs7: {
  16817. pad: function pad(e) {
  16818. var t = 16 - (e = qt(e, !0)).length % 16,
  16819. n = Mt(e.length + t);
  16820. Kt(e, n);
  16821. for (var s = e.length; s < n.length; s++) {
  16822. n[s] = t;
  16823. }
  16824. return n;
  16825. },
  16826. strip: function strip(e) {
  16827. if ((e = qt(e, !0)).length < 16) throw new Error("PKCS#7 invalid length");
  16828. var t = e[e.length - 1];
  16829. if (t > 16) throw new Error("PKCS#7 padding byte out of range");
  16830. for (var n = e.length - t, s = 0; s < t; s++) {
  16831. if (e[n + s] !== t) throw new Error("PKCS#7 invalid padding byte");
  16832. }
  16833. var r = Mt(n);
  16834. return Kt(e, r, 0, 0, n), r;
  16835. }
  16836. }
  16837. },
  16838. _arrayTest: {
  16839. coerceArray: qt,
  16840. createArray: Mt,
  16841. copyArray: Kt
  16842. }
  16843. };
  16844. function mn(e, t, n) {
  16845. var s = new Uint8Array(uni.base64ToArrayBuffer(t)),
  16846. r = gn.utils.utf8.toBytes(n),
  16847. i = gn.utils.utf8.toBytes(e),
  16848. o = new gn.ModeOfOperation.cbc(s, r),
  16849. a = gn.padding.pkcs7.pad(i),
  16850. c = o.encrypt(a);
  16851. return uni.arrayBufferToBase64(c);
  16852. }
  16853. var yn = {
  16854. code: 2e4,
  16855. message: "System error"
  16856. },
  16857. _n = {
  16858. code: 20101,
  16859. message: "Invalid client"
  16860. },
  16861. wn = {
  16862. code: 20102,
  16863. message: "Get encrypt key failed"
  16864. },
  16865. vn = {
  16866. 10001: "Secure network is not supported on current playground or unimpsdk",
  16867. 10003: "Config missing in current app. If the problem pesist, please contact DCloud.",
  16868. 10009: "Encrypt payload failed",
  16869. 10010: "Decrypt response failed"
  16870. };
  16871. function Sn(e) {
  16872. var _ref25 = e || {},
  16873. t = _ref25.errSubject,
  16874. n = _ref25.subject,
  16875. s = _ref25.errCode,
  16876. r = _ref25.errMsg,
  16877. i = _ref25.code,
  16878. o = _ref25.message,
  16879. a = _ref25.cause;
  16880. return new se({
  16881. subject: t || n || "uni-secure-network",
  16882. code: s || i || yn.code,
  16883. message: r || o,
  16884. cause: a
  16885. });
  16886. }
  16887. var In,
  16888. bn,
  16889. kn = null;
  16890. var Tn = /*#__PURE__*/function (_Nt) {
  16891. (0, _inherits2.default)(Tn, _Nt);
  16892. var _super9 = _createSuper(Tn);
  16893. function Tn(e) {
  16894. var _this14;
  16895. (0, _classCallCheck2.default)(this, Tn);
  16896. _this14 = _super9.call(this, e), _this14.clientType = "mp-weixin", _this14.userEncryptKey = null;
  16897. return _this14;
  16898. }
  16899. (0, _createClass2.default)(Tn, [{
  16900. key: "isLogin",
  16901. value: function isLogin() {
  16902. return !!this.scopedGlobalCache.mpWeixinCode || !!this.scopedGlobalCache.mpWeixinOpenid;
  16903. }
  16904. }, {
  16905. key: "prepare",
  16906. value: function () {
  16907. var _prepare2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38() {
  16908. return _regenerator.default.wrap(function _callee38$(_context38) {
  16909. while (1) {
  16910. switch (_context38.prev = _context38.next) {
  16911. case 0:
  16912. if (this.isLogin()) {
  16913. _context38.next = 7;
  16914. break;
  16915. }
  16916. if (this.scopedGlobalCache.initPromise) {
  16917. _context38.next = 3;
  16918. break;
  16919. }
  16920. throw new Error("`uniCloud.initSecureNetworkByWeixin` has not yet been called");
  16921. case 3:
  16922. _context38.next = 5;
  16923. return this.scopedGlobalCache.initPromise;
  16924. case 5:
  16925. if (this.isLogin()) {
  16926. _context38.next = 7;
  16927. break;
  16928. }
  16929. throw new Error("uniCloud.initSecureNetworkByWeixin` has not yet been called or successfully excuted");
  16930. case 7:
  16931. case "end":
  16932. return _context38.stop();
  16933. }
  16934. }
  16935. }, _callee38, this);
  16936. }));
  16937. function prepare() {
  16938. return _prepare2.apply(this, arguments);
  16939. }
  16940. return prepare;
  16941. }()
  16942. }, {
  16943. key: "getUserEncryptKey",
  16944. value: function () {
  16945. var _getUserEncryptKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39() {
  16946. var _this15 = this;
  16947. var e;
  16948. return _regenerator.default.wrap(function _callee39$(_context39) {
  16949. while (1) {
  16950. switch (_context39.prev = _context39.next) {
  16951. case 0:
  16952. if (!this.userEncryptKey) {
  16953. _context39.next = 2;
  16954. break;
  16955. }
  16956. return _context39.abrupt("return", this.userEncryptKey);
  16957. case 2:
  16958. if (!(kn && kn.expireTime)) {
  16959. _context39.next = 6;
  16960. break;
  16961. }
  16962. e = Date.now();
  16963. if (!(kn.expireTime - e > 0)) {
  16964. _context39.next = 6;
  16965. break;
  16966. }
  16967. return _context39.abrupt("return", (this.userEncryptKey = kn, this.userEncryptKey));
  16968. case 6:
  16969. return _context39.abrupt("return", new Promise(function (e, t) {
  16970. uni.getUserCryptoManager().getLatestUserKey({
  16971. success: function success(t) {
  16972. kn = t, _this15.userEncryptKey = t, e(_this15.userEncryptKey);
  16973. },
  16974. fail: function fail(e) {
  16975. t(Sn(_objectSpread(_objectSpread({}, wn), {}, {
  16976. cause: e
  16977. })));
  16978. }
  16979. });
  16980. }));
  16981. case 7:
  16982. case "end":
  16983. return _context39.stop();
  16984. }
  16985. }
  16986. }, _callee39, this);
  16987. }));
  16988. function getUserEncryptKey() {
  16989. return _getUserEncryptKey.apply(this, arguments);
  16990. }
  16991. return getUserEncryptKey;
  16992. }()
  16993. }, {
  16994. key: "getWxAppId",
  16995. value: function getWxAppId() {
  16996. return wx.getAccountInfoSync().miniProgram.appId;
  16997. }
  16998. }, {
  16999. key: "platformGetSignOption",
  17000. value: function () {
  17001. var _platformGetSignOption = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40() {
  17002. var _yield$this$getUserEn, e, t, n;
  17003. return _regenerator.default.wrap(function _callee40$(_context40) {
  17004. while (1) {
  17005. switch (_context40.prev = _context40.next) {
  17006. case 0:
  17007. _context40.next = 2;
  17008. return this.getUserEncryptKey();
  17009. case 2:
  17010. _yield$this$getUserEn = _context40.sent;
  17011. e = _yield$this$getUserEn.encryptKey;
  17012. t = _yield$this$getUserEn.iv;
  17013. n = _yield$this$getUserEn.version;
  17014. return _context40.abrupt("return", {
  17015. verifyClientSign: mn(JSON.stringify({
  17016. data: JSON.stringify({}),
  17017. appId: this.appId,
  17018. deviceId: this.deviceId,
  17019. wxAppId: this.getWxAppId(),
  17020. simulator: "devtools" === ue().platform,
  17021. timestamp: Date.now()
  17022. }), e, t),
  17023. encryptKeyId: n,
  17024. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  17025. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  17026. });
  17027. case 7:
  17028. case "end":
  17029. return _context40.stop();
  17030. }
  17031. }
  17032. }, _callee40, this);
  17033. }));
  17034. function platformGetSignOption() {
  17035. return _platformGetSignOption.apply(this, arguments);
  17036. }
  17037. return platformGetSignOption;
  17038. }()
  17039. }, {
  17040. key: "platformEncryptData",
  17041. value: function () {
  17042. var _platformEncryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41(e) {
  17043. var _yield$this$getUserEn2, t, n, s, r;
  17044. return _regenerator.default.wrap(function _callee41$(_context41) {
  17045. while (1) {
  17046. switch (_context41.prev = _context41.next) {
  17047. case 0:
  17048. _context41.next = 2;
  17049. return this.getUserEncryptKey();
  17050. case 2:
  17051. _yield$this$getUserEn2 = _context41.sent;
  17052. t = _yield$this$getUserEn2.encryptKey;
  17053. n = _yield$this$getUserEn2.iv;
  17054. s = _yield$this$getUserEn2.version;
  17055. r = {
  17056. secretType: this.secretType,
  17057. encryptKeyId: s,
  17058. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  17059. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  17060. };
  17061. return _context41.abrupt("return", this.secretType === Ut ? {
  17062. content: e,
  17063. _uniCloudOptions: r
  17064. } : {
  17065. content: mn(JSON.stringify({
  17066. data: JSON.stringify(e),
  17067. appId: this.appId,
  17068. deviceId: this.deviceId,
  17069. wxAppId: this.getWxAppId(),
  17070. simulator: "devtools" === ue().platform,
  17071. timestamp: Date.now()
  17072. }), t, n),
  17073. _uniCloudOptions: r
  17074. });
  17075. case 8:
  17076. case "end":
  17077. return _context41.stop();
  17078. }
  17079. }
  17080. }, _callee41, this);
  17081. }));
  17082. function platformEncryptData(_x33) {
  17083. return _platformEncryptData.apply(this, arguments);
  17084. }
  17085. return platformEncryptData;
  17086. }()
  17087. }, {
  17088. key: "platformDecryptResult",
  17089. value: function () {
  17090. var _platformDecryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42(e) {
  17091. var t, _yield$this$getUserEn3, n, s;
  17092. return _regenerator.default.wrap(function _callee42$(_context42) {
  17093. while (1) {
  17094. switch (_context42.prev = _context42.next) {
  17095. case 0:
  17096. t = e.content;
  17097. _context42.next = 3;
  17098. return this.getUserEncryptKey();
  17099. case 3:
  17100. _yield$this$getUserEn3 = _context42.sent;
  17101. n = _yield$this$getUserEn3.encryptKey;
  17102. s = _yield$this$getUserEn3.iv;
  17103. return _context42.abrupt("return", JSON.parse(function (e, t, n) {
  17104. var s = new Uint8Array(uni.base64ToArrayBuffer(e)),
  17105. r = new Uint8Array(uni.base64ToArrayBuffer(t)),
  17106. i = gn.utils.utf8.toBytes(n),
  17107. o = new gn.ModeOfOperation.cbc(r, i),
  17108. a = gn.padding.pkcs7.strip(o.decrypt(s));
  17109. return gn.utils.utf8.fromBytes(a);
  17110. }(t, n, s)));
  17111. case 7:
  17112. case "end":
  17113. return _context42.stop();
  17114. }
  17115. }
  17116. }, _callee42, this);
  17117. }));
  17118. function platformDecryptResult(_x34) {
  17119. return _platformDecryptResult.apply(this, arguments);
  17120. }
  17121. return platformDecryptResult;
  17122. }()
  17123. }, {
  17124. key: "isClientKeyNotFound",
  17125. value: function isClientKeyNotFound() {
  17126. return !1;
  17127. }
  17128. }]);
  17129. return Tn;
  17130. }(Nt);
  17131. function Cn(e) {
  17132. var t = ["hasClientKey", "encryptGetClientKeyPayload", "setClientKey", "encrypt", "decrypt"],
  17133. n = {};
  17134. var _loop = function _loop(_s10) {
  17135. var r = t[_s10];
  17136. n[r] = function () {
  17137. for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) {
  17138. t[_key] = arguments[_key];
  17139. }
  17140. return new Promise(function (n, s) {
  17141. "function" == typeof e[r] ? e[r].apply(e, t.concat([function () {
  17142. var _ref26 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17143. e = _ref26.type,
  17144. t = _ref26.data,
  17145. r = _ref26.errCode,
  17146. i = _ref26.errMsg,
  17147. o = _ref26.errSubject,
  17148. a = _ref26.message;
  17149. "success" === e ? n(t) : s(Sn({
  17150. errCode: r,
  17151. errMsg: vn[r] || i || a,
  17152. errSubject: o
  17153. }));
  17154. }])) : s(Sn({
  17155. message: "请检查manifest.json内是否开启安全网络模块,另外注意标准基座不支持安全网络模块"
  17156. }));
  17157. });
  17158. };
  17159. };
  17160. for (var _s10 = 0; _s10 < t.length; _s10++) {
  17161. _loop(_s10);
  17162. }
  17163. return n;
  17164. }
  17165. var Pn = /*#__PURE__*/function (_Nt2) {
  17166. (0, _inherits2.default)(Pn, _Nt2);
  17167. var _super10 = _createSuper(Pn);
  17168. function Pn(e) {
  17169. var _this16;
  17170. (0, _classCallCheck2.default)(this, Pn);
  17171. _this16 = _super10.call(this, e), _this16.clientType = "app", _this16.appUtils = _objectSpread({}, Cn(uni.requireNativePlugin("plus"))), _this16.systemInfo = In || (In = ue());
  17172. return _this16;
  17173. }
  17174. (0, _createClass2.default)(Pn, [{
  17175. key: "hasClientKey",
  17176. value: function () {
  17177. var _hasClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43() {
  17178. return _regenerator.default.wrap(function _callee43$(_context43) {
  17179. while (1) {
  17180. switch (_context43.prev = _context43.next) {
  17181. case 0:
  17182. _context43.next = 2;
  17183. return this.appUtils.hasClientKey({
  17184. provider: this.provider,
  17185. spaceId: this.spaceId
  17186. });
  17187. case 2:
  17188. this._hasClientKey = _context43.sent;
  17189. return _context43.abrupt("return", this._hasClientKey);
  17190. case 4:
  17191. case "end":
  17192. return _context43.stop();
  17193. }
  17194. }
  17195. }, _callee43, this);
  17196. }));
  17197. function hasClientKey() {
  17198. return _hasClientKey.apply(this, arguments);
  17199. }
  17200. return hasClientKey;
  17201. }()
  17202. }, {
  17203. key: "getAppClientKey",
  17204. value: function () {
  17205. var _getAppClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44() {
  17206. var _yield$this$appUtils$, e, t, n, s, r;
  17207. return _regenerator.default.wrap(function _callee44$(_context44) {
  17208. while (1) {
  17209. switch (_context44.prev = _context44.next) {
  17210. case 0:
  17211. _context44.next = 2;
  17212. return this.appUtils.encryptGetClientKeyPayload({
  17213. data: JSON.stringify({})
  17214. });
  17215. case 2:
  17216. _yield$this$appUtils$ = _context44.sent;
  17217. e = _yield$this$appUtils$.data;
  17218. t = _yield$this$appUtils$.key;
  17219. _context44.next = 7;
  17220. return this.uniCloudIns.callFunction({
  17221. name: "DCloud-clientDB",
  17222. data: {
  17223. redirectTo: "encryption",
  17224. action: "getAppClientKey",
  17225. data: e,
  17226. key: t
  17227. }
  17228. });
  17229. case 7:
  17230. _context44.t0 = _context44.sent.result;
  17231. if (_context44.t0) {
  17232. _context44.next = 10;
  17233. break;
  17234. }
  17235. _context44.t0 = {};
  17236. case 10:
  17237. n = _context44.t0;
  17238. if (!(0 !== n.errCode)) {
  17239. _context44.next = 13;
  17240. break;
  17241. }
  17242. throw function (e) {
  17243. return new se({
  17244. subject: e.errSubject || "uni-secure-network",
  17245. code: e.errCode || e.code || yn.code,
  17246. message: e.errMsg || e.message
  17247. });
  17248. }(n);
  17249. case 13:
  17250. s = n.clientKey, r = n.key;
  17251. _context44.next = 16;
  17252. return this.appUtils.setClientKey({
  17253. provider: this.provider,
  17254. spaceId: this.spaceId,
  17255. clientKey: s,
  17256. key: r
  17257. });
  17258. case 16:
  17259. case "end":
  17260. return _context44.stop();
  17261. }
  17262. }
  17263. }, _callee44, this);
  17264. }));
  17265. function getAppClientKey() {
  17266. return _getAppClientKey.apply(this, arguments);
  17267. }
  17268. return getAppClientKey;
  17269. }()
  17270. }, {
  17271. key: "ensureClientKey",
  17272. value: function () {
  17273. var _ensureClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45() {
  17274. var _this17 = this;
  17275. var _ref27,
  17276. _ref27$forceUpdate,
  17277. e,
  17278. _args45 = arguments;
  17279. return _regenerator.default.wrap(function _callee45$(_context45) {
  17280. while (1) {
  17281. switch (_context45.prev = _context45.next) {
  17282. case 0:
  17283. _ref27 = _args45.length > 0 && _args45[0] !== undefined ? _args45[0] : {}, _ref27$forceUpdate = _ref27.forceUpdate, e = _ref27$forceUpdate === void 0 ? !1 : _ref27$forceUpdate;
  17284. _context45.t1 = !0;
  17285. _context45.next = 4;
  17286. return this.hasClientKey();
  17287. case 4:
  17288. _context45.t2 = _context45.sent;
  17289. _context45.t0 = _context45.t1 !== _context45.t2;
  17290. if (_context45.t0) {
  17291. _context45.next = 8;
  17292. break;
  17293. }
  17294. _context45.t0 = e;
  17295. case 8:
  17296. if (!_context45.t0) {
  17297. _context45.next = 10;
  17298. break;
  17299. }
  17300. return _context45.abrupt("return", (e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus === d || !e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus !== f || (this.scopedGlobalCache.initPromise = this.getAppClientKey(), this.scopedGlobalCache.initPromise.then(function (e) {
  17301. _this17.scopedGlobalCache.initStatus = p;
  17302. }).catch(function (e) {
  17303. throw _this17.scopedGlobalCache.initStatus = f, e;
  17304. }), this.scopedGlobalCache.initStatus = d), this.scopedGlobalCache.initPromise));
  17305. case 10:
  17306. case "end":
  17307. return _context45.stop();
  17308. }
  17309. }
  17310. }, _callee45, this);
  17311. }));
  17312. function ensureClientKey() {
  17313. return _ensureClientKey.apply(this, arguments);
  17314. }
  17315. return ensureClientKey;
  17316. }()
  17317. }, {
  17318. key: "prepare",
  17319. value: function () {
  17320. var _prepare3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46() {
  17321. var _ref28,
  17322. _ref28$forceUpdate,
  17323. e,
  17324. _args46 = arguments;
  17325. return _regenerator.default.wrap(function _callee46$(_context46) {
  17326. while (1) {
  17327. switch (_context46.prev = _context46.next) {
  17328. case 0:
  17329. _ref28 = _args46.length > 0 && _args46[0] !== undefined ? _args46[0] : {}, _ref28$forceUpdate = _ref28.forceUpdate, e = _ref28$forceUpdate === void 0 ? !1 : _ref28$forceUpdate;
  17330. _context46.next = 3;
  17331. return this.ensureClientKey({
  17332. forceUpdate: e
  17333. });
  17334. case 3:
  17335. case "end":
  17336. return _context46.stop();
  17337. }
  17338. }
  17339. }, _callee46, this);
  17340. }));
  17341. function prepare() {
  17342. return _prepare3.apply(this, arguments);
  17343. }
  17344. return prepare;
  17345. }()
  17346. }, {
  17347. key: "platformGetSignOption",
  17348. value: function () {
  17349. var _platformGetSignOption2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee47() {
  17350. var _yield$this$appUtils$2, e, t;
  17351. return _regenerator.default.wrap(function _callee47$(_context47) {
  17352. while (1) {
  17353. switch (_context47.prev = _context47.next) {
  17354. case 0:
  17355. _context47.next = 2;
  17356. return this.appUtils.encrypt({
  17357. provider: this.provider,
  17358. spaceId: this.spaceId,
  17359. data: JSON.stringify({})
  17360. });
  17361. case 2:
  17362. _yield$this$appUtils$2 = _context47.sent;
  17363. e = _yield$this$appUtils$2.data;
  17364. t = _yield$this$appUtils$2.key;
  17365. return _context47.abrupt("return", {
  17366. verifyClientSign: e,
  17367. encryptKeyId: t
  17368. });
  17369. case 6:
  17370. case "end":
  17371. return _context47.stop();
  17372. }
  17373. }
  17374. }, _callee47, this);
  17375. }));
  17376. function platformGetSignOption() {
  17377. return _platformGetSignOption2.apply(this, arguments);
  17378. }
  17379. return platformGetSignOption;
  17380. }()
  17381. }, {
  17382. key: "platformEncryptData",
  17383. value: function () {
  17384. var _platformEncryptData2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee48(e) {
  17385. var _yield$this$appUtils$3, t, n, s;
  17386. return _regenerator.default.wrap(function _callee48$(_context48) {
  17387. while (1) {
  17388. switch (_context48.prev = _context48.next) {
  17389. case 0:
  17390. _context48.next = 2;
  17391. return this.appUtils.encrypt({
  17392. provider: this.provider,
  17393. spaceId: this.spaceId,
  17394. data: JSON.stringify(e)
  17395. });
  17396. case 2:
  17397. _yield$this$appUtils$3 = _context48.sent;
  17398. t = _yield$this$appUtils$3.data;
  17399. n = _yield$this$appUtils$3.key;
  17400. s = {
  17401. secretType: this.secretType,
  17402. encryptKeyId: n
  17403. };
  17404. return _context48.abrupt("return", this.secretType === Ut ? {
  17405. content: e,
  17406. _uniCloudOptions: s
  17407. } : {
  17408. content: t,
  17409. _uniCloudOptions: s
  17410. });
  17411. case 7:
  17412. case "end":
  17413. return _context48.stop();
  17414. }
  17415. }
  17416. }, _callee48, this);
  17417. }));
  17418. function platformEncryptData(_x35) {
  17419. return _platformEncryptData2.apply(this, arguments);
  17420. }
  17421. return platformEncryptData;
  17422. }()
  17423. }, {
  17424. key: "platformDecryptResult",
  17425. value: function () {
  17426. var _platformDecryptResult2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee49(e) {
  17427. var t, _e$_uniCloudOptions, n, s, r;
  17428. return _regenerator.default.wrap(function _callee49$(_context49) {
  17429. while (1) {
  17430. switch (_context49.prev = _context49.next) {
  17431. case 0:
  17432. t = e.content;
  17433. _e$_uniCloudOptions = e._uniCloudOptions;
  17434. n = _e$_uniCloudOptions === void 0 ? {} : _e$_uniCloudOptions;
  17435. s = n.encryptKeyId;
  17436. _context49.next = 6;
  17437. return this.appUtils.decrypt({
  17438. provider: this.provider,
  17439. spaceId: this.spaceId,
  17440. data: t,
  17441. key: s
  17442. });
  17443. case 6:
  17444. r = _context49.sent;
  17445. return _context49.abrupt("return", JSON.parse(r.data));
  17446. case 8:
  17447. case "end":
  17448. return _context49.stop();
  17449. }
  17450. }
  17451. }, _callee49, this);
  17452. }));
  17453. function platformDecryptResult(_x36) {
  17454. return _platformDecryptResult2.apply(this, arguments);
  17455. }
  17456. return platformDecryptResult;
  17457. }()
  17458. }, {
  17459. key: "isClientKeyNotFound",
  17460. value: function isClientKeyNotFound() {
  17461. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17462. var t = e.result || {};
  17463. return 70009 === t.errCode && "uni-secure-network" === t.errSubject;
  17464. }
  17465. }]);
  17466. return Pn;
  17467. }(Nt);
  17468. function An() {
  17469. var _ref29 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17470. e = _ref29.secretType;
  17471. return e === Rt || e === Ut || e === Lt;
  17472. }
  17473. function En() {
  17474. var _ref30 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17475. e = _ref30.name,
  17476. _ref30$data = _ref30.data,
  17477. t = _ref30$data === void 0 ? {} : _ref30$data;
  17478. return "app" === A && "DCloud-clientDB" === e && "encryption" === t.redirectTo && "getAppClientKey" === t.action;
  17479. }
  17480. function On() {
  17481. var _ref31 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17482. e = _ref31.provider,
  17483. t = _ref31.spaceId,
  17484. n = _ref31.functionName;
  17485. var _ue = ue(),
  17486. s = _ue.appId,
  17487. r = _ue.uniPlatform,
  17488. i = _ue.osName;
  17489. var o = r;
  17490. "app" === r && (o = i);
  17491. var a = function () {
  17492. var _ref32 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17493. e = _ref32.provider,
  17494. t = _ref32.spaceId;
  17495. var n = P;
  17496. if (!n) return {};
  17497. e = function (e) {
  17498. return "tencent" === e ? "tcb" : e;
  17499. }(e);
  17500. var s = n.find(function (n) {
  17501. return n.provider === e && n.spaceId === t;
  17502. });
  17503. return s && s.config;
  17504. }({
  17505. provider: e,
  17506. spaceId: t
  17507. });
  17508. if (!a || !a.accessControl || !a.accessControl.enable) return !1;
  17509. var c = a.accessControl.function || {},
  17510. u = Object.keys(c);
  17511. if (0 === u.length) return !0;
  17512. var h = function (e, t) {
  17513. var n, s, r;
  17514. for (var _i2 = 0; _i2 < e.length; _i2++) {
  17515. var _o2 = e[_i2];
  17516. _o2 !== t ? "*" !== _o2 ? _o2.split(",").map(function (e) {
  17517. return e.trim();
  17518. }).indexOf(t) > -1 && (s = _o2) : r = _o2 : n = _o2;
  17519. }
  17520. return n || s || r;
  17521. }(u, n);
  17522. if (!h) return !1;
  17523. if ((c[h] || []).find(function () {
  17524. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17525. return e.appId === s && (e.platform || "").toLowerCase() === o.toLowerCase();
  17526. })) return !0;
  17527. 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")), Sn(_n);
  17528. }
  17529. function xn(_ref33) {
  17530. var e = _ref33.functionName,
  17531. t = _ref33.result,
  17532. n = _ref33.logPvd;
  17533. if (k && this.__dev__.debugLog && t && t.requestId) {
  17534. var _s11 = JSON.stringify({
  17535. spaceId: this.config.spaceId,
  17536. functionName: e,
  17537. requestId: t.requestId
  17538. });
  17539. console.log("[".concat(n, "-request]").concat(_s11, "[/").concat(n, "-request]"));
  17540. }
  17541. }
  17542. function Rn(e) {
  17543. var t = e.callFunction,
  17544. n = function n(_n7) {
  17545. var _this18 = this;
  17546. var s = _n7.name;
  17547. _n7.data = Tt.call(e, {
  17548. data: _n7.data
  17549. });
  17550. var r = {
  17551. aliyun: "aliyun",
  17552. tencent: "tcb",
  17553. tcb: "tcb"
  17554. }[this.config.provider],
  17555. i = An(_n7),
  17556. o = En(_n7),
  17557. a = i || o;
  17558. return t.call(this, _n7).then(function (e) {
  17559. return e.errCode = 0, !a && xn.call(_this18, {
  17560. functionName: s,
  17561. result: e,
  17562. logPvd: r
  17563. }), Promise.resolve(e);
  17564. }, function (e) {
  17565. return !a && xn.call(_this18, {
  17566. functionName: s,
  17567. result: e,
  17568. logPvd: r
  17569. }), e && e.message && (e.message = function () {
  17570. var _ref34 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17571. _ref34$message = _ref34.message,
  17572. e = _ref34$message === void 0 ? "" : _ref34$message,
  17573. _ref34$extraInfo = _ref34.extraInfo,
  17574. t = _ref34$extraInfo === void 0 ? {} : _ref34$extraInfo,
  17575. _ref34$formatter = _ref34.formatter,
  17576. n = _ref34$formatter === void 0 ? [] : _ref34$formatter;
  17577. for (var _s12 = 0; _s12 < n.length; _s12++) {
  17578. var _n$_s = n[_s12],
  17579. _r4 = _n$_s.rule,
  17580. _i3 = _n$_s.content,
  17581. _o3 = _n$_s.mode,
  17582. _a = e.match(_r4);
  17583. if (!_a) continue;
  17584. var _c = _i3;
  17585. for (var _e19 = 1; _e19 < _a.length; _e19++) {
  17586. _c = Ot(_c, "{$".concat(_e19, "}"), _a[_e19]);
  17587. }
  17588. for (var _e20 in t) {
  17589. _c = Ot(_c, "{".concat(_e20, "}"), t[_e20]);
  17590. }
  17591. return "replace" === _o3 ? _c : e + _c;
  17592. }
  17593. return e;
  17594. }({
  17595. message: "[".concat(_n7.name, "]: ").concat(e.message),
  17596. formatter: Pt,
  17597. extraInfo: {
  17598. functionName: s
  17599. }
  17600. })), Promise.reject(e);
  17601. });
  17602. };
  17603. e.callFunction = function (t) {
  17604. var _e$config = e.config,
  17605. s = _e$config.provider,
  17606. r = _e$config.spaceId,
  17607. i = t.name;
  17608. var o, a;
  17609. if (t.data = t.data || {}, k && e.__dev__.debugInfo && !e.__dev__.debugInfo.forceRemote && O ? (e._callCloudFunction || (e._callCloudFunction = n, e._callLocalFunction = Ct), o = Ct) : o = n, o = o.bind(e), En(t)) a = n.call(e, t);else if (function (_ref35) {
  17610. var e = _ref35.name,
  17611. _ref35$data = _ref35.data,
  17612. t = _ref35$data === void 0 ? {} : _ref35$data;
  17613. return "mp-weixin" === A && "uni-id-co" === e && "secureNetworkHandshakeByWeixin" === t.method;
  17614. }(t)) a = o.call(e, t);else if (An(t)) {
  17615. a = new bn({
  17616. secretType: t.secretType,
  17617. uniCloudIns: e
  17618. }).wrapEncryptDataCallFunction(n.bind(e))(t);
  17619. } else if (On({
  17620. provider: s,
  17621. spaceId: r,
  17622. functionName: i
  17623. })) {
  17624. a = new bn({
  17625. secretType: t.secretType,
  17626. uniCloudIns: e
  17627. }).wrapVerifyClientCallFunction(n.bind(e))(t);
  17628. } else a = o(t);
  17629. return Object.defineProperty(a, "result", {
  17630. get: function get() {
  17631. return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {};
  17632. }
  17633. }), a;
  17634. };
  17635. }
  17636. bn = "mp-weixin" !== A && "app" !== A ? /*#__PURE__*/function () {
  17637. function _class2() {
  17638. (0, _classCallCheck2.default)(this, _class2);
  17639. throw Sn({
  17640. message: "Platform ".concat(A, " is not supported by secure network")
  17641. });
  17642. }
  17643. return (0, _createClass2.default)(_class2);
  17644. }() : C ? "mp-weixin" === A ? Tn : Pn : /*#__PURE__*/function () {
  17645. function _class3() {
  17646. (0, _classCallCheck2.default)(this, _class3);
  17647. throw Sn({
  17648. message: "Platform ".concat(A, " is not enabled, please check whether secure network module is enabled in your manifest.json")
  17649. });
  17650. }
  17651. return (0, _createClass2.default)(_class3);
  17652. }();
  17653. var Un = Symbol("CLIENT_DB_INTERNAL");
  17654. function Ln(e, t) {
  17655. return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = Un, e.inspect = null, e.__ob__ = void 0, new Proxy(e, {
  17656. get: function get(e, n, s) {
  17657. if ("_uniClient" === n) return null;
  17658. if ("symbol" == (0, _typeof2.default)(n)) return e[n];
  17659. if (n in e || "string" != typeof n) {
  17660. var _t10 = e[n];
  17661. return "function" == typeof _t10 ? _t10.bind(e) : _t10;
  17662. }
  17663. return t.get(e, n, s);
  17664. }
  17665. });
  17666. }
  17667. function Nn(e) {
  17668. return {
  17669. on: function on(t, n) {
  17670. e[t] = e[t] || [], e[t].indexOf(n) > -1 || e[t].push(n);
  17671. },
  17672. off: function off(t, n) {
  17673. e[t] = e[t] || [];
  17674. var s = e[t].indexOf(n);
  17675. -1 !== s && e[t].splice(s, 1);
  17676. }
  17677. };
  17678. }
  17679. var Dn = ["db.Geo", "db.command", "command.aggregate"];
  17680. function Fn(e, t) {
  17681. return Dn.indexOf("".concat(e, ".").concat(t)) > -1;
  17682. }
  17683. function qn(e) {
  17684. switch (g(e)) {
  17685. case "array":
  17686. return e.map(function (e) {
  17687. return qn(e);
  17688. });
  17689. case "object":
  17690. return e._internalType === Un || Object.keys(e).forEach(function (t) {
  17691. e[t] = qn(e[t]);
  17692. }), e;
  17693. case "regexp":
  17694. return {
  17695. $regexp: {
  17696. source: e.source,
  17697. flags: e.flags
  17698. }
  17699. };
  17700. case "date":
  17701. return {
  17702. $date: e.toISOString()
  17703. };
  17704. default:
  17705. return e;
  17706. }
  17707. }
  17708. function Mn(e) {
  17709. return e && e.content && e.content.$method;
  17710. }
  17711. var Kn = /*#__PURE__*/function () {
  17712. function Kn(e, t, n) {
  17713. (0, _classCallCheck2.default)(this, Kn);
  17714. this.content = e, this.prevStage = t || null, this.udb = null, this._database = n;
  17715. }
  17716. (0, _createClass2.default)(Kn, [{
  17717. key: "toJSON",
  17718. value: function toJSON() {
  17719. var e = this;
  17720. var t = [e.content];
  17721. for (; e.prevStage;) {
  17722. e = e.prevStage, t.push(e.content);
  17723. }
  17724. return {
  17725. $db: t.reverse().map(function (e) {
  17726. return {
  17727. $method: e.$method,
  17728. $param: qn(e.$param)
  17729. };
  17730. })
  17731. };
  17732. }
  17733. }, {
  17734. key: "toString",
  17735. value: function toString() {
  17736. return JSON.stringify(this.toJSON());
  17737. }
  17738. }, {
  17739. key: "getAction",
  17740. value: function getAction() {
  17741. var e = this.toJSON().$db.find(function (e) {
  17742. return "action" === e.$method;
  17743. });
  17744. return e && e.$param && e.$param[0];
  17745. }
  17746. }, {
  17747. key: "getCommand",
  17748. value: function getCommand() {
  17749. return {
  17750. $db: this.toJSON().$db.filter(function (e) {
  17751. return "action" !== e.$method;
  17752. })
  17753. };
  17754. }
  17755. }, {
  17756. key: "isAggregate",
  17757. get: function get() {
  17758. var e = this;
  17759. for (; e;) {
  17760. var t = Mn(e),
  17761. _n8 = Mn(e.prevStage);
  17762. if ("aggregate" === t && "collection" === _n8 || "pipeline" === t) return !0;
  17763. e = e.prevStage;
  17764. }
  17765. return !1;
  17766. }
  17767. }, {
  17768. key: "isCommand",
  17769. get: function get() {
  17770. var e = this;
  17771. for (; e;) {
  17772. if ("command" === Mn(e)) return !0;
  17773. e = e.prevStage;
  17774. }
  17775. return !1;
  17776. }
  17777. }, {
  17778. key: "isAggregateCommand",
  17779. get: function get() {
  17780. var e = this;
  17781. for (; e;) {
  17782. var t = Mn(e),
  17783. _n9 = Mn(e.prevStage);
  17784. if ("aggregate" === t && "command" === _n9) return !0;
  17785. e = e.prevStage;
  17786. }
  17787. return !1;
  17788. }
  17789. }, {
  17790. key: "getNextStageFn",
  17791. value: function getNextStageFn(e) {
  17792. var t = this;
  17793. return function () {
  17794. return jn({
  17795. $method: e,
  17796. $param: qn(Array.from(arguments))
  17797. }, t, t._database);
  17798. };
  17799. }
  17800. }, {
  17801. key: "count",
  17802. get: function get() {
  17803. return this.isAggregate ? this.getNextStageFn("count") : function () {
  17804. return this._send("count", Array.from(arguments));
  17805. };
  17806. }
  17807. }, {
  17808. key: "remove",
  17809. get: function get() {
  17810. return this.isCommand ? this.getNextStageFn("remove") : function () {
  17811. return this._send("remove", Array.from(arguments));
  17812. };
  17813. }
  17814. }, {
  17815. key: "get",
  17816. value: function get() {
  17817. return this._send("get", Array.from(arguments));
  17818. }
  17819. }, {
  17820. key: "add",
  17821. get: function get() {
  17822. return this.isCommand ? this.getNextStageFn("add") : function () {
  17823. return this._send("add", Array.from(arguments));
  17824. };
  17825. }
  17826. }, {
  17827. key: "update",
  17828. value: function update() {
  17829. return this._send("update", Array.from(arguments));
  17830. }
  17831. }, {
  17832. key: "end",
  17833. value: function end() {
  17834. return this._send("end", Array.from(arguments));
  17835. }
  17836. }, {
  17837. key: "set",
  17838. get: function get() {
  17839. return this.isCommand ? this.getNextStageFn("set") : function () {
  17840. throw new Error("JQL禁止使用set方法");
  17841. };
  17842. }
  17843. }, {
  17844. key: "_send",
  17845. value: function _send(e, t) {
  17846. var n = this.getAction(),
  17847. s = this.getCommand();
  17848. if (s.$db.push({
  17849. $method: e,
  17850. $param: qn(t)
  17851. }), k) {
  17852. var _e21 = s.$db.find(function (e) {
  17853. return "collection" === e.$method;
  17854. }),
  17855. _t11 = _e21 && _e21.$param;
  17856. _t11 && 1 === _t11.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- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  17857. }
  17858. return this._database._callCloudFunction({
  17859. action: n,
  17860. command: s
  17861. });
  17862. }
  17863. }]);
  17864. return Kn;
  17865. }();
  17866. function jn(e, t, n) {
  17867. return Ln(new Kn(e, t, n), {
  17868. get: function get(e, t) {
  17869. var s = "db";
  17870. return e && e.content && (s = e.content.$method), Fn(s, t) ? jn({
  17871. $method: t
  17872. }, e, n) : function () {
  17873. return jn({
  17874. $method: t,
  17875. $param: qn(Array.from(arguments))
  17876. }, e, n);
  17877. };
  17878. }
  17879. });
  17880. }
  17881. function Bn(_ref36) {
  17882. var e = _ref36.path,
  17883. t = _ref36.method;
  17884. return /*#__PURE__*/function () {
  17885. function _class4() {
  17886. (0, _classCallCheck2.default)(this, _class4);
  17887. this.param = Array.from(arguments);
  17888. }
  17889. (0, _createClass2.default)(_class4, [{
  17890. key: "toJSON",
  17891. value: function toJSON() {
  17892. return {
  17893. $newDb: [].concat((0, _toConsumableArray2.default)(e.map(function (e) {
  17894. return {
  17895. $method: e
  17896. };
  17897. })), [{
  17898. $method: t,
  17899. $param: this.param
  17900. }])
  17901. };
  17902. }
  17903. }, {
  17904. key: "toString",
  17905. value: function toString() {
  17906. return JSON.stringify(this.toJSON());
  17907. }
  17908. }]);
  17909. return _class4;
  17910. }();
  17911. }
  17912. function $n(e) {
  17913. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  17914. return Ln(new e(t), {
  17915. get: function get(e, t) {
  17916. return Fn("db", t) ? jn({
  17917. $method: t
  17918. }, null, e) : function () {
  17919. return jn({
  17920. $method: t,
  17921. $param: qn(Array.from(arguments))
  17922. }, null, e);
  17923. };
  17924. }
  17925. });
  17926. }
  17927. var Wn = /*#__PURE__*/function (_ref37) {
  17928. (0, _inherits2.default)(Wn, _ref37);
  17929. var _super11 = _createSuper(Wn);
  17930. function Wn() {
  17931. (0, _classCallCheck2.default)(this, Wn);
  17932. return _super11.apply(this, arguments);
  17933. }
  17934. (0, _createClass2.default)(Wn, [{
  17935. key: "_parseResult",
  17936. value: function _parseResult(e) {
  17937. return this._isJQL ? e.result : e;
  17938. }
  17939. }, {
  17940. key: "_callCloudFunction",
  17941. value: function _callCloudFunction(_ref38) {
  17942. var _this19 = this;
  17943. var e = _ref38.action,
  17944. t = _ref38.command,
  17945. n = _ref38.multiCommand,
  17946. s = _ref38.queryList;
  17947. function r(e, t) {
  17948. if (n && s) for (var _n10 = 0; _n10 < s.length; _n10++) {
  17949. var _r5 = s[_n10];
  17950. _r5.udb && "function" == typeof _r5.udb.setResult && (t ? _r5.udb.setResult(t) : _r5.udb.setResult(e.result.dataList[_n10]));
  17951. }
  17952. }
  17953. var i = this,
  17954. o = this._isJQL ? "databaseForJQL" : "database";
  17955. function a(e) {
  17956. return i._callback("error", [e]), M(K(o, "fail"), e).then(function () {
  17957. return M(K(o, "complete"), e);
  17958. }).then(function () {
  17959. return r(null, e), X($, {
  17960. type: J,
  17961. content: e
  17962. }), Promise.reject(e);
  17963. });
  17964. }
  17965. var c = M(K(o, "invoke")),
  17966. u = this._uniClient;
  17967. return c.then(function () {
  17968. return u.callFunction({
  17969. name: "DCloud-clientDB",
  17970. type: l,
  17971. data: {
  17972. action: e,
  17973. command: t,
  17974. multiCommand: n
  17975. }
  17976. });
  17977. }).then(function (e) {
  17978. var _e$result = e.result,
  17979. t = _e$result.code,
  17980. n = _e$result.message,
  17981. s = _e$result.token,
  17982. c = _e$result.tokenExpired,
  17983. _e$result$systemInfo = _e$result.systemInfo,
  17984. u = _e$result$systemInfo === void 0 ? [] : _e$result$systemInfo;
  17985. if (u) for (var _e22 = 0; _e22 < u.length; _e22++) {
  17986. var _u$_e = u[_e22],
  17987. _t12 = _u$_e.level,
  17988. _n11 = _u$_e.message,
  17989. _s13 = _u$_e.detail,
  17990. _r6 = console["app" === A && "warn" === _t12 ? "error" : _t12] || console.log;
  17991. var _i4 = "[System Info]" + _n11;
  17992. _s13 && (_i4 = "".concat(_i4, "\n\u8BE6\u7EC6\u4FE1\u606F\uFF1A").concat(_s13)), _r6(_i4);
  17993. }
  17994. if (t) {
  17995. return a(new se({
  17996. code: t,
  17997. message: n,
  17998. requestId: e.requestId
  17999. }));
  18000. }
  18001. e.result.errCode = e.result.errCode || e.result.code, e.result.errMsg = e.result.errMsg || e.result.message, s && c && (oe({
  18002. token: s,
  18003. tokenExpired: c
  18004. }), _this19._callbackAuth("refreshToken", [{
  18005. token: s,
  18006. tokenExpired: c
  18007. }]), _this19._callback("refreshToken", [{
  18008. token: s,
  18009. tokenExpired: c
  18010. }]), X(z, {
  18011. token: s,
  18012. tokenExpired: c
  18013. }));
  18014. var h = [{
  18015. prop: "affectedDocs",
  18016. tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"
  18017. }, {
  18018. prop: "code",
  18019. tips: "code不再推荐使用,请使用errCode替代"
  18020. }, {
  18021. prop: "message",
  18022. tips: "message不再推荐使用,请使用errMsg替代"
  18023. }];
  18024. var _loop2 = function _loop2(_t13) {
  18025. var _h$_t = h[_t13],
  18026. n = _h$_t.prop,
  18027. s = _h$_t.tips;
  18028. if (n in e.result) {
  18029. var _t14 = e.result[n];
  18030. Object.defineProperty(e.result, n, {
  18031. get: function get() {
  18032. return console.warn(s), _t14;
  18033. }
  18034. });
  18035. }
  18036. };
  18037. for (var _t13 = 0; _t13 < h.length; _t13++) {
  18038. _loop2(_t13);
  18039. }
  18040. return function (e) {
  18041. return M(K(o, "success"), e).then(function () {
  18042. return M(K(o, "complete"), e);
  18043. }).then(function () {
  18044. r(e, null);
  18045. var t = i._parseResult(e);
  18046. return X($, {
  18047. type: J,
  18048. content: t
  18049. }), Promise.resolve(t);
  18050. });
  18051. }(e);
  18052. }, function (e) {
  18053. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  18054. return a(new se({
  18055. code: e.code || "SYSTEM_ERROR",
  18056. message: e.message,
  18057. requestId: e.requestId
  18058. }));
  18059. });
  18060. }
  18061. }]);
  18062. return Wn;
  18063. }( /*#__PURE__*/function () {
  18064. function _class5() {
  18065. var _ref39 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18066. _ref39$uniClient = _ref39.uniClient,
  18067. e = _ref39$uniClient === void 0 ? {} : _ref39$uniClient,
  18068. _ref39$isJQL = _ref39.isJQL,
  18069. t = _ref39$isJQL === void 0 ? !1 : _ref39$isJQL;
  18070. (0, _classCallCheck2.default)(this, _class5);
  18071. this._uniClient = e, this._authCallBacks = {}, this._dbCallBacks = {}, e._isDefault && (this._dbCallBacks = L("_globalUniCloudDatabaseCallback")), t || (this.auth = Nn(this._authCallBacks)), this._isJQL = t, Object.assign(this, Nn(this._dbCallBacks)), this.env = Ln({}, {
  18072. get: function get(e, t) {
  18073. return {
  18074. $env: t
  18075. };
  18076. }
  18077. }), this.Geo = Ln({}, {
  18078. get: function get(e, t) {
  18079. return Bn({
  18080. path: ["Geo"],
  18081. method: t
  18082. });
  18083. }
  18084. }), this.serverDate = Bn({
  18085. path: [],
  18086. method: "serverDate"
  18087. }), this.RegExp = Bn({
  18088. path: [],
  18089. method: "RegExp"
  18090. });
  18091. }
  18092. (0, _createClass2.default)(_class5, [{
  18093. key: "getCloudEnv",
  18094. value: function getCloudEnv(e) {
  18095. if ("string" != typeof e || !e.trim()) throw new Error("getCloudEnv参数错误");
  18096. return {
  18097. $env: e.replace("$cloudEnv_", "")
  18098. };
  18099. }
  18100. }, {
  18101. key: "_callback",
  18102. value: function _callback(e, t) {
  18103. var n = this._dbCallBacks;
  18104. n[e] && n[e].forEach(function (e) {
  18105. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  18106. });
  18107. }
  18108. }, {
  18109. key: "_callbackAuth",
  18110. value: function _callbackAuth(e, t) {
  18111. var n = this._authCallBacks;
  18112. n[e] && n[e].forEach(function (e) {
  18113. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  18114. });
  18115. }
  18116. }, {
  18117. key: "multiSend",
  18118. value: function multiSend() {
  18119. var e = Array.from(arguments),
  18120. t = e.map(function (e) {
  18121. var t = e.getAction(),
  18122. n = e.getCommand();
  18123. if ("getTemp" !== n.$db[n.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp");
  18124. return {
  18125. action: t,
  18126. command: n
  18127. };
  18128. });
  18129. return this._callCloudFunction({
  18130. multiCommand: t,
  18131. queryList: e
  18132. });
  18133. }
  18134. }]);
  18135. return _class5;
  18136. }());
  18137. var zn = "token无效,跳转登录页面",
  18138. Jn = "token过期,跳转登录页面",
  18139. Hn = {
  18140. TOKEN_INVALID_TOKEN_EXPIRED: Jn,
  18141. TOKEN_INVALID_INVALID_CLIENTID: zn,
  18142. TOKEN_INVALID: zn,
  18143. TOKEN_INVALID_WRONG_TOKEN: zn,
  18144. TOKEN_INVALID_ANONYMOUS_USER: zn
  18145. },
  18146. Gn = {
  18147. "uni-id-token-expired": Jn,
  18148. "uni-id-check-token-failed": zn,
  18149. "uni-id-token-not-exist": zn,
  18150. "uni-id-check-device-feature-failed": zn
  18151. };
  18152. function Vn(e, t) {
  18153. var n = "";
  18154. return n = e ? "".concat(e, "/").concat(t) : t, n.replace(/^\//, "");
  18155. }
  18156. function Qn() {
  18157. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  18158. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
  18159. var n = [],
  18160. s = [];
  18161. return e.forEach(function (e) {
  18162. !0 === e.needLogin ? n.push(Vn(t, e.path)) : !1 === e.needLogin && s.push(Vn(t, e.path));
  18163. }), {
  18164. needLoginPage: n,
  18165. notNeedLoginPage: s
  18166. };
  18167. }
  18168. function Yn(e) {
  18169. return e.split("?")[0].replace(/^\//, "");
  18170. }
  18171. function Xn() {
  18172. return function (e) {
  18173. var t = e && e.$page && e.$page.fullPath || "";
  18174. return t ? ("/" !== t.charAt(0) && (t = "/" + t), t) : t;
  18175. }(function () {
  18176. var e = getCurrentPages();
  18177. return e[e.length - 1];
  18178. }());
  18179. }
  18180. function Zn() {
  18181. return Yn(Xn());
  18182. }
  18183. function es() {
  18184. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  18185. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  18186. if (!e) return !1;
  18187. if (!(t && t.list && t.list.length)) return !1;
  18188. var n = t.list,
  18189. s = Yn(e);
  18190. return n.some(function (e) {
  18191. return e.pagePath === s;
  18192. });
  18193. }
  18194. var ts = !!_pages.default.uniIdRouter;
  18195. var _ref40 = function () {
  18196. var _ref21 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pages.default,
  18197. _ref21$pages = _ref21.pages,
  18198. e = _ref21$pages === void 0 ? [] : _ref21$pages,
  18199. _ref21$subPackages = _ref21.subPackages,
  18200. n = _ref21$subPackages === void 0 ? [] : _ref21$subPackages,
  18201. _ref21$uniIdRouter = _ref21.uniIdRouter,
  18202. s = _ref21$uniIdRouter === void 0 ? {} : _ref21$uniIdRouter,
  18203. _ref21$tabBar = _ref21.tabBar,
  18204. r = _ref21$tabBar === void 0 ? {} : _ref21$tabBar;
  18205. var i = s.loginPage,
  18206. _s$needLogin = s.needLogin,
  18207. o = _s$needLogin === void 0 ? [] : _s$needLogin,
  18208. _s$resToLogin = s.resToLogin,
  18209. a = _s$resToLogin === void 0 ? !0 : _s$resToLogin,
  18210. _Qn = Qn(e),
  18211. c = _Qn.needLoginPage,
  18212. u = _Qn.notNeedLoginPage,
  18213. _ref23 = function () {
  18214. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  18215. var t = [],
  18216. n = [];
  18217. return e.forEach(function (e) {
  18218. var s = e.root,
  18219. _e$pages = e.pages,
  18220. r = _e$pages === void 0 ? [] : _e$pages,
  18221. _Qn2 = Qn(r, s),
  18222. i = _Qn2.needLoginPage,
  18223. o = _Qn2.notNeedLoginPage;
  18224. t.push.apply(t, (0, _toConsumableArray2.default)(i)), n.push.apply(n, (0, _toConsumableArray2.default)(o));
  18225. }), {
  18226. needLoginPage: t,
  18227. notNeedLoginPage: n
  18228. };
  18229. }(n),
  18230. h = _ref23.needLoginPage,
  18231. l = _ref23.notNeedLoginPage;
  18232. return {
  18233. loginPage: i,
  18234. routerNeedLogin: o,
  18235. resToLogin: a,
  18236. needLoginPage: [].concat((0, _toConsumableArray2.default)(c), (0, _toConsumableArray2.default)(h)),
  18237. notNeedLoginPage: [].concat((0, _toConsumableArray2.default)(u), (0, _toConsumableArray2.default)(l)),
  18238. loginPageInTabBar: es(i, r)
  18239. };
  18240. }(),
  18241. ns = _ref40.loginPage,
  18242. ss = _ref40.routerNeedLogin,
  18243. rs = _ref40.resToLogin,
  18244. is = _ref40.needLoginPage,
  18245. os = _ref40.notNeedLoginPage,
  18246. as = _ref40.loginPageInTabBar;
  18247. if (is.indexOf(ns) > -1) throw new Error("Login page [".concat(ns, "] should not be \"needLogin\", please check your pages.json"));
  18248. function cs(e) {
  18249. var t = Zn();
  18250. if ("/" === e.charAt(0)) return e;
  18251. var _e$split = e.split("?"),
  18252. _e$split2 = (0, _slicedToArray2.default)(_e$split, 2),
  18253. n = _e$split2[0],
  18254. s = _e$split2[1],
  18255. r = n.replace(/^\//, "").split("/"),
  18256. i = t.split("/");
  18257. i.pop();
  18258. for (var _e23 = 0; _e23 < r.length; _e23++) {
  18259. var _t15 = r[_e23];
  18260. ".." === _t15 ? i.pop() : "." !== _t15 && i.push(_t15);
  18261. }
  18262. return "" === i[0] && i.shift(), "/" + i.join("/") + (s ? "?" + s : "");
  18263. }
  18264. function us(e) {
  18265. var t = Yn(cs(e));
  18266. return !(os.indexOf(t) > -1) && (is.indexOf(t) > -1 || ss.some(function (t) {
  18267. return function (e, t) {
  18268. return new RegExp(t).test(e);
  18269. }(e, t);
  18270. }));
  18271. }
  18272. function hs(_ref41) {
  18273. var e = _ref41.redirect;
  18274. var t = Yn(e),
  18275. n = Yn(ns);
  18276. return Zn() !== n && t !== n;
  18277. }
  18278. function ls() {
  18279. var _ref42 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18280. e = _ref42.api,
  18281. t = _ref42.redirect;
  18282. if (!t || !hs({
  18283. redirect: t
  18284. })) return;
  18285. var n = function (e, t) {
  18286. return "/" !== e.charAt(0) && (e = "/" + e), t ? e.indexOf("?") > -1 ? e + "&uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e + "?uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e;
  18287. }(ns, t);
  18288. as ? "navigateTo" !== e && "redirectTo" !== e || (e = "switchTab") : "switchTab" === e && (e = "navigateTo");
  18289. var s = {
  18290. navigateTo: uni.navigateTo,
  18291. redirectTo: uni.redirectTo,
  18292. switchTab: uni.switchTab,
  18293. reLaunch: uni.reLaunch
  18294. };
  18295. setTimeout(function () {
  18296. s[e]({
  18297. url: n
  18298. });
  18299. });
  18300. }
  18301. function ds() {
  18302. var _ref43 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18303. e = _ref43.url;
  18304. var t = {
  18305. abortLoginPageJump: !1,
  18306. autoToLoginPage: !1
  18307. },
  18308. n = function () {
  18309. var _ie3 = ie(),
  18310. e = _ie3.token,
  18311. t = _ie3.tokenExpired;
  18312. var n;
  18313. if (e) {
  18314. if (t < Date.now()) {
  18315. var _e24 = "uni-id-token-expired";
  18316. n = {
  18317. errCode: _e24,
  18318. errMsg: Gn[_e24]
  18319. };
  18320. }
  18321. } else {
  18322. var _e25 = "uni-id-check-token-failed";
  18323. n = {
  18324. errCode: _e25,
  18325. errMsg: Gn[_e25]
  18326. };
  18327. }
  18328. return n;
  18329. }();
  18330. if (us(e) && n) {
  18331. n.uniIdRedirectUrl = e;
  18332. if (V(W).length > 0) return setTimeout(function () {
  18333. X(W, n);
  18334. }, 0), t.abortLoginPageJump = !0, t;
  18335. t.autoToLoginPage = !0;
  18336. }
  18337. return t;
  18338. }
  18339. function ps() {
  18340. !function () {
  18341. var e = Xn(),
  18342. _ds = ds({
  18343. url: e
  18344. }),
  18345. t = _ds.abortLoginPageJump,
  18346. n = _ds.autoToLoginPage;
  18347. t || n && ls({
  18348. api: "redirectTo",
  18349. redirect: e
  18350. });
  18351. }();
  18352. var e = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  18353. var _loop3 = function _loop3(_t16) {
  18354. var n = e[_t16];
  18355. uni.addInterceptor(n, {
  18356. invoke: function invoke(e) {
  18357. var _ds2 = ds({
  18358. url: e.url
  18359. }),
  18360. t = _ds2.abortLoginPageJump,
  18361. s = _ds2.autoToLoginPage;
  18362. return t ? e : s ? (ls({
  18363. api: n,
  18364. redirect: cs(e.url)
  18365. }), !1) : e;
  18366. }
  18367. });
  18368. };
  18369. for (var _t16 = 0; _t16 < e.length; _t16++) {
  18370. _loop3(_t16);
  18371. }
  18372. }
  18373. function fs() {
  18374. this.onResponse(function (e) {
  18375. var t = e.type,
  18376. n = e.content;
  18377. var s = !1;
  18378. switch (t) {
  18379. case "cloudobject":
  18380. s = function (e) {
  18381. if ("object" != (0, _typeof2.default)(e)) return !1;
  18382. var _ref44 = e || {},
  18383. t = _ref44.errCode;
  18384. return t in Gn;
  18385. }(n);
  18386. break;
  18387. case "clientdb":
  18388. s = function (e) {
  18389. if ("object" != (0, _typeof2.default)(e)) return !1;
  18390. var _ref45 = e || {},
  18391. t = _ref45.errCode;
  18392. return t in Hn;
  18393. }(n);
  18394. }
  18395. s && function () {
  18396. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  18397. var t = V(W);
  18398. te().then(function () {
  18399. var n = Xn();
  18400. if (n && hs({
  18401. redirect: n
  18402. })) return t.length > 0 ? X(W, Object.assign({
  18403. uniIdRedirectUrl: n
  18404. }, e)) : void (ns && ls({
  18405. api: "navigateTo",
  18406. redirect: n
  18407. }));
  18408. });
  18409. }(n);
  18410. });
  18411. }
  18412. function gs(e) {
  18413. !function (e) {
  18414. e.onResponse = function (e) {
  18415. Q($, e);
  18416. }, e.offResponse = function (e) {
  18417. Y($, e);
  18418. };
  18419. }(e), function (e) {
  18420. e.onNeedLogin = function (e) {
  18421. Q(W, e);
  18422. }, e.offNeedLogin = function (e) {
  18423. Y(W, e);
  18424. }, ts && (L("_globalUniCloudStatus").needLoginInit || (L("_globalUniCloudStatus").needLoginInit = !0, te().then(function () {
  18425. ps.call(e);
  18426. }), rs && fs.call(e)));
  18427. }(e), function (e) {
  18428. e.onRefreshToken = function (e) {
  18429. Q(z, e);
  18430. }, e.offRefreshToken = function (e) {
  18431. Y(z, e);
  18432. };
  18433. }(e);
  18434. }
  18435. var ms;
  18436. var ys = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  18437. _s = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  18438. function ws() {
  18439. var e = ie().token || "",
  18440. t = e.split(".");
  18441. if (!e || 3 !== t.length) return {
  18442. uid: null,
  18443. role: [],
  18444. permission: [],
  18445. tokenExpired: 0
  18446. };
  18447. var n;
  18448. try {
  18449. n = JSON.parse((s = t[1], decodeURIComponent(ms(s).split("").map(function (e) {
  18450. return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);
  18451. }).join(""))));
  18452. } catch (e) {
  18453. throw new Error("获取当前用户信息出错,详细错误信息为:" + e.message);
  18454. }
  18455. var s;
  18456. return n.tokenExpired = 1e3 * n.exp, delete n.exp, delete n.iat, n;
  18457. }
  18458. ms = "function" != typeof atob ? function (e) {
  18459. if (e = String(e).replace(/[\t\n\f\r ]+/g, ""), !_s.test(e)) throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  18460. var t;
  18461. e += "==".slice(2 - (3 & e.length));
  18462. for (var n, s, r = "", i = 0; i < e.length;) {
  18463. t = ys.indexOf(e.charAt(i++)) << 18 | ys.indexOf(e.charAt(i++)) << 12 | (n = ys.indexOf(e.charAt(i++))) << 6 | (s = ys.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);
  18464. }
  18465. return r;
  18466. } : atob;
  18467. var vs = s(function (e, t) {
  18468. Object.defineProperty(t, "__esModule", {
  18469. value: !0
  18470. });
  18471. var n = "chooseAndUploadFile:ok",
  18472. s = "chooseAndUploadFile:fail";
  18473. function r(e, t) {
  18474. return e.tempFiles.forEach(function (e, n) {
  18475. 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("."));
  18476. }), e.tempFilePaths || (e.tempFilePaths = e.tempFiles.map(function (e) {
  18477. return e.path;
  18478. })), e;
  18479. }
  18480. function i(e, t, _ref46) {
  18481. var s = _ref46.onChooseFile,
  18482. r = _ref46.onUploadProgress;
  18483. return t.then(function (e) {
  18484. if (s) {
  18485. var _t17 = s(e);
  18486. if (void 0 !== _t17) return Promise.resolve(_t17).then(function (t) {
  18487. return void 0 === t ? e : t;
  18488. });
  18489. }
  18490. return e;
  18491. }).then(function (t) {
  18492. return !1 === t ? {
  18493. errMsg: n,
  18494. tempFilePaths: [],
  18495. tempFiles: []
  18496. } : function (e, t) {
  18497. var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
  18498. var r = arguments.length > 3 ? arguments[3] : undefined;
  18499. (t = Object.assign({}, t)).errMsg = n;
  18500. var i = t.tempFiles,
  18501. o = i.length;
  18502. var a = 0;
  18503. return new Promise(function (n) {
  18504. for (; a < s;) {
  18505. c();
  18506. }
  18507. function c() {
  18508. var s = a++;
  18509. if (s >= o) return void (!i.find(function (e) {
  18510. return !e.url && !e.errMsg;
  18511. }) && n(t));
  18512. var u = i[s];
  18513. e.uploadFile({
  18514. filePath: u.path,
  18515. cloudPath: u.cloudPath,
  18516. fileType: u.fileType,
  18517. onUploadProgress: function onUploadProgress(e) {
  18518. e.index = s, e.tempFile = u, e.tempFilePath = u.path, r && r(e);
  18519. }
  18520. }).then(function (e) {
  18521. u.url = e.fileID, s < o && c();
  18522. }).catch(function (e) {
  18523. u.errMsg = e.errMsg || e.message, s < o && c();
  18524. });
  18525. }
  18526. });
  18527. }(e, t, 5, r);
  18528. });
  18529. }
  18530. t.initChooseAndUploadFile = function (e) {
  18531. return function () {
  18532. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  18533. type: "all"
  18534. };
  18535. return "image" === t.type ? i(e, function (e) {
  18536. var t = e.count,
  18537. n = e.sizeType,
  18538. _e$sourceType = e.sourceType,
  18539. i = _e$sourceType === void 0 ? ["album", "camera"] : _e$sourceType,
  18540. o = e.extension;
  18541. return new Promise(function (e, a) {
  18542. uni.chooseImage({
  18543. count: t,
  18544. sizeType: n,
  18545. sourceType: i,
  18546. extension: o,
  18547. success: function success(t) {
  18548. e(r(t, "image"));
  18549. },
  18550. fail: function fail(e) {
  18551. a({
  18552. errMsg: e.errMsg.replace("chooseImage:fail", s)
  18553. });
  18554. }
  18555. });
  18556. });
  18557. }(t), t) : "video" === t.type ? i(e, function (e) {
  18558. var t = e.camera,
  18559. n = e.compressed,
  18560. i = e.maxDuration,
  18561. _e$sourceType2 = e.sourceType,
  18562. o = _e$sourceType2 === void 0 ? ["album", "camera"] : _e$sourceType2,
  18563. a = e.extension;
  18564. return new Promise(function (e, c) {
  18565. uni.chooseVideo({
  18566. camera: t,
  18567. compressed: n,
  18568. maxDuration: i,
  18569. sourceType: o,
  18570. extension: a,
  18571. success: function success(t) {
  18572. var n = t.tempFilePath,
  18573. s = t.duration,
  18574. i = t.size,
  18575. o = t.height,
  18576. a = t.width;
  18577. e(r({
  18578. errMsg: "chooseVideo:ok",
  18579. tempFilePaths: [n],
  18580. tempFiles: [{
  18581. name: t.tempFile && t.tempFile.name || "",
  18582. path: n,
  18583. size: i,
  18584. type: t.tempFile && t.tempFile.type || "",
  18585. width: a,
  18586. height: o,
  18587. duration: s,
  18588. fileType: "video",
  18589. cloudPath: ""
  18590. }]
  18591. }, "video"));
  18592. },
  18593. fail: function fail(e) {
  18594. c({
  18595. errMsg: e.errMsg.replace("chooseVideo:fail", s)
  18596. });
  18597. }
  18598. });
  18599. });
  18600. }(t), t) : i(e, function (e) {
  18601. var t = e.count,
  18602. n = e.extension;
  18603. return new Promise(function (e, i) {
  18604. var o = uni.chooseFile;
  18605. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o = wx.chooseMessageFile), "function" != typeof o) return i({
  18606. errMsg: s + " 请指定 type 类型,该平台仅支持选择 image 或 video。"
  18607. });
  18608. o({
  18609. type: "all",
  18610. count: t,
  18611. extension: n,
  18612. success: function success(t) {
  18613. e(r(t));
  18614. },
  18615. fail: function fail(e) {
  18616. i({
  18617. errMsg: e.errMsg.replace("chooseFile:fail", s)
  18618. });
  18619. }
  18620. });
  18621. });
  18622. }(t), t);
  18623. };
  18624. };
  18625. }),
  18626. Ss = n(vs);
  18627. var Is = "manual";
  18628. function bs(e) {
  18629. return {
  18630. props: {
  18631. localdata: {
  18632. type: Array,
  18633. default: function _default() {
  18634. return [];
  18635. }
  18636. },
  18637. options: {
  18638. type: [Object, Array],
  18639. default: function _default() {
  18640. return {};
  18641. }
  18642. },
  18643. spaceInfo: {
  18644. type: Object,
  18645. default: function _default() {
  18646. return {};
  18647. }
  18648. },
  18649. collection: {
  18650. type: [String, Array],
  18651. default: ""
  18652. },
  18653. action: {
  18654. type: String,
  18655. default: ""
  18656. },
  18657. field: {
  18658. type: String,
  18659. default: ""
  18660. },
  18661. orderby: {
  18662. type: String,
  18663. default: ""
  18664. },
  18665. where: {
  18666. type: [String, Object],
  18667. default: ""
  18668. },
  18669. pageData: {
  18670. type: String,
  18671. default: "add"
  18672. },
  18673. pageCurrent: {
  18674. type: Number,
  18675. default: 1
  18676. },
  18677. pageSize: {
  18678. type: Number,
  18679. default: 20
  18680. },
  18681. getcount: {
  18682. type: [Boolean, String],
  18683. default: !1
  18684. },
  18685. gettree: {
  18686. type: [Boolean, String],
  18687. default: !1
  18688. },
  18689. gettreepath: {
  18690. type: [Boolean, String],
  18691. default: !1
  18692. },
  18693. startwith: {
  18694. type: String,
  18695. default: ""
  18696. },
  18697. limitlevel: {
  18698. type: Number,
  18699. default: 10
  18700. },
  18701. groupby: {
  18702. type: String,
  18703. default: ""
  18704. },
  18705. groupField: {
  18706. type: String,
  18707. default: ""
  18708. },
  18709. distinct: {
  18710. type: [Boolean, String],
  18711. default: !1
  18712. },
  18713. foreignKey: {
  18714. type: String,
  18715. default: ""
  18716. },
  18717. loadtime: {
  18718. type: String,
  18719. default: "auto"
  18720. },
  18721. manual: {
  18722. type: Boolean,
  18723. default: !1
  18724. }
  18725. },
  18726. data: function data() {
  18727. return {
  18728. mixinDatacomLoading: !1,
  18729. mixinDatacomHasMore: !1,
  18730. mixinDatacomResData: [],
  18731. mixinDatacomErrorMessage: "",
  18732. mixinDatacomPage: {}
  18733. };
  18734. },
  18735. created: function created() {
  18736. var _this20 = this;
  18737. this.mixinDatacomPage = {
  18738. current: this.pageCurrent,
  18739. size: this.pageSize,
  18740. count: 0
  18741. }, this.$watch(function () {
  18742. var e = [];
  18743. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach(function (t) {
  18744. e.push(_this20[t]);
  18745. }), e;
  18746. }, function (e, t) {
  18747. if (_this20.loadtime === Is) return;
  18748. var n = !1;
  18749. var s = [];
  18750. for (var _r7 = 2; _r7 < e.length; _r7++) {
  18751. e[_r7] !== t[_r7] && (s.push(e[_r7]), n = !0);
  18752. }
  18753. e[0] !== t[0] && (_this20.mixinDatacomPage.current = _this20.pageCurrent), _this20.mixinDatacomPage.size = _this20.pageSize, _this20.onMixinDatacomPropsChange(n, s);
  18754. });
  18755. },
  18756. methods: {
  18757. onMixinDatacomPropsChange: function onMixinDatacomPropsChange(e, t) {},
  18758. mixinDatacomEasyGet: function mixinDatacomEasyGet() {
  18759. var _this21 = this;
  18760. var _ref47 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18761. _ref47$getone = _ref47.getone,
  18762. e = _ref47$getone === void 0 ? !1 : _ref47$getone,
  18763. t = _ref47.success,
  18764. n = _ref47.fail;
  18765. this.mixinDatacomLoading || (this.mixinDatacomLoading = !0, this.mixinDatacomErrorMessage = "", this.mixinDatacomGet().then(function (n) {
  18766. _this21.mixinDatacomLoading = !1;
  18767. var _n$result = n.result,
  18768. s = _n$result.data,
  18769. r = _n$result.count;
  18770. _this21.getcount && (_this21.mixinDatacomPage.count = r), _this21.mixinDatacomHasMore = s.length < _this21.pageSize;
  18771. var i = e ? s.length ? s[0] : void 0 : s;
  18772. _this21.mixinDatacomResData = i, t && t(i);
  18773. }).catch(function (e) {
  18774. _this21.mixinDatacomLoading = !1, _this21.mixinDatacomErrorMessage = e, n && n(e);
  18775. }));
  18776. },
  18777. mixinDatacomGet: function mixinDatacomGet() {
  18778. var _n12;
  18779. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  18780. var n = e.database(this.spaceInfo);
  18781. var s = t.action || this.action;
  18782. s && (n = n.action(s));
  18783. var r = t.collection || this.collection;
  18784. n = Array.isArray(r) ? (_n12 = n).collection.apply(_n12, (0, _toConsumableArray2.default)(r)) : n.collection(r);
  18785. var i = t.where || this.where;
  18786. i && Object.keys(i).length && (n = n.where(i));
  18787. var o = t.field || this.field;
  18788. o && (n = n.field(o));
  18789. var a = t.foreignKey || this.foreignKey;
  18790. a && (n = n.foreignKey(a));
  18791. var c = t.groupby || this.groupby;
  18792. c && (n = n.groupBy(c));
  18793. var u = t.groupField || this.groupField;
  18794. u && (n = n.groupField(u));
  18795. !0 === (void 0 !== t.distinct ? t.distinct : this.distinct) && (n = n.distinct());
  18796. var h = t.orderby || this.orderby;
  18797. h && (n = n.orderBy(h));
  18798. var l = void 0 !== t.pageCurrent ? t.pageCurrent : this.mixinDatacomPage.current,
  18799. d = void 0 !== t.pageSize ? t.pageSize : this.mixinDatacomPage.size,
  18800. p = void 0 !== t.getcount ? t.getcount : this.getcount,
  18801. f = void 0 !== t.gettree ? t.gettree : this.gettree,
  18802. g = void 0 !== t.gettreepath ? t.gettreepath : this.gettreepath,
  18803. m = {
  18804. getCount: p
  18805. },
  18806. y = {
  18807. limitLevel: void 0 !== t.limitlevel ? t.limitlevel : this.limitlevel,
  18808. startWith: void 0 !== t.startwith ? t.startwith : this.startwith
  18809. };
  18810. return f && (m.getTree = y), g && (m.getTreePath = y), n = n.skip(d * (l - 1)).limit(d).get(m), n;
  18811. }
  18812. }
  18813. };
  18814. }
  18815. function ks(e) {
  18816. return function (t) {
  18817. var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  18818. n = function (e) {
  18819. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  18820. 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;
  18821. }({
  18822. customUI: !1,
  18823. loadingOptions: {
  18824. title: "加载中...",
  18825. mask: !0
  18826. },
  18827. errorOptions: {
  18828. type: "modal",
  18829. retry: !1
  18830. }
  18831. }, n);
  18832. var _n13 = n,
  18833. s = _n13.customUI,
  18834. r = _n13.loadingOptions,
  18835. i = _n13.errorOptions,
  18836. o = _n13.parseSystemError,
  18837. a = !s;
  18838. return new Proxy({}, {
  18839. get: function get(s, c) {
  18840. return function () {
  18841. var _ref48 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18842. e = _ref48.fn,
  18843. t = _ref48.interceptorName,
  18844. n = _ref48.getCallbackArgs;
  18845. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee50() {
  18846. var _len2,
  18847. s,
  18848. _key2,
  18849. r,
  18850. i,
  18851. o,
  18852. _args = arguments;
  18853. return _regenerator.default.wrap(function _callee50$(_context50) {
  18854. while (1) {
  18855. switch (_context50.prev = _context50.next) {
  18856. case 0:
  18857. for (_len2 = _args.length, s = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  18858. s[_key2] = _args[_key2];
  18859. }
  18860. r = n ? n({
  18861. params: s
  18862. }) : {};
  18863. _context50.prev = 2;
  18864. _context50.next = 5;
  18865. return M(K(t, "invoke"), _objectSpread({}, r));
  18866. case 5:
  18867. _context50.next = 7;
  18868. return e.apply(void 0, s);
  18869. case 7:
  18870. i = _context50.sent;
  18871. _context50.next = 10;
  18872. return M(K(t, "success"), _objectSpread(_objectSpread({}, r), {}, {
  18873. result: i
  18874. }));
  18875. case 10:
  18876. return _context50.abrupt("return", i);
  18877. case 13:
  18878. _context50.prev = 13;
  18879. _context50.t0 = _context50["catch"](2);
  18880. o = _context50.t0;
  18881. _context50.next = 18;
  18882. return M(K(t, "fail"), _objectSpread(_objectSpread({}, r), {}, {
  18883. error: o
  18884. }));
  18885. case 18:
  18886. throw o;
  18887. case 19:
  18888. _context50.prev = 19;
  18889. _context50.next = 22;
  18890. return M(K(t, "complete"), o ? _objectSpread(_objectSpread({}, r), {}, {
  18891. error: o
  18892. }) : _objectSpread(_objectSpread({}, r), {}, {
  18893. result: i
  18894. }));
  18895. case 22:
  18896. return _context50.finish(19);
  18897. case 23:
  18898. case "end":
  18899. return _context50.stop();
  18900. }
  18901. }
  18902. }, _callee50, null, [[2, 13, 19, 23]]);
  18903. }));
  18904. }({
  18905. fn: function () {
  18906. var _s14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee52() {
  18907. var l,
  18908. _len3,
  18909. u,
  18910. _key3,
  18911. d,
  18912. p,
  18913. _ref50,
  18914. f,
  18915. g,
  18916. m,
  18917. y,
  18918. _e26,
  18919. _yield,
  18920. _t18,
  18921. _n14,
  18922. _args4 = arguments;
  18923. return _regenerator.default.wrap(function _callee52$(_context52) {
  18924. while (1) {
  18925. switch (_context52.prev = _context52.next) {
  18926. case 0:
  18927. a && uni.showLoading({
  18928. title: r.title,
  18929. mask: r.mask
  18930. });
  18931. for (_len3 = _args4.length, u = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  18932. u[_key3] = _args4[_key3];
  18933. }
  18934. d = {
  18935. name: t,
  18936. type: h,
  18937. data: {
  18938. method: c,
  18939. params: u
  18940. }
  18941. };
  18942. "object" == (0, _typeof2.default)(n.secretMethods) && function (e, t) {
  18943. var n = t.data.method,
  18944. s = e.secretMethods || {},
  18945. r = s[n] || s["*"];
  18946. r && (t.secretType = r);
  18947. }(n, d);
  18948. p = !1;
  18949. _context52.prev = 5;
  18950. _context52.next = 8;
  18951. return e.callFunction(d);
  18952. case 8:
  18953. l = _context52.sent;
  18954. _context52.next = 14;
  18955. break;
  18956. case 11:
  18957. _context52.prev = 11;
  18958. _context52.t0 = _context52["catch"](5);
  18959. p = !0, l = {
  18960. result: new se(_context52.t0)
  18961. };
  18962. case 14:
  18963. _ref50 = l.result || {}, f = _ref50.errSubject, g = _ref50.errCode, m = _ref50.errMsg, y = _ref50.newToken;
  18964. if (!(a && uni.hideLoading(), y && y.token && y.tokenExpired && (oe(y), X(z, _objectSpread({}, y))), g)) {
  18965. _context52.next = 39;
  18966. break;
  18967. }
  18968. _e26 = m;
  18969. if (!(p && o)) {
  18970. _context52.next = 24;
  18971. break;
  18972. }
  18973. _context52.next = 20;
  18974. return o({
  18975. objectName: t,
  18976. methodName: c,
  18977. params: u,
  18978. errSubject: f,
  18979. errCode: g,
  18980. errMsg: m
  18981. });
  18982. case 20:
  18983. _context52.t1 = _context52.sent.errMsg;
  18984. if (_context52.t1) {
  18985. _context52.next = 23;
  18986. break;
  18987. }
  18988. _context52.t1 = m;
  18989. case 23:
  18990. _e26 = _context52.t1;
  18991. case 24:
  18992. if (!a) {
  18993. _context52.next = 37;
  18994. break;
  18995. }
  18996. if (!("toast" === i.type)) {
  18997. _context52.next = 29;
  18998. break;
  18999. }
  19000. uni.showToast({
  19001. title: _e26,
  19002. icon: "none"
  19003. });
  19004. _context52.next = 37;
  19005. break;
  19006. case 29:
  19007. if (!("modal" !== i.type)) {
  19008. _context52.next = 31;
  19009. break;
  19010. }
  19011. throw new Error("Invalid errorOptions.type: ".concat(i.type));
  19012. case 31:
  19013. _context52.next = 33;
  19014. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee51() {
  19015. var _ref52,
  19016. e,
  19017. t,
  19018. n,
  19019. s,
  19020. r,
  19021. _args2 = arguments;
  19022. return _regenerator.default.wrap(function _callee51$(_context51) {
  19023. while (1) {
  19024. switch (_context51.prev = _context51.next) {
  19025. case 0:
  19026. _ref52 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, e = _ref52.title, t = _ref52.content, n = _ref52.showCancel, s = _ref52.cancelText, r = _ref52.confirmText;
  19027. return _context51.abrupt("return", new Promise(function (i, o) {
  19028. uni.showModal({
  19029. title: e,
  19030. content: t,
  19031. showCancel: n,
  19032. cancelText: s,
  19033. confirmText: r,
  19034. success: function success(e) {
  19035. i(e);
  19036. },
  19037. fail: function fail() {
  19038. i({
  19039. confirm: !1,
  19040. cancel: !0
  19041. });
  19042. }
  19043. });
  19044. }));
  19045. case 2:
  19046. case "end":
  19047. return _context51.stop();
  19048. }
  19049. }
  19050. }, _callee51);
  19051. }))({
  19052. title: "提示",
  19053. content: _e26,
  19054. showCancel: i.retry,
  19055. cancelText: "取消",
  19056. confirmText: i.retry ? "重试" : "确定"
  19057. });
  19058. case 33:
  19059. _yield = _context52.sent;
  19060. _t18 = _yield.confirm;
  19061. if (!(i.retry && _t18)) {
  19062. _context52.next = 37;
  19063. break;
  19064. }
  19065. return _context52.abrupt("return", s.apply(void 0, u));
  19066. case 37:
  19067. _n14 = new se({
  19068. subject: f,
  19069. code: g,
  19070. message: m,
  19071. requestId: l.requestId
  19072. });
  19073. throw _n14.detail = l.result, X($, {
  19074. type: G,
  19075. content: _n14
  19076. }), _n14;
  19077. case 39:
  19078. return _context52.abrupt("return", (X($, {
  19079. type: G,
  19080. content: l.result
  19081. }), l.result));
  19082. case 40:
  19083. case "end":
  19084. return _context52.stop();
  19085. }
  19086. }
  19087. }, _callee52, null, [[5, 11]]);
  19088. }));
  19089. function s() {
  19090. return _s14.apply(this, arguments);
  19091. }
  19092. return s;
  19093. }(),
  19094. interceptorName: "callObject",
  19095. getCallbackArgs: function getCallbackArgs() {
  19096. var _ref53 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  19097. e = _ref53.params;
  19098. return {
  19099. objectName: t,
  19100. methodName: c,
  19101. params: e
  19102. };
  19103. }
  19104. });
  19105. }
  19106. });
  19107. };
  19108. }
  19109. function Ts(e) {
  19110. return L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e.config.spaceId));
  19111. }
  19112. function Cs() {
  19113. return _Cs.apply(this, arguments);
  19114. }
  19115. function _Cs() {
  19116. _Cs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee55() {
  19117. var _ref65,
  19118. e,
  19119. _ref65$callLoginByWei,
  19120. t,
  19121. n,
  19122. s,
  19123. r,
  19124. _args7 = arguments;
  19125. return _regenerator.default.wrap(function _callee55$(_context55) {
  19126. while (1) {
  19127. switch (_context55.prev = _context55.next) {
  19128. case 0:
  19129. _ref65 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}, e = _ref65.openid, _ref65$callLoginByWei = _ref65.callLoginByWeixin, t = _ref65$callLoginByWei === void 0 ? !1 : _ref65$callLoginByWei;
  19130. n = Ts(this);
  19131. if (!("mp-weixin" !== A)) {
  19132. _context55.next = 4;
  19133. break;
  19134. }
  19135. throw new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `".concat(A, "`"));
  19136. case 4:
  19137. if (!(e && t)) {
  19138. _context55.next = 6;
  19139. break;
  19140. }
  19141. throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");
  19142. case 6:
  19143. if (!e) {
  19144. _context55.next = 8;
  19145. break;
  19146. }
  19147. return _context55.abrupt("return", (n.mpWeixinOpenid = e, {}));
  19148. case 8:
  19149. _context55.next = 10;
  19150. return new Promise(function (e, t) {
  19151. uni.login({
  19152. success: function success(t) {
  19153. e(t.code);
  19154. },
  19155. fail: function fail(e) {
  19156. t(new Error(e.errMsg));
  19157. }
  19158. });
  19159. });
  19160. case 10:
  19161. s = _context55.sent;
  19162. r = this.importObject("uni-id-co", {
  19163. customUI: !0
  19164. });
  19165. _context55.next = 14;
  19166. return r.secureNetworkHandshakeByWeixin({
  19167. code: s,
  19168. callLoginByWeixin: t
  19169. });
  19170. case 14:
  19171. n.mpWeixinCode = s;
  19172. return _context55.abrupt("return", {
  19173. code: s
  19174. });
  19175. case 16:
  19176. case "end":
  19177. return _context55.stop();
  19178. }
  19179. }
  19180. }, _callee55, this);
  19181. }));
  19182. return _Cs.apply(this, arguments);
  19183. }
  19184. function Ps(_x37) {
  19185. return _Ps.apply(this, arguments);
  19186. }
  19187. function _Ps() {
  19188. _Ps = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee56(e) {
  19189. var t;
  19190. return _regenerator.default.wrap(function _callee56$(_context56) {
  19191. while (1) {
  19192. switch (_context56.prev = _context56.next) {
  19193. case 0:
  19194. t = Ts(this);
  19195. return _context56.abrupt("return", (t.initPromise || (t.initPromise = Cs.call(this, e)), t.initPromise));
  19196. case 2:
  19197. case "end":
  19198. return _context56.stop();
  19199. }
  19200. }
  19201. }, _callee56, this);
  19202. }));
  19203. return _Ps.apply(this, arguments);
  19204. }
  19205. function As(e) {
  19206. return function () {
  19207. var _ref54 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  19208. t = _ref54.openid,
  19209. _ref54$callLoginByWei = _ref54.callLoginByWeixin,
  19210. n = _ref54$callLoginByWei === void 0 ? !1 : _ref54$callLoginByWei;
  19211. return Ps.call(e, {
  19212. openid: t,
  19213. callLoginByWeixin: n
  19214. });
  19215. };
  19216. }
  19217. var Es = /*#__PURE__*/function (_ref55) {
  19218. (0, _inherits2.default)(Es, _ref55);
  19219. var _super12 = _createSuper(Es);
  19220. function Es() {
  19221. var _this22;
  19222. (0, _classCallCheck2.default)(this, Es);
  19223. _this22 = _super12.call(this), _this22._uniPushMessageCallback = _this22._receivePushMessage.bind((0, _assertThisInitialized2.default)(_this22)), _this22._currentMessageId = -1, _this22._payloadQueue = [];
  19224. return _this22;
  19225. }
  19226. (0, _createClass2.default)(Es, [{
  19227. key: "init",
  19228. value: function init() {
  19229. var _this23 = this;
  19230. return Promise.all([I("getSystemInfo")(), I("getPushClientId")()]).then(function () {
  19231. var _ref56 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [],
  19232. _ref57 = (0, _slicedToArray2.default)(_ref56, 2),
  19233. _ref57$ = _ref57[0];
  19234. _ref57$ = _ref57$ === void 0 ? {} : _ref57$;
  19235. var e = _ref57$.appId,
  19236. _ref57$2 = _ref57[1];
  19237. _ref57$2 = _ref57$2 === void 0 ? {} : _ref57$2;
  19238. var t = _ref57$2.cid;
  19239. if (!e) throw new Error("Invalid appId, please check the manifest.json file");
  19240. if (!t) throw new Error("Invalid push client id");
  19241. _this23._appId = e, _this23._pushClientId = t, _this23._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), _this23.emit("open"), _this23._initMessageListener();
  19242. }, function (e) {
  19243. throw _this23.emit("error", e), _this23.close(), e;
  19244. });
  19245. }
  19246. }, {
  19247. key: "open",
  19248. value: function () {
  19249. var _open = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee53() {
  19250. return _regenerator.default.wrap(function _callee53$(_context53) {
  19251. while (1) {
  19252. switch (_context53.prev = _context53.next) {
  19253. case 0:
  19254. return _context53.abrupt("return", this.init());
  19255. case 1:
  19256. case "end":
  19257. return _context53.stop();
  19258. }
  19259. }
  19260. }, _callee53, this);
  19261. }));
  19262. function open() {
  19263. return _open.apply(this, arguments);
  19264. }
  19265. return open;
  19266. }()
  19267. }, {
  19268. key: "_isUniCloudSSE",
  19269. value: function _isUniCloudSSE(e) {
  19270. if ("receive" !== e.type) return !1;
  19271. var t = e && e.data && e.data.payload;
  19272. return !(!t || "UNI_CLOUD_SSE" !== t.channel || t.seqId !== this._seqId);
  19273. }
  19274. }, {
  19275. key: "_receivePushMessage",
  19276. value: function _receivePushMessage(e) {
  19277. if (!this._isUniCloudSSE(e)) return;
  19278. var t = e && e.data && e.data.payload,
  19279. n = t.action,
  19280. s = t.messageId,
  19281. r = t.message;
  19282. this._payloadQueue.push({
  19283. action: n,
  19284. messageId: s,
  19285. message: r
  19286. }), this._consumMessage();
  19287. }
  19288. }, {
  19289. key: "_consumMessage",
  19290. value: function _consumMessage() {
  19291. var _this24 = this;
  19292. for (;;) {
  19293. var _e27 = this._payloadQueue.find(function (e) {
  19294. return e.messageId === _this24._currentMessageId + 1;
  19295. });
  19296. if (!_e27) break;
  19297. this._currentMessageId++, this._parseMessagePayload(_e27);
  19298. }
  19299. }
  19300. }, {
  19301. key: "_parseMessagePayload",
  19302. value: function _parseMessagePayload(e) {
  19303. var t = e.action,
  19304. n = e.messageId,
  19305. s = e.message;
  19306. "end" === t ? this._end({
  19307. messageId: n,
  19308. message: s
  19309. }) : "message" === t && this._appendMessage({
  19310. messageId: n,
  19311. message: s
  19312. });
  19313. }
  19314. }, {
  19315. key: "_appendMessage",
  19316. value: function _appendMessage() {
  19317. var _ref58 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  19318. e = _ref58.messageId,
  19319. t = _ref58.message;
  19320. this.emit("message", t);
  19321. }
  19322. }, {
  19323. key: "_end",
  19324. value: function _end() {
  19325. var _ref59 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  19326. e = _ref59.messageId,
  19327. t = _ref59.message;
  19328. this.emit("end", t), this.close();
  19329. }
  19330. }, {
  19331. key: "_initMessageListener",
  19332. value: function _initMessageListener() {
  19333. uni.onPushMessage(this._uniPushMessageCallback);
  19334. }
  19335. }, {
  19336. key: "_destroy",
  19337. value: function _destroy() {
  19338. uni.offPushMessage(this._uniPushMessageCallback);
  19339. }
  19340. }, {
  19341. key: "toJSON",
  19342. value: function toJSON() {
  19343. return {
  19344. appId: this._appId,
  19345. pushClientId: this._pushClientId,
  19346. seqId: this._seqId
  19347. };
  19348. }
  19349. }, {
  19350. key: "close",
  19351. value: function close() {
  19352. this._destroy(), this.emit("close");
  19353. }
  19354. }]);
  19355. return Es;
  19356. }( /*#__PURE__*/function () {
  19357. function _class6() {
  19358. (0, _classCallCheck2.default)(this, _class6);
  19359. this._callback = {};
  19360. }
  19361. (0, _createClass2.default)(_class6, [{
  19362. key: "addListener",
  19363. value: function addListener(e, t) {
  19364. this._callback[e] || (this._callback[e] = []), this._callback[e].push(t);
  19365. }
  19366. }, {
  19367. key: "on",
  19368. value: function on(e, t) {
  19369. return this.addListener(e, t);
  19370. }
  19371. }, {
  19372. key: "removeListener",
  19373. value: function removeListener(e, t) {
  19374. if (!t) throw new Error('The "listener" argument must be of type function. Received undefined');
  19375. var n = this._callback[e];
  19376. if (!n) return;
  19377. var s = function (e, t) {
  19378. for (var _n15 = e.length - 1; _n15 >= 0; _n15--) {
  19379. if (e[_n15] === t) return _n15;
  19380. }
  19381. return -1;
  19382. }(n, t);
  19383. n.splice(s, 1);
  19384. }
  19385. }, {
  19386. key: "off",
  19387. value: function off(e, t) {
  19388. return this.removeListener(e, t);
  19389. }
  19390. }, {
  19391. key: "removeAllListener",
  19392. value: function removeAllListener(e) {
  19393. delete this._callback[e];
  19394. }
  19395. }, {
  19396. key: "emit",
  19397. value: function emit(e) {
  19398. var n = this._callback[e];
  19399. for (var _len4 = arguments.length, t = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  19400. t[_key4 - 1] = arguments[_key4];
  19401. }
  19402. if (n) for (var _e28 = 0; _e28 < n.length; _e28++) {
  19403. n[_e28].apply(n, t);
  19404. }
  19405. }
  19406. }]);
  19407. return _class6;
  19408. }());
  19409. function Os(_x38, _x39) {
  19410. return _Os.apply(this, arguments);
  19411. }
  19412. function _Os() {
  19413. _Os = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee57(e, t) {
  19414. var n, _e32, s;
  19415. return _regenerator.default.wrap(function _callee57$(_context57) {
  19416. while (1) {
  19417. switch (_context57.prev = _context57.next) {
  19418. case 0:
  19419. n = "http://".concat(e, ":").concat(t, "/system/ping");
  19420. _context57.prev = 1;
  19421. _context57.next = 4;
  19422. return s = {
  19423. url: n,
  19424. timeout: 500
  19425. }, new Promise(function (e, t) {
  19426. re.request(_objectSpread(_objectSpread({}, s), {}, {
  19427. success: function success(t) {
  19428. e(t);
  19429. },
  19430. fail: function fail(e) {
  19431. t(e);
  19432. }
  19433. }));
  19434. });
  19435. case 4:
  19436. _e32 = _context57.sent;
  19437. return _context57.abrupt("return", !(!_e32.data || 0 !== _e32.data.code));
  19438. case 8:
  19439. _context57.prev = 8;
  19440. _context57.t0 = _context57["catch"](1);
  19441. return _context57.abrupt("return", !1);
  19442. case 11:
  19443. case "end":
  19444. return _context57.stop();
  19445. }
  19446. }
  19447. }, _callee57, null, [[1, 8]]);
  19448. }));
  19449. return _Os.apply(this, arguments);
  19450. }
  19451. function xs(_x40) {
  19452. return _xs.apply(this, arguments);
  19453. }
  19454. function _xs() {
  19455. _xs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(e) {
  19456. var _ue2, _e33, _t20, t, _t$debugInfo, n, s, _yield2, r, i, o;
  19457. return _regenerator.default.wrap(function _callee59$(_context59) {
  19458. while (1) {
  19459. switch (_context59.prev = _context59.next) {
  19460. case 0:
  19461. if (k) {
  19462. _context59.next = 2;
  19463. break;
  19464. }
  19465. return _context59.abrupt("return", Promise.resolve());
  19466. case 2:
  19467. if ("app" === A) {
  19468. _ue2 = ue(), _e33 = _ue2.osName, _t20 = _ue2.osVersion;
  19469. "ios" === _e33 && function (e) {
  19470. if (!e || "string" != typeof e) return 0;
  19471. var t = e.match(/^(\d+)./);
  19472. return t && t[1] ? parseInt(t[1]) : 0;
  19473. }(_t20) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发模式生效,发行模式会连接uniCloud云端服务)");
  19474. }
  19475. t = e.__dev__;
  19476. if (t.debugInfo) {
  19477. _context59.next = 6;
  19478. break;
  19479. }
  19480. return _context59.abrupt("return");
  19481. case 6:
  19482. _t$debugInfo = t.debugInfo;
  19483. n = _t$debugInfo.address;
  19484. s = _t$debugInfo.servePort;
  19485. _context59.next = 11;
  19486. return function () {
  19487. var _ref66 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee58(e, t) {
  19488. var n, _s15, _r8;
  19489. return _regenerator.default.wrap(function _callee58$(_context58) {
  19490. while (1) {
  19491. switch (_context58.prev = _context58.next) {
  19492. case 0:
  19493. _s15 = 0;
  19494. case 1:
  19495. if (!(_s15 < e.length)) {
  19496. _context58.next = 11;
  19497. break;
  19498. }
  19499. _r8 = e[_s15];
  19500. _context58.next = 5;
  19501. return Os(_r8, t);
  19502. case 5:
  19503. if (!_context58.sent) {
  19504. _context58.next = 8;
  19505. break;
  19506. }
  19507. n = _r8;
  19508. return _context58.abrupt("break", 11);
  19509. case 8:
  19510. _s15++;
  19511. _context58.next = 1;
  19512. break;
  19513. case 11:
  19514. return _context58.abrupt("return", {
  19515. address: n,
  19516. port: t
  19517. });
  19518. case 12:
  19519. case "end":
  19520. return _context58.stop();
  19521. }
  19522. }
  19523. }, _callee58);
  19524. }));
  19525. return function (_x41, _x42) {
  19526. return _ref66.apply(this, arguments);
  19527. };
  19528. }()(n, s);
  19529. case 11:
  19530. _yield2 = _context59.sent;
  19531. r = _yield2.address;
  19532. if (!r) {
  19533. _context59.next = 15;
  19534. break;
  19535. }
  19536. return _context59.abrupt("return", (t.localAddress = r, void (t.localPort = s)));
  19537. case 15:
  19538. i = console["app" === A ? "error" : "warn"];
  19539. o = "";
  19540. 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" === A && (o += "\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"), 0 === A.indexOf("mp-") && (o += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t.debugInfo.forceRemote)) {
  19541. _context59.next = 19;
  19542. break;
  19543. }
  19544. throw new Error(o);
  19545. case 19:
  19546. i(o);
  19547. case 20:
  19548. case "end":
  19549. return _context59.stop();
  19550. }
  19551. }
  19552. }, _callee59);
  19553. }));
  19554. return _xs.apply(this, arguments);
  19555. }
  19556. function Rs(e) {
  19557. e._initPromiseHub || (e._initPromiseHub = new S({
  19558. createPromise: function createPromise() {
  19559. var t = Promise.resolve();
  19560. var n;
  19561. n = 1, t = new Promise(function (e) {
  19562. setTimeout(function () {
  19563. e();
  19564. }, n);
  19565. });
  19566. var s = e.auth();
  19567. return t.then(function () {
  19568. return s.getLoginState();
  19569. }).then(function (e) {
  19570. return e ? Promise.resolve() : s.signInAnonymously();
  19571. });
  19572. }
  19573. }));
  19574. }
  19575. var Us = {
  19576. tcb: It,
  19577. tencent: It,
  19578. aliyun: me,
  19579. private: kt
  19580. };
  19581. var Ls = new ( /*#__PURE__*/function () {
  19582. function _class7() {
  19583. (0, _classCallCheck2.default)(this, _class7);
  19584. }
  19585. (0, _createClass2.default)(_class7, [{
  19586. key: "init",
  19587. value: function init(e) {
  19588. var t = {};
  19589. var n = Us[e.provider];
  19590. if (!n) throw new Error("未提供正确的provider参数");
  19591. t = n.init(e), k && function (e) {
  19592. if (!k) return;
  19593. var t = {};
  19594. e.__dev__ = t, t.debugLog = k && ("web" === A && navigator.userAgent.indexOf("HBuilderX") > 0 || "app" === A);
  19595. var n = E;
  19596. n && !n.code && (t.debugInfo = n);
  19597. var s = new S({
  19598. createPromise: function createPromise() {
  19599. return xs(e);
  19600. }
  19601. });
  19602. t.initLocalNetwork = function () {
  19603. return s.exec();
  19604. };
  19605. }(t), Rs(t), Rn(t), function (e) {
  19606. var t = e.uploadFile;
  19607. e.uploadFile = function (e) {
  19608. return t.call(this, e);
  19609. };
  19610. }(t), function (e) {
  19611. e.database = function (t) {
  19612. if (t && Object.keys(t).length > 0) return e.init(t).database();
  19613. if (this._database) return this._database;
  19614. var n = $n(Wn, {
  19615. uniClient: e
  19616. });
  19617. return this._database = n, n;
  19618. }, e.databaseForJQL = function (t) {
  19619. if (t && Object.keys(t).length > 0) return e.init(t).databaseForJQL();
  19620. if (this._databaseForJQL) return this._databaseForJQL;
  19621. var n = $n(Wn, {
  19622. uniClient: e,
  19623. isJQL: !0
  19624. });
  19625. return this._databaseForJQL = n, n;
  19626. };
  19627. }(t), function (e) {
  19628. e.getCurrentUserInfo = ws, e.chooseAndUploadFile = Ss.initChooseAndUploadFile(e), Object.assign(e, {
  19629. get mixinDatacom() {
  19630. return bs(e);
  19631. }
  19632. }), e.SSEChannel = Es, e.initSecureNetworkByWeixin = As(e), e.importObject = ks(e);
  19633. }(t);
  19634. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach(function (e) {
  19635. if (!t[e]) return;
  19636. var n = t[e];
  19637. t[e] = function () {
  19638. return n.apply(t, Array.from(arguments));
  19639. }, t[e] = function (e, t) {
  19640. return function (n) {
  19641. var _this25 = this;
  19642. var s = !1;
  19643. if ("callFunction" === t) {
  19644. var _e29 = n && n.type || u;
  19645. s = _e29 !== u;
  19646. }
  19647. var r = "callFunction" === t && !s,
  19648. i = this._initPromiseHub.exec();
  19649. n = n || {};
  19650. var _ne2 = ne(n),
  19651. o = _ne2.success,
  19652. a = _ne2.fail,
  19653. c = _ne2.complete,
  19654. h = i.then(function () {
  19655. return s ? Promise.resolve() : M(K(t, "invoke"), n);
  19656. }).then(function () {
  19657. return e.call(_this25, n);
  19658. }).then(function (e) {
  19659. return s ? Promise.resolve(e) : M(K(t, "success"), e).then(function () {
  19660. return M(K(t, "complete"), e);
  19661. }).then(function () {
  19662. return r && X($, {
  19663. type: H,
  19664. content: e
  19665. }), Promise.resolve(e);
  19666. });
  19667. }, function (e) {
  19668. return s ? Promise.reject(e) : M(K(t, "fail"), e).then(function () {
  19669. return M(K(t, "complete"), e);
  19670. }).then(function () {
  19671. return X($, {
  19672. type: H,
  19673. content: e
  19674. }), Promise.reject(e);
  19675. });
  19676. });
  19677. if (!(o || a || c)) return h;
  19678. h.then(function (e) {
  19679. o && o(e), c && c(e), r && X($, {
  19680. type: H,
  19681. content: e
  19682. });
  19683. }, function (e) {
  19684. a && a(e), c && c(e), r && X($, {
  19685. type: H,
  19686. content: e
  19687. });
  19688. });
  19689. };
  19690. }(t[e], e).bind(t);
  19691. }), t.init = this.init, t;
  19692. }
  19693. }]);
  19694. return _class7;
  19695. }())();
  19696. (function () {
  19697. var e = O;
  19698. var t = {};
  19699. if (e && 1 === e.length) t = e[0], Ls = Ls.init(t), Ls._isDefault = !0;else {
  19700. var _t19 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  19701. var _n16;
  19702. _n16 = e && e.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : x ? "应用未关联服务空间,请在uniCloud目录右键关联服务空间" : "uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间", _t19.forEach(function (e) {
  19703. Ls[e] = function () {
  19704. return console.error(_n16), Promise.reject(new se({
  19705. code: "SYS_ERR",
  19706. message: _n16
  19707. }));
  19708. };
  19709. });
  19710. }
  19711. Object.assign(Ls, {
  19712. get mixinDatacom() {
  19713. return bs(Ls);
  19714. }
  19715. }), gs(Ls), Ls.addInterceptor = F, Ls.removeInterceptor = q, Ls.interceptObject = j, k && "web" === A && (window.uniCloud = Ls);
  19716. })();
  19717. var Ns = Ls;
  19718. exports.default = Ns;
  19719. /* 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"]))
  19720. /***/ }),
  19721. /***/ 414:
  19722. /*!****************************************************************!*\
  19723. !*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
  19724. \****************************************************************/
  19725. /*! no static exports found */
  19726. /***/ (function(module, exports, __webpack_require__) {
  19727. var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ 397);
  19728. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  19729. var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ 415);
  19730. var construct = __webpack_require__(/*! ./construct.js */ 15);
  19731. function _wrapNativeSuper(Class) {
  19732. var _cache = typeof Map === "function" ? new Map() : undefined;
  19733. module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
  19734. if (Class === null || !isNativeFunction(Class)) return Class;
  19735. if (typeof Class !== "function") {
  19736. throw new TypeError("Super expression must either be null or a function");
  19737. }
  19738. if (typeof _cache !== "undefined") {
  19739. if (_cache.has(Class)) return _cache.get(Class);
  19740. _cache.set(Class, Wrapper);
  19741. }
  19742. function Wrapper() {
  19743. return construct(Class, arguments, getPrototypeOf(this).constructor);
  19744. }
  19745. Wrapper.prototype = Object.create(Class.prototype, {
  19746. constructor: {
  19747. value: Wrapper,
  19748. enumerable: false,
  19749. writable: true,
  19750. configurable: true
  19751. }
  19752. });
  19753. return setPrototypeOf(Wrapper, Class);
  19754. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  19755. return _wrapNativeSuper(Class);
  19756. }
  19757. module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
  19758. /***/ }),
  19759. /***/ 415:
  19760. /*!*****************************************************************!*\
  19761. !*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
  19762. \*****************************************************************/
  19763. /*! no static exports found */
  19764. /***/ (function(module, exports) {
  19765. function _isNativeFunction(fn) {
  19766. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  19767. }
  19768. module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
  19769. /***/ }),
  19770. /***/ 416:
  19771. /*!*******************************************************************!*\
  19772. !*** E:/项目资料/智慧社区/Applet/pages.json?{"type":"origin-pages-json"} ***!
  19773. \*******************************************************************/
  19774. /*! no static exports found */
  19775. /***/ (function(module, exports, __webpack_require__) {
  19776. "use strict";
  19777. Object.defineProperty(exports, "__esModule", {
  19778. value: true
  19779. });
  19780. exports.default = void 0;
  19781. var _default = {
  19782. "pages": [{
  19783. "path": "pages/index/index",
  19784. "style": {
  19785. "navigationBarTitleText": "首页"
  19786. }
  19787. }, {
  19788. "path": "pages/my/index",
  19789. "style": {
  19790. "navigationBarTitleText": "个人中心"
  19791. }
  19792. }, {
  19793. "path": "pages/service/index",
  19794. "style": {
  19795. "navigationBarTitleText": "政务服务"
  19796. }
  19797. }, {
  19798. "path": "pages/policy/index",
  19799. "style": {
  19800. "navigationBarTitleText": "风采展示",
  19801. "enablePullDownRefresh": true
  19802. }
  19803. }, {
  19804. "path": "pages/illness/index",
  19805. "style": {
  19806. "navigationBarTitleText": "关爱行动"
  19807. }
  19808. }, {
  19809. "path": "pages/illness/vaccines",
  19810. "style": {
  19811. "navigationBarTitleText": "疫苗接种点"
  19812. }
  19813. }, {
  19814. "path": "pages/illness/receive",
  19815. "style": {
  19816. "navigationBarTitleText": "家庭成员"
  19817. }
  19818. }, {
  19819. "path": "pages/illness/testingRoom",
  19820. "style": {
  19821. "navigationBarTitleText": "检测点查询"
  19822. }
  19823. }, {
  19824. "path": "pages/illness/testingRoomList",
  19825. "style": {
  19826. "navigationBarTitleText": "检测点列表"
  19827. }
  19828. }, {
  19829. "path": "pages/details/index",
  19830. "style": {
  19831. "navigationBarTitleText": "文章详情"
  19832. }
  19833. }, {
  19834. "path": "pages/details/cmsinfo",
  19835. "style": {
  19836. "navigationBarTitleText": "详情",
  19837. "navigationStyle": "custom"
  19838. }
  19839. }, {
  19840. "path": "pages/notice/index",
  19841. "style": {
  19842. "navigationBarTitleText": "通知公告"
  19843. }
  19844. }, {
  19845. "path": "pages/user/index",
  19846. "style": {
  19847. "navigationBarTitleText": "个人资料"
  19848. }
  19849. }, {
  19850. "path": "pages/user/familyInfo",
  19851. "style": {
  19852. "navigationBarTitleText": "成员资料"
  19853. }
  19854. }, {
  19855. "path": "pages/register/index",
  19856. "style": {
  19857. "navigationBarTitleText": "注册用户"
  19858. }
  19859. }, {
  19860. "path": "pages/questionnaire/index",
  19861. "style": {
  19862. "navigationBarTitleText": "问卷调查"
  19863. }
  19864. }, {
  19865. "path": "pages/questionnaire/details",
  19866. "style": {
  19867. "navigationBarTitleText": "问卷调查详情"
  19868. }
  19869. }, {
  19870. "path": "pages/questionnaire/web",
  19871. "style": {
  19872. "navigationBarTitleText": "问卷调查"
  19873. }
  19874. }, {
  19875. "path": "pages/integral/index",
  19876. "style": {
  19877. "navigationBarTitleText": "我的积分"
  19878. }
  19879. }, {
  19880. "path": "pages/activity/index",
  19881. "style": {
  19882. "navigationBarTitleText": "活动列表"
  19883. }
  19884. }, {
  19885. "path": "pages/activity/details",
  19886. "style": {
  19887. "navigationBarTitleText": "活动详情"
  19888. }
  19889. }, {
  19890. "path": "pages/activity/uploadFiel",
  19891. "style": {
  19892. "navigationBarTitleText": "获取积分"
  19893. }
  19894. }, {
  19895. "path": "pages/property/index",
  19896. "style": {
  19897. "navigationBarTitleText": "红色物业"
  19898. }
  19899. }, {
  19900. "path": "pages/property/butlerType",
  19901. "style": {
  19902. "navigationBarTitleText": "红管家风采展示"
  19903. }
  19904. }, {
  19905. "path": "pages/property/butler",
  19906. "style": {
  19907. "navigationBarTitleText": "红管家风采展示"
  19908. }
  19909. }, {
  19910. "path": "pages/report/index",
  19911. "style": {
  19912. "navigationBarTitleText": "下沉干部报到"
  19913. }
  19914. }, {
  19915. "path": "pages/report/double",
  19916. "style": {
  19917. "navigationBarTitleText": "党员“双报到”"
  19918. }
  19919. }, {
  19920. "path": "pages/report/service",
  19921. "style": {
  19922. "navigationBarTitleText": "服务签到"
  19923. }
  19924. }, {
  19925. "path": "pages/recruit/index",
  19926. "style": {
  19927. "navigationBarTitleText": "应急招募"
  19928. }
  19929. }, {
  19930. "path": "pages/recruit/details",
  19931. "style": {
  19932. "navigationBarTitleText": "招募详情"
  19933. }
  19934. }, {
  19935. "path": "pages/goods/index",
  19936. "style": {
  19937. "navigationBarTitleText": "积分商城"
  19938. }
  19939. }, {
  19940. "path": "pages/goods/details",
  19941. "style": {
  19942. "navigationBarTitleText": "代金券详情"
  19943. }
  19944. }, {
  19945. "path": "pages/goods/my",
  19946. "style": {
  19947. "navigationBarTitleText": "我的代金券"
  19948. }
  19949. }],
  19950. "globalStyle": {
  19951. "navigationBarTextStyle": "#fff",
  19952. "navigationBarTitleText": "uni-app",
  19953. "navigationBarBackgroundColor": "#c60814",
  19954. "backgroundColor": "#fff",
  19955. "app-plus": {
  19956. "background": "#efeff4"
  19957. }
  19958. },
  19959. "tabBar": {
  19960. "color": "#7A7E83",
  19961. "selectedColor": "#3cc51f",
  19962. "borderStyle": "black",
  19963. "backgroundColor": "#ffffff",
  19964. "list": [{
  19965. "pagePath": "pages/index/index",
  19966. "iconPath": "static/home1.png",
  19967. "selectedIconPath": "static/home2.png",
  19968. "text": "首页"
  19969. }, {
  19970. "pagePath": "pages/service/index",
  19971. "iconPath": "static/service1.png",
  19972. "selectedIconPath": "static/service2.png",
  19973. "text": "政务服务"
  19974. }, {
  19975. "pagePath": "pages/policy/index",
  19976. "iconPath": "static/policy1.png",
  19977. "selectedIconPath": "static/policy2.png",
  19978. "text": "风采展示"
  19979. }, {
  19980. "pagePath": "pages/my/index",
  19981. "iconPath": "static/user1.png",
  19982. "selectedIconPath": "static/user2.png",
  19983. "text": "我的"
  19984. }]
  19985. }
  19986. };
  19987. exports.default = _default;
  19988. /***/ }),
  19989. /***/ 417:
  19990. /*!******************************************************!*\
  19991. !*** E:/项目资料/智慧社区/Applet/pages.json?{"type":"stat"} ***!
  19992. \******************************************************/
  19993. /*! no static exports found */
  19994. /***/ (function(module, exports, __webpack_require__) {
  19995. "use strict";
  19996. Object.defineProperty(exports, "__esModule", {
  19997. value: true
  19998. });
  19999. exports.default = void 0;
  20000. var _default = {
  20001. "appid": "__UNI__6047036"
  20002. };
  20003. exports.default = _default;
  20004. /***/ }),
  20005. /***/ 42:
  20006. /*!*****************************************************************!*\
  20007. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  20008. \*****************************************************************/
  20009. /*! no static exports found */
  20010. /***/ (function(module, exports) {
  20011. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  20012. try {
  20013. var info = gen[key](arg);
  20014. var value = info.value;
  20015. } catch (error) {
  20016. reject(error);
  20017. return;
  20018. }
  20019. if (info.done) {
  20020. resolve(value);
  20021. } else {
  20022. Promise.resolve(value).then(_next, _throw);
  20023. }
  20024. }
  20025. function _asyncToGenerator(fn) {
  20026. return function () {
  20027. var self = this,
  20028. args = arguments;
  20029. return new Promise(function (resolve, reject) {
  20030. var gen = fn.apply(self, args);
  20031. function _next(value) {
  20032. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  20033. }
  20034. function _throw(err) {
  20035. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  20036. }
  20037. _next(undefined);
  20038. });
  20039. };
  20040. }
  20041. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20042. /***/ }),
  20043. /***/ 425:
  20044. /*!********************************************************************************************************!*\
  20045. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js ***!
  20046. \********************************************************************************************************/
  20047. /*! no static exports found */
  20048. /***/ (function(module, exports, __webpack_require__) {
  20049. "use strict";
  20050. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  20051. Object.defineProperty(exports, "__esModule", {
  20052. value: true
  20053. });
  20054. exports.default = void 0;
  20055. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 426));
  20056. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 427));
  20057. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 428));
  20058. var _default = {
  20059. en: _en.default,
  20060. 'zh-Hans': _zhHans.default,
  20061. 'zh-Hant': _zhHant.default
  20062. };
  20063. exports.default = _default;
  20064. /***/ }),
  20065. /***/ 426:
  20066. /*!*******************************************************************************************************!*\
  20067. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json ***!
  20068. \*******************************************************************************************************/
  20069. /*! exports provided: uni-datetime-picker.selectDate, uni-datetime-picker.selectTime, uni-datetime-picker.selectDateTime, uni-datetime-picker.startDate, uni-datetime-picker.endDate, uni-datetime-picker.startTime, uni-datetime-picker.endTime, uni-datetime-picker.ok, uni-datetime-picker.clear, uni-datetime-picker.cancel, uni-datetime-picker.year, uni-datetime-picker.month, uni-calender.MON, uni-calender.TUE, uni-calender.WED, uni-calender.THU, uni-calender.FRI, uni-calender.SAT, uni-calender.SUN, uni-calender.confirm, default */
  20070. /***/ (function(module) {
  20071. module.exports = JSON.parse("{\"uni-datetime-picker.selectDate\":\"select date\",\"uni-datetime-picker.selectTime\":\"select time\",\"uni-datetime-picker.selectDateTime\":\"select datetime\",\"uni-datetime-picker.startDate\":\"start date\",\"uni-datetime-picker.endDate\":\"end date\",\"uni-datetime-picker.startTime\":\"start time\",\"uni-datetime-picker.endTime\":\"end time\",\"uni-datetime-picker.ok\":\"ok\",\"uni-datetime-picker.clear\":\"clear\",\"uni-datetime-picker.cancel\":\"cancel\",\"uni-datetime-picker.year\":\"-\",\"uni-datetime-picker.month\":\"\",\"uni-calender.MON\":\"MON\",\"uni-calender.TUE\":\"TUE\",\"uni-calender.WED\":\"WED\",\"uni-calender.THU\":\"THU\",\"uni-calender.FRI\":\"FRI\",\"uni-calender.SAT\":\"SAT\",\"uni-calender.SUN\":\"SUN\",\"uni-calender.confirm\":\"confirm\"}");
  20072. /***/ }),
  20073. /***/ 427:
  20074. /*!************************************************************************************************************!*\
  20075. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json ***!
  20076. \************************************************************************************************************/
  20077. /*! exports provided: uni-datetime-picker.selectDate, uni-datetime-picker.selectTime, uni-datetime-picker.selectDateTime, uni-datetime-picker.startDate, uni-datetime-picker.endDate, uni-datetime-picker.startTime, uni-datetime-picker.endTime, uni-datetime-picker.ok, uni-datetime-picker.clear, uni-datetime-picker.cancel, uni-datetime-picker.year, uni-datetime-picker.month, uni-calender.SUN, uni-calender.MON, uni-calender.TUE, uni-calender.WED, uni-calender.THU, uni-calender.FRI, uni-calender.SAT, uni-calender.confirm, default */
  20078. /***/ (function(module) {
  20079. module.exports = JSON.parse("{\"uni-datetime-picker.selectDate\":\"选择日期\",\"uni-datetime-picker.selectTime\":\"选择时间\",\"uni-datetime-picker.selectDateTime\":\"选择日期时间\",\"uni-datetime-picker.startDate\":\"开始日期\",\"uni-datetime-picker.endDate\":\"结束日期\",\"uni-datetime-picker.startTime\":\"开始时间\",\"uni-datetime-picker.endTime\":\"结束时间\",\"uni-datetime-picker.ok\":\"确定\",\"uni-datetime-picker.clear\":\"清除\",\"uni-datetime-picker.cancel\":\"取消\",\"uni-datetime-picker.year\":\"年\",\"uni-datetime-picker.month\":\"月\",\"uni-calender.SUN\":\"日\",\"uni-calender.MON\":\"一\",\"uni-calender.TUE\":\"二\",\"uni-calender.WED\":\"三\",\"uni-calender.THU\":\"四\",\"uni-calender.FRI\":\"五\",\"uni-calender.SAT\":\"六\",\"uni-calender.confirm\":\"确认\"}");
  20080. /***/ }),
  20081. /***/ 428:
  20082. /*!************************************************************************************************************!*\
  20083. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json ***!
  20084. \************************************************************************************************************/
  20085. /*! exports provided: uni-datetime-picker.selectDate, uni-datetime-picker.selectTime, uni-datetime-picker.selectDateTime, uni-datetime-picker.startDate, uni-datetime-picker.endDate, uni-datetime-picker.startTime, uni-datetime-picker.endTime, uni-datetime-picker.ok, uni-datetime-picker.clear, uni-datetime-picker.cancel, uni-datetime-picker.year, uni-datetime-picker.month, uni-calender.SUN, uni-calender.MON, uni-calender.TUE, uni-calender.WED, uni-calender.THU, uni-calender.FRI, uni-calender.SAT, uni-calender.confirm, default */
  20086. /***/ (function(module) {
  20087. module.exports = JSON.parse("{\"uni-datetime-picker.selectDate\":\"選擇日期\",\"uni-datetime-picker.selectTime\":\"選擇時間\",\"uni-datetime-picker.selectDateTime\":\"選擇日期時間\",\"uni-datetime-picker.startDate\":\"開始日期\",\"uni-datetime-picker.endDate\":\"結束日期\",\"uni-datetime-picker.startTime\":\"開始时间\",\"uni-datetime-picker.endTime\":\"結束时间\",\"uni-datetime-picker.ok\":\"確定\",\"uni-datetime-picker.clear\":\"清除\",\"uni-datetime-picker.cancel\":\"取消\",\"uni-datetime-picker.year\":\"年\",\"uni-datetime-picker.month\":\"月\",\"uni-calender.SUN\":\"日\",\"uni-calender.MON\":\"一\",\"uni-calender.TUE\":\"二\",\"uni-calender.WED\":\"三\",\"uni-calender.THU\":\"四\",\"uni-calender.FRI\":\"五\",\"uni-calender.SAT\":\"六\",\"uni-calender.confirm\":\"確認\"}");
  20088. /***/ }),
  20089. /***/ 43:
  20090. /*!*****************************************!*\
  20091. !*** E:/项目资料/智慧社区/Applet/api/system.js ***!
  20092. \*****************************************/
  20093. /*! no static exports found */
  20094. /***/ (function(module, exports, __webpack_require__) {
  20095. "use strict";
  20096. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  20097. Object.defineProperty(exports, "__esModule", {
  20098. value: true
  20099. });
  20100. exports.default = void 0;
  20101. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  20102. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  20103. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  20104. var getSystemNoticeList = /*#__PURE__*/function () {
  20105. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
  20106. var res;
  20107. return _regenerator.default.wrap(function _callee$(_context) {
  20108. while (1) {
  20109. switch (_context.prev = _context.next) {
  20110. case 0:
  20111. _context.next = 2;
  20112. return _request.default.get({
  20113. url: "/system/notice/list",
  20114. data: data
  20115. });
  20116. case 2:
  20117. res = _context.sent;
  20118. return _context.abrupt("return", res.data);
  20119. case 4:
  20120. case "end":
  20121. return _context.stop();
  20122. }
  20123. }
  20124. }, _callee);
  20125. }));
  20126. return function getSystemNoticeList(_x) {
  20127. return _ref.apply(this, arguments);
  20128. };
  20129. }();
  20130. var getSystemNoticeNew = /*#__PURE__*/function () {
  20131. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(data) {
  20132. var res;
  20133. return _regenerator.default.wrap(function _callee2$(_context2) {
  20134. while (1) {
  20135. switch (_context2.prev = _context2.next) {
  20136. case 0:
  20137. _context2.next = 2;
  20138. return _request.default.get({
  20139. url: '/system/notice/newest'
  20140. });
  20141. case 2:
  20142. res = _context2.sent;
  20143. return _context2.abrupt("return", res.data);
  20144. case 4:
  20145. case "end":
  20146. return _context2.stop();
  20147. }
  20148. }
  20149. }, _callee2);
  20150. }));
  20151. return function getSystemNoticeNew(_x2) {
  20152. return _ref2.apply(this, arguments);
  20153. };
  20154. }();
  20155. var getSystemNoticeDetails = /*#__PURE__*/function () {
  20156. var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(_ref3) {
  20157. var id, res;
  20158. return _regenerator.default.wrap(function _callee3$(_context3) {
  20159. while (1) {
  20160. switch (_context3.prev = _context3.next) {
  20161. case 0:
  20162. id = _ref3.id;
  20163. _context3.next = 3;
  20164. return _request.default.get({
  20165. url: "/system/notice/".concat(id)
  20166. });
  20167. case 3:
  20168. res = _context3.sent;
  20169. return _context3.abrupt("return", res.data);
  20170. case 5:
  20171. case "end":
  20172. return _context3.stop();
  20173. }
  20174. }
  20175. }, _callee3);
  20176. }));
  20177. return function getSystemNoticeDetails(_x3) {
  20178. return _ref4.apply(this, arguments);
  20179. };
  20180. }();
  20181. var _default = {
  20182. getSystemNoticeList: getSystemNoticeList,
  20183. getSystemNoticeNew: getSystemNoticeNew,
  20184. getSystemNoticeDetails: getSystemNoticeDetails
  20185. };
  20186. exports.default = _default;
  20187. /***/ }),
  20188. /***/ 436:
  20189. /*!*********************************************************************************************************!*\
  20190. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-picker.js ***!
  20191. \*********************************************************************************************************/
  20192. /*! no static exports found */
  20193. /***/ (function(module, exports, __webpack_require__) {
  20194. "use strict";
  20195. /* WEBPACK VAR INJECTION */(function(uniCloud) {
  20196. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  20197. Object.defineProperty(exports, "__esModule", {
  20198. value: true
  20199. });
  20200. exports.default = void 0;
  20201. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  20202. var _default2 = {
  20203. props: {
  20204. localdata: {
  20205. type: [Array, Object],
  20206. default: function _default() {
  20207. return [];
  20208. }
  20209. },
  20210. spaceInfo: {
  20211. type: Object,
  20212. default: function _default() {
  20213. return {};
  20214. }
  20215. },
  20216. collection: {
  20217. type: String,
  20218. default: ''
  20219. },
  20220. action: {
  20221. type: String,
  20222. default: ''
  20223. },
  20224. field: {
  20225. type: String,
  20226. default: ''
  20227. },
  20228. orderby: {
  20229. type: String,
  20230. default: ''
  20231. },
  20232. where: {
  20233. type: [String, Object],
  20234. default: ''
  20235. },
  20236. pageData: {
  20237. type: String,
  20238. default: 'add'
  20239. },
  20240. pageCurrent: {
  20241. type: Number,
  20242. default: 1
  20243. },
  20244. pageSize: {
  20245. type: Number,
  20246. default: 20
  20247. },
  20248. getcount: {
  20249. type: [Boolean, String],
  20250. default: false
  20251. },
  20252. getone: {
  20253. type: [Boolean, String],
  20254. default: false
  20255. },
  20256. gettree: {
  20257. type: [Boolean, String],
  20258. default: false
  20259. },
  20260. manual: {
  20261. type: Boolean,
  20262. default: false
  20263. },
  20264. value: {
  20265. type: [Array, String, Number],
  20266. default: function _default() {
  20267. return [];
  20268. }
  20269. },
  20270. modelValue: {
  20271. type: [Array, String, Number],
  20272. default: function _default() {
  20273. return [];
  20274. }
  20275. },
  20276. preload: {
  20277. type: Boolean,
  20278. default: false
  20279. },
  20280. stepSearh: {
  20281. type: Boolean,
  20282. default: true
  20283. },
  20284. selfField: {
  20285. type: String,
  20286. default: ''
  20287. },
  20288. parentField: {
  20289. type: String,
  20290. default: ''
  20291. },
  20292. multiple: {
  20293. type: Boolean,
  20294. default: false
  20295. },
  20296. map: {
  20297. type: Object,
  20298. default: function _default() {
  20299. return {
  20300. text: "text",
  20301. value: "value"
  20302. };
  20303. }
  20304. }
  20305. },
  20306. data: function data() {
  20307. return {
  20308. loading: false,
  20309. errorMessage: '',
  20310. loadMore: {
  20311. contentdown: '',
  20312. contentrefresh: '',
  20313. contentnomore: ''
  20314. },
  20315. dataList: [],
  20316. selected: [],
  20317. selectedIndex: 0,
  20318. page: {
  20319. current: this.pageCurrent,
  20320. size: this.pageSize,
  20321. count: 0
  20322. }
  20323. };
  20324. },
  20325. computed: {
  20326. isLocaldata: function isLocaldata() {
  20327. return !this.collection.length;
  20328. },
  20329. postField: function postField() {
  20330. var fields = [this.field];
  20331. if (this.parentField) {
  20332. fields.push("".concat(this.parentField, " as parent_value"));
  20333. }
  20334. return fields.join(',');
  20335. },
  20336. dataValue: function dataValue() {
  20337. var isModelValue = Array.isArray(this.modelValue) ? this.modelValue.length > 0 : this.modelValue !== null || this.modelValue !== undefined;
  20338. return isModelValue ? this.modelValue : this.value;
  20339. },
  20340. hasValue: function hasValue() {
  20341. if (typeof this.dataValue === 'number') {
  20342. return true;
  20343. }
  20344. return this.dataValue != null && this.dataValue.length > 0;
  20345. }
  20346. },
  20347. created: function created() {
  20348. var _this = this;
  20349. this.$watch(function () {
  20350. var al = [];
  20351. ['pageCurrent', 'pageSize', 'spaceInfo', 'value', 'modelValue', 'localdata', 'collection', 'action', 'field', 'orderby', 'where', 'getont', 'getcount', 'gettree'].forEach(function (key) {
  20352. al.push(_this[key]);
  20353. });
  20354. return al;
  20355. }, function (newValue, oldValue) {
  20356. var needReset = false;
  20357. for (var i = 2; i < newValue.length; i++) {
  20358. if (newValue[i] != oldValue[i]) {
  20359. needReset = true;
  20360. break;
  20361. }
  20362. }
  20363. if (newValue[0] != oldValue[0]) {
  20364. _this.page.current = _this.pageCurrent;
  20365. }
  20366. _this.page.size = _this.pageSize;
  20367. _this.onPropsChange();
  20368. });
  20369. this._treeData = [];
  20370. },
  20371. methods: {
  20372. onPropsChange: function onPropsChange() {
  20373. this._treeData = [];
  20374. },
  20375. getCommand: function getCommand() {
  20376. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  20377. /* eslint-disable no-undef */
  20378. var db = uniCloud.database(this.spaceInfo);
  20379. var action = options.action || this.action;
  20380. if (action) {
  20381. db = db.action(action);
  20382. }
  20383. var collection = options.collection || this.collection;
  20384. db = db.collection(collection);
  20385. var where = options.where || this.where;
  20386. if (!(!where || !Object.keys(where).length)) {
  20387. db = db.where(where);
  20388. }
  20389. var field = options.field || this.field;
  20390. if (field) {
  20391. db = db.field(field);
  20392. }
  20393. var orderby = options.orderby || this.orderby;
  20394. if (orderby) {
  20395. db = db.orderBy(orderby);
  20396. }
  20397. var current = options.pageCurrent !== undefined ? options.pageCurrent : this.page.current;
  20398. var size = options.pageSize !== undefined ? options.pageSize : this.page.size;
  20399. var getCount = options.getcount !== undefined ? options.getcount : this.getcount;
  20400. var getTree = options.gettree !== undefined ? options.gettree : this.gettree;
  20401. var getOptions = {
  20402. getCount: getCount,
  20403. getTree: getTree
  20404. };
  20405. if (options.getTreePath) {
  20406. getOptions.getTreePath = options.getTreePath;
  20407. }
  20408. db = db.skip(size * (current - 1)).limit(size).get(getOptions);
  20409. return db;
  20410. },
  20411. getNodeData: function getNodeData(callback) {
  20412. var _this2 = this;
  20413. if (this.loading) {
  20414. return;
  20415. }
  20416. this.loading = true;
  20417. this.getCommand({
  20418. field: this.postField,
  20419. where: this._pathWhere()
  20420. }).then(function (res) {
  20421. _this2.loading = false;
  20422. _this2.selected = res.result.data;
  20423. callback && callback();
  20424. }).catch(function (err) {
  20425. _this2.loading = false;
  20426. _this2.errorMessage = err;
  20427. });
  20428. },
  20429. getTreePath: function getTreePath(callback) {
  20430. var _this3 = this;
  20431. if (this.loading) {
  20432. return;
  20433. }
  20434. this.loading = true;
  20435. this.getCommand({
  20436. field: this.postField,
  20437. getTreePath: {
  20438. startWith: "".concat(this.selfField, "=='").concat(this.dataValue, "'")
  20439. }
  20440. }).then(function (res) {
  20441. _this3.loading = false;
  20442. var treePath = [];
  20443. _this3._extractTreePath(res.result.data, treePath);
  20444. _this3.selected = treePath;
  20445. callback && callback();
  20446. }).catch(function (err) {
  20447. _this3.loading = false;
  20448. _this3.errorMessage = err;
  20449. });
  20450. },
  20451. loadData: function loadData() {
  20452. var _this4 = this;
  20453. if (this.isLocaldata) {
  20454. this._processLocalData();
  20455. return;
  20456. }
  20457. if (this.dataValue != null) {
  20458. this._loadNodeData(function (data) {
  20459. _this4._treeData = data;
  20460. _this4._updateBindData();
  20461. _this4._updateSelected();
  20462. });
  20463. return;
  20464. }
  20465. if (this.stepSearh) {
  20466. this._loadNodeData(function (data) {
  20467. _this4._treeData = data;
  20468. _this4._updateBindData();
  20469. });
  20470. } else {
  20471. this._loadAllData(function (data) {
  20472. _this4._treeData = [];
  20473. _this4._extractTree(data, _this4._treeData, null);
  20474. _this4._updateBindData();
  20475. });
  20476. }
  20477. },
  20478. _loadAllData: function _loadAllData(callback) {
  20479. var _this5 = this;
  20480. if (this.loading) {
  20481. return;
  20482. }
  20483. this.loading = true;
  20484. this.getCommand({
  20485. field: this.postField,
  20486. gettree: true,
  20487. startwith: "".concat(this.selfField, "=='").concat(this.dataValue, "'")
  20488. }).then(function (res) {
  20489. _this5.loading = false;
  20490. callback(res.result.data);
  20491. _this5.onDataChange();
  20492. }).catch(function (err) {
  20493. _this5.loading = false;
  20494. _this5.errorMessage = err;
  20495. });
  20496. },
  20497. _loadNodeData: function _loadNodeData(callback, pw) {
  20498. var _this6 = this;
  20499. if (this.loading) {
  20500. return;
  20501. }
  20502. this.loading = true;
  20503. this.getCommand({
  20504. field: this.postField,
  20505. where: pw || this._postWhere(),
  20506. pageSize: 500
  20507. }).then(function (res) {
  20508. _this6.loading = false;
  20509. callback(res.result.data);
  20510. _this6.onDataChange();
  20511. }).catch(function (err) {
  20512. _this6.loading = false;
  20513. _this6.errorMessage = err;
  20514. });
  20515. },
  20516. _pathWhere: function _pathWhere() {
  20517. var result = [];
  20518. var where_field = this._getParentNameByField();
  20519. if (where_field) {
  20520. result.push("".concat(where_field, " == '").concat(this.dataValue, "'"));
  20521. }
  20522. if (this.where) {
  20523. return "(".concat(this.where, ") && (").concat(result.join(' || '), ")");
  20524. }
  20525. return result.join(' || ');
  20526. },
  20527. _postWhere: function _postWhere() {
  20528. var result = [];
  20529. var selected = this.selected;
  20530. var parentField = this.parentField;
  20531. if (parentField) {
  20532. result.push("".concat(parentField, " == null || ").concat(parentField, " == \"\""));
  20533. }
  20534. if (selected.length) {
  20535. for (var i = 0; i < selected.length - 1; i++) {
  20536. result.push("".concat(parentField, " == '").concat(selected[i].value, "'"));
  20537. }
  20538. }
  20539. var where = [];
  20540. if (this.where) {
  20541. where.push("(".concat(this.where, ")"));
  20542. }
  20543. if (result.length) {
  20544. where.push("(".concat(result.join(' || '), ")"));
  20545. }
  20546. return where.join(' && ');
  20547. },
  20548. _nodeWhere: function _nodeWhere() {
  20549. var result = [];
  20550. var selected = this.selected;
  20551. if (selected.length) {
  20552. result.push("".concat(this.parentField, " == '").concat(selected[selected.length - 1].value, "'"));
  20553. }
  20554. if (this.where) {
  20555. return "(".concat(this.where, ") && (").concat(result.join(' || '), ")");
  20556. }
  20557. return result.join(' || ');
  20558. },
  20559. _getParentNameByField: function _getParentNameByField() {
  20560. var fields = this.field.split(',');
  20561. var where_field = null;
  20562. for (var i = 0; i < fields.length; i++) {
  20563. var items = fields[i].split('as');
  20564. if (items.length < 2) {
  20565. continue;
  20566. }
  20567. if (items[1].trim() === 'value') {
  20568. where_field = items[0].trim();
  20569. break;
  20570. }
  20571. }
  20572. return where_field;
  20573. },
  20574. _isTreeView: function _isTreeView() {
  20575. return this.parentField && this.selfField;
  20576. },
  20577. _updateSelected: function _updateSelected() {
  20578. var dl = this.dataList;
  20579. var sl = this.selected;
  20580. var textField = this.map.text;
  20581. var valueField = this.map.value;
  20582. for (var i = 0; i < sl.length; i++) {
  20583. var value = sl[i].value;
  20584. var dl2 = dl[i];
  20585. for (var j = 0; j < dl2.length; j++) {
  20586. var item2 = dl2[j];
  20587. if (item2[valueField] === value) {
  20588. sl[i].text = item2[textField];
  20589. break;
  20590. }
  20591. }
  20592. }
  20593. },
  20594. _updateBindData: function _updateBindData(node) {
  20595. var _this$_filterData = this._filterData(this._treeData, this.selected),
  20596. dataList = _this$_filterData.dataList,
  20597. hasNodes = _this$_filterData.hasNodes;
  20598. var isleaf = this._stepSearh === false && !hasNodes;
  20599. if (node) {
  20600. node.isleaf = isleaf;
  20601. }
  20602. this.dataList = dataList;
  20603. this.selectedIndex = dataList.length - 1;
  20604. if (!isleaf && this.selected.length < dataList.length) {
  20605. this.selected.push({
  20606. value: null,
  20607. text: "请选择"
  20608. });
  20609. }
  20610. return {
  20611. isleaf: isleaf,
  20612. hasNodes: hasNodes
  20613. };
  20614. },
  20615. _filterData: function _filterData(data, paths) {
  20616. var dataList = [];
  20617. var hasNodes = true;
  20618. dataList.push(data.filter(function (item) {
  20619. return item.parent_value === null || item.parent_value === undefined || item.parent_value === '';
  20620. }));
  20621. for (var i = 0; i < paths.length; i++) {
  20622. var value = paths[i].value;
  20623. var nodes = data.filter(function (item) {
  20624. return item.parent_value === value;
  20625. });
  20626. if (nodes.length) {
  20627. dataList.push(nodes);
  20628. } else {
  20629. hasNodes = false;
  20630. }
  20631. }
  20632. return {
  20633. dataList: dataList,
  20634. hasNodes: hasNodes
  20635. };
  20636. },
  20637. _extractTree: function _extractTree(nodes, result, parent_value) {
  20638. var list = result || [];
  20639. var valueField = this.map.value;
  20640. for (var i = 0; i < nodes.length; i++) {
  20641. var node = nodes[i];
  20642. var child = {};
  20643. for (var key in node) {
  20644. if (key !== 'children') {
  20645. child[key] = node[key];
  20646. }
  20647. }
  20648. if (parent_value !== null && parent_value !== undefined && parent_value !== '') {
  20649. child.parent_value = parent_value;
  20650. }
  20651. result.push(child);
  20652. var children = node.children;
  20653. if (children) {
  20654. this._extractTree(children, result, node[valueField]);
  20655. }
  20656. }
  20657. },
  20658. _extractTreePath: function _extractTreePath(nodes, result) {
  20659. var list = result || [];
  20660. for (var i = 0; i < nodes.length; i++) {
  20661. var node = nodes[i];
  20662. var child = {};
  20663. for (var key in node) {
  20664. if (key !== 'children') {
  20665. child[key] = node[key];
  20666. }
  20667. }
  20668. result.push(child);
  20669. var children = node.children;
  20670. if (children) {
  20671. this._extractTreePath(children, result);
  20672. }
  20673. }
  20674. },
  20675. _findNodePath: function _findNodePath(key, nodes) {
  20676. var path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  20677. var textField = this.map.text;
  20678. var valueField = this.map.value;
  20679. for (var i = 0; i < nodes.length; i++) {
  20680. var node = nodes[i];
  20681. var children = node.children;
  20682. var text = node[textField];
  20683. var value = node[valueField];
  20684. path.push({
  20685. value: value,
  20686. text: text
  20687. });
  20688. if (value === key) {
  20689. return path;
  20690. }
  20691. if (children) {
  20692. var p = this._findNodePath(key, children, path);
  20693. if (p.length) {
  20694. return p;
  20695. }
  20696. }
  20697. path.pop();
  20698. }
  20699. return [];
  20700. },
  20701. _processLocalData: function _processLocalData() {
  20702. this._treeData = [];
  20703. this._extractTree(this.localdata, this._treeData);
  20704. var inputValue = this.dataValue;
  20705. if (inputValue === undefined) {
  20706. return;
  20707. }
  20708. if (Array.isArray(inputValue)) {
  20709. inputValue = inputValue[inputValue.length - 1];
  20710. if ((0, _typeof2.default)(inputValue) === 'object' && inputValue[this.map.value]) {
  20711. inputValue = inputValue[this.map.value];
  20712. }
  20713. }
  20714. this.selected = this._findNodePath(inputValue, this.localdata);
  20715. }
  20716. }
  20717. };
  20718. exports.default = _default2;
  20719. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js */ 413)["default"]))
  20720. /***/ }),
  20721. /***/ 44:
  20722. /*!******************************************!*\
  20723. !*** E:/项目资料/智慧社区/Applet/api/request.js ***!
  20724. \******************************************/
  20725. /*! no static exports found */
  20726. /***/ (function(module, exports, __webpack_require__) {
  20727. "use strict";
  20728. /* WEBPACK VAR INJECTION */(function(uni, wx) {
  20729. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  20730. Object.defineProperty(exports, "__esModule", {
  20731. value: true
  20732. });
  20733. exports.default = void 0;
  20734. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  20735. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  20736. var _env = __webpack_require__(/*! ../env.js */ 45);
  20737. var request = function request(_ref) {
  20738. var url = _ref.url,
  20739. method = _ref.method,
  20740. data = _ref.data,
  20741. header = _ref.header;
  20742. return new Promise(function (resolve, reject) {
  20743. var token = uni.getStorageSync('token');
  20744. uni.request({
  20745. url: url.includes('http') ? url : _env.BASE_URL.url + url,
  20746. method: method,
  20747. data: data,
  20748. header: {
  20749. 'Authorization': url == '/login' ? '' : "Bearer ".concat(token)
  20750. },
  20751. dataType: 'json',
  20752. success: function success(res) {
  20753. if (res.data.errcode && res.data.errcode != 0) {
  20754. wx.showToast({
  20755. title: res.data.details || '获取失败',
  20756. icon: 'error'
  20757. });
  20758. }
  20759. if (res.data.code && res.data.code !== 200) {
  20760. wx.showToast({
  20761. title: res.data.msg
  20762. });
  20763. }
  20764. if (res.data.code && res.data.code == 401) {
  20765. uni.redirectTo({
  20766. url: '/pages/login/index'
  20767. });
  20768. }
  20769. resolve(res);
  20770. },
  20771. fail: function fail(err) {
  20772. uni.showToast({
  20773. title: "请求接口失败!"
  20774. });
  20775. reject(err);
  20776. }
  20777. });
  20778. });
  20779. };
  20780. var get = /*#__PURE__*/function () {
  20781. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref2) {
  20782. var url, data, header;
  20783. return _regenerator.default.wrap(function _callee$(_context) {
  20784. while (1) {
  20785. switch (_context.prev = _context.next) {
  20786. case 0:
  20787. url = _ref2.url, data = _ref2.data, header = _ref2.header;
  20788. _context.next = 3;
  20789. return request({
  20790. url: url,
  20791. method: 'get',
  20792. data: data,
  20793. header: header
  20794. });
  20795. case 3:
  20796. return _context.abrupt("return", _context.sent);
  20797. case 4:
  20798. case "end":
  20799. return _context.stop();
  20800. }
  20801. }
  20802. }, _callee);
  20803. }));
  20804. return function get(_x) {
  20805. return _ref3.apply(this, arguments);
  20806. };
  20807. }();
  20808. var post = /*#__PURE__*/function () {
  20809. var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
  20810. var url, data, header;
  20811. return _regenerator.default.wrap(function _callee2$(_context2) {
  20812. while (1) {
  20813. switch (_context2.prev = _context2.next) {
  20814. case 0:
  20815. url = _ref4.url, data = _ref4.data, header = _ref4.header;
  20816. _context2.next = 3;
  20817. return request({
  20818. url: url,
  20819. method: 'post',
  20820. data: data,
  20821. header: header
  20822. });
  20823. case 3:
  20824. return _context2.abrupt("return", _context2.sent);
  20825. case 4:
  20826. case "end":
  20827. return _context2.stop();
  20828. }
  20829. }
  20830. }, _callee2);
  20831. }));
  20832. return function post(_x2) {
  20833. return _ref5.apply(this, arguments);
  20834. };
  20835. }();
  20836. var put = /*#__PURE__*/function () {
  20837. var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(_ref6) {
  20838. var url, data, header;
  20839. return _regenerator.default.wrap(function _callee3$(_context3) {
  20840. while (1) {
  20841. switch (_context3.prev = _context3.next) {
  20842. case 0:
  20843. url = _ref6.url, data = _ref6.data, header = _ref6.header;
  20844. _context3.next = 3;
  20845. return request({
  20846. url: url,
  20847. method: 'put',
  20848. data: data,
  20849. header: header
  20850. });
  20851. case 3:
  20852. return _context3.abrupt("return", _context3.sent);
  20853. case 4:
  20854. case "end":
  20855. return _context3.stop();
  20856. }
  20857. }
  20858. }, _callee3);
  20859. }));
  20860. return function put(_x3) {
  20861. return _ref7.apply(this, arguments);
  20862. };
  20863. }();
  20864. var del = /*#__PURE__*/function () {
  20865. var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(_ref8) {
  20866. var url, data, header;
  20867. return _regenerator.default.wrap(function _callee4$(_context4) {
  20868. while (1) {
  20869. switch (_context4.prev = _context4.next) {
  20870. case 0:
  20871. url = _ref8.url, data = _ref8.data, header = _ref8.header;
  20872. _context4.next = 3;
  20873. return request({
  20874. url: url,
  20875. method: 'delete',
  20876. data: data,
  20877. header: header
  20878. });
  20879. case 3:
  20880. return _context4.abrupt("return", _context4.sent);
  20881. case 4:
  20882. case "end":
  20883. return _context4.stop();
  20884. }
  20885. }
  20886. }, _callee4);
  20887. }));
  20888. return function del(_x4) {
  20889. return _ref9.apply(this, arguments);
  20890. };
  20891. }();
  20892. var _default = {
  20893. get: get,
  20894. post: post,
  20895. put: put,
  20896. del: del
  20897. };
  20898. exports.default = _default;
  20899. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  20900. /***/ }),
  20901. /***/ 444:
  20902. /*!*********************************************************************!*\
  20903. !*** E:/项目资料/智慧社区/Applet/components/gaoyia-parse/libs/html2json.js ***!
  20904. \*********************************************************************/
  20905. /*! no static exports found */
  20906. /***/ (function(module, exports, __webpack_require__) {
  20907. "use strict";
  20908. /* WEBPACK VAR INJECTION */(function(wx) {
  20909. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  20910. Object.defineProperty(exports, "__esModule", {
  20911. value: true
  20912. });
  20913. exports.default = void 0;
  20914. var _wxDiscode = _interopRequireDefault(__webpack_require__(/*! ./wxDiscode */ 445));
  20915. var _htmlparser = _interopRequireDefault(__webpack_require__(/*! ./htmlparser */ 446));
  20916. /**
  20917. * html2Json 改造来自: https://github.com/Jxck/html2json
  20918. *
  20919. *
  20920. * author: Di (微信小程序开发工程师)
  20921. * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
  20922. * 垂直微信小程序开发交流社区
  20923. *
  20924. * github地址: https://github.com/icindy/wxParse
  20925. *
  20926. * for: 微信小程序富文本解析
  20927. * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
  20928. */
  20929. function makeMap(str) {
  20930. var obj = {};
  20931. var items = str.split(',');
  20932. for (var i = 0; i < items.length; i += 1) {
  20933. obj[items[i]] = true;
  20934. }
  20935. return obj;
  20936. }
  20937. // Block Elements - HTML 5
  20938. var block = makeMap('br,code,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video');
  20939. // Inline Elements - HTML 5
  20940. var inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var');
  20941. // Elements that you can, intentionally, leave open
  20942. // (and which close themselves)
  20943. var closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr');
  20944. function removeDOCTYPE(html) {
  20945. var isDocument = /<body.*>([^]*)<\/body>/.test(html);
  20946. return isDocument ? RegExp.$1 : html;
  20947. }
  20948. function trimHtml(html) {
  20949. return html.replace(/<!--.*?-->/gi, '').replace(/\/\*.*?\*\//gi, '').replace(/[ ]+</gi, '<').replace(/<script[^]*<\/script>/gi, '').replace(/<style[^]*<\/style>/gi, '');
  20950. }
  20951. function getScreenInfo() {
  20952. var screen = {};
  20953. wx.getSystemInfo({
  20954. success: function success(res) {
  20955. screen.width = res.windowWidth;
  20956. screen.height = res.windowHeight;
  20957. }
  20958. });
  20959. return screen;
  20960. }
  20961. function html2json(html, customHandler, imageProp, host) {
  20962. // 处理字符串
  20963. html = removeDOCTYPE(html);
  20964. html = trimHtml(html);
  20965. html = _wxDiscode.default.strDiscode(html);
  20966. // 生成node节点
  20967. var bufArray = [];
  20968. var results = {
  20969. nodes: [],
  20970. imageUrls: []
  20971. };
  20972. var screen = getScreenInfo();
  20973. function Node(tag) {
  20974. this.node = 'element';
  20975. this.tag = tag;
  20976. this.$screen = screen;
  20977. }
  20978. (0, _htmlparser.default)(html, {
  20979. start: function start(tag, attrs, unary) {
  20980. // node for this element
  20981. var node = new Node(tag);
  20982. if (bufArray.length !== 0) {
  20983. var parent = bufArray[0];
  20984. if (parent.nodes === undefined) {
  20985. parent.nodes = [];
  20986. }
  20987. }
  20988. if (block[tag]) {
  20989. node.tagType = 'block';
  20990. } else if (inline[tag]) {
  20991. node.tagType = 'inline';
  20992. } else if (closeSelf[tag]) {
  20993. node.tagType = 'closeSelf';
  20994. }
  20995. node.attr = attrs.reduce(function (pre, attr) {
  20996. var name = attr.name;
  20997. var value = attr.value;
  20998. if (name === 'class') {
  20999. node.classStr = value;
  21000. }
  21001. // has multi attibutes
  21002. // make it array of attribute
  21003. if (name === 'style') {
  21004. node.styleStr = value;
  21005. }
  21006. if (value.match(/ /)) {
  21007. value = value.split(' ');
  21008. }
  21009. // if attr already exists
  21010. // merge it
  21011. if (pre[name]) {
  21012. if (Array.isArray(pre[name])) {
  21013. // already array, push to last
  21014. pre[name].push(value);
  21015. } else {
  21016. // single value, make it array
  21017. pre[name] = [pre[name], value];
  21018. }
  21019. } else {
  21020. // not exist, put it
  21021. pre[name] = value;
  21022. }
  21023. return pre;
  21024. }, {});
  21025. // 优化样式相关属性
  21026. if (node.classStr) {
  21027. node.classStr += " ".concat(node.tag);
  21028. } else {
  21029. node.classStr = node.tag;
  21030. }
  21031. if (node.tagType === 'inline') {
  21032. node.classStr += ' inline';
  21033. }
  21034. // 对img添加额外数据
  21035. if (node.tag === 'img') {
  21036. var imgUrl = node.attr.src;
  21037. imgUrl = _wxDiscode.default.urlToHttpUrl(imgUrl, imageProp.domain);
  21038. Object.assign(node.attr, imageProp, {
  21039. src: imgUrl || ''
  21040. });
  21041. if (imgUrl) {
  21042. results.imageUrls.push(imgUrl);
  21043. }
  21044. }
  21045. // 处理a标签属性
  21046. if (node.tag === 'a') {
  21047. node.attr.href = node.attr.href || '';
  21048. }
  21049. // 处理font标签样式属性
  21050. if (node.tag === 'font') {
  21051. var fontSize = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', '-webkit-xxx-large'];
  21052. var styleAttrs = {
  21053. color: 'color',
  21054. face: 'font-family',
  21055. size: 'font-size'
  21056. };
  21057. if (!node.styleStr) node.styleStr = '';
  21058. Object.keys(styleAttrs).forEach(function (key) {
  21059. if (node.attr[key]) {
  21060. var value = key === 'size' ? fontSize[node.attr[key] - 1] : node.attr[key];
  21061. node.styleStr += "".concat(styleAttrs[key], ": ").concat(value, ";");
  21062. }
  21063. });
  21064. }
  21065. // 临时记录source资源
  21066. if (node.tag === 'source') {
  21067. results.source = node.attr.src;
  21068. }
  21069. if (customHandler.start) {
  21070. customHandler.start(node, results);
  21071. }
  21072. if (unary) {
  21073. // if this tag doesn't have end tag
  21074. // like <img src="hoge.png"/>
  21075. // add to parents
  21076. var _parent = bufArray[0] || results;
  21077. if (_parent.nodes === undefined) {
  21078. _parent.nodes = [];
  21079. }
  21080. _parent.nodes.push(node);
  21081. } else {
  21082. bufArray.unshift(node);
  21083. }
  21084. },
  21085. end: function end(tag) {
  21086. // merge into parent tag
  21087. var node = bufArray.shift();
  21088. if (node.tag !== tag) {
  21089. console.error('invalid state: mismatch end tag');
  21090. }
  21091. // 当有缓存source资源时于于video补上src资源
  21092. if (node.tag === 'video' && results.source) {
  21093. node.attr.src = results.source;
  21094. delete results.source;
  21095. }
  21096. if (customHandler.end) {
  21097. customHandler.end(node, results);
  21098. }
  21099. if (bufArray.length === 0) {
  21100. results.nodes.push(node);
  21101. } else {
  21102. var parent = bufArray[0];
  21103. if (!parent.nodes) {
  21104. parent.nodes = [];
  21105. }
  21106. parent.nodes.push(node);
  21107. }
  21108. },
  21109. chars: function chars(text) {
  21110. if (!text.trim()) return;
  21111. var node = {
  21112. node: 'text',
  21113. text: text
  21114. };
  21115. if (customHandler.chars) {
  21116. customHandler.chars(node, results);
  21117. }
  21118. if (bufArray.length === 0) {
  21119. results.nodes.push(node);
  21120. } else {
  21121. var parent = bufArray[0];
  21122. if (parent.nodes === undefined) {
  21123. parent.nodes = [];
  21124. }
  21125. parent.nodes.push(node);
  21126. }
  21127. }
  21128. });
  21129. return results;
  21130. }
  21131. var _default = html2json;
  21132. exports.default = _default;
  21133. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  21134. /***/ }),
  21135. /***/ 445:
  21136. /*!*********************************************************************!*\
  21137. !*** E:/项目资料/智慧社区/Applet/components/gaoyia-parse/libs/wxDiscode.js ***!
  21138. \*********************************************************************/
  21139. /*! no static exports found */
  21140. /***/ (function(module, exports, __webpack_require__) {
  21141. "use strict";
  21142. Object.defineProperty(exports, "__esModule", {
  21143. value: true
  21144. });
  21145. exports.default = void 0;
  21146. // HTML 支持的数学符号
  21147. function strNumDiscode(str) {
  21148. str = str.replace(/&forall;|&#8704;|&#x2200;/g, '∀');
  21149. str = str.replace(/&part;|&#8706;|&#x2202;/g, '∂');
  21150. str = str.replace(/&exist;|&#8707;|&#x2203;/g, '∃');
  21151. str = str.replace(/&empty;|&#8709;|&#x2205;/g, '∅');
  21152. str = str.replace(/&nabla;|&#8711;|&#x2207;/g, '∇');
  21153. str = str.replace(/&isin;|&#8712;|&#x2208;/g, '∈');
  21154. str = str.replace(/&notin;|&#8713;|&#x2209;/g, '∉');
  21155. str = str.replace(/&ni;|&#8715;|&#x220b;/g, '∋');
  21156. str = str.replace(/&prod;|&#8719;|&#x220f;/g, '∏');
  21157. str = str.replace(/&sum;|&#8721;|&#x2211;/g, '∑');
  21158. str = str.replace(/&minus;|&#8722;|&#x2212;/g, '−');
  21159. str = str.replace(/&lowast;|&#8727;|&#x2217;/g, '∗');
  21160. str = str.replace(/&radic;|&#8730;|&#x221a;/g, '√');
  21161. str = str.replace(/&prop;|&#8733;|&#x221d;/g, '∝');
  21162. str = str.replace(/&infin;|&#8734;|&#x221e;/g, '∞');
  21163. str = str.replace(/&ang;|&#8736;|&#x2220;/g, '∠');
  21164. str = str.replace(/&and;|&#8743;|&#x2227;/g, '∧');
  21165. str = str.replace(/&or;|&#8744;|&#x2228;/g, '∨');
  21166. str = str.replace(/&cap;|&#8745;|&#x2229;/g, '∩');
  21167. str = str.replace(/&cup;|&#8746;|&#x222a;/g, '∪');
  21168. str = str.replace(/&int;|&#8747;|&#x222b;/g, '∫');
  21169. str = str.replace(/&there4;|&#8756;|&#x2234;/g, '∴');
  21170. str = str.replace(/&sim;|&#8764;|&#x223c;/g, '∼');
  21171. str = str.replace(/&cong;|&#8773;|&#x2245;/g, '≅');
  21172. str = str.replace(/&asymp;|&#8776;|&#x2248;/g, '≈');
  21173. str = str.replace(/&ne;|&#8800;|&#x2260;/g, '≠');
  21174. str = str.replace(/&le;|&#8804;|&#x2264;/g, '≤');
  21175. str = str.replace(/&ge;|&#8805;|&#x2265;/g, '≥');
  21176. str = str.replace(/&sub;|&#8834;|&#x2282;/g, '⊂');
  21177. str = str.replace(/&sup;|&#8835;|&#x2283;/g, '⊃');
  21178. str = str.replace(/&nsub;|&#8836;|&#x2284;/g, '⊄');
  21179. str = str.replace(/&sube;|&#8838;|&#x2286;/g, '⊆');
  21180. str = str.replace(/&supe;|&#8839;|&#x2287;/g, '⊇');
  21181. str = str.replace(/&oplus;|&#8853;|&#x2295;/g, '⊕');
  21182. str = str.replace(/&otimes;|&#8855;|&#x2297;/g, '⊗');
  21183. str = str.replace(/&perp;|&#8869;|&#x22a5;/g, '⊥');
  21184. str = str.replace(/&sdot;|&#8901;|&#x22c5;/g, '⋅');
  21185. return str;
  21186. }
  21187. // HTML 支持的希腊字母
  21188. function strGreeceDiscode(str) {
  21189. str = str.replace(/&Alpha;|&#913;|&#x391;/g, 'Α');
  21190. str = str.replace(/&Beta;|&#914;|&#x392;/g, 'Β');
  21191. str = str.replace(/&Gamma;|&#915;|&#x393;/g, 'Γ');
  21192. str = str.replace(/&Delta;|&#916;|&#x394;/g, 'Δ');
  21193. str = str.replace(/&Epsilon;|&#917;|&#x395;/g, 'Ε');
  21194. str = str.replace(/&Zeta;|&#918;|&#x396;/g, 'Ζ');
  21195. str = str.replace(/&Eta;|&#919;|&#x397;/g, 'Η');
  21196. str = str.replace(/&Theta;|&#920;|&#x398;/g, 'Θ');
  21197. str = str.replace(/&Iota;|&#921;|&#x399;/g, 'Ι');
  21198. str = str.replace(/&Kappa;|&#922;|&#x39a;/g, 'Κ');
  21199. str = str.replace(/&Lambda;|&#923;|&#x39b;/g, 'Λ');
  21200. str = str.replace(/&Mu;|&#924;|&#x39c;/g, 'Μ');
  21201. str = str.replace(/&Nu;|&#925;|&#x39d;/g, 'Ν');
  21202. str = str.replace(/&Xi;|&#925;|&#x39d;/g, 'Ν');
  21203. str = str.replace(/&Omicron;|&#927;|&#x39f;/g, 'Ο');
  21204. str = str.replace(/&Pi;|&#928;|&#x3a0;/g, 'Π');
  21205. str = str.replace(/&Rho;|&#929;|&#x3a1;/g, 'Ρ');
  21206. str = str.replace(/&Sigma;|&#931;|&#x3a3;/g, 'Σ');
  21207. str = str.replace(/&Tau;|&#932;|&#x3a4;/g, 'Τ');
  21208. str = str.replace(/&Upsilon;|&#933;|&#x3a5;/g, 'Υ');
  21209. str = str.replace(/&Phi;|&#934;|&#x3a6;/g, 'Φ');
  21210. str = str.replace(/&Chi;|&#935;|&#x3a7;/g, 'Χ');
  21211. str = str.replace(/&Psi;|&#936;|&#x3a8;/g, 'Ψ');
  21212. str = str.replace(/&Omega;|&#937;|&#x3a9;/g, 'Ω');
  21213. str = str.replace(/&alpha;|&#945;|&#x3b1;/g, 'α');
  21214. str = str.replace(/&beta;|&#946;|&#x3b2;/g, 'β');
  21215. str = str.replace(/&gamma;|&#947;|&#x3b3;/g, 'γ');
  21216. str = str.replace(/&delta;|&#948;|&#x3b4;/g, 'δ');
  21217. str = str.replace(/&epsilon;|&#949;|&#x3b5;/g, 'ε');
  21218. str = str.replace(/&zeta;|&#950;|&#x3b6;/g, 'ζ');
  21219. str = str.replace(/&eta;|&#951;|&#x3b7;/g, 'η');
  21220. str = str.replace(/&theta;|&#952;|&#x3b8;/g, 'θ');
  21221. str = str.replace(/&iota;|&#953;|&#x3b9;/g, 'ι');
  21222. str = str.replace(/&kappa;|&#954;|&#x3ba;/g, 'κ');
  21223. str = str.replace(/&lambda;|&#955;|&#x3bb;/g, 'λ');
  21224. str = str.replace(/&mu;|&#956;|&#x3bc;/g, 'μ');
  21225. str = str.replace(/&nu;|&#957;|&#x3bd;/g, 'ν');
  21226. str = str.replace(/&xi;|&#958;|&#x3be;/g, 'ξ');
  21227. str = str.replace(/&omicron;|&#959;|&#x3bf;/g, 'ο');
  21228. str = str.replace(/&pi;|&#960;|&#x3c0;/g, 'π');
  21229. str = str.replace(/&rho;|&#961;|&#x3c1;/g, 'ρ');
  21230. str = str.replace(/&sigmaf;|&#962;|&#x3c2;/g, 'ς');
  21231. str = str.replace(/&sigma;|&#963;|&#x3c3;/g, 'σ');
  21232. str = str.replace(/&tau;|&#964;|&#x3c4;/g, 'τ');
  21233. str = str.replace(/&upsilon;|&#965;|&#x3c5;/g, 'υ');
  21234. str = str.replace(/&phi;|&#966;|&#x3c6;/g, 'φ');
  21235. str = str.replace(/&chi;|&#967;|&#x3c7;/g, 'χ');
  21236. str = str.replace(/&psi;|&#968;|&#x3c8;/g, 'ψ');
  21237. str = str.replace(/&omega;|&#969;|&#x3c9;/g, 'ω');
  21238. str = str.replace(/&thetasym;|&#977;|&#x3d1;/g, 'ϑ');
  21239. str = str.replace(/&upsih;|&#978;|&#x3d2;/g, 'ϒ');
  21240. str = str.replace(/&piv;|&#982;|&#x3d6;/g, 'ϖ');
  21241. str = str.replace(/&middot;|&#183;|&#xb7;/g, '·');
  21242. return str;
  21243. }
  21244. function strcharacterDiscode(str) {
  21245. // 加入常用解析
  21246. // str = str.replace(/&nbsp;|&#32;|&#x20;/g, "&nbsp;");
  21247. // str = str.replace(/&ensp;|&#8194;|&#x2002;/g, '&ensp;');
  21248. // str = str.replace(/&#12288;|&#x3000;/g, '<span class=\'spaceshow\'> </span>');
  21249. // str = str.replace(/&emsp;|&#8195;|&#x2003;/g, '&emsp;');
  21250. // str = str.replace(/&quot;|&#34;|&#x22;/g, "\"");
  21251. // str = str.replace(/&apos;|&#39;|&#x27;/g, "&apos;");
  21252. // str = str.replace(/&acute;|&#180;|&#xB4;/g, "´");
  21253. // str = str.replace(/&times;|&#215;|&#xD7;/g, "×");
  21254. // str = str.replace(/&divide;|&#247;|&#xF7;/g, "÷");
  21255. // str = str.replace(/&amp;|&#38;|&#x26;/g, '&amp;');
  21256. // str = str.replace(/&lt;|&#60;|&#x3c;/g, '&lt;');
  21257. // str = str.replace(/&gt;|&#62;|&#x3e;/g, '&gt;');
  21258. str = str.replace(/&nbsp;|&#32;|&#x20;/g, "<span class='spaceshow'> </span>");
  21259. str = str.replace(/&ensp;|&#8194;|&#x2002;/g, '<span class=\'spaceshow\'> </span>');
  21260. str = str.replace(/&#12288;|&#x3000;/g, '<span class=\'spaceshow\'> </span>');
  21261. str = str.replace(/&emsp;|&#8195;|&#x2003;/g, '<span class=\'spaceshow\'> </span>');
  21262. str = str.replace(/&quot;|&#34;|&#x22;/g, "\"");
  21263. str = str.replace(/&quot;|&#39;|&#x27;/g, "'");
  21264. str = str.replace(/&acute;|&#180;|&#xB4;/g, "´");
  21265. str = str.replace(/&times;|&#215;|&#xD7;/g, "×");
  21266. str = str.replace(/&divide;|&#247;|&#xF7;/g, "÷");
  21267. str = str.replace(/&amp;|&#38;|&#x26;/g, '&');
  21268. str = str.replace(/&lt;|&#60;|&#x3c;/g, '<');
  21269. str = str.replace(/&gt;|&#62;|&#x3e;/g, '>');
  21270. return str;
  21271. }
  21272. // HTML 支持的其他实体
  21273. function strOtherDiscode(str) {
  21274. str = str.replace(/&OElig;|&#338;|&#x152;/g, 'Œ');
  21275. str = str.replace(/&oelig;|&#339;|&#x153;/g, 'œ');
  21276. str = str.replace(/&Scaron;|&#352;|&#x160;/g, 'Š');
  21277. str = str.replace(/&scaron;|&#353;|&#x161;/g, 'š');
  21278. str = str.replace(/&Yuml;|&#376;|&#x178;/g, 'Ÿ');
  21279. str = str.replace(/&fnof;|&#402;|&#x192;/g, 'ƒ');
  21280. str = str.replace(/&circ;|&#710;|&#x2c6;/g, 'ˆ');
  21281. str = str.replace(/&tilde;|&#732;|&#x2dc;/g, '˜');
  21282. str = str.replace(/&thinsp;|$#8201;|&#x2009;/g, '<span class=\'spaceshow\'> </span>');
  21283. str = str.replace(/&zwnj;|&#8204;|&#x200C;/g, '<span class=\'spaceshow\'>‌</span>');
  21284. str = str.replace(/&zwj;|$#8205;|&#x200D;/g, '<span class=\'spaceshow\'>‍</span>');
  21285. str = str.replace(/&lrm;|$#8206;|&#x200E;/g, '<span class=\'spaceshow\'>‎</span>');
  21286. str = str.replace(/&rlm;|&#8207;|&#x200F;/g, '<span class=\'spaceshow\'>‏</span>');
  21287. str = str.replace(/&ndash;|&#8211;|&#x2013;/g, '–');
  21288. str = str.replace(/&mdash;|&#8212;|&#x2014;/g, '—');
  21289. str = str.replace(/&lsquo;|&#8216;|&#x2018;/g, '‘');
  21290. str = str.replace(/&rsquo;|&#8217;|&#x2019;/g, '’');
  21291. str = str.replace(/&sbquo;|&#8218;|&#x201a;/g, '‚');
  21292. str = str.replace(/&ldquo;|&#8220;|&#x201c;/g, '“');
  21293. str = str.replace(/&rdquo;|&#8221;|&#x201d;/g, '”');
  21294. str = str.replace(/&bdquo;|&#8222;|&#x201e;/g, '„');
  21295. str = str.replace(/&dagger;|&#8224;|&#x2020;/g, '†');
  21296. str = str.replace(/&Dagger;|&#8225;|&#x2021;/g, '‡');
  21297. str = str.replace(/&bull;|&#8226;|&#x2022;/g, '•');
  21298. str = str.replace(/&hellip;|&#8230;|&#x2026;/g, '…');
  21299. str = str.replace(/&permil;|&#8240;|&#x2030;/g, '‰');
  21300. str = str.replace(/&prime;|&#8242;|&#x2032;/g, '′');
  21301. str = str.replace(/&Prime;|&#8243;|&#x2033;/g, '″');
  21302. str = str.replace(/&lsaquo;|&#8249;|&#x2039;/g, '‹');
  21303. str = str.replace(/&rsaquo;|&#8250;|&#x203a;/g, '›');
  21304. str = str.replace(/&oline;|&#8254;|&#x203e;/g, '‾');
  21305. str = str.replace(/&euro;|&#8364;|&#x20ac;/g, '€');
  21306. str = str.replace(/&trade;|&#8482;|&#x2122;/g, '™');
  21307. str = str.replace(/&larr;|&#8592;|&#x2190;/g, '←');
  21308. str = str.replace(/&uarr;|&#8593;|&#x2191;/g, '↑');
  21309. str = str.replace(/&rarr;|&#8594;|&#x2192;/g, '→');
  21310. str = str.replace(/&darr;|&#8595;|&#x2193;/g, '↓');
  21311. str = str.replace(/&harr;|&#8596;|&#x2194;/g, '↔');
  21312. str = str.replace(/&crarr;|&#8629;|&#x21b5;/g, '↵');
  21313. str = str.replace(/&lceil;|&#8968;|&#x2308;/g, '⌈');
  21314. str = str.replace(/&rceil;|&#8969;|&#x2309;/g, '⌉');
  21315. str = str.replace(/&lfloor;|&#8970;|&#x230a;/g, '⌊');
  21316. str = str.replace(/&rfloor;|&#8971;|&#x230b;/g, '⌋');
  21317. str = str.replace(/&loz;|&#9674;|&#x25ca;/g, '◊');
  21318. str = str.replace(/&spades;|&#9824;|&#x2660;/g, '♠');
  21319. str = str.replace(/&clubs;|&#9827;|&#x2663;/g, '♣');
  21320. str = str.replace(/&hearts;|&#9829;|&#x2665;/g, '♥');
  21321. str = str.replace(/&diams;|&#9830;|&#x2666;/g, '♦');
  21322. return str;
  21323. }
  21324. function strDiscode(str) {
  21325. str = strNumDiscode(str);
  21326. str = strGreeceDiscode(str);
  21327. str = strcharacterDiscode(str);
  21328. str = strOtherDiscode(str);
  21329. return str;
  21330. }
  21331. function urlToHttpUrl(url, domain) {
  21332. if (/^\/\//.test(url)) {
  21333. return "https:".concat(url);
  21334. } else if (/^\//.test(url)) {
  21335. return "https://".concat(domain).concat(url);
  21336. }
  21337. return url;
  21338. }
  21339. var _default = {
  21340. strDiscode: strDiscode,
  21341. urlToHttpUrl: urlToHttpUrl
  21342. };
  21343. exports.default = _default;
  21344. /***/ }),
  21345. /***/ 446:
  21346. /*!**********************************************************************!*\
  21347. !*** E:/项目资料/智慧社区/Applet/components/gaoyia-parse/libs/htmlparser.js ***!
  21348. \**********************************************************************/
  21349. /*! no static exports found */
  21350. /***/ (function(module, exports, __webpack_require__) {
  21351. "use strict";
  21352. Object.defineProperty(exports, "__esModule", {
  21353. value: true
  21354. });
  21355. exports.default = void 0;
  21356. /**
  21357. *
  21358. * htmlParser改造自: https://github.com/blowsie/Pure-JavaScript-HTML5-Parser
  21359. *
  21360. * author: Di (微信小程序开发工程师)
  21361. * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
  21362. * 垂直微信小程序开发交流社区
  21363. *
  21364. * github地址: https://github.com/icindy/wxParse
  21365. *
  21366. * for: 微信小程序富文本解析
  21367. * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
  21368. */
  21369. // Regular Expressions for parsing tags and attributes
  21370. var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z0-9_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/;
  21371. var endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/;
  21372. var attr = /([a-zA-Z0-9_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;
  21373. function makeMap(str) {
  21374. var obj = {};
  21375. var items = str.split(',');
  21376. for (var i = 0; i < items.length; i += 1) {
  21377. obj[items[i]] = true;
  21378. }
  21379. return obj;
  21380. }
  21381. // Empty Elements - HTML 5
  21382. var empty = makeMap('area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr');
  21383. // Block Elements - HTML 5
  21384. var block = makeMap('address,code,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video');
  21385. // Inline Elements - HTML 5
  21386. var inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var');
  21387. // Elements that you can, intentionally, leave open
  21388. // (and which close themselves)
  21389. var closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr');
  21390. // Attributes that have their values filled in disabled="disabled"
  21391. var fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected');
  21392. function HTMLParser(html, handler) {
  21393. var index;
  21394. var chars;
  21395. var match;
  21396. var last = html;
  21397. var stack = [];
  21398. stack.last = function () {
  21399. return stack[stack.length - 1];
  21400. };
  21401. function parseEndTag(tag, tagName) {
  21402. // If no tag name is provided, clean shop
  21403. var pos;
  21404. if (!tagName) {
  21405. pos = 0;
  21406. } else {
  21407. // Find the closest opened tag of the same type
  21408. tagName = tagName.toLowerCase();
  21409. for (pos = stack.length - 1; pos >= 0; pos -= 1) {
  21410. if (stack[pos] === tagName) break;
  21411. }
  21412. }
  21413. if (pos >= 0) {
  21414. // Close all the open elements, up the stack
  21415. for (var i = stack.length - 1; i >= pos; i -= 1) {
  21416. if (handler.end) handler.end(stack[i]);
  21417. }
  21418. // Remove the open elements from the stack
  21419. stack.length = pos;
  21420. }
  21421. }
  21422. function parseStartTag(tag, tagName, rest, unary) {
  21423. tagName = tagName.toLowerCase();
  21424. if (block[tagName]) {
  21425. while (stack.last() && inline[stack.last()]) {
  21426. parseEndTag('', stack.last());
  21427. }
  21428. }
  21429. if (closeSelf[tagName] && stack.last() === tagName) {
  21430. parseEndTag('', tagName);
  21431. }
  21432. unary = empty[tagName] || !!unary;
  21433. if (!unary) stack.push(tagName);
  21434. if (handler.start) {
  21435. var attrs = [];
  21436. rest.replace(attr, function genAttr(matches, name) {
  21437. var value = arguments[2] || arguments[3] || arguments[4] || (fillAttrs[name] ? name : '');
  21438. attrs.push({
  21439. name: name,
  21440. value: value,
  21441. escaped: value.replace(/(^|[^\\])"/g, '$1\\"') // "
  21442. });
  21443. });
  21444. if (handler.start) {
  21445. handler.start(tagName, attrs, unary);
  21446. }
  21447. }
  21448. }
  21449. while (html) {
  21450. chars = true;
  21451. if (html.indexOf('</') === 0) {
  21452. match = html.match(endTag);
  21453. if (match) {
  21454. html = html.substring(match[0].length);
  21455. match[0].replace(endTag, parseEndTag);
  21456. chars = false;
  21457. }
  21458. // start tag
  21459. } else if (html.indexOf('<') === 0) {
  21460. match = html.match(startTag);
  21461. if (match) {
  21462. html = html.substring(match[0].length);
  21463. match[0].replace(startTag, parseStartTag);
  21464. chars = false;
  21465. }
  21466. }
  21467. if (chars) {
  21468. index = html.indexOf('<');
  21469. var text = '';
  21470. while (index === 0) {
  21471. text += '<';
  21472. html = html.substring(1);
  21473. index = html.indexOf('<');
  21474. }
  21475. text += index < 0 ? html : html.substring(0, index);
  21476. html = index < 0 ? '' : html.substring(index);
  21477. if (handler.chars) handler.chars(text);
  21478. }
  21479. if (html === last) throw new Error("Parse Error: ".concat(html));
  21480. last = html;
  21481. }
  21482. // Clean up any remaining tags
  21483. parseEndTag();
  21484. }
  21485. var _default = HTMLParser;
  21486. exports.default = _default;
  21487. /***/ }),
  21488. /***/ 45:
  21489. /*!**********************************!*\
  21490. !*** E:/项目资料/智慧社区/Applet/env.js ***!
  21491. \**********************************/
  21492. /*! no static exports found */
  21493. /***/ (function(module, exports, __webpack_require__) {
  21494. "use strict";
  21495. Object.defineProperty(exports, "__esModule", {
  21496. value: true
  21497. });
  21498. exports.BASE_URL = void 0;
  21499. var ENV_API_URL = {
  21500. // development: {
  21501. // url: 'http://192.168.0.18:7070/api',
  21502. // imgUrl: 'http://192.168.0.19/static/wxa',
  21503. // fileUrl: 'http://192.168.0.18:80'
  21504. // },
  21505. development: {
  21506. url: 'https://fuyu.cc-lotus.info/wx-api/api',
  21507. imgUrl: 'https://fuyu.cc-lotus.info/static/wxa',
  21508. fileUrl: 'https://fuyu.cc-lotus.info'
  21509. },
  21510. production: {
  21511. url: 'https://fuyu.scapp.cn/wx-api/api',
  21512. imgUrl: 'https://fuyu.scapp.cn/static/wxa/',
  21513. fileUrl: 'https://fuyu.scapp.cn'
  21514. }
  21515. };
  21516. var BASE_URL = ENV_API_URL["development" || false];
  21517. exports.BASE_URL = BASE_URL;
  21518. /***/ }),
  21519. /***/ 452:
  21520. /*!********************************************************************************************!*\
  21521. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/index.js ***!
  21522. \********************************************************************************************/
  21523. /*! no static exports found */
  21524. /***/ (function(module, exports, __webpack_require__) {
  21525. "use strict";
  21526. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21527. Object.defineProperty(exports, "__esModule", {
  21528. value: true
  21529. });
  21530. exports.default = void 0;
  21531. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 453));
  21532. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 454));
  21533. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 455));
  21534. var _default = {
  21535. en: _en.default,
  21536. 'zh-Hans': _zhHans.default,
  21537. 'zh-Hant': _zhHant.default
  21538. };
  21539. exports.default = _default;
  21540. /***/ }),
  21541. /***/ 453:
  21542. /*!*******************************************************************************************!*\
  21543. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/en.json ***!
  21544. \*******************************************************************************************/
  21545. /*! exports provided: uni-goods-nav.options.shop, uni-goods-nav.options.cart, uni-goods-nav.buttonGroup.addToCart, uni-goods-nav.buttonGroup.buyNow, default */
  21546. /***/ (function(module) {
  21547. module.exports = JSON.parse("{\"uni-goods-nav.options.shop\":\"shop\",\"uni-goods-nav.options.cart\":\"cart\",\"uni-goods-nav.buttonGroup.addToCart\":\"add to cart\",\"uni-goods-nav.buttonGroup.buyNow\":\"buy now\"}");
  21548. /***/ }),
  21549. /***/ 454:
  21550. /*!************************************************************************************************!*\
  21551. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/zh-Hans.json ***!
  21552. \************************************************************************************************/
  21553. /*! exports provided: uni-goods-nav.options.shop, uni-goods-nav.options.cart, uni-goods-nav.buttonGroup.addToCart, uni-goods-nav.buttonGroup.buyNow, default */
  21554. /***/ (function(module) {
  21555. module.exports = JSON.parse("{\"uni-goods-nav.options.shop\":\"店铺\",\"uni-goods-nav.options.cart\":\"购物车\",\"uni-goods-nav.buttonGroup.addToCart\":\"加入购物车\",\"uni-goods-nav.buttonGroup.buyNow\":\"立即购买\"}");
  21556. /***/ }),
  21557. /***/ 455:
  21558. /*!************************************************************************************************!*\
  21559. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/zh-Hant.json ***!
  21560. \************************************************************************************************/
  21561. /*! exports provided: uni-goods-nav.options.shop, uni-goods-nav.options.cart, uni-goods-nav.buttonGroup.addToCart, uni-goods-nav.buttonGroup.buyNow, default */
  21562. /***/ (function(module) {
  21563. module.exports = JSON.parse("{\"uni-goods-nav.options.shop\":\"店鋪\",\"uni-goods-nav.options.cart\":\"購物車\",\"uni-goods-nav.buttonGroup.addToCart\":\"加入購物車\",\"uni-goods-nav.buttonGroup.buyNow\":\"立即購買\"}");
  21564. /***/ }),
  21565. /***/ 46:
  21566. /*!****************************************!*\
  21567. !*** E:/项目资料/智慧社区/Applet/api/login.js ***!
  21568. \****************************************/
  21569. /*! no static exports found */
  21570. /***/ (function(module, exports, __webpack_require__) {
  21571. "use strict";
  21572. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21573. Object.defineProperty(exports, "__esModule", {
  21574. value: true
  21575. });
  21576. exports.default = void 0;
  21577. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  21578. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  21579. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  21580. var _env = __webpack_require__(/*! ../env.js */ 45);
  21581. var login = /*#__PURE__*/function () {
  21582. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
  21583. var res;
  21584. return _regenerator.default.wrap(function _callee$(_context) {
  21585. while (1) {
  21586. switch (_context.prev = _context.next) {
  21587. case 0:
  21588. _context.next = 2;
  21589. return _request.default.post({
  21590. url: "/user/login",
  21591. data: data
  21592. });
  21593. case 2:
  21594. res = _context.sent;
  21595. return _context.abrupt("return", res.data);
  21596. case 4:
  21597. case "end":
  21598. return _context.stop();
  21599. }
  21600. }
  21601. }, _callee);
  21602. }));
  21603. return function login(_x) {
  21604. return _ref.apply(this, arguments);
  21605. };
  21606. }();
  21607. var getPhone = /*#__PURE__*/function () {
  21608. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(data) {
  21609. var res;
  21610. return _regenerator.default.wrap(function _callee2$(_context2) {
  21611. while (1) {
  21612. switch (_context2.prev = _context2.next) {
  21613. case 0:
  21614. _context2.next = 2;
  21615. return _request.default.post({
  21616. url: "/wxa/business/getuserphonenumber?appid=".concat(data.appid),
  21617. data: {
  21618. code: data.code
  21619. }
  21620. });
  21621. case 2:
  21622. res = _context2.sent;
  21623. return _context2.abrupt("return", res.data);
  21624. case 4:
  21625. case "end":
  21626. return _context2.stop();
  21627. }
  21628. }
  21629. }, _callee2);
  21630. }));
  21631. return function getPhone(_x2) {
  21632. return _ref2.apply(this, arguments);
  21633. };
  21634. }();
  21635. var getJson = /*#__PURE__*/function () {
  21636. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  21637. var res;
  21638. return _regenerator.default.wrap(function _callee3$(_context3) {
  21639. while (1) {
  21640. switch (_context3.prev = _context3.next) {
  21641. case 0:
  21642. _context3.next = 2;
  21643. return _request.default.get({
  21644. url: "".concat(_env.BASE_URL.imgUrl, "/config.json")
  21645. });
  21646. case 2:
  21647. res = _context3.sent;
  21648. return _context3.abrupt("return", res);
  21649. case 4:
  21650. case "end":
  21651. return _context3.stop();
  21652. }
  21653. }
  21654. }, _callee3);
  21655. }));
  21656. return function getJson() {
  21657. return _ref3.apply(this, arguments);
  21658. };
  21659. }();
  21660. var _default = {
  21661. login: login,
  21662. getPhone: getPhone,
  21663. getJson: getJson
  21664. };
  21665. exports.default = _default;
  21666. /***/ }),
  21667. /***/ 482:
  21668. /*!**************************************************************************************************!*\
  21669. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js ***!
  21670. \**************************************************************************************************/
  21671. /*! no static exports found */
  21672. /***/ (function(module, exports, __webpack_require__) {
  21673. "use strict";
  21674. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21675. Object.defineProperty(exports, "__esModule", {
  21676. value: true
  21677. });
  21678. exports.default = void 0;
  21679. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  21680. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  21681. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  21682. var Calendar = /*#__PURE__*/function () {
  21683. function Calendar() {
  21684. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  21685. date = _ref.date,
  21686. selected = _ref.selected,
  21687. startDate = _ref.startDate,
  21688. endDate = _ref.endDate,
  21689. range = _ref.range;
  21690. (0, _classCallCheck2.default)(this, Calendar);
  21691. // 当前日期
  21692. this.date = this.getDate(new Date()); // 当前初入日期
  21693. // 打点信息
  21694. this.selected = selected || [];
  21695. // 范围开始
  21696. this.startDate = startDate;
  21697. // 范围结束
  21698. this.endDate = endDate;
  21699. this.range = range;
  21700. // 多选状态
  21701. this.cleanMultipleStatus();
  21702. // 每周日期
  21703. this.weeks = {};
  21704. // this._getWeek(this.date.fullDate)
  21705. // this.multipleStatus = multipleStatus
  21706. this.lastHover = false;
  21707. }
  21708. /**
  21709. * 设置日期
  21710. * @param {Object} date
  21711. */
  21712. (0, _createClass2.default)(Calendar, [{
  21713. key: "setDate",
  21714. value: function setDate(date) {
  21715. this.selectDate = this.getDate(date);
  21716. this._getWeek(this.selectDate.fullDate);
  21717. }
  21718. /**
  21719. * 清理多选状态
  21720. */
  21721. }, {
  21722. key: "cleanMultipleStatus",
  21723. value: function cleanMultipleStatus() {
  21724. this.multipleStatus = {
  21725. before: '',
  21726. after: '',
  21727. data: []
  21728. };
  21729. }
  21730. /**
  21731. * 重置开始日期
  21732. */
  21733. }, {
  21734. key: "resetSatrtDate",
  21735. value: function resetSatrtDate(startDate) {
  21736. // 范围开始
  21737. this.startDate = startDate;
  21738. }
  21739. /**
  21740. * 重置结束日期
  21741. */
  21742. }, {
  21743. key: "resetEndDate",
  21744. value: function resetEndDate(endDate) {
  21745. // 范围结束
  21746. this.endDate = endDate;
  21747. }
  21748. /**
  21749. * 获取任意时间
  21750. */
  21751. }, {
  21752. key: "getDate",
  21753. value: function getDate(date) {
  21754. var AddDayCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  21755. var str = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'day';
  21756. if (!date) {
  21757. date = new Date();
  21758. }
  21759. if ((0, _typeof2.default)(date) !== 'object') {
  21760. date = date.replace(/-/g, '/');
  21761. }
  21762. var dd = new Date(date);
  21763. switch (str) {
  21764. case 'day':
  21765. dd.setDate(dd.getDate() + AddDayCount); // 获取AddDayCount天后的日期
  21766. break;
  21767. case 'month':
  21768. if (dd.getDate() === 31) {
  21769. dd.setDate(dd.getDate() + AddDayCount);
  21770. } else {
  21771. dd.setMonth(dd.getMonth() + AddDayCount); // 获取AddDayCount天后的日期
  21772. }
  21773. break;
  21774. case 'year':
  21775. dd.setFullYear(dd.getFullYear() + AddDayCount); // 获取AddDayCount天后的日期
  21776. break;
  21777. }
  21778. var y = dd.getFullYear();
  21779. var m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1; // 获取当前月份的日期,不足10补0
  21780. var d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate(); // 获取当前几号,不足10补0
  21781. return {
  21782. fullDate: y + '-' + m + '-' + d,
  21783. year: y,
  21784. month: m,
  21785. date: d,
  21786. day: dd.getDay()
  21787. };
  21788. }
  21789. /**
  21790. * 获取上月剩余天数
  21791. */
  21792. }, {
  21793. key: "_getLastMonthDays",
  21794. value: function _getLastMonthDays(firstDay, full) {
  21795. var dateArr = [];
  21796. for (var i = firstDay; i > 0; i--) {
  21797. var beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate();
  21798. dateArr.push({
  21799. date: beforeDate,
  21800. month: full.month - 1,
  21801. disable: true
  21802. });
  21803. }
  21804. return dateArr;
  21805. }
  21806. /**
  21807. * 获取本月天数
  21808. */
  21809. }, {
  21810. key: "_currentMonthDys",
  21811. value: function _currentMonthDys(dateData, full) {
  21812. var _this = this;
  21813. var dateArr = [];
  21814. var fullDate = this.date.fullDate;
  21815. var _loop = function _loop(i) {
  21816. var isinfo = false;
  21817. var nowDate = full.year + '-' + (full.month < 10 ? full.month : full.month) + '-' + (i < 10 ? '0' + i : i);
  21818. // 是否今天
  21819. var isDay = fullDate === nowDate;
  21820. // 获取打点信息
  21821. var info = _this.selected && _this.selected.find(function (item) {
  21822. if (_this.dateEqual(nowDate, item.date)) {
  21823. return item;
  21824. }
  21825. });
  21826. // 日期禁用
  21827. var disableBefore = true;
  21828. var disableAfter = true;
  21829. if (_this.startDate) {
  21830. // let dateCompBefore = this.dateCompare(this.startDate, fullDate)
  21831. // disableBefore = this.dateCompare(dateCompBefore ? this.startDate : fullDate, nowDate)
  21832. disableBefore = _this.dateCompare(_this.startDate, nowDate);
  21833. }
  21834. if (_this.endDate) {
  21835. // let dateCompAfter = this.dateCompare(fullDate, this.endDate)
  21836. // disableAfter = this.dateCompare(nowDate, dateCompAfter ? this.endDate : fullDate)
  21837. disableAfter = _this.dateCompare(nowDate, _this.endDate);
  21838. }
  21839. var multiples = _this.multipleStatus.data;
  21840. var checked = false;
  21841. var multiplesStatus = -1;
  21842. if (_this.range) {
  21843. if (multiples) {
  21844. multiplesStatus = multiples.findIndex(function (item) {
  21845. return _this.dateEqual(item, nowDate);
  21846. });
  21847. }
  21848. if (multiplesStatus !== -1) {
  21849. checked = true;
  21850. }
  21851. }
  21852. var data = {
  21853. fullDate: nowDate,
  21854. year: full.year,
  21855. date: i,
  21856. multiple: _this.range ? checked : false,
  21857. beforeMultiple: _this.isLogicBefore(nowDate, _this.multipleStatus.before, _this.multipleStatus.after),
  21858. afterMultiple: _this.isLogicAfter(nowDate, _this.multipleStatus.before, _this.multipleStatus.after),
  21859. month: full.month,
  21860. disable: !(disableBefore && disableAfter),
  21861. isDay: isDay,
  21862. userChecked: false
  21863. };
  21864. if (info) {
  21865. data.extraInfo = info;
  21866. }
  21867. dateArr.push(data);
  21868. };
  21869. for (var i = 1; i <= dateData; i++) {
  21870. _loop(i);
  21871. }
  21872. return dateArr;
  21873. }
  21874. /**
  21875. * 获取下月天数
  21876. */
  21877. }, {
  21878. key: "_getNextMonthDays",
  21879. value: function _getNextMonthDays(surplus, full) {
  21880. var dateArr = [];
  21881. for (var i = 1; i < surplus + 1; i++) {
  21882. dateArr.push({
  21883. date: i,
  21884. month: Number(full.month) + 1,
  21885. disable: true
  21886. });
  21887. }
  21888. return dateArr;
  21889. }
  21890. /**
  21891. * 获取当前日期详情
  21892. * @param {Object} date
  21893. */
  21894. }, {
  21895. key: "getInfo",
  21896. value: function getInfo(date) {
  21897. var _this2 = this;
  21898. if (!date) {
  21899. date = new Date();
  21900. }
  21901. var dateInfo = this.canlender.find(function (item) {
  21902. return item.fullDate === _this2.getDate(date).fullDate;
  21903. });
  21904. return dateInfo;
  21905. }
  21906. /**
  21907. * 比较时间大小
  21908. */
  21909. }, {
  21910. key: "dateCompare",
  21911. value: function dateCompare(startDate, endDate) {
  21912. // 计算截止时间
  21913. startDate = new Date(startDate.replace('-', '/').replace('-', '/'));
  21914. // 计算详细项的截止时间
  21915. endDate = new Date(endDate.replace('-', '/').replace('-', '/'));
  21916. if (startDate <= endDate) {
  21917. return true;
  21918. } else {
  21919. return false;
  21920. }
  21921. }
  21922. /**
  21923. * 比较时间是否相等
  21924. */
  21925. }, {
  21926. key: "dateEqual",
  21927. value: function dateEqual(before, after) {
  21928. // 计算截止时间
  21929. before = new Date(before.replace('-', '/').replace('-', '/'));
  21930. // 计算详细项的截止时间
  21931. after = new Date(after.replace('-', '/').replace('-', '/'));
  21932. if (before.getTime() - after.getTime() === 0) {
  21933. return true;
  21934. } else {
  21935. return false;
  21936. }
  21937. }
  21938. /**
  21939. * 比较真实起始日期
  21940. */
  21941. }, {
  21942. key: "isLogicBefore",
  21943. value: function isLogicBefore(currentDay, before, after) {
  21944. var logicBefore = before;
  21945. if (before && after) {
  21946. logicBefore = this.dateCompare(before, after) ? before : after;
  21947. }
  21948. return this.dateEqual(logicBefore, currentDay);
  21949. }
  21950. }, {
  21951. key: "isLogicAfter",
  21952. value: function isLogicAfter(currentDay, before, after) {
  21953. var logicAfter = after;
  21954. if (before && after) {
  21955. logicAfter = this.dateCompare(before, after) ? after : before;
  21956. }
  21957. return this.dateEqual(logicAfter, currentDay);
  21958. }
  21959. /**
  21960. * 获取日期范围内所有日期
  21961. * @param {Object} begin
  21962. * @param {Object} end
  21963. */
  21964. }, {
  21965. key: "geDateAll",
  21966. value: function geDateAll(begin, end) {
  21967. var arr = [];
  21968. var ab = begin.split('-');
  21969. var ae = end.split('-');
  21970. var db = new Date();
  21971. db.setFullYear(ab[0], ab[1] - 1, ab[2]);
  21972. var de = new Date();
  21973. de.setFullYear(ae[0], ae[1] - 1, ae[2]);
  21974. var unixDb = db.getTime() - 24 * 60 * 60 * 1000;
  21975. var unixDe = de.getTime() - 24 * 60 * 60 * 1000;
  21976. for (var k = unixDb; k <= unixDe;) {
  21977. k = k + 24 * 60 * 60 * 1000;
  21978. arr.push(this.getDate(new Date(parseInt(k))).fullDate);
  21979. }
  21980. return arr;
  21981. }
  21982. /**
  21983. * 获取多选状态
  21984. */
  21985. }, {
  21986. key: "setMultiple",
  21987. value: function setMultiple(fullDate) {
  21988. var _this$multipleStatus = this.multipleStatus,
  21989. before = _this$multipleStatus.before,
  21990. after = _this$multipleStatus.after;
  21991. if (!this.range) return;
  21992. if (before && after) {
  21993. if (!this.lastHover) {
  21994. this.lastHover = true;
  21995. return;
  21996. }
  21997. this.multipleStatus.before = fullDate;
  21998. this.multipleStatus.after = '';
  21999. this.multipleStatus.data = [];
  22000. this.multipleStatus.fulldate = '';
  22001. this.lastHover = false;
  22002. } else {
  22003. if (!before) {
  22004. this.multipleStatus.before = fullDate;
  22005. this.lastHover = false;
  22006. } else {
  22007. this.multipleStatus.after = fullDate;
  22008. if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  22009. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  22010. } else {
  22011. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  22012. }
  22013. this.lastHover = true;
  22014. }
  22015. }
  22016. this._getWeek(fullDate);
  22017. }
  22018. /**
  22019. * 鼠标 hover 更新多选状态
  22020. */
  22021. }, {
  22022. key: "setHoverMultiple",
  22023. value: function setHoverMultiple(fullDate) {
  22024. var _this$multipleStatus2 = this.multipleStatus,
  22025. before = _this$multipleStatus2.before,
  22026. after = _this$multipleStatus2.after;
  22027. if (!this.range) return;
  22028. if (this.lastHover) return;
  22029. if (!before) {
  22030. this.multipleStatus.before = fullDate;
  22031. } else {
  22032. this.multipleStatus.after = fullDate;
  22033. if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  22034. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  22035. } else {
  22036. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  22037. }
  22038. }
  22039. this._getWeek(fullDate);
  22040. }
  22041. /**
  22042. * 更新默认值多选状态
  22043. */
  22044. }, {
  22045. key: "setDefaultMultiple",
  22046. value: function setDefaultMultiple(before, after) {
  22047. this.multipleStatus.before = before;
  22048. this.multipleStatus.after = after;
  22049. if (before && after) {
  22050. if (this.dateCompare(before, after)) {
  22051. this.multipleStatus.data = this.geDateAll(before, after);
  22052. this._getWeek(after);
  22053. } else {
  22054. this.multipleStatus.data = this.geDateAll(after, before);
  22055. this._getWeek(before);
  22056. }
  22057. }
  22058. }
  22059. /**
  22060. * 获取每周数据
  22061. * @param {Object} dateData
  22062. */
  22063. }, {
  22064. key: "_getWeek",
  22065. value: function _getWeek(dateData) {
  22066. var _this$getDate = this.getDate(dateData),
  22067. fullDate = _this$getDate.fullDate,
  22068. year = _this$getDate.year,
  22069. month = _this$getDate.month,
  22070. date = _this$getDate.date,
  22071. day = _this$getDate.day;
  22072. var firstDay = new Date(year, month - 1, 1).getDay();
  22073. var currentDay = new Date(year, month, 0).getDate();
  22074. var dates = {
  22075. lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)),
  22076. // 上个月末尾几天
  22077. currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)),
  22078. // 本月天数
  22079. nextMonthDays: [],
  22080. // 下个月开始几天
  22081. weeks: []
  22082. };
  22083. var canlender = [];
  22084. var surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length);
  22085. dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData));
  22086. canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays);
  22087. var weeks = {};
  22088. // 拼接数组 上个月开始几天 + 本月天数+ 下个月开始几天
  22089. for (var i = 0; i < canlender.length; i++) {
  22090. if (i % 7 === 0) {
  22091. weeks[parseInt(i / 7)] = new Array(7);
  22092. }
  22093. weeks[parseInt(i / 7)][i % 7] = canlender[i];
  22094. }
  22095. this.canlender = canlender;
  22096. this.weeks = weeks;
  22097. }
  22098. //静态方法
  22099. // static init(date) {
  22100. // if (!this.instance) {
  22101. // this.instance = new Calendar(date);
  22102. // }
  22103. // return this.instance;
  22104. // }
  22105. }]);
  22106. return Calendar;
  22107. }();
  22108. var _default = Calendar;
  22109. exports.default = _default;
  22110. /***/ }),
  22111. /***/ 5:
  22112. /*!**************************************************************!*\
  22113. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  22114. \**************************************************************/
  22115. /*! no static exports found */
  22116. /***/ (function(module, exports, __webpack_require__) {
  22117. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  22118. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  22119. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  22120. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  22121. function _slicedToArray(arr, i) {
  22122. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  22123. }
  22124. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  22125. /***/ }),
  22126. /***/ 516:
  22127. /*!*******************************************************************************!*\
  22128. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-popup/components/uni-popup/popup.js ***!
  22129. \*******************************************************************************/
  22130. /*! no static exports found */
  22131. /***/ (function(module, exports, __webpack_require__) {
  22132. "use strict";
  22133. Object.defineProperty(exports, "__esModule", {
  22134. value: true
  22135. });
  22136. exports.default = void 0;
  22137. var _default = {
  22138. data: function data() {
  22139. return {};
  22140. },
  22141. created: function created() {
  22142. this.popup = this.getParent();
  22143. },
  22144. methods: {
  22145. /**
  22146. * 获取父元素实例
  22147. */
  22148. getParent: function getParent() {
  22149. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'uniPopup';
  22150. var parent = this.$parent;
  22151. var parentName = parent.$options.name;
  22152. while (parentName !== name) {
  22153. parent = parent.$parent;
  22154. if (!parent) return false;
  22155. parentName = parent.$options.name;
  22156. }
  22157. return parent;
  22158. }
  22159. }
  22160. };
  22161. exports.default = _default;
  22162. /***/ }),
  22163. /***/ 517:
  22164. /*!************************************************************************************!*\
  22165. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-popup/components/uni-popup/i18n/index.js ***!
  22166. \************************************************************************************/
  22167. /*! no static exports found */
  22168. /***/ (function(module, exports, __webpack_require__) {
  22169. "use strict";
  22170. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  22171. Object.defineProperty(exports, "__esModule", {
  22172. value: true
  22173. });
  22174. exports.default = void 0;
  22175. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 518));
  22176. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 519));
  22177. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 520));
  22178. var _default = {
  22179. en: _en.default,
  22180. 'zh-Hans': _zhHans.default,
  22181. 'zh-Hant': _zhHant.default
  22182. };
  22183. exports.default = _default;
  22184. /***/ }),
  22185. /***/ 518:
  22186. /*!***********************************************************************************!*\
  22187. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-popup/components/uni-popup/i18n/en.json ***!
  22188. \***********************************************************************************/
  22189. /*! exports provided: uni-popup.cancel, uni-popup.ok, uni-popup.placeholder, uni-popup.title, uni-popup.shareTitle, default */
  22190. /***/ (function(module) {
  22191. module.exports = JSON.parse("{\"uni-popup.cancel\":\"cancel\",\"uni-popup.ok\":\"ok\",\"uni-popup.placeholder\":\"pleace enter\",\"uni-popup.title\":\"Hint\",\"uni-popup.shareTitle\":\"Share to\"}");
  22192. /***/ }),
  22193. /***/ 519:
  22194. /*!****************************************************************************************!*\
  22195. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json ***!
  22196. \****************************************************************************************/
  22197. /*! exports provided: uni-popup.cancel, uni-popup.ok, uni-popup.placeholder, uni-popup.title, uni-popup.shareTitle, default */
  22198. /***/ (function(module) {
  22199. module.exports = JSON.parse("{\"uni-popup.cancel\":\"取消\",\"uni-popup.ok\":\"确定\",\"uni-popup.placeholder\":\"请输入\",\"uni-popup.title\":\"提示\",\"uni-popup.shareTitle\":\"分享到\"}");
  22200. /***/ }),
  22201. /***/ 520:
  22202. /*!****************************************************************************************!*\
  22203. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json ***!
  22204. \****************************************************************************************/
  22205. /*! exports provided: uni-popup.cancel, uni-popup.ok, uni-popup.placeholder, uni-popup.title, uni-popup.shareTitle, default */
  22206. /***/ (function(module) {
  22207. module.exports = JSON.parse("{\"uni-popup.cancel\":\"取消\",\"uni-popup.ok\":\"確定\",\"uni-popup.placeholder\":\"請輸入\",\"uni-popup.title\":\"提示\",\"uni-popup.shareTitle\":\"分享到\"}");
  22208. /***/ }),
  22209. /***/ 55:
  22210. /*!***************************************!*\
  22211. !*** E:/项目资料/智慧社区/Applet/api/user.js ***!
  22212. \***************************************/
  22213. /*! no static exports found */
  22214. /***/ (function(module, exports, __webpack_require__) {
  22215. "use strict";
  22216. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  22217. Object.defineProperty(exports, "__esModule", {
  22218. value: true
  22219. });
  22220. exports.default = void 0;
  22221. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  22222. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  22223. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  22224. // 查询地址下拉树结构 -- 到小区
  22225. var addrTreeSelect = /*#__PURE__*/function () {
  22226. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
  22227. var res;
  22228. return _regenerator.default.wrap(function _callee$(_context) {
  22229. while (1) {
  22230. switch (_context.prev = _context.next) {
  22231. case 0:
  22232. _context.next = 2;
  22233. return _request.default.get({
  22234. url: "/wx/addr/tree",
  22235. data: data
  22236. });
  22237. case 2:
  22238. res = _context.sent;
  22239. return _context.abrupt("return", res.data);
  22240. case 4:
  22241. case "end":
  22242. return _context.stop();
  22243. }
  22244. }
  22245. }, _callee);
  22246. }));
  22247. return function addrTreeSelect(_x) {
  22248. return _ref.apply(this, arguments);
  22249. };
  22250. }();
  22251. // 楼栋查询
  22252. var buildingList = /*#__PURE__*/function () {
  22253. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(data) {
  22254. var res;
  22255. return _regenerator.default.wrap(function _callee2$(_context2) {
  22256. while (1) {
  22257. switch (_context2.prev = _context2.next) {
  22258. case 0:
  22259. _context2.next = 2;
  22260. return _request.default.get({
  22261. url: "/wx/addr/buildings",
  22262. data: data
  22263. });
  22264. case 2:
  22265. res = _context2.sent;
  22266. return _context2.abrupt("return", res.data);
  22267. case 4:
  22268. case "end":
  22269. return _context2.stop();
  22270. }
  22271. }
  22272. }, _callee2);
  22273. }));
  22274. return function buildingList(_x2) {
  22275. return _ref2.apply(this, arguments);
  22276. };
  22277. }();
  22278. // 住宅查询
  22279. var houseList = /*#__PURE__*/function () {
  22280. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(data) {
  22281. var res;
  22282. return _regenerator.default.wrap(function _callee3$(_context3) {
  22283. while (1) {
  22284. switch (_context3.prev = _context3.next) {
  22285. case 0:
  22286. _context3.next = 2;
  22287. return _request.default.get({
  22288. url: "/wx/addr/houses",
  22289. data: data
  22290. });
  22291. case 2:
  22292. res = _context3.sent;
  22293. return _context3.abrupt("return", res.data);
  22294. case 4:
  22295. case "end":
  22296. return _context3.stop();
  22297. }
  22298. }
  22299. }, _callee3);
  22300. }));
  22301. return function houseList(_x3) {
  22302. return _ref3.apply(this, arguments);
  22303. };
  22304. }();
  22305. // 添加用户信息
  22306. var addUser = /*#__PURE__*/function () {
  22307. var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(data) {
  22308. var res;
  22309. return _regenerator.default.wrap(function _callee4$(_context4) {
  22310. while (1) {
  22311. switch (_context4.prev = _context4.next) {
  22312. case 0:
  22313. _context4.next = 2;
  22314. return _request.default.post({
  22315. url: "/user/register",
  22316. data: data
  22317. });
  22318. case 2:
  22319. res = _context4.sent;
  22320. return _context4.abrupt("return", res.data);
  22321. case 4:
  22322. case "end":
  22323. return _context4.stop();
  22324. }
  22325. }
  22326. }, _callee4);
  22327. }));
  22328. return function addUser(_x4) {
  22329. return _ref4.apply(this, arguments);
  22330. };
  22331. }();
  22332. // 添加用户信息
  22333. var updateUser = /*#__PURE__*/function () {
  22334. var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(data) {
  22335. var res;
  22336. return _regenerator.default.wrap(function _callee5$(_context5) {
  22337. while (1) {
  22338. switch (_context5.prev = _context5.next) {
  22339. case 0:
  22340. _context5.next = 2;
  22341. return _request.default.post({
  22342. url: "/user/edit",
  22343. data: data
  22344. });
  22345. case 2:
  22346. res = _context5.sent;
  22347. return _context5.abrupt("return", res.data);
  22348. case 4:
  22349. case "end":
  22350. return _context5.stop();
  22351. }
  22352. }
  22353. }, _callee5);
  22354. }));
  22355. return function updateUser(_x5) {
  22356. return _ref5.apply(this, arguments);
  22357. };
  22358. }();
  22359. // 获取用户信息
  22360. var getUser = /*#__PURE__*/function () {
  22361. var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
  22362. var res;
  22363. return _regenerator.default.wrap(function _callee6$(_context6) {
  22364. while (1) {
  22365. switch (_context6.prev = _context6.next) {
  22366. case 0:
  22367. _context6.next = 2;
  22368. return _request.default.get({
  22369. url: "/user/info"
  22370. });
  22371. case 2:
  22372. res = _context6.sent;
  22373. return _context6.abrupt("return", res.data);
  22374. case 4:
  22375. case "end":
  22376. return _context6.stop();
  22377. }
  22378. }
  22379. }, _callee6);
  22380. }));
  22381. return function getUser() {
  22382. return _ref6.apply(this, arguments);
  22383. };
  22384. }();
  22385. var _default = {
  22386. addrTreeSelect: addrTreeSelect,
  22387. buildingList: buildingList,
  22388. houseList: houseList,
  22389. addUser: addUser,
  22390. getUser: getUser,
  22391. updateUser: updateUser
  22392. };
  22393. exports.default = _default;
  22394. /***/ }),
  22395. /***/ 6:
  22396. /*!***************************************************************!*\
  22397. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  22398. \***************************************************************/
  22399. /*! no static exports found */
  22400. /***/ (function(module, exports) {
  22401. function _arrayWithHoles(arr) {
  22402. if (Array.isArray(arr)) return arr;
  22403. }
  22404. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  22405. /***/ }),
  22406. /***/ 7:
  22407. /*!*********************************************************************!*\
  22408. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  22409. \*********************************************************************/
  22410. /*! no static exports found */
  22411. /***/ (function(module, exports) {
  22412. function _iterableToArrayLimit(arr, i) {
  22413. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  22414. if (null != _i) {
  22415. var _s,
  22416. _e,
  22417. _x,
  22418. _r,
  22419. _arr = [],
  22420. _n = !0,
  22421. _d = !1;
  22422. try {
  22423. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  22424. if (Object(_i) !== _i) return;
  22425. _n = !1;
  22426. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  22427. ;
  22428. }
  22429. } catch (err) {
  22430. _d = !0, _e = err;
  22431. } finally {
  22432. try {
  22433. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  22434. } finally {
  22435. if (_d) throw _e;
  22436. }
  22437. }
  22438. return _arr;
  22439. }
  22440. }
  22441. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  22442. /***/ }),
  22443. /***/ 72:
  22444. /*!**************************************!*\
  22445. !*** E:/项目资料/智慧社区/Applet/api/cms.js ***!
  22446. \**************************************/
  22447. /*! no static exports found */
  22448. /***/ (function(module, exports, __webpack_require__) {
  22449. "use strict";
  22450. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  22451. Object.defineProperty(exports, "__esModule", {
  22452. value: true
  22453. });
  22454. exports.default = void 0;
  22455. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  22456. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  22457. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  22458. var getTypeList = /*#__PURE__*/function () {
  22459. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref) {
  22460. var alias, res;
  22461. return _regenerator.default.wrap(function _callee$(_context) {
  22462. while (1) {
  22463. switch (_context.prev = _context.next) {
  22464. case 0:
  22465. alias = _ref.alias;
  22466. _context.next = 3;
  22467. return _request.default.get({
  22468. url: "/cms/type/sublist/".concat(alias)
  22469. });
  22470. case 3:
  22471. res = _context.sent;
  22472. return _context.abrupt("return", res.data);
  22473. case 5:
  22474. case "end":
  22475. return _context.stop();
  22476. }
  22477. }
  22478. }, _callee);
  22479. }));
  22480. return function getTypeList(_x) {
  22481. return _ref2.apply(this, arguments);
  22482. };
  22483. }();
  22484. var getArticleList = /*#__PURE__*/function () {
  22485. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(data) {
  22486. var res;
  22487. return _regenerator.default.wrap(function _callee2$(_context2) {
  22488. while (1) {
  22489. switch (_context2.prev = _context2.next) {
  22490. case 0:
  22491. _context2.next = 2;
  22492. return _request.default.get({
  22493. url: "/cms/blog/wx/articleList",
  22494. data: data
  22495. });
  22496. case 2:
  22497. res = _context2.sent;
  22498. return _context2.abrupt("return", res.data);
  22499. case 4:
  22500. case "end":
  22501. return _context2.stop();
  22502. }
  22503. }
  22504. }, _callee2);
  22505. }));
  22506. return function getArticleList(_x2) {
  22507. return _ref3.apply(this, arguments);
  22508. };
  22509. }();
  22510. var getArticleDetail = /*#__PURE__*/function () {
  22511. var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(_ref4) {
  22512. var id, res;
  22513. return _regenerator.default.wrap(function _callee3$(_context3) {
  22514. while (1) {
  22515. switch (_context3.prev = _context3.next) {
  22516. case 0:
  22517. id = _ref4.id;
  22518. _context3.next = 3;
  22519. return _request.default.get({
  22520. url: "/cms/blog/cms/detail/".concat(id)
  22521. });
  22522. case 3:
  22523. res = _context3.sent;
  22524. return _context3.abrupt("return", res.data);
  22525. case 5:
  22526. case "end":
  22527. return _context3.stop();
  22528. }
  22529. }
  22530. }, _callee3);
  22531. }));
  22532. return function getArticleDetail(_x3) {
  22533. return _ref5.apply(this, arguments);
  22534. };
  22535. }();
  22536. var addBlogViews = /*#__PURE__*/function () {
  22537. var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(_ref6) {
  22538. var id, res;
  22539. return _regenerator.default.wrap(function _callee4$(_context4) {
  22540. while (1) {
  22541. switch (_context4.prev = _context4.next) {
  22542. case 0:
  22543. id = _ref6.id;
  22544. _context4.next = 3;
  22545. return _request.default.get({
  22546. url: "/cms/blog/cms/addBlogViews/".concat(id)
  22547. });
  22548. case 3:
  22549. res = _context4.sent;
  22550. return _context4.abrupt("return", res.data);
  22551. case 5:
  22552. case "end":
  22553. return _context4.stop();
  22554. }
  22555. }
  22556. }, _callee4);
  22557. }));
  22558. return function addBlogViews(_x4) {
  22559. return _ref7.apply(this, arguments);
  22560. };
  22561. }();
  22562. var getsublist = /*#__PURE__*/function () {
  22563. var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(_ref8) {
  22564. var alias, res;
  22565. return _regenerator.default.wrap(function _callee5$(_context5) {
  22566. while (1) {
  22567. switch (_context5.prev = _context5.next) {
  22568. case 0:
  22569. alias = _ref8.alias;
  22570. _context5.next = 3;
  22571. return _request.default.get({
  22572. url: "/cms/type/sublist/".concat(alias)
  22573. });
  22574. case 3:
  22575. res = _context5.sent;
  22576. return _context5.abrupt("return", res.data);
  22577. case 5:
  22578. case "end":
  22579. return _context5.stop();
  22580. }
  22581. }
  22582. }, _callee5);
  22583. }));
  22584. return function getsublist(_x5) {
  22585. return _ref9.apply(this, arguments);
  22586. };
  22587. }();
  22588. var _default = {
  22589. getTypeList: getTypeList,
  22590. getArticleList: getArticleList,
  22591. getArticleDetail: getArticleDetail,
  22592. addBlogViews: addBlogViews,
  22593. getsublist: getsublist
  22594. };
  22595. exports.default = _default;
  22596. /***/ }),
  22597. /***/ 8:
  22598. /*!***************************************************************************!*\
  22599. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  22600. \***************************************************************************/
  22601. /*! no static exports found */
  22602. /***/ (function(module, exports, __webpack_require__) {
  22603. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  22604. function _unsupportedIterableToArray(o, minLen) {
  22605. if (!o) return;
  22606. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  22607. var n = Object.prototype.toString.call(o).slice(8, -1);
  22608. if (n === "Object" && o.constructor) n = o.constructor.name;
  22609. if (n === "Map" || n === "Set") return Array.from(o);
  22610. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  22611. }
  22612. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  22613. /***/ }),
  22614. /***/ 81:
  22615. /*!*****************************************!*\
  22616. !*** E:/项目资料/智慧社区/Applet/api/family.js ***!
  22617. \*****************************************/
  22618. /*! no static exports found */
  22619. /***/ (function(module, exports, __webpack_require__) {
  22620. "use strict";
  22621. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  22622. Object.defineProperty(exports, "__esModule", {
  22623. value: true
  22624. });
  22625. exports.default = void 0;
  22626. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  22627. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  22628. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  22629. // 修改家人信息
  22630. var familyInfo = /*#__PURE__*/function () {
  22631. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
  22632. var res;
  22633. return _regenerator.default.wrap(function _callee$(_context) {
  22634. while (1) {
  22635. switch (_context.prev = _context.next) {
  22636. case 0:
  22637. _context.next = 2;
  22638. return _request.default.post({
  22639. url: "/user/commit-application",
  22640. data: data
  22641. });
  22642. case 2:
  22643. res = _context.sent;
  22644. return _context.abrupt("return", res.data);
  22645. case 4:
  22646. case "end":
  22647. return _context.stop();
  22648. }
  22649. }
  22650. }, _callee);
  22651. }));
  22652. return function familyInfo(_x) {
  22653. return _ref.apply(this, arguments);
  22654. };
  22655. }();
  22656. // 获取家人信息
  22657. var getFamilyInfo = /*#__PURE__*/function () {
  22658. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(data) {
  22659. var res;
  22660. return _regenerator.default.wrap(function _callee2$(_context2) {
  22661. while (1) {
  22662. switch (_context2.prev = _context2.next) {
  22663. case 0:
  22664. _context2.next = 2;
  22665. return _request.default.get({
  22666. url: "/wx/resident/members",
  22667. data: data
  22668. });
  22669. case 2:
  22670. res = _context2.sent;
  22671. return _context2.abrupt("return", res.data);
  22672. case 4:
  22673. case "end":
  22674. return _context2.stop();
  22675. }
  22676. }
  22677. }, _callee2);
  22678. }));
  22679. return function getFamilyInfo(_x2) {
  22680. return _ref2.apply(this, arguments);
  22681. };
  22682. }();
  22683. // 获取家人信息详情
  22684. var getFamilyInfoDetails = /*#__PURE__*/function () {
  22685. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(data) {
  22686. var res;
  22687. return _regenerator.default.wrap(function _callee3$(_context3) {
  22688. while (1) {
  22689. switch (_context3.prev = _context3.next) {
  22690. case 0:
  22691. _context3.next = 2;
  22692. return _request.default.get({
  22693. url: "/wx/resident/info",
  22694. data: data
  22695. });
  22696. case 2:
  22697. res = _context3.sent;
  22698. return _context3.abrupt("return", res.data);
  22699. case 4:
  22700. case "end":
  22701. return _context3.stop();
  22702. }
  22703. }
  22704. }, _callee3);
  22705. }));
  22706. return function getFamilyInfoDetails(_x3) {
  22707. return _ref3.apply(this, arguments);
  22708. };
  22709. }();
  22710. // 报备状态
  22711. var membersStatus = /*#__PURE__*/function () {
  22712. var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(data) {
  22713. var res;
  22714. return _regenerator.default.wrap(function _callee4$(_context4) {
  22715. while (1) {
  22716. switch (_context4.prev = _context4.next) {
  22717. case 0:
  22718. _context4.next = 2;
  22719. return _request.default.post({
  22720. url: "/nat/members-status",
  22721. data: data
  22722. });
  22723. case 2:
  22724. res = _context4.sent;
  22725. return _context4.abrupt("return", res.data);
  22726. case 4:
  22727. case "end":
  22728. return _context4.stop();
  22729. }
  22730. }
  22731. }, _callee4);
  22732. }));
  22733. return function membersStatus(_x4) {
  22734. return _ref4.apply(this, arguments);
  22735. };
  22736. }();
  22737. // 当前任务
  22738. var runningTask = /*#__PURE__*/function () {
  22739. var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(data) {
  22740. var res;
  22741. return _regenerator.default.wrap(function _callee5$(_context5) {
  22742. while (1) {
  22743. switch (_context5.prev = _context5.next) {
  22744. case 0:
  22745. _context5.next = 2;
  22746. return _request.default.get({
  22747. url: "/nat/running-task",
  22748. data: data
  22749. });
  22750. case 2:
  22751. res = _context5.sent;
  22752. return _context5.abrupt("return", res.data);
  22753. case 4:
  22754. case "end":
  22755. return _context5.stop();
  22756. }
  22757. }
  22758. }, _callee5);
  22759. }));
  22760. return function runningTask(_x5) {
  22761. return _ref5.apply(this, arguments);
  22762. };
  22763. }();
  22764. // 报备
  22765. var filing = /*#__PURE__*/function () {
  22766. var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(data) {
  22767. var res;
  22768. return _regenerator.default.wrap(function _callee6$(_context6) {
  22769. while (1) {
  22770. switch (_context6.prev = _context6.next) {
  22771. case 0:
  22772. _context6.next = 2;
  22773. return _request.default.post({
  22774. url: "/nat/add-record",
  22775. data: data
  22776. });
  22777. case 2:
  22778. res = _context6.sent;
  22779. return _context6.abrupt("return", res.data);
  22780. case 4:
  22781. case "end":
  22782. return _context6.stop();
  22783. }
  22784. }
  22785. }, _callee6);
  22786. }));
  22787. return function filing(_x6) {
  22788. return _ref6.apply(this, arguments);
  22789. };
  22790. }();
  22791. // 获取家庭成员列表 待审核,含本人
  22792. var getApplyUser = /*#__PURE__*/function () {
  22793. var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(data) {
  22794. var res;
  22795. return _regenerator.default.wrap(function _callee7$(_context7) {
  22796. while (1) {
  22797. switch (_context7.prev = _context7.next) {
  22798. case 0:
  22799. _context7.next = 2;
  22800. return _request.default.get({
  22801. url: "/resident/req/list",
  22802. data: data
  22803. });
  22804. case 2:
  22805. res = _context7.sent;
  22806. return _context7.abrupt("return", res.data);
  22807. case 4:
  22808. case "end":
  22809. return _context7.stop();
  22810. }
  22811. }
  22812. }, _callee7);
  22813. }));
  22814. return function getApplyUser(_x7) {
  22815. return _ref7.apply(this, arguments);
  22816. };
  22817. }();
  22818. // 获取待审核信息详情
  22819. var getReqInfoDetails = /*#__PURE__*/function () {
  22820. var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(data) {
  22821. var res;
  22822. return _regenerator.default.wrap(function _callee8$(_context8) {
  22823. while (1) {
  22824. switch (_context8.prev = _context8.next) {
  22825. case 0:
  22826. _context8.next = 2;
  22827. return _request.default.get({
  22828. url: "/resident/req/".concat(data.residentReqId)
  22829. });
  22830. case 2:
  22831. res = _context8.sent;
  22832. return _context8.abrupt("return", res.data);
  22833. case 4:
  22834. case "end":
  22835. return _context8.stop();
  22836. }
  22837. }
  22838. }, _callee8);
  22839. }));
  22840. return function getReqInfoDetails(_x8) {
  22841. return _ref8.apply(this, arguments);
  22842. };
  22843. }();
  22844. // 所有待报备
  22845. var getUserAll = /*#__PURE__*/function () {
  22846. var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(data) {
  22847. var res;
  22848. return _regenerator.default.wrap(function _callee9$(_context9) {
  22849. while (1) {
  22850. switch (_context9.prev = _context9.next) {
  22851. case 0:
  22852. _context9.next = 2;
  22853. return _request.default.get({
  22854. url: "/wx/resident/members-for-reporting"
  22855. });
  22856. case 2:
  22857. res = _context9.sent;
  22858. return _context9.abrupt("return", res.data);
  22859. case 4:
  22860. case "end":
  22861. return _context9.stop();
  22862. }
  22863. }
  22864. }, _callee9);
  22865. }));
  22866. return function getUserAll(_x9) {
  22867. return _ref9.apply(this, arguments);
  22868. };
  22869. }();
  22870. // 取消审核申请
  22871. var removeApply = /*#__PURE__*/function () {
  22872. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(data) {
  22873. var res;
  22874. return _regenerator.default.wrap(function _callee10$(_context10) {
  22875. while (1) {
  22876. switch (_context10.prev = _context10.next) {
  22877. case 0:
  22878. _context10.next = 2;
  22879. return _request.default.post({
  22880. url: "/resident/req/cancel/".concat(data.residentReqId),
  22881. data: data
  22882. });
  22883. case 2:
  22884. res = _context10.sent;
  22885. return _context10.abrupt("return", res.data);
  22886. case 4:
  22887. case "end":
  22888. return _context10.stop();
  22889. }
  22890. }
  22891. }, _callee10);
  22892. }));
  22893. return function removeApply(_x10) {
  22894. return _ref10.apply(this, arguments);
  22895. };
  22896. }();
  22897. var _default = {
  22898. familyInfo: familyInfo,
  22899. getFamilyInfo: getFamilyInfo,
  22900. filing: filing,
  22901. membersStatus: membersStatus,
  22902. runningTask: runningTask,
  22903. getFamilyInfoDetails: getFamilyInfoDetails,
  22904. getApplyUser: getApplyUser,
  22905. getReqInfoDetails: getReqInfoDetails,
  22906. getUserAll: getUserAll,
  22907. removeApply: removeApply
  22908. };
  22909. exports.default = _default;
  22910. /***/ }),
  22911. /***/ 9:
  22912. /*!*****************************************************************!*\
  22913. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  22914. \*****************************************************************/
  22915. /*! no static exports found */
  22916. /***/ (function(module, exports) {
  22917. function _arrayLikeToArray(arr, len) {
  22918. if (len == null || len > arr.length) len = arr.length;
  22919. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  22920. arr2[i] = arr[i];
  22921. }
  22922. return arr2;
  22923. }
  22924. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  22925. /***/ })
  22926. }]);
  22927. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map